{"_id":"@agrippa-io/node-generator","_rev":"10-948b8aa32f94a02a156c929989524d05","name":"@agrippa-io/node-generator","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0-beta.1":{"name":"@agrippa-io/node-generator","version":"1.0.0-beta.1","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.0-beta.1","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"dist":{"shasum":"7d7f54d199d9e9281f5248caa931f768dab8a2c8","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.0-beta.1.tgz","fileCount":86,"integrity":"sha512-vAzBt7eCDE/I5tSdpieJCdetWxl4kU7eDdSKOT8hZaScCeZu0WxlGTpMlBLR7USUdOF0Tpwy57IC1AeADodluQ==","signatures":[{"sig":"MEQCIGwY4xJv6zBhgltt6zw0D+RRpSK94YLkg+4tP5dKGrA4AiAIaohXoqjrdqMn4b2J04oFC5NGZEex8mYyF6wlDtclvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":71650},"main":"plopfile.js","gitHead":"d596c306c738cbb07e6c3f269391b374a62d5a22","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.0-beta.1_1635050913881_0.6363696491894102","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@agrippa-io/node-generator","version":"1.0.0","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.0","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"dist":{"shasum":"4ec00a78a49b2983d2090c1c24be39ef941a1158","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.0.tgz","fileCount":94,"integrity":"sha512-1tcBIjdDnEucA/pxGFAuiAWCvvRWG8fovAKWU5gSpJKsQJrPY9GbUgpPs7I6yUywuOVnNXHzTeYAyca65BW33A==","signatures":[{"sig":"MEUCICj3WgOknFkS0XFyEeUTSiJuvSPAabHcZgArl5MzZj2sAiEAxGUj+em4ZINHA2tG5en6gi1npCKWxbYUEGNLaxwtpX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74743},"main":"plopfile.js","gitHead":"4ebccb3089dc38e21116095a533d8633ef766961","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.0_1635401588270_0.47453921040511093","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@agrippa-io/node-generator","version":"1.0.1","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.1","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"bin":{"generate":"bin/generate.sh"},"dist":{"shasum":"0fc996b54362630da27f963b3560a89268f90b47","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.1.tgz","fileCount":94,"integrity":"sha512-DnEkg9TpllDTapHE0jTi72aHievUGJFw3zedZ7xwJBoz2U8nGnznpSPm40V92sNgoiIZTNgCcZ6zh6VEt3Rn1g==","signatures":[{"sig":"MEUCIAhPE2SCoMm9/5NgJmEoTITcyLS1oBgPiGu/TTxX/UjXAiEA/oWOp3eyuujyHRxQjs/J41TW2nY5Kwf8vWuvlGpOuxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74795},"main":"plopfile.js","gitHead":"2be7f05f086d2d0e4ae8015f95a62d07a2b5d711","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.1_1635402166895_0.9704501254357132","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@agrippa-io/node-generator","version":"1.0.2","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.2","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"bin":{"node-generator":"bin/index.js"},"dist":{"shasum":"f102b28f10e909cb47e9e7a626a77e0a6c012fa2","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.2.tgz","fileCount":94,"integrity":"sha512-KvwFJr46PkeS1S5Eyhx/SAY9MzwUhOeA77pI+WQv0jz/Mt87FGFajsG3oEaWhmghZH9EJUSVWgs7wp+p/1uNow==","signatures":[{"sig":"MEQCIGLgTBDZE4t9aeBjgOrcmxYm66g63XECPRv+CJEy4N8MAiBq6X7+4+Zrijy9T9SvWy+a4UX+SkmutB/Q1+/HVlvKPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75524},"main":"plopfile.js","gitHead":"749c2b874c193bd42966bc97b565350a6db1cd62","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","shelljs":"^0.8.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"minimist":"^1.2.5"},"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.2_1636005971950_0.7744055229603346","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@agrippa-io/node-generator","version":"1.0.3","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.3","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"bin":{"node-generator":"bin/index.js"},"dist":{"shasum":"aeba6175003a4702e4dd1899d5bd5e4d77ab97fe","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.3.tgz","fileCount":94,"integrity":"sha512-y+fng13l0YXt3kSObla8HXVtzkO4jeCadEYaQ11LHBTFE6gfdUVmY8iIUaVJNPD0Pg7z60FfQ769hPRcR4ro4w==","signatures":[{"sig":"MEUCIQDzyx2Fv6QYUD9IoaD0B5cHhQetBvJi/at0fgG3wiOxhgIgXdcdPI8PpiVf4roxmr4U+yOD2gw0uzeytopPhA0TpVE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwvSVCRA9TVsSAnZWagAA4ggQAJh+z/twDiu/7z242wqO\ntRggSod7ezyTcgDf7EESIn7objAdo31RlCBnLFL/osIDV49iggnLanJFq3C8\nYChte4iBCVap51ndKLstb18q+RanjeFouUpLDBS4LX6IjbLc5qS7F/1J3UkR\ngX0yQzavM/1/9i7Eq/TfgPipVu68ry0hdPOkxVVuup3jcJgQlmBfmAgS8hsV\nQkYoK3s/KCi+adJbpCi8QHh7Ta8oZHCVev8XQR7WAy+H6l+xIj55jYuDz0JK\neUWanBtQdsjjcL5JeHfhML3TY6tAD/LwHyVa1PU7VP9LOjjniKi6g/ALql4Q\nvmFQ+PIk24P/ko0S9kiLRk4OcKndm8IQaA5jiXn3VnVt2dqmrYnRtL72a6wD\nFL1akovoHl/R2z8Uq6IKTmUB989ZeaJuTIOwBBoqpoZXli7Lyc6LkkTaMdBR\nR46/5O9T24ljmhtIRn6wfped8HGY2fQrVOZOYWjLcG8FHc5GprwldVmcEsdA\na+yBS0ipuPZl76MaXXEblwctm+OW9kppCTTsGCdwnAoPIjLgrT/iaVNto67S\nYk7/Fe/KIxlZeqHJla1yKG4MMOA4PQuzO0OsMrfPWAV2uBq/tO2Ggz7ccp2v\nV4ZTAAx9Zn2ETpkVpTmKoXloiGlPcFqfBE4OaQehgZ1iZc7W66lx5/93RrPP\nwBUB\r\n=aTbX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"plopfile.js","gitHead":"fb493952a788847ef69c6159463ee20711b44d41","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","shelljs":"^0.8.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"minimist":"^1.2.5"},"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.3_1636007279333_0.3039168194252311","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@agrippa-io/node-generator","version":"1.0.4","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.4","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"bin":{"node-generator":"bin/index.js"},"dist":{"shasum":"80f26dbc2544eff3433edc56740260505858a4d0","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.4.tgz","fileCount":97,"integrity":"sha512-UaX6twaSjM1csdH7+FBTweBP8xnujUaGHBNxDcdTwKpZb7CJpPOQhjC+aeprCJeszpqSuXo10+4MpPWJtN2Zug==","signatures":[{"sig":"MEYCIQDmZ7iYm5cif3wNnd0LjjG7voVrUu5vOTo0G997lYsweAIhAP0VkW2AoTFUrmAcc9y+La+u7RuprLPYd3ih2orNJVBV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":76405},"main":"plopfile.js","gitHead":"49993ac5df75c37ed67a0b19c78b3e442c9f797b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","shelljs":"^0.8.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"minimist":"^1.2.5"},"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.4_1707939844393_0.14615679798761239","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@agrippa-io/node-generator","version":"1.0.5","author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","_id":"@agrippa-io/node-generator@1.0.5","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"bin":{"node-generator":"bin/index.js"},"dist":{"shasum":"83b703fb50c2c5830cb99a0ade4245a8a84f4aaf","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.5.tgz","fileCount":97,"integrity":"sha512-4xI6v4dDN/ZSUgB/LaWbXimrE2L01uJfDXd+UlUfD/2zm2t/cfK9iYuH3c9ToSDJjFAKr0PaD6WNFl4o4IY2Tw==","signatures":[{"sig":"MEUCIQDHjmN2eKr4G86e+IsZXG/9K3aMLLdbqD5gtesZ6DghKQIgAaa3p2Z7xvMUL7PLelwBB1DAW/q6q1SKdmbkRzoUZt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":76400},"main":"plopfile.js","gitHead":"22dd097e9cb11a94e4f7d634a1c38245a9e2048b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"_npmVersion":"7.7.5","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"plop":"^2.7.4","shelljs":"^0.8.4","inquirer-table-prompt":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"minimist":"^1.2.5"},"_npmOperationalInternal":{"tmp":"tmp/node-generator_1.0.5_1707940438197_0.22081871755634896","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@agrippa-io/node-generator","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","version":"1.0.6","main":"plopfile.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","generate":"plop"},"bin":{"node-generator":"bin/index.js"},"author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","dependencies":{"inquirer-table-prompt":"^0.2.1","plop":"^2.7.4","shelljs":"^0.8.4"},"devDependencies":{"minimist":"^1.2.5"},"gitHead":"734c51a876f64a9ab9a441ec0ff62f54d04c7621","_id":"@agrippa-io/node-generator@1.0.6","_nodeVersion":"14.16.0","_npmVersion":"7.7.5","dist":{"integrity":"sha512-TWKbRBCvQmZiKh/192qJA8AYpKYISiZzamDk9ZjEh6T+VlanLOZvB061+PJ2BTibYEmZeh4/IDlsCTPiMPBa0w==","shasum":"95ffa8c5cf47d7e16d80da78a3d879daaff4671e","tarball":"https://registry.npmjs.org/@agrippa-io/node-generator/-/node-generator-1.0.6.tgz","fileCount":97,"unpackedSize":76063,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsPoPKSQSt01FBaGS9SmES4MMZE5JwiW7wYHnVu5mmYgIhAMh7zdd76JMiOljUKHNrzspxV46zDOWqrJtGVUOuliNP"}]},"_npmUser":{"name":"mattvalli","email":"matthew.valli@gmail.com"},"directories":{},"maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-generator_1.0.6_1726984648532_0.9178726604878669"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-24T04:48:33.881Z","modified":"2024-09-22T05:57:29.133Z","1.0.0-beta.1":"2021-10-24T04:48:34.050Z","1.0.0":"2021-10-28T06:13:08.415Z","1.0.1":"2021-10-28T06:22:47.090Z","1.0.2":"2021-11-04T06:06:12.123Z","1.0.3":"2021-11-04T06:27:59.541Z","1.0.4":"2024-02-14T19:44:04.551Z","1.0.5":"2024-02-14T19:53:58.367Z","1.0.6":"2024-09-22T05:57:28.931Z"},"author":{"name":"Agrippa Development Team"},"license":"UNLICENSED","description":"Plop is a scaffolding tool used to build out a file structure that would otherwise take a lot of your time just creating files at the right location with the right naming conventions.","maintainers":[{"name":"mattvalli","email":"matthew.valli@gmail.com"}],"readme":"# Using Plop for Rapid Prototyping\nPlop is a scaffolding tool used to build out a file structure that would\notherwise take a lot of your time just creating files at the right location\nwith the right naming conventions.\n\nManually doing so would likely lead to an inconsistent file structure and file\nnaming conventions...and that is just the start.\n\nHere at Agrippa.io, we have setup a number of generators to get you going \nquickly.\n\nThe `node-generator` assists in creating, naming and placing the appropriate\nfiles into the project. They are also used to dynamically generate your \nroutes using `snake-case`.\n\nThe power of Plop doesn't stop there. When the generators execute after all \nprompts in the CLI have been completed, Plop reads from a series of configuration \nfiles to create the appropriate files at the right path with the right name. Plop \nreferences each configurition and selects a registered template to use for the \ngenerating the contents of the file.\n\n`Plop Templates` are just `handlebar (.hbs)` files. These templates are passed the\nvalues provided from the series of CLI Prompts and plug them into the templates \nto dynamically create the content of the `output file`.\n\nThis allows us to not only build out a lot of the boilerplate code, but also \ncreate the minimal implementation of almost all the files you will need to \ncreate basic CRUD operations.\n\nOur Plop generators can do most of the work to get full CRUD Operations \nwired up and functioning, but there are things it cannot do.\n\nPlop cannot write your models for you. Here comes your magnificant skills as a \nDeveloper. Unleash your awesomeness!\n\n## Generator ExpressRest\nCreates end-to-end RESTful CRUD Operations for a Model\n\nLet's get started by using Plop to generate a Model and all of its REST endpoints.\n\nIn your CLI, navigate to the root of the project directory you are working \non and follow the steps below to create our example model `Plan`:\n\n```\n# Run Plop\nnpm run generate\n\n# Select the `ExpressRest` generator and hit enter\n> ExpressRest\n\n# Enter the model name in PascalCase\n> Plan\n\n# Watch the magic of Plops create a series of files. Take note that Test files are \n# also scaffolded :)\n```\n\nAll of the routes for CRUD operations will be generated, HOWEVER, they \ncommented out by default to prevent you from exposing an endpoint before it \nis production ready.\n\nYOU MUST MANUALLY REGISTER THE MODEL ROUTER (`src/routes/v1/<model-name>`) \nINTO \nTHE VERSION ROUTER FILE (`/src/routes/v1/index.ts`)\n\n### `/src/routes/v1/index.ts`\n```\n// vvv IMPORT OUR NEW PLAN ROUTER vvv\nimport PlanRouter from './Plan'\n\n\n// Authenticated Routes - Models\n// vvv REGISTER OUR PLAN ROUTES WITH THE V1 ROUTER TO ACTIVATE ROUTES vvv\nRouterV3Models.use('/plans', PlanRouter)\n\n// Leave the folling alone as it registers middleware used for Authentication\n// Register v<N> Routes\nconst RouterV<N> = express.Router()\nRouterV1.use('/v1/health', HealthChecker)\nRouterV1.use('/v1/auth', AuthenticationRouter)\nRouterV1.use(\n  '/v1',\n  AuthenticateUser,\n  RejectUnauthorizeRequest,\n  RouterV1Models,\n  CatchAllErrors\n)\n\nexport default RouterV1\n```\n\nOnce you have attached the Model Router to the Root Version Router, you can actually\nstart using the CRUD endpoints as the schema is created with a single property\n`name` of type `string` so that you can immediately test that things are wired up.\n\nTry hitting the following endpoints using Postman:\n * `POST /v1/plans` - with body { name: 'test' }, Creates a new Plan\n * `GET /v1/plans` - List Plans\n * `PUT /v1/plans/:id` - Update Plan\n * `DELETE /v1/plans/:id` - DELETE Plan\n \nNOTE: I have not added the `PATCH` endpoints to ExpressRest yet...maybe give it a shot?\n\nNow that we have tested that our routes work out of the box, we can start implementing\nour model-specific logic. Most of this will be done in the appropriate `src/model/<model-name`\ndirectory.\n\nRequired File Updates:\n * `/src/constants/model.ts` - Add the new Model Name to the Models Constants file\n * `/src/model/<model-name>/schemaDefinition.js` - Write the Model Schema (By default has `name` prop)\n * `/src/model/<model-name>/interfaces/props.ts` - Declare props a simple POJO Model Object contains\n * `/src/model/<model-name>/interfaces/document.ts` - Declare props MongoDB needs to know\n * `/src/model/<model-name>/serializer.js` - Register the properties that will be returned for Model Requests\n \nOptional File Updates:\n * `/src/model/<model-name>/interfaces/model.ts` - Declare custom methods created for Mongoose Model\n * `/src/model/<model-name>/private.js` - Add custom public methods attached to Mongoose Model\n * `/src/model/<model-name>/private.js` - Add custom private methods attached to Mongoose Model\n\nLeverage the Power-User Features of Mongoose:\n * `/src/model/<model-name>/middleware/<custom-middleware>.js` - Add custom Mongoose Middleware\n * `/src/model/<model-name>/quries/<custom-query>.js` - Add custom Mongoose \n   Query Methods\n * `/src/model/<model-name>/validators/<validator-name>.js` - Add custom Mongoose Validators\n * `/src/model/<model-name>/quries/<query-name>.js` - Add custom Mongoose Query Methods\n * `/src/model/<model-name>/virtuals/<virtual-name>.js` - Add Mongoose Model Virtual Methods\n\n","readmeFilename":"README.md"}