{"_id":"lift-it","_rev":"36-48b808994425a480ac1128f4588f0611","name":"lift-it","description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","dist-tags":{"latest":"7.1.0","beta":"7.0.0-rc3"},"versions":{"0.0.0":{"name":"lift-it","version":"0.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-alpha13","mocha":"^2.1.0","should":"^4.4.1"},"gitHead":"ffcb9ddffac90eb47ff62fc3ccab0149fd73d88b","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@0.0.0","_shasum":"73b98e6293ede35cbf4fbbaf3c8d74d3e3297165","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"73b98e6293ede35cbf4fbbaf3c8d74d3e3297165","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-0.0.0.tgz","integrity":"sha512-+xssCahwGvkN8kp9WA1SSFVxNknwqK+DlUSKKIGgW+g52GyQOZI5yvarILqIKNpIxm1ZbQmQbyqu9KqJCK/2Pg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOQQusKr/n/T0DCW41gcD47rw4xJrm0VwcO+lAvH5+9AIgFxCNCzVqptdgajFAjNF5oOuneyBSY87P1sI/w7Q5WkM="}]},"directories":{}},"1.0.0":{"name":"lift-it","version":"1.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-alpha13","mocha":"^2.1.0","should":"^4.4.1"},"gitHead":"6f13fce4a701185c7e0e4c52166587b2068153c5","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.0.0","_shasum":"64cf304659cef927ebbc60e714bd0bc5ce6c8ee7","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"64cf304659cef927ebbc60e714bd0bc5ce6c8ee7","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.0.0.tgz","integrity":"sha512-m1+TdKPe+3/nokyrN+6VkK5xKMtG+2lJf0CF3bJxB76pGl81q5ZxKKVGb93wm7ctRCjOSjeeBahQt1lKhAY3Mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQmtvxMEF0ZsB2NLTsH/af7JseHoylqcbTSa6V/JMeOgIgBATcVzpFxtVhjLyennDGDJuYt2uRdKJrUYpquv9rCLg="}]},"directories":{}},"1.0.1":{"name":"lift-it","version":"1.0.1","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0","validate-fields":"^1.3.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta1","mocha":"^2.1.0","should":"^4.6.1"},"gitHead":"db24b32bd6c357c79e4538b6dc64464a24349caa","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.0.1","_shasum":"dec29363bbddcb32a2ce4ef8936c92945600846e","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"dec29363bbddcb32a2ce4ef8936c92945600846e","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.0.1.tgz","integrity":"sha512-wKLNi6c7ODyFiZhjDmT4pKqVGOiE8CRJr94fqXm429+O4q2rKuu9FCgdDLVF730FOrkoz8eub6o/ZK6lXGtCcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn/rYo2E3lU+SDQOTdMsC49cTVZ9Wgomm3+UE2Lz2vxAIhANx/C9Xg3ZW97dajQNygmvYT/2LPljDfzZf2wB1TW+Lx"}]},"directories":{}},"1.0.2":{"name":"lift-it","version":"1.0.2","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0","validate-fields":"^1.3.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta1","mocha":"^2.1.0","should":"^4.6.1"},"gitHead":"ad6652ef8aca23e865cbb39dfbd820d6be0d0280","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.0.2","_shasum":"7d81c49367b3f2b8139d217121d8d4db4ae3560b","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"7d81c49367b3f2b8139d217121d8d4db4ae3560b","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.0.2.tgz","integrity":"sha512-RpLGAoYRVZkDNDslkJ1O2zPbjhhUhZW6FDPx2XyCLc0YfvmgCzV4J+g5/9LT1mvXUkgxFs1iLZ8Ajto3wPphZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWna4HbCM471URG1lvNzFs5FbONCGGRE9+1Uzx1wSbnwIhALeP4JRJJru7IaZrR6Z8YJpvSL9QHV4+Km+2g7Fm+3vq"}]},"directories":{}},"1.0.3":{"name":"lift-it","version":"1.0.3","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0","validate-fields":"^1.3.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta1","mocha":"^2.1.0","should":"^4.6.1"},"gitHead":"1019447695959371b101e90a8261ac03542a2873","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.0.3","_shasum":"8edde476743736f47de95c8a8a86e67d9d23e9ac","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"8edde476743736f47de95c8a8a86e67d9d23e9ac","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.0.3.tgz","integrity":"sha512-M1ONXCl2OCXfrRjIlgOffkWb3wEgnE5VPl/LOo+ntCNGqUPmnO/JuDtsyHQYv7Y4MB2hsVuZD5SLTOURH8Y5Pg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyLiZazHu8mWaEo2of2MjZYopXrnTI6OBVodnNmoen7gIgLEy/1vZSiYXnBBSnaKZxeyhAe8DuFHq4I6pGmS/8FuA="}]},"directories":{}},"1.1.0":{"name":"lift-it","version":"1.1.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0","validate-fields":"^2.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.1","should":"^5.2.0"},"gitHead":"15bb1487c33302df58db5992e13118d3bad0bdf0","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.1.0","_shasum":"424589227b96af07c358431f7d6a6fd31274c930","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"424589227b96af07c358431f7d6a6fd31274c930","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.1.0.tgz","integrity":"sha512-xTKirx6lv57sI9lA1ZyYcOvJcLP4ox05P1IgORVqtz37vn86EQCnl+tl+pQGTHdGwfkNabd46hAlz2IWyePrSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0QIID9Q2L1MEJToytP6EkQ89Mpf6RYDuv8531t4DwZwIgZHVsaMkChJCRkYRpRYDnsMOst57dnWX9mtY7YVlFMhc="}]},"directories":{}},"1.2.0":{"name":"lift-it","version":"1.2.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.1.0","validate-fields":"^2.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^5.2.0"},"gitHead":"59cfebfa4682b43875c7998504cf7a440978f398","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.2.0","_shasum":"2cbfca0504cd16c0901aee65f77530e2038b1bb7","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"2cbfca0504cd16c0901aee65f77530e2038b1bb7","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.2.0.tgz","integrity":"sha512-/akeF+zURUVpsRvxqZIeKYhoPDUqSEaN2WfIrOniKJRGOftX+v3O8GP6dYdH9vFhjiSW+e8Woos6TMkaOrFWDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH0QCgw1FAnzTzenR3Le6bjh2e8cwaV3bgZ6NlThgpY0CICVAJHb0FoAFjW/Q3u1VhodLWAOlCHJGiCH+BXBVrqPZ"}]},"directories":{}},"1.3.0":{"name":"lift-it","version":"1.3.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.2.0","validate-fields":"^2.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^6.0.1"},"gitHead":"a73c779f4aa8e8abca03d5b912524cdb6c2e32da","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.3.0","_shasum":"bf50f94395275db29e5960f2131a344255daa817","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"bf50f94395275db29e5960f2131a344255daa817","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.3.0.tgz","integrity":"sha512-0JJPLIp9gPUqtgUz+NA23GAsEpplYFp7J3AGBzNNOdzXbXpY5uruYNRHmYV4U/5tLpXw7pXmnaXtX/ngwxo2PQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVzatuXsNe3+BJX7uV3eaOq7mw/YpwsTTP8nonkdovfwIgA+r6l0qULM0IKA9HkDBrPwSQg8vgSOqm4U/krZYXTKA="}]},"directories":{}},"1.3.1":{"name":"lift-it","version":"1.3.1","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.2.0","validate-fields":"^2.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^6.0.1"},"gitHead":"d9fa35e4c6af73dfeb077e594090809693b450ce","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.3.1","_shasum":"eaf1a0ed28639221360c413cad5e0005303f0d5f","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"eaf1a0ed28639221360c413cad5e0005303f0d5f","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.3.1.tgz","integrity":"sha512-3RFU8uIbXvwUF/rl2yhqkTk7Cf25OBgDp5RrEOBaZVauuQcyWErPY+2ssQFdpMf0FZxgBTH2KoOg7OR9UgjzrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjd5E2MVIQipMMqHwd+DptFOq+vWxnRLBQ5ShiWb+FIAIhAOPATrd7HRBgfwwfL5jKmX30NrTKhtvo/v6BW6xJY8YM"}]},"directories":{}},"1.3.2":{"name":"lift-it","version":"1.3.2","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.2.0","validate-fields":"^2.1.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^6.0.1"},"gitHead":"a012ed92a415749a6557c4e6ed793f7a0c199cf9","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.3.2","_shasum":"f230e0504f072a1555feadc592367e7547f7596a","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"f230e0504f072a1555feadc592367e7547f7596a","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.3.2.tgz","integrity":"sha512-oHVP7tbiHl7xHV2pqnX2CqLhWEoYvj4fho8LgMZF6tIwvkT1WJJ5Tq0u+mQMVkNqP5053Dcg6FNjK485M1V5Ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/7wcuO0IUzoRaKs99nlAIs1p4tzX6FghCUDexfnvHHQIgIeMh9rQDgGg3DljSK5VytReIDwcEkbcxaUrAp1Q/TJk="}]},"directories":{}},"1.3.3":{"name":"lift-it","version":"1.3.3","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.2.0","validate-fields":"^2.1.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^6.0.1"},"gitHead":"a8e703c8940dc97e93343cbba768492c8acf694e","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@1.3.3","_shasum":"c7e30f3e1c6b75e6fa96aed256b57df1bf8316ba","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"c7e30f3e1c6b75e6fa96aed256b57df1bf8316ba","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-1.3.3.tgz","integrity":"sha512-H3OnouuWWu75V7seVQ3dI2HN7AwbfASWbUhbYXPpky7EG1TfknuG17N9Z+8vXex4+1N0o6m7bQF3sg2Ri8xTuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFOyqtd0MUteSp028cqFd/WC655QlY/O4ugBwjk1EvJTAiEAvHrCi/+AnYVzJySZMIol8h7swaxk6cNGeDehooifZWA="}]},"directories":{}},"2.0.0":{"name":"lift-it","version":"2.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.2.0","validate-fields":"^3.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0-beta3","mocha":"^2.2.4","should":"^6.0.1"},"gitHead":"32fa8c70691263b096090058c29b745fea46f255","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@2.0.0","_shasum":"0d54db7ef320be46e8294440a19aec61b8c42edf","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"0d54db7ef320be46e8294440a19aec61b8c42edf","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-2.0.0.tgz","integrity":"sha512-WA8k3stIJf5o6XL8nmmyF/M67d1eX2fXqp0ty7tiC43S1a7BudAUqdsjr3Ik4CrFb4eyyl5HHm4K2tm7mKAG7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEVBJZDwpI/OpdidbWP0yGXiJ8WGgFVL3QPVmQd31tkAiEA0cRJsEylBr6gezOZIAfG6PAKoO5X8bEzX9FpWUlHfiM="}]},"directories":{}},"2.1.0":{"name":"lift-it","version":"2.1.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"https://github.com/clubedaentrega/lift-it"},"keywords":[],"dependencies":{"run-it":"^1.3.0","validate-fields":"^3.0.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.0","mocha":"^2.2.5","should":"^6.0.3"},"gitHead":"8397623b278d500d6584fbbb84c6f6a04e592cd6","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it","_id":"lift-it@2.1.0","_shasum":"027929e48aea2f9ffce496abe8d3b1fa23a71172","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.0","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"}],"dist":{"shasum":"027929e48aea2f9ffce496abe8d3b1fa23a71172","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-2.1.0.tgz","integrity":"sha512-qCOKIHVwJamYUN6iHLD2XRbw9dszCtxThZgOeO8zGQfnOn+AHy45mEEXxRz4LTrEmKGK2LeiNAiVt5Wwt0vyTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCivKPYR66ZWtDegtRWxF/64QEzxImIcvcazMidWOpIAiEA3wAHdFKO5u+YLbWJAK9wtWua3OoY1Yl9nhuFM/2ZXmA="}]},"directories":{}},"3.0.0":{"name":"lift-it","version":"3.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.0.0","validate-fields":"^3.3.0"},"license":"MIT","engines":{"node":">=0.10"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.2","mocha":"^2.2.5","should":"^7.0.2"},"gitHead":"3c2ca4b44c0a0f5eb60f5ebfb785eeb9a60d23be","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@3.0.0","_shasum":"36770d520c3885f855ff34bd3454ce02a2ca2197","_from":".","_npmVersion":"2.11.1","_nodeVersion":"0.12.7","_npmUser":{"name":"sitegui","email":"sitegui@sitegui.com.br"},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"dist":{"shasum":"36770d520c3885f855ff34bd3454ce02a2ca2197","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-3.0.0.tgz","integrity":"sha512-etEVm/0t/q7z8g2lJjuUG2aLWBzGW0P/U0fYpDP8ivISKO6o5whYBFMISgs3pxmiG+1QbLPMZcrhtt8RzGga9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOCAOKbSxys+ODO01TYM4eIFQ1wPeC1A78eCM9xMUMkQIgOq5TEYhM9uwyb6k5X2Q+AQv4tQG+8arlxK0jElAoRcE="}]},"directories":{}},"3.0.1":{"name":"lift-it","version":"3.0.1","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.1.0","validate-fields":"^3.3.1"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.3","mocha":"^2.3.3","should":"^7.1.1"},"gitHead":"b6d3c9754a7184dc246ce62621f1faaa2f4ae533","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@3.0.1","_shasum":"6e8f135fabbfc59b09e06cdd607c47c8686e497f","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"6e8f135fabbfc59b09e06cdd607c47c8686e497f","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-3.0.1.tgz","integrity":"sha512-pahgNsXFkZ/9FchwW3RrK5dK1ya5Ou74ERW/rECuMyZj7QDoeAPDSqWa6kXGijPsZu+hmpJaxRa8t3rEdspxIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxoV2DxY6ZluXZ7nNV6LBpEV/lhHSjIUNEFh4UtpvqhAiB59vd4AkXfMdYgzHLyTeAoGmaICvo3kUIe+wR1iJl9Mg=="}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"directories":{}},"3.1.0":{"name":"lift-it","version":"3.1.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.1.0","validate-fields":"^3.3.1"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.3.3","mocha":"^2.3.3","should":"^7.1.1"},"gitHead":"bef1083b8f3f4f88e3e6b14d11573f11c51013b1","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@3.1.0","_shasum":"41de95f1699b501ddb6abf574f376782b252e078","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"41de95f1699b501ddb6abf574f376782b252e078","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-3.1.0.tgz","integrity":"sha512-SNsaN5l98UQQL09q2ClcVSYILXjJNUZnuaJXYAZRO+bbb05KtdA4Rry9XwCP06FXv1i1zMPd4iEmTI0oSSN4Ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKgtFkAJY+DBKgYmnK1T48YVMO9gSG/o54OLXqsCb2KAIgGFTkUbQQiU3U1Mg8KuiFFNxNMDZU9keQmb4eWnk+EdU="}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"directories":{}},"4.0.0":{"name":"lift-it","version":"4.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.1.0","validate-fields":"^3.4.0"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.4.0","mocha":"^2.4.5","should":"^8.3.0"},"gitHead":"ad2d04c3d274216cf7b447f73397e3b63a4521f4","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@4.0.0","_shasum":"3c2fd4e84fe6074362e651624a6dc483eb37f72d","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"3c2fd4e84fe6074362e651624a6dc483eb37f72d","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-4.0.0.tgz","integrity":"sha512-z3xwZOArlIgD2Me7ptw5DjBEM4Za0W3uwuQPXKkG7hXhu7vbWJPB/E8NC2qP5v2ng6L7ZlrNcOHZYOzHiqyVag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8LhdqQhRgy8OvaiSmZZ7vKzTZqQt9m49kVV2+6yaqVAiEAsezOaNpEv1D7DjZrAAvWet6rgokNcJ1VlqqDu5+jFGE="}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lift-it-4.0.0.tgz_1459876702608_0.06950072571635246"},"directories":{}},"4.0.1":{"name":"lift-it","version":"4.0.1","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.1.0","validate-fields":"^3.5.0"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.4.0","mocha":"^2.4.5","should":"^8.3.2"},"gitHead":"1c9c05f54eee1976c39962fcc622bf0767a3f93e","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@4.0.1","_shasum":"259ec3a7724ee02023bf37b8f9b915a957525fcb","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"259ec3a7724ee02023bf37b8f9b915a957525fcb","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-4.0.1.tgz","integrity":"sha512-nB7gVAuNX7MHfhmzQ3wGE1J4bY5FZDyh9mxWnKodreekQ/eTUtuuANjUFThRxz8VE0MOEVMUaFjGfA4chetFbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUXGxJrOXlYrdpxUJZ50WCjSgtVWozgvrNLjJJhftw5AIgKjSvhlAT9GunTrFv0nR/4+4HM7Np5TP9o8f2+StH9dg="}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lift-it-4.0.1.tgz_1463626896236_0.37219790858216584"},"directories":{}},"4.1.0":{"name":"lift-it","version":"4.1.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^2.1.0","validate-fields":"^3.5.0"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.4.0","mocha":"^2.5.3","should":"^9.0.2"},"gitHead":"73480b2052687e1e0730be3f741217f91b733d84","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@4.1.0","_shasum":"652d501e7d2999d5c62d7b4daf31e2b67ca78a35","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"652d501e7d2999d5c62d7b4daf31e2b67ca78a35","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-4.1.0.tgz","integrity":"sha512-xot0w5JxZ+X61E2WnVHnhaIX1AU04z6wfF2q9XX+0fhJbT+V+z6VXzn7/6MA/U6qgIdDiPuknzD9oaMfCQnTNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFAPVsIgP2UY+SQySAsbWyPYMNiRIB8MYTSKXTEX9NmAiAr4NY3ftYUkOGCRRTFP6rvUQ1z1uwwIrgkY3GEbCApmA=="}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lift-it-4.1.0.tgz_1467049280787_0.07695974363014102"},"directories":{}},"5.0.0":{"name":"lift-it","version":"5.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^3.0.0","validate-fields":"^3.6.1"},"license":"MIT","engines":{"node":">=0.12"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.4.2","mocha":"^3.1.0","should":"^11.1.0"},"gitHead":"cb74af5e3b7788eb576a4a58559cd14daaf4f56b","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@5.0.0","_shasum":"35b9dcfe72b4c8474ded18b5d79f936b7d69a6b4","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"shasum":"35b9dcfe72b4c8474ded18b5d79f936b7d69a6b4","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-5.0.0.tgz","integrity":"sha512-dHf2D7t/4UeIGYh6tLYrCAUNJsBG7au31KzfcsJna+LMpgr/GwL3yVHk4KNOG2NI+bgQ9UfD/BDgVmLNU/IKSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCV5/tIAx2lsOtVvt80MlPu2mE9+iRdyBuDSaDJDOEFqgIhAN5kmfyn90hayaaEh9Ku9iDqLxfONyuX4EDq5lVwN/LF"}]},"maintainers":[{"name":"sitegui","email":"sitegui@sitegui.com.br"},{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/lift-it-5.0.0.tgz_1475520219016_0.4023933445569128"},"directories":{}},"6.0.0":{"name":"lift-it","version":"6.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^3.0.0","validate-fields":"^4.0.0"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.0.4","should":"^13.2.1"},"gitHead":"17d8aa503015e560b0eb18986e66bbc085b0186e","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@6.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-03C7bqHETaBhv/WNzSnZzOighldex4MX4uFYeMPQWeX5V6ok9jEzKnJT7YfJslx8MuuZU5GrtNgn47/u88Evcg==","shasum":"cea59c13118601be2c1b21c4ae22845f26305c72","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-6.0.0.tgz","fileCount":15,"unpackedSize":28826,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGLj28QrAU2BH1UO4RDuI8kwvgsncWp6zDtO1hCGTGghAiBWlmCwqoLeoPPhf1jsjfwnpMvu9aQxNFyKud0S9PTKsQ=="}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_6.0.0_1521741039459_0.7243033874124518"},"_hasShrinkwrap":false},"7.0.0-rc1":{"name":"lift-it","version":"7.0.0-rc1","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^4.0.0-rc1","validate-fields":"^4.0.0"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.0.4","should":"^13.2.1"},"readme":"# Lift It\n[![Build Status](https://travis-ci.org/clubedaentrega/lift-it.svg?branch=master)](https://travis-ci.org/clubedaentrega/lift-it)\n[![Inline docs](https://inch-ci.org/github/clubedaentrega/lift-it.svg?branch=master)](http://inch-ci.org/github/clubedaentrega/lift-it)\n[![Dependency Status](https://david-dm.org/clubedaentrega/lift-it.svg)](https://david-dm.org/clubedaentrega/lift-it)\n\nForget about maintaining routes files, use dynamic routes created from files in a folder\n\n## Install\n`npm install lift-it`\n\n## Basic usage\n```js\n// Lift the 'api' folder\nlet api = require('lift-it')('./api').lift()\n\n// Execute the file ./api/item/create.js\napi.run('item/create', {\n\tname: 'Water',\n\tvalue: 17\n}, function (err, response) {\n\t// Always async\n})\n```\n\nLift-it scans recursively a folder for `*.js` files. Those files should export a `handler` function, executed when someones 'run' them.\n\nAn example of 'item/create':\n```js\n// `body` is the argument passed by 'run' (in this case, `{name:'Water',value:17}`)\n// `success` and `error` are callback functions, learn about it here:\n// https://github.com/clubedaentrega/run-it\nmodule.exports.handler = function (body, success, error) {\n\t// Item.create represents an async job\n\tItem.create(body, error(function (item) {\n\t\t// Answer with {id: '54bd55fc13e53ce1077415a2'}\n\t\tsuccess({\n\t\t\tid: item.id\n\t\t})\n\t}))\n}\n```\n\n## Express example\nThis module can be easily used with express (or any other route-based web framework).\n\nAn example of simple JSON-based POST api:\n```js\n// Express\nlet app = require('express')()\napp.use(require('body-parser').json())\n\n// Lift\nlet api = require('lift-it')('./api').lift()\n\n// Set routes\napi.actions.forEach(function (action) {\n\t// `action` is an object. See the docs bellow\n\t\n\tapp.post(action.name, function (req, res) {\n\t\t\n\t\t// action.run(...) is the same as api.run(action.name, ...)\n\t\taction.run(req.body, function (err, response) {\n\t\t\tres.json(err ? {error: String(err)} : response)\n\t\t})\n\t})\n})\n```\n\n## Plugins\nThe base module will scan a folder and look for exported handler in `*.js` files. This base behaviour can be expanded with plugins.\n\nThe available bundled plugins are:\n\n* validate: validate the input with [validate-fields](https://www.npmjs.com/package/validate-fields)\n* filters: add filters (like middlewares)\n* profile: enable profiling async jobs\n\n## Docs\n### require('lift-it')\nA function with one parameter, the folder path to scan: `require('lift-it')(folder)`.\nReturns a `lifter` object.\n\n### require('lift-it').lean()\nDo a lean lift. See `lifter.lean()`. Returns a lifted instance\n\n### lifter.use(plugIn)\nAdd the given plugin to the lift process. Read more about available and custom plugins bellow\n\n### lifter.recursive\nWhether the folder should be scanned recursively or not. The default value is `true`.\n\n### lifter.requireFile\nA callback to handle requiring a file. This allows one to completly change the semantics of a required file. The default value is `function (require, path) { return require(path) }`.\n\n### lifter.profile\n### lifter.errorClass\n### lifter.enableErrorCode\nChange settings of [run-it](https://www.npmjs.com/package/run-it). Must be changed only before `lifter.lift()` is called.\n\n### lifter.lift()\nRun the lift process (sync), throws if any error happens. For each `*.js` file in the target folder, all plugins will be executed in the order they were 'use'd.\n\nThis returns a `lifted` object.\n\n### lifter.leanLift()\nRun the lean lift process, that is, only look for file names. This will not require files, nor apply plugins.\n\nThis returns a `lifted` object with the `lean` flag on. No action can be executed on it.\n\nThis is useful if you just want to check action names, not execute them.\n\n### lifted.get(name)\nReturn an action by name. Return an `action` object (or `null` if not found).\n\n### lifted.run(name, ...args, callback)\nRun the action with the given arguments. `callback(err,...output)` is executed when done. The action is executed in its own domain, see [run-it](https://www.npmjs.com/package/run-it) for more info about that.\n\nThrows if no action with the given name is found.\n\nIf profile is enabled, the last argument for `callback` is the profile data.\n\n### lifted.getRunner(name)\nReturn a run-it runner for the given action. Call `runner.exec(...args, callback)` to actually execute the action. See `action.getRunner()`.\n\nThrows if no action with the given name is found.\n\n### lifted.actions\nAn array of `action` objects\n\n### lifted.lean\nA boolean. If `true`, this is a lean lift (see `lifter.leanLift()`), so no action can be executed.\n\n### action.path\nFile path, like `'/api/item/create.js'`\n\n### action.name\nAction name, like `'item/create'`. This is the relative path to the target folder, without the trailing `'.js'`.\n\n### action.filters\nAn array of filters, executed before the action handler. This is used by plugins.\n\n### action.postFilters\nAn array of post filters, executed after the action handler. This is used by plugins.\n\n### action.module\nThe result of `require`-ing the file. `action.module.handler` is the handler for this action.\n\n### action.profile\nA boolean that flags whether profiling is enabled for this action.\n\n### action.run(...args, callback)\nRun this action. This is the same as `lifted.run(action.name, ...args, callback)`.\n\n### action.getRunner()\nReturn the run-it runner for the action. Call `runner.exec(...args, callback)` to actually execute the action.\n\nThis is useful to make some adhoc changes to the runner, like `runner.runInfo(info).profile(true).exec(...args, callback)`. See docs on run-it.\n\n## Available plugins\n\n### Profile\nIf the `require`-d file exports `profile` (a boolean), this value will overwrite the global `lift.profile`. Get this plugin with `require('lift-it').profile()`.\n\nFor example, this file will have profiling always on:\n```js\nmodule.exports.profile = true\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\nUse:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.profile())\nlet api = lift.lift()\napi.run('item/create', item, function (err, response, profileData) {\n\t// ...\n})\n```\n\n### Validate\nAdd input validation with [validate-fields](https://www.npmjs.org/package/validate-fields). Get it with `require('lift-it').validate(options)`.\n\n`options` is an optional object with the properties displayed bellow (default values indicated):\n```js\noptions = {\n\t// The export property name\n\texportName: 'fields',\n\t// Whether to error out if the file does not export it\n\toptional: false,\n\t// Check input or output\n\tdirection: 'input',\n\t// Which argument to validate\n\t// The default will check the first\n\tposition: 0,\n\t// A function to return a value if the desired input/output is not present\n\tgetDefaultValue: function () {\n\t\tthrow new Error('Insufficient number of arguments')\n\t},\n\t// If lifter.enableErrorCode is true, which code to use in error(code, msg)\n\tcode: 101,\n\t// If lifter.enableErrorCode is true, which code to use in error(HTTPStatusCode, code, msg)\n\tHTTPStatusCode: 500,\n\t// A function to handle error cases\n\terrorHandler: function (action, value, err) {\n\t\t// `action` is an Action instance\n\t\t// `value` is the offending value\n\t\t// `err` is a lifter.errorClass instance\n\t\t// `err.code` is `options.code`\n\t\tthrow err\n\t},\n\t// Let you define your own custom types\n\t// See doc on validate-fields module for that\n\tdefineTypes: function (validate) {},\n\t// Options passed to schema.validate() of validate-fields\n\toptions: {}\n}\n```\n\nExample of a file using it:\n```js\nmodule.exports.fields = {\n\tname: String,\n\tvalue: 'uint'\n}\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.validate())\nlet api = lift.lift()\napi.run('item/create', {}, function (err) {\n\t// err is new Error('I was expecting a value in name')\n})\n```\n\nThis plugin will set `action.module[exportName+'-schema']` to `validate.parse(action.module[exportName])`.\n\n### Filters\nAdd support for filters. Filters are functions executed sequentially before the handler. One example of their use is implementing authentication. Get it with `require('lift-it').filters(folder)`.\n\nFilter handlers are implemented and exported by files in the filters folder. Each of those files may export as many filters as you want.\n\nSee an example of a file implementing two filters:\n```js\nmodule.exports = function (body, success, error) {\n\t// Check auth, read the DB, etc\n\tsuccess('Some data I got elsewhere')\n}\nmodule.exports.double = function (body, success, error) {\n\t// Simply change the body input\n\tbody.value *= 2\n\tsuccess()\n}\n```\n\nThe `'item/create'` action may use those filters this way:\n```js\nmodule.exports.filters = ['myFilter', 'myFilter.double']\nmodule.exports.handler = function (body, moreData, success, error) {\n\t// body.value will be doubled\n\t// moreData will be the string create by the first filter\n\t// ...\n}\n```\n\nIf this filter file path is `'filters/myFilter.js'`, the main file (the one that lifts everything) may be:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.filters('./filters'))\nlet api = lift.lift()\napi.run('item/create', {value: 10}, function (err, response) {\n\t// ...\n})\n```\n\n## Custom plugins\nA plugin is a function like `function (action, lifter) {}`. That function is called once for every file that is found in the lifted folder. Creating your own plugin is that simple:\n\n```js\nlet myPlugin = function (action, lifter) {\n\t// Do something with the action, like checking something\n\tif (action.name.indexOf('drop')) {\n\t\tthrow new Error('Sorry, we do not put up with dropping things...')\n\t}\n\t\n\t// Add a filter to every action to delay them by 1s\n\taction.filters.push(function (body, success) {\n\t\tsetTimeout(success, 1e3)\n\t})\n\t\n\t// Add a post filter to check something\n\taction.postFilters.push(function (response, success) {\n\t\tif (typeof response.status !== 'string') {\n\t\t\tthrow new Error('Response should have the status field')\n\t\t}\n\t\tsuccess(response)\n\t})\n}\n```\n\nWarn: the `lifter` object should not be modified. It should be treated as read-only.","readmeFilename":"README.md","gitHead":"8451d2609fef2633b1c101aff981fcc52b781a80","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@7.0.0-rc1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-kzAPa9tig5Vmt7cV/yzihjEKgEDP3MZ1zNuZP59b/0yVpS8Vgqoam/XXb5YPTeIYy2RzbPhR4tY+sfKs/WmMOg==","shasum":"7f24da8244736c5e803167b5e18c69d2495df6b7","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-7.0.0-rc1.tgz","fileCount":15,"unpackedSize":28071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMnaBCRA9TVsSAnZWagAAm0gP/1u19WwSdNYss+4/8pwL\nijEaBgEqviAYGiLhxCUPG+fP10K2Sihyg1Ao8yuyPe/Yy0w6crs/2QNTKkz8\nEfStD+E1xzFmEOM4SkSCIrXcupfQnkHvU9DEGB93wvEJXS5EHs9mYRXTokFZ\nBhoSUsg6H4KcELYn5cseuOY81x8NFXBH5FyVtwm1pCE7i3euAxCOgEPbeYOH\nGJyrwE+Sy6EZnAD5Q9nKcgj+aBOJXWENrvK3T1MF3RDITwH5q0rQ6nlTK0Jc\nMTUgHfvN+N1MTnGsotTZfXNIT43AgnYeGzBKN0teY4QXjbTjuM9QL201xXTU\nbDCKL+oAHFvnX+0gpom/4lm0UkKPaCiEmGZPdU7cxFmBOgTbUFdMZS/NvVfd\nyj8eyha4EHsvdL8db0PKlmSNsGTD+GilBk7UQlOftrm5KO6WNJECGsSY2EsM\n8iNC6TKsvZjXXsISNvFn1zAcpZ0YT/AnqrIy8Lf9ebz8LQ/BKXRHGDsg9kAd\n1AJHC6MDqM6/MxV62l9UUy5LyDTvDwV3R2HyxhcS8LFM7husLQADaRgjEjMh\n3fQngxqB4LPYoF9ZgbfFnAWyjQBU+XTT/ss/G36NJ4lnbaEwxYdCm4o3oUqp\nRJ7dbkdMwmyNtEp2TSY2/c6bYwEnsX39oK620nZJTsg5brYj2dt15iB5Va85\nEd/W\r\n=FNIu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICV76Z7fFQ1TW+3l3WyI6M2THiq24FTtwmd8T+umuWmWAiAuxT1e5nn+tjINHgQZ0J28QEPx+GuSP4qof5XyVHMtfA=="}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_7.0.0-rc1_1530033793750_0.8886043382279545"},"_hasShrinkwrap":false},"7.0.0-rc2":{"name":"lift-it","version":"7.0.0-rc2","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^4.0.0-rc3","validate-fields":"^4.0.0"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.0.4","should":"^13.2.1"},"readme":"# Lift It\n[![Build Status](https://travis-ci.org/clubedaentrega/lift-it.svg?branch=master)](https://travis-ci.org/clubedaentrega/lift-it)\n[![Inline docs](https://inch-ci.org/github/clubedaentrega/lift-it.svg?branch=master)](http://inch-ci.org/github/clubedaentrega/lift-it)\n[![Dependency Status](https://david-dm.org/clubedaentrega/lift-it.svg)](https://david-dm.org/clubedaentrega/lift-it)\n\nForget about maintaining routes files, use dynamic routes created from files in a folder\n\n## Install\n`npm install lift-it`\n\n## Basic usage\n```js\n// Lift the 'api' folder\nlet api = require('lift-it')('./api').lift()\n\n// Execute the file ./api/item/create.js\napi.run('item/create', {\n\tname: 'Water',\n\tvalue: 17\n}, function (err, response) {\n\t// Always async\n})\n```\n\nLift-it scans recursively a folder for `*.js` files. Those files should export a `handler` function, executed when someones 'run' them.\n\nAn example of 'item/create':\n```js\n// `body` is the argument passed by 'run' (in this case, `{name:'Water',value:17}`)\n// `success` and `error` are callback functions, learn about it here:\n// https://github.com/clubedaentrega/run-it\nmodule.exports.handler = function (body, success, error) {\n\t// Item.create represents an async job\n\tItem.create(body, error(function (item) {\n\t\t// Answer with {id: '54bd55fc13e53ce1077415a2'}\n\t\tsuccess({\n\t\t\tid: item.id\n\t\t})\n\t}))\n}\n```\n\n## Express example\nThis module can be easily used with express (or any other route-based web framework).\n\nAn example of simple JSON-based POST api:\n```js\n// Express\nlet app = require('express')()\napp.use(require('body-parser').json())\n\n// Lift\nlet api = require('lift-it')('./api').lift()\n\n// Set routes\napi.actions.forEach(function (action) {\n\t// `action` is an object. See the docs bellow\n\t\n\tapp.post(action.name, function (req, res) {\n\t\t\n\t\t// action.run(...) is the same as api.run(action.name, ...)\n\t\taction.run(req.body, function (err, response) {\n\t\t\tres.json(err ? {error: String(err)} : response)\n\t\t})\n\t})\n})\n```\n\n## Plugins\nThe base module will scan a folder and look for exported handler in `*.js` files. This base behaviour can be expanded with plugins.\n\nThe available bundled plugins are:\n\n* validate: validate the input with [validate-fields](https://www.npmjs.com/package/validate-fields)\n* filters: add filters (like middlewares)\n* profile: enable profiling async jobs\n\n## Docs\n### require('lift-it')\nA function with one parameter, the folder path to scan: `require('lift-it')(folder)`.\nReturns a `lifter` object.\n\n### require('lift-it').lean()\nDo a lean lift. See `lifter.lean()`. Returns a lifted instance\n\n### lifter.use(plugIn)\nAdd the given plugin to the lift process. Read more about available and custom plugins bellow\n\n### lifter.recursive\nWhether the folder should be scanned recursively or not. The default value is `true`.\n\n### lifter.requireFile\nA callback to handle requiring a file. This allows one to completly change the semantics of a required file. The default value is `function (require, path) { return require(path) }`.\n\n### lifter.profile\n### lifter.errorClass\n### lifter.enableErrorCode\nChange settings of [run-it](https://www.npmjs.com/package/run-it). Must be changed only before `lifter.lift()` is called.\n\n### lifter.lift()\nRun the lift process (sync), throws if any error happens. For each `*.js` file in the target folder, all plugins will be executed in the order they were 'use'd.\n\nThis returns a `lifted` object.\n\n### lifter.leanLift()\nRun the lean lift process, that is, only look for file names. This will not require files, nor apply plugins.\n\nThis returns a `lifted` object with the `lean` flag on. No action can be executed on it.\n\nThis is useful if you just want to check action names, not execute them.\n\n### lifted.get(name)\nReturn an action by name. Return an `action` object (or `null` if not found).\n\n### lifted.run(name, ...args, callback)\nRun the action with the given arguments. `callback(err,...output)` is executed when done. The action is executed in its own domain, see [run-it](https://www.npmjs.com/package/run-it) for more info about that.\n\nThrows if no action with the given name is found.\n\nIf profile is enabled, the last argument for `callback` is the profile data.\n\n### lifted.getRunner(name)\nReturn a run-it runner for the given action. Call `runner.exec(...args, callback)` to actually execute the action. See `action.getRunner()`.\n\nThrows if no action with the given name is found.\n\n### lifted.actions\nAn array of `action` objects\n\n### lifted.lean\nA boolean. If `true`, this is a lean lift (see `lifter.leanLift()`), so no action can be executed.\n\n### action.path\nFile path, like `'/api/item/create.js'`\n\n### action.name\nAction name, like `'item/create'`. This is the relative path to the target folder, without the trailing `'.js'`.\n\n### action.filters\nAn array of filters, executed before the action handler. This is used by plugins.\n\n### action.postFilters\nAn array of post filters, executed after the action handler. This is used by plugins.\n\n### action.module\nThe result of `require`-ing the file. `action.module.handler` is the handler for this action.\n\n### action.profile\nA boolean that flags whether profiling is enabled for this action.\n\n### action.run(...args, callback)\nRun this action. This is the same as `lifted.run(action.name, ...args, callback)`.\n\n### action.getRunner()\nReturn the run-it runner for the action. Call `runner.exec(...args, callback)` to actually execute the action.\n\nThis is useful to make some adhoc changes to the runner, like `runner.runInfo(info).profile(true).exec(...args, callback)`. See docs on run-it.\n\n## Available plugins\n\n### Profile\nIf the `require`-d file exports `profile` (a boolean), this value will overwrite the global `lift.profile`. Get this plugin with `require('lift-it').profile()`.\n\nFor example, this file will have profiling always on:\n```js\nmodule.exports.profile = true\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\nUse:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.profile())\nlet api = lift.lift()\napi.run('item/create', item, function (err, response, profileData) {\n\t// ...\n})\n```\n\n### Validate\nAdd input validation with [validate-fields](https://www.npmjs.org/package/validate-fields). Get it with `require('lift-it').validate(options)`.\n\n`options` is an optional object with the properties displayed bellow (default values indicated):\n```js\noptions = {\n\t// The export property name\n\texportName: 'fields',\n\t// Whether to error out if the file does not export it\n\toptional: false,\n\t// Check input or output\n\tdirection: 'input',\n\t// Which argument to validate\n\t// The default will check the first\n\tposition: 0,\n\t// A function to return a value if the desired input/output is not present\n\tgetDefaultValue: function () {\n\t\tthrow new Error('Insufficient number of arguments')\n\t},\n\t// If lifter.enableErrorCode is true, which code to use in error(code, msg)\n\tcode: 101,\n\t// If lifter.enableErrorCode is true, which code to use in error(HTTPStatusCode, code, msg)\n\tHTTPStatusCode: 500,\n\t// A function to handle error cases\n\terrorHandler: function (action, value, err) {\n\t\t// `action` is an Action instance\n\t\t// `value` is the offending value\n\t\t// `err` is a lifter.errorClass instance\n\t\t// `err.code` is `options.code`\n\t\tthrow err\n\t},\n\t// Let you define your own custom types\n\t// See doc on validate-fields module for that\n\tdefineTypes: function (validate) {},\n\t// Options passed to schema.validate() of validate-fields\n\toptions: {}\n}\n```\n\nExample of a file using it:\n```js\nmodule.exports.fields = {\n\tname: String,\n\tvalue: 'uint'\n}\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.validate())\nlet api = lift.lift()\napi.run('item/create', {}, function (err) {\n\t// err is new Error('I was expecting a value in name')\n})\n```\n\nThis plugin will set `action.module[exportName+'-schema']` to `validate.parse(action.module[exportName])`.\n\n### Filters\nAdd support for filters. Filters are functions executed sequentially before the handler. One example of their use is implementing authentication. Get it with `require('lift-it').filters(folder)`.\n\nFilter handlers are implemented and exported by files in the filters folder. Each of those files may export as many filters as you want.\n\nSee an example of a file implementing two filters:\n```js\nmodule.exports = function (body, success, error) {\n\t// Check auth, read the DB, etc\n\tsuccess('Some data I got elsewhere')\n}\nmodule.exports.double = function (body, success, error) {\n\t// Simply change the body input\n\tbody.value *= 2\n\tsuccess()\n}\n```\n\nThe `'item/create'` action may use those filters this way:\n```js\nmodule.exports.filters = ['myFilter', 'myFilter.double']\nmodule.exports.handler = function (body, moreData, success, error) {\n\t// body.value will be doubled\n\t// moreData will be the string create by the first filter\n\t// ...\n}\n```\n\nIf this filter file path is `'filters/myFilter.js'`, the main file (the one that lifts everything) may be:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.filters('./filters'))\nlet api = lift.lift()\napi.run('item/create', {value: 10}, function (err, response) {\n\t// ...\n})\n```\n\n## Custom plugins\nA plugin is a function like `function (action, lifter) {}`. That function is called once for every file that is found in the lifted folder. Creating your own plugin is that simple:\n\n```js\nlet myPlugin = function (action, lifter) {\n\t// Do something with the action, like checking something\n\tif (action.name.indexOf('drop')) {\n\t\tthrow new Error('Sorry, we do not put up with dropping things...')\n\t}\n\t\n\t// Add a filter to every action to delay them by 1s\n\taction.filters.push(function (body, success) {\n\t\tsetTimeout(success, 1e3)\n\t})\n\t\n\t// Add a post filter to check something\n\taction.postFilters.push(function (response, success) {\n\t\tif (typeof response.status !== 'string') {\n\t\t\tthrow new Error('Response should have the status field')\n\t\t}\n\t\tsuccess(response)\n\t})\n}\n```\n\nWarn: the `lifter` object should not be modified. It should be treated as read-only.","readmeFilename":"README.md","gitHead":"94688d26112ff3e0b19b707b94887bca3031ceb0","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@7.0.0-rc2","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-A48B3C124rvCJ//GMPu2GzM2NpUv6YKL0YTqoBYw0CmhzGtU6V4cXfxBkwDrAyqR/NgmXPLs0ZrZlhTnsVD05g==","shasum":"d00ddff2dac42f0065fa4948ef761d3e238b2de2","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-7.0.0-rc2.tgz","fileCount":15,"unpackedSize":28071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMpJ4CRA9TVsSAnZWagAAUCoP/iJV9ZeSJNgR8qsJJkXp\neR6jvCWrO4TRH4He3PnPQAzWDy7CZkummVVcVU2+lmZY54vkQlqFYR09gkRS\ndQAaao6dP/okoRD9S97QVENj9NQgxmVYLCaXMDQknCFig5GfBANAn/TRGKLT\niPgsqP6AFa/g302PH8T1ZzuLt39I0CYrkJrGMiSirex5piM4MQDksEU4ev2Y\nY0q7SAxk2QLR/IsS87DDnTK/eqL7RtcPgMleS/u3+gpAdS+XRkPK018rGMfX\nFvbW2Ryneze4KyQm9KaUqOMuwJUKnx0wd4WoZ2Mg9Neu9CdXbrvqJhxy+pf/\nk+FhgQfLYM3J9K0skdomy8VDXWsKJZnDaWLMsk6PucZKCqjftWE700uGIAV3\nNF4aScfkHrK/iYRUOwTeORrJXgaFn75bTWf61YughGycvTbf0K7VqSxwMifA\nwPpiN8cGWb1/OBj4s8Ul3o73o5pCuKfFsALge+oneUe7m0cjFXylqF70qvkR\nzk3eEt4dJqjBMQE4/hN26T9rkm2sSLq4fF5YdFkqwhwl8aNj4HrIhtmbfJYV\n5WFzypaBzV882VQIQn9OA3L+2aGETk9NCnrnVn/b61flwnDvsAU+9YEwdPDm\nQEo+AjTTMe9CRSO+XXvtdiUEERcSigPSR9WY2FxrIMnxcox255d6qndMAQ+n\nwNRt\r\n=0gw6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8MEI1HEbE6WzAZSXpfxnp+LM9ONppPkvkI4DXWKQNwAiEArs3IsZUxWhGkQDNBiyw7r2BPM4/eIaCTWbAIm5Oj2Cc="}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_7.0.0-rc2_1530040952711_0.16068194122957813"},"_hasShrinkwrap":false},"7.0.0-rc3":{"name":"lift-it","version":"7.0.0-rc3","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^4.0.0-rc3","validate-fields":"^4.0.0"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.0.4","should":"^13.2.1"},"readme":"# Lift It\n[![Build Status](https://travis-ci.org/clubedaentrega/lift-it.svg?branch=master)](https://travis-ci.org/clubedaentrega/lift-it)\n[![Inline docs](https://inch-ci.org/github/clubedaentrega/lift-it.svg?branch=master)](http://inch-ci.org/github/clubedaentrega/lift-it)\n[![Dependency Status](https://david-dm.org/clubedaentrega/lift-it.svg)](https://david-dm.org/clubedaentrega/lift-it)\n\nForget about maintaining routes files, use dynamic routes created from files in a folder\n\n## Install\n`npm install lift-it`\n\n## Basic usage\n```js\n// Lift the 'api' folder\nlet api = require('lift-it')('./api').lift()\n\n// Execute the file ./api/item/create.js\napi.run('item/create', {\n\tname: 'Water',\n\tvalue: 17\n}, function (err, response) {\n\t// Always async\n})\n```\n\nLift-it scans recursively a folder for `*.js` files. Those files should export a `handler` function, executed when someones 'run' them. The only ignored file is `errors.js`.\n\nAn example of 'item/create':\n```js\n// `body` is the argument passed by 'run' (in this case, `{name:'Water',value:17}`)\n// `success` and `error` are callback functions, learn about it here:\n// https://github.com/clubedaentrega/run-it\nmodule.exports.handler = function (body, success, error) {\n\t// Item.create represents an async job\n\tItem.create(body, error(function (item) {\n\t\t// Answer with {id: '54bd55fc13e53ce1077415a2'}\n\t\tsuccess({\n\t\t\tid: item.id\n\t\t})\n\t}))\n}\n```\n\n## Express example\nThis module can be easily used with express (or any other route-based web framework).\n\nAn example of simple JSON-based POST api:\n```js\n// Express\nlet app = require('express')()\napp.use(require('body-parser').json())\n\n// Lift\nlet api = require('lift-it')('./api').lift()\n\n// Set routes\napi.actions.forEach(function (action) {\n\t// `action` is an object. See the docs bellow\n\t\n\tapp.post(action.name, function (req, res) {\n\t\t\n\t\t// action.run(...) is the same as api.run(action.name, ...)\n\t\taction.run(req.body, function (err, response) {\n\t\t\tres.json(err ? {error: String(err)} : response)\n\t\t})\n\t})\n})\n```\n\n## Plugins\nThe base module will scan a folder and look for exported handler in `*.js` files. This base behaviour can be expanded with plugins.\n\nThe available bundled plugins are:\n\n* validate: validate the input with [validate-fields](https://www.npmjs.com/package/validate-fields)\n* filters: add filters (like middlewares)\n* profile: enable profiling async jobs\n\n## Docs\n### require('lift-it')\nA function with one parameter, the folder path to scan: `require('lift-it')(folder)`.\nReturns a `lifter` object.\n\n### require('lift-it').lean()\nDo a lean lift. See `lifter.lean()`. Returns a lifted instance\n\n### lifter.use(plugIn)\nAdd the given plugin to the lift process. Read more about available and custom plugins bellow\n\n### lifter.recursive\nWhether the folder should be scanned recursively or not. The default value is `true`.\n\n### lifter.requireFile\nA callback to handle requiring a file. This allows one to completly change the semantics of a required file. The default value is `function (require, path) { return require(path) }`.\n\n### lifter.profile\n### lifter.errorClass\n### lifter.enableErrorCode\nChange settings of [run-it](https://www.npmjs.com/package/run-it). Must be changed only before `lifter.lift()` is called.\n\n### lifter.lift()\nRun the lift process (sync), throws if any error happens. For each `*.js` file in the target folder, all plugins will be executed in the order they were 'use'd.\n\nThis returns a `lifted` object.\n\n### lifter.leanLift()\nRun the lean lift process, that is, only look for file names. This will not require files, nor apply plugins.\n\nThis returns a `lifted` object with the `lean` flag on. No action can be executed on it.\n\nThis is useful if you just want to check action names, not execute them.\n\n### lifted.get(name)\nReturn an action by name. Return an `action` object (or `null` if not found).\n\n### lifted.run(name, ...args, callback)\nRun the action with the given arguments. `callback(err,...output)` is executed when done. The action is executed in its own domain, see [run-it](https://www.npmjs.com/package/run-it) for more info about that.\n\nThrows if no action with the given name is found.\n\nIf profile is enabled, the last argument for `callback` is the profile data.\n\n### lifted.getRunner(name)\nReturn a run-it runner for the given action. Call `runner.exec(...args, callback)` to actually execute the action. See `action.getRunner()`.\n\nThrows if no action with the given name is found.\n\n### lifted.actions\nAn array of `action` objects\n\n### lifted.lean\nA boolean. If `true`, this is a lean lift (see `lifter.leanLift()`), so no action can be executed.\n\n### action.path\nFile path, like `'/api/item/create.js'`\n\n### action.name\nAction name, like `'item/create'`. This is the relative path to the target folder, without the trailing `'.js'`.\n\n### action.filters\nAn array of filters, executed before the action handler. This is used by plugins.\n\n### action.postFilters\nAn array of post filters, executed after the action handler. This is used by plugins.\n\n### action.module\nThe result of `require`-ing the file. `action.module.handler` is the handler for this action.\n\n### action.profile\nA boolean that flags whether profiling is enabled for this action.\n\n### action.run(...args, callback)\nRun this action. This is the same as `lifted.run(action.name, ...args, callback)`.\n\n### action.getRunner()\nReturn the run-it runner for the action. Call `runner.exec(...args, callback)` to actually execute the action.\n\nThis is useful to make some adhoc changes to the runner, like `runner.runInfo(info).profile(true).exec(...args, callback)`. See docs on run-it.\n\n## Available plugins\n\n### Profile\nIf the `require`-d file exports `profile` (a boolean), this value will overwrite the global `lift.profile`. Get this plugin with `require('lift-it').profile()`.\n\nFor example, this file will have profiling always on:\n```js\nmodule.exports.profile = true\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\nUse:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.profile())\nlet api = lift.lift()\napi.run('item/create', item, function (err, response, profileData) {\n\t// ...\n})\n```\n\n### Validate\nAdd input validation with [validate-fields](https://www.npmjs.org/package/validate-fields). Get it with `require('lift-it').validate(options)`.\n\n`options` is an optional object with the properties displayed bellow (default values indicated):\n```js\noptions = {\n\t// The export property name\n\texportName: 'fields',\n\t// Whether to error out if the file does not export it\n\toptional: false,\n\t// Check input or output\n\tdirection: 'input',\n\t// Which argument to validate\n\t// The default will check the first\n\tposition: 0,\n\t// A function to return a value if the desired input/output is not present\n\tgetDefaultValue: function () {\n\t\tthrow new Error('Insufficient number of arguments')\n\t},\n\t// If lifter.enableErrorCode is true, which code to use in error(code, msg)\n\tcode: 101,\n\t// If lifter.enableErrorCode is true, which code to use in error(HTTPStatusCode, code, msg)\n\tHTTPStatusCode: 500,\n\t// A function to handle error cases\n\terrorHandler: function (action, value, err) {\n\t\t// `action` is an Action instance\n\t\t// `value` is the offending value\n\t\t// `err` is a lifter.errorClass instance\n\t\t// `err.code` is `options.code`\n\t\tthrow err\n\t},\n\t// Let you define your own custom types\n\t// See doc on validate-fields module for that\n\tdefineTypes: function (validate) {},\n\t// Options passed to schema.validate() of validate-fields\n\toptions: {}\n}\n```\n\nExample of a file using it:\n```js\nmodule.exports.fields = {\n\tname: String,\n\tvalue: 'uint'\n}\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.validate())\nlet api = lift.lift()\napi.run('item/create', {}, function (err) {\n\t// err is new Error('I was expecting a value in name')\n})\n```\n\nThis plugin will set `action.module[exportName+'-schema']` to `validate.parse(action.module[exportName])`.\n\n### Filters\nAdd support for filters. Filters are functions executed sequentially before the handler. One example of their use is implementing authentication. Get it with `require('lift-it').filters(folder)`.\n\nFilter handlers are implemented and exported by files in the filters folder. Each of those files may export as many filters as you want.\n\nSee an example of a file implementing two filters:\n```js\nmodule.exports = function (body, success, error) {\n\t// Check auth, read the DB, etc\n\tsuccess('Some data I got elsewhere')\n}\nmodule.exports.double = function (body, success, error) {\n\t// Simply change the body input\n\tbody.value *= 2\n\tsuccess()\n}\n```\n\nThe `'item/create'` action may use those filters this way:\n```js\nmodule.exports.filters = ['myFilter', 'myFilter.double']\nmodule.exports.handler = function (body, moreData, success, error) {\n\t// body.value will be doubled\n\t// moreData will be the string create by the first filter\n\t// ...\n}\n```\n\nIf this filter file path is `'filters/myFilter.js'`, the main file (the one that lifts everything) may be:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.filters('./filters'))\nlet api = lift.lift()\napi.run('item/create', {value: 10}, function (err, response) {\n\t// ...\n})\n```\n\n## Custom plugins\nA plugin is a function like `function (action, lifter) {}`. That function is called once for every file that is found in the lifted folder. Creating your own plugin is that simple:\n\n```js\nlet myPlugin = function (action, lifter) {\n\t// Do something with the action, like checking something\n\tif (action.name.indexOf('drop')) {\n\t\tthrow new Error('Sorry, we do not put up with dropping things...')\n\t}\n\t\n\t// Add a filter to every action to delay them by 1s\n\taction.filters.push(function (body, success) {\n\t\tsetTimeout(success, 1e3)\n\t})\n\t\n\t// Add a post filter to check something\n\taction.postFilters.push(function (response, success) {\n\t\tif (typeof response.status !== 'string') {\n\t\t\tthrow new Error('Response should have the status field')\n\t\t}\n\t\tsuccess(response)\n\t})\n}\n```\n\nWarn: the `lifter` object should not be modified. It should be treated as read-only.","readmeFilename":"README.md","gitHead":"dff6c69198363cd04c73cb49bf82cddd2577cac3","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@7.0.0-rc3","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-fENDru4Yf07H/rdty2Payw7xy4oyNp1CXLUxKd71RC+wiL7FYX3F/Z5bUT2QEFL0HOsZzGqxcwtM7P5q1XrIcw==","shasum":"6401d94623b59a576bfc216edbeb2b13fd54089e","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-7.0.0-rc3.tgz","fileCount":15,"unpackedSize":28226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbPteNCRA9TVsSAnZWagAAViUP/jZSr6eYvE9fIbE7dnm7\nlLPdcNKc8TVS8ngXMtP/ke2Pu3qtN67IkJs/A9P54rBaROexu+EKGxeNYCLp\nFeBIn4P/WQM44UjHYc0qNnmiPMgs0gcHVCC0YXdoLI1uKwfDtTx5kqNX5aB2\neEeJb29ZkqA8m69zYBIPRIWbqIqk6gXeSZxQZiK0pJxgkZs6kgN/wjTvBPgn\nyu0iOP3VWu24Bv5BHzaIKJBzVFdR1xKlwLO7bN2sRiOqtdaSHBoS4KEezWja\nZbhQyap+ZimZEm5RnqB1FQYfKzrqHvD+fEGrug5i499Zmbi9rGjG3vjeVRqS\nEjZaZNRdQNNqL6uNyAEP1PX8zM6W09JtQBvtcRRgAvQ7EHTj8wpiLXgqh3Nq\nILP+IZ2dhbdOSb0d28L7Z9RkoyhkMLUQEUPoViz2FVMFLPJsZBAhLUFAnbE6\nRdejtaE+iB9tUP6LrbivLyofPr0s/Y6DzhKPa+bKszCzTq1+/FT9TAm5YQT3\nVC5RrK8bAtjLcMgpEZ5i1ctzCR8vQls/y8DKvB2Fh5KkDYHqYsVYqOZVnWYw\n9iTy5hAyiZ1qdsvjFiANZe890xMRG7oDSJiJrik84eJROSj9tlNYxVtQNkM3\nkGM9yoxn3Hsv0WehyQZd0i+rBmIvo4RjQYhfjNTgQZ2ytl8iwQ/1blpLps8r\nePb/\r\n=Lo3+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCycfPCoZtrHDCB+WPh7vL4Llg6KTmy8hAadTscBXl1LQIhAIH/bUoQdQR212BMRP/ozXAHW35Su0a4bVuf/QTg5ZuO"}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_7.0.0-rc3_1530845069428_0.5486387135290955"},"_hasShrinkwrap":false},"7.0.0":{"name":"lift-it","version":"7.0.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^4.0.0","validate-fields":"^4.0.0"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.0.4","should":"^13.2.1"},"gitHead":"dff6c69198363cd04c73cb49bf82cddd2577cac3","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@7.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-prrO01LVSbC7fNtPzJsK/8XOZDtDgLbd4n4XfZbXU6OPJSNj0f+YkJ9Oi0fn49dmqOlXfxqloNpAUmwIa+BDRQ==","shasum":"31a3eca76f2c1b2eb8cf3c9fb177a9fd1591298c","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-7.0.0.tgz","fileCount":15,"unpackedSize":28218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSRvICRA9TVsSAnZWagAAQDoP/2k80qmncKZ+KW3q25nE\nVcGpIVIpQOHgHj1p7inmWlv2J03PiwTDk7iNX1q4TCsDVapcgPXiw4CWB09b\nd+Gn7Pc2/14rcSt4b/1fB95RT2/krgJrSxhU4gAOjJuXvxqI0fKpb59bCnnw\n5v4j4laWYpgmgBmyusBNo4Mm/G9Tvdzw48nKUY8jyt1dRGIH5x9nFpB84wo0\ntBSORO2wMJqYH8O+R2cA8AyCFKp/pRaDB5T2WKsIrnW/MencQBh/IZyMesqP\nS45UQIfnYueR1+D456cnCZowI1WskDLXnhLm+QBuOeqZqN8s3SKwEcBrbIIg\n3kZvLwzr/4FoVrjudBLtEP8buQPRTpaJ18CalA1KlBvpgs/j51meUR8Nlgkc\nSBYN7Xc4oaYwvA3T+wOfsHMIioC5CAF4clPhErWvMDvxYMKg5XK98h7eFGBZ\nqAy59ujJGkxG1K4yDJO3aSYI03HiC+tJqxFRsOhC5cNWqFDIMiBisfQjG7VW\n7iXl1wBQD/KEtlnUMEUASuMRuzew3fRSH9MFvZNTLwSLgK3fMl0WwfXOE3Ly\nXpZyXhDTF/r9JzWCiAQj/gGWHmYyopkgrhywNT9wzgTd85ucu8YVuULVYcu/\nnUa164YLGJXf6fzq8hC9woBfKYfIvjgd8FWQyazJBOlnlsgSE9uJXNMzrZMB\nhA+y\r\n=xttV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIwR2ZPX3/FAjcuSnJpaTeU3yfS5fxIHFCd+v43DI+jQIhANZk0S50GdEsDGP3TsOhFO++kSZg/cteljBdBKMUuqZH"}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_7.0.0_1531517896063_0.015304043017047686"},"_hasShrinkwrap":false},"7.1.0":{"name":"lift-it","version":"7.1.0","author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"description":"Forget about maintaining routes files, use dynamic routes created from files in a folder","main":"./index.js","repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"keywords":[],"dependencies":{"run-it":"^4.0.0","validate-fields":"^5.1.1"},"license":"MIT","engines":{"node":">=6"},"scripts":{"test":"mocha test","docs":"jsdoc -d docs -c docs.json -R README.md"},"devDependencies":{"jsdoc":"^3.5.5","mocha":"^5.2.0","should":"^13.2.3"},"gitHead":"2fdde22ab96373594268be027d9c429ca52ee74a","bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","_id":"lift-it@7.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"clubedaentrega","email":"cde@clubedaentrega.com.br"},"dist":{"integrity":"sha512-6EcKLI5eJmXIycOQm4+q1rKvFULKIEuYV9lPgx9J/O8NpXgNgpsN4UppP9KiEAxKM/FT6aRQs1TX/sLaVK1+ow==","shasum":"9c757c3087dd922bf70abb015ce8b28918c23f16","tarball":"https://registry.npmjs.org/lift-it/-/lift-it-7.1.0.tgz","fileCount":15,"unpackedSize":28219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGOiVCRA9TVsSAnZWagAAzHQQAJyAjXW24hmMtUhVHelh\nNaWgyL/o8Xu4FXpthooXJWggZOvtxz2FJzokSnquDnX9IiKX/gq1JeZSr5Xs\nmt9M+eOZ+owM3SprWgmexV+t9keA0Sfp5ASdnOoa33qmCzuQWlAN7xgSMJtJ\n6gP8Ud7ccWPESl8vvbA6M1i3g8WNhRz+Crq0Gus1I9Ox5OAwQuMkohpPlR9M\nOQD/DJIvVeQdzCSsQ3y27o1fSh5WFUtUHHerpubRxTECWPeUwMalKeFvhNF9\nh4donjktP61oMR8NTT8yWdEDq6ZfuXAq2mJQnDzW8smX4hEHHTIsU0uSk/uo\nnbnUfVOaDavU7s5yY631j3Pd2dYBumMgGJdzJj5cpGSNylSAgPpjGIon5CBQ\nynQx0UEnvNLQoQNKO1O05RJYoijZAGz052Nc7ILhcpy4fi8QmdHgSgWzaNAn\n6PQMMEUvHO4mjrPZIp9v0mJVsPIxQYfSQQFQNdvGQbJyWl0Sm/hzTXsVjbMD\nYRVxqX2os43EoiHyS8NajaibQZb/HAebm9eoEFZ3h7E2qwRl5mW3oSpNgu+7\nrzEHbJfQXUhdS55iOnMxt9tls0xxZS5RlcStSUfo3lCPNjwh3Sa2P5pjxW7w\n1PuMtHuFUQI75Wu2GBCCVIrCPSDnXHLM9VwXiUo9p9ZEgkt5H0kjrLZI2Pcl\n8Gm4\r\n=XJRh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDtz0kxQvOr5+zfpS942qxpPqLer6eCcBFRhPecR7n4QIgEFn8EzbVVsqTA6vFSD5JVg11pIaLBlaTVYnqbZO9Bbg="}]},"maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lift-it_7.1.0_1545136277247_0.3800837673219475"},"_hasShrinkwrap":false}},"readme":"# Lift It\n[![Build Status](https://travis-ci.org/clubedaentrega/lift-it.svg?branch=master)](https://travis-ci.org/clubedaentrega/lift-it)\n[![Inline docs](https://inch-ci.org/github/clubedaentrega/lift-it.svg?branch=master)](http://inch-ci.org/github/clubedaentrega/lift-it)\n[![Dependency Status](https://david-dm.org/clubedaentrega/lift-it.svg)](https://david-dm.org/clubedaentrega/lift-it)\n\nForget about maintaining routes files, use dynamic routes created from files in a folder\n\n## Install\n`npm install lift-it`\n\n## Basic usage\n```js\n// Lift the 'api' folder\nlet api = require('lift-it')('./api').lift()\n\n// Execute the file ./api/item/create.js\napi.run('item/create', {\n\tname: 'Water',\n\tvalue: 17\n}, function (err, response) {\n\t// Always async\n})\n```\n\nLift-it scans recursively a folder for `*.js` files. Those files should export a `handler` function, executed when someones 'run' them. The only ignored file is `errors.js`.\n\nAn example of 'item/create':\n```js\n// `body` is the argument passed by 'run' (in this case, `{name:'Water',value:17}`)\n// `success` and `error` are callback functions, learn about it here:\n// https://github.com/clubedaentrega/run-it\nmodule.exports.handler = function (body, success, error) {\n\t// Item.create represents an async job\n\tItem.create(body, error(function (item) {\n\t\t// Answer with {id: '54bd55fc13e53ce1077415a2'}\n\t\tsuccess({\n\t\t\tid: item.id\n\t\t})\n\t}))\n}\n```\n\n## Express example\nThis module can be easily used with express (or any other route-based web framework).\n\nAn example of simple JSON-based POST api:\n```js\n// Express\nlet app = require('express')()\napp.use(require('body-parser').json())\n\n// Lift\nlet api = require('lift-it')('./api').lift()\n\n// Set routes\napi.actions.forEach(function (action) {\n\t// `action` is an object. See the docs bellow\n\t\n\tapp.post(action.name, function (req, res) {\n\t\t\n\t\t// action.run(...) is the same as api.run(action.name, ...)\n\t\taction.run(req.body, function (err, response) {\n\t\t\tres.json(err ? {error: String(err)} : response)\n\t\t})\n\t})\n})\n```\n\n## Plugins\nThe base module will scan a folder and look for exported handler in `*.js` files. This base behaviour can be expanded with plugins.\n\nThe available bundled plugins are:\n\n* validate: validate the input with [validate-fields](https://www.npmjs.com/package/validate-fields)\n* filters: add filters (like middlewares)\n* profile: enable profiling async jobs\n\n## Docs\n### require('lift-it')\nA function with one parameter, the folder path to scan: `require('lift-it')(folder)`.\nReturns a `lifter` object.\n\n### require('lift-it').lean()\nDo a lean lift. See `lifter.lean()`. Returns a lifted instance\n\n### lifter.use(plugIn)\nAdd the given plugin to the lift process. Read more about available and custom plugins bellow\n\n### lifter.recursive\nWhether the folder should be scanned recursively or not. The default value is `true`.\n\n### lifter.requireFile\nA callback to handle requiring a file. This allows one to completly change the semantics of a required file. The default value is `function (require, path) { return require(path) }`.\n\n### lifter.profile\n### lifter.errorClass\n### lifter.enableErrorCode\nChange settings of [run-it](https://www.npmjs.com/package/run-it). Must be changed only before `lifter.lift()` is called.\n\n### lifter.lift()\nRun the lift process (sync), throws if any error happens. For each `*.js` file in the target folder, all plugins will be executed in the order they were 'use'd.\n\nThis returns a `lifted` object.\n\n### lifter.leanLift()\nRun the lean lift process, that is, only look for file names. This will not require files, nor apply plugins.\n\nThis returns a `lifted` object with the `lean` flag on. No action can be executed on it.\n\nThis is useful if you just want to check action names, not execute them.\n\n### lifted.get(name)\nReturn an action by name. Return an `action` object (or `null` if not found).\n\n### lifted.run(name, ...args, callback)\nRun the action with the given arguments. `callback(err,...output)` is executed when done. The action is executed in its own domain, see [run-it](https://www.npmjs.com/package/run-it) for more info about that.\n\nThrows if no action with the given name is found.\n\nIf profile is enabled, the last argument for `callback` is the profile data.\n\n### lifted.getRunner(name)\nReturn a run-it runner for the given action. Call `runner.exec(...args, callback)` to actually execute the action. See `action.getRunner()`.\n\nThrows if no action with the given name is found.\n\n### lifted.actions\nAn array of `action` objects\n\n### lifted.lean\nA boolean. If `true`, this is a lean lift (see `lifter.leanLift()`), so no action can be executed.\n\n### action.path\nFile path, like `'/api/item/create.js'`\n\n### action.name\nAction name, like `'item/create'`. This is the relative path to the target folder, without the trailing `'.js'`.\n\n### action.filters\nAn array of filters, executed before the action handler. This is used by plugins.\n\n### action.postFilters\nAn array of post filters, executed after the action handler. This is used by plugins.\n\n### action.module\nThe result of `require`-ing the file. `action.module.handler` is the handler for this action.\n\n### action.profile\nA boolean that flags whether profiling is enabled for this action.\n\n### action.run(...args, callback)\nRun this action. This is the same as `lifted.run(action.name, ...args, callback)`.\n\n### action.getRunner()\nReturn the run-it runner for the action. Call `runner.exec(...args, callback)` to actually execute the action.\n\nThis is useful to make some adhoc changes to the runner, like `runner.runInfo(info).profile(true).exec(...args, callback)`. See docs on run-it.\n\n## Available plugins\n\n### Profile\nIf the `require`-d file exports `profile` (a boolean), this value will overwrite the global `lift.profile`. Get this plugin with `require('lift-it').profile()`.\n\nFor example, this file will have profiling always on:\n```js\nmodule.exports.profile = true\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\nUse:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.profile())\nlet api = lift.lift()\napi.run('item/create', item, function (err, response, profileData) {\n\t// ...\n})\n```\n\n### Validate\nAdd input validation with [validate-fields](https://www.npmjs.org/package/validate-fields). Get it with `require('lift-it').validate(options)`.\n\n`options` is an optional object with the properties displayed bellow (default values indicated):\n```js\noptions = {\n\t// The export property name\n\texportName: 'fields',\n\t// Whether to error out if the file does not export it\n\toptional: false,\n\t// Check input or output\n\tdirection: 'input',\n\t// Which argument to validate\n\t// The default will check the first\n\tposition: 0,\n\t// A function to return a value if the desired input/output is not present\n\tgetDefaultValue: function () {\n\t\tthrow new Error('Insufficient number of arguments')\n\t},\n\t// If lifter.enableErrorCode is true, which code to use in error(code, msg)\n\tcode: 101,\n\t// If lifter.enableErrorCode is true, which code to use in error(HTTPStatusCode, code, msg)\n\tHTTPStatusCode: 500,\n\t// A function to handle error cases\n\terrorHandler: function (action, value, err) {\n\t\t// `action` is an Action instance\n\t\t// `value` is the offending value\n\t\t// `err` is a lifter.errorClass instance\n\t\t// `err.code` is `options.code`\n\t\tthrow err\n\t},\n\t// Let you define your own custom types\n\t// See doc on validate-fields module for that\n\tdefineTypes: function (validate) {},\n\t// Options passed to schema.validate() of validate-fields\n\toptions: {}\n}\n```\n\nExample of a file using it:\n```js\nmodule.exports.fields = {\n\tname: String,\n\tvalue: 'uint'\n}\nmodule.exports.handler = function (body, success, error) {\n\t// ...\n}\n```\n\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.validate())\nlet api = lift.lift()\napi.run('item/create', {}, function (err) {\n\t// err is new Error('I was expecting a value in name')\n})\n```\n\nThis plugin will set `action.module[exportName+'-schema']` to `validate.parse(action.module[exportName])`.\n\n### Filters\nAdd support for filters. Filters are functions executed sequentially before the handler. One example of their use is implementing authentication. Get it with `require('lift-it').filters(folder)`.\n\nFilter handlers are implemented and exported by files in the filters folder. Each of those files may export as many filters as you want.\n\nSee an example of a file implementing two filters:\n```js\nmodule.exports = function (body, success, error) {\n\t// Check auth, read the DB, etc\n\tsuccess('Some data I got elsewhere')\n}\nmodule.exports.double = function (body, success, error) {\n\t// Simply change the body input\n\tbody.value *= 2\n\tsuccess()\n}\n```\n\nThe `'item/create'` action may use those filters this way:\n```js\nmodule.exports.filters = ['myFilter', 'myFilter.double']\nmodule.exports.handler = function (body, moreData, success, error) {\n\t// body.value will be doubled\n\t// moreData will be the string create by the first filter\n\t// ...\n}\n```\n\nIf this filter file path is `'filters/myFilter.js'`, the main file (the one that lifts everything) may be:\n```js\nlet liftIt = require('lift-it'),\n\tlift = liftIt('./api')\nlift.use(liftIt.filters('./filters'))\nlet api = lift.lift()\napi.run('item/create', {value: 10}, function (err, response) {\n\t// ...\n})\n```\n\n## Custom plugins\nA plugin is a function like `function (action, lifter) {}`. That function is called once for every file that is found in the lifted folder. Creating your own plugin is that simple:\n\n```js\nlet myPlugin = function (action, lifter) {\n\t// Do something with the action, like checking something\n\tif (action.name.indexOf('drop')) {\n\t\tthrow new Error('Sorry, we do not put up with dropping things...')\n\t}\n\t\n\t// Add a filter to every action to delay them by 1s\n\taction.filters.push(function (body, success) {\n\t\tsetTimeout(success, 1e3)\n\t})\n\t\n\t// Add a post filter to check something\n\taction.postFilters.push(function (response, success) {\n\t\tif (typeof response.status !== 'string') {\n\t\t\tthrow new Error('Response should have the status field')\n\t\t}\n\t\tsuccess(response)\n\t})\n}\n```\n\nWarn: the `lifter` object should not be modified. It should be treated as read-only.","maintainers":[{"email":"cde@clubedaentrega.com.br","name":"clubedaentrega"},{"email":"sitegui@sitegui.com.br","name":"sitegui"}],"time":{"modified":"2022-06-19T12:15:26.845Z","created":"2015-01-21T19:05:19.351Z","0.0.0":"2015-01-21T19:05:19.351Z","1.0.0":"2015-01-23T17:33:59.816Z","1.0.1":"2015-01-23T23:41:17.257Z","1.0.2":"2015-01-24T00:20:36.188Z","1.0.3":"2015-01-24T01:04:07.303Z","1.1.0":"2015-04-03T22:25:42.122Z","1.2.0":"2015-04-14T03:00:35.424Z","1.3.0":"2015-05-10T21:11:32.785Z","1.3.1":"2015-05-11T01:24:15.790Z","1.3.2":"2015-05-11T02:59:44.589Z","1.3.3":"2015-05-11T03:08:42.869Z","2.0.0":"2015-05-13T20:50:18.699Z","2.1.0":"2015-05-26T06:13:04.246Z","3.0.0":"2015-07-14T01:14:08.562Z","3.0.1":"2015-10-21T02:52:14.150Z","3.1.0":"2015-10-29T15:54:37.314Z","4.0.0":"2016-04-05T17:18:24.873Z","4.0.1":"2016-05-19T03:01:38.673Z","4.1.0":"2016-06-27T17:41:21.151Z","5.0.0":"2016-10-03T18:43:41.469Z","6.0.0":"2018-03-22T17:50:39.545Z","7.0.0-rc1":"2018-06-26T17:23:13.861Z","7.0.0-rc2":"2018-06-26T19:22:32.854Z","7.0.0-rc3":"2018-07-06T02:44:29.500Z","7.0.0":"2018-07-13T21:38:16.137Z","7.1.0":"2018-12-18T12:31:17.427Z"},"homepage":"https://github.com/clubedaentrega/lift-it#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/clubedaentrega/lift-it.git"},"author":{"name":"Sitegui","email":"sitegui@sitegui.com.br"},"bugs":{"url":"https://github.com/clubedaentrega/lift-it/issues"},"license":"MIT","readmeFilename":"README.md"}