{"_id":"napim","_rev":"74-3eec383c23a6e029df9b2e7bac397ae2","name":"napim","dist-tags":{"latest":"4.2.1","aplha":"1.0.0-alpha.1","alpha":"1.0.0-alpha.2","beta":"4.1.1-beta","next":"4.0.4-next"},"versions":{"1.0.0-b":{"name":"napim","version":"1.0.0-b","description":"Node Api Maker build with express and knex","main":"index.js","scripts":{"test":"nodemon test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/core-api.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/core-api/issues"},"homepage":"https://gitlab.com/axmad386/core-api#readme","dependencies":{"bcryptjs":"^2.4.3","dotenv":"^8.2.0","express":"^4.17.1","jsonwebtoken":"^8.5.1","nodemon":"^2.0.2","path":"^0.12.7"},"gitHead":"01d0cbcfb0d437cbd083aa4ca6f0c3e94a423007","_id":"napim@1.0.0-b","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-Vxas6qERUUURka0v/LMhQJpBjAFhuraghczEgjjZBraSuVPGnyI354s0SR+DXqMokVgcFWPp9i/YaZPj2ltIYA==","shasum":"4053daef6334cceff9299a178350771a1bbd1208","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-b.tgz","fileCount":9,"unpackedSize":7884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedv8DCRA9TVsSAnZWagAARg0P/R6195PCoUeTm4zggZFw\ny0o0MgKnDaMgjb6UhtSRmJGG1jKvWHEPcVIQZsg7e76HXPn9+9in4h4VlE6G\n/MaomeFJq/rEIB32+dnbk+tPPVEVw50cr9vlA+Eca3wypj3qz15is3nd5y7F\nyViEysy6tLnJTPBGNksDAeiRkd6N5hD7f6jiv4AVMXWph9FWi3YHJRGM/AL2\nEpWT2QCZ6UD/qraBgPPanKKLAilMfo/ETZCL1G/8z0cgEeqFgycRAVBR8zZw\nldbf8fzGv+sGqovx7+SMUAvqSN+zSRKnX0E+ZqLetH0VL8SnzUQl867MqJBi\nUmUXk0tvxqHs3pVGV5mK4N8a0YagV99sIAmltlkiCEsDcZ4UgYXFF7bqkVyF\nFIw8xxYigYf0sKA9IuWOxH9VsqJRhNaHdT2CxHSVhcIrBNe4O6husowJrVkw\nL1INaLZzhyNavXnv/pFV8AdNtLzQ1+wuN5gZtR1/zi94CJMLA+cB3wbMsn+P\nZQH/0T2s8o8wxIF54GAEPZm2CJxDaNSXsyH+kYfMrfnfzT5YHqYbnrEf7tD2\nxrkVr3k1Xins1kGKECRuGA+6LBfEIn1fwNbEcWEqDQbcUDHRArqXXA6RhUgU\ngwYMarljcp6+0Zn+AwJOEXXWBIIrQ4NTTuqcdjrVNlkJa8fDx5T8ib3cBTqH\nn/Jc\r\n=OcGr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3QpkDl31dCdyRp/s/cEB5Va1hk7wTcbasR8qqH2R3KAiEA6U7P6qrBBlrANdZ/AteTnTs6m7PgtHd2IveQe4lqVxo="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-b_1584856834592_0.06037553475120827"},"_hasShrinkwrap":false},"1.0.0-aplha.0":{"name":"napim","version":"1.0.0-aplha.0","description":"Node Api Maker build with express and knex","main":"index.js","scripts":{"test":"nodemon test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/core-api.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/core-api/issues"},"homepage":"https://gitlab.com/axmad386/core-api#readme","dependencies":{"bcryptjs":"^2.4.3","dotenv":"^8.2.0","express":"^4.17.1","jsonwebtoken":"^8.5.1","nodemon":"^2.0.2","path":"^0.12.7"},"gitHead":"a1106b91d33a82291a9f432091ba3000004e9f1b","readme":"ERROR: No README data found!","_id":"napim@1.0.0-aplha.0","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-LV38T3fQ3h+uPdTIaP0NyVjUAp7nsTPeniud/q+Cn/V1j8OZvljyUD37wZdA7b70Nf97oablL0CunNGdGWwPAg==","shasum":"f18e71efddfc29a6dc91cc06d3710c7c741290f2","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-aplha.0.tgz","fileCount":9,"unpackedSize":7891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedy07CRA9TVsSAnZWagAAnPAQAJhRR1oXB63CNSqgxBmW\nWU7qmR1FC5Q7FzYgtEdgbZFXYCfkKed/CSO7pSLG2gh/6+EcD+HSVBz7zY7s\n2DjMq1ObyBjs/ai5usLA/PFqnixVql1L/FJz0vLXhg2UDuDD/CmpofJrolJG\nGea1tDn22Nn4he7L1kbRbbMGvYo6ysDiBPMT6Wa9DmsGxKYc5aeARqBb5rRg\nB1HlQEZDVb9gbbUV7/dffDq1eMm4a5lPNrPaahSpKSY0UmoOB1/5N6gXePnX\nVmu3IzhD0xUYzkEXO5h+8ypzFI1QGA/rHlB557I1oxiK6OJIC+EAHfo2njeD\nXe6Goi+CCny0lV90cr5qP3xOyr2xc1HkRUAwIqq4x8khHwSZeenjR+v5fTIv\nd9GTmTk0nKp7j9jYAQb1OjJ8hS/o6sIi3t6AFFvx4q+vDwKk7xalLuKh3ZU8\nPbBewRxp89RwgRKisJW4NVGCqZ0zJMsmUu0/GBwAqfRUWx9kan9SNt8lioHk\n8a+Dpy8AV0YmHbU4GOcMHzcuaMnHyfQloxw5ViaEyzcGKcQABpaJRZ6usUH7\nUut+sfOfx/f+ILgGfSKwa8HKiHs1sedt7+Sj7m3wQ3nZA5M4vo8riC/77kmt\njB6N4Z/gNFB6Dz/I8d2p7zv3Ghye+EsHESxI+F6zS1XoyTO7Stqgcs7tUH0o\nH+5n\r\n=VFUq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgDj+SJnJBGUIAj9c2b4rnzNNKJri1qCqpKNV7MGLifQIgVUy6TwihtBlAkC+TvfBZLZ3ufwdLR8Kp/DODuNaX0Ps="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-aplha.0_1584868666894_0.8384379242418816"},"_hasShrinkwrap":false},"1.0.0-alpha.1":{"name":"napim","version":"1.0.0-alpha.1","description":"Node Api Maker build with express and knex","main":"index.js","scripts":{"test":"nodemon test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/core-api.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/core-api/issues"},"homepage":"https://gitlab.com/axmad386/core-api#readme","dependencies":{"bcryptjs":"^2.4.3","dotenv":"^8.2.0","express":"^4.17.1","jsonwebtoken":"^8.5.1","nodemon":"^2.0.2"},"gitHead":"019242262d40cf579090fb6b6c488eb52dcaeb26","readme":"ERROR: No README data found!","_id":"napim@1.0.0-alpha.1","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-13WIAHNsDJtBa0tkHnRFV+XKMRa1TfcGPqN4EGj0GUXzSqtzL0266cYDiHnf3rFN3r2oyr+Kyn58uDmpck5KqA==","shasum":"2ddc277bb3808ce708d00ceb1a64298c65c87918","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-alpha.1.tgz","fileCount":8,"unpackedSize":7797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee3edCRA9TVsSAnZWagAAG4YP+wR3faIlELFwq+NsSlOY\n+J+lKZ54rkkPaf/CwjYmzbPgW2lUW0aZNkz3YCDUKZtw5rlbJD+LfvL81ncB\ndw4o/aR801n1FkQAheVLaxmUQdkW4XxeiEEdSff+vxf+8c3w9qYYNyd2dAmh\naDRI79XSJ44u4D0OzFkvcUAFCQhbUO3n8ZwaBqvDeGg57A/wfQLALYsMtTIB\nr+nesoF1eg5mnjUW1jAsGUPbhRv+rJV7gDOLKMsI9nsAAzMo/0khZh79uRh0\nkoKKHcRPSYw6UfpQs3RtOT6ZT/RSnD5oMz9voDyKxnzYrkY4C+fRSqqwzRyY\nWeQepg6oK3G3SESwPQE4kwZUIrEj9BVa+1cmGfoujZEoldzYf8NbD5a2Lque\n0hTJnKOSXsdlRqUJrlnRyi/1r8Ogh5E9cacOX3j5UqQREoQuTJ/gi0Cu/Lp4\n/BcCfURTwpwq3slGs5NM4EqJk1ZOsx+oHFrb3ZarUi2XxDuyjyW2aki7ozet\nAE9dSqHawNScYKdQ1/Amsf46LnUHmkpvZ5idFx9It0kvNirn9wBU05hkM+Ca\nREjCmu4gpNEWXo6YAgI2MKqAknprVlSSUbprnmCy/WbtZQ0cRXzW/xKV6wMX\njk+dlBjRhOa5WgfqB3B/TMUOnMOVmg8ztI3Gzrwyy6M3yTMGRPTQ5Mh6Yt+p\nFxHs\r\n=2oux\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyBwVz8ZZb8P4VWrGcMeLtGF0H/7ayzdb4WRTX1BVG/gIhAPT/Xj8jdvMnDjgZ+GqcwrMuF8MHW7//xJ2g9XGpolo5"}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-alpha.1_1585149853099_0.7715164256567533"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"napim","version":"1.0.0-alpha.2","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","test":"nodemon dist_test/index.js","start":"node test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"bcryptjs":"^2.4.3","dotenv":"^8.2.0","express":"^4.17.1","jsonwebtoken":"^8.5.1","knex":"^0.20.13","moment":"^2.24.0","mysql":"^2.18.1","node-input-validator":"^4.2.0","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2"},"devDependencies":{"@types/express":"^4.17.4","ts-node-dev":"^1.0.0-pre.44","typescript":"^3.8.3"},"gitHead":"d71defd4172e2ea0980eaaefa0fa773d9721e574","readme":"ERROR: No README data found!","_id":"napim@1.0.0-alpha.2","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-0R+FQjrEsSSbiQm2WIjJnYj+55i6CE2Ve3kxRB8NWPrnu19SpGxN96gw/R5Go8T6Rxc+soLAYweijzPWHHaghw==","shasum":"ad0aa4390aebfa594341e962b6ac95676f319f0d","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-alpha.2.tgz","fileCount":17,"unpackedSize":29235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeieS6CRA9TVsSAnZWagAATUAQAJINdYA7dmseofk3JVt5\nCdaTD6QbSO047Hni/ga23G53KAuikJnN3r8YBJSdKovSXhvBMGiZpySxheBh\nKY5l3jvVDkANqcdh/2CE/VUhfUw5uyxKxCpmw4I8POHPN/FMkR9m6/0uLCh4\nAj/a34bGrGSsjNv5dho4QyM7VF/lxs9hi1HMHpyOcqwCoI0Mz5FNAXoDUnlU\nmhzYfTMk58scSsd2KFqvPLCAxJb3iQ8RTBW+IxVF5jcoKnOIEJa4vrwobU+H\nUqUT69DIoS72LdAg4z/damaWg/TmPJJQpkRDLDR5avZnsubwmzZZbu9aCPnI\nIVPSWw8uKIA4rlPm0MgFYOCDGluWRfMUMOKarImUJTrKz32IaV7Hr6UqZwHw\nZ979zHc9hm3bTmT1KovCdtfJJ79FsWhKXXP6PiuxCJ06n07l9S9C2h5ztz9O\n0Q6LwGsTJu84udU2Xf7awfYal7AGzDqLiaNp29XLpBu5dv1GDXH/Wx06uBCU\ns+f4A6skXYZQBJnn0dUZN3xB5nRhRXhji/umSMq3zIgYQQ/AZRN+C/tiL2bZ\nWTGDm57Cs/UFTpk+2jgWAdDFbalzKLzKobJ6LAyX9ma8zx3RBzn1KYgmrq7g\nKs95kr/zknTjoI+TsLh+i0/KfY+KYj+zS+gvReQsQj2GIo9AC2m1le2xdG5/\nJ25I\r\n=RCyB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4lLnYWhNH+76dUeoSJfEgjUA9VZ9h7gc0tPyBtgJpnAiEA2Pvj7+wwTSGdeyxleAB2Mga0e7Fnjv414Xko2ZIWBWc="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-alpha.2_1586095290018_0.5399492926352694"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"napim","version":"1.0.0-beta.0","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","moment":"^2.24.0","node-input-validator":"^4.2.0"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"31b04130ffeebef0323830a02d0deca76c3bd19b","readme":"ERROR: No README data found!","_id":"napim@1.0.0-beta.0","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-zSarXuo87AM3ZEzBnivekuBQe0iAcqKy034YamQq/hMnDg4+g4NEn0OR6NWN1Kh8F0m/AoduSGiHR7eJ6cY8NQ==","shasum":"3461d14a32ac7a8c065ac49bc9025714d562c753","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-beta.0.tgz","fileCount":20,"unpackedSize":20070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeizUJCRA9TVsSAnZWagAA7tMQAJJfUGZjvGRqqyFb0a7w\nIgXvrlRm/QKYPlrngLgZX5EkaN3XqUZTuR3VOys2m4wpof+PulQs2MgQQzRc\n9k7p2jHyyZH2BQ8tPt+WZctbbQFYSEq7nR7sInv3NSXB4gIMr4FN7V1bCs/c\nLBHhbnyjcOxfHcFEWWfm41uQVBMeX291yDSB0Pbl7KkDuAflSrRtbDbhkNj8\n+2YUrZBZ0FQORzGDnA63O8T9w8KcBYcl0rx79PnGVaBO8uEN7K0SExai7t7A\n3kWNvbVLZpU08dtaauEs4WhqYaA31JOdZzMMxp9MExW50VPp4EPhy/9BswBQ\nV0csvmJ0L5kbmsBNPqBu/AOPMDtb1XH4D91aD4xjoWaAPHnNAFqNURCycXf7\ng5oaZByJ9ZnDYfO5JNIXKCTjYz7Hyre/hv0XJhe54RHZuQeAMK0VcyrkJdsd\n27eFgzbcIn63xH4X/aV8oUOD4EK8a1B0phfg4X4RMHlaHy77BJbDH+otCGPB\nEf03rZyVn0kzsWTd2RIUd0lh4v4xWvG52i2LtACPyEQlYQRgGE2QIvcmv4sI\ne4uIGbeECGUyiSqt9TMyBMv1iKdaf4LmcdgZMIxetSc3b6DFfN5cM5XFhSwM\nkfHlO/Y2kmbNF7kcjLuiXMHCsZCromEH+3smVxg1S+YelKZHm7xNDPZWbu2K\npT1v\r\n=fpll\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqkq56q3HxBQfoaYlHTOPXiq+n46Pm9crnNiNRTekDNQIgYiYEhyPz5VdKRXGpI09LUTBwPFvGYUxC0KgjfrwZryg="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-beta.0_1586181385039_0.148160598703295"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"napim","version":"1.0.0-beta.1","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","moment":"^2.24.0","node-input-validator":"^4.2.0"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"cc6508dc95e0065fbed52d24ebfd04b1c5cbea9f","readme":"ERROR: No README data found!","_id":"napim@1.0.0-beta.1","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-SbsAtmyslVNEAQ4M6zcDgn+nr6VyoBHOLNNROfs+uIp4k3DhiStPcH8++gjC7rceNWXEAbkN6nhmhQ8vjKRg+w==","shasum":"99e8f8b31dc61e5b55e19a9d8c74f32237e99701","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-beta.1.tgz","fileCount":20,"unpackedSize":20556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejFvzCRA9TVsSAnZWagAAojUP/AhLItXQnOxjmpcrKTvh\nJqt5S4ao8pOkiA59uUGVVt8w8YV1Qrd2kzJGX1JCYD2ApGTVd+wGFi5Ve2xL\nYNPLfLJppzQLxK+PTNoQdIlc4FTOp0YaLduVuVYM4lKOBQJPFJAwbAGt8FBa\nQT7uY7udSJEup3/CNAnqpR/Kac23VTh/6iinpOExT/IY9wAr2PtBoFS/H+Yc\ntVeyza0/Y9T+eB+IRiqkhffxmbq34QUuct9pDakm3jJqCLRlmH8eq7zfcGry\nWMVyW50IG/rQx1b+oI8USDXRW0Lf0Ao4QueU0UPcMFDE98iTJoQScPFe5fXd\nN1xxoBzucioIVsbAUPX/X17xvK282mO60jKu/x/AZ/OescapsoJHfQ0G8s8o\nqlXuCAUCDbg3LJ62m2ND9eV1Lz2sEmnHdgIXzcFsd2qKENEpTsJnZ4aCUGLx\nHZhWJGVvdeRO/3/kOEKRBgNAPagI8HMT9EJhhjvnkW8biqSXLidRur8gaiV3\nPThLhDeZpxHyvyFsiIAhdx2o1XGxOJA2a7Oi2agXLkXcVTAt3u3Wu/LOw+kF\nz9NTivCUhpSFP1o2cD8f+MdNrqHVDgLzTEURRf6anUI06jCuthBSB7+x9Ld2\naluE8hTkPo9Ohv2cBt0we2ZmWsB4/TbhwV2HXJCT6x+jgkYFWSmPdCccVW/S\n4V1D\r\n=c78I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTLKcAH+2gea2yIV/h13Qsb+Z+N6ytXZT8Q4i69XzHpQIgDWh1mkuebDCx7wk5SV5M6miGvVzFh0QJrFrkZgo5O5k="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-beta.1_1586256883025_0.33736154081486847"},"_hasShrinkwrap":false},"1.0.0-beta.3":{"name":"napim","version":"1.0.0-beta.3","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","moment":"^2.24.0","node-input-validator":"^4.2.0"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"2aead0718e386e169bc50b1942dcf956a9582faf","readme":"ERROR: No README data found!","_id":"napim@1.0.0-beta.3","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-WJNPq13WN0cI0Tzm52IYeaH6Zl8UQHtx2LUO+VVCcIBGA3g24SOHr1q2rvlRMLosLlCwf0AxBdLDrHa2+xREiA==","shasum":"79ece2da48904e2dbda7cb4145bd03f96968a9da","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-beta.3.tgz","fileCount":20,"unpackedSize":20668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejYBwCRA9TVsSAnZWagAAXnwP/ikILUUQfSA7AOQCq3+o\nUKjl1d53y5TG7qGcRjX4ILFooxV/WHHicyDaKq6qVqfNaQ56vPKmTwUSO66H\nMVw1/ly5HHtxrI/MF73UAlhZzSJ0bVGnUW0DO0doPXBnpEYnoSRFwhHx7wMu\nR5Quu/BZeEYXMJdfiZBFj06oVYz8c8vJmj20t8rJj2ukm6BmV8U2+Ni5vKkZ\nSc4H6PcXcaMX8yd0GfecC3AbE+WhIF5p3C7kHSqe+SM8aJwd/Tjq+Y3SVxoI\nvlDeL7FDPN87k4/5BiF1/jv0w5UpLU5zFpun6j0pRG16U5m2aY890J2MWF7K\n/wYcN66I/vFgNbLJ43/5dzAOGsDSogBQSYS2SO2cz+fXyKj45D2AP8LZsZ9a\nFXaV0G9xPOhDUI6nYG8KFqc3/I05MAPhKZoIialCyz+6DA4qjo4KMpuX2AzK\ne35LPIHcFcuM5jmOT4bkjO7E1+VEXoEXH1TfAK19Cp+Mlj8vwV2iSiwTmGzX\nY0UHVhQlvvnQGPXmtzL/iUXBbzTP5IJwk5TUs3ScH6wEGzF9bT5tvhYLOBd5\nhWDhUFujpAvUV5Wlmn7ZX8LIRWopZg/+HecQqnbT3eNN+TS8oF5Zj4StMQb2\n0YCMzGmXJiharDDActVoP1Zdqxigsani1uqAjb74y2MJsMp3e25VXOycmARJ\n2SYP\r\n=9uY+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZPnjUy0nfslWMZarSE+LBo7e0YTEcfxXel9I8Vmjw6QIhAJbSeRStaWt8IxJnoYuE0qKIrO1cweizafDGHl4daVKa"}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-beta.3_1586331760243_0.24478248660509538"},"_hasShrinkwrap":false},"1.0.0-beta.4":{"name":"napim","version":"1.0.0-beta.4","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","moment":"^2.24.0","node-input-validator":"^4.2.0"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"ce2f8d5fe182fb4903eb0044c6565340bafe7bad","readme":"ERROR: No README data found!","_id":"napim@1.0.0-beta.4","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-ZqvE71mFYzVkeBZURsxLMhiuJtxvLzOypfUMq4GI+Al+8nibbANIzDV8CorTDlnRSxLtVLoOX5nITmiNrq5Ryg==","shasum":"5e3609b3780a3edeb95bb29866098c3fbd7df3e7","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0-beta.4.tgz","fileCount":20,"unpackedSize":20668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekph5CRA9TVsSAnZWagAAkZUP/3QDJtBhc01gysgnwS1v\npKQYc06S06p9+qv74G6HqWJKhhH9rcm9PH/uaebizdsnHW4jesjMJ/QPWC/t\nWDL7qUbhr6Zj+Ya/69lQlJcw7PaZYqqzgqJiJM1WSPOK4ZlgaKHmt+2U/qA4\naatYazNBCWro1SzxRVpLnZbs5DtipKrjxNg0SMDreYsU+HN29FtHG2mtZfNa\nrkYO83Cv7jVwnuVOIM0A2rsrTCGt5/s/93YGhSW04RD1Od+gIYCSILOhZDM/\nvwJRwaDgk1z6h5x7ErY8phcVXTFro31a9kG5bh0EFE+mD+emY/JaNLeAPyhz\n00IOnW1XgzSieFg6TOKyM2TJymOF9ejaEhpbP8+r6bQ9Y1Uzvh2E1ee+UyKn\nq20YnmQKa30pfIl3rgmVnUq66V1ieyiUNb/QlWicMc2MEYsawgfNOpthQD/k\nKFS5MWgtBLUY50w5A0Tton+SJ0rQ1XCB7PxtHwV95ZDlwQjia/fTCDDB0S5F\n40UPNbzXjFIZNpoYH0NHGyGwxjfBbCL3aO2Wct0xkKteAFcHJ5OIzwcBFuz7\nlXHj+ERU8FaivM7RqkuSJFTi+wVmv1I7rzxl+vYKk/lxVq1EJNsOArAaaAG4\naAfuQ2FpfLS8JSYAuFPRmuSv499DLI5Fz6e1fcXEL3APRI7tSSgJoX/QIZsI\nL9uE\r\n=efBn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIUceWZCCdyfBdhYwsDuwaaIX667IsQ3yWbMVVETNnxAiBAHgyfJZdSNhe76PXR8K9vbFVE/L9YxkSYnsqyjsa/MQ=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0-beta.4_1586665592843_0.422796561361783"},"_hasShrinkwrap":false},"1.0.0":{"name":"napim","version":"1.0.0","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","moment":"^2.24.0","node-input-validator":"^4.2.0"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"d51c53562bac70500187195859d22535199ef82e","_id":"napim@1.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-gCtx+RGo+0OlMRfQZzKgmUH0AyTuErOyHdDE9bCjUECAszMy4T/NxRFPyKY/T/3xowrZC/DAsOLsgqEldbzuwQ==","shasum":"487ae2d362f0a457266932a26ac416f3edb52c69","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.0.tgz","fileCount":20,"unpackedSize":20789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJem9WZCRA9TVsSAnZWagAADDEP+wVTtfWjglEeg03jjKzT\nP/yRsRTUA42N7QTrfsnfUKiMBLbBC6geyKNmK0X5/Q+QhYF4C4lEvL/0BDnD\nnGyBzYOciAgG8xTGZS91p2IbEcWmN/8tFo/TQZ4mTBwmDnhfUX4YB50D19Oz\nPsOJBGit+dx2ol8CRWmyBa4AiPmTHcRuOEBV+EP/Cic94IQKtU2guZHKeROw\nBtCFifCvrDnzfyo5dpc6kEKEmMwAM3vjRpS7/n4CwmUMjnGsF6ZYaVa/B3o5\n6MsPcql22Pem2DRQAacpbEcgWtD+GiO6MLhLGw6JQL0uYWwOYxw16CTuD0Hd\nGbibLJniREYdCtpVN+yYYoPwleau9ptTbEMc8kVl3U/zM3nxVIz/FNc4hD6E\nfZBLdP1bYPEllv9jVTy94zxXJCZ8uR9ye4da2SZHpkvYtnK8Luy1cWjdj/OV\n55OYe/bFDpPvAdJ04UtWh1hPbWwT4US4Dm2BWVeXUE/Anw2Ef4yRgyuPvJz3\npnPiqezXDoSqSEPgfwtFigMlmssN4dFv9m3F65vRSzmhjecQcp8B7fwhthWv\nugFqV3puH1G7gBwHJ460qPSL0D31nCYZeqn9+w1GYefNvY9Gu73D/STrvbjR\nGT2v7DlXKDRSUgh63KFY5aprZkkFrK94s3v1kmOvk61d3etVW/tnH+Fup7hu\nMKsj\r\n=W8Hw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGjS/11b+Gn2o9/XGCIYHSpWpQk8qLHtS/2I9ME8REY3AiB+Fm55SJmbn1rI6CoqM0Bd0IwVMrFNVA15wpYYwZynvQ=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.0_1587271064652_0.2738878424295048"},"_hasShrinkwrap":false},"1.0.1-beta.0":{"name":"napim","version":"1.0.1-beta.0","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"fe441e9a1476083c139139e54142ab964daf6347","readme":"ERROR: No README data found!","_id":"napim@1.0.1-beta.0","_nodeVersion":"13.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-afdsGNBYJAWed/UmQK31pX+DZWWsV6m/t44OmI6eK4hj9hUWWcS8dfc/Vdw327dHU+uTotr3YUMdo0Ub+wMH1Q==","shasum":"9e1fc2ece88b889eb6cddec147a8ea5d17f15053","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.1-beta.0.tgz","fileCount":20,"unpackedSize":19984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1Fw8CRA9TVsSAnZWagAAbYsP/21BKxHj/yz+lvxk0S4T\nVDhRtAJspGJL+nDCBtTtFkJmH+Ce/EAgO4J2QbSywfMHI4y44nhQWSFNkXdW\nJXLDXEb1rZfreOKq0E65tU4ZPBd6cXlXafnsqBj0KKgEPyDE52B41otNSOQZ\nQ3eVN9M45oAJ8+pjP8Rjb7zYbEXkrP2g36v7I8X7jsRJE46x7vQU1wbh6lnt\nyuxDz+bHGnhJPUxOAOd5Yjk62XOd+syEeDwb5LHqzw9XXHMikGfmJLc99T3C\nBBuZR4J+zidvkXX6hsk5deGjtcgC/qZ2lWAh6bf+MC+EzFI89qWYKCcvz3BO\nhH2yUdD5TUpzEMH67aBv4cLpygATRchQJcISajoxC3eTptoa1j+wLHIrhLB/\nxJ124QnmPq8cfNC6CccmY91m9uiYgLkW6utrZr5Q40BCIywTY6J9YR8vtM5N\ng+zrGffzrRJO963wvOfqqvQtNnMsyGsagREjJ5UROWgXctZvzlA3ysG50I/F\nWm5XuIEx+ml4zVzlO7QGv+UqMXlE6vpVKMQxQhQH2l8oLYgwiS8N97vBJHq3\ndLRXxK7ytQ8W2Y6DgRjVhuS4EI8pLzwpugpk2UwzUm4xZmEWC/vQk/2z2DPJ\nNSKfH0hZnRBZZC0A5ieNhfA8ggIHNN/sywkFyoWLJjysEFq02Rv8ev+3wlEw\ntJ9e\r\n=pMJO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRIT9EJWWN5BHcLDghycfTO8aeFeKdYrZsGEG1PkVKoAiAI0izAfxx900a6y0PQLTDwJrZWqJ83dU4kXrE8rr+SXg=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.1-beta.0_1590975548383_0.817242843876685"},"_hasShrinkwrap":false},"1.0.1-beta.1":{"name":"napim","version":"1.0.1-beta.1","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"4027fc1d09e0e63f252b8c1e2234e39b8335682c","readme":"ERROR: No README data found!","_id":"napim@1.0.1-beta.1","_nodeVersion":"13.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-v7X/yDRpdhl8TfMn6BjQ3d5LEuMmJacd32GFHbzrIWpX4OLeod0QCoWhOWDTJDlpQLkTc4VzwEl6ruQ0p+N+2Q==","shasum":"4a5447d6bfd9f3b9993b80d22f21eccc16429f96","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.1-beta.1.tgz","fileCount":22,"unpackedSize":21163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1IEsCRA9TVsSAnZWagAAFDYP/iZxjBUNrfMc2fsi9jkM\nIBVkUuzpj2OdldVunKMEtaTkG30veeKSMYq+/RiIttz9TmGgZiVm8+0uDghn\neQoK1Ws7fzG8FYBJr9Q/pgu94HoH/F1szvwXwwMp1cGmBDlI7055pAeTzWT6\n7uipBNh78yXPo15ec4illsKyDE4QrQbVys7mwMprAeVnwmCA4ID0WtC9pNb/\njy3tWLGZz64H3Jm6SaGueHo94B4DvrcA+UpNPofylDKNjrdAlCKZTQpGap5A\nF6sZTacRkRCg0bF83BG+ejydTvL6RlG4pqbWnK7oQv/liNW8uAc/41SCk0p8\n44tKjCgqulMHKgMa9DlbJ9LWkEEOKxy8oA5Z68IVfFWwOLMSI6XSZv7Yli8q\nUxhznF5+WZzIq8XQj+OIzuFjcA84kNSwBuhNSCQPy4HNXJkF/+Eakcu8Ns/U\ngr3iVkWeEsBKsVOgPz5tFIMgYaNta+VQdBaEovZH2bJsdR+CutVkgH1fCWw4\n0Af2Hhz5LyCmZU62i1CWaMBUhsLVkGei0ZVeVAq0wlC7JnZhrQLUFp3E2LwH\nTD4qWseCNgPJCRusJFSnj2UMMpIaIePIHWAU/SmBAq/6sngqzVF88obaLSsv\n8aIFY4VD4aGO5anqGSZp/WPY7Js+gm5b/c5esQowXopLNx4Bj489cPdv/4px\n4AFg\r\n=9Ky1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETqjYGU48uDTUM6QmniXh3yTNJpMVyKsiddhjWJXrQMAiBN+tNJsKqcUcuPqx5MwwYTP5lbjufztYqlCRiEC/gmKA=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.1-beta.1_1590985004178_0.22337775117873937"},"_hasShrinkwrap":false},"1.0.1-beta.2":{"name":"napim","version":"1.0.1-beta.2","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"1a43b595d93de663fe3e723d7532d0166303150e","readme":"ERROR: No README data found!","_id":"napim@1.0.1-beta.2","_nodeVersion":"13.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-XDo2rj8Hu1dnsJGuIozX32Yy9p9woLoyE8E7srruAqalIE+j8KdGOGIO76ijc5osMQWSyrJ/jnCShSWqEDUzDQ==","shasum":"2ecad6537c754a2d3305e2cc54efd8705b71ee0e","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.1-beta.2.tgz","fileCount":22,"unpackedSize":20993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1KXxCRA9TVsSAnZWagAABl4P/2pK+TIYpkfUgT2jplvC\nzo1Dynz0oCBsUZpszkdgpypfLQRTMDs5SVVBj3dG02C7tXEZSTt8N8VIUZhd\nID3RezNItKamBFVDiHy2FqEDdSzP5RBLNcNtH3xTXyrtg7O4pWG6lROR5iw6\n2dZrlKPdI9a1J6ZdVy+AGfBtz+ud0bxNJmLUpkLSBKUQlT/+aoMXOnqhGD53\nh4c7O6jRvMW9ktt7aH6Vg/f307dQq8w1ydKjnttg5LhqvSTLrmatRM6lFjCy\ny+KPjHv5ljRvs2mcM6KixNGp03OmjW6v2lFHYA3RftPEwauMry1GRa7+xfuD\nBs4BSNhp1ez5X2TGyDSapC3Jicfcp/F/xwoYWebxYsCfMdJLvxBTHbyLqQXk\nkUi0532mI3n3MjfU9E2u6903dgT6lE+l+1Cu9rTUkw0SN63e6d4O9QDvFhLw\nIRxNSDcJi3CS4XFoHyWwpw2GgcY33g2SMgMa4F8wNfX+q3/Q3xbRUHPUuEvs\nspjPD9iTqyVZNUNzDwDFbAJeep+9drui7unN17OJuQKyEmdMlpYtyAR/LheB\nB9P8zKfaCOp2X56CteAF3CrxK4bsiv8Ue3dZm5+tA04t7gyYFIt8ziVi6CRc\n/JSqRNXpvND7pwAU/3iYuCe7KYaZuTCNLYd8fEqxfrzjK+tfEKDK7VytFkuW\n97bs\r\n=u5/K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF184jT0tubMpPgmkuTW55zfrZOfkEK7i38sxDNcn19JAiAzGESPSwb0Mxv29HDTUE3a7PjxPNziYBHPJbWsmfBobA=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.1-beta.2_1590994416571_0.8145148950329499"},"_hasShrinkwrap":false},"1.0.1-beta.3":{"name":"napim","version":"1.0.1-beta.3","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"2439f85ec9d0556bcbc5fe1578c86fd4c3739836","readme":"ERROR: No README data found!","_id":"napim@1.0.1-beta.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-rtqlKNW74TWmx7OkJt8bykrVwqrAr348jXk+2ymZQVSac46MUucWNCsNuDyBQ4GE8hycrCm9W8FWsfbZ57P+Yg==","shasum":"90f987c58e2337e98c2cb58743fa9054f7fc33aa","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.1-beta.3.tgz","fileCount":22,"unpackedSize":24243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMW72CRA9TVsSAnZWagAAWN4QAJp6RdposjT2x/Rw5TFk\npAM1+pI2q/jUDb8vLxA8YLQie2pWB2hWeFiqloK44Yp/J2dZkuCeKF4nWrZH\nTeRfWja5/VhEAne6xqNNurtZutsz14sZWcSjnWPdoNkmcTSBGNmjuKTbyhLd\nOgh8HGtMHPVjbvLXBqBKLD3cPKRcAC3yZqsB0BmECWeshgc6hOfU60jHLZ29\nav+X7KEWuiw/UVCIZADLpRbwAxGOIYBtluJjMViIxl+q7gk/eIr3N/E6S6LM\nwxZru2TmAqBOtKcWhrp0pvfodEUY0j7LijC4CP00v+r8WD24oECyv/GyJuzd\ngeETNcwIPgZZ84LJcG6MjhWrMd+ImLUDoSRly555pZZEypwZkeXtf5atevP1\nwdAyxcl3I6/uFCxlkbKnI+mVcy29Rk2IEkjV85jJL2U+eXyGNTJwf66T1A2E\nrxKzRlGCT+PaT3mKJ+Loq9rmxz51jtNDrmVeyhSfGWAGnWyDWl0nh9XwsS8d\nh/b0DmLxx7sDggNq1isVxPI1hQmZqDCTj++VL9kF6iMFngvWQIR5VEVi3GCh\nPTquh9OkIhu4OTkRMvjgiqddyMFOVm1w2oQ6ep7DXAOCwXJDGOUqikSxlDnQ\n1U36ambEoOZwZcGOR96Iht9DP8sc9mDlpsOX/V1yGYEcgIFEqMwEXUS92t/v\nIlHi\r\n=HMiv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3976jFVd32ItkFrFqr4vZzwOSsKQEuadnMwUIuVXsoQIhALsC/U+lpxqdARoxQrPU9zmo9+FUmTwWiJRjy9G9/Rly"}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.1-beta.3_1597075190372_0.022189320612666652"},"_hasShrinkwrap":false},"1.0.1-beta.4":{"name":"napim","version":"1.0.1-beta.4","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","knex":"^0.20.13","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.1.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"985f8b80d8528d898ef50e1846b488ae91d18cce","readme":"ERROR: No README data found!","_id":"napim@1.0.1-beta.4","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-amCyJ3otlsQp87qab/u8LcjHur3KIIv+2nm90wOVyXHRFC+p6WQRcmuWCZMnFWmUnduMLdsavhA+tnc6QRPpQA==","shasum":"01270ad8ea716121cfa1e45def47fb8a1e8fb1f3","tarball":"https://registry.npmjs.org/napim/-/napim-1.0.1-beta.4.tgz","fileCount":22,"unpackedSize":24260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP4jRCRA9TVsSAnZWagAAex4P/3H48tndjI7/xQSC3fbX\nRWkXUP4xRtj/7t6phE+yrj7IDywNIdGmGQrhU8zPJtUXE3ULtcDGRQfV/g5U\n2Y/pjyAqLPulumuFNERSzNf66k8X5VYc1L98xIEctT97UClw6JYTi/3Y9z9d\nEoueag2cHQowflb/SHfOgaZbUnrcAXKiYjM9dGqffxrzYTeIdi0ZYasOwiog\nxP0JQbeBBr/6BPgTK1EBiu7zuMkAkqBUbRNzkCmdjvTd6Pwsmn/epo/4UAFZ\ng6HPDc89mURBqTad1bmQwrXyiSA6KFmuCe+97WCaLiikEwiaI29Vq3aNyzu7\nxdcHP0uyc3odn9DpsjM1rdU6ZtOZ82Cv9QLCpKzUDxmnOEjFcywZEXY0f4Ff\nMuthohHs2c1/Rra47+xq1tjpMallcYpzWSq2aG7zx7YTerJjPpbrnW6VLzLk\nEakOJkA9yI0AFdMZoKCfMfZISF5IvZcRVwo3se7arRNvuOWs7yxD8PE6hAex\n7nts7OSgQ3UC/6OmFJGciHbRNlBsnz2DtEP+XOBDFmSjDxGgEQAfQgws40Nx\noQw6z3cUM/KNioMd9fQq+JA1lcatk0s7+D2lromNSLdzEFXcl4WUMQzWwaX5\ngTWloOCa9pT6hcYQeuy877FA6U+GBz0qSa/SgZHIpTELiaXPcc+Oyh4dEiba\nKz/N\r\n=UnSC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA6KM4Upbqcjhz77rTVGeUEaFh97iDYSi49o9N4nnesoAiAaeD74/DQdVtN8gO0lLzw4iFfFABwIfdXrU7IZSfSMXw=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.0.1-beta.4_1597999313410_0.3404205312595918"},"_hasShrinkwrap":false},"1.1.0-beta":{"name":"napim","version":"1.1.0-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"cd test && rm -rf dist_test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://gitlab.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","bcryptjs":"^2.4.3","jsonwebtoken":"^8.5.1","knex":"^0.21.6","mongoose":"^5.10.7","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"754e205e16b3f3698d768074123f8c9bd9f7e7a3","readme":"ERROR: No README data found!","_id":"napim@1.1.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-CVEiuTqrhMI2eJomf0abWicmPbV/PrcZdR99ZB0gYEeQmhgJqYY2ysxs0ZDdgUwXGsGxkHrzofJh1YdXYZ5WRA==","shasum":"8c8a6ee9f2c2881e2acd17ad49f59b8068d82035","tarball":"https://registry.npmjs.org/napim/-/napim-1.1.0-beta.tgz","fileCount":23,"unpackedSize":141402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdFIgCRA9TVsSAnZWagAAmncQAJq8bfPaQ/EFTt9eOMuQ\nscDzXr4EYkDizSao7TQjsjzGGWvaTF26W/+aHPcNdIy/3ELrfGjd4hqNCBmh\nWkEPG1Atm5b2avntaE6W29tpTTWWbOC/pbPmxEkqC0BKlN+PORI0A65XVWA7\nyUPxftE/+Gy8GrO2dQsDej6te45SeZ9r8a1ad39FAb9xKWt3VDIuUJo5C2Jh\nyn552GnC/9DjHR8PeJy+ZIXVcwRNvstCzjGacunV2WwCYr1zO4MTKL1Ug9vw\n8hl2XDWwaPPySaKkq20bOj0Mf9nUE8R/OXinSUAsZJWH2aXh/LTQRXecVw2Z\nadRtG+LBnDhDeRu+33YpYbTO5FN3zZR+q4YCR10yUBkycIuRlnuF+tsJXfOK\nSx+t1LQdMGVrUgZfYLUUK0PvOLd18ADAtc8qhWMAtt4dpHH8HNu4pGYAeSCr\ntAgkpdL7U/5Twp/RN2n9h4Yu/b1UR4+9FVWHIg7K60I6HTuVUTmseps+B0Qk\n4jvJixNgPhqfwRpPIcCIqlocZ8hW9jBj+OEEuzRy8eVd5hh4ds5jSxdhRIPa\nsmgRhq3u4fi/dOIfpK9FjYbMQsFFEzre6rsujKxHchik/GuQP9LZ7YaWPSHW\n40R3JhlaN58HJVzlmkFjpYhiQ41Kd+2BcrF098JwqBy1crzCu/dy9yqpzbam\n2eZP\r\n=u0WJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDhDINLbVVZzehNoIYZtZ5pk9MJ3HggnTsa0lsdFp3KAiEAxhb/VM0LqW2JzMPuOb2n/yTv5AdRp0xy2NJQWVo/quw="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.1.0-beta_1601458719604_0.14250982533819134"},"_hasShrinkwrap":false},"1.1.1-beta":{"name":"napim","version":"1.1.1-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mongoose":"^5.10.7","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"0f28a6eb133e99a2f8bac06dbca4cb4eb76cca4f","_id":"napim@1.1.1-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wi8MYIc+kay51bx1cO/pibxxVQQQuHoGWWVGXgAePCidaovtSJ+9hsCVON0vKxcyFIPaCCxEs50h7BUIi6WdUA==","shasum":"c08a7849174129b3b4146070c89a7811dbfe883b","tarball":"https://registry.npmjs.org/napim/-/napim-1.1.1-beta.tgz","fileCount":25,"unpackedSize":147912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeZe7CRA9TVsSAnZWagAAjMUP/3rLVf9uiTJ+MM+LScS6\nkMHJ5kSPYB9bbhe8KUa+sRJfUEDndoho2y2jicYyIwYVf12DoRb8QcET6SOA\nPo2Lljd83y4uVhqcm8ImvgoeUDF6RiRg+xjHVJwPyJiVmzAKcaxoqMJ7C+m3\nVjvzJ2byPNEi5E/1eb9914I4l6iPGREQsiO42uQNmKxCBlE7MN2f8+YIgnA1\nAqR3FTyvQgjraPYJNJK229t6ky/2d2Ht+64Rbh7/lexRDUpJenHMdwwAAXX1\noKqCMtOQvaOztIUb4U+FQ76o1L/4N7RB/dJ7VNhnj278guQIzJZNSIMGrK4F\n08IsODOYjO+Q49KrFLYNHN1qcDG3ZP1eV/FtmizaurWWsVX/gCeTdpAxR/wT\nkgHQG0TjkBHhCkEHGSy7zTB7mRqcPolsJ3BDDqgd6RnydiyA8RvhygmjJvKX\naS2yeS2R7fRW+HqcfSBI9EJ4WcWvBAV8aEzZdXEHsK1I0YV34JAa5DA9Rjct\nSRhQNQzX7h/JDGKW1m0SaDPSBNktEcZtX3VtUwbkRk4T9CXu0j61wCVDLx1t\nJIQyq39GX7KLNx2C3O+URnc3uP7VuvTgv8sicSc62YwK3IrkAUu1b0y/6eUI\nea6RqiXaCJBIFAYzBZz8Eq7I7C/H3xBgguWUvs4Q1zFZzOISvRpyrA7CeOUc\nbFPs\r\n=QLzv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDP6ZsanDPgeFTQJzEgWjn91uxuce3RxJH+H0byMT0r9AiALkPEta6ugT3UGo5Q5DRe7m3fajbVl0IWWu8LVP6/Azw=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.1.1-beta_1601804218808_0.6866470254490848"},"_hasShrinkwrap":false},"1.1.1-beta.2":{"name":"napim","version":"1.1.1-beta.2","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://gitlab.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://gitlab.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mongoose":"^5.10.7","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"ea0ecec14076eaa706e66dd57173a8bfbfde558d","_id":"napim@1.1.1-beta.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-hPmpggc3voBmR8nUFppmTQu4QkxmpCRThe9K1lebz9KBBNDFXKbZKKYEkY49LEUukc+/fEz9qv4SvnI3GDg09A==","shasum":"40d964463d6e4a6e6c93ae9f8d4f5f5fe5a93d62","tarball":"https://registry.npmjs.org/napim/-/napim-1.1.1-beta.2.tgz","fileCount":25,"unpackedSize":148707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe6nQCRA9TVsSAnZWagAAClQP/RDGGGuKphN6B5b+MW9l\nesF37qWnbhpyFLTs960iXQdB4hj7pN5lJ7ZlEm0Mh6fK+DTKa/VPfRKn0f9g\n4Jx8Hwchr7z3XtJUloYIP9Vy25faMEAC+/c+N4lDaK4bwT8Ae7ZbCOw4Cutb\nchPM2SWcpX0x8Ng4T3e6WVSNkdCQm0i0/01nummu2BsGQTIPBXSvhHwdkgZB\n/jHuwNB+qZ/N7Wa1rGmyMwuCRXK79PohJPQLTbE5xjevlIsiBk7v67XwWC0l\nOXWBQ977J940JgdKd3E/xjz0Ml3s5zoqzD+70pNhhcHVgH/HXj2blTl3MLwv\nr8F6vcoFpEQECbobtrasyiqcuHP05OgFAOK4Rft/fNNJyPfvRudt8jDyCtX0\n1a3s9MJm9DHdvQOLdqPqoTWv+kj4yz2feIp0dd3xd8xjsLs2O379jGyZKs7s\n8TZpL84xTjL9AI47BkOujYyPD6dlcjuIg6i+Bk8eo2NkgXYDYDUJV3FT3nP2\nAz+nwezatXYZP6J0y+nxpLdUC2MDVyAfkMMhPO1rELduD47jWOHgPJtseapP\nJ/dUQRgvvI8B4Vk8ekC1u4WEBmjK0X7ETGOe/wwvgyrE+YlWgVtoNoNpFU+d\nm+Qw3IYSFys6rppSvvR7T90lTYQNaLhNc2D6ONLPwHvFUdsDsryx4wNvc+F+\nWw3G\r\n=b/ZI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDucl/MzMG67MGIrmqng2HPJ0HTolENJSt1Xvjvir2kvAiAstdo2elVjdjYKOEDSZSZPxk6MG51U6mXbGrivF3+Kpg=="}]},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_1.1.1-beta.2_1601939919797_0.08405592685602037"},"_hasShrinkwrap":false},"2.0.0":{"name":"napim","version":"2.0.0","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"fb2cf92e0686b2ff5bc44ca89c9b2127354ae294","_id":"napim@2.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-9kdlrfcgL1VSslUde1S/Q99z7xEkgtU5bqLEA5MPKv5+JOsgDXQBg9ajT5bZ/glXxbU2ghdMHPCOxervOfs3dA==","shasum":"5bcc71871577e5896699b8e3ff8b02ba290396ec","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.0.tgz","fileCount":25,"unpackedSize":148596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpPLBCRA9TVsSAnZWagAAxPkP/0dRFEIVsWb3sSfwBIjk\nLdzalDHilwmagLyVOoxwWS6APRb4mdm1u+9tI7Hovlc8hebIpkQzobTl9n0o\n5PMGeRHYpkpm8qv7k5GL7K0I0boT48x9Mw7fNw2c1g8pdFymr6clgRBMHRuL\nP0/2rfSZKOioT2eu26J7UYKH4iDrujeWoF7lCwy89Jzfa90IEsA6PUCeWplF\n6IPb2jax+U2Y+udMpF4VOsrNflRdtmw8z0PlsjNmM+o/HN37KdSpH2Vmjkq+\nS31yu2PQrYO6i3HomCaiBsP2v19WUe2q4WmE3s9uh+XN4sgxcZCsCtINoLxW\nWlydocPajp+tNfRacavhCOyt4fzMHuvb7C3ZW6nt3033fdSZNBzzhmVfhmwX\n88lQJfnzfXjz8P85JFFO+/iS5koamC9OFYKfw5/1vgyw7+/xJCxpADEQGgEz\ns1RS3owsxhr9/lYPO0JbRqVwuImWgHFjJP4OHEL/qb9+Avt5Ne1yP3HCftfZ\nmsP0XCo+c7WvvXgvTyuS5lTlcrp/FpGT3uGMaBlWnX5xI1saXWOv60JD7Nx+\nroNH6WVgxe9k+APh1VK6N40ATthJNw7XIbCgwZ5eSUwPpF+tOjZCoRWILxOA\n7Nqgcy/GOhBrzitIKYJXSvHqrMkSfKgAU7ntAE+NH5d1MPEnXVkv55kZiCVU\n7WYq\r\n=gf6y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFC5Y99Bbu5EQmR+WQY5wWGHhg32+79phVjFXnCDt0slAiEA33P8YKUBCompvqqjRD3JiLTTT4bDocSnX1FWRJ/OD5k="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.0_1604645569035_0.25735552975261"},"_hasShrinkwrap":false},"2.0.1":{"name":"napim","version":"2.0.1","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"52f3b102b1b3eaee74e4d4f20cf917f3c7d30fe8","_id":"napim@2.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-KoThqM6La1dZbqlxgk9ZkNiCYD17qYiPIZO263NV2MxxLbisOBiOLC5wIB3dYwFm3FINNg5936rdaVdfdoV0IA==","shasum":"898822931c575d70d18280beba9cab11e41ce043","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.1.tgz","fileCount":25,"unpackedSize":148943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8EeCRA9TVsSAnZWagAAiK0QAIEnp+Qop4kOq1LlMsQV\nr196eBbnuD0cVZwdfCGm1nFldC/1KGpPc0Er0zpVMXwJaiTEfzjIWt9mqXWa\n82K5Mf4DGNeCgDK5SfFPacDIzIsU3l3F5utznXkL4ZbQp0TTqH/8EFcn+zCt\ngxTh0YN+l5iELOn/xkr1E34GXx7oYoSfoyll/if2ACnZa9u4ESGJ5arWMJge\nok2XVKNWgFLfsRfGLfSX4AQbinyipIk7C+ONDJcD7oRj+pokZUWeqJS6ZEcs\nchui162OFqrTtc+51beaK9sZ15lGpnOPPeVw8KgZneFcwpmRpJ+/laX7f0t8\n6ByQvf9ZseN4UJsW4r8wLaS1Zr2zeB9OMeJun9niIQCpunepM8/SLgQ79Kk+\nypTm6+od73t0O8kzNSYF/eKqKvi2Tb/C72W8bgYoEBLDFx3oWI/i2BWfKgOk\nMO4j/I/79fMgfho27qTU/UYlXv0u0qxQjV3oNP5xCLsM+KHqyxgUlw1I3Jfy\nbw18g4PcC1vquDy/33KvwUP7jK9Gc6Syxflg4pzkArR/+hzxwJmnLdfehg3d\nf/lZUafM1EipqMR6HtNjSNmeGAOR8iFfnpeqK9RFkrdvpFI55U46plNzXhVf\npZfaSpB815/Ytjzx0NrASmkaPmQICbj9790lInXPO2AnGQVpUHO5iaLK0FaA\nNxSQ\r\n=blT+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICsLlVFW74LqYfdk1LgdvFbCnhH9e+0y09vSEKoqI9DtAiEAux3XrlScgaEd4StuIp1g+7R4uYF1wBr7mYvYFUTDCFY="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.1_1605353758080_0.7709023716438217"},"_hasShrinkwrap":false},"2.0.2":{"name":"napim","version":"2.0.2","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"cdebd86581ef108c69c3e38dca2854ad9880a622","_id":"napim@2.0.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-BTS3luHdfV69fMMOSuG8A3qxcfBB4W5XGY2IFXDe+mE/v3NA+mhTWpbkLO5JM0CyCR/7UIxL4WRSoBk+IrWdBQ==","shasum":"493a28af7c6d383cfb6c8e3568246ce9e613d3e5","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.2.tgz","fileCount":25,"unpackedSize":149158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8IyCRA9TVsSAnZWagAAThUP/0E8/I3oRiB2UZPLkKFQ\nvL6sBEphJ8PU7nwmRb4FNpsRhLBmuI0h1JYfSK/7klTc9rvtc6amkai0zi0A\nTSlNRQ0EDtMPyhQPbwAPqupW27+3XDNz0bja6oOebipgA/zq5d8uLdGq1sGb\nM7Jq1FzG638k2h9S6NYUsHZAoZ7bGVEuSTtARvjMpfBgkPorXOdLshI6qp/2\n1MY/Sl/1CapCZcLrUGEjnXEXU96rVtKNz7+piupMoCwLtYHjcy7o72Uo1Hke\nY8hxhr30Gw2JRq16JYSDR0MIAvzMKH0JzRud2spGtm0lKAtJGqWsCy0ee3LR\nql6pGWO0Ebf3COLXi1nNOhX/SfMqMI4mivB/NEAmMVmxBPB6TKIjOQqjDqdD\nyhOxt8rL4u7s7veMS/XImvMLcyPvN3uSdTStGzp14iwV6N3huoWtFN/ObPbx\n+tP6mI45+p+lKs+7/6wJ1ZJ0OpEqM2FBirslNsZ4IklHXNugLMYslfw8lS2X\nacuMo5vKHiOUX6UQjFMe9oEP1I1nHj9kDzIAUGKzsfMVDhaZZmbpluC3E9Y2\nxd5Pgs8HKQBnuHTBPV4XUtoDzkBJjelAXH6wPpUV2OgAZtOOioj3cUHPW+uB\nljswe/umC5Yt4TCx9Oud9Jv03Y0gVh3NeHaGxkR9KTPxsNLGKDs+gVPXXCrE\n1lMS\r\n=tNV6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBD9uz/3wUEk2pVdoeukmQovmzq/MavRrYb23r/zDVYiAiAStzpPmh8mlPSDSyu2a0Fl8Z2KHxiDwJ5iyGiMDIR/RA=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.2_1605354034112_0.20550115604682961"},"_hasShrinkwrap":false},"2.0.3":{"name":"napim","version":"2.0.3","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"0fc8213acca12e6fff2f235835b43aeda46d03a8","_id":"napim@2.0.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cTInPhPSqBzqpa8/tGQMzcWGQmnYlq4VL+j3EBgjL6dvAX3RaEVqhMcJnJ7SffGjOkV6YswPJX3a3CA6tkJgfg==","shasum":"ce7d7af88be84b10069a055f13844c53619d93c2","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.3.tgz","fileCount":25,"unpackedSize":149250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8LLCRA9TVsSAnZWagAAbqkP/iS50TGcjJRjXXIr0dkj\n6ZmY5QYAZEU5rMLUg75A59xidUPFAq3JuP/0TvP/oh332Yxra2Hp8asQ+6sl\n+9eZroBILyyiTnuWNMSrRZ1JhRuHHlKlekLwUSf18MGkhgzA77sZ58WP+vP6\nFpDZ8HK8wFS6cq1aSZdxtqoJ77noWJPeTmYKphg65PLGOm0MCnTjb9sweIzP\nGUfRj2HpbyUFDrMUnLcwLuAC+9FU2P0rAB0uzCRy07IUn2EsgLB+l+ihquAQ\nPQSBD5jxaHs7Irfqd1MNY5haviY6uDdS7KV5uOVSl48HSu89fR43Tx4B6aM5\nH8Lm6rQ5EcJ60M0K0V+BBFEB8EBNageu4JqHPjYqY+xBX6KyDkeWVaRAt1k3\n9hbyj3a3rWBx7nnADXsgUbR6WwgxaTWNPhEaqZ4FNOuTRJ6EWmmZ5nma4vL0\nc56F1uubYVqioMylf5xsvDlnox9XewjN+2UVL6jGQbAL/q+VXrjWmgRIkAt6\n6c3Po2sjrZIKA7bU8zXPz3AuYYgmq9bF1ArhM8/FOFLJY3cDdWXacS804kR6\nGd+jqP3eMcPyuVwCUdylaPl6Htuzh6l5SIpJY0be5lQ5pscXiRTrh637o6qv\nQB6BsdPtBnFLpiupMUdftNCeb42ervKcf3Sak3F107zD8SbOIKiyR9t/PYhq\nphpv\r\n=AGO6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJ8BvfeuW90xdSh/Z/yXsUKDvQhAY/IdH8jR7uFDKZQAiEA/7tfmhhtu8mcAm0wWTillKZUfTeJh1b7zOSI53yUlR0="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.3_1605354186639_0.37423660814055904"},"_hasShrinkwrap":false},"2.0.4-beta":{"name":"napim","version":"2.0.4-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"1da57c667b071ccc252045dce44a66c986fd4acb","_id":"napim@2.0.4-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-nLPERJCxISNBEo0ZmeAUhoYSfNBMZ5PpsmxscILZ2diZusywuHVY6dFx0ww58/X0USccHN1AlsN2kuZjRbzNQw==","shasum":"bedbfcae8b58d79c25af18994a55b6f6c1dfbb5d","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.4-beta.tgz","fileCount":25,"unpackedSize":149642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsUBWCRA9TVsSAnZWagAA3Q0P+wdPBCw7JCgQyYDk6gF+\n615O8sOHB4egEHvYW23HKzSoNllUhJOjPBbwfF1Kdwrxf4P9dCZ4xnDl0WRL\nFVwz+U5bjXgskm8rkEddBy2nsa+AJA+9cX/Wn1YhP027xifgPo0OGZssAs0G\nXEqrd05lJjZhv2QKDu6Yc3ufwOdUtpyT5XBbCZ8Vkp4emtSes8O1ZtYBX2Hm\nFKjJe/uRWZ5X5HsSv2acUcyY0rbBUNNafoYekFEr62vz2TL5ipsgYoIl85RK\n9utA/g1v+jjFhPoMDlptoGsK+6g2L1qcIFWMO2aIk5t6sH5VBk7TH1MgfNkj\njAearB9pkHMbMpRMgdxCOPET1wTBcG7XP0T2cf3gP/pHgCL2Sbr2Pu6IjxW7\nECLTXFvTLsUDUl27/Zo9BlvXCrdovc/SCsbPJHc7vHbCrG/tq4vfsE4IQSWh\n3ZTQcRHaK5qzI6GDm9iaUSQ5fCmVruHIemGr9NDVOQSvrxQuDkBHXNMYJrIn\nHGdyWiipeVowOeR5Y+OD/QdKvyF70np/eoY4Bf+Kg3XhGO9KGi/aeds5ykld\nAn+swbxBKudO6WinF+97p8CpZFwIfHNFmGk07AX2R1FZfU2jJrt4J3ZkVPFw\npD7vmQpoTxG9wR6/gKSMHfZ9t0SXfP3z43RoTvXufJxRy2vJllfYdF1pURtv\nJKiR\r\n=YayM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIM+VctvhnLw7/D8w7sd6/CDItZCs2fCvMVX2V27cacAIhANv7htwdLgdSgLYECWM+xjKbMr+HIDz/FxOIeSK6Vv8v"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.4-beta_1605451862115_0.285082005312149"},"_hasShrinkwrap":false},"2.0.4":{"name":"napim","version":"2.0.4","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"dc17887242cdc3cd35d506802ed05ee32caf55ca","_id":"napim@2.0.4","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cZw6CliUYufPBNr26V2pIFqfY21pG4XLhyALe1fLZxUMUFQtHD7giG1mXOe7Qy42of1eHtSj2uxufPr48Yrc7A==","shasum":"a82ac38014f99e42b4bcf035b2a83041295209e2","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.4.tgz","fileCount":25,"unpackedSize":149686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsUPhCRA9TVsSAnZWagAALIUP/inhooIZC3YAq3ynX1pY\nhMw3p9VsiuTC6ZubKiVQIWYx/V1NvzdvpzOSSLFxNGfTV3rgahTzGX29Dy3F\n64w6aV04zDOl/qtdGqJSe7BpLrbba2kTWtfjV49sNIV5O/2WTk2ZI7CI+32Q\nNX5nfi/gbe5OYomDJYiib6gm/HtOKdQGYMPUb0AQH4bdA+AmJnURP/+mH1Rh\n28u6v7de7dAT9mCxpP8vU0UE8KKiehkR3/vL9i6d/XbhHshWiakDprhShHQo\noibJw3PKXuoy/XeuCTvHjlNm2hb3IyzD1BhV7E8Und+om5ojRw21R7QF8A2l\n5QqADg/n1mBngpV2Jib93E0JCyRmO6158l9qfM+ILYob5YorXxfqZnkbtAJM\nzijBR+k3Ie+FUCqmXnVRPLhx6X9Xf/TQuflycbB8Rda8MozJse3A8VzatgZ5\nLVCwGICFLG6Re5dTwqtCBDWuhRW91a6BoslNgR9B71ji2HPTULoEad98UI+H\nI9qKvRVgwvJ96ASko2mryvkzr6kifVjCGhNM6aIUyrzUJyiGas12einKmgsT\nXuCCJq6VjgyFcX8DApfEt16cfB+m5k79kgoxam4D2YR68pBvgjyBCrPa1N79\nJffYTBVIYD7PHxOTBwh7ROEwQAbsFVQeCO/Xc5vqHNqu5WZe5FYzHBaNangC\nB1ul\r\n=MGbg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEz5n62gwh3ULiNAiykztWA0mCsyXayNt1+HqO33kkOtAiBg0yIzDtDXPUc6sASMEC9Xew/oj9YzfBWsyxGinOYiZQ=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.4_1605452769515_0.5926727088065693"},"_hasShrinkwrap":false},"2.0.5-beta":{"name":"napim","version":"2.0.5-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"dc17887242cdc3cd35d506802ed05ee32caf55ca","_id":"napim@2.0.5-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-53oNL0JJpGA2nkM90uZYZQmtYRK75V60REYuLg30lCw+9S0mUQ16Ke8f4CHfuYd+icQ+d+NSwUWozYU+ChvO4A==","shasum":"c230052228671206a4b80df7137cb4da9c223897","tarball":"https://registry.npmjs.org/napim/-/napim-2.0.5-beta.tgz","fileCount":25,"unpackedSize":149757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs6YFCRA9TVsSAnZWagAAlw8QAJjF1Jw6A1KBSnqUqcAE\nDKaPCgmIsVYUGni2pF0CT8EqjyFFdpVcPbmEq5TenRX4MJpRQ3l2K8PcsJqc\njMAOmOGr+e6dd0mw/9Z0kqTBQzS0saC4SwlFKr+Ybjdob3bIRd8jGfBsXQXt\nObb3LKoPBbYLpAlPW2SXNhmz2y0tsnqcPkkbLYwoTLQfFv7AWCknQYu+InPy\nzezKPsq+OVkB5VDGkpg30Wi50+HCXvh+GX6ZZFGP/beG02vkaWSIwRTqYWGp\nfCQErTIzWqMxwiUueSXkCIr4sgVqY4cgwk755KquN44eWYHjv7UFW16NfSXH\nLham3hWDLyUbl3YyO8oieMbFygs359o5V5c1fXF2XF/9fQLrdRiVwrFXtQiR\nMnUwkFZlR5bAixDqHEt2gPCPPLb66jgk5JExkZhjAbRD5g1T4MYe2QasFDkp\nzZnFOm3xcw7QMNLd0z+tseyG47WZiKU8THodvOAEoyEeKUrc4OY6h0oeqpxj\nRoTkkt/QyoHkUaVUuUHZsx1IWwjN+N9NsON7Qe90V5iRcs014UerUhOEG+05\ntvqURyFXKgtb+lt/C7vRnTeP/+6w76a3JQsB1S7ftuer73uE1fb11vgBnAA0\n8sw+i2afjHSXpOnvYN75zkZXCV+0fcWwIgnJpSNs9Lt8VOlZx1bzharRc1iJ\nvxyy\r\n=n3O6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4C+s5l1BgJhmqM+yuvLR/T/yYmwKvWlhQrtl9AnQNwAiATH6qwluNJh7mPidVe5tIazEJMFLNWCcZO+H8SUrlYIg=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.0.5-beta_1605608964539_0.11659456825603942"},"_hasShrinkwrap":false},"2.1.0-beta":{"name":"napim","version":"2.1.0-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"dc17887242cdc3cd35d506802ed05ee32caf55ca","_id":"napim@2.1.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-BF2wZUX4AFsh20GHe0IvDWhY4s1A2xlNNHeSzcfxLnuRvQtzgfGZbTvjQeo7y4gCi7+RzAPdHtOUF1jat/4BTg==","shasum":"ef8a744912afbe118d70a28523af41960e68313d","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.0-beta.tgz","fileCount":25,"unpackedSize":149827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyLSnCRA9TVsSAnZWagAAHYYQAICiXR77XUHgzmTbPXNV\n7+z4eyXVV/qi+yUupHmYbpIJ2WCe8E6L7nESyiHuwpydeHGuwjkF1MMX4rR+\nocddOp8vovsHC2+lIU9O/T/II2dKX5LS+CuQNL3r3GHvy4G1s350jwG/fy8v\nGLxvtVhrPgMiOk131Qd6hLDw2iWtnvme3qwFFH4KNTIKPRc3Rkgu5qLJBQRn\n6orBz6rzGShudIZadyU90UMK/nuqpibNbUw/RWFvrauN8d9LGAXvkQWiAhkg\n7hgnZei7aGuCafa7snazrNMMpijmi5+V/QK+lk//aEFIh5Bf5ZeZCHbAEcfm\ndFs4LDp4OuD9U98Ij0FYa1rFm7t1rvR5NbQ8Lzx7vZnLBy/YKmHosdzMgmbb\niEyFNHGRE/w8J2fgFguZ3uuzk2mPG38yXBTMteqZiokpvOpcYabUqsJlRwTT\nbe2RgXYQZQi8DcauAmkFBAIOqLuvnj1q5TNHBRePEsJLfnBf4uf93RVWV+ZC\n2cfMiPgdXJu1+lJ+tywnYoPs5AmD+eYBKmN17NsETSkODIibHz+ZpKiCkl4b\nzmmrsLdNygZxJ2gzWKqFBqKhfQxRm0e2Hzqnj/h/kKG8upgeNDymOU4yI8J6\n35s453Aamv1aALPhKz3FJfuffrEvum2Y/TepSJ7+7lX36I7/LMTwtvZ5H6Ch\nr2sA\r\n=O4RN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTjYFLnb89E9axsBy0RqUGmaTlcyfsYmcLuxA6miuNgAiEA1sKUEMuY/gz8VjX4rAIM3k0KAFOCbs/kDvRZBrwWcws="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.0-beta_1606988966891_0.892826464561336"},"_hasShrinkwrap":false},"2.1.0-beta1":{"name":"napim","version":"2.1.0-beta1","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"751579100896d4ad4a93ce4ff0f7cbcde3a1cb0a","_id":"napim@2.1.0-beta1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-7HpwCCpXmASmCSjlz/E1rsATuf/4qbMpkU5kAXiYynQSWYyN4b/BavcZCG4UMQDYrKF0iOXlGzo+KIdtM5i1Lw==","shasum":"d735ccfaba8f11f5e23cfc7723d37afd8916f41d","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.0-beta1.tgz","fileCount":25,"unpackedSize":150512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyjDQCRA9TVsSAnZWagAA3KsQAIEr0mTXRhI/sZgv/d6U\ns7lK2XfQPEhbV8RMP9TXReu4XrrmsRpl6x95CnfEqzimNsDo35zehiX7eA6F\nMvGl/kLMes449Rb9Rx3oiCwNFaAMf3aJROGQgX9NEn01K/PvgoW0iXS1YN/I\nAykGnD7nHFwbdU0E7TqfyoN4uMHJgT2LMnge6sMO40XYgXQJ9wde5a3eHq2J\na5qynBww0wXb9Ou2lUN3gQF2jkCKz/gmPvE0IIpNb0T3xR7N5LOG4qH6vAuw\njUOYPcY5gdb16O0jylMPiya7SXGq/oCfUaLr9baVKfm00thduwP1MgefCpgw\ncPO2sIqdhyosNOV4eTeDlng7TIovUxDCs9Cku1yHvU4GrojPzAepkV9hRUpP\n2v3GcCowrU/9JQYO0c0WIgMS1fDLgIozzXOe9b0uEMiKPHQNyttWDlan2D3R\nhxURQiQgRxvkoMoClF9wsLl0ucFhLWWbIOcqxRpkETlfPMID1FndqOT+0a75\nyPIXpjutjArVmv78Q/F08ybYXvDf24qHHpYqFkNSAi+8WdUOF/d5YpfkA2P2\nA4VVnZxPAgTjotxmY+WtDUwb1GAtEVkXITtIJUGLpZMa3K+vm/nW9a0/0K2c\nFCJ5UHU4zmmHwvf82n+1Kl2+VYihH79UIPpU0B+4aTmAmShAiaj0rUwFAsEU\n7eoQ\r\n=RdHj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+gBAWju3XWTLMTBbDJzJSY8BfwxKLxzxDyj1f5tHCtQIgKT/zdpwYtFDTQ8N9ea2x+qHkCMUKSey2QspY9PHAoZA="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.0-beta1_1607086287648_0.8590160206488173"},"_hasShrinkwrap":false},"2.1.0-beta2":{"name":"napim","version":"2.1.0-beta2","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"52f8f8d742e51b30c2da1018c4e62a827909fd9c","_id":"napim@2.1.0-beta2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Q2Lob+PZbaBfWzfPq5VLWMDnHBgKYymTTDOJTRDLEjp27mQrJmHn+4I/x4+eZqBElSDIsxo05PGIdFZ4bvVXOg==","shasum":"fedeb19469bb298f4893e30b88208e000bcbfe8f","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.0-beta2.tgz","fileCount":25,"unpackedSize":150444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzd1lCRA9TVsSAnZWagAAw3kP/3opc/2svGxKyg3hZNHs\nLLf4yv4hHG+4bONXxJNjnSjUSr3t70fLAFgNCyu2O8HRNHdQ/wUBwPiduRue\ndnAySzGrbfeVaDutlgo7dAlCcp4bXUOmWJiAn3aQ65L4FQ87sCS48R0u31PS\n2xMBWSrDqh9SUPbE5yYR/JGxL/LuQ+/h7RxkaK1pxBnrsFasFGuXnZRmrGrq\niImYUd0xYJZ7w/knKfVZDv4TENopLa0SRhYI+HB3TU4Tsgx9n5wBQqxNpBpG\n04BcBtbdhFnC3TKdDVXxqcw5OKiVs6dgi6riMWfoTygW2dzIbhM4e/I1Acf4\nXsMXXACQHItl03WclsrfxXVhx4qd4gejB4bl7vvW020u4Kvm6tnv0yYIz8lx\nXNjlTuXN2W7zcXUD8sZg86X/Hqn8K+mS4v0VEj5tdOFey+12Mbt8iRx/QS8w\nN35jrIsvuWNC/zntnxFu6AkV6LfbrsqBHF0udKabYRW9uSAur3bU6XlCdVQp\n/cxmujaL9+npjBzvFVufeybpZFEkZVRyy1CiwDDG4yvVmn4yoUgkncspVXBe\ngWhC309kwh1JOwXx4Os8o5dPzgXII1cl91SvJRkolHcNGVav+Pz/YeDhAQRn\n0jxqdy4s0X/VRVlRBEnrwYYZLfIHmCqhlMvq5sXp8+s8/jNdHpS/7eCR7lXY\nWdQt\r\n=y2FU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXXGNLgOJkgm3/oEPyvTAAXU+Aw2+PIKas6ZS2C2UFzAiAI4jOzoBF0I4jG0nl0GQBPPork7yiUKt5lC22jxzmIww=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.0-beta2_1607327075835_0.3549349021786634"},"_hasShrinkwrap":false},"2.1.0":{"name":"napim","version":"2.1.0","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"0956c429e3e0e5471f3817d2ee14de3b962d5b7f","_id":"napim@2.1.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-PIFc0CQl9wIeb/wg7YHCbq5bjNViL9MBWElOWTS3iNhBnJ2qcj5q73WmajAVVxxavg7qZQIMIiMP6zvSg+a03Q==","shasum":"3452d0554468f921cc2dbdf7aa6f7ef0fc7fefde","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.0.tgz","fileCount":25,"unpackedSize":150947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzgCWCRA9TVsSAnZWagAA+M8QAIgthoDHej1inMXDAWf5\n1geEaDdzuHtlYmvPhImfhcZeom8mSwOmk7sAtJUFf3funD5dFDTQQd+mvCki\nzoaR92g2GLSgiWk15JTtZyTjhIM2B4QYX5J9HcJWzFy7PQIZfP5XE4YQyDS4\nevgeFi1ndKc42NeU70VileXEzGXBzrwnJbRDY67g0NRhLHQSAY5vFSrPe6iE\nthPzp74273ihvSpNmdnuuZOK4EqCFJG9Zeswny/AnWkX7zMO43vuktcElvcM\nOzoRcrnFXELPsgY8Ahg6qAvYyWsJ+ky6o14q451tObQUTyndaOhPJOH430Tc\nEeZzkFoCxw9bVhCiJqFY+2zdTE2rbxu56QiWNI4PyGKYYFrTzTWS4OQurdWa\nL8wfGBFmio0sFM/pyLh9fBgAhvlOTrqYxe2Uux+184i2cqHxxcVBXBPw/OkQ\nVaTltQv5YM7KwYt2Ts/fmhJE/pIWO07OL3n2KIBwcykqpJMEP/3uZgfQIiJD\n3KlrIGwQpQnFP0ToX+mkUl4zXOLNIDqzrkkaLi/i3OAYWppKK9iKTx5PjJgE\nJmEdGDFdHNsGmGKbm7959W1XLRqhWOoXmOsmsfsBhHzaVTX8gepXHhCyroL0\nbWK2mIDtv86M8tX42jPNApashFkMzwpxP2tEDyC0cFpKiuUDVlm5sQZdUpI6\nuf0f\r\n=sREX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC5GLaj/BTJSLHWEEFP7hh4xLhrVrM6zoirmzR0Z9C+7AiEAxmQPZQ5aEH1fnkntCz/YFE2e4ol+PDGBmcFAC11DHKI="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.0_1607336085925_0.9558529112936751"},"_hasShrinkwrap":false},"2.1.1-beta":{"name":"napim","version":"2.1.1-beta","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"readme":"# NAPIM\nNode API Maker built with express and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access express instance, just `import {app} from \"napim\"`, example\n    \n    ```\n    //index.ts\n    import { start, app, express } from 'napim'\n    app.use('/public', express.static(__dirname + '/public'))\n    start()\n    ```\n    \n \n    \n    \n","readmeFilename":"README.md","gitHead":"d8c4b70e249c99398f3b34259fad6987d1f5e3e7","_id":"napim@2.1.1-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-C2gKlsSagEqDrWf+0OjzmAqqE8WunqboAlI4gYrtiWEhtsKWekwbYrQjzT2a6ejWBHPNIYWARDt0INdOeGVv6w==","shasum":"81ee804e0ebff72d3d9cd2fa7ec226ab40c2a8b2","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.1-beta.tgz","fileCount":25,"unpackedSize":151343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4gXLCRA9TVsSAnZWagAAb8UP/jNin4MjmUYVG9ss5lyL\n/pwosVF/ZOu86tlq/AWK4z/CWh8uxc3ioNLUta3NQAD5h5XqzPV7e3MizWyK\nY4HLU9JbDd5+ik9rDRGeQsosi0RS+PCluBzw7L1yU+Bv8Ftb5sX810ij59HL\nUScPduTljAyLHvtEDH5yLLDrmcJzpL4j19QKoqmdfbInDyBnstGCe50gGYSC\nmVmeZxws51B/gJ68JIDI6pMJtYJx8V816Wl862nceeKS3F477hPu8YN03dpN\nf1Rf4INZUBeAjnHP9l3y9DqzQPV1JcNHQDONpKqjIopOUaT9mbEBVwkUDm+9\nCgLw8Lyx1K2S6Jzkk/uOBWBxt1+JyC4RbZcbQPOFUvOQccnPAxeHIwHSe2oh\nTUKHY+J5KCJCKiV74lgiPHvPWO0RIS5OxgUhVNUYgVfYGzl+vEZ7cKOqdwO+\nfTo5JuQ2G+ANh3sA/ixHgcoYo9YHKjWC5hI47evEvIwlI+8IqoPbWkJzirWn\nuBwC2nenXbR2/HWZp4yPLPfTHv+PlUdHh5KSVurk7BAOMeIq3M4JffqFdSZm\nEkxWvdIaHHOi5/2gSIYtbX/zVJZD6n3j7P8DXlWv6K/4+ENnMLRWLJa4uZTz\nc4rqnxAjnR3k8W0U9SWD3+quu6Tm2bp7IAPALgLK8d94qhI/5scup5XfwRMz\nstaH\r\n=TeWh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmGZ4gwaHXb7fJE1LrYfD7gu7wIcNAjkErwW/8rUA12AiBuj+ofGbpsa44INSVm6qUUuRQMYxg6ln626lIuK53udQ=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.1-beta_1608648139075_0.1449608799301243"},"_hasShrinkwrap":false},"2.1.1":{"name":"napim","version":"2.1.1","description":"Node Api Maker build with express and knex","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"nodemon dist_test/index.js","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["express","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"dotenv":"^8.2.0","express":"^4.17.1","node-input-validator":"^4.2.0","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/express":"^4.17.4","@types/mongoose":"^5.7.36","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.6","mysql":"^2.18.1","nodemon":"^2.0.2","objection":"^2.2.3","pg":"^7.18.2","typescript":"^3.8.3"},"gitHead":"ab9ae468819a86e3c40d308a7fe57701830b144a","_id":"napim@2.1.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-mU9mMJRsDUeJr8gTdP4i5gZJNUHpbjGsOBEajz4yZCLM3OugT1NJQrMQulLx902PcZHe2PX592mAwYszeWioSw==","shasum":"7a0a8575ce155cf5bd9244dca4df333fac28e22b","tarball":"https://registry.npmjs.org/napim/-/napim-2.1.1.tgz","fileCount":25,"unpackedSize":151328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4gqmCRA9TVsSAnZWagAAfXUQAJ7BBznfSqeMNA/zETF2\ndiHrW55vtMzw7r2qyzbH9XB/y5a1C1G/xq9MrpNxG1/znnrOZa1FxfpkLvT0\nRAFzheAtO5G92CHUN0VOwkYa2nDsZcniC4/KrMNVxkKWOECFv28/l17Qt7iW\nHsN1dPlBJKruWziXoBp9iR/aXZ4eFd+Ff2fV2hEw8f6FIMEFm0xiG87zyydU\n8FB11sZRTLn5Y8gVyZh++x8rfzgtjstf5LNdoB0hs8NELcDHYceU0mOwJmjx\ndIBN/IHNSLSe/QQUUc+mZiUBHq/SzANP1I7R6D8u9HX4tWRo1nUVCcH06grA\n0t2fOcsWGccT1E3jdRTi8jDBHBpbWp3JT1VKbyzPs1N05zAnSS1HNVQdt6rR\nCUz1UnT/kHhXtrOYSFyLV5/rmnHiwNgf87nUELXpm8EGdrB0LfZnjS0TJ/aE\nXxs+oxl8pHOBn1Sxadfkbb7ZhX/xS5nfg0yQHX1yRGhf3W4y0ZqvvIBnJjjN\nUXZgT3py17503Ymr1tufbrTy75R1z0E84wnioxp0p3HcCvvpIZMDOoj/bl57\nGGgqC4nN8s5BA7GeSnhe161fnwMksWy8klx0ze+H2Zly440QOBpBzk6RrS8G\nUZmrZ6YUy5Qo7AS4YENLnFlyhHPJkJ8YWSZsecAAeXR2ujvMODnW2MEuSod6\n2Qnl\r\n=FZr1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGxTWFQgLlNm6FoCHJNwKbOkFEcEBwjm5ZkNWIrps55ZAiByefh7qi3Nywy/suw7HTn9SoAjrSPsrZRad9Dnq9IIfg=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_2.1.1_1608649382082_0.9189603274809479"},"_hasShrinkwrap":false},"3.0.0-beta":{"name":"napim","version":"3.0.0-beta","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","nodemon":"^2.0.2","npm-run-all":"^4.1.5","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"277e56c048721f4d6d144859d3cb75475bcac21c","_id":"napim@3.0.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-W2u0iDK77nDbX9hoKgs2lFMnCTZ6aRKPihqHukbbNbdatttQ/rwPUA2fPtqxHkFPp+L5ijyWd/Wdnl2Y4yrN7Q==","shasum":"8ee1da54acd9289821ce42f8946627658df93d61","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.tgz","fileCount":24,"unpackedSize":34950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf692uCRA9TVsSAnZWagAApyoP/2FwQAbVnP9eaBrp1aYh\nYzff6x7mbUxOzqbwgngIGhIfRVXapVTNQ5VuazAelJIzRvzFE0JMVxXbPvoe\npyYdq+Ro60W8AL05DKMRXu2W0KoHmWdbilx12K4pr3wkLtpkZdqZE50G6OXc\nM+XYWFi/5BDUc/z39iWNXwYgDZhCFmdIVMriY3X91r+1+GGsvbkkEDIw9+jy\n8oktmyBWcCBfd8WvrwcyXbkaxSdINHdSBmjbA5CzZq9vT+QwjIjLPkr3c5/k\nW2XjlneJ8cKo3xisrqYTZIhKZfcvo5TfWKuGIInennxJeWTxvYGbB+3pW4x6\n79R2KPpjhn4JH2UdjuIHOdESzyTQggZBhlJE8XVNkQcBmBBUraill4GnV1/t\nB4xlSBC2Sa1cR1JRSHM6DXbX8oO+WEvVOwPxnaCY51smVaTWO13tRPcHsiH3\nze29UAiHGPdkNLPJFxywQu9NSv9vV/POK79YsjRqgDbC1JkqE2itsQq+3uKI\nMMk3PeYBvKGVfGQ9pNIQNfwIPFX4lSrVToHS6iq8LqzMd6gMfZk7ml7MfDaZ\nRKgPS4hpJcI9oOKTftzW6fe/vhrmsiGoFoa0bAsNv2hHbZ96Z2ecC8WzbH+O\nIttMOKXENZ7l9XLG/Jzh9V1eTQ0z1XBGqqVDUmtMYHY8xgJv9n5LtQy3id46\n2q4V\r\n=f6Rb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjf9Z+8UslHqU3p+xeC/LH8flVabkkTyHk/a+KPHjrkgIgQmep+lzD1J20o1jKkYeDHSEKNKMUU7AmVmhQNufr7SY="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta_1609293229521_0.729892094736331"},"_hasShrinkwrap":false},"3.0.0-beta.1":{"name":"napim","version":"3.0.0-beta.1","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","nodemon":"^2.0.2","npm-run-all":"^4.1.5","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"68986080ab45c235ca85241d7bf3cd933fc95f91","_id":"napim@3.0.0-beta.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cyHe+wZM1QSWlnT6o8qcVC4QBU7QZxi41oDSLX176nh2BavpjFvR+T0F0sQOCKLvrnfUShA+/eKjSO0kFQhvaQ==","shasum":"8efdf9b232922649ba706c4a0cf3c0c5d3e8efed","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.1.tgz","fileCount":24,"unpackedSize":34979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7AR9CRA9TVsSAnZWagAAHR0P/0D1MsBseaj8f/nYdG54\nvApGM+ATEiWkWIqR8zCEfzq4ZUyfbEPR9RGOT72P16TtYq78VshHTidXa2zl\nKtjZlRnNp97tmVOowto6E5oSWgptXr0fhio19OV6D0AavnA+wJdvVgl706mj\nlFeE8Z5p1BsoRW8b95dq8gBV/tiETNTCXNqAHEqjk9JQpjZ7p8oH4KW3S0g2\nA+dpEiFj5jo0icXp1d0Rir5fViUn+s2ilFdjP4U3mLO9XxV+C6+OOxrOjRYJ\nARAlzrGaK3VGtH6LIpgJdgBsO7KuvJnv/DNSRK1AB0ogc+xS539xUsiJm0qc\nJS4ylGgTjn/zw5HQuvWWeMxwJ4KpNxVNvkhzYHb/NxwsGwiESEfayFkLk2yE\nzWmQ0juK0evznoxPt3MmwcBbjGfVG3GPBnT+AlD4SVBFnasVwWFY+x2N7wdY\nLDoc3CmiQvS+3qf2lqiai4DKDm4DRFdCQAybjlC4VqsEsvntSWAlYv4mv4Ut\n/jpvHUHBGmsQXN6qgA7zw0zysJA/fKzcuILjJlw9hkzYUEpo99qKe6ozdWw+\nXGbjoKN0ba+GJoFYXAwWxdRNed/60DCjBFxy1VU9Xbn5vi5SgvFjkdGxsbjE\nZBhyOcXd1YYDRkLHkwAzldWadYAnjIZ+2qgMwvGnnZiSPwchGu20ZT4h2/wM\nqO86\r\n=yqMQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCURTwzWO9E40ErHPR5glri3Lj9WlP1QSEDxUMCAnv1+gIhAKDOwkcfsoJ2W9EyLTSuYOdOimiilNgTv7JhnhGqGqTx"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.1_1609303164517_0.7497670629869828"},"_hasShrinkwrap":false},"3.0.0-beta.2":{"name":"napim","version":"3.0.0-beta.2","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","nodemon":"^2.0.2","npm-run-all":"^4.1.5","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"414aebcf6af5be6aa12de7d4b5961210d59d80c5","_id":"napim@3.0.0-beta.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-FCigCuu+3KjotRQ0chLTnNr/gLz/Cq1mqcAVa81pJvOOTkw9EuiG3NrVO7tU4obHUz2IE91vpDm8ZQlBYtZR9w==","shasum":"bcc0479794b557274fec4501b1f5c3bd4003318c","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.2.tgz","fileCount":24,"unpackedSize":35043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7CSlCRA9TVsSAnZWagAASSIP/0gdYT003vmcMm8+vnZV\nuqt6i3J+Kj5pQJo9cTJQrIBDywYIYRELdezXRkIP2Z3xZHRtjFJ1wuxzlSE7\nhaRh29MszDz1N8pNzJgiyTVMWFSlf2CFiZ579ahSUSWs1EGPvjGrBy9esF2H\nZQT5KflPxW7rWxqud1xi0ylQq9nGRGGnOTRMJCjE8O6pGYD01VgbykJOeN/q\n6h3vfDPsOahyFW4BKvOHz/mau60vN66ANcsZSxhS4zty8ePePoeEw/gWfXQQ\n/WgOXI29uhZTV30EmWkzhT3ziX2ZnK8GrEAqIk07UBsWJUrw6xP2g6ni6jEV\ne89miTbJ1lq8PMdnfs4zoWOgpy8aOweTFkeaISETMpVMwlq1swCj4+0nYgXa\nwDlpDq8+gbXSEsv/W/33TffOPWJQv60+nkVakFoPxbsn0ZxIFHafSHhwMhio\n0j17xeKNoz3LFeucV6xTEjr12vuTF3ZqKZfjcvyRUFSgW8/VxUUMGEL8EHAa\nB6h3In3zI9VAKirwI72K4fr5Tc9wpUrt6ocwYUIfy+gRFaKbqT+wpStTxCsK\nkp2mxllES5j26MtkBuUSZfKe8eku/JYapylyeqwBecWHXSVLHDhiNlTf0jhH\n5DfwF4siB2J42WDu2IgYSBXLSWdjMsJ581VHaq9uLHPmGM/SQ2jSJ3G2kRaT\neJzw\r\n=c47S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYaKXluovWcHTfrlK8uoh04hOTNkx6CA9pOLoqrPwOnwIhAKjM0ry9z/fVxHsQ6VEsITl9qlROxmUZsrdqKVsz1PnN"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.2_1609311397186_0.5373539384824952"},"_hasShrinkwrap":false},"3.0.0-beta.3":{"name":"napim","version":"3.0.0-beta.3","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","nodemon":"^2.0.2","npm-run-all":"^4.1.5","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"7414218bef5c5381b5b75d1cff4c045477088a48","_id":"napim@3.0.0-beta.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-ouNk078yfxf/Gyphj6eGQoCsv16Lwhepk0+YnWf/5UsbBHWQLwMfCQfZnhzYe5e3lhzzAGldji4061Z37zF+2g==","shasum":"cb91208d5c6a3d96f69d8490b4874bbc19decc88","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.3.tgz","fileCount":24,"unpackedSize":34942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7U1/CRA9TVsSAnZWagAAwaMP/0KQiNXybZwakhTNq0ZU\nnESBYSDgVgwnVzd7bzLuJ/Tcnf5Y629Z1hZD1IMcgNjSBMupolyzJlVfkg4r\nbmeFXYe91IxEAbltfswhzwDZJetkz3eN6P5/KmK5QusldQbqsDXjZ444t7LY\n9KLEFE1kleCxBf466TfONVKQ/AD1Jr3LDHU+4T+fNuqUckHyMb3+alXkj9RP\nFWRACCda2E6iicw6BGk6LdWlJe5hk9XRlmESNWGj5WYFglvN5IRZoYDsIs7X\n9rZbwXaVgm69rwHgek2hqcH14u9mzcUhl0TvMpaSHaX5ZQ7moh1ET1202tI1\nZeGjUVoUkoOunBxfZC3+UaQMfbbLqmzB62SbJoRfyhUaL4EQ0SuhI8XMgc9Y\nTaG4MSfR2PCRLsNp1yagODCamo9vcsdkM61tJzTAsVo5xfc3IYuZ976B5GYx\nxWWD+ZD6mi64S2EryGTnD3gqo1/9x1iCHkl/JWvmdDjXx0Ydqeptg0K1NJNI\nO7bt2ODrjtERUj5MAn2zEOwoA4u4SZYGlhmmDKkotzFwa+fs/HyvQKuMPiDZ\nDync4qxUF7P/PI1IbiM9j/jVW/bRjQ/ViR/jJGl6cN3g/NoDepbpmHxAEZzS\nM+qoxiFuNLcA0barNFFEur/FTaFDwsu1cGYXJBQwxufMAmhXYmDZh/79rZw8\n6ZOe\r\n=sEhf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvjOcPWU1ZRBD+TqQXZCIqyvrDSxCOcAY0MeRkzg001AiEAx3ReQYxR2e0bwVaxSMmwzr1Wl1qLUCiepOTs+/JXXDg="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.3_1609387391047_0.6642530737232453"},"_hasShrinkwrap":false},"3.0.0-beta.4":{"name":"napim","version":"3.0.0-beta.4","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","nodemon":"^2.0.2","npm-run-all":"^4.1.5","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"30b3a38a9c1bc8a323dd22c1c331beb0ec3d6d3d","_id":"napim@3.0.0-beta.4","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-aIvzvZuoxaHhexWUeVLtK6tneDf/xy1UB3GtzU+5bHCbc6g+59QKzvq3IzmYQkVDOorKkyk3hq7quFeF/CHKHg==","shasum":"10f03eb7d28b6681c2667bfa2d62fb34c9ff3501","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.4.tgz","fileCount":23,"unpackedSize":34557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7VlsCRA9TVsSAnZWagAALDYP/0Wo74+p4JSDcD+oik8+\nUYFWckEvWMlceUiobGU28qsCRjEYpI2grDgbewqGh9dBc1Sb0Csf3ikX9M7y\n2hlUHbMVnsGIMaiB9G7E0aNz9RbYVMVRmzkdyeL1RJk8hOs2MCmJCisja7bv\n0Lz2iIMI+bInfQ38B3OEqkPnkIM3jBE5AJLZTjwzC6cTXGprWBauyHtequgK\nMW2SqW2vgh9a9B5vmg7r3S9OueZ9DoE1BUsAQ7ko8ZBXy7aaD1uQmFz5FMMb\nJNSS8XbSMTl7CtDO4sEwF66lkqs8yjcztQ+B6BOj0g+7pt2+SxWHSSXqJ/2p\nQf4iTkPmyzviqEmX3l/+GrVD5gj1LpI6CXAvf7PvsZgevS3qcb0O7qUCxnyr\nr3cPeq82rhrq4t4Lf1qfvvXX949keojPtEcTM7uBiaAIBD3BHp0AWQJfPZvR\nj/xRz4Mrso8u03Q9jNJjpg4CU1AM1pHtpIOqMuKZeXlH8lcQPCR7oOJfSxoB\nlES3+h+VSZ6KBL4SeT7AHL21r5tbMcJuEL8zb9ugdp4BoEJh/6vafaN6Yvm6\nHsSWkU4rVuVD9CLmAT67mSBovj/jCrQkTgSDTOeCsUBmzzJDvBAtKgEBSSHh\nQbx7x5wV+DAUfguEExyT7YmtsmAFbSCtFqQ+2jJ0cUufDaa0U3LJY9hA064d\nAhzK\r\n=3vu3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6akRA0axejLu3UZ8hD8NVczlD249A/c8bkIdQ3vvU0QIgSlDfAQS3m7xC7yTBnSNh3MbCbhngG7fZyhnt5qAzbio="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.4_1609390443820_0.2211180646103219"},"_hasShrinkwrap":false},"3.0.0-beta.5":{"name":"napim","version":"3.0.0-beta.5","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"30b3a38a9c1bc8a323dd22c1c331beb0ec3d6d3d","_id":"napim@3.0.0-beta.5","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-vAIKTY3tjn+cxkOfOcwCewMUl/d/sdmRpLZZ9GADpP0TdbqCqAqqvRL9m339KFAndhlcpHsiOUQrzcC56PqOyQ==","shasum":"d0d4bbccf8f175ccd2d249a3b9b8887e7db68463","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.5.tgz","fileCount":23,"unpackedSize":34798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7WqoCRA9TVsSAnZWagAA06UQAIyWsmtBgvWrL2XH02W4\nRy7lDgUpVxZE+v6khsQr39J+9SEhpTwyzBCKH/tUQ7gjGixG+bzjqqU8KzSQ\nITGGrS8R/TPUkXE+HK1vrtyhD3/8EQ1J/6lZ7ZqGKEqnbS+bnqD+FbGKK8mK\nJ38HJ4sETZKg/m6TXy37zfTC6i39CAFJy7ocNoRcPpqCmks5S5A+R2n8qiuT\nnJBZxYS+ImkfOsfoU4fas9wo2d1J6BXsKVS7yBm+0WbQnY2W9f/7gxaY8Kz3\nN92wpPoputjV7NutFtOZ7s9bBBK78Kdnic00MTqqNxJyDTeFdSIo6/jNTsPY\ncHiX3cdUp3JcJj/yyas3sgrlKCcX8Gdx/VdN4YKYzxOfg56FfoUuO0ZdhXNe\nXbKMZ912gy5J3KwFzRXiMUuZJR05H4fQA29sQNdf/6OG5NzyGWNmtImn0VSu\n0wiHO1WbSr7boTrOt83TnSHzP6x6rxYQ1mfEdclJ9BpDekAT3U778EqGlCs8\nJw3UjaZyydDjs03YC2hCbj1gpJmxsIKCi9intF3m8wPXgOCdUSPAFSF9IyRR\n6Q3ywGRf9JIs3R1xKpFJGrbx6eeZSiXY1RIvWChksTk+Yiq49GP4QYjnchUs\nyc5TowTZzXxdx1X2JqD/T9tKqcp7fcVL+hHB/Ep43kLa8zhBXt9r3RrTPcbv\nrjKy\r\n=T1kY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICaEiVaDCaOUPPm0KvHMtP3TWBrZ/Ev3zi52vkKPDgT0AiBFMVxm4IYufgYcfyhCLPd/XC9QdeVTOLUes237TIYPSA=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.5_1609394856319_0.8796578030057987"},"_hasShrinkwrap":false},"3.0.0-beta.6":{"name":"napim","version":"3.0.0-beta.6","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"a8b7ec532820c3b384fd332ea5512c56ba2308aa","_id":"napim@3.0.0-beta.6","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-vV17C9080YTn91RikEFbb5AxtIaDR884PoigrBopS98VHFY/GcBLpi+FjLkb5EgzKaS3QpUR80MvGinemNwncA==","shasum":"efdbbd817ce605bf271361a377955c8d713f7fd7","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.6.tgz","fileCount":23,"unpackedSize":34836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7W8CCRA9TVsSAnZWagAA3L4P/3LazNVB9ZpmXHelMjpd\n48/wNDNHwFaNBFyd431A/Ic1FOnSshrckJn1K4tDs77VZ0c+kTZEnuu/FUYz\nYi6ej4Nej8Rb0W8VMFT5VwUzH7ew5UTj/oin66CnUrgEvTunFVpg+SfLXPaz\naobnMcc6OysNXjIuCFuBGdXqUBryP9jKy0iK/VXGVOFFyfqxxGMJtJJMMt/Z\nL4kCD38EllxqBXIAf6vMkJHSx5VV0i2JDDQnlAgsRbGeO0nGyVFJ8/bptFXk\ni6qh2K6Kw+sZJj9ie1qhHMY4jjPIfWgEtxv/Ce2jTeb2IBQ+ba1OfFPPs9U3\n6MzubdnkGuKSlGJd7tRCB8Mv2+Z+ouvl4Tfsd+Ir4IvPW+4dWYrNwRvbjlGn\nRWS7TEvbGg5H5YM4wsZYihRSGD2Sj+CuSUDlPMT50MjoMaql8s3WKBcaAK6s\noTlW+F1HY+CLBxwrE9nlizULMvCslBe1n/gIIzN2P5nlv8zM4EBcOr8P+rSt\nnrG3Mo6D09evaTpONmVcCdRWB93Bf7QTupJXqtuJ/H12n1uRiAMklfYtwehp\nUh3G9dsstD7IMVvWx6Ht2ECuSg7oI7ofdSGhzCGiMxoTveGqSIsG4mQt2y3D\nHjA8dA6XZJDldKiXZZlIHXnkgmZXJrzCB+UkJDWxMPLMPmSdzKxiqJYzZSky\ntQUX\r\n=7Co0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICmTfX1tSXrUoZNMOWE0NGSMX56EFxBV6tJclD6JNb3OAiAsinsBfBcb8F8mmuaVPrrCgGvVQn9o5SDZXldphNRU9A=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.6_1609395970208_0.08323967649239572"},"_hasShrinkwrap":false},"3.0.0-beta.7":{"name":"napim","version":"3.0.0-beta.7","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"a8b7ec532820c3b384fd332ea5512c56ba2308aa","_id":"napim@3.0.0-beta.7","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-qaBhKrKn+5msrF9i1V8fi1NyWPJoWua9Yr8rg4CEgEdhXpOaPZ96o/MsbUkGK+r815iBw/Fb4pibERPADcgHHg==","shasum":"19163502f6108c37aa5ab237928e610202ca7d98","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.7.tgz","fileCount":23,"unpackedSize":34835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7XB7CRA9TVsSAnZWagAALoEQAIDsYj+0nvwio62RcKij\nkgbzyy7Bghqss/v/l2n+tH0M6kbv8kll52kkoKllMkaJHCjxcqq6o0UOmTrq\nPBryo9PAwN9/mcK5YYh0GHqk19ol2Fj186mfc+aFt9Edzu7JANM7qoGcgzGd\njrnNz7zhUOE/vVefgH0X6wEKuMWC3+OB5qbJLeYq2JbFTHmT81yt39yEbj3/\nTDWVZA4Vuj/FYSIBgVmbl+cP9kXtEUm0HUoBYQUf0L34B9czpHA/fSHOC2M4\ng2OoGus5w0265acugKQrCfA5Z+jyQqhKEfs8xc+gZVTIWw6nVX1EbtZcH9o2\noszicLwyWeUD6EVG0+8jRD7su9e4Botp0HpILMI2Xw8NIm++YfgKy5UmgoER\n/e0Q1wlGrewf+gc7FF8aF1f+39kdWtbYj+6IzJigWS+sxumIDLYf7wa3i54G\nMJMLYRXMOd/81HjkL18DPg6wmkQbiXPQcKLi1cm1pfML7QIdSmwSsRHRPpOA\nEiBWSHSXU2azCoYDDZbZG/r4hwWqhv9I67YqomokEDfX9XGJISyepbGDN/7z\ntQOk4A+wksy5LqOcyNznIQu/l1ha5zlVZlq4upwteJmpry++H0Ihk48wgxWM\nKUr9vc6RHADOoZdki7i8SrgUOu1351uv5BJ6iXDSsovTI06CVVf/Peu8dQT/\n2fId\r\n=fYwV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF6tJwuI6pbxBnMe4ZR2LUAm3E6Vk0i/A1WvBKWyMXmRAiEA1nq02EV5lCW7f4n3Iw+M8Z87M+sowO2QoqewnQJOodY="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.7_1609396346583_0.03634670569694709"},"_hasShrinkwrap":false},"3.0.0-beta.8":{"name":"napim","version":"3.0.0-beta.8","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"56e65f8598b431457ffeaffd9c751ded28b13fae","_id":"napim@3.0.0-beta.8","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-4wSBDAoN2UyDXamn4S+fiZPBaT6hAgRMfVJkmav/irPMrZ308CmczWiR8hTmqComEvSZ2fnfUIkGa2qS8OJO5g==","shasum":"c49550659713f46a59ad04c40a8c33ce3aacd99c","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.8.tgz","fileCount":23,"unpackedSize":34797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7XQ3CRA9TVsSAnZWagAA8UkP/inRcg+RsuInDZnxpKiq\ngrJbK12Jl6aTVhuM4orNEofLJEQUn4TrYV66qkKBMFH73yekdcfu0StJJEdu\nhzRDkg51f/ffuog9cQlpBTwSM/e86nmbJBcjRDmNR+tWjLzfM2T4c1EZqnsi\neWjWOvCDBFY9D5/XoDKKZYQE0xoex0QQql51OIRqm2McKT9OOnmdN0bpqxib\nHCCz3Rw8BIQL3LRrhCtwMe7AZagwepLkHc2rnYfk6ablKo/5Ut4lxpL+uT9h\nKM11DIWywvDES5deZLrtlhfX/AAjWoyW+xDw+n7MOLwzfBDgX/o0WixIk3Ax\ng9DXl4VlDUOQIOdXEnJWzCBjkUlrOexPhQfQNwDxlmMdZpNkg2tCWXm6y6QL\nGFPeUg8sy0GbNhD47l9UxbJykBZWOmt9hRKgJEeSFXtSEDoGqcoWyE9fyKH8\nUHbkGGD0Uc7WHgOUKbRap+DpMeeH5Ynx1WZt0mOapoKhWztOARux1lC7AiI+\nZTo71I8dCRj7/qhFuHBbwXMMN9eIgfgVKvN6pokgzq4+1XdwOx70z7e7yQjj\niZMSJtbBGieGppT8+u7YBaH1mxGY9NQI9j0jIysEokHys//22108MVawc/26\nlgJSO43haqVlzLLWPnmG1r+TJ8CcUcr11Fx3Pv2vc92YTMtthncPPp6hpg0g\nFIss\r\n=d26n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTMZiaZYOHg7NMbMVf+S4Ums7FfLfgb/K83m4+8bNxuAiEA8bBtglOQbScDR89lsTZLRwkfMUFU2ek5F+mreph74xY="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.8_1609397302963_0.09883811012318788"},"_hasShrinkwrap":false},"3.0.0-beta.10":{"name":"napim","version":"3.0.0-beta.10","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"87aca3608af6a1734ab817d3f4444b6d9e98ff13","_id":"napim@3.0.0-beta.10","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-mkNMfPJBhxOQLZfpbRyd3awj6jUkm7EieiCefXfuKU8hty6XQUiN9kosUwEPgHp3pefDuxLRRn+2eWRT+Ubq6Q==","shasum":"f03180f9772bfe2c6c1ce63927cacc7d8176cd4b","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.10.tgz","fileCount":23,"unpackedSize":34987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8BaFCRA9TVsSAnZWagAAhckP/1oHa1nqK89CFALO/bp1\nDxk8nSvyd7RNdKjM9BEU/pLaWSQq+Obgazsi07v4/SA4f3vTYaAE51qA21zB\nZokmp4eO4YF4AYO7Db6KUndbmMh/HupEkQLZ08Hg2OsgNGnuQ1Y9XwgPbbm8\nFquIzJxHcglFdUrwS6YEj3RuuXbLThtv3/WS101VOElmnIcWginjg+0rBRdM\nigHYtOlQphElDG17rmmr6EJgfgMUresOcNmXlMoQzoBkl0+eY091RSJzdLgt\nT5lLqxy9k1Yr3Gv/tXuwFOuAnkmAczW6v9EdDPC1qlE+g2MshYtm5JO4dVKf\na400huw7wYAQ7I8f+Pd0QiQhOy6eOANVk1UGcGKRGl4nQuyjLtgPiTiUdKKK\nCKyf5bxn+Tx9L2Yg7Q8x1QwAdkkn25INfZlpk+5Ac7g4AWAebb5wlmM2qzSd\n0GKx3oi5eio+rQka7/rOnHQmKxjQfBWLFSii2Q8n1o9OE/9Evm72+eBR725F\nal4uUgfbuuPZk+KdO5KUsz5GfGf9sSQB6orZjPzo0vJ6EzXyacAbdEAUiP6A\n0yUZrC8QUzMtTOoC+i02KlG4qBNt9lRtqmmuHUxeZCASPEN730u98VRYIqsx\na3M1vC1eiG8AO7amZLLersYI2RP/zjXCvV9QH96T6y9tnueAeS2NuIQQlUmS\nj/Za\r\n=0Yj1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGUBoDKlSfIp0dwK1AbBQp2GnTdPjAXktMYmLRbamIXvAiEAlMPvyyltygOYGOJzS4ekkKoKWQwEI7I8XpcoMWGRMl0="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.10_1609569925329_0.4277928041516508"},"_hasShrinkwrap":false},"3.0.0-beta.11":{"name":"napim","version":"3.0.0-beta.11","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"a3335df69752cc72778ae8998d191e5dada84d2f","_id":"napim@3.0.0-beta.11","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-lpAmIsju+L+8O6KjKrZ2VkjAgxKMD7CdceippTi8/I7d+i0aysaJZ6lIcNwMsCIOShIPi1hYJjRPCMFsWxQ63A==","shasum":"5d8a16b9fdaa13ed0d320ae2d764aacdcd59c653","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.11.tgz","fileCount":23,"unpackedSize":35104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBAuICRA9TVsSAnZWagAAINwP/0G9PBhQTuTgSyTlAkFF\nVCIikTFSi4d3cPq2jMACbMvbXYoqR5JZvTlFb270BdBIQSdCifVfzm66tPrv\nHVhSunzRTX8V/xq3dpdSaRnNito7oNfDuxZQRZlGxWXVHJB+mHmlA8v1UlSo\no544g9rqhDwk+O3DMOVdSQ2n39bQtbb73buWn6iQ4sKTmS2eeNA18ljleYyr\nWViLWI5LmQOTfZFBJ+fCRiJWxaXXMOJgbDO5/1MDEGG1QfmMkRvmAR9FtRFD\nXHEoa1ofEJLIGkoiHHhVMAqqasLVLIx9bP8Wy4axRaDn2w1Svug4DWZxCS+7\nkxpaTnfPbLvJub+mNqNfwrzaKlpTcgWYb368smgzxnJeg+OHMtPDNoLZcqaX\nVpLS9I6WYi/N9UDH/V+w/Y4HUKYvKY4UP15crITboSEv8IEyWk4ZMD9PTXi1\nSA2WA9tcJkjjDpLaidRtudjQmCLLj76BqBKJtALUJl31Zs2jwZ8Vpg8PECS6\n1BjkOQrNQDOn/9TJVsCRA7Y0Q2x+MprJY2gkzcyUcLmENKfgjeWk+YUZt7xS\nsip1MTu3VGsmZTOj9A2lfavlma1AmUCDzWhq1eqhnGEytn9DjH7ndozDtXpY\n7ROWA0B9cCgoF0ZFZuQ3yMlbnTPXHRN4yySew11R/Bk/cXxay8zVD6/bAWTf\nZ5mK\r\n=j0u5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvi8mG273s5842YTcwB3UEhwSjj6mxClmfzbNgw69U0QIgGWyFCqspqsG39Ii64WlACgl09Gem3I+nuDsFsBOCrFg="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.11_1610877831454_0.07436472993013776"},"_hasShrinkwrap":false},"3.0.0-beta.12":{"name":"napim","version":"3.0.0-beta.12","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"9d1e38bdbe3e231320b7d300cdb4b2eac81c73fa","_id":"napim@3.0.0-beta.12","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-SyGjv85UShwW3AnJY+7oHmxIQFC44+2+OSwqIZ/TSpO+20ogKYjuf7cggpIoZYIk8lqq0CAxpCeujh8wm7Q3/g==","shasum":"cb96d971f84b203046e8f3aafe6650b2c1e19416","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0-beta.12.tgz","fileCount":23,"unpackedSize":35131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBA3ICRA9TVsSAnZWagAAjToP/jmaZ5gIS2/kVNNE2GAN\noptNlpsLp43t/uucO2DxHhi92dg3vdhmluyhx7iHzDK0a+zj3w1RRd5y/2bo\npSXm6zz5KFDxkVEuvMxBimLSBh2E+6k/JDgMZWwhxwd6NYF+pMtlccallpl/\nWYH5Xi/vdrmfA6ud3Ew9cH1bstBs7w/iiV96aVa5jqrDTjk17BVeECyO82s0\nb+AbC3J7vwKst9KpIzXawoRO/FLOlR0ijyRL2Ihq/A7Sjy+s/J0+7NaWD9Sk\nXXq6wiEd4JR4ubCi3Cnen5/h5yaBqXcSbVYKgW2Dx8HtriSSOX19fRMgVR5A\nG3AGhkU6+ED71G6ZYenULoxAKyRsxWvPjfHibgBtg5pJm6sTPE+Ilhn2illf\nDiLHhHlTgmDbSCI8EFeJu4ts6RVcq1mWatAfiPGQBqwI9o1dZT1AOnQRyLbd\nIMMbnYDpzL+Pa4UzCF18XBzXhSYx5DDotayfLbnEQkorJvKhV9ubTZzR0zoW\nmYhwARqUPnJ9qaW4n8wexTZ4j9dumX5qosdBXj9QbDaT7/G7IQBdSdekkGxk\nZYq2Ck6k0CYQ3PcXYYbRaHJ2X98oNHXqe7B7RWbe3qjgpdapEAAVyI9UbLZb\n9vYAGEWToTYE2Grm/0Mc1RRXYo6MZvZNFUg/+BowadVvcI6/xiwBK9UOIZ1U\nJy5t\r\n=Dg/c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjzGgat8zrNqCZvZFB4Z7gzbOkHqyag1yFkclG5dARqQIgBkk7AHT3PK8NTD5ik/r0STShGze2THPKx5mbipcWgko="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0-beta.12_1610878407846_0.032514138140259385"},"_hasShrinkwrap":false},"3.0.0":{"name":"napim","version":"3.0.0","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^4.2.0","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"gitHead":"f45225c6acf28b85c55d765ae3d01f45bc468a19","_id":"napim@3.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-TzSRRpjs5nkkB28IuJ2N+7US5S3c0Doy/bakJewX73sJHovLrARJKAGgVT3/Br2hLfgM/VE2YJlDRqoe9IsDfw==","shasum":"48de4d4919d886371cd74ae8c835ec623d7f9dff","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.0.tgz","fileCount":23,"unpackedSize":35679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBA+tCRA9TVsSAnZWagAAnccP/0AA+KlyAHY2XpCyjPS0\nPY6mXhm8gILay8pkdJ/mdqK1Dg4trupmcFE03VQeqRm5l/IgCexxoBDK0jT7\n9WGdz3tZq3s9LiTiKGrrnUWPLjd1p7xL31K1c3Lt8fZW7Jlnz2v5UXEwRvQJ\n2vpRG1AzZyRh5FSKsNOmXMgSa/mKRAys8IINFyoRFB9+ETg3Maeu7WGwzRxe\npEONg6loYxcWhGaK/EwFdelqcSwkmkDv1ZH71GPdGNw5AIRCXeQIbqTBNVl9\nsUREuJ3C/ugOwukBPPuL1PIQ97RB+wwnZePio2FOU9KHG7WKtknj87uq+GfD\ntV5N0V2GEslonrBD4oQrKLHiyGl6J+r4Ekm+rd9VFO7tyH6pjKxtLRyKjSlU\nNQqaUKs4GPn6+Jex/BMGm5ASiqPcHfcWMET7eur2QSbmT8uSGRbMy8jB27Mh\nQkX3ioOkTXbgXK4aMgb8Ai5EZ8f3cKnOOlHp4Sq4s0foZ/3rI6tyGzmBO9vf\nzC/dd4A41qtgoxGqpx2n9ULgcr+K2mOTnHoxkdy8tylLaALUCbLHKJ8MG6nr\nE8r+390LMxRrZBPcXGxeA1+a1vk8WxYqbDb/hWmuuOuNnHFx9O6fSF2GdgjP\nT4PxvIjJjvz6xZl7FiKve70IsfblSDcUjCxPNPhq2DSY/edtSBxkVLx2wBYQ\nIDja\r\n=prKR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICk8FfPiF1H9ZpkiyzDUHGg7OcM4JmPFdxqZ5jawNwaMAiEA09MpYwWcLEYiQq4CTceBLdDEdUA2AxGaKbbu31e57NU="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.0_1610878893421_0.6793742189900629"},"_hasShrinkwrap":false},"3.0.1-beta":{"name":"napim","version":"3.0.1-beta","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.2","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"f45225c6acf28b85c55d765ae3d01f45bc468a19","_id":"napim@3.0.1-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-rT9/+wajg/fl21Y5oTK9K3RzyOGSQDMqD6cU2Zp0gQvVC2uEmw6v4C/tDH0sj3RII3M+N4oleLkQsFuWkSm3uw==","shasum":"c10c14f7b0d26380136b3695418f1c563b891235","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.1-beta.tgz","fileCount":24,"unpackedSize":152323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJlRuCRA9TVsSAnZWagAAyXgP/iod7Q9ALS3rDfnVlqs9\n43XDCjKYU7IP1nqD0/lqpreKr8F1WGi8gcQ9XZ07O9M9F6I13ELfPEjXRr1X\nN3iUKCVuoHb4HcxkJrCmay/7G1QnJSvCZ09broCxFqO06tc2jDDGJEPdu3Xv\ngpRsNqJQI7Wmn47if2LM7+8/DOgnGamGCtAEyNyYXh6TXtky99B8a4MWKO38\nzNHeusdC+3GqCZCov3U4AWmwRvTTdic/NR92c9OYuW3tlUbXRaFEYlNLb/ts\nElev2yG4vJxGcIwvERwqJdpAiqiJhJBEpnfBCda8pUVCHhtuofi/96F3SABh\nd/s1wpfAeu1FiQgt6VbgO0XSeVET22cTUdq1d8lfSGOJ/ljRGrkCJ7jTujql\nZZGOpGpHVuherKnlesKxWtmp7ITQ9PLWPqpoW3bhBQKd1UYf32YN0VQohDQl\nVXJIYBjhTZiPTi2cQv37cEFXQ120UGFLxWLo/PYzQujWbPPonw5g17OFChO+\nwjJyeg2+r/qSuqSBY8FZforRsASdZCAI674lcbVCSEZ0ZcGhAjUMGThAd+hV\n3hCxiN6wMStWgDLIf4Ua+ku/AjaR9AkaEtdx+GNA3WJmYaGeUd1R9qSBcS01\nxdurxBeulNvautCRhOaGi5SlUObQdZVDIc1wPlxqBPIcDwl9BlTmfIOn9WGc\n6LbS\r\n=Wc2R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaSmTmkcRBMRSfzAaKuOKP662D8eUrhoWQNPHrU6eyYQIgNHOa101J57yaLb9ZzSgBd5s30089uSVIsysV1wUWQSU="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.1-beta_1613124717792_0.5365904022024357"},"_hasShrinkwrap":false},"3.0.1-beta.1":{"name":"napim","version":"3.0.1-beta.1","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"5a6f4bc5b2eec07df5af3cacc3ee0aa158180914","_id":"napim@3.0.1-beta.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-f3iTO52lgqgrhoQOo/b3tRcJK+35CrffY0B0nTdDeRKo/tK0jY/cdrifCJaeG627eT1l9yaKzXMjDfcQxEic1g==","shasum":"1df4d84294e616ae611c66e024596aaf46f0e10f","tarball":"https://registry.npmjs.org/napim/-/napim-3.0.1-beta.1.tgz","fileCount":24,"unpackedSize":152325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRsrsCRA9TVsSAnZWagAA8jMP/1/b4GwU7BbFDBA9hQGt\n5Iu4T022H0BrDfmaQhIJ2Qn8jRiPhaUy0kEUWMK3beC5zTAw/whtXPSmF1ts\n4jjFStp9h9ug4dPLJJ3Hg+6YQNfFssx6h0qYw4cknoWg4Hf7OewrKucrqeoN\nfgw+1zRMU4GFgZZ23weQgbVKF+p8WC0dY8PBhFjTkywl6zJLQztW44YzX2sZ\nD8UvxKGtmiYsG5kvwdJutgeFl6HxMdnkmy5Lu9YEDiU6I1LyxVkUeZr6D36q\nLJxHVCBdi2A0s2UkfeJimiDvoMWQnY14UhzeeS0IDHvrus1fJ3X91sEGnyQD\nO8l4hj7AYOO78MxARGrIpVUyBEW2mwtt7PY4L+v9ci7Lu3Q4NhMwMGosyp6G\nyhp8Uf014YLOIA0FoVnbxHazixIwwKFL505CrUwFm6pMT7/XK1d6K0yYuCYr\nu0PUSAmOmNf032U+5jeO/YDgTqdKIEtXyG9zK6JYzwMrauaRqUq4BZbML68Y\nb2y5q/SEZIUmXlmLej4H0I3BwfHEDeh8FO8CwcUD5Uq2naoGbpjIswkb12yc\nvch2b2M2b+bGQ0ryQhW47r1VWMmzE7Pqk2gtOFHYX138M4XtJOZMdfr+DfLE\nCpaKeiByzFDE8le6p1s3dLVhaXIYIpCGBKJLGwkQYTkk4ZUVgLzCLIFwRNiI\nmsCC\r\n=tlDm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMuHZSlxY6rWLiMSbFzXIqLe090UEQlJ+1jWJVBX4YdAiEAobIu9rVCA4nGu/2QiVUyUOUsEmjj09qnPVQlL6+JQ1k="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.0.1-beta.1_1615252203870_0.6168556565814955"},"_hasShrinkwrap":false},"3.2.0-beta":{"name":"napim","version":"3.2.0-beta","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"fdd79981d51dcfd2c105c6542634078812c4b765","_id":"napim@3.2.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-SE3VCl3/3BRYuAMC/Awd9NPxpd1xQ55V+a5fAUUTzHByPiJDtdOEJ04iALwn9xETgWxIUDYj1f2Th9wLNcTgCg==","shasum":"bb9f984f24b133c04d85b0ef2c785c74859a940a","tarball":"https://registry.npmjs.org/napim/-/napim-3.2.0-beta.tgz","fileCount":24,"unpackedSize":152933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj5QJCRA9TVsSAnZWagAAERcP/1mVCJvC4MXSSWph6/V5\nzRpM4ZIBtYS96LIocWhFYBlt4sEVr54oBv5sTkoWAV00lcbeeYnKoscpv+aH\nZOL0E1ti1P1tZJqL8Je/uE/WY3kuGu5ZdOxbbis1xuecmVhxFrsMCMsQvtTG\nYXEftPgckacRM5ppn1jZdFEHMzNeou289BThBsOZylO/sE96yGiJAlweVLiM\n2F+KV5VBhsz6XbgZU87wOqilF9d/Zhp29/jNZHzxKftrVMy8OwYLkr86zlY5\naCxZjhZRAHtf77I+jBkt0Y1xxK+Rb/qs3dsE6VY6xWIOralZCKGIv8HywZcb\ntUEI3VpKr6tKhZf7MVocQQpWt+lRMrgOzGbR8c55Xpn0CJntpfFbeSaTZ/fz\nSFL+2KA7bonjl0jq1ZaJ+JYzTIxMwQGyd/ZsunObZs6RGvMzSwdz1IaUHCvV\n40BLy13gOm/BHylFRzLqH9vPKPXQtJP4OiDN+deWfVQxeShkM8AHdgn0kycq\nIZSKrWomrTqAcTcuwU2SMeIWwhJqb5OCzthkoBveEmo1fd5Dg5SuGEvUndYy\nHeF+pZsO3sNr6fA6eAcshdpEKQVtb73Bm3JoC6MTtQNlutMdijFTwe5ABKHJ\nAieMWv11zyIN+ybmhCRPa5grjyU+XwLguTTz90uX3HnORDtqDRzsHPUgVgf/\nqfsN\r\n=D/um\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNaRubiMbWP6oaI4VvUhqnjdsrG8MKRLI1gOCpz0KMwAIgI0T35sT93j69stujcsqr8z2IVCvo4q5BNwoSnq557Uc="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.2.0-beta_1620022280458_0.369395433946486"},"_hasShrinkwrap":false},"3.2.0-beta.1":{"name":"napim","version":"3.2.0-beta.1","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"28091e308f71011a8aaa16ce2a1beb027eb6b35c","_id":"napim@3.2.0-beta.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Nfy3csNZv8B/8VVOsYe2H6Jw3mJ5gEEsYHGEeoM8lG6ob27IV8gzIYDWcb5Yb39PWyhw8NOJPUBXwSWM38xwMQ==","shasum":"9eea21cbca05d6a752ba7e319148f6d14320a15e","tarball":"https://registry.npmjs.org/napim/-/napim-3.2.0-beta.1.tgz","fileCount":24,"unpackedSize":153224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj50/CRA9TVsSAnZWagAAQiYP/RHYiRGEscAQ4kqEJwIl\nInAgO6rdmhmvCTxqGny2Ir2fxg+y4bcORn0HpYtrFEpbsH01ygD6hlxfqxPy\n+UBKjR/657ixLxinoicumDAeLzZkeJ+oyJP3lqz6qMBlFQdrbQ2MMHLWnFM4\nsXkoYx/+bCmU4q9PcGBnYvUQhQEzds+QLDhC426Q51kWrbdydcrvFluU8oAF\nCVgZc1XurKPrAVcGbcfvT5SwMO/igAdIYC6WVPF2Xyt5Z+0lOUSLJ+6T31Q5\n2A54CTDEeg/5I4ugAtJZCNZeTdVbZxL6M6ne/SW4VKBaqrdBX93Dg6sAXuL9\ngQnRMdi6OFup/cHegFJTS/J/s5ieo17OnR87Uk9TuJYII3PSbt1yQZNGaLDv\n/WA0WC+5cuyr3sxenC695XepJIxnuOsg8uR14NXgYTAXkQBzfJqmR4Uk36Tz\nV8aS5D18dKleT9nrmsTTck5dvT9bGWV+FA4xo3EMNOlv92vUTjHJiYa/x7Iy\nvA8vsAgU40SYQj4U41LdwyEUSebNsA3S8TPg8XKxX7BWqhWvcSo8HEaV0+zT\nkZTFqVaAZyXydjkMrpx/fShOBfL5ONd51BWTHa+3/Np28WRW4dqsc52qLyRg\nH9VLCrsIrBN6t1PwidDVhHr2YV7A6s32zLo6t3N8vMxSVVk+AJatNa+PBYy+\noVTT\r\n=dlER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZK8LrWNBaoTbQA4qJQppU1I2FnbZaFglKbPfcbZzLQAiEA3fKPvqbbd/+ctpUMCWkLrD6VvwbtB9U30v4HzrAGklA="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.2.0-beta.1_1620024638990_0.4287068613448144"},"_hasShrinkwrap":false},"3.2.1-beta":{"name":"napim","version":"3.2.1-beta","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"0c68777ae648a9cc4db4143ebc7a122f242ee05c","_id":"napim@3.2.1-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-EMgmyGblIYEdCzzcKe1DkSd9/DduRvynmNKyF+GDqztg39Z8zaRq8N+WFjGqyiitf+zCMGF0nLraIMtC9/VJxw==","shasum":"55ac14cac4b92e2415c28c5ba54ea0eebe4a53d6","tarball":"https://registry.npmjs.org/napim/-/napim-3.2.1-beta.tgz","fileCount":24,"unpackedSize":119288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgppYxCRA9TVsSAnZWagAAWZgQAJB3jJXK+EUi47XIP0kf\niYSP0GxKxN/W4BzNc+1FT01FZPxVCaNK0OjjE51lfWUAYAefwejU2gFsUyws\n4naCn0n8OsUCVnOxL43Z1GRURWLeeRkgHq8YAyajnSDX6Z2loDMuQN7H9Ss9\nayQeJAlkux3bfKf9QrYAnvk0YoLP4J25Jw6Z7M7PIeMaCLELVed442oFfpDx\nBLycOvWvH9AA0EEL/RR9VnABo92g15FNynDGyv68LN8rIdO0iBKEnDWlJDUL\n7zJAkGmbs+scC754PUpQ3SzgMDufWCXHlBVKfrAKtGAAJGhRVsZYxwxWaYpZ\nibBAvMr22Fhb4tCajeA9GInGFFYvRD3qzl1wu+S4b3Jl+nqDhcnqJO/05+0G\nfKtvGvdv85u6uNZ2v2h2HyxjGRppHVSCF1Jp43IsayLgWTPJDmAS6cDY+koK\ntU6PFNaiUqtc20ypzBVGejERsnucGvboPQr5CRVFI/uxB5RfCiOf7LtfJanc\n1bDeHg6uddReujf+2TOoQMeX8+y6EbiPO/n0MjqgQKs+8MP20RSGN3mUIF0a\nQ/5vxYNN03zTsdHNHMdJr/OhEPndI1cb42XkBm/WKBqrkjHt3ufrErXEl0UT\nHwJ5H0HizQVJEPa78j7/OjNQBGtz7hW29agSXCLx2SGnqC9UwW8eQNNBrbBE\n6RVT\r\n=cf0o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC/piC0DlT/cv8sPOV0GNI9s3DQVeRXdC6+IMRilS4/AIhAMaxlekDb63Ix0L77kHOzvsoddDoNgG+hopd6964hcBl"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_3.2.1-beta_1621530160525_0.02929662402338784"},"_hasShrinkwrap":false},"4.0.0-beta":{"name":"napim","version":"4.0.0-beta","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"6d340b8d6e287d59f155f571d5a096b70fc81849","_id":"napim@4.0.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-V88ODrDLnPqJc8XVLoayfqX6+CNoCtOnePxez4m07qnUAECTmPf5EVvo6U7uOI7sRgCzuNrVMQIJ467/c3zBbg==","shasum":"8f81fd87f7cce0432eec28718ab6f51982607951","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-beta.tgz","fileCount":24,"unpackedSize":113254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpsWyCRA9TVsSAnZWagAA8OkP/RN+DbH88UnPtCx0IZKj\nAXdcOhnASEhuEisM2a6CY7+c6wNb57KCXtmG74gq7T4F4o1XL2fc89lBAnsP\n6Bksp/2PVdIXTRvprLR3ucbp0m2x9KkJ3TZ2X5tHWS5AJwXlozHaDpPeGMqi\n4YSDWhHESWxAv4rx/dscP61w5/luZjbFnO55bhgZZXswZHADf+eYmFrbHiDl\nN/Q8Sj2UsnCmbi6aMHi5T2sCefz0MUTueHZQ2sw06tucUp8T+QCdaCgp1V/K\n0Fj0vx0hosFB/mZJU8Bxecp/PJOFuJujN+tzSE3vq4rsrsxAG0r9I5Bw2Wa8\nAofAH8vH5h+VZzNn9owhkOSOvNZxAo4XPGjZcgcgzTYrZeY2PX/JciV9DTN7\n8ehrs3gvPssH/Ui/+3fDDwNssSTzp23hITZMGNqmjnayk28s/XHZdu7yxepG\nhZvXI6dB3wnJsAPIwhua2FPTrirYFw60zlJ1w3WUMMa08JF9NgMTSp0KbgZ4\n2kbtKCPjm7snA2kDU3NaBisv5WazclLqSeZHLAeBY5w1sdS/9i9/oODz2Cei\nFjRk8c9iqMnCe1QQSMLDQvcHDXe4zbpj+STc19HzGX1nM3VeZbPnUNc5hlMk\nPVUPOBVfGobLreUlmyE+SlviF6Xspn6V7ETZmIowWZFf0uuiU6itTaV7i7d+\npOlb\r\n=nka1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDURTG1xd0BEJ37C28Mhc6ZPG8q1/kFWCO1CLJoFYFO+AiEApkcjgBvLar2waj0wDUIGDcmhRrqbYv48U0ZPCTnEUQs="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-beta_1621542321723_0.3419501171610835"},"_hasShrinkwrap":false},"4.0.0-beta1":{"name":"napim","version":"4.0.0-beta1","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"fc556d5bc1fe426e45354780c3a950a5d581d118","_id":"napim@4.0.0-beta1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-D5ULBLXAtjzWLtLExcd5qfxbMp/wUqV1IwBA88aDjvv0QJuouQuO66CxjbK7eTRsLP7bjH80s3Sq8FKNGCLAMw==","shasum":"5fdbbe23776d8cd6f603954d9dff7f2581eb6ff9","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-beta1.tgz","fileCount":25,"unpackedSize":114324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqB5qCRA9TVsSAnZWagAAmfkP/RACzmKxnA/ej6q/PCLV\nwpkF8Q1LaPMyz+b4uxyC2PjrYO1o4FDGDxjHuTOhGe8bs+4iGBb18DdrIy/E\nOkJdZbwRjwy5eaui6HznvvchT/epPosmgg//TwwMzzSj3oUwCFL7RwqQiUGB\naX3e+YCXQvIvvGyAz1DfpsY8I0ejtBEMUkmvonySM8Hb5eKWo2O04vnKhYzP\nPsRC9MBTJCKBP9UX3swQ7Y6hH5stS6cNPiitcEaoCrrPcpNd+WuehIjievBU\n88C13JYXn3OgXYBy7fsiIQIGJzNPQdZ4Ap3TT6HUVVv3ZGrWACiVTOyRR4XJ\nmAs6l0YpUMenKbmzFJmpZEnaB7H3P1Q9ndNZuh6nEjLgB/9Ais4qRJ2+FWS8\nlT3rISz2+iaffpWbkJgCih9AJ6wbzaB/qeSvQxA/DBefFBmX2EMPbxE03zP3\nfiHuHMnqhjahBIvSips+9wsV0nbYx88f2pZq7N5D/sJw73JU4ESualvUVExb\ngtVBrj95uXkifMR4csG2dFYvpYB6abZHXZLtQMaWSQ3qhbkf4j5neUCCiG14\nhbApVaJ3n9xnCJhElMJGQxRoV0b45GFQY1ztr7tYYhuDuPmvCV/fH7Wp9exc\nXhW9Eo+j3vfOPPOhbaUBuaC5t+vlnnJO61sSKdMqi0YL+5MXKoZx+izCWGQr\niZFU\r\n=DXY0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWain7MsvfO6QEKHJr5V1L8OxHqw0hlHwBTvNQLvtOegIgUipiWEhx6UQ3wD76BPvUwPveCrJMSpNyz69rzNh2LWI="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-beta1_1621630569807_0.7119543443902976"},"_hasShrinkwrap":false},"4.0.0-beta2":{"name":"napim","version":"4.0.0-beta2","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"b90d637678ac80f2509640924c5e48372fdafb08","_id":"napim@4.0.0-beta2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-HBTcNWcahw1tdNDKNdpDw0Uxmdy8Ge5/FoP7qlVxMz0VdRe7vRQhBeTciJddGEY4ENhL+1a6GAOMPQ9BbnEVwQ==","shasum":"5ef1e526493b3f5ed4584fb4e159c333e49a7e8a","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-beta2.tgz","fileCount":25,"unpackedSize":114625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvxA6CRA9TVsSAnZWagAAPioQAJBTE5/Rk1yhVnu9D4zg\njdeJv44hP3eSayIvGifVrz9Bh3BA3+qvaBEGtNylLOMIsuxAB9f2dBA04aml\nErPiPxx9L4W2xe3+GOv9w8ykYXpu2Isx1AVInn1FA5vAiq6vg6khMChlW8YS\nrVoI32w0dpxbFG/Tci5DSEAf958TpkZrHnY7KjAr+WyfvJnZRifJU+VpsmNf\nmpkbaldsona2Cr+36dJ+4Gl9eoR2CmFy/hxkqizFfO6jhzRAA7lIj2g6lLVp\n6bX00XKVlofM5Uy6ZsCtiedCQVaz0OXS9tJcf/YU/MSnivmckRiMv4QrYQnj\n3grLvdo3y7oildyeWdSFD0HeDuNyxltntxJItoZ0Kn3sKee0PhBPTWH9gULG\nIkOair8wu2h5m+4ckJ08va3tObGzdHTbSXr8YdLfgkKsr/h4Cw4otwJhVlkF\ntmbS/uyBGGkKHg5URI0xZPHgM6f56brBO3RHTC1d+dg3N1cRrfNGlkPQnzWe\ncEvlX77q2ulgNp5ctn744aaeypZMSWifRs0g5APqJhxh5Tzulr+2d/c8YvLN\n77WWNRnBhDxkSmyzyBCaqX3p3LSnbO4T8Wqwuz6VdZC4SETL6PhDEld/wiQK\nYU31vAl7IgxFSrlXU71Scguig79cou6pn2BYx6Q6xM5Q6Sx+y6jAGFKUZeaL\nohtH\r\n=Q/YZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCG0aiQOKx1Z0EAhrhZXXOsO6RdALcyHzKUaJyPcOm+0AIhALZu/Z/rxqO5FHi/Lnojv7jB9Mkl3ygaz7VKGq6cCdof"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-beta2_1623134266077_0.24628045186329506"},"_hasShrinkwrap":false},"4.0.0-beta3":{"name":"napim","version":"4.0.0-beta3","description":"Node Api Maker build with polka","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"watch":"nodemon --es-module-specifier-resolution=node dist/index.js","watch-test":"nodemon --es-module-specifier-resolution=node dist_test/index.js","build":"rm -rf dist && tsc","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-s build build-test watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"next","polka":"next","simple-node-logger":"^18.12.24"},"devDependencies":{"@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","sqlite3":"^5.0.2","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"0113cc6c9eb5163c97c0c0996794333d572cd8c3","_id":"napim@4.0.0-beta3","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-kFH4Yb/wId7qD9qkw3FXnSVy+wKDO6xIJ2z0ZlrNj4EZoYFpL9JSW+saF7q9R66oDbzyvFyBmj5oRNG4exYQOQ==","shasum":"42b1a45ea309d9b5dd684324467919e0eea1dde7","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-beta3.tgz","fileCount":23,"unpackedSize":28264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwP3tCRA9TVsSAnZWagAAHdMP/1JZXujYLCmJdCguS+cA\n9xb4IEzGa2vKV8Ckst9rVS8mdsVT+KKwQFzac2EUII0ogxkni54MsszCLRKS\nYVO3402ATtqnNtxmlg29IQMagg5fTMCQebLFEpsaVHSb8A4jEBIK8aUQhcgJ\nQurymK4qQCC71ygPcczHFfq2a9ajsxHRxu1s8pUKu2Kty7uyNhG4fno/lVHd\nd8mF71FpsBuVEfAaz1jUHbw6YBWfZpaODqQanTBC5rMQYzmoshIAitkqF6yA\nTbiRHODibLIWfpYxvJTgD3+pdaL0Q44LHNjtMD65qCaPeVl9UkvGalLKcPDh\nOM20r74opFuD10YqbYyccAvN80iSFwUQr+YBMpMg9M9ZM+cybukp01UiHAPG\n1LQxMyQQip5QYuKZ93xDfuKPmQ02eK3w/v5OHlCnZN4MMJpu+vN1G3htMHGs\nPnrdlYT6UkM9S7FceL0I1GX+MoPU0yVOuAcx6swoap6MNrBfRL5pMFe6hgdX\nc/mh2PoYdJZidofj3nVzCftq7HaHU7u+6Id5B9K+WyF3XO2W4YbLXkEagngV\nS9ZlFjTk47sulZSsDQuNLucBBjV5F/mlc4BmKTOQXBTTkoKGVeRm50KVDTS0\nbLKepNYHN887NpQrydh4u9ctv1Ki5rB/88ADlYnx9qClFXOb12QyyLNZbqIu\nsEVK\r\n=15QJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcZxXrKGj3aG/KE3q39Y2G2vmgfEIHUpKjHGYGubttkAiEA4vd3W5ECgBvJUwKPfKWxhiQPE2lYKmgTZXhq5rJmpx8="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-beta3_1623260652876_0.2525353516930231"},"_hasShrinkwrap":false},"4.0.0-rc1":{"name":"napim","version":"4.0.0-rc1","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","exports":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","rollup-plugin-terser":"^7.0.2","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"07165180d062aca54b509ccd62550261de8c481f","_id":"napim@4.0.0-rc1","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-ccXfYXvlNMGDGJqc/9O7FwyL3N9POoXVRqaRYalMGi+nUStq/X8VUdXlp6f4Md3nxSsg0l9DLibmmfcE3J2Jug==","shasum":"5e362bdf33ff21d8e2c0886b52015bddc8377ff8","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-rc1.tgz","fileCount":15,"unpackedSize":30874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2/fvCRA9TVsSAnZWagAA78AP/1GYYnAKne/tw5rRtnEq\nKNBuJJYrJpKc7+xRPtCxQe2Jkn6PSVaMdWBVqUG+fEezHJb/873ywqDSmOWB\nreu7JGvXBpC2DIXuJGysYWRdB8L/pHGXJu+oA0Ge2qRNVyIC1bMr0UnFGMts\nz/ao5I3DNawjv0NJHEB42nW8VDtFDANbULQTEqzVApw4rz8sgbIhI7VavuDw\nRtQSaRrkQnnsa/ct9amfXJkG9Qea6yjLkhaUsd+N3EUl7ys+eYxVafdwRklO\n4Owk0nqHuScNd9WzUVxLI9awAeRQbrBbKRzPBPup/w77At954ahpsrsTB+RR\nLrJxtAT6DFzEl2tINInRa32NuiuTiO9Jmd0kg9mz8gQoNOkFffX8Qln6Jp9U\n0gI11//ekYKB9T04Y0iyCwqoPuirzQB+8QOAFgHC/lXEDsq8TZ5YMamLiFxu\nYHK0HcUfYqIhDnrmsT/tVTrManSoQYfs8eck3jRK5HNupkpSzm42hIRt06LP\ntGndCdXXT7NSuxx41Bg9a4oanS0lpKm9t280WxQNZy1CmnIRHVN8mPi2SgD1\nDuRh4+m8k8L0HBKRUFsMm9LAprbMixUOBDCS91RXywbc4vZbhtoOUg676/Fe\nZ0SyAdjjKze18Rtlew9zyqXEMZUY2mGva8YokqjHrjDT3y82lEKzeKThTQxE\nuTiP\r\n=LthO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyWphU6555UDJkbALvqNblZHJ5pmPjMwFC7/7ay2kDNwIhAO1XSE9YMlPOJ5GbnOo61agNnntzvgdtcJNqAEFrGzFK"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-rc1_1625028590573_0.6800111767435688"},"_hasShrinkwrap":false},"4.0.0-rc1.0":{"name":"napim","version":"4.0.0-rc1.0","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","exports":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","rollup-plugin-terser":"^7.0.2","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally\n\n    `npm install -g napim-cli@beta`\n    \n    you can check by running `napim --version`\n2. Generate Napim template\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Express App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"641fe23aabaec15d6426fd080f9756e45c31343e","_id":"napim@4.0.0-rc1.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-y6b2hu8N5K33u8BLzfXZLWRPdVfVVNB4KhfZupbKgWJ0E8RPNJch4RnMpsQ/BMk1I6Lr6ec/BAyM+7Tg5qhM2w==","shasum":"c6e95e9207fe7dd6e3da9e121a4db00786bf3d9d","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-rc1.0.tgz","fileCount":15,"unpackedSize":30876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2/hzCRA9TVsSAnZWagAANEQP/1QNSDvNwaV3Zny8Z0Uk\no1+pMNDCBzhLR8vZvbgmAk5LG4PlELFLTIxPYNglVqNJKCHgaPlKSkOQElPl\nqTbQ/gLQ+zKkTztYfs+E5FsLYX9BzHFnyqzvrIfvgXMMoGboOzxhs3maVKEU\nwqPGQai8t+E2gqKqXZyVHISdtfkZ19f9Isd/8S7KcDhyKvwuUlvMHnUreu0I\n+ubReKUWbtaR6WBNu0JB9ax1H+FjyI9uU9DVtYUaoarNKswW7ktRKq4bVW8j\nx4tLYQJOxjd4VM9nQ0yMbx2Ort3xqwJNIosJj+DxrPXtRZOLKzrRhPS7t9Z+\nB8WXkACLPGh06Z5xxXGM9ALXiT9M1pBizQZdE3NqTtsp0sjS3SR8zcOaM6tF\nG7H/7jz8gnz2yFzPmBSZPUqQE5TeVeKV8vhTXwsz/tB91Bk5Pf3fnbFigrRq\nak5kGcLKgDQjnYYzsq2aPzyHAVDnFJgLC5/70t+YRmr2x8YGs0sMn301hMk6\nAecSQKHAMg284iEpphRN0GQx8fmHVkoYKbGj6njPR6DfmaKiqSo8VPEYEice\nvQOJqxVZlcxIQ8r3BEmKl255W+2qoqWV1C62GPAQUKDnj42M3dM+wv68z8P2\nNQKh9jsfHNJKB6HBrpnVWf7SPXknY0ISqWcC57cNUnh+1EEfThFM04OkUqg4\n+BHc\r\n=EF60\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICFW9wn5vF8w4vW8TK30CZ4fXv1RXHsOH4xSw7IYtAWuAiEAmYTsFetk4T/GSmB0pZdes763UFmJuTyG+vFa5brtJfw="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-rc1.0_1625028723287_0.2273531882550004"},"_hasShrinkwrap":false},"4.0.0-rc1.1":{"name":"napim","version":"4.0.0-rc1.1","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","exports":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","rollup-plugin-terser":"^7.0.2","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version (currently still beta)\n    `npm install napim@beta`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n    \n    \n","readmeFilename":"README.md","gitHead":"32fe771151cc69ccd1a8522d3847b00e49f26e4e","_id":"napim@4.0.0-rc1.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Bp/p2lhkRWdyIbfg0HC43VIOU0Z1zH2OcJDA+HM3I0QxGfawLEBOimd/hwyD3Ohnhv0dxmKtT5vf/gUdwskjZg==","shasum":"b2ed5cb78a89e5ce8d1d79f58c44f405c8f08c88","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-rc1.1.tgz","fileCount":14,"unpackedSize":30941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3KnZCRA9TVsSAnZWagAAbaQP/0zDuAI+ZUzKofzTAb1x\npuFLuJOq+YZk75UWrFZ7Bt0fc5Ol/FRoJJ2d5a0BYimwxm5radnLVOWoXecG\nuEALDgI2MJlJKJCnv8fBx70hr392SI9QHypZyYQnYQZ2PkCuTYOwYerzbCTP\nH/3SlM8N3jcl6lPL+KUP6uRaY4fVm3nvLdDCOkqrgetTgCdYU+x0sl+wFEUM\nwXsDVPmOEPI5mbGO7HajpS7eV2/E6Q2EGBLHuPABOftKVSnDK+Zqal5hit//\nvY3+a11NL9ObqtoM5HJtBygMcMnzrRVufaBHO8rMuc2+4bk/V3uTr3tNeFJC\nvT3+8I2Izv4VcrPh8EGtFEFn3DqPx13xZ13YJdsWGe2edtbQmfGkUSxQK/MW\nF01kAGtoxAP6kJpD9RlUmvXM+iWLf6mohxSHz+pc+5WaInYd58tIrbp4VwaS\nuXqaHjCoW2bPGsQ4Nkewr8yVDZlmVLTQ+Qrd9kPAuolb3tuDpMOVSakkr6Ne\nLNiSeyVgf2GOuEWi4qDZx62bBSwodhz06gA+yz+vKvhs2eZ1GltJTa11eGUB\nEVYI+EqtHMpVQZ3FFcvhNscJL4VzA7TQavQjxFqIvFPqvtyBaRrL1HC0l8UE\nr+kda2Ffz0t0ms4BqZWGV5E0nxMJjX+IoKVAcTN7Hm5t8fSIvI5SdSb2VgSF\nEwdw\r\n=DTyw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7nokPetpuEIQDVWRDdk2IQikRUsKpdgE6ZcNivPapuAiEAqTFBZtAYh/hSikVpupBFV3GUMP8I8itkTQDItqKUQDo="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-rc1.1_1625074136739_0.3501249152532817"},"_hasShrinkwrap":false},"4.0.0-next1.3":{"name":"napim","version":"4.0.0-next1.3","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"29985106729cd125b47c5d7d13a397034a7986a0","_id":"napim@4.0.0-next1.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-NWxf1ynyNdU47F32p87Mxl9w2iBLrcjRX+qohshSz3q0tplosfQ1dhx3wziXXaR9XYFnTwsxnOOMPldE969xEA==","shasum":"26ea933995fca84a0af59e795fed0769eeac99da","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-next1.3.tgz","fileCount":14,"unpackedSize":47996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3dXPCRA9TVsSAnZWagAAzWAP/0+XDs8CbrQE3PZO7Kg/\n9TELesKF+7PUHU32bNWHZPiYsK5c0s6Je3FdHuboIx3LM+MN3etpbgxVgH4r\nfnYCYR+7mhRtX25HbFAvBCL+LHXVj5adviSnmv+2FiEMQGFtjSNBD2q6sxA/\nSHnpZoG5HvJ/fs7mxrI7S9uE5KzVh5tV4kCzDf0GIBoPtp6gryVHlp1bllez\nRmhfK0fdcCvPqP7wliWz/azBz42e8CTzuokYGk3LdzyfMNmHnu9vW2+t2gjE\nDv0bngNn7v2HuTyjYVTSP0efl9v6gDoG1dihSS1VAmw/T2mrTn1SzvfUIOVp\nyM1cU6GO+9KYJS7ej0kLBEdMOyW6pES7YHiz6BxWD3gii6wNxyQ7iLItdoCa\nUS2sdjqVaW2LDQMogcTUskXPAn5fZbPYuPnUNMU4ZHoj2lRVyDDaJ3r7DCQB\nem4Gwp/UEAfUzwXKsnkRKn3K7hE4pPPmJ3k3pnf9z60YaX6qbwzIfMfAAgOx\nD7lmIos1Z8nUOO1LgiSzTszYjzueAqG1j71GRZwc/gMcjuUowI9BNSb3Q83q\nNCQ3bN9wH7ZQUR9bM32xc8t3Nhj13FakblNHv1MtkvPL4pJt6l/el5pSeeNG\n2m7k/qdO31Tmzs6+Uy46i3HXs2aIr7wcBP9OGs04i0QBQbpLNIC8Fpkg+HaV\nUwKQ\r\n=3FMA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0+Nms2jwtKXfvJ6aY1rmCIH69OcdkJ5iZTJKI/2xJwAIgedsXxe45LlDKmh5N9bVeUhq02q71wdxVLgFc28edrXI="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-next1.3_1625150926712_0.6369462141162605"},"_hasShrinkwrap":false},"4.0.0-beta4":{"name":"napim","version":"4.0.0-beta4","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"29985106729cd125b47c5d7d13a397034a7986a0","_id":"napim@4.0.0-beta4","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-fPfRAieMLEzEjYRabXn7T+gcaA/PZXnBNxPgcyxhTIN/giq2kkvsUvJkXNLacXYTHviV1XEkjKaWv0xBsorTjQ==","shasum":"42c1718990638d1f6dc4e6a6d1c95d9b61e273ba","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0-beta4.tgz","fileCount":14,"unpackedSize":47994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3dYnCRA9TVsSAnZWagAA4ucP/jiKQPD8wM7rOfd4W9E8\nGrVf7ym16EMQyvxRLjWk5Jon3nBSeXZD0YCBYyFsv9nG4LqxpBuQaX0/bONK\nR907XjG+jJ9GXoD8vbGQF+ZkHheCFRCvDAcLEFxKQOe4HlIbDbtZRjTxPjUY\nuNMpJjlCZWW6nGtvqzg08W30wuaqGqea/VG9Uu30CNbRKCwrf1/AMl2A9neb\n3sIrbJC64oHkHvBjkSOB9iL+BsZBwZoOSGsCw4hE+sHVyp3FJGbtF9aVRw/Q\n9Fusa/M3pbf2MEehEWbHFTBZcsX3EAPs1dkTo7DGShs/cd7Rrf7GGzjHcwY0\nx9sRBhxhBAxmfTf9B+J6Y0idruTrccj/7CPC+AfCMBGZbCnePvK7RNeeY/po\nn76UojlaaNch99OLeJglsgw3CJfrJitoWtYMWylzPYipuW7PKZWUTgBcFAdg\nfvB0y2oHkFFBee+yFC093jWFG8P7S0jt8dzOPQvFnfSjlcMZ4VwHnogC6YkQ\n2KJTQsCpZn8szgkwroIOzhK6htatovmg+GgFIEPu2m7YlYlW9QktKnTkqlno\n0gig9A12IqPKqn4kfFhK6/bSnO6+Ge9xt2gMl8vIN/iXkEuBoxF+L6W8fOnP\nraWS6DnrUJnztMIYSaB/8PA80tNgMQPBxtrZgA2vQJAAYXCkUuYTjL6aN7xF\nnGSd\r\n=wp0o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqfQ8YXj4yFvij3BzVZNlnQ7xrtCqMn509+z0YoBJbEAiBw9valgYgnDWJ7S2w+1mgmcOrV68X+qRMs8cMbbPAqGA=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0-beta4_1625151015085_0.29117927476537564"},"_hasShrinkwrap":false},"4.0.0":{"name":"napim","version":"4.0.0","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"type":"module","gitHead":"29985106729cd125b47c5d7d13a397034a7986a0","_id":"napim@4.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-AnYWMaQJ7kEa2VXGq/Y91+OHxtkBJRrbUyj+qIo09K4/l6brsGLo6+u9kWrJteLzeTHMj3UkLwMQ+xt+R5pj0g==","shasum":"19404e43c06258f2275f56cba87136228524d45f","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.0.tgz","fileCount":14,"unpackedSize":47988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3dYyCRA9TVsSAnZWagAAJ0IP/ig3M9kvH5Zu8h3/dMVR\n7hjynxHrkf/HnF1IQ25Ez/lqMwX9YTy2EzwkfOCFkw++OnzxF3fTbdcCx1i5\n7pejvSGU9Tcu32C8xQH+bLFnuK1DwJYuakObiSc5rxJKWKdTbR8gJdwKdNHf\niEeg/Wju3hiOVB9pp5O0iZYlDea39aAciuprOTFH20Wk2qLwscW74kv246WT\nFjUisWN99DH6MsMfF37rKSNC/D4N71AAsp3oI5J5wurC0nSizb5lMuzEv8st\nM/85TOH7Jj4Ltbzu1c6tfVzgTuu39RwfqkPwa9StMdaNI2Su0DSKGpHnAw9E\naCqhkWhGNgQ0EicZvkLoHODPbutnGvdUipK9d1kvzz/Icn7c774xcbchQYxP\nGcp/T7r3jkRboA+tU+DBCzVXDwnIyF8fGSTxB7goBk2s7CJGbJGRmkhKRCy3\nPJc67S8iCvBczKQtk9RdM7bsBwEcORZ4OfkCwXV/hcIoJzXHZf9gi0/O7nAV\nGhpruvn+0xAuR8VCDmqDcZYf5KxwPzDoOceAt57lsjBAemTDhrM0CjVMECZZ\nYWJbNkmHPC6QVqhcumd+p/M90XgrmkjCa/r0VZ2IHqhe19lBavS+Fwp8T9il\nR0tPCqEmkb7SW2qce4Y8fjexia6Lo38zs8Fnh1zo69YgLiOHM48H/213wSlo\nbRM9\r\n=ovtV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTaUI5TFWhpLlVi/ulvHnd+bZIKBImdulIeJlTM0aZRgIgDEDxnrjuaU/ervH+45Widl7HtLaK03tQjeax+JaVCUc="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.0_1625151026507_0.32750239940810455"},"_hasShrinkwrap":false},"4.0.1":{"name":"napim","version":"4.0.1","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"29c4aa2f50a296b961c7dada6869acc1e0876ca2","_id":"napim@4.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-RNd2icF0SSwUcu80gKU+uZGWq8e4u5BzhBd8VVR0pk5TwlZ4j/roRkTECoxa1LzDpGDu3hLsqGBdX/MxBbDcAA==","shasum":"b54f30ca80fa92becc0b99f6c4b631d8c4e15150","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.1.tgz","fileCount":14,"unpackedSize":49090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3npWCRA9TVsSAnZWagAAByEP/jskgbNy2U8nBLyHC5xR\nOGRaUUrXyw9fU0nSZJ39avUZdyoK7/hufY1MfJlrgfjSOPuAMxERRbG4Ba89\nQEivASS4NQsiuPlEEXjL6YlJb0Y7GB/f9w8NTWwHnFCmG/74FdMNXM1I/U7M\nwoLD42rALWoVoQUe4ipLf3OFJ6z4hjiXOu6a133FlV2ftOWMPNvoagw6MRB2\nN0CZRqHZkL4di3hgxrkRMZidg4WWi7iwqt8FKUf+IO2n5BEeA5t9ZArzOmhU\nMe8Rj9vUT1kHmDzZF3g+3uULBDNTMMhmn7aW4seJ9dbTevjH8LXuruFD7mjW\n5864KBu9kAoabE6OISUPAkP7Gm5blmgEUmXK6Gr8mdU1uH+jok7d30vAjW84\nr6erUID/4Sw34h1DuS8DhcEsSoVQtTbH01xG7h45xiSl5h8Ais94uY5RtAcp\nLfxj2GxpMxqrJxQbkw8iFnbA+484vSs2D06Mjm11RMr55mR4OtAS2yaTD7Fp\nM+93vJS1feH9+x7yeZXDRwGAWdkpHIE1g2x6OQDdpyGLCcffZpEFA5c0aM3L\nh0qustujFTECjk89zbmgFZw89DuQKX77AJw1Kc0CrbgTuG+S/nuqfz12CiGC\nTFCNROyL9bHZAdyzGxPJLe0Zjpsa5kJ0chNMf7RQKhVvGDnE61WtYSepKciL\ny2Qi\r\n=+qrK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGg8mAq0e2mCMebRZXhhn/zwd56Kl7h6HE4SaK0DILaAiEA0PK/o5Mbfj2tuNnUg73MOoXos36IRRwrpE2iii8FEPw="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.1_1625193045952_0.9795822333890902"},"_hasShrinkwrap":false},"4.0.1-beta":{"name":"napim","version":"4.0.1-beta","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"29c4aa2f50a296b961c7dada6869acc1e0876ca2","_id":"napim@4.0.1-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-WC8iv2Ev9nISdO9wu9YdPxkW6SP8nZyAqTsM6K4OfktROASdfObo5zVeKibSFwRDdPvJm6SgItFiIwJlM3+Wnw==","shasum":"d11255e9e912e4856ed6d47e8200eb7aa67b3182","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.1-beta.tgz","fileCount":14,"unpackedSize":49095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3npvCRA9TVsSAnZWagAAEj8P/icnl4OSwv+mW05MA8th\nF1lygwotC8h+ZmF58nHZ4sotiLKdxAwU+0CmMTmHJtLF0PJbyNX6znV8AzrW\nBBI/0zgE0MDccs2faV92QmETGrxoD1vam8Ab7zB05Hs6YRFSkw9Vq4Uy/p0x\nLLx0NYxFYTY5pTwJSJqurtuY7JizlI/6DDmzQTYTQxR3JgWJhyUqN0U6Z775\nVlA4Z7VPBPA28h0sf/DwWdQnmCINHvr523a5LebtTSQFHPR06EGjQg/fzahV\nIBKFSJBbm5CGlnlYNDNegtNkKVEgDbXVrQfX2Jig+99r0deKk4E7Sb8W5KqG\nmCVjIBEVjW+CRyGPHpmdsJHMjTPV6BiHLUTLJ2H6ManmABGHqAeE4jrDIo/7\n8x+6JrqUKi2DxFC9YDMaQh51gS2k885iyB0bvZa2wE1sRqu7BpXipajhkZRn\nkkqnckNoUCW3XQLPLegQQhXSvRsPp+H6BowQ6cbqn8QYKoaCxIhvZERd7Zuc\nvAqNwQtfP6HLakCafGlX7BPxVz+iERGt7OC+kGpRKUOAV4GP6CvRqNcJyEkS\ndQIckVPaSsweG++wt/9cEm2/gJ9VYW8Atkr6GOdTlE+qbJfYkFb1MBXpxsC4\nFn+bMtlJQq3Ft4UUVa6k+7lWvYpPzV63AuS0E7QL0BJQfR+OiwojhhnbhyHQ\n4Qlm\r\n=doxz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZMjaRYBTXGNxFb6bazo8ar4juQuQuylbla+PiXW4zDQIgax0YSnKVAl0xS2IG8yrUv4LiaYHKSe/DP1X6TwY8UyI="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.1-beta_1625193070783_0.36759427632035213"},"_hasShrinkwrap":false},"4.0.1-next":{"name":"napim","version":"4.0.1-next","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"29c4aa2f50a296b961c7dada6869acc1e0876ca2","_id":"napim@4.0.1-next","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-yye7FL10mHRaL+q8HeswtL+6lbzkuvUCKgM5Dn8ZEXGbZ4aoClCK1f9POCBZ1DYfYQp2+65ilFzRGjnNYC4yAg==","shasum":"2c52c894426356858bfb6c09a26d847277324dc1","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.1-next.tgz","fileCount":14,"unpackedSize":49095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3np4CRA9TVsSAnZWagAAnqMP/RY6OcRAb7HIFvT2ZLBV\nxrLpNMe2b0kbpg1h642wmxR6snZYK84x+XCK1TOvDeY6Fy84kuExhSTrqYyf\nB4Y113+CcBfFYcIUOS5JPLns8KnZjeXn69jSer4fDHwrhld+JrL0W6TCoRQp\nzg145q06JMBdc7mQHnKB2MAm4zWrFcxmiPSy4ioyQVn86ev6F0vlm6KUldG1\ngbwyNpECJBryv1yeBMXi+bkjVxnlxUEEL88YliEY3JTwZLGcgsQE1UbnpEYX\nkYeBUj5x9vgzdzeW4DmBgzJ7aOX+0HGhWacDGfSKw8R9KyORLBwJfHkimdiB\nRJs4OPG1nLAY+QdzebaphyPo2JadboxmeLMFx/YobIcFHHJtCw87+/pCdfyC\nRWgFVcPwGJPOCl1YoEwcbukBhHjrV2BI0TYYEh8u+yCXueSGNaokSQRPVaDv\nGc84hnDlp2Iw2BqRYt3jrruLKLLMEbgcdgAZ2skPMMrFSFASdzbh9G1lDz10\nEmip/hSdrCvfJOW0gw2QuAoiLw7brX5RYi7EH9Jz2iOmdOtR2ZGj7jOU2/5v\nyfblFRUY+cXIrbgiiSfk9Vsdej4hnnfd6IkxVwTW4JRSyJTWK88q3KZaNsbE\nLvekRwEzrkR8VoifVal81TvHFkbaeiE9bnQUIyunfZfASIr0roJsbOUGCU9K\nvdhC\r\n=JT5K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3x3jvKX4d7R84njlDxNZianDduIO+4gt4pHpOOrqMvAiBCOJwSe1Mv9oddyT4jdU6IQnZpooi3HbIRN8lOc9g7MA=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.1-next_1625193079728_0.9773057265897611"},"_hasShrinkwrap":false},"4.0.2":{"name":"napim","version":"4.0.2","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"9c649d857082f7d26913ddedf59b7fa88a727ed3","_id":"napim@4.0.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-POpapJwOBugaXYsnrxID0vEtXpu8yw40kILTbUv+8rt0sY/S0row80SXzvYLns3tbnVmJvVR30Z7jbVr2crZ/Q==","shasum":"975ab07bd8eb3305678e23603af8dfea293aab06","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.2.tgz","fileCount":16,"unpackedSize":771711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3oP0CRA9TVsSAnZWagAAwMIP/jhN3keyiZevJjgWtgU/\ngQUCNRKjJ8AqTmNByWKJ/w3TUbsSC5kgNA4MCEZbyTrQ7Mi9Cz3AsSnWKU0j\nlNXxZtpR2LYwU0fnkMjaFOFpnWRLVdYg7A0xa4WNqX/ADaKWj3BWNV5HGZ3F\nRpSC5ebyP9yu/9/Lrore3ziKwVeU5cMopTvqaltMdohRxTf1NL79n4g+/oIa\nXyMBOnlYMepsVG55b8Y38xj9a6tL93NhbX7Cy8culy5LNUYN6giP18wgK+JQ\nsZ4vcfijwq5YZQtpjvs5HXAWCtXopg1m4hbHtMiGyyfVCfrneo5EvyvpozJ7\n4oSWdof2oKfdULBpQxaVgOaMf61NYGr3zyOIi4t3rFpZzI8A93b0FHLtF3lt\nrfNKSebS9rf/cUcLEl6S3B8FM3tJ/XGRzVIfvpmBEfpNhhS2JxMCyJC0ULU9\nNXHudyqCiBpKEjVbPP4jy0UVpAWtKbeTCPLKPiX2MDh72Fkxv0HxZzOdivq2\nZp/M7Drnj0jnpt1un0ysSyEQXpgL06Ge/jO/lg0HGednRF2pecUmS/mhJxnN\nCS77qD/M5wqI4+F0FHaQ8PyN9pjz5EcLxTFb+f61bMpbkwyLsIRRSRJEjN2e\nTKuX23Xv9U1BCTKpVzMkUOwrIGear+QUSu5SwgfKBiPuGFXjrOG7KOoqqf9d\nguJC\r\n=xEeW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAp041G0R1tcE68Zn9TxrQ9Wlv/pAqKiz2l4gVUYcJkBAiEA1UrAYw/dGkXgwTARiHSi41y4Zjr2vDvG+UgC3iqBmpk="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.2_1625195508258_0.13134120169979302"},"_hasShrinkwrap":false},"4.0.2-next":{"name":"napim","version":"4.0.2-next","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"9c649d857082f7d26913ddedf59b7fa88a727ed3","_id":"napim@4.0.2-next","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-kHAf1xKKqT/EWzKhBNVyAR1dANrTcylQq5cOS/NwphSnAGdDXQWJQ51qvJYQREDn2mIT7ZlXUatGS9yVkaLLeQ==","shasum":"c0a5ed71400f5334966578597f96d77b9e8b8c45","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.2-next.tgz","fileCount":16,"unpackedSize":771716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3oR5CRA9TVsSAnZWagAAt2IQAI2EOyCpy2gGMVNpsy/P\n7zeyoiZBb4FYcHqbK3wVUEjoAto42W/TcB/+uI/qx7rSiz82w4eqQl15vZbx\n2V2PojsK5MdYRYnhGmgI3Y+ykdiAJyoq+Shpcy6hpdtL1km9AgYkCJ+Ue99O\n3ElcqgHqIiooAdSRobc/HfMJvqE7eeSzpoC0k/b/sBdlhibvfbZ9FkuxVOZc\nhIeufCX1bLH/gUuRqIOLcYdvxnA7hUgLLkyX8K2yvIqNi2UTibe1fFbbtpmS\nzgT1SWGf4WNbju++JMyaqq/HPDnGHhr79qXM1atxdT2HE130C3L1dvB8S4RM\ne6AyRFfW2UPY29dZUhfDPLBnfyd2IjzYq0n8T628MIJ1ZbHSvaWR26Osiq29\nE9eBsCBTwWHBHwg2ezg8MbdkzPccIXbWT21lFSyElxwwWqfKuQXLCW2nRHUm\nPYM1329905jhEDsRl+jSRx941ZSj/N9wj8ReivLiN6+s4evAygL38eyP2FDy\norKEE9Clz4mlIPq3JK6lwAh42D2YOhN5j38qnnsOqKfbTOYbLy9cxlIfGhpY\nOKQj9YRHjB8NFU/kc2gYWowxKXiumDeu9rl+InxP8ExGtk22C/Hp4kfyppSb\nIekOewYw9WFnFBwsHdAE2Ou8tLpg7x1mydUr3tQ5vs0PhWRLniNd8g1KO9aA\nD+tg\r\n=fKvu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFEgRP2vnLkPWBEwqqcO/8s8+SDLwxSmn4rF0oYWwpxeAiEA/vppidk7GzZeSOYXkKK1c6D0P5zgh+Olqe96qSrSQZg="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.2-next_1625195641137_0.7118632767309916"},"_hasShrinkwrap":false},"4.0.2-beta":{"name":"napim","version":"4.0.2-beta","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"9c649d857082f7d26913ddedf59b7fa88a727ed3","_id":"napim@4.0.2-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-gNouco6GJdwbLcgDv9CCht347xjLvW9YpB5TCxT9ZTElsCvCMIljnQv1955ViDNLqUrkaJ2k2+8aHiOwy9d0bA==","shasum":"54c4cafe51356ab825757a7c812eb797b6ae6b78","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.2-beta.tgz","fileCount":16,"unpackedSize":771716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3oSLCRA9TVsSAnZWagAAInEP/ijwEnTtnoeSS3wLyc0o\nHIQOHgxkHOsAueIEnGpSIOPqR7HLzdJOjwZmPZ7mU4Rv/ZnUHhTodO1Cyp0y\njlNzHKtTcMVkSMZb3I02KM5DWa0iEldXMuSmYa/umNvh1vILfS7sHR0CPJrd\n5PE5qqQ1uIRr/l/leqPuMkgQmJxGCPdu+LAO9LnUIgq+J9gTGHmkMHeQldS/\nIqL0vdHnJyHvPosHQvyQAiErkfBmwR9tVNvsFUCDbI2lJCAYKA33d8gIDzng\nxkQdDasU0zhKBxFyFBQ0bR9ETkGVhbNeVvAN5YniE6BMw1YWoFgGesW4Jvz8\nwEgLvzdBylPcocq5aYO4QXkDAbIn754O2QNGn5RM1MblK3FFt1W9dWusY50o\nyZ8RfaTDpXaeQjKS5HN6w6XQUsTFqIN//NVUmiqsz80/hxFsbBA2JUrc0/3a\ndn3eB7DJXOgtgz9w6qJxhvSNlOT1Qr0qTvdLpZKfPKL1Q3fjaYKWVXUURyUd\nNsEjMh0+Vtnytvsnd+y4NsvhgWwa1WathZms+1e8JkjFcuAGVQH5jTKkVSJE\njN/qy8hSN2WjV8pGRZaLlP1j4FMrEeivAZFvt8Xaoy8SiFYpdaScWIgPg0+h\nje/4sun6k3WxwCnMLC6BeitUcKMiM/cj5O8oZBEy8BfP/6ciwTco08MbDTp9\n5b8W\r\n=PJk+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVpzhvpZa/PGpL4eOONyaV44dNMsGGP2Cy6bLPdBXRcAiA13dM7zmlnjDau/eB7WrlVQcyVMfpiitB1jOOgDad3pg=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.2-beta_1625195658988_0.08364327933175186"},"_hasShrinkwrap":false},"4.0.3-next":{"name":"napim","version":"4.0.3-next","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"df7bca001b322a01d59888c44342b687653da67c","_id":"napim@4.0.3-next","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cIxigioZCF/ebROR0pVFz9f868AxI8VaTgajn1Psxx5o0ct5jrRj3fKyY7SmcBP8FDMn2J10YaLqSmcioO2Cqw==","shasum":"6fb15f942dd5ec789c0350ec1b6e90440b857d9b","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.3-next.tgz","fileCount":16,"unpackedSize":49790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39RpCRA9TVsSAnZWagAAl5wP/Rh6B9dZx4quaGN0+Ob0\nciNL5/XgO5zhYh9u32FVsD597hPgDbXOck33Uehbd/qol3xA5ny01ocorFnK\nccVIfOQoxqtt/K38D2j9qenk6kYGtpxQL7NIfSVPDB6fgRDi59QABWJXz6pZ\noKCtZ2g79YWJpQE742Ax0GP9TWLz9tTC21MKQA8pZTmmvmgqX1UYAYPqzjZ7\nqWlnNdW7HrnAygr9hBV0luOjrLGDUyGP6Fv/bGE6FvxOkzTUpn1dOP3l1rnj\nOPog4pocJ+MQqB1HrADQlblv5ygcjYcK9I7kkccmO8ymyd++a3u4vZ+m/NAy\n6I3mkbmisj0OXYJgLLsrinmQwx7VyVYGNWRbCtVQetXLNtU6yJnalX6TRjvW\nTsD3PNEJjAoLVY1M1kfGp9SpEWk+p+j6KSuMSh0oLwd2j4rwBD+eqwLUM36l\nEMSYyENEsauBFPtTqEXs/VrssGMNcCM/AlfW3/JtFUio2cRe+5SilHzaqCuG\nm6JIKy5cMO8Wwf/7LVr5a1aD//IkEqNSBoVZii0v0lJv+4bRZkHj7kyT1fwm\n8Gcq2oYV9mSrFBwyEPT3uoJAgCTLte+mQqtNbQO9Sj/CxjIPWJQE+CygZg5x\nZTQEextuYxk5w3MCKL/ZcAEV1Tf/w/D54SO+A9nqWtFFIc11CZ5WdHGUeya4\nHZdB\r\n=WgRY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzEOGwUHTuhVmKIM90hAGBIMRY+9T4KDi6xXdYQ92iQAiEAgq779lKxZR9WIZNucIZ3qvKedY8lPZTomKZ17ktTUqc="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.3-next_1625281641416_0.5708013407536285"},"_hasShrinkwrap":false},"4.0.3-beta":{"name":"napim","version":"4.0.3-beta","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"df7bca001b322a01d59888c44342b687653da67c","_id":"napim@4.0.3-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-mqQtgLEw+CVrxfX6sHeN4pV4mLFhjStRUBMF0SCNCWVLtIYmTbNwc0C4CsCyuuzmKxKV05YxhbRPfpUGMq5ivw==","shasum":"2e2944e765a93a729a6f47dc41fcd94fe8759ff7","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.3-beta.tgz","fileCount":16,"unpackedSize":49790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39R0CRA9TVsSAnZWagAANMoQAJUPp8w6ockhJAqMT9oT\nJnQhXGS6yDv9R2BSJQxfXSOzVIyehnX9kT6eibBiNvqQHEqQMGKsODdKvZWX\nrKRm5iea0eAU65Bk7JXjQc3+krm6EuP9V3db1XN+iE9I0GDZebNX+J/pKzCC\nSYRe/etFDKTfKgkblnsf8yROF5G+qhysgxiy50MyOQQTpQyQv0p93y7n9XYn\nD9bCBfROK28ymHYo8e8nPxzgN08f/psJqo/wNx9P1P2K7dK8Mg+ty01/odyM\nVYbKQ3+ZtD7Gr1RiFbp7mkXFzmvjUj8aXSls/mLmL5h8sd4M30isri/DkcpD\n1anu7LYfe465j+Z1TniRWbL++RPzD1lsJ9sEGuR/YyudlsvCQhhJXYMn7URW\nxr6HFM/JeTvkzkHGsseDZ5D7zAwXYa5bt9clb8Q7vV8DolfEShLQScC3F/h2\nY7w95EvMCy++VzOMmdCc2gJZCHZp+IpWJWoMs8ssWmbpcRxAp9OKl+SSVLVi\nT7wUEn4JET4/40giXB4vZHEzTzmSlpxe18bTpdlwBYYHGoc9I2RQ6fY4zSrq\nRSFaTacrcZtaDgbIJXvw1BvtXlAAZnKU1i9TOmDj3RMSyWggz3mIh9DtC5oE\n1+aquyid6e0qc1mU27LztRWc9O1SfFJFWyoWg9J5NAVckPB7/lAXrrxE6dYP\nsjTw\r\n=eDcP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZSBfsiRWIWOSl4g6rPjLgVyWP2iZc65oLTVU4hZXYCAiEApFVhaVliFXiloakJVUNtO4es0LGT8af1FvJpTxH0A7o="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.3-beta_1625281651445_0.160055503646938"},"_hasShrinkwrap":false},"4.0.3":{"name":"napim","version":"4.0.3","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"^5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"df7bca001b322a01d59888c44342b687653da67c","_id":"napim@4.0.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-hgUEE+BTXdmpw8VmKopUs+i+Iz8k5B/6wAbxl3J2DOJeqfqERt6nZzN8VZ6uBxW1mvZAIW+GiZ+HMJVmDzX46Q==","shasum":"aa9df9f82ed641e5a8c166fe632ddfc5aacd6088","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.3.tgz","fileCount":16,"unpackedSize":49785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39R/CRA9TVsSAnZWagAAwyQQAId/T72/oPPSYKitZaY7\nF5fphfJx/NNLUJRGLXnq1+SLZc6h/gB9BfQ/0nRBJFvtjdXxQ96TVi2CX1Mt\nvoL+tIF1xbsi8bT2BB7VVoIcYmDtO6z2m+inzoL0z314T+E6iOqVlO2PGOhv\nU40rpAUqzOZg+FFwsQZm7dAXRfu+8Bi8RlXxUHGF74wwMDzmif1p6UV0nfjD\nFLnK+hlHH55ETNdTmcHwioV7Bh+lfB8ibCTNMG0SXYif1H4DMwPNCF9Dd9H7\nFqMMe7QXif2ahnRuLvjkxsICpYQ61btwTaaxo82CH5TMIO8yql4inhKF3din\nHqyb3ZL/sPOcPmEYgJr2l/SaRndQVeGfWBLPa7GLIovPFBPLwIOJWckDNngM\nkjxPW/Hq2M2DjM/v3yyiVLc40cCHxAtSc2u4+N2Tawr+cde5qc2tvzrfbsid\nSrSHNINOEV8SwTRuyGFUA7Qm8Kt1S1xbmZ4/RDonoMgbRwdEpTa+N/Zn9eVZ\nUBMj4qZIJZsstcOgjJ/jYl0MRLYaQtiquPLYwKYPvInoEXmCTOwwpksUtiKo\n3T7SXFirMSK/n+PWF+VHout1c/mITETK1qC63O8r53gYaZZo56yIcY3lpKkm\n/yWE2c/0XF5+fcCz9gItH9+z7jC1W9VfEAKgOeKpWgEXUx/87tDwA/FewsH/\njT3e\r\n=U6SQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE6aQ0a58BEniJ12g/6wODZmsH4Lx8BGR29iiQPmE4LSAiBj7kqy/bcF1qfM/fuMoQ6ghSLbiiBqxe80vST7mX9eVA=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.3_1625281663190_0.533446628715865"},"_hasShrinkwrap":false},"4.0.4-next":{"name":"napim","version":"4.0.4-next","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"d6e11241cf12d904bc95234fe9c0185cd86a9668","_id":"napim@4.0.4-next","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-AZA3N5ClhwG3SHGGF6WYD3oNNgOSYpemhAd1va/ZIi9RMADc2/rXygyn+VMJdsuYfhHi1GIvofrORqWoS0/Q4w==","shasum":"bc5a41d44f54f487d3ca46cf7cf70b847dbcd3fd","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.4-next.tgz","fileCount":16,"unpackedSize":49994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6CdZCRA9TVsSAnZWagAA4VsP+gLFBDyeb6qU3K3ahvo6\nOHnnedLvoTD966iuNGWLqhKNzEQ1V5uEG7JhUiHRwP0iOGDVBY5d2U7xvIG4\nD6J7D+grDHvcfLMnk9c2tNYAZSOmo27NET6xGZK3RHqvuw3mLKD+DrR6aKdr\nkEjyMEbtaXPk7SB1sUXd4dWFvg7qOqE/LjxhXgYEoS9sOh/y0nFcAm5zBIx+\naiYL0eyGEjQInsK+ZCIi8n5bVUts0ht8JJKT/7tlBFA58nkOFqhiXCn/DT9N\nc47fgCkQruOxK4XcXwtkAc32BcTLSEnOTrei4G3UrOUyljC+aShMdCjD8D+7\nUDY3qhcyI9TL4d2GfSDV1OwzSJ4DFlfk5QAs8nCVxPQX+OJzgYifhZHCKS/F\nH2+YnIF+ThE/aTTijAYWHy219g4cnp+vo4HqUJ5otZ4JMn+0OfRYSgBdVZVx\nUyCrKMd355rjHLzxgVeVkQWBummDfK/mZygoRFwrjReUIsR0e/msoryKKRXd\nbJApWjokZtK5wv+wtI8ovvBJt1iC7qsjeVjCpzEfsClkQveFRner50+dWr9L\npqVTBhGMLvRVEOPmW2qNYV9a1iOqcj9mWz67imWA3z/lpfKLioHOOZAAql6c\nNyThHPyWzZwqQ3bZa5XeUYKrmH3dI0BoVNQrfHOCgrDzir8FCiVuK6nmuDJp\ntMwN\r\n=fzNn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAQHVSTpc0osN/PVAxpJw4lewMxoDsZSZ4O96cFK852gIhANQH6B0OAmHVqQKSfT1N+xeZIPNr7CGx4QHgCuOUPZh1"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.4-next_1625827160840_0.8456065278642162"},"_hasShrinkwrap":false},"4.0.4-beta":{"name":"napim","version":"4.0.4-beta","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/body-parser","readmeFilename":"README.md","gitHead":"d6e11241cf12d904bc95234fe9c0185cd86a9668","_id":"napim@4.0.4-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-/jkDmmIcjmzUmsxnnsLsH2uHzNtuqduGkcWHCFtM561YY+3bvOP40zUSV0rxwyFVvlZF7ARiNnV2o/0hm8uyEw==","shasum":"25f64563f20dc87ad73e5a4ebf319108d0447313","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.4-beta.tgz","fileCount":16,"unpackedSize":49994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6CdlCRA9TVsSAnZWagAAD3gP/0sBqLhSqhfg7haTFHyL\nBP3vZa5BD8igX6JM+Gevm5bgaGpk3V0Nvvqmeq0UJxNDt7luN20agGZ6br1w\nOK+n6KJdmxsdk7jibMCN2iMkIKQ27Q+7BoXaOD6UZnlEhVy6D1owkyKWlmKy\nhlRndr1I18+NscUZt/HmR0vC6GYqK4LAvADMk478N2Bi02Pkb83bkp2ppCyA\n8wL6qe/iZ80vQGaDdcL4J6aIL+2psSN7eA5QAHn8C6snBnOmIlM0zAm4b775\n4fY4vBR1Lphaf72PhcfcYnJe29kEKYe2odq4KF3r1LsPsoi9plzx5igwg2sB\nsgJJ0eWUbVWFIRifKgiJyT2eODVhHsDZj8YFGlZe3WsG+3bLEx/qJa/0gei/\nqGI1QVZ4YJvlETU5puPq2xHbRBgUJcrXfXggyW6xhrd92RrTjNSqMKb60Hry\nnMM1WviaaoIGcnFmVrkyS/LIPXZxECRv6XX4RrXx447eTrOOWJc3WXQ1NofC\nalYki4/kGR+9F1lNyo3yv0AfpDMLzJUAJXdi+/pWXXiz4XiA5UwJ/RQyVpiI\nl2Zpa3E4ArdAOdl1snLkDKwt753TyGnJUCmdxZjj5Gz34wbDRdXZwE6BkKaI\nSfz+SqBKktRLxeuEsMwgvl/bXo9cLScSGCNnUW3RStT2drPx+KapQIr4WXGc\n/toy\r\n=rSWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw1OxqqxYiDr3y9PwPA9UaXlVkf/NRBGkJe1rNw1Dl9gIhAPR9cKjNVUlcT/z+sXe6h7q8g+dbXsKyBPFDWZxbBKp/"}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.4-beta_1625827173462_0.0459803162362622"},"_hasShrinkwrap":false},"4.0.4":{"name":"napim","version":"4.0.4","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","version":"auto-changelog -p && git add CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/axmad386/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/axmad386/napim/issues"},"homepage":"https://github.com/axmad386/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","auto-changelog":"^2.2.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"d6e11241cf12d904bc95234fe9c0185cd86a9668","_id":"napim@4.0.4","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-n3Nhl8IsLHgBxH7nHa72OR8sro+RK0pRa4HlDFF7HYuNfZwxY0Nk2Yo3USz0FCVNe1rbD9Iv7daZwHBPFT4wQw==","shasum":"d17a98bffb14c7a9faec1c3116713c3996fa3b8c","tarball":"https://registry.npmjs.org/napim/-/napim-4.0.4.tgz","fileCount":16,"unpackedSize":49989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6CdvCRA9TVsSAnZWagAAo/EP+QCkzT+kiFOIoqpi803s\nZyshmtkxuwuBxwWT2+hjaseral44AR9DmMJ0YxPlNJtY9/68StS941hmbnEf\nSHUrgRT/Zy3s09uu8UczlrYJ42XYM9nauspee7roZXUPCb91JWXY1bDjd/FE\nstWTneVIZvwlLC6Fi5i39IvoAsO0H1hwUb34KJwoea1m37l58HVGfw+1k1vb\nlIzlwt+CVAn02c7JtNAeYwTOVEbDCh1gAYtKCDRpSeeQCjPzCabiEXjN4a3r\nQy5NKf7bssxQ4WdV7aeqi8hYbgnBHcw7YSZnb9K7YrF9Yb4viF2NOnyZCLJA\n5PVjTvH07wzYRpfsEd1+2u3MOdGReDPKJFqgoKqX/CbePu+/wcxhSHxn3+3x\nK1ekRYtZEqCDxWYvQBHt/nb2KR5F6dw3oH11pUtqGGz1lXDBP/Dq8qvgZFW2\nWS+FqUaD+Abnc1+498I8PNLV3XkZUrNJHmhyq+wZPGZamGyjBla+WIliN4ip\n9/QxyOI8tzaQH1Wkmli2njM8P6OjuU/go1NS34lWAQFWY0mWeCC+LCiyJMxO\nsiCJIj1a6rtNB3RsKVyBDcQhdqTx1EPBq3tUxDIrmrBMTxRJujyUueEGTL/S\nqv77dIWwwtkdsa1LIacrORqsVzV3G6UlJLX0hH4rEOMu7OmaluCvPwIfjtVC\nCX2u\r\n=Uj2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0vx6wEZYPaK9uyRIHhTkesQDbgOdjgr1TekJiY3nBagIgPcrqNV5mxKacY+caG4LfEkGMVAMxJdjnanyddqFCRDk="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.0.4_1625827183208_0.24907005507545632"},"_hasShrinkwrap":false},"4.1.0":{"name":"napim","version":"4.1.0","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","changelog":"git-chglog > CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/kodepintar/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/kodepintar/napim/issues"},"homepage":"https://github.com/kodepintar/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","bcryptjs":"^2.4.3","knex":"^0.21.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"15174cc17d6d183a4b4ace8e76129365dd433197","_id":"napim@4.1.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-QJS30s2kKJXcWHTIUmyrJ3ZkxudQyIr/6HgoJaTUa9HLNjzQ06a74P9zu8/K95giAANSdOgAnQv0qqBDLGhtFw==","shasum":"87d2d12e4669292c150894e7e5826f95da8723c1","tarball":"https://registry.npmjs.org/napim/-/napim-4.1.0.tgz","fileCount":15,"unpackedSize":43742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1OxVJPy+x3F1+Ki4t/JvB/wKfN6bOvd+BD9sgefxLwAiARVe92FLU8xgmRMp8enVNjSRPWcTtWOj3qgID1a1mjow=="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.1.0_1636015649384_0.40539087718859057"},"_hasShrinkwrap":false},"4.1.1-beta":{"name":"napim","version":"4.1.1-beta","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","changelog":"git-chglog > CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/kodepintar/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/kodepintar/napim/issues"},"homepage":"https://github.com/kodepintar/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/node":"^14.11.1","@types/polka":"^0.5.1","bcryptjs":"^2.4.3","knex":"^0.95.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/napim\n","readmeFilename":"README.md","gitHead":"99a0b5d2204f51fc3a58117b71f80299df14d331","_id":"napim@4.1.1-beta","_nodeVersion":"16.6.2","_npmVersion":"8.2.0","dist":{"integrity":"sha512-F3ZrXbufwWkic2N7hEwFhRXL5hqHn5HBTDbd7KnKfqejieQMRBZ4aekEqRsRD2vzC01az+ADKxMLzzpPIkXZDg==","shasum":"74481dff1ed264f2f0c26157fda9e965f61c81d1","tarball":"https://registry.npmjs.org/napim/-/napim-4.1.1-beta.tgz","fileCount":15,"unpackedSize":42869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw1d4CRA9TVsSAnZWagAAy2wQAIShRGADc7lSt0tdFHi3\n8Y4qvRLADW3TUCMvOhsVUzjvW/27SoEGhvvAt4fV72rbheP1VtC5JeS0pL/c\npKGGeYuAJsCZ3uDtOHDEbUUwpi7hnCO27XAqhW0ESeLN8+kkZq92wZHtGwnn\n6f+D7No69mqzuzL0fFFI1E08TJRTc/rhnG68CvwoPIpATsLhsK7Wr8hnAowu\neHdYFykNhXAumIndOR6HKCxgtEK0idaia334Hw4GPH4HEF/vXHlCASRfgLGE\nM76mh59WN4rb4M0AcpNoTh1RzjjQEBsrAEBq6pXRyYQnub/X3dvR5AM1/f9q\nP3+pkFaeAFlyegRZfz4qySuv1gC1IlGf0QBA3OSHLpBvP3NjiWqaUk6qcvXl\n21cwsKiK0NTIT2ieMK80FwjrjYntBAHzAXddFBIGuvS/hrxL00KG3hnWUGOS\nbj0Qkhd3GmY3tJU10oxKCYKDXgEJwmDqbauYGPZR40ldgWtP88d81vKxJ/rF\nMsQuq6YL2eX04b/jU1sNyVT+WRwG9ro/rl+psap6ocGXMKbejpytZbfJfKCn\nmjEFk3KmuvyaGWD68leSDBiFtzqcXd8gZmakuHGbCd9bMfm1NJ6+x9Ht+6DQ\npSuThZ1F5ALNNrq3B0tierRh2JipGfI0Wbjv+U4wW6U99yO1F0AXVlKR3bIU\ny6Vd\r\n=cELG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJVMIxQEGc4J2rg7Vh7oU9ZbiTbOTWK0JjssSIqYcH0AiEA3b6qdEWvE/M+w7gnV710FQtO0u7jYesmXBa76jHXEWY="}]},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.1.1-beta_1640191864388_0.46510139314353194"},"_hasShrinkwrap":false},"4.2.0":{"name":"napim","version":"4.2.0","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","changelog":"git-chglog > CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/kodepintar/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/kodepintar/napim/issues"},"homepage":"https://github.com/kodepintar/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/body-parser":"^1.19.2","@types/node":"^14.11.1","@types/polka":"^0.5.1","bcryptjs":"^2.4.3","knex":"^0.95.15","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"af719ce5707a1e011bbf4b222a33c4f3af1ed83e","_id":"napim@4.2.0","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-H5izocpthErd8BrpXwAFwvO/BASTC8U2kX4XV0RpAKNTfnus0TEACFAEkFOXHfXRTa1/pWJVDkc26zKmfe5BYQ==","shasum":"4e8de77183345417def6dab99dfb63df04636963","tarball":"https://registry.npmjs.org/napim/-/napim-4.2.0.tgz","fileCount":16,"unpackedSize":43044,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNvp8QLAquKXXOcH/3NNIWSYoRFftMtROF/Kzlxhe+/AiBlW354P4i2GVBYU3NtrqsrbFFSKFmNOg8C1EsnRlBSyg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiBO+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7EQ//W6YtRjbQ2/+2h4bUG9abCfQcbDPisjcBJU3dcf9e0GSTWTR8\r\nqWiPvK+FZSRdCljvBYY+VCDE8cyouKi1O7KYeqAHhNyfR0zNHV5c9hG05Dmy\r\nGTqoojXqWMKCmq8T7pn3EppypPYspB+eknd/t0CKM7mhMn/2esvYz2UsP2Wa\r\n/7t1R3eygddpcpbg/6LGkvvFc51OvcELl9LGcbv0BULYGW657d+9vt5k4G7U\r\n+COQ1gFnL8P3EVs8cYvQHwrdhPWNjNpjP0DfffkjVHt+xlIim1cc6Qv2mwmb\r\nTrvtKqLrZzBwpRWM5OC4qobYgcf5X+ZBOIXf3tFYAyhxJXmi7jA/TLzNM+wX\r\nZSs2VsdbEu+ewr7bkO0uKrowJ/tBlJbSwvh2Z/kUBd57ZZdUrJu53rJK8+gW\r\nhG9bX7YzaS6onav7964/7t5aW6inQJbcZ5bpZ3D+GL31I5mxwQcx2ZIrb0Cj\r\nbFcjvOK2x6/41I2G2K9stqlS0ocNGUhq7OSvkxCaxpX6bIpbqn1X2/l6hx+M\r\nwaoCIxEv9kU2PaChtO8ev8qnNJutwDkKz2d1UBwzRQRoOj8jUkQ7DgYhqOGJ\r\nMEC14DaQeibEH7dSVt+Fs24r/ZJoHxx9rBkOtXouXZkrhfmfp8BWz9HamJ5l\r\ntVC25HwkrkSDbE7jE7+lN/g6+WzvgL4e40E=\r\n=wWIz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.2.0_1669862334351_0.36186787591777514"},"_hasShrinkwrap":false},"4.2.1":{"name":"napim","version":"4.2.1","description":"Node Api Maker build with polka","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"dist/esm/index.d.ts","scripts":{"watch":"tsc -w & nodemon -q -w dist dist/index.js","watch-test":"cd test && tsc -w & nodemon -q -w dist_test dist_test/index.js","build":"rm -rf dist && NODE_ENV=production rollup -c && ./fixup","build-test":"rm -rf dist_test & cd test && tsc && cd ..","dev":"run-p watch watch-test","start":"node --experimental-modules --es-module-specifier-resolution=node --unhandled-rejections=strict dist_test/index.js","changelog":"git-chglog > CHANGELOG.md"},"repository":{"type":"git","url":"git+https://github.com/kodepintar/napim.git"},"keywords":["polka","nodejs","api","knex"],"author":{"name":"Akhmad Salafudin"},"license":"ISC","bugs":{"url":"https://github.com/kodepintar/napim/issues"},"homepage":"https://github.com/kodepintar/napim#readme","dependencies":{"body-parser":"^1.19.0","dotenv":"^8.2.0","node-input-validator":"5.0.0-beta.3","polka":"^1.0.0-next.15","simple-node-logger":"^18.12.24","validator":"^13.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-typescript":"^8.2.1","@types/body-parser":"^1.19.2","@types/node":"^14.11.1","@types/polka":"^0.5.1","bcryptjs":"^2.4.3","knex":"^2.4.0","nodemon":"^2.0.2","npm-run-all":"^4.1.5","pg":"^8.5.1","rollup":"^2.52.3","rollup-plugin-dotenv":"^0.3.0","sqlite3":"^5.0.2","tslib":"^2.3.0","typescript":"^4.0.3"},"gitHead":"3d079f9afa28886f434af9c46f1627eec28ac8f5","_id":"napim@4.2.1","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-YTYHD5OrtkJM40a/A4cEcXIm2SI2k49gvKPEYWxzrIBvt7aDfcxTnRa+5gDKHlEecCxvzB8MDcC/bGz2wQqK/g==","shasum":"9453e04601a65dc2ba012eafdd1f5ad1ad9dcd30","tarball":"https://registry.npmjs.org/napim/-/napim-4.2.1.tgz","fileCount":16,"unpackedSize":43042,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGB1f8sGfavMW+d/p03fFCTg257Cf6bN2LePWaJk+TbKAiBd/c0WZ7jOccx0lDvYCWJZnQLZ+R94PHhynCyqe5M/gg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwNVvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqpRAAiAm9LWBAhJCOpdEzrzsN8mWHRGIaABLQT5ysHxg9QKmRM5Ni\r\np78nZ4W6RDmPpFZTFmunheh5TmVCSXKdyvvyGxb6PMAAGV7jRQ60+4Cw9rWm\r\naENJc5ciW8igPVzbDDRFnbbUV1qqjfRiTa556CTbH6JBQ0bJdg4wvfpyQg0X\r\nu/Bq7sH1J+npUq9OGw4A/Qy5o9u0un8uUW2D3XBHjyrNAeZoJjv9kMccBP1G\r\nBMLP/Dk6JlsAM4S4KCggRE6v5R0ov//rzQYXnleLGO8EDXIig2nK9kp49QEk\r\nmxCXz3es2fIeD1OIoIXZKi4hHpeftU48yoIKttFr0Mc4oyHjCFHRsDEV1EL7\r\nTo/yUdvKFIWHjJShG7a1xIPAuGYUu06T/M3lMP1oWi37oEAkjoXFOVAbQN8Z\r\neiGVmy0sZsd9Kj0+SocNQgaPxLNSsFzIeB0cTRVpqQ5neQOnz01X/Yzz6Tqk\r\nKxrdBdrfg6i3IlVUh64w4IcJ/QOwcsJ+Pn6T+sGhVNgcyfTJcUZqqKDs+T//\r\nRiC2/yPEZG7cZWSOibdagYZZWBWZ7MReiwHcpfdmE1Z//DaD0OdKNYoxmnHn\r\nZbtd/qf7giR8beC9PwGwspG3EOWv3MU65CxG/XObgRbAs7bTRGHsRJaK6ZIJ\r\nsZDfPe2/6Co4PHk7NhKl1eVhCFpdiJ4twfI=\r\n=tHkn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axmad386","email":"axmad386@gmail.com"},"directories":{},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napim_4.2.1_1673581935168_0.8130947386780727"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-22T06:00:34.357Z","1.0.0-b":"2020-03-22T06:00:34.718Z","modified":"2023-01-13T03:52:15.434Z","1.0.0-aplha.0":"2020-03-22T09:17:47.001Z","1.0.0-alpha.1":"2020-03-25T15:24:13.213Z","1.0.0-alpha.2":"2020-04-05T14:01:30.145Z","1.0.0-beta.0":"2020-04-06T13:56:25.180Z","1.0.0-beta.1":"2020-04-07T10:54:43.097Z","1.0.0-beta.3":"2020-04-08T07:42:40.373Z","1.0.0-beta.4":"2020-04-12T04:26:33.036Z","1.0.0":"2020-04-19T04:37:44.822Z","1.0.1-beta.0":"2020-06-01T01:39:08.520Z","1.0.1-beta.1":"2020-06-01T04:16:44.303Z","1.0.1-beta.2":"2020-06-01T06:53:36.720Z","1.0.1-beta.3":"2020-08-10T15:59:50.513Z","1.0.1-beta.4":"2020-08-21T08:41:53.581Z","1.1.0-beta":"2020-09-30T09:38:39.783Z","1.1.1-beta":"2020-10-04T09:36:59.018Z","1.1.1-beta.2":"2020-10-05T23:18:39.948Z","2.0.0":"2020-11-06T06:52:49.292Z","2.0.1":"2020-11-14T11:35:58.247Z","2.0.2":"2020-11-14T11:40:34.255Z","2.0.3":"2020-11-14T11:43:06.771Z","2.0.4-beta":"2020-11-15T14:51:02.260Z","2.0.4":"2020-11-15T15:06:09.665Z","2.0.5-beta":"2020-11-17T10:29:24.679Z","2.1.0-beta":"2020-12-03T09:49:27.040Z","2.1.0-beta1":"2020-12-04T12:51:28.230Z","2.1.0-beta2":"2020-12-07T07:44:36.030Z","2.1.0":"2020-12-07T10:14:46.076Z","2.1.1-beta":"2020-12-22T14:42:19.205Z","2.1.1":"2020-12-22T15:03:02.220Z","3.0.0-beta":"2020-12-30T01:53:49.721Z","3.0.0-beta.1":"2020-12-30T04:39:24.738Z","3.0.0-beta.2":"2020-12-30T06:56:37.309Z","3.0.0-beta.3":"2020-12-31T04:03:11.257Z","3.0.0-beta.4":"2020-12-31T04:54:03.977Z","3.0.0-beta.5":"2020-12-31T06:07:36.595Z","3.0.0-beta.6":"2020-12-31T06:26:10.364Z","3.0.0-beta.7":"2020-12-31T06:32:26.774Z","3.0.0-beta.8":"2020-12-31T06:48:23.127Z","3.0.0-beta.10":"2021-01-02T06:45:25.475Z","3.0.0-beta.11":"2021-01-17T10:03:51.580Z","3.0.0-beta.12":"2021-01-17T10:13:27.959Z","3.0.0":"2021-01-17T10:21:33.636Z","3.0.1-beta":"2021-02-12T10:11:57.964Z","3.0.1-beta.1":"2021-03-09T01:10:04.053Z","3.2.0-beta":"2021-05-03T06:11:20.619Z","3.2.0-beta.1":"2021-05-03T06:50:39.137Z","3.2.1-beta":"2021-05-20T17:02:40.700Z","4.0.0-beta":"2021-05-20T20:25:21.917Z","4.0.0-beta1":"2021-05-21T20:56:09.990Z","4.0.0-beta2":"2021-06-08T06:37:46.238Z","4.0.0-beta3":"2021-06-09T17:44:13.047Z","4.0.0-rc1":"2021-06-30T04:49:50.730Z","4.0.0-rc1.0":"2021-06-30T04:52:03.504Z","4.0.0-rc1.1":"2021-06-30T17:28:56.902Z","4.0.0-next1.3":"2021-07-01T14:48:46.897Z","4.0.0-beta4":"2021-07-01T14:50:15.269Z","4.0.0":"2021-07-01T14:50:26.647Z","4.0.1":"2021-07-02T02:30:46.123Z","4.0.1-beta":"2021-07-02T02:31:10.908Z","4.0.1-next":"2021-07-02T02:31:19.867Z","4.0.2":"2021-07-02T03:11:48.517Z","4.0.2-next":"2021-07-02T03:14:01.274Z","4.0.2-beta":"2021-07-02T03:14:19.166Z","4.0.3-next":"2021-07-03T03:07:21.541Z","4.0.3-beta":"2021-07-03T03:07:32.042Z","4.0.3":"2021-07-03T03:07:43.368Z","4.0.4-next":"2021-07-09T10:39:20.994Z","4.0.4-beta":"2021-07-09T10:39:33.596Z","4.0.4":"2021-07-09T10:39:43.372Z","4.1.0":"2021-11-04T08:47:29.568Z","4.1.1-beta":"2021-12-22T16:51:04.535Z","4.2.0":"2022-12-01T02:38:54.560Z","4.2.1":"2023-01-13T03:52:15.336Z"},"maintainers":[{"name":"axmad386","email":"axmad386@gmail.com"}],"description":"Node Api Maker build with polka","homepage":"https://github.com/kodepintar/napim#readme","keywords":["polka","nodejs","api","knex"],"repository":{"type":"git","url":"git+https://github.com/kodepintar/napim.git"},"author":{"name":"Akhmad Salafudin"},"bugs":{"url":"https://github.com/kodepintar/napim/issues"},"license":"ISC","readme":"# NAPIM\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n\nNode API Maker built with polka and nodejs\n\n# Overview\nThe idea is to make API development quick and easy. Every single end point is handled by one file that called service. One service include:\n- Input validation\n- DB transaction (optional)\n- Input mapping\n- Error handling\n\n# Installation\n1. Install Napim CLI globally (optional)\n\n    `npm install -g napim-cli`\n    \n    you can check by running `napim --version`\n2. Generate Napim template (optional)\n    \n    `napim init project-name`\n    \n    change project name with your actual project name\n    \n    *for typescript support, ad -ts in the end* eg:`napim init project-name -ts`\n    \n3. Install dependency\n  \n    `cd project-name && npm install`\n\n4. Update Napim to current version\n    `npm install napim`\n# File and Folder Structure\n  \nThis is default folder structur for typescript mode:\n``` php\n.\n|-- dist //compiled script will be here\n|-- log //all error log will be here\n|-- src\n    |-- middleware\n    |-- model\n    |-- service\n|-- stub //napim template generator, edit the template to match your needs\n    |-- middleware.napim\n    |-- model.napim\n    |-- service.napim\n    index.ts //your main js file\n|-- .env\n|-- .gitignore\n|-- knexfile.js // by defaut napim use knex for Database Query Builder, delete it if you use nosql like mongo\n|-- package.json\n|-- router.json //this file will map your API endpoint to execute service file\n|-- tsconfig.json\n```\n# Generate NAPIM File\n\n- Generate Service\n    \n    `napim make:service service-name`\n    \n    by default service have method GET, you can change by append the method argument in the end, eg:\n    \n    `napim make:service login --post`\n    \n    this command will create file login_post.ts in service folder and append route data to router.json with tag: `\"default\"` inside `post` array, just check it :)\n    \n    By default, prefix for default tag is `api`, so you can execute the service by access endpoint POST:[host]/api/login\n    \n    If you want to add some tag, for example `secure` (You can add middleware like `Auth` later), add tag argument\n    \n    `napim make:service users --tag=secure`\n    \n    You can also make dynamic endpoint, for example find user by some id\n    \n    `napim make:service users/:id`\n\n2. Generate Model\n    \n    If you use Model like Objection.js to you can generate Objection model by\n    \n    `napim make:model ModelName`\n    \n    if you prefer to use raw query, just `import {db} from \"napim\"` and use it like db.query(trx)... see knex documentation for detail\n    \n    If you want to use db transaction, just change transaction to true in your service file, ez\n    \n    You like NoSQL like mongo, just edit your .env add `DB_DRIVER=mongo` and create your own Model or Schema and import to your service like usually\n    \n    TODO: implement db transaction for mongo\n  \n3. Generate Middleware\n  \n    Want to make Auth, JWT, or handle uploaded file (eg: using multer) you can create it in middleware\n    \n    `napim make:middleware JWT`\n    \n    then use it in router, append it in middleware array for example:\n    \n    ``` json\n    //router.json\n    [\n        {\n            \"tag\": \"default\",\n            \"prefix\": \"/api\",\n            \"middleware\": [],\n            \"get\": [],\n            \"post\": [\n                {\n                    \"path\": \"/login\",\n                    \"service\": \"/login_post\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"secure\",\n            \"prefix\": \"/api/secure\",\n            \"middleware\": [\n                \"JWT\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/products/_id_get\"\n                }\n            ]\n        },\n        {\n            \"tag\": \"admin\",\n            \"prefix\": \"/api/admin\",\n            \"middleware\": [\n                \"JWT\",\n                \"Admin\"\n            ],\n            \"get\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_get\"\n                }\n            ],\n            \"post\": [\n                {\n                    \"path\": \"/products\",\n                    \"service\": \"/products_post\"\n                }\n            ],\n            \"delete\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_delete\"\n                }\n            ],\n            \"patch\": [\n                {\n                    \"path\": \"/products/:id\",\n                    \"service\": \"/producst/_id_patch\"\n                }\n            ]\n        }\n    ]\n    ```\n    # Polka App Instance\n    \n    If you want to access polka instance, just `import {app} from \"napim\"`\n \n[npm-image]: https://img.shields.io/npm/v/napim.svg\n[npm-url]: https://npmjs.org/package/napim\n[downloads-image]: https://img.shields.io/npm/dm/napim.svg\n[downloads-url]: https://npmjs.org/package/napim\n","readmeFilename":"README.md"}