{"_id":"jungles-rest","_rev":"29-de186a84b0bc61463768b943ec589fed","name":"jungles-rest","description":"Rest layer of Jungles","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.0.0","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validation":"~1.0.0","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles (status: unstable)\n\nThis is the core module for Jungles which is a cms for express.js developers. This module mainly takes care of adding data and providing a back-end.\n\n## Want to help out?\n\nIf you want to help out you can mostly find me in #jungles on freenode (ping pickels) or create an issue here on Github. Feel free to contact to me to share some ideas/code.\n\n## Tutorial\n\nIf you are looking for a tutorial check out [jungles-tutorial](https://github.com/Enome/jungles-tutorial).\n\nThe tutorial has an example site you can try.\n\n```sh\ngit clone git@github.com:Enome/jungles-tutorial.git && cd jungles-tutorial && npm install && node app.js\n```\n\n## Initialize\n\n```js\n// Setup\nvar data = require('jungles-data-memory')([]);\nvar types = require('./types');\n\nvar jungles = require('jungles').init({\n  data: data,\n  types: types\n});\n\n// Mount\napp.use('/jungles', jungles.app);\n```\n\n## Data\n\nThis module is pass to Jungles and used as the data access layer.\n\n- [jungles-data-memory](http://github.com/Enome/jungles-data-memory)\n- [jungles-data-postgres](http://github.com/Enome/jungles-data-postgres)\n\n## Files\n\nThis module is passed to Jungles and used as to store files.\n\n- [jungles-files-disk](http://github.com/Enome/jungles-files-disk)\n\n## Types\n\n```js\nvar language = {\n  root: true,\n  name: 'language',\n  children: [ 'page', 'projects' ],\n  form: 'forms/language',\n  schema: {\n    title: [ validators.required(), validators.string() ]\n  }\n};\n\nmodule.exports = [ laguange ];\n```\n\n### Root\n\nIf property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nChildren property is an array to whitelist which children are allowed to this type.\n\n### Form\n\nForm is the form that is used to input data into the back-end. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist all your input types.\n\n- [jungles-validation](http://github.com/Enome/jungles-validation)\n- [jungles-validators](http://github.com/Enome/jungles-validators)\n\n### Mount\n\nJungles.app is an app you can mount to your express.js app.\n\n## Font-end\n\nThe front-end is your own express app. You can create your own middleware and routes with Jungles but we also provide one\n\n- [jungles-middleware](http://github.com/Enome/jungles-middleware)\n\n## Helpers & Helper modules\n\n- [jungles-helpers](http://github.com/Enome/jungles-helpers)\n- [kwery: query arrays and trees](http://github.com/Enome/kwery)\n","_id":"jungles-rest@1.0.0","dist":{"shasum":"b0731703ad47955c53b59628c2eb4734a7c693a8","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.0.0.tgz","integrity":"sha512-70QKXwZSmP7WYTO5tyj4w1hhdvCuWC2LDEiXP84F3LE9dKoF2bJqyxxY2zi3Oi1RzAWHFBY1CwSZmb2tniKYTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaD2z70f6rqlalFMCb7Y6YilifJR++LTS9sCd1i3kU6QIhANxekBQCa+MsaxzHdIKSDgNyoNFjp4lI81Ol1/DLOpyC"}]},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.0":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.1.0","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validation":"~1.0.0","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","_id":"jungles-rest@1.1.0","dist":{"shasum":"3872d9d3da9cb1dcf90132893f2cce5e1cc5bd80","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.1.0.tgz","integrity":"sha512-v7C78jbLw9it5XObN5FFnhvtdblqcNDW27FbZox8qKesNOUkSjBudL94g3GzuiomK/wKR0aL+h77mFdFBwziKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2k5h24OkJMYavHqUQTYotHZ28KCFsqjZ8q9u3TA0mzQIhAKV3BqHPky4IfhFLdH5N6cX3asTMZeQbt/Wuna4KIUms"}]},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.1":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.1.1","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validation":"~1.0.0","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","_id":"jungles-rest@1.1.1","dist":{"shasum":"adbc8d3d3a2f7f0ce719d63f47007cbba0092100","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.1.1.tgz","integrity":"sha512-pbqV/HhyBiLOKsn9f7kJxS/c700z6YhFrsnQ6e3qoseZcjZQY40N1DzWWBbHsyDXA5zTSJzI1xXrDn1OKH0dFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQ6ZX7nltD4Q7j0v3uz0wGvk7m1wyDQmuzNMNwmB0RzAiAg7JNU07//9ukslRAllG46+8Es6sZL17x6YbCD5+j/Ig=="}]},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.2":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.1.2","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validation":"~1.0.0","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","_id":"jungles-rest@1.1.2","dist":{"shasum":"4c7daa7dff8cf15a5476e2e4f25270f101e26b19","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.1.2.tgz","integrity":"sha512-V55EP1CyferdfBAaKXOBFHQIjw8WyGtclcxZPqmK9LEb3A4F0GWobzV2ZUCpyrtv/MzWfUAfLmMA7EkUYrhxRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJSLAwyG92tyZM1+bpcYy/ovs0iw2HPfWfaBzuEoS5AQIgPmyVplr/SV8rijrawYNC60IYbzt7J6IqlMvIIuBQc5A="}]},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.3":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.1.3","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validation":"~1.0.0","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","readmeFilename":"README.md","_id":"jungles-rest@1.1.3","dist":{"shasum":"45352a0ba92e2158f91bb6019a74e019fb6d22c6","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.1.3.tgz","integrity":"sha512-Di2Gr9FuztIOBgMbtyfVrltY9LCg47h7sjbm0kWSj+zAi/A0SlgVY9gMfiNKw3EKLGuA8vGUf/+JRaHe73xDOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxRVemnHuN9Ax2r0/+EYNMWfLp8O9kH+TeIWUPown1+AiA9vCGT4Nr53xeNyZB9xpW8PA33b7kA8coW8rYqfp/SQw=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.2.0":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"1.2.0","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-validators":"~1.1.0","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","readmeFilename":"README.md","_id":"jungles-rest@1.2.0","dist":{"shasum":"394f742c8da586eb5094e5dd46f138ad4e99aa55","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-1.2.0.tgz","integrity":"sha512-zJHieHGbPeeJFj4Y5RRKxL4arW98reJkiq1JzUOfdGbrbDGA1hNlNv02MDHC8ZwYS9UGwCiyYyB0nBNcU45PgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHk0vxw4kvszMk61AjpnAZnK6osNisN3Qo5i8F5D7kAPAiEAnM9XOlnBmPKQwQxwvFnxEZfUFXO8t7ED4LJyIuZs9zQ="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"2.0.0":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"2.0.0","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","readmeFilename":"README.md","_id":"jungles-rest@2.0.0","dist":{"shasum":"fb74c93d65dd872f5b5aa1cfe02d7bc6d2318861","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-2.0.0.tgz","integrity":"sha512-Zqm0Y5MJZm+Q++wZCmwlk00M9jMGuJmWBNm7ZF3oxB7bwRVd9IrqNcHwRcn275+kVNHT21KWZRCi280ZLNVKOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTtxHVAp6/LFMrKH2ojFN0NG45aLFIFTi0a4+Cep7XVAIhAL0BeJdj0ka7cyitd6l5b/iq2IfTCI9tPQYQ8+OsgFUN"}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"2.0.1":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"2.0.1","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-middleware-general":"~0.1.0","express":"~3.0.0rc5"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure. You could call this a node but we just call it an instance.\n\n## Types\n\n```js\nvar types = {\n  language: {\n    root: true,\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n};\n\nmodule.exports = [ language ];\n```\n\n### Root\n\nIf this property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called products could have a type called 'product'.\n\n```\nProducts\n- Product\n- Product\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest').init({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","readmeFilename":"README.md","_id":"jungles-rest@2.0.1","dist":{"shasum":"962390b89d9e0221a54befdd943b6d5766ef9b84","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-2.0.1.tgz","integrity":"sha512-scbV6+ROfb4UWfJiJKZ01l1/1S7+oeR7ZY6W1gdQ7USuex5EUtdUQhVxx9N5cBNTolQF4iqex0tS8a5SmNsSwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFR2iwJbd7r6qY//6dyjt+sIPko4sMOzuYlmYMcP4C5gIhAN0qk0OzMOXpWfdD4Lt+TRfvgJ9Q1QKJ4uGjnuk1JdEd"}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"3.0.0":{"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"name":"jungles-rest","description":"Rest layer of Jungles","version":"3.0.0","keywords":["jungles","rest"],"dependencies":{"kwery":"1.2.0","node-uuid":"~1.3.3","underscore":"~1.3.3","jungles-middleware-general":"~0.1.0","express":"~3.2.6","jungles-types":"~1.3.0"},"devDependencies":{"express-recorder":"~1.0.0","sinon":"~1.4.2"},"readme":"# Jungles Rest\n\nThere are two big concepts in Jungles. One is called **type** the other **instance**. A type holds all the info for creating a node that is attached to a tree. In other CMS they sometimes call this a doctype or a content-type. We just call it a type. \n\nThe second concept (instance) is the data created by a type which lives inside a tree structure.\n\n## Types\n\n```js\nvar types = [\n\n  {\n    root: {\n    name: 'root',\n    children: [ 'language' ]\n  },\n\n  {\n    name: 'language',\n    children: [ 'page', 'projects' ],\n    form: 'forms/language',\n    schema: { title: [ validators.required(), validators.string() ] }\n  }\n\n];\n```\n\n### Root\n\nThe root type is a special one because it doesn't actually have data (instance) that lives in the content tree. It's only use is to set children that you can add at the root level. So if you don't define a root type you can't create instances because there is no starting point.\n\n### Name\n\nName of the type.\n\n### Children\n\nThese are the types that can be added to this type.  So for example: a parent type called `Products` could have a type called `Product`. The `Products` type in this case can be viewed as a container to hold products and most likely wont have any form.\n\n```\nProducts\n- Product\n- Product\n```\n\nTypes can also include themself as a child. For example you could make a `Page` type that can contain a `Page` child and created an endless tree of pages.\n\n```\nPage\n- Page\n-- Page\n--- ...\n```\n\n### Form\n\nPath to your form file. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist (sanitize) all your input types.\n\n- [jungles-validation](https://github.com/Enome/Jungles/tree/master/validation)\n- [jungles-validators](https://github.com/Enome/Jungles/tree/master/validators)\n\n## Data and instances\n\nThe rest app takes a data layer to store the instances. You can create your own or use these two provided for your:\n\n- [jungles-data-memory](https://github.com/Enome/Jungles/tree/master/data-memory)\n- [jungles-data-postgres](https://github.com/Enome/Jungles/tree/master/data-postgres)\n\n\n## Setup\n\nInitialize the rest layer with the data and types.\n\n```js\nvar rest = require('jungles-rest')({ data: data, types: types });\n```\n\nThis returns an Express.js app. You can find the data later and types at:\n\n```js\nrest.core.data;\nrest.core.types;\n```\n\n## Mount\n\nLast we'll mount it to our base application.\n\n```js\napp.use('/jungles/api', rest);\n```\n","readmeFilename":"README.md","_id":"jungles-rest@3.0.0","dist":{"shasum":"6428363ea396fed8fc772e9f1d6dc77d9502a009","tarball":"https://registry.npmjs.org/jungles-rest/-/jungles-rest-3.0.0.tgz","integrity":"sha512-fKGrMalRJWvUde2AtZkiJECAOVAXUnIeH+2cukOplENL38MKStHZ3W6+7k2rAvJUAKbDWVLpU5USYR7YYCzVpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdueV10cRmY/QWurf2i8Ur3XO5pjoOxDa7hML4wM4zTAiEAlLgGXY97/EYiNSjmvkkyZQV+fRlVYNf8Ln36rkJulqk="}]},"_from":"rest","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}]}},"readme":"# Jungles (status: unstable)\n\nThis is the core module for Jungles which is a cms for express.js developers. This module mainly takes care of adding data and providing a back-end.\n\n## Want to help out?\n\nIf you want to help out you can mostly find me in #jungles on freenode (ping pickels) or create an issue here on Github. Feel free to contact to me to share some ideas/code.\n\n## Tutorial\n\nIf you are looking for a tutorial check out [jungles-tutorial](https://github.com/Enome/jungles-tutorial).\n\nThe tutorial has an example site you can try.\n\n```sh\ngit clone git@github.com:Enome/jungles-tutorial.git && cd jungles-tutorial && npm install && node app.js\n```\n\n## Initialize\n\n```js\n// Setup\nvar data = require('jungles-data-memory')([]);\nvar types = require('./types');\n\nvar jungles = require('jungles').init({\n  data: data,\n  types: types\n});\n\n// Mount\napp.use('/jungles', jungles.app);\n```\n\n## Data\n\nThis module is pass to Jungles and used as the data access layer.\n\n- [jungles-data-memory](http://github.com/Enome/jungles-data-memory)\n- [jungles-data-postgres](http://github.com/Enome/jungles-data-postgres)\n\n## Files\n\nThis module is passed to Jungles and used as to store files.\n\n- [jungles-files-disk](http://github.com/Enome/jungles-files-disk)\n\n## Types\n\n```js\nvar language = {\n  root: true,\n  name: 'language',\n  children: [ 'page', 'projects' ],\n  form: 'forms/language',\n  schema: {\n    title: [ validators.required(), validators.string() ]\n  }\n};\n\nmodule.exports = [ laguange ];\n```\n\n### Root\n\nIf property is true then the type is a root type.\n\n### Name\n\nName of the type.\n\n### Children\n\nChildren property is an array to whitelist which children are allowed to this type.\n\n### Form\n\nForm is the form that is used to input data into the back-end. Jungles uses app.render so you can use your views directory to store your forms.\n\n### Schema\n\nSchema property on a type is used to validate and sanitize input. By default you need to whitelist all your input types.\n\n- [jungles-validation](http://github.com/Enome/jungles-validation)\n- [jungles-validators](http://github.com/Enome/jungles-validators)\n\n### Mount\n\nJungles.app is an app you can mount to your express.js app.\n\n## Font-end\n\nThe front-end is your own express app. You can create your own middleware and routes with Jungles but we also provide one\n\n- [jungles-middleware](http://github.com/Enome/jungles-middleware)\n\n## Helpers & Helper modules\n\n- [jungles-helpers](http://github.com/Enome/jungles-helpers)\n- [kwery: query arrays and trees](http://github.com/Enome/kwery)\n","maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"time":{"modified":"2022-06-19T07:21:16.578Z","created":"2012-10-19T15:29:59.165Z","1.0.0":"2012-10-19T15:30:00.648Z","1.1.0":"2012-10-30T17:33:07.276Z","1.1.1":"2012-10-31T16:17:53.956Z","1.1.2":"2012-11-02T10:45:44.149Z","1.1.3":"2013-04-03T18:13:05.729Z","1.2.0":"2013-04-04T19:06:56.180Z","2.0.0":"2013-06-07T15:53:43.669Z","2.0.1":"2013-06-12T21:41:59.390Z","3.0.0":"2013-06-15T18:42:53.793Z"},"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"}}