{"_id":"nestjs-graceful-shutdown","_rev":"5-0a1b0cf1823a751a4f82952f72eecda6","name":"nestjs-graceful-shutdown","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"nestjs-graceful-shutdown","version":"1.0.0","keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"author":{"name":"hienngm","email":"hienngm99@gmail.com"},"license":"MIT","_id":"nestjs-graceful-shutdown@1.0.0","maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"ava":{"files":["test/**/*.spec.ts"],"require":["ts-node/register/transpile-only"],"extensions":["ts"]},"nyc":{"exclude":["**/*.spec.js"],"extends":"@istanbuljs/nyc-config-typescript"},"dist":{"shasum":"652be5c392a59cfd78ce36078b1c202994fd98d4","tarball":"https://registry.npmjs.org/nestjs-graceful-shutdown/-/nestjs-graceful-shutdown-1.0.0.tgz","fileCount":15,"integrity":"sha512-Khnk6Ub9raMKQG5dxYS5d5tLq2VeA9SBOgBqiAIGSj2iumYyWTg+Vy8eH0xmnmL6+4+4o7PWdhNgLcJKeepSIw==","signatures":[{"sig":"MEQCIGAatjDAMWsK6rdL23SZEIf6s3lPRD37GP4j0nd7UZx5AiBGGqtFyq8fzCMjmz/IbfDlj3hk2QWWfvuf/S2PtkBvdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27341},"main":"build/main/index.js","types":"build/main/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=14"},"gitHead":"9ce1998a6e4952bd57b60f84e799184cd9322524","scripts":{"cov":"run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html","doc":"run-s doc:html && open-cli build/docs/index.html","fix":"run-s fix:*","test":"run-s build test:*","build":"run-p build:*","version":"standard-version","cov:html":"nyc report --reporter=html","cov:lcov":"nyc report --reporter=lcov","cov:send":"run-s cov:lcov && codecov","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json","fix:lint":"eslint src --ext .ts --fix","check-cli":"run-s test diff-integration-tests check-integration-tests","cov:check":"nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100","test:lint":"eslint src --ext .ts","test:unit":"nyc --silent ava --verbose --serial","build:main":"tsc -p tsconfig.build.json","reset-hard":"git clean -dfx && git reset --hard && npm i","watch:test":"nyc ava --watch","doc:publish":"gh-pages -m \"[ci skip] Updates\" -d build/docs","watch:build":"tsc -p tsconfig.json -w","fix:prettier":"prettier \"src/**/*.ts\" --write","test:prettier":"prettier \"src/**/*.ts\" --list-different","test:spelling":"cspell \"{README.md,.github/*.md,src/**/*.ts}\"","prepare-release":"run-s reset-hard test cov:check doc:html version doc:publish","diff-integration-tests":"mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'","check-integration-tests":"run-s check-integration-test:*"},"_npmUser":{"name":"hienngm","email":"hienngm99@gmail.com"},"prettier":{"singleQuote":true},"repository":{"url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git","type":"git"},"_npmVersion":"8.19.3","description":"A powerful package for gracefully shutting down NestJS applications","directories":{},"_nodeVersion":"16.19.1","_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","got":"^11.8.2","nyc":"^15.1.0","execa":"^7.1.1","sinon":"^11.1.2","cspell":"^4.1.0","eslint":"^7.8.0","codecov":"^3.5.0","ts-node":"^9.0.0","typedoc":"^0.24.7","gh-pages":"^3.1.0","open-cli":"^7.2.0","pid-port":"^0.2.0","prettier":"^2.1.1","typescript":"^4.0.2","npm-run-all":"^4.1.5","@nestjs/core":"^9.4.2","@nestjs/common":"^9.4.2","agentkeepalive":"^4.1.4","@ava/typescript":"^4.0.0","http-terminator":"^3.2.0","standard-version":"^9.0.0","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^6.11.0","@nestjs/platform-express":"^9.4.2","@nestjs/platform-fastify":"^9.4.2","@typescript-eslint/parser":"^4.0.1","cz-conventional-changelog":"^3.3.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^4.0.1","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependencies":{"@nestjs/common":"*","http-terminator":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-graceful-shutdown_1.0.0_1685030735856_0.5132809182793157","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"nestjs-graceful-shutdown","version":"1.0.1","keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"author":{"name":"hienngm","email":"hienngm99@gmail.com"},"license":"MIT","_id":"nestjs-graceful-shutdown@1.0.1","maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"ava":{"files":["test/**/*.spec.ts"],"require":["ts-node/register/transpile-only"],"extensions":["ts"]},"nyc":{"exclude":["**/*.spec.js"],"extends":"@istanbuljs/nyc-config-typescript"},"dist":{"shasum":"1bd05e439b740a669bc6ed34901c19e4df1a2e3d","tarball":"https://registry.npmjs.org/nestjs-graceful-shutdown/-/nestjs-graceful-shutdown-1.0.1.tgz","fileCount":15,"integrity":"sha512-AvwXNDyfTzSeM4oNoE9zZjip+Za5ycaChuOYuv0OBU0aociUtALzmICfBW5xasYut13chY7mlcIiSxAwYqmQvQ==","signatures":[{"sig":"MEUCIQDPlytEvpPbX6OQZAb+uHDmWYFtoORxcTDBHwJtBWs9kwIgJ4Z5fNjZWqpE4BOqAhSulXnY+J5aMEEdQw0TfsB/QAk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27512},"main":"build/main/index.js","types":"build/main/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=14"},"gitHead":"c00a523428804c3a46463d57872bf7515d055ca6","scripts":{"cov":"run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html","doc":"run-s doc:html && open-cli build/docs/index.html","fix":"run-s fix:*","test":"run-s build test:*","build":"run-p build:*","version":"standard-version","cov:html":"nyc report --reporter=html","cov:lcov":"nyc report --reporter=lcov","cov:send":"run-s cov:lcov && codecov","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json","fix:lint":"eslint src --ext .ts --fix","check-cli":"run-s test diff-integration-tests check-integration-tests","cov:check":"nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100","test:lint":"eslint src --ext .ts","test:unit":"nyc --silent ava --verbose --serial","build:main":"tsc -p tsconfig.build.json","reset-hard":"git clean -dfx && git reset --hard && npm i","watch:test":"nyc ava --watch","doc:publish":"gh-pages -m \"[ci skip] Updates\" -d build/docs","watch:build":"tsc -p tsconfig.json -w","fix:prettier":"prettier \"src/**/*.ts\" --write","test:prettier":"prettier \"src/**/*.ts\" --list-different","test:spelling":"cspell \"{README.md,.github/*.md,src/**/*.ts}\"","prepare-release":"run-s reset-hard test cov:check doc:html version doc:publish","diff-integration-tests":"mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'","check-integration-tests":"run-s check-integration-test:*"},"_npmUser":{"name":"hienngm","email":"hienngm99@gmail.com"},"prettier":{"singleQuote":true},"repository":{"url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git","type":"git"},"_npmVersion":"8.19.4","description":"A powerful package for gracefully shutting down NestJS applications","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","got":"^11.8.2","nyc":"^15.1.0","execa":"^7.1.1","sinon":"^11.1.2","cspell":"^4.1.0","eslint":"^7.8.0","codecov":"^3.5.0","ts-node":"^9.0.0","typedoc":"^0.24.7","gh-pages":"^3.1.0","open-cli":"^7.2.0","pid-port":"^0.2.0","prettier":"^2.1.1","typescript":"^4.0.2","npm-run-all":"^4.1.5","@nestjs/core":"^9.4.2","@nestjs/common":"^9.4.2","agentkeepalive":"^4.1.4","@ava/typescript":"^4.0.0","http-terminator":"^3.2.0","reflect-metadata":"^0.1.12","standard-version":"^9.0.0","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^6.11.0","@nestjs/platform-express":"^9.4.2","@nestjs/platform-fastify":"^9.4.2","@typescript-eslint/parser":"^4.0.1","cz-conventional-changelog":"^3.3.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^4.0.1","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependencies":{"@nestjs/common":"*","http-terminator":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-graceful-shutdown_1.0.1_1708595769299_0.5310991141683026","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"nestjs-graceful-shutdown","version":"1.0.2","keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"author":{"name":"hienngm","email":"hienngm99@gmail.com"},"license":"MIT","_id":"nestjs-graceful-shutdown@1.0.2","maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"ava":{"files":["test/**/*.spec.ts"],"require":["ts-node/register/transpile-only"],"extensions":["ts"]},"nyc":{"exclude":["**/*.spec.js"],"extends":"@istanbuljs/nyc-config-typescript"},"dist":{"shasum":"6481a04d6789e50cff4dd58b3f5c97322fbf60a5","tarball":"https://registry.npmjs.org/nestjs-graceful-shutdown/-/nestjs-graceful-shutdown-1.0.2.tgz","fileCount":15,"integrity":"sha512-Z0UTuksgQIM4FZsYUgQBsJkGuHsCj4JHU5jgz4fcjj3y7KXcgMzK3rOqWCz4MnL++m/eP/X5nxfSEUHP+WMrow==","signatures":[{"sig":"MEQCIDIP72NmnbRwt7LwUqsW9XsWip7K/WIFdVfNTlzwCV6MAiBq9RGH6squoe6aSCnWFqsdyiZYOTVzcObXFSj93GOGPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/nestjs-graceful-shutdown@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27574},"main":"build/main/index.js","types":"build/main/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=14"},"gitHead":"eae5cb759713851fbdc19bef7af3a6867faabc2f","scripts":{"cov":"run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html","doc":"run-s doc:html && open-cli build/docs/index.html","fix":"run-s fix:*","test":"run-s build test:*","build":"run-p build:*","version":"standard-version","cov:html":"nyc report --reporter=html","cov:lcov":"nyc report --reporter=lcov","cov:send":"run-s cov:lcov && codecov","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json","fix:lint":"eslint src --ext .ts --fix","check-cli":"run-s test diff-integration-tests check-integration-tests","cov:check":"nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100","test:lint":"eslint src --ext .ts","test:unit":"nyc --silent ava --verbose --serial","build:main":"tsc -p tsconfig.build.json","reset-hard":"git clean -dfx && git reset --hard && npm i","watch:test":"nyc ava --watch","doc:publish":"gh-pages -m \"[ci skip] Updates\" -d build/docs","watch:build":"tsc -p tsconfig.json -w","fix:prettier":"prettier \"src/**/*.ts\" --write","test:prettier":"prettier \"src/**/*.ts\" --list-different","test:spelling":"cspell \"{README.md,.github/*.md,src/**/*.ts}\"","prepare-release":"run-s reset-hard test cov:check doc:html version doc:publish","diff-integration-tests":"mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'","check-integration-tests":"run-s check-integration-test:*"},"_npmUser":{"name":"hienngm","email":"hienngm99@gmail.com"},"prettier":{"singleQuote":true},"repository":{"url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git","type":"git"},"_npmVersion":"10.7.0","description":"A powerful package for gracefully shutting down NestJS applications","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","got":"^11.8.2","nyc":"^15.1.0","execa":"^7.1.1","sinon":"^11.1.2","cspell":"^4.1.0","eslint":"^7.8.0","codecov":"^3.5.0","ts-node":"^9.0.0","typedoc":"^0.24.7","gh-pages":"^3.1.0","open-cli":"^7.2.0","pid-port":"^0.2.0","prettier":"^2.1.1","typescript":"^4.0.2","npm-run-all":"^4.1.5","@nestjs/core":"^9.4.2","@nestjs/common":"^9.4.2","agentkeepalive":"^4.1.4","@ava/typescript":"^4.0.0","http-terminator":"^3.2.0","reflect-metadata":"^0.1.12","standard-version":"^9.0.0","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^6.11.0","@nestjs/platform-express":"^9.4.2","@nestjs/platform-fastify":"^9.4.2","@typescript-eslint/parser":"^4.0.1","cz-conventional-changelog":"^3.3.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^4.0.1","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependencies":{"@nestjs/common":"*","http-terminator":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-graceful-shutdown_1.0.2_1722020356913_0.47449350388999756","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"nestjs-graceful-shutdown","version":"1.0.3","keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"author":{"name":"hienngm","email":"hienngm99@gmail.com"},"license":"MIT","_id":"nestjs-graceful-shutdown@1.0.3","maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"ava":{"files":["test/**/*.spec.ts"],"require":["ts-node/register/transpile-only"],"extensions":["ts"]},"nyc":{"exclude":["**/*.spec.js"],"extends":"@istanbuljs/nyc-config-typescript"},"dist":{"shasum":"5c266327e8e60f01e9291ead1319b6a2c6d40b42","tarball":"https://registry.npmjs.org/nestjs-graceful-shutdown/-/nestjs-graceful-shutdown-1.0.3.tgz","fileCount":15,"integrity":"sha512-35xh+OEAvnPWRATmpIV+v/obFeLUwT8aIXFK6hJ+yRW5jXvd3Urb1ULUtN19EHJlPzzbHXJq08U4vS2W4xV9Lg==","signatures":[{"sig":"MEQCIG+R7uW9y76VFTkhv0p7w1s6Brt69q3OzAXQOMxl+1UJAiBa/gkEGOrQdVaqQ4c3jM8UQLdwcincVQN0j9Xl3P9EDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/nestjs-graceful-shutdown@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28409},"main":"build/main/index.js","types":"build/main/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=14"},"gitHead":"1be1b6589486bab423167aa5306725c0c4e86429","scripts":{"cov":"run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html","doc":"run-s doc:html && open-cli build/docs/index.html","fix":"run-s fix:*","test":"run-s build test:*","build":"run-p build:*","version":"standard-version","cov:html":"nyc report --reporter=html","cov:lcov":"nyc report --reporter=lcov","cov:send":"run-s cov:lcov && codecov","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json","fix:lint":"eslint src --ext .ts --fix","check-cli":"run-s test diff-integration-tests check-integration-tests","cov:check":"nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100","test:lint":"eslint src --ext .ts","test:unit":"nyc --silent ava --verbose --serial","build:main":"tsc -p tsconfig.build.json","reset-hard":"git clean -dfx && git reset --hard && npm i","watch:test":"nyc ava --watch","doc:publish":"gh-pages -m \"[ci skip] Updates\" -d build/docs","watch:build":"tsc -p tsconfig.json -w","fix:prettier":"prettier \"src/**/*.ts\" --write","test:prettier":"prettier \"src/**/*.ts\" --list-different","test:spelling":"cspell \"{README.md,.github/*.md,src/**/*.ts}\"","prepare-release":"run-s reset-hard test cov:check doc:html version doc:publish","diff-integration-tests":"mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'","check-integration-tests":"run-s check-integration-test:*"},"_npmUser":{"name":"hienngm","email":"hienngm99@gmail.com"},"prettier":{"singleQuote":true},"repository":{"url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git","type":"git"},"_npmVersion":"10.7.0","description":"A powerful package for gracefully shutting down NestJS applications","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","got":"^11.8.2","nyc":"^15.1.0","execa":"^7.1.1","sinon":"^11.1.2","cspell":"^4.1.0","eslint":"^7.8.0","codecov":"^3.5.0","ts-node":"^9.0.0","typedoc":"^0.24.7","gh-pages":"^3.1.0","open-cli":"^7.2.0","pid-port":"^0.2.0","prettier":"^2.1.1","typescript":"^4.0.2","npm-run-all":"^4.1.5","@nestjs/core":"^9.4.2","@nestjs/common":"^9.4.2","agentkeepalive":"^4.1.4","@ava/typescript":"^4.0.0","http-terminator":"^3.2.0","reflect-metadata":"^0.1.12","standard-version":"^9.0.0","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^6.11.0","@nestjs/platform-express":"^9.4.2","@nestjs/platform-fastify":"^9.4.2","@typescript-eslint/parser":"^4.0.1","cz-conventional-changelog":"^3.3.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^4.0.1","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependencies":{"@nestjs/common":"*","http-terminator":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-graceful-shutdown_1.0.3_1722022496949_0.47480899827633105","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"nestjs-graceful-shutdown","version":"2.0.0","description":"A powerful package for gracefully shutting down NestJS applications","main":"build/main/index.js","types":"build/main/index.d.ts","license":"MIT","author":{"name":"hienngm","email":"hienngm99@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git"},"homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","scripts":{"build":"run-p build:*","build:main":"tsc -p tsconfig.build.json","fix":"run-s fix:*","fix:prettier":"prettier \"src/**/*.ts\" --write","fix:lint":"eslint src --ext .ts --fix","test":"run-s build test:*","test:lint":"eslint src --ext .ts","test:prettier":"prettier \"src/**/*.ts\" --list-different","test:spelling":"cspell \"{README.md,.github/*.md,src/**/*.ts}\"","test:unit":"nyc --silent ava --verbose --serial","check-cli":"run-s test diff-integration-tests check-integration-tests","check-integration-tests":"run-s check-integration-test:*","diff-integration-tests":"mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'","watch:build":"tsc -p tsconfig.json -w","watch:test":"nyc ava --watch","cov":"run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html","cov:html":"nyc report --reporter=html","cov:lcov":"nyc report --reporter=lcov","cov:send":"run-s cov:lcov && codecov","cov:check":"nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100","doc":"run-s doc:html && open-cli build/docs/index.html","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json","doc:publish":"gh-pages -m \"[ci skip] Updates\" -d build/docs","version":"standard-version","reset-hard":"git clean -dfx && git reset --hard && npm i","prepare-release":"run-s reset-hard test cov:check doc:html version doc:publish"},"engines":{"node":">=14"},"devDependencies":{"@ava/typescript":"^4.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1","@nestjs/common":"^9.4.2","@nestjs/core":"^9.4.2","@nestjs/platform-express":"^9.4.2","@nestjs/platform-fastify":"^9.4.2","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","agentkeepalive":"^4.1.4","ava":"^3.15.0","codecov":"^3.5.0","cspell":"^4.1.0","cz-conventional-changelog":"^3.3.0","delay":"^5.0.0","eslint":"^7.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.22.0","execa":"^7.1.1","gh-pages":"^3.1.0","got":"^11.8.2","http-terminator":"^3.2.0","npm-run-all":"^4.1.5","nyc":"^15.1.0","open-cli":"^7.2.0","pid-port":"^0.2.0","prettier":"^2.1.1","reflect-metadata":"^0.1.12","sinon":"^11.1.2","standard-version":"^9.0.0","ts-node":"^9.0.0","typedoc":"^0.24.7","typescript":"^4.0.2"},"peerDependencies":{"@nestjs/common":"*","http-terminator":"^3.2.0"},"ava":{"extensions":["ts"],"files":["test/**/*.spec.ts"],"require":["ts-node/register/transpile-only"]},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"prettier":{"singleQuote":true},"nyc":{"extends":"@istanbuljs/nyc-config-typescript","exclude":["**/*.spec.js"]},"keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"_id":"nestjs-graceful-shutdown@2.0.0","gitHead":"c48565455e92ba2caeca70ef5fb37f75a9a17631","bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Vnb3ycdlj5AORvp5aAiiXcvmVSmQ/CIfVJaa0ITxSK6vpXJOSkR3PjqnDdK8fh7iRFWCK2q+SoiwMJW3t7BzLg==","shasum":"3d1d79203d1e070183cb5b78b5e2764ad6c177d0","tarball":"https://registry.npmjs.org/nestjs-graceful-shutdown/-/nestjs-graceful-shutdown-2.0.0.tgz","fileCount":15,"unpackedSize":29199,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/nestjs-graceful-shutdown@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDbn2pKCxlhP8NegdQ3ydEJNjuJ2GoZQVjcAQ0rgLWaBAIhAIjs1fRAUYGyu08chCk35vjWTRCYu2gzPOC7WGW3KYLY"}]},"_npmUser":{"name":"hienngm","email":"hienngm99@gmail.com"},"directories":{},"maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-graceful-shutdown_2.0.0_1761667701431_0.3966011700581791"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-25T16:05:35.855Z","modified":"2025-10-28T16:08:22.003Z","1.0.0":"2023-05-25T16:05:36.054Z","1.0.1":"2024-02-22T09:56:09.504Z","1.0.2":"2024-07-26T18:59:17.100Z","1.0.3":"2024-07-26T19:34:57.155Z","2.0.0":"2025-10-28T16:08:21.611Z"},"bugs":{"url":"https://github.com/hienngm/nestjs-graceful-shutdown/issues"},"author":{"name":"hienngm","email":"hienngm99@gmail.com"},"license":"MIT","homepage":"https://github.com/hienngm/nestjs-graceful-shutdown#readme","keywords":["nestjs","nest.js","nest","graceful shutdown","graceful-shutdown","graceful","gracefully","http-shutdown","http shutdown","http-terminate","http-terminator","http terminate","shutdown","terminate","application","server","node.js","nodejs","node","http","https","docker","kubernetes","prometheus","keep-alive","close"],"repository":{"type":"git","url":"git+https://github.com/hienngm/nestjs-graceful-shutdown.git"},"description":"A powerful package for gracefully shutting down NestJS applications","maintainers":[{"name":"hienngm","email":"hienngm99@gmail.com"}],"readme":"<p align=\"center\">\n<a href=\"https://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo-small.svg\" width=\"120\" alt=\"Nest Logo\" /></a>\n</p>\n<h1 align=\"center\">NestJS Graceful Shutdown 🐈</h1>\n\n<p align=\"center\">\n  Elevate your NestJS application with seamless and reliable server shutdowns, guaranteeing uninterrupted user experiences and effortless handling of critical shutdown scenarios.\n  <p align=\"center\">\n    <a href=\"https://www.npmjs.com/package/nestjs-graceful-shutdown\" target=\"_blank\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/nestjs-graceful-shutdown\" /></a>\n    <a href=\"https://www.npmjs.com/package/nestjs-graceful-shutdown\" target=\"_blank\"><img alt=\"NPM\" src=\"https://img.shields.io/npm/l/nestjs-graceful-shutdown\" /></a>\n    <a href=\"https://www.npmjs.com/package/nestjs-graceful-shutdown\" target=\"_blank\"><img alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/nestjs-graceful-shutdown\" /></a>\n     <a href=\"https://coveralls.io/github/hienngm/nestjs-graceful-shutdown?branch=main\" target=\"_blank\"><img alt=\"coverage\" src=\"https://coveralls.io/repos/github/hienngm/nestjs-graceful-shutdown/badge.svg?branch=main\" /></a>\n  </p>\n</p>\n\n> 🚀 **Looking for an enhanced version?** Check out [`@tygra/nestjs-graceful-shutdown`](https://www.npmjs.com/package/@tygra/nestjs-graceful-shutdown) - a production-ready fork with significant improvements:\n>\n> - **Comprehensive test coverage**: Achieved >99% statement coverage and >87% branch coverage with 44+ test cases\n> - **Robust error handling**: Improved fallback mechanisms and graceful degradation when termination fails\n> - **Edge case coverage**: Extensive testing of error scenarios including cleanup failures, termination errors, and signal handling\n>\n> We strongly recommend all users to use [`@tygra/nestjs-graceful-shutdown`](https://www.npmjs.com/package/@tygra/nestjs-graceful-shutdown) for enhanced reliability and better production support.\n\n## Table of Contents\n\n- [Description](#description)\n- [Installation](#installation)\n- [Example](#example)\n- [Configuration](#configuration)\n- [Testing Instructions](#testing-instructions)\n- [Contact and Feedback](#contact-and-feedback)\n- [License](#license)\n\n## Description\n\nDon't let your server hang indefinitely!\n\nWhen you explicitly call `app.close()` or if the process receive a special system signal (such as SIGTERM) after correctly invoking `enableShutdownHooks` during application bootstrap (check out the <a href=\"https://docs.nestjs.com/fundamentals/lifecycle-events#application-shutdown\" target=\"_blank\">NestJS docs</a>), the server stops accepting new connections while maintaining existing ones. This leads to your server hanging indefinitely due to lingering keep-alive connections or unresponsive requests.\n\nPowered by the robust <a href=\"https://www.npmjs.com/package/http-terminator\" target=\"_blank\">`http-terminator`</a>library and backed by NestJS's built-in shutdown hooks, `nestjs-graceful-shutdown` ensures graceful communication with clients currently receiving responses from your server during the shutdown process. Experience a reliable and hassle-free server shutdown with ease.\n\n## Installation\n\nYou can install the library using npm:\n\n```\nnpm install nestjs-graceful-shutdown http-terminator\n```\n\n## Example\n\nTo integrate `nestjs-graceful-shutdown` into your NestJS application, follow these steps:\n\n1. First, import the module with `GracefulShutdownModule.forRoot(...)` or `GracefulShutdownModule.forRootAsync(...)` into your root `AppModule`. (refer to the module configuration documentation [below](#configuration)).\n\n```ts\nimport { GracefulShutdownModule } from 'nestjs-graceful-shutdown';\n\n@Module({\n  imports: [GracefulShutdownModule.forRoot()],\n  ...\n})\nclass AppModule {}\n```\n\n2. Next, set up graceful shutdown for your NestJS application by calling the `setupGracefulShutdown(...)` function.\n\n> ⚠️ **Warning:** `nestjs-graceful-shutdown` will automatically enable the shutdown hooks. Avoid calling `enableShutdownHooks` separately in your application, as it may lead to unexpected behavior. For more information on NestJS application lifecycle, refer to the <a href =\"https://docs.nestjs.com/fundamentals/lifecycle-events#application-shutdown\" target=\"_blank\">NestJS documentation</a>.\n\n```typescript\nimport { setupGracefulShutdown } from 'nestjs-graceful-shutdown';\nimport { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  // Additional configuration for your NestJS app\n\n  setupGracefulShutdown({ app });\n\n  await app.listen(3000);\n\n  // Note: Timeout is used for illustration of\n  // delayed termination purposes only.\n  setTimeout(() => {\n    process.kill(process.pid, 'SIGTERM');\n  }, 5000);\n}\nbootstrap();\n```\n\nPlease note that the above code snippets demonstrate the basic setup of `nestjs-graceful-shutdown` in your NestJS application. Make sure to adjust the code based on your specific application requirements and configuration.\n\n## Configuration\n\n### Configuration interface\n\nThe following interface is used for `GracefulShutdownModule` configuration:\n\n```ts\ninterface IGracefulShutdownConfigOptions {\n  /**\n   * Cleanup function for releasing application resources\n   * during server shutdown.\n   */\n  cleanup?: (app: INestApplication, signal?: string) => any;\n  /**\n   * The duration in milliseconds before forcefully\n   * terminating a connection.\n   * Defaults: 5000 (5 seconds).\n   */\n  gracefulShutdownTimeout?: number;\n  /**\n   * If set to `true`, the Node process will not be terminated\n   * by a shutdown signal after closing all connections.\n   * The shutdown behavior is identical to invoking `app.close()`.\n   * Defaults: false.\n   */\n  keepNodeProcessAlive?: boolean;\n}\n```\n\nThe following interface is used for `setupGracefulShutdown` function parameters:\n\n```ts\ninterface ISetupFunctionParams {\n  /**\n   * Your NestJS application.\n   */\n  app: INestApplication;\n  /**\n   * Shutdown signals that the application should listen to.\n   * By default, it listens to all ShutdownSignals.\n   */\n  signals?: ShutdownSignal[] | string[];\n}\n```\n\n### Zero configuration\n\nJust import `GracefulShutdownModule` to `AppModule`:\n\n```ts\nimport { GracefulShutdownModule } from 'nestjs-graceful-shutdown';\n\n@Module({\n  imports: [GracefulShutdownModule.forRoot()],\n  ...\n})\nclass AppModule {}\n```\n\n### Synchronous configuration\n\nUse `GracefulShutdownModule.forRoot` method with argument of [Configuration interface](#configuration-interface):\n\n```ts\nimport { GracefulShutdownModule } from 'nestjs-graceful-shutdown';\n\n@Module({\n  imports: [\n    GracefulShutdownModule.forRoot({\n      cleanup: async (app, signal) => {\n        // releasing resources\n      },\n      gracefulShutdownTimeout:\n        Number(process.env.GRACEFUL_SHUTDOWN_TIMEOUT ?? 10000),\n      keepNodeProcessAlive: true,\n    })\n  ],\n  ...\n})\nclass AppModule {}\n```\n\n### Asynchronous configuration\n\nWith `GracefulShutdownModule.forRootAsync` you can, for example, import your `ConfigModule` and inject `ConfigService` to use it in `useFactory` method.\n\n`useFactory` should return object with [Configuration interface](#configuration-interface)\n\nHere's an example:\n\n```ts\nimport { GracefulShutdownModule } from 'nestjs-graceful-shutdown';\n\n@Injectable()\nclass ConfigService {\n  public readonly timeout = 10000;\n}\n\n@Module({\n  providers: [ConfigService],\n  exports: [ConfigService]\n})\nclass ConfigModule {}\n\n@Module({\n  imports: [\n    GracefulShutdownModule.forRootAsync({\n      imports: [ConfigModule],\n      inject: [ConfigService],\n      useFactory: async (config: ConfigService) => {\n        await somePromise();\n        return {\n          gracefulShutdownTimeout: config.timeout,\n        };\n      }\n    })\n  ],\n  ...\n})\nclass AppModule {}\n```\n\n### Testing Instructions\n\nWhen testing, you may need to override the graceful shutdown module with a mock module. Thanks to NestJS, this can easily be achieved using `overrideModule`. See the following example:\n\n```typescript\nconst moduleFixture: TestingModule = await Test.createTestingModule({\n  imports: [AppModule],\n})\n  .overrideModule(GracefulShutdownModule)\n  .useModule(MockModule)\n  .compile();\n```\n\nIf you don't want to use a `MockModule`, you can use `app.listen()` instead of `app.init()` in your test file.\n\n```typescript\nbeforeEach(async () => {\n  const moduleFixture: TestingModule = await Test.createTestingModule({\n    imports: [AppModule],\n  }).compile();\n\n  app = moduleFixture.createNestApplication();\n  setupGracefulShutdown({ app });\n  await app.listen();\n});\n```\n\n## Contact and Feedback\n\nFeel free to reach out if you have any ideas, comments, or questions.\n\nBest regards,\n\nHien Nguyen Minh\n\n## License\n\nThis library is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","readmeFilename":"README.md"}