{"_id":"serverless-hooks","_rev":"1-191b025264b838d5783d252bef521267","name":"serverless-hooks","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"serverless-hooks","version":"1.0.0","description":"Run npm scripts on serverless hook events","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/jlopez/serverless-hooks.git"},"keywords":["serverless","serverless framework","serverless hooks","serverless offline","amazon web services","aws","lambda","npm scripts"],"author":{"name":"Jesus Lopez","email":"jesus@jesusla.com","url":"https://github.com/jlopez"},"license":"MIT","bugs":{"url":"https://github.com/jlopez/serverless-hooks/issues"},"homepage":"https://github.com/jlopez/serverless-hooks#readme","devDependencies":{"eslint":"^6.7.2","eslint-config-airbnb-base":"^14.0.0","eslint-plugin-import":"^2.19.1","husky":"^3.1.0"},"dependencies":{"async-exit-hook":"^2.0.1","lodash":"^4.17.15","npm-run-all":"^4.1.5","tmp-promise":"^2.0.2"},"peerDependencies":{"serverless":">= 1.48.1"},"husky":{"hooks":{"pre-commit":"eslint --report-unused-disable-directives ."}},"gitHead":"d013015973cd8a8e67f4f1a354cca72306f905a2","_id":"serverless-hooks@1.0.0","_nodeVersion":"12.12.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-sQrylyvmeAQyBEKvzv4oC5xNcjidr3Pq1RV7bm1a3JJfv6WXaRvu049I5TS8jcau585vMEF88AJDqJzZzjiiQg==","shasum":"4e4435eccc1bf33e22828157b97779a08c2bebbf","tarball":"https://registry.npmjs.org/serverless-hooks/-/serverless-hooks-1.0.0.tgz","fileCount":7,"unpackedSize":56292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8URvCRA9TVsSAnZWagAAPxIP+wZLQL1Bg32Y27s933YP\nfjyxRaz/YI3P7OUsnxYve+Nb2syB8Fenkhv9xeCemVSIthhQpx8xblOoksPm\npelI6WeL5brARCnqx/cGbG6bGDzBJP6UD6knPdykvaqq5SWBUO34hv4UCUzb\nX4mdl7n6YoP4MfTYU8LfDku0A4icsEMVxLorUpXmXMUVjbT7DJp7YyiC8fjh\nG/9uxMwRdXiFnALJQQkI692vF7cGh4CFVyg+p3YG5wJqXgPZVSSu0KWp9+EW\nI++zsyIygJNPA+RhSO2cmZXn/E8NLqxdaoFfaWrC5Lbpfhgzt5br9C2E8Xai\nQpokWcgcwdWP5oUd9ouqZEbsONVPykhtsrPTHiGSQynel+ebPTcoMD9UUp9X\n8GHu3UtIEj6oUh8zTKzyZRJnE05k3LQ/k27MLg3aoG6JgkXv/d4MWHwHbYPf\nugsbQ3eRPbMTkVBY0+k1ilNBGRHpa/lnr5WNgTEyKTp87aw7pjV1Lu+Fnd7/\nuFUcDzvtiFOPRRKcMYRzIhK5Tmp+EklB09SRfm7bQAK02JAm5duXPqz5IJ7v\nvnWVpVDFRJApZU7yFZkTyX5E3QC94u+cDg+b6posG+5Coxg3gdV2d179qcvJ\nGvw3+olL4oKQw64rRqni4fi+RABlCncE/+zPs2C2q12Epo/qsVhYBi+IhQ2u\nwV/z\r\n=KTKc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKnCZneR9gh/IPImSsTecDcuSWNfY+ksyiRxLg27eFdAiEAmCbvKlKLqQFqQn7vou7of6wWCrplAwCeMF+7zphQCmk="}]},"maintainers":[{"name":"jesusla","email":"jesus@jesusla.com"}],"_npmUser":{"name":"jesusla","email":"jesus@jesusla.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-hooks_1.0.0_1576092783301_0.7845071731525455"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-11T19:33:03.301Z","1.0.0":"2019-12-11T19:33:03.469Z","modified":"2022-05-17T12:58:40.653Z"},"maintainers":[{"name":"jesusla","email":"jesus@jesusla.com"}],"description":"Run npm scripts on serverless hook events","homepage":"https://github.com/jlopez/serverless-hooks#readme","keywords":["serverless","serverless framework","serverless hooks","serverless offline","amazon web services","aws","lambda","npm scripts"],"repository":{"type":"git","url":"git+https://github.com/jlopez/serverless-hooks.git"},"author":{"name":"Jesus Lopez","email":"jesus@jesusla.com","url":"https://github.com/jlopez"},"bugs":{"url":"https://github.com/jlopez/serverless-hooks/issues"},"license":"MIT","readme":"# Serverless Hooks\n\nThis [Serverless](https://github.com/serverless/serverless) plugin allows\ntriggering execution of npm scripts when [serverless events](https://serverless.com/framework/docs/providers/tencent/guide/plugins#hooks)\nare fired.\n\nSimply declare npm scripts with a name of the form `hook:EVENT` where `EVENT` is\nthe name of a serverless hook event, i.e.:\n\n* `hook:before:offline:start`: Run script before serverless offline launches.\n  This can be particularly useful to setup the local environment, such as launching\n  a local kinesis and initializing it by creating some streams.\n* `hook:after:offline:start`: Run cleanup scripts after serverless offline terminates.\n* `hook:before:package:initialize`: Run script before the packaging initialization.\n\n# Installation\n\nFirst, add the plugin to your project:\n\n`npm install --save-dev serverless-hooks`\n\nThen, inside your project's `serverless.yml` file add `serverless-hooks` to the top-level\nplugins section.  If there is no plugin section you will need to add it to the file.\n\n```YAML\nplugins:\n  - serverless-hooks\n```\n\n# Configuration\n\nPlugin behavior may be configured by adding keys to the `serverless-hooks` section in the\ntop-level custom section.\n\nThese are the configuration entries and their default values:\n\n```YAML\ncustom:\n  serverless-hooks:\n    hookPrefix: hook    # The npm script prefix to indicate a serverless hook script\n    runAllOptions:      # See https://github.com/mysticatea/npm-run-all/blob/HEAD/docs/node-api.md for details\n      stderr:           # boolean to enable stderr, or path to file\n      stdout:           # boolean to enable stdout, or path to file\n      stdin:            # boolean to enable stdin, or path to file\n```\n\n# Execution\n\nWhen scripts are executed, the environment variable `SLS_CONTEXT` contains a path to\na JSON file with the contents of the `serverless` object. The available properties are:\n\n* invocationId: Unique GUID for the current serverless invocation\n* version: Serverless framework version\n* cliCommands: Array with provided CLI commands (e.g. [ 'offline' ])\n* cliOptions: Object with provided CLI options\n* servicePath: Path to directory containing serverless.yml file\n* service: Object with contents of resolved serverless.yml file\n","readmeFilename":"README.md"}