step-node-agent 3.18.3 → 3.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/abbrev/LICENSE +46 -0
- package/node_modules/abbrev/README.md +23 -0
- package/node_modules/abbrev/abbrev.js +61 -0
- package/node_modules/abbrev/package.json +21 -0
- package/node_modules/ansi-align/CHANGELOG.md +36 -0
- package/node_modules/ansi-align/LICENSE +13 -0
- package/node_modules/ansi-align/README.md +79 -0
- package/node_modules/ansi-align/index.js +61 -0
- package/node_modules/ansi-align/package.json +43 -0
- package/node_modules/ansi-regex/index.js +10 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +53 -0
- package/node_modules/ansi-regex/readme.md +46 -0
- package/node_modules/ansi-styles/index.js +165 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +147 -0
- package/node_modules/boxen/index.js +138 -0
- package/node_modules/boxen/license +9 -0
- package/node_modules/boxen/package.json +47 -0
- package/node_modules/boxen/readme.md +175 -0
- package/node_modules/camelcase/index.js +64 -0
- package/node_modules/{send/node_modules/http-errors/LICENSE → camelcase/license} +1 -3
- package/node_modules/camelcase/package.json +42 -0
- package/node_modules/camelcase/readme.md +57 -0
- package/node_modules/capture-stack-trace/index.js +18 -0
- package/node_modules/{express/node_modules/http-errors/LICENSE → capture-stack-trace/license} +1 -3
- package/node_modules/capture-stack-trace/package.json +29 -0
- package/node_modules/capture-stack-trace/readme.md +36 -0
- package/node_modules/chalk/index.js +228 -0
- package/node_modules/chalk/index.js.flow +93 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +71 -0
- package/node_modules/chalk/readme.md +314 -0
- package/node_modules/chalk/templates.js +128 -0
- package/node_modules/chalk/types/index.d.ts +97 -0
- package/node_modules/ci-info/CHANGELOG.md +62 -0
- package/node_modules/ci-info/LICENSE +21 -0
- package/node_modules/ci-info/README.md +107 -0
- package/node_modules/ci-info/index.js +66 -0
- package/node_modules/ci-info/package.json +36 -0
- package/node_modules/ci-info/vendors.json +152 -0
- package/node_modules/cli-boxes/boxes.json +50 -0
- package/node_modules/cli-boxes/index.js +2 -0
- package/node_modules/{http-errors/node_modules/statuses/LICENSE → cli-boxes/license} +1 -3
- package/node_modules/cli-boxes/package.json +39 -0
- package/node_modules/cli-boxes/readme.md +94 -0
- package/node_modules/color-convert/CHANGELOG.md +54 -0
- package/node_modules/{send/node_modules/depd → color-convert}/LICENSE +9 -10
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +868 -0
- package/node_modules/color-convert/index.js +78 -0
- package/node_modules/color-convert/package.json +46 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/.eslintrc.json +43 -0
- package/node_modules/color-name/.npmignore +107 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +25 -0
- package/node_modules/color-name/test.js +7 -0
- package/node_modules/configstore/index.js +106 -0
- package/node_modules/configstore/license +9 -0
- package/node_modules/configstore/package.json +47 -0
- package/node_modules/configstore/readme.md +116 -0
- package/node_modules/cookie/HISTORY.md +8 -0
- package/node_modules/cookie/README.md +50 -34
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +83 -15
- package/node_modules/cookie/package.json +6 -4
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/create-error-class/index.js +44 -0
- package/node_modules/create-error-class/license +21 -0
- package/node_modules/create-error-class/package.json +30 -0
- package/node_modules/create-error-class/readme.md +54 -0
- package/node_modules/cross-spawn/CHANGELOG.md +6 -0
- package/node_modules/cross-spawn/LICENSE +19 -0
- package/node_modules/cross-spawn/README.md +85 -0
- package/node_modules/cross-spawn/index.js +59 -0
- package/node_modules/cross-spawn/lib/enoent.js +73 -0
- package/node_modules/cross-spawn/lib/parse.js +113 -0
- package/node_modules/cross-spawn/lib/util/escapeArgument.js +30 -0
- package/node_modules/cross-spawn/lib/util/escapeCommand.js +12 -0
- package/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js +18 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +37 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +31 -0
- package/node_modules/cross-spawn/package.json +53 -0
- package/node_modules/crypto-random-string/index.js +10 -0
- package/node_modules/crypto-random-string/license +21 -0
- package/node_modules/crypto-random-string/package.json +43 -0
- package/node_modules/crypto-random-string/readme.md +49 -0
- package/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/deep-extend/README.md +91 -0
- package/node_modules/deep-extend/index.js +1 -0
- package/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/node_modules/deep-extend/package.json +62 -0
- package/node_modules/dot-prop/index.js +141 -0
- package/node_modules/dot-prop/license +21 -0
- package/node_modules/dot-prop/package.json +48 -0
- package/node_modules/dot-prop/readme.md +105 -0
- package/node_modules/duplexer3/LICENSE.md +26 -0
- package/node_modules/duplexer3/README.md +115 -0
- package/node_modules/duplexer3/index.js +76 -0
- package/node_modules/duplexer3/package.json +28 -0
- package/node_modules/escape-string-regexp/index.js +11 -0
- package/node_modules/escape-string-regexp/license +21 -0
- package/node_modules/escape-string-regexp/package.json +41 -0
- package/node_modules/escape-string-regexp/readme.md +27 -0
- package/node_modules/execa/index.js +309 -0
- package/node_modules/execa/lib/errname.js +37 -0
- package/node_modules/execa/lib/stdio.js +41 -0
- package/node_modules/execa/license +9 -0
- package/node_modules/execa/package.json +76 -0
- package/node_modules/execa/readme.md +279 -0
- package/node_modules/express/History.md +54 -0
- package/node_modules/express/Readme.md +39 -31
- package/node_modules/express/lib/application.js +18 -1
- package/node_modules/express/lib/response.js +40 -18
- package/node_modules/express/lib/router/index.js +20 -15
- package/node_modules/express/lib/router/route.js +9 -0
- package/node_modules/express/lib/utils.js +1 -0
- package/node_modules/express/lib/view.js +1 -1
- package/node_modules/express/package.json +14 -15
- package/node_modules/finalhandler/HISTORY.md +8 -0
- package/node_modules/finalhandler/LICENSE +1 -1
- package/node_modules/finalhandler/README.md +5 -6
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +8 -3
- package/node_modules/finalhandler/package.json +18 -17
- package/node_modules/get-intrinsic/.eslintrc +2 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +27 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +4 -0
- package/node_modules/get-intrinsic/package.json +22 -12
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +25 -11
- package/node_modules/get-stream/buffer-stream.js +51 -0
- package/node_modules/get-stream/index.js +51 -0
- package/node_modules/get-stream/license +21 -0
- package/node_modules/get-stream/package.json +48 -0
- package/node_modules/get-stream/readme.md +117 -0
- package/node_modules/glob/common.js +2 -0
- package/node_modules/glob/glob.js +4 -1
- package/node_modules/glob/package.json +5 -2
- package/node_modules/glob/sync.js +6 -3
- package/node_modules/global-dirs/index.js +90 -0
- package/node_modules/global-dirs/license +9 -0
- package/node_modules/global-dirs/package.json +52 -0
- package/node_modules/global-dirs/readme.md +69 -0
- package/node_modules/got/index.js +364 -0
- package/node_modules/got/license +21 -0
- package/node_modules/got/package.json +78 -0
- package/node_modules/got/readme.md +335 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +50 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/has-flag/index.js +8 -0
- package/node_modules/has-flag/license +9 -0
- package/node_modules/has-flag/package.json +44 -0
- package/node_modules/has-flag/readme.md +70 -0
- package/node_modules/import-lazy/index.js +53 -0
- package/node_modules/import-lazy/license +21 -0
- package/node_modules/import-lazy/package.json +44 -0
- package/node_modules/import-lazy/readme.md +64 -0
- package/node_modules/imurmurhash/README.md +122 -0
- package/node_modules/imurmurhash/imurmurhash.js +138 -0
- package/node_modules/imurmurhash/imurmurhash.min.js +12 -0
- package/node_modules/imurmurhash/package.json +40 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/README.md +102 -0
- package/node_modules/ini/ini.js +206 -0
- package/node_modules/ini/package.json +33 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.editorconfig +7 -21
- package/node_modules/{get-intrinsic → is-callable}/.eslintignore +0 -0
- package/node_modules/is-callable/.eslintrc +21 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.github/FUNDING.yml +2 -2
- package/node_modules/is-callable/.istanbul.yml +47 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.nycrc +1 -5
- package/node_modules/is-callable/CHANGELOG.md +108 -0
- package/node_modules/is-callable/LICENSE +22 -0
- package/node_modules/is-callable/README.md +67 -0
- package/node_modules/is-callable/index.js +74 -0
- package/node_modules/is-callable/package.json +92 -0
- package/node_modules/is-callable/test/index.js +170 -0
- package/node_modules/is-ci/LICENSE +21 -0
- package/node_modules/is-ci/README.md +50 -0
- package/node_modules/is-ci/bin.js +4 -0
- package/node_modules/is-ci/index.js +3 -0
- package/node_modules/is-ci/package.json +38 -0
- package/node_modules/is-core-module/.eslintrc +1 -0
- package/node_modules/is-core-module/CHANGELOG.md +9 -0
- package/node_modules/is-core-module/core.json +1 -0
- package/node_modules/is-core-module/package.json +8 -12
- package/node_modules/is-core-module/test/index.js +34 -31
- package/node_modules/is-fullwidth-code-point/index.js +46 -0
- package/node_modules/is-fullwidth-code-point/license +21 -0
- package/node_modules/is-fullwidth-code-point/package.json +45 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/is-installed-globally/index.js +5 -0
- package/node_modules/is-installed-globally/license +9 -0
- package/node_modules/is-installed-globally/package.json +48 -0
- package/node_modules/is-installed-globally/readme.md +39 -0
- package/node_modules/is-npm/index.js +4 -0
- package/node_modules/is-npm/package.json +32 -0
- package/node_modules/is-npm/readme.md +30 -0
- package/node_modules/is-obj/index.js +5 -0
- package/node_modules/is-obj/license +21 -0
- package/node_modules/is-obj/package.json +33 -0
- package/node_modules/is-obj/readme.md +34 -0
- package/node_modules/is-path-inside/index.js +14 -0
- package/node_modules/is-path-inside/license +21 -0
- package/node_modules/is-path-inside/package.json +37 -0
- package/node_modules/is-path-inside/readme.md +34 -0
- package/node_modules/is-redirect/index.js +14 -0
- package/node_modules/is-redirect/license +21 -0
- package/node_modules/is-redirect/package.json +35 -0
- package/node_modules/is-redirect/readme.md +28 -0
- package/node_modules/is-retry-allowed/index.js +62 -0
- package/node_modules/is-retry-allowed/license +21 -0
- package/node_modules/is-retry-allowed/package.json +29 -0
- package/node_modules/is-retry-allowed/readme.md +42 -0
- package/node_modules/is-stream/index.js +21 -0
- package/node_modules/is-stream/license +21 -0
- package/node_modules/is-stream/package.json +38 -0
- package/node_modules/is-stream/readme.md +42 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/latest-version/index.js +4 -0
- package/node_modules/latest-version/license +21 -0
- package/node_modules/latest-version/package.json +39 -0
- package/node_modules/latest-version/readme.md +40 -0
- package/node_modules/lowercase-keys/index.js +11 -0
- package/node_modules/lowercase-keys/license +21 -0
- package/node_modules/lowercase-keys/package.json +35 -0
- package/node_modules/lowercase-keys/readme.md +33 -0
- package/node_modules/lru-cache/LICENSE +15 -0
- package/node_modules/lru-cache/README.md +158 -0
- package/node_modules/lru-cache/index.js +468 -0
- package/node_modules/lru-cache/package.json +36 -0
- package/node_modules/make-dir/index.js +85 -0
- package/node_modules/make-dir/license +9 -0
- package/node_modules/make-dir/package.json +54 -0
- package/node_modules/make-dir/readme.md +116 -0
- package/node_modules/nopt/.npmignore +0 -0
- package/node_modules/nopt/LICENSE +23 -0
- package/node_modules/nopt/README.md +208 -0
- package/node_modules/nopt/bin/nopt.js +44 -0
- package/node_modules/nopt/examples/my-program.js +30 -0
- package/node_modules/nopt/lib/nopt.js +552 -0
- package/node_modules/nopt/package.json +12 -0
- package/node_modules/npm/CHANGELOG.md +9 -0
- package/node_modules/npm/docs/public/cli-commands/npm/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-access/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-adduser/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-audit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bin/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bugs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-build/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bundle/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-cache/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ci/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-completion/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-config/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dedupe/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-deprecate/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dist-tag/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-docs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-doctor/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-edit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-explore/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-fund/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-hook/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-init/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-ci-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-link/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-logout/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ls/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-org/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-outdated/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-owner/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-pack/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ping/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prefix/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-profile/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prune/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-publish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-rebuild/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-repo/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-restart/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-root/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-run-script/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-star/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stars/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-start/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stop/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-team/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-token/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-uninstall/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-unpublish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-update/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-version/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-view/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-whoami/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/folders/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/install/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/npmrc/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-lock-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-locks/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +2 -2
- package/node_modules/npm/docs/public/index.html +1 -1
- package/node_modules/npm/docs/public/using-npm/config/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/developers/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/disputes/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/orgs/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/registry/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/removal/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scope/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scripts/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/semver/index.html +2 -2
- package/node_modules/npm/man/man1/npm-README.1 +1 -1
- package/node_modules/npm/man/man1/npm-access.1 +1 -1
- package/node_modules/npm/man/man1/npm-adduser.1 +1 -1
- package/node_modules/npm/man/man1/npm-audit.1 +1 -1
- package/node_modules/npm/man/man1/npm-bin.1 +1 -1
- package/node_modules/npm/man/man1/npm-bugs.1 +1 -1
- package/node_modules/npm/man/man1/npm-build.1 +1 -1
- package/node_modules/npm/man/man1/npm-bundle.1 +1 -1
- package/node_modules/npm/man/man1/npm-cache.1 +1 -1
- package/node_modules/npm/man/man1/npm-ci.1 +1 -1
- package/node_modules/npm/man/man1/npm-completion.1 +1 -1
- package/node_modules/npm/man/man1/npm-config.1 +1 -1
- package/node_modules/npm/man/man1/npm-dedupe.1 +1 -1
- package/node_modules/npm/man/man1/npm-deprecate.1 +1 -1
- package/node_modules/npm/man/man1/npm-dist-tag.1 +1 -1
- package/node_modules/npm/man/man1/npm-docs.1 +1 -1
- package/node_modules/npm/man/man1/npm-doctor.1 +1 -1
- package/node_modules/npm/man/man1/npm-edit.1 +1 -1
- package/node_modules/npm/man/man1/npm-explore.1 +1 -1
- package/node_modules/npm/man/man1/npm-fund.1 +1 -1
- package/node_modules/npm/man/man1/npm-help-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-help.1 +1 -1
- package/node_modules/npm/man/man1/npm-hook.1 +1 -1
- package/node_modules/npm/man/man1/npm-init.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-ci-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install.1 +1 -1
- package/node_modules/npm/man/man1/npm-link.1 +1 -1
- package/node_modules/npm/man/man1/npm-logout.1 +1 -1
- package/node_modules/npm/man/man1/npm-ls.1 +2 -2
- package/node_modules/npm/man/man1/npm-org.1 +1 -1
- package/node_modules/npm/man/man1/npm-outdated.1 +1 -1
- package/node_modules/npm/man/man1/npm-owner.1 +1 -1
- package/node_modules/npm/man/man1/npm-pack.1 +1 -1
- package/node_modules/npm/man/man1/npm-ping.1 +1 -1
- package/node_modules/npm/man/man1/npm-prefix.1 +1 -1
- package/node_modules/npm/man/man1/npm-profile.1 +1 -1
- package/node_modules/npm/man/man1/npm-prune.1 +1 -1
- package/node_modules/npm/man/man1/npm-publish.1 +1 -1
- package/node_modules/npm/man/man1/npm-rebuild.1 +1 -1
- package/node_modules/npm/man/man1/npm-repo.1 +1 -1
- package/node_modules/npm/man/man1/npm-restart.1 +1 -1
- package/node_modules/npm/man/man1/npm-root.1 +1 -1
- package/node_modules/npm/man/man1/npm-run-script.1 +1 -1
- package/node_modules/npm/man/man1/npm-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-shrinkwrap.1 +1 -1
- package/node_modules/npm/man/man1/npm-star.1 +1 -1
- package/node_modules/npm/man/man1/npm-stars.1 +1 -1
- package/node_modules/npm/man/man1/npm-start.1 +1 -1
- package/node_modules/npm/man/man1/npm-stop.1 +1 -1
- package/node_modules/npm/man/man1/npm-team.1 +1 -1
- package/node_modules/npm/man/man1/npm-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-token.1 +1 -1
- package/node_modules/npm/man/man1/npm-uninstall.1 +1 -1
- package/node_modules/npm/man/man1/npm-unpublish.1 +1 -1
- package/node_modules/npm/man/man1/npm-update.1 +1 -1
- package/node_modules/npm/man/man1/npm-version.1 +1 -1
- package/node_modules/npm/man/man1/npm-view.1 +1 -1
- package/node_modules/npm/man/man1/npm-whoami.1 +1 -1
- package/node_modules/npm/man/man1/npm.1 +2 -2
- package/node_modules/npm/man/man5/folders.5 +1 -1
- package/node_modules/npm/man/man5/install.5 +1 -1
- package/node_modules/npm/man/man5/npmrc.5 +1 -1
- package/node_modules/npm/man/man5/package-json.5 +1 -1
- package/node_modules/npm/man/man5/package-lock-json.5 +1 -1
- package/node_modules/npm/man/man5/package-locks.5 +1 -1
- package/node_modules/npm/man/man5/shrinkwrap-json.5 +1 -1
- package/node_modules/npm/man/man7/config.7 +1 -1
- package/node_modules/npm/man/man7/developers.7 +1 -1
- package/node_modules/npm/man/man7/disputes.7 +1 -1
- package/node_modules/npm/man/man7/orgs.7 +1 -1
- package/node_modules/npm/man/man7/registry.7 +1 -1
- package/node_modules/npm/man/man7/removal.7 +1 -1
- package/node_modules/npm/man/man7/scope.7 +1 -1
- package/node_modules/npm/man/man7/scripts.7 +1 -1
- package/node_modules/npm/man/man7/semver.7 +1 -1
- package/node_modules/npm/node_modules/cliui/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/npm/node_modules/cliui/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/npm/node_modules/minimist/index.js +6 -2
- package/node_modules/npm/node_modules/minimist/package.json +1 -1
- package/node_modules/npm/node_modules/minimist/readme.markdown +4 -1
- package/node_modules/npm/node_modules/minimist/test/proto.js +16 -0
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/index.js +6 -2
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/package.json +1 -1
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/readme.markdown +4 -1
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/test/proto.js +16 -0
- package/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/npm/package.json +1 -1
- package/node_modules/npm-run-path/index.js +39 -0
- package/node_modules/npm-run-path/license +21 -0
- package/node_modules/npm-run-path/package.json +45 -0
- package/node_modules/npm-run-path/readme.md +81 -0
- package/node_modules/object-assign/index.js +90 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +42 -0
- package/node_modules/object-assign/readme.md +61 -0
- package/node_modules/object-inspect/CHANGELOG.md +18 -0
- package/node_modules/object-inspect/index.js +7 -6
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +20 -10
- package/node_modules/object-inspect/test/err.js +3 -3
- package/node_modules/object-inspect/test/has.js +6 -25
- package/node_modules/object-inspect/test/inspect.js +37 -0
- package/node_modules/object-inspect/test/values.js +3 -3
- package/node_modules/p-finally/index.js +15 -0
- package/node_modules/p-finally/license +21 -0
- package/node_modules/p-finally/package.json +42 -0
- package/node_modules/p-finally/readme.md +47 -0
- package/node_modules/package-json/index.js +67 -0
- package/node_modules/package-json/license +21 -0
- package/node_modules/package-json/package.json +43 -0
- package/node_modules/package-json/readme.md +91 -0
- package/node_modules/path-exists/index.js +17 -0
- package/node_modules/path-exists/license +21 -0
- package/node_modules/path-exists/package.json +40 -0
- package/node_modules/path-exists/readme.md +50 -0
- package/node_modules/path-is-inside/LICENSE.txt +47 -0
- package/node_modules/path-is-inside/lib/path-is-inside.js +28 -0
- package/node_modules/path-is-inside/package.json +21 -0
- package/node_modules/path-key/index.js +13 -0
- package/node_modules/path-key/license +21 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +51 -0
- package/node_modules/pify/index.js +84 -0
- package/node_modules/pify/license +9 -0
- package/node_modules/pify/package.json +51 -0
- package/node_modules/pify/readme.md +131 -0
- package/node_modules/prepend-http/index.js +14 -0
- package/node_modules/prepend-http/license +21 -0
- package/node_modules/prepend-http/package.json +35 -0
- package/node_modules/prepend-http/readme.md +31 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/pseudomap/LICENSE +15 -0
- package/node_modules/pseudomap/README.md +60 -0
- package/node_modules/pseudomap/map.js +9 -0
- package/node_modules/pseudomap/package.json +25 -0
- package/node_modules/pseudomap/pseudomap.js +113 -0
- package/node_modules/pseudomap/test/basic.js +86 -0
- package/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/rc/README.md +227 -0
- package/node_modules/rc/browser.js +7 -0
- package/node_modules/rc/cli.js +4 -0
- package/node_modules/rc/index.js +53 -0
- package/node_modules/rc/lib/utils.js +104 -0
- package/node_modules/rc/package.json +29 -0
- package/node_modules/rc/test/ini.js +16 -0
- package/node_modules/rc/test/nested-env-vars.js +50 -0
- package/node_modules/rc/test/test.js +59 -0
- package/node_modules/registry-auth-token/.npmignore +6 -0
- package/node_modules/registry-auth-token/CHANGELOG.md +112 -0
- package/node_modules/registry-auth-token/LICENSE +21 -0
- package/node_modules/registry-auth-token/README.md +65 -0
- package/node_modules/registry-auth-token/base64.js +14 -0
- package/node_modules/registry-auth-token/index.js +123 -0
- package/node_modules/registry-auth-token/package.json +46 -0
- package/node_modules/registry-auth-token/registry-url.js +5 -0
- package/node_modules/registry-auth-token/test/auth-token.test.js +455 -0
- package/node_modules/registry-auth-token/test/registry-url.test.js +64 -0
- package/node_modules/registry-auth-token/yarn.lock +1516 -0
- package/node_modules/registry-url/index.js +6 -0
- package/node_modules/registry-url/license +21 -0
- package/node_modules/registry-url/package.json +40 -0
- package/node_modules/registry-url/readme.md +50 -0
- package/node_modules/rimraf/LICENSE +15 -0
- package/node_modules/rimraf/README.md +101 -0
- package/node_modules/rimraf/bin.js +50 -0
- package/node_modules/rimraf/package.json +29 -0
- package/node_modules/rimraf/rimraf.js +364 -0
- package/node_modules/semver/CHANGELOG.md +39 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +412 -0
- package/node_modules/semver/bin/semver +160 -0
- package/node_modules/semver/package.json +28 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +1483 -0
- package/node_modules/semver-diff/index.js +27 -0
- package/node_modules/semver-diff/license +21 -0
- package/node_modules/semver-diff/package.json +34 -0
- package/node_modules/semver-diff/readme.md +52 -0
- package/node_modules/send/HISTORY.md +15 -0
- package/node_modules/send/LICENSE +1 -1
- package/node_modules/send/README.md +2 -2
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +37 -27
- package/node_modules/send/package.json +10 -9
- package/node_modules/serve-static/HISTORY.md +12 -0
- package/node_modules/serve-static/README.md +1 -1
- package/node_modules/serve-static/package.json +5 -5
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +21 -0
- package/node_modules/shebang-command/package.json +39 -0
- package/node_modules/shebang-command/readme.md +39 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +21 -0
- package/node_modules/shebang-regex/package.json +32 -0
- package/node_modules/shebang-regex/readme.md +29 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +39 -0
- package/node_modules/signal-exit/index.js +202 -0
- package/node_modules/signal-exit/package.json +38 -0
- package/node_modules/signal-exit/signals.js +53 -0
- package/node_modules/statuses/HISTORY.md +17 -0
- package/node_modules/statuses/README.md +51 -42
- package/node_modules/statuses/codes.json +2 -3
- package/node_modules/statuses/index.js +52 -19
- package/node_modules/statuses/package.json +17 -16
- package/node_modules/string-width/index.js +36 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +55 -0
- package/node_modules/string-width/readme.md +42 -0
- package/node_modules/strip-ansi/index.js +4 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +52 -0
- package/node_modules/strip-ansi/readme.md +39 -0
- package/node_modules/strip-eof/index.js +15 -0
- package/node_modules/strip-eof/license +21 -0
- package/node_modules/strip-eof/package.json +39 -0
- package/node_modules/strip-eof/readme.md +28 -0
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +42 -0
- package/node_modules/strip-json-comments/readme.md +64 -0
- package/node_modules/supports-color/browser.js +5 -0
- package/node_modules/supports-color/index.js +131 -0
- package/node_modules/supports-color/license +9 -0
- package/node_modules/supports-color/package.json +53 -0
- package/node_modules/supports-color/readme.md +66 -0
- package/node_modules/term-size/index.js +70 -0
- package/node_modules/term-size/license +21 -0
- package/node_modules/term-size/package.json +43 -0
- package/node_modules/term-size/readme.md +41 -0
- package/node_modules/term-size/vendor/macos/term-size +0 -0
- package/node_modules/term-size/vendor/windows/term-size.exe +0 -0
- package/node_modules/timed-out/index.js +55 -0
- package/node_modules/{send/node_modules/destroy/LICENSE → timed-out/license} +1 -2
- package/node_modules/timed-out/package.json +36 -0
- package/node_modules/timed-out/readme.md +42 -0
- package/node_modules/underscore/LICENSE +1 -1
- package/node_modules/underscore/amd/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/amd/_setup.js +3 -3
- package/node_modules/underscore/amd/isObject.js +1 -1
- package/node_modules/underscore/amd/max.js +2 -2
- package/node_modules/underscore/amd/min.js +2 -2
- package/node_modules/underscore/amd/unzip.js +1 -1
- package/node_modules/underscore/cjs/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/cjs/_setup.js +3 -3
- package/node_modules/underscore/cjs/isObject.js +1 -1
- package/node_modules/underscore/cjs/max.js +2 -2
- package/node_modules/underscore/cjs/min.js +2 -2
- package/node_modules/underscore/cjs/unzip.js +1 -1
- package/node_modules/underscore/modules/.eslintrc +10 -1
- package/node_modules/underscore/modules/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/modules/_setup.js +3 -3
- package/node_modules/underscore/modules/index.js +2 -2
- package/node_modules/underscore/modules/isObject.js +1 -1
- package/node_modules/underscore/modules/max.js +2 -2
- package/node_modules/underscore/modules/min.js +2 -2
- package/node_modules/underscore/modules/package.json +1 -3
- package/node_modules/underscore/modules/unzip.js +1 -1
- package/node_modules/underscore/package.json +7 -3
- package/node_modules/underscore/underscore-esm-min.js +3 -3
- package/node_modules/underscore/underscore-esm-min.js.map +1 -1
- package/node_modules/underscore/underscore-esm.js +12 -12
- package/node_modules/underscore/underscore-esm.js.map +1 -1
- package/node_modules/underscore/underscore-min.js +3 -3
- package/node_modules/underscore/underscore-min.js.map +1 -1
- package/node_modules/underscore/underscore-node-f.cjs +12 -12
- package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
- package/node_modules/underscore/underscore-node.cjs +2 -2
- package/node_modules/underscore/underscore-node.mjs +2 -2
- package/node_modules/underscore/underscore-umd-min.js +3 -3
- package/node_modules/underscore/underscore-umd-min.js.map +1 -1
- package/node_modules/underscore/underscore-umd.js +12 -12
- package/node_modules/underscore/underscore-umd.js.map +1 -1
- package/node_modules/underscore/underscore.js +12 -12
- package/node_modules/unique-string/index.js +4 -0
- package/node_modules/unique-string/license +21 -0
- package/node_modules/unique-string/package.json +44 -0
- package/node_modules/unique-string/readme.md +32 -0
- package/node_modules/unzip-response/index.js +36 -0
- package/node_modules/unzip-response/license +21 -0
- package/node_modules/unzip-response/package.json +49 -0
- package/node_modules/unzip-response/readme.md +29 -0
- package/node_modules/update-notifier/check.js +22 -0
- package/node_modules/update-notifier/index.js +155 -0
- package/node_modules/update-notifier/license +9 -0
- package/node_modules/update-notifier/package.json +55 -0
- package/node_modules/update-notifier/readme.md +193 -0
- package/node_modules/url-parse-lax/index.js +14 -0
- package/node_modules/url-parse-lax/license +21 -0
- package/node_modules/url-parse-lax/package.json +41 -0
- package/node_modules/url-parse-lax/readme.md +100 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/which/CHANGELOG.md +152 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +51 -0
- package/node_modules/which/bin/which +52 -0
- package/node_modules/which/package.json +30 -0
- package/node_modules/which/which.js +135 -0
- package/node_modules/widest-line/index.js +8 -0
- package/node_modules/widest-line/license +9 -0
- package/node_modules/widest-line/package.json +54 -0
- package/node_modules/widest-line/readme.md +34 -0
- package/node_modules/write-file-atomic/CHANGELOG.md +25 -0
- package/node_modules/write-file-atomic/LICENSE +6 -0
- package/node_modules/write-file-atomic/README.md +56 -0
- package/node_modules/write-file-atomic/index.js +238 -0
- package/node_modules/write-file-atomic/package.json +41 -0
- package/node_modules/xdg-basedir/index.js +28 -0
- package/node_modules/xdg-basedir/license +21 -0
- package/node_modules/xdg-basedir/package.json +40 -0
- package/node_modules/xdg-basedir/readme.md +60 -0
- package/node_modules/yallist/LICENSE +15 -0
- package/node_modules/yallist/README.md +204 -0
- package/node_modules/yallist/iterator.js +7 -0
- package/node_modules/yallist/package.json +29 -0
- package/node_modules/yallist/yallist.js +370 -0
- package/package.json +3 -2
- package/node_modules/express/node_modules/body-parser/HISTORY.md +0 -633
- package/node_modules/express/node_modules/body-parser/LICENSE +0 -23
- package/node_modules/express/node_modules/body-parser/README.md +0 -456
- package/node_modules/express/node_modules/body-parser/index.js +0 -157
- package/node_modules/express/node_modules/body-parser/lib/read.js +0 -181
- package/node_modules/express/node_modules/body-parser/lib/types/json.js +0 -230
- package/node_modules/express/node_modules/body-parser/lib/types/raw.js +0 -101
- package/node_modules/express/node_modules/body-parser/lib/types/text.js +0 -121
- package/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js +0 -284
- package/node_modules/express/node_modules/body-parser/package.json +0 -52
- package/node_modules/express/node_modules/depd/History.md +0 -96
- package/node_modules/express/node_modules/depd/LICENSE +0 -22
- package/node_modules/express/node_modules/depd/Readme.md +0 -280
- package/node_modules/express/node_modules/depd/index.js +0 -522
- package/node_modules/express/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/express/node_modules/depd/lib/compat/index.js +0 -79
- package/node_modules/express/node_modules/depd/package.json +0 -41
- package/node_modules/express/node_modules/http-errors/HISTORY.md +0 -165
- package/node_modules/express/node_modules/http-errors/README.md +0 -169
- package/node_modules/express/node_modules/http-errors/index.js +0 -299
- package/node_modules/express/node_modules/http-errors/package.json +0 -49
- package/node_modules/express/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/express/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/express/node_modules/on-finished/README.md +0 -154
- package/node_modules/express/node_modules/on-finished/index.js +0 -196
- package/node_modules/express/node_modules/on-finished/package.json +0 -31
- package/node_modules/express/node_modules/qs/.eslintrc +0 -38
- package/node_modules/express/node_modules/qs/CHANGELOG.md +0 -371
- package/node_modules/express/node_modules/qs/LICENSE.md +0 -29
- package/node_modules/express/node_modules/qs/README.md +0 -616
- package/node_modules/express/node_modules/qs/dist/qs.js +0 -842
- package/node_modules/express/node_modules/qs/lib/formats.js +0 -23
- package/node_modules/express/node_modules/qs/lib/index.js +0 -11
- package/node_modules/express/node_modules/qs/lib/parse.js +0 -257
- package/node_modules/express/node_modules/qs/lib/stringify.js +0 -287
- package/node_modules/express/node_modules/qs/lib/utils.js +0 -252
- package/node_modules/express/node_modules/qs/package.json +0 -70
- package/node_modules/express/node_modules/qs/test/parse.js +0 -832
- package/node_modules/express/node_modules/qs/test/stringify.js +0 -804
- package/node_modules/express/node_modules/qs/test/utils.js +0 -136
- package/node_modules/express/node_modules/raw-body/HISTORY.md +0 -289
- package/node_modules/express/node_modules/raw-body/LICENSE +0 -22
- package/node_modules/express/node_modules/raw-body/README.md +0 -219
- package/node_modules/express/node_modules/raw-body/index.d.ts +0 -87
- package/node_modules/express/node_modules/raw-body/index.js +0 -286
- package/node_modules/express/node_modules/raw-body/package.json +0 -48
- package/node_modules/finalhandler/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/finalhandler/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/finalhandler/node_modules/on-finished/README.md +0 -154
- package/node_modules/finalhandler/node_modules/on-finished/index.js +0 -196
- package/node_modules/finalhandler/node_modules/on-finished/package.json +0 -31
- package/node_modules/http-errors/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/http-errors/node_modules/statuses/README.md +0 -136
- package/node_modules/http-errors/node_modules/statuses/codes.json +0 -65
- package/node_modules/http-errors/node_modules/statuses/index.js +0 -146
- package/node_modules/http-errors/node_modules/statuses/package.json +0 -49
- package/node_modules/object-inspect/.eslintignore +0 -1
- package/node_modules/send/node_modules/depd/History.md +0 -96
- package/node_modules/send/node_modules/depd/Readme.md +0 -280
- package/node_modules/send/node_modules/depd/index.js +0 -522
- package/node_modules/send/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/send/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/send/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/send/node_modules/depd/lib/compat/index.js +0 -79
- package/node_modules/send/node_modules/depd/package.json +0 -41
- package/node_modules/send/node_modules/destroy/README.md +0 -60
- package/node_modules/send/node_modules/destroy/index.js +0 -75
- package/node_modules/send/node_modules/destroy/package.json +0 -37
- package/node_modules/send/node_modules/http-errors/HISTORY.md +0 -165
- package/node_modules/send/node_modules/http-errors/README.md +0 -169
- package/node_modules/send/node_modules/http-errors/index.js +0 -299
- package/node_modules/send/node_modules/http-errors/package.json +0 -49
- package/node_modules/send/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/send/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/send/node_modules/on-finished/README.md +0 -154
- package/node_modules/send/node_modules/on-finished/index.js +0 -196
- package/node_modules/send/node_modules/on-finished/package.json +0 -31
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# signal-exit
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/tapjs/signal-exit)
|
|
4
|
+
[](https://coveralls.io/r/tapjs/signal-exit?branch=master)
|
|
5
|
+
[](https://www.npmjs.com/package/signal-exit)
|
|
6
|
+
[](https://github.com/conventional-changelog/standard-version)
|
|
7
|
+
|
|
8
|
+
When you want to fire an event no matter how a process exits:
|
|
9
|
+
|
|
10
|
+
* reaching the end of execution.
|
|
11
|
+
* explicitly having `process.exit(code)` called.
|
|
12
|
+
* having `process.kill(pid, sig)` called.
|
|
13
|
+
* receiving a fatal signal from outside the process
|
|
14
|
+
|
|
15
|
+
Use `signal-exit`.
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
var onExit = require('signal-exit')
|
|
19
|
+
|
|
20
|
+
onExit(function (code, signal) {
|
|
21
|
+
console.log('process exited!')
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
`var remove = onExit(function (code, signal) {}, options)`
|
|
28
|
+
|
|
29
|
+
The return value of the function is a function that will remove the
|
|
30
|
+
handler.
|
|
31
|
+
|
|
32
|
+
Note that the function *only* fires for signals if the signal would
|
|
33
|
+
cause the process to exit. That is, there are no other listeners, and
|
|
34
|
+
it is a fatal signal.
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
* `alwaysLast`: Run this handler after any other signal or exit
|
|
39
|
+
handlers. This causes `process.emit` to be monkeypatched.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Note: since nyc uses this module to output coverage, any lines
|
|
2
|
+
// that are in the direct sync flow of nyc's outputCoverage are
|
|
3
|
+
// ignored, since we can never get coverage for them.
|
|
4
|
+
// grab a reference to node's real process object right away
|
|
5
|
+
var process = global.process
|
|
6
|
+
|
|
7
|
+
const processOk = function (process) {
|
|
8
|
+
return process &&
|
|
9
|
+
typeof process === 'object' &&
|
|
10
|
+
typeof process.removeListener === 'function' &&
|
|
11
|
+
typeof process.emit === 'function' &&
|
|
12
|
+
typeof process.reallyExit === 'function' &&
|
|
13
|
+
typeof process.listeners === 'function' &&
|
|
14
|
+
typeof process.kill === 'function' &&
|
|
15
|
+
typeof process.pid === 'number' &&
|
|
16
|
+
typeof process.on === 'function'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// some kind of non-node environment, just no-op
|
|
20
|
+
/* istanbul ignore if */
|
|
21
|
+
if (!processOk(process)) {
|
|
22
|
+
module.exports = function () {
|
|
23
|
+
return function () {}
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
var assert = require('assert')
|
|
27
|
+
var signals = require('./signals.js')
|
|
28
|
+
var isWin = /^win/i.test(process.platform)
|
|
29
|
+
|
|
30
|
+
var EE = require('events')
|
|
31
|
+
/* istanbul ignore if */
|
|
32
|
+
if (typeof EE !== 'function') {
|
|
33
|
+
EE = EE.EventEmitter
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var emitter
|
|
37
|
+
if (process.__signal_exit_emitter__) {
|
|
38
|
+
emitter = process.__signal_exit_emitter__
|
|
39
|
+
} else {
|
|
40
|
+
emitter = process.__signal_exit_emitter__ = new EE()
|
|
41
|
+
emitter.count = 0
|
|
42
|
+
emitter.emitted = {}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Because this emitter is a global, we have to check to see if a
|
|
46
|
+
// previous version of this library failed to enable infinite listeners.
|
|
47
|
+
// I know what you're about to say. But literally everything about
|
|
48
|
+
// signal-exit is a compromise with evil. Get used to it.
|
|
49
|
+
if (!emitter.infinite) {
|
|
50
|
+
emitter.setMaxListeners(Infinity)
|
|
51
|
+
emitter.infinite = true
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
module.exports = function (cb, opts) {
|
|
55
|
+
/* istanbul ignore if */
|
|
56
|
+
if (!processOk(global.process)) {
|
|
57
|
+
return function () {}
|
|
58
|
+
}
|
|
59
|
+
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
|
|
60
|
+
|
|
61
|
+
if (loaded === false) {
|
|
62
|
+
load()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var ev = 'exit'
|
|
66
|
+
if (opts && opts.alwaysLast) {
|
|
67
|
+
ev = 'afterexit'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var remove = function () {
|
|
71
|
+
emitter.removeListener(ev, cb)
|
|
72
|
+
if (emitter.listeners('exit').length === 0 &&
|
|
73
|
+
emitter.listeners('afterexit').length === 0) {
|
|
74
|
+
unload()
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
emitter.on(ev, cb)
|
|
78
|
+
|
|
79
|
+
return remove
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var unload = function unload () {
|
|
83
|
+
if (!loaded || !processOk(global.process)) {
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
loaded = false
|
|
87
|
+
|
|
88
|
+
signals.forEach(function (sig) {
|
|
89
|
+
try {
|
|
90
|
+
process.removeListener(sig, sigListeners[sig])
|
|
91
|
+
} catch (er) {}
|
|
92
|
+
})
|
|
93
|
+
process.emit = originalProcessEmit
|
|
94
|
+
process.reallyExit = originalProcessReallyExit
|
|
95
|
+
emitter.count -= 1
|
|
96
|
+
}
|
|
97
|
+
module.exports.unload = unload
|
|
98
|
+
|
|
99
|
+
var emit = function emit (event, code, signal) {
|
|
100
|
+
/* istanbul ignore if */
|
|
101
|
+
if (emitter.emitted[event]) {
|
|
102
|
+
return
|
|
103
|
+
}
|
|
104
|
+
emitter.emitted[event] = true
|
|
105
|
+
emitter.emit(event, code, signal)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// { <signal>: <listener fn>, ... }
|
|
109
|
+
var sigListeners = {}
|
|
110
|
+
signals.forEach(function (sig) {
|
|
111
|
+
sigListeners[sig] = function listener () {
|
|
112
|
+
/* istanbul ignore if */
|
|
113
|
+
if (!processOk(global.process)) {
|
|
114
|
+
return
|
|
115
|
+
}
|
|
116
|
+
// If there are no other listeners, an exit is coming!
|
|
117
|
+
// Simplest way: remove us and then re-send the signal.
|
|
118
|
+
// We know that this will kill the process, so we can
|
|
119
|
+
// safely emit now.
|
|
120
|
+
var listeners = process.listeners(sig)
|
|
121
|
+
if (listeners.length === emitter.count) {
|
|
122
|
+
unload()
|
|
123
|
+
emit('exit', null, sig)
|
|
124
|
+
/* istanbul ignore next */
|
|
125
|
+
emit('afterexit', null, sig)
|
|
126
|
+
/* istanbul ignore next */
|
|
127
|
+
if (isWin && sig === 'SIGHUP') {
|
|
128
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
129
|
+
// so use a supported signal instead
|
|
130
|
+
sig = 'SIGINT'
|
|
131
|
+
}
|
|
132
|
+
/* istanbul ignore next */
|
|
133
|
+
process.kill(process.pid, sig)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
module.exports.signals = function () {
|
|
139
|
+
return signals
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var loaded = false
|
|
143
|
+
|
|
144
|
+
var load = function load () {
|
|
145
|
+
if (loaded || !processOk(global.process)) {
|
|
146
|
+
return
|
|
147
|
+
}
|
|
148
|
+
loaded = true
|
|
149
|
+
|
|
150
|
+
// This is the number of onSignalExit's that are in play.
|
|
151
|
+
// It's important so that we can count the correct number of
|
|
152
|
+
// listeners on signals, and don't wait for the other one to
|
|
153
|
+
// handle it instead of us.
|
|
154
|
+
emitter.count += 1
|
|
155
|
+
|
|
156
|
+
signals = signals.filter(function (sig) {
|
|
157
|
+
try {
|
|
158
|
+
process.on(sig, sigListeners[sig])
|
|
159
|
+
return true
|
|
160
|
+
} catch (er) {
|
|
161
|
+
return false
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
process.emit = processEmit
|
|
166
|
+
process.reallyExit = processReallyExit
|
|
167
|
+
}
|
|
168
|
+
module.exports.load = load
|
|
169
|
+
|
|
170
|
+
var originalProcessReallyExit = process.reallyExit
|
|
171
|
+
var processReallyExit = function processReallyExit (code) {
|
|
172
|
+
/* istanbul ignore if */
|
|
173
|
+
if (!processOk(global.process)) {
|
|
174
|
+
return
|
|
175
|
+
}
|
|
176
|
+
process.exitCode = code || /* istanbul ignore next */ 0
|
|
177
|
+
emit('exit', process.exitCode, null)
|
|
178
|
+
/* istanbul ignore next */
|
|
179
|
+
emit('afterexit', process.exitCode, null)
|
|
180
|
+
/* istanbul ignore next */
|
|
181
|
+
originalProcessReallyExit.call(process, process.exitCode)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var originalProcessEmit = process.emit
|
|
185
|
+
var processEmit = function processEmit (ev, arg) {
|
|
186
|
+
if (ev === 'exit' && processOk(global.process)) {
|
|
187
|
+
/* istanbul ignore else */
|
|
188
|
+
if (arg !== undefined) {
|
|
189
|
+
process.exitCode = arg
|
|
190
|
+
}
|
|
191
|
+
var ret = originalProcessEmit.apply(this, arguments)
|
|
192
|
+
/* istanbul ignore next */
|
|
193
|
+
emit('exit', process.exitCode, null)
|
|
194
|
+
/* istanbul ignore next */
|
|
195
|
+
emit('afterexit', process.exitCode, null)
|
|
196
|
+
/* istanbul ignore next */
|
|
197
|
+
return ret
|
|
198
|
+
} else {
|
|
199
|
+
return originalProcessEmit.apply(this, arguments)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "signal-exit",
|
|
3
|
+
"version": "3.0.7",
|
|
4
|
+
"description": "when you want to fire an event no matter how a process exits.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "tap",
|
|
8
|
+
"snap": "tap",
|
|
9
|
+
"preversion": "npm test",
|
|
10
|
+
"postversion": "npm publish",
|
|
11
|
+
"prepublishOnly": "git push origin --follow-tags"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"index.js",
|
|
15
|
+
"signals.js"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/tapjs/signal-exit.git"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"signal",
|
|
23
|
+
"exit"
|
|
24
|
+
],
|
|
25
|
+
"author": "Ben Coe <ben@npmjs.com>",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/tapjs/signal-exit/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/tapjs/signal-exit",
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"chai": "^3.5.0",
|
|
33
|
+
"coveralls": "^3.1.1",
|
|
34
|
+
"nyc": "^15.1.0",
|
|
35
|
+
"standard-version": "^9.3.1",
|
|
36
|
+
"tap": "^15.1.1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// This is not the set of all possible signals.
|
|
2
|
+
//
|
|
3
|
+
// It IS, however, the set of all signals that trigger
|
|
4
|
+
// an exit on either Linux or BSD systems. Linux is a
|
|
5
|
+
// superset of the signal names supported on BSD, and
|
|
6
|
+
// the unknown signals just fail to register, so we can
|
|
7
|
+
// catch that easily enough.
|
|
8
|
+
//
|
|
9
|
+
// Don't bother with SIGKILL. It's uncatchable, which
|
|
10
|
+
// means that we can't fire any callbacks anyway.
|
|
11
|
+
//
|
|
12
|
+
// If a user does happen to register a handler on a non-
|
|
13
|
+
// fatal signal like SIGWINCH or something, and then
|
|
14
|
+
// exit, it'll end up firing `process.emit('exit')`, so
|
|
15
|
+
// the handler will be fired anyway.
|
|
16
|
+
//
|
|
17
|
+
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
|
18
|
+
// artificially, inherently leave the process in a
|
|
19
|
+
// state from which it is not safe to try and enter JS
|
|
20
|
+
// listeners.
|
|
21
|
+
module.exports = [
|
|
22
|
+
'SIGABRT',
|
|
23
|
+
'SIGALRM',
|
|
24
|
+
'SIGHUP',
|
|
25
|
+
'SIGINT',
|
|
26
|
+
'SIGTERM'
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
if (process.platform !== 'win32') {
|
|
30
|
+
module.exports.push(
|
|
31
|
+
'SIGVTALRM',
|
|
32
|
+
'SIGXCPU',
|
|
33
|
+
'SIGXFSZ',
|
|
34
|
+
'SIGUSR2',
|
|
35
|
+
'SIGTRAP',
|
|
36
|
+
'SIGSYS',
|
|
37
|
+
'SIGQUIT',
|
|
38
|
+
'SIGIOT'
|
|
39
|
+
// should detect profiler and enable/disable accordingly.
|
|
40
|
+
// see #21
|
|
41
|
+
// 'SIGPROF'
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (process.platform === 'linux') {
|
|
46
|
+
module.exports.push(
|
|
47
|
+
'SIGIO',
|
|
48
|
+
'SIGPOLL',
|
|
49
|
+
'SIGPWR',
|
|
50
|
+
'SIGSTKFLT',
|
|
51
|
+
'SIGUNUSED'
|
|
52
|
+
)
|
|
53
|
+
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
2.0.1 / 2021-01-03
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Fix returning values from `Object.prototype`
|
|
5
|
+
|
|
6
|
+
2.0.0 / 2020-04-19
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
* Drop support for Node.js 0.6
|
|
10
|
+
* Fix messaging casing of `418 I'm a Teapot`
|
|
11
|
+
* Remove code 306
|
|
12
|
+
* Remove `status[code]` exports; use `status.message[code]`
|
|
13
|
+
* Remove `status[msg]` exports; use `status.code[msg]`
|
|
14
|
+
* Rename `425 Unordered Collection` to standard `425 Too Early`
|
|
15
|
+
* Rename `STATUS_CODES` export to `message`
|
|
16
|
+
* Return status message for `statuses(code)` when given code
|
|
17
|
+
|
|
1
18
|
1.5.0 / 2018-03-27
|
|
2
19
|
==================
|
|
3
20
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# statuses
|
|
2
2
|
|
|
3
|
-
[![NPM Version][npm-image]][npm-url]
|
|
4
|
-
[![NPM Downloads][downloads-image]][
|
|
3
|
+
[![NPM Version][npm-version-image]][npm-url]
|
|
4
|
+
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][ci-image]][ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
HTTP status utility for node.
|
|
@@ -34,74 +34,80 @@ $ npm install statuses
|
|
|
34
34
|
var status = require('statuses')
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### status(code)
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
Returns the status message string for a known HTTP status code. The code
|
|
40
|
+
may be a number or a string. An error is thrown for an unknown status code.
|
|
41
41
|
|
|
42
42
|
<!-- eslint-disable no-undef -->
|
|
43
43
|
|
|
44
44
|
```js
|
|
45
|
-
status(403) // =>
|
|
46
|
-
status('403') // =>
|
|
47
|
-
status(
|
|
48
|
-
status('Forbidden') // => 403
|
|
49
|
-
status(306) // throws, as it's not supported by node.js
|
|
45
|
+
status(403) // => 'Forbidden'
|
|
46
|
+
status('403') // => 'Forbidden'
|
|
47
|
+
status(306) // throws
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
### status
|
|
50
|
+
### status(msg)
|
|
51
|
+
|
|
52
|
+
Returns the numeric status code for a known HTTP status message. The message
|
|
53
|
+
is case-insensitive. An error is thrown for an unknown status message.
|
|
54
|
+
|
|
55
|
+
<!-- eslint-disable no-undef -->
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
```js
|
|
58
|
+
status('forbidden') // => 403
|
|
59
|
+
status('Forbidden') // => 403
|
|
60
|
+
status('foo') // throws
|
|
61
|
+
```
|
|
57
62
|
|
|
58
63
|
### status.codes
|
|
59
64
|
|
|
60
65
|
Returns an array of all the status codes as `Integer`s.
|
|
61
66
|
|
|
62
|
-
###
|
|
67
|
+
### status.code[msg]
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
Returns the numeric status code for a known status message (in lower-case),
|
|
70
|
+
otherwise `undefined`.
|
|
65
71
|
|
|
66
72
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
67
73
|
|
|
68
74
|
```js
|
|
69
|
-
status[
|
|
75
|
+
status['not found'] // => 404
|
|
70
76
|
```
|
|
71
77
|
|
|
72
|
-
###
|
|
78
|
+
### status.empty[code]
|
|
73
79
|
|
|
74
|
-
|
|
75
|
-
lower-cased. `undefined` for invalid `status message`s.
|
|
80
|
+
Returns `true` if a status code expects an empty body.
|
|
76
81
|
|
|
77
82
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
78
83
|
|
|
79
84
|
```js
|
|
80
|
-
status[
|
|
81
|
-
status[
|
|
85
|
+
status.empty[200] // => undefined
|
|
86
|
+
status.empty[204] // => true
|
|
87
|
+
status.empty[304] // => true
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
### status.
|
|
90
|
+
### status.message[code]
|
|
85
91
|
|
|
86
|
-
Returns
|
|
92
|
+
Returns the string message for a known numeric status code, otherwise
|
|
93
|
+
`undefined`. This object is the same format as the
|
|
94
|
+
[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
|
|
87
95
|
|
|
88
96
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
89
97
|
|
|
90
98
|
```js
|
|
91
|
-
status.
|
|
92
|
-
status.redirect[301] // => true
|
|
99
|
+
status.message[404] // => 'Not Found'
|
|
93
100
|
```
|
|
94
101
|
|
|
95
|
-
### status.
|
|
102
|
+
### status.redirect[code]
|
|
96
103
|
|
|
97
|
-
Returns `true` if a status code
|
|
104
|
+
Returns `true` if a status code is a valid redirect status.
|
|
98
105
|
|
|
99
106
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
100
107
|
|
|
101
108
|
```js
|
|
102
|
-
status.
|
|
103
|
-
status.
|
|
104
|
-
status.empty[304] // => true
|
|
109
|
+
status.redirect[200] // => undefined
|
|
110
|
+
status.redirect[301] // => true
|
|
105
111
|
```
|
|
106
112
|
|
|
107
113
|
### status.retry[code]
|
|
@@ -115,13 +121,16 @@ status.retry[501] // => undefined
|
|
|
115
121
|
status.retry[503] // => true
|
|
116
122
|
```
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
[
|
|
121
|
-
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[coveralls-image]: https://
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
[MIT](LICENSE)
|
|
127
|
+
|
|
128
|
+
[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci
|
|
129
|
+
[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci
|
|
130
|
+
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master
|
|
125
131
|
[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
|
|
126
|
-
[
|
|
127
|
-
[
|
|
132
|
+
[node-version-image]: https://badgen.net/npm/node/statuses
|
|
133
|
+
[node-version-url]: https://nodejs.org/en/download
|
|
134
|
+
[npm-downloads-image]: https://badgen.net/npm/dm/statuses
|
|
135
|
+
[npm-url]: https://npmjs.org/package/statuses
|
|
136
|
+
[npm-version-image]: https://badgen.net/npm/v/statuses
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"303": "See Other",
|
|
20
20
|
"304": "Not Modified",
|
|
21
21
|
"305": "Use Proxy",
|
|
22
|
-
"306": "(Unused)",
|
|
23
22
|
"307": "Temporary Redirect",
|
|
24
23
|
"308": "Permanent Redirect",
|
|
25
24
|
"400": "Bad Request",
|
|
@@ -40,12 +39,12 @@
|
|
|
40
39
|
"415": "Unsupported Media Type",
|
|
41
40
|
"416": "Range Not Satisfiable",
|
|
42
41
|
"417": "Expectation Failed",
|
|
43
|
-
"418": "I'm a
|
|
42
|
+
"418": "I'm a Teapot",
|
|
44
43
|
"421": "Misdirected Request",
|
|
45
44
|
"422": "Unprocessable Entity",
|
|
46
45
|
"423": "Locked",
|
|
47
46
|
"424": "Failed Dependency",
|
|
48
|
-
"425": "
|
|
47
|
+
"425": "Too Early",
|
|
49
48
|
"426": "Upgrade Required",
|
|
50
49
|
"428": "Precondition Required",
|
|
51
50
|
"429": "Too Many Requests",
|
|
@@ -22,10 +22,13 @@ var codes = require('./codes.json')
|
|
|
22
22
|
module.exports = status
|
|
23
23
|
|
|
24
24
|
// status code to message map
|
|
25
|
-
status.
|
|
25
|
+
status.message = codes
|
|
26
|
+
|
|
27
|
+
// status message (lower-case) to code map
|
|
28
|
+
status.code = createMessageToStatusCodeMap(codes)
|
|
26
29
|
|
|
27
30
|
// array of status codes
|
|
28
|
-
status.codes =
|
|
31
|
+
status.codes = createStatusCodeList(codes)
|
|
29
32
|
|
|
30
33
|
// status codes for redirects
|
|
31
34
|
status.redirect = {
|
|
@@ -53,27 +56,61 @@ status.retry = {
|
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
59
|
+
* Create a map of message to status code.
|
|
57
60
|
* @private
|
|
58
61
|
*/
|
|
59
62
|
|
|
60
|
-
function
|
|
61
|
-
var
|
|
63
|
+
function createMessageToStatusCodeMap (codes) {
|
|
64
|
+
var map = {}
|
|
62
65
|
|
|
63
66
|
Object.keys(codes).forEach(function forEachCode (code) {
|
|
64
67
|
var message = codes[code]
|
|
65
68
|
var status = Number(code)
|
|
66
69
|
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
// populate map
|
|
71
|
+
map[message.toLowerCase()] = status
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
return map
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Create a list of all status codes.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
function createStatusCodeList (codes) {
|
|
83
|
+
return Object.keys(codes).map(function mapCode (code) {
|
|
84
|
+
return Number(code)
|
|
74
85
|
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get the status code for given message.
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
function getStatusCode (message) {
|
|
94
|
+
var msg = message.toLowerCase()
|
|
95
|
+
|
|
96
|
+
if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
|
|
97
|
+
throw new Error('invalid status message: "' + message + '"')
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return status.code[msg]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Get the status message for given code.
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
function getStatusMessage (code) {
|
|
109
|
+
if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
|
|
110
|
+
throw new Error('invalid status code: ' + code)
|
|
111
|
+
}
|
|
75
112
|
|
|
76
|
-
return
|
|
113
|
+
return status.message[code]
|
|
77
114
|
}
|
|
78
115
|
|
|
79
116
|
/**
|
|
@@ -92,8 +129,7 @@ function populateStatusesMap (statuses, codes) {
|
|
|
92
129
|
|
|
93
130
|
function status (code) {
|
|
94
131
|
if (typeof code === 'number') {
|
|
95
|
-
|
|
96
|
-
return code
|
|
132
|
+
return getStatusMessage(code)
|
|
97
133
|
}
|
|
98
134
|
|
|
99
135
|
if (typeof code !== 'string') {
|
|
@@ -103,11 +139,8 @@ function status (code) {
|
|
|
103
139
|
// '403'
|
|
104
140
|
var n = parseInt(code, 10)
|
|
105
141
|
if (!isNaN(n)) {
|
|
106
|
-
|
|
107
|
-
return n
|
|
142
|
+
return getStatusMessage(n)
|
|
108
143
|
}
|
|
109
144
|
|
|
110
|
-
|
|
111
|
-
if (!n) throw new Error('invalid status message: "' + code + '"')
|
|
112
|
-
return n
|
|
145
|
+
return getStatusCode(code)
|
|
113
146
|
}
|