crabatool 1.0.2 → 1.0.3
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/index.js +23 -2
- package/ngp/config.js +2 -2
- package/ngp/node_modules/.bin/mime +12 -0
- package/ngp/node_modules/.bin/mime.cmd +17 -0
- package/ngp/node_modules/.bin/mime.ps1 +28 -0
- package/ngp/node_modules/.bin/uglifyjs +12 -0
- package/ngp/node_modules/.bin/uglifyjs.cmd +17 -0
- package/ngp/node_modules/.bin/uglifyjs.ps1 +28 -0
- package/ngp/node_modules/.package-lock.json +863 -0
- package/ngp/node_modules/accepts/HISTORY.md +243 -0
- package/ngp/node_modules/accepts/LICENSE +23 -0
- package/ngp/node_modules/accepts/README.md +140 -0
- package/ngp/node_modules/accepts/index.js +238 -0
- package/ngp/node_modules/accepts/package.json +47 -0
- package/ngp/node_modules/anymatch/LICENSE +15 -0
- package/ngp/node_modules/anymatch/README.md +87 -0
- package/ngp/node_modules/anymatch/index.d.ts +19 -0
- package/ngp/node_modules/anymatch/index.js +104 -0
- package/ngp/node_modules/anymatch/package.json +48 -0
- package/ngp/node_modules/array-flatten/LICENSE +21 -0
- package/ngp/node_modules/array-flatten/README.md +43 -0
- package/ngp/node_modules/array-flatten/array-flatten.js +64 -0
- package/ngp/node_modules/array-flatten/package.json +39 -0
- package/ngp/node_modules/binary-extensions/binary-extensions.json +260 -0
- package/ngp/node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0
- package/ngp/node_modules/binary-extensions/index.d.ts +14 -0
- package/ngp/node_modules/binary-extensions/index.js +1 -0
- package/ngp/node_modules/binary-extensions/license +9 -0
- package/ngp/node_modules/binary-extensions/package.json +38 -0
- package/ngp/node_modules/binary-extensions/readme.md +41 -0
- package/ngp/node_modules/body-parser/HISTORY.md +651 -0
- package/ngp/node_modules/body-parser/LICENSE +23 -0
- package/ngp/node_modules/body-parser/README.md +464 -0
- package/ngp/node_modules/body-parser/SECURITY.md +25 -0
- package/ngp/node_modules/body-parser/index.js +157 -0
- package/ngp/node_modules/body-parser/lib/read.js +205 -0
- package/ngp/node_modules/body-parser/lib/types/json.js +236 -0
- package/ngp/node_modules/body-parser/lib/types/raw.js +101 -0
- package/ngp/node_modules/body-parser/lib/types/text.js +121 -0
- package/ngp/node_modules/body-parser/lib/types/urlencoded.js +284 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/History.md +97 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/Readme.md +152 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/index.js +170 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/package.json +42 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/Changelog.md +162 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/README.md +156 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js +22 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/package.json +46 -0
- package/ngp/node_modules/body-parser/package.json +56 -0
- package/ngp/node_modules/braces/CHANGELOG.md +184 -0
- package/ngp/node_modules/braces/LICENSE +21 -0
- package/ngp/node_modules/braces/README.md +593 -0
- package/ngp/node_modules/braces/index.js +170 -0
- package/ngp/node_modules/braces/lib/compile.js +57 -0
- package/ngp/node_modules/braces/lib/constants.js +57 -0
- package/ngp/node_modules/braces/lib/expand.js +113 -0
- package/ngp/node_modules/braces/lib/parse.js +333 -0
- package/ngp/node_modules/braces/lib/stringify.js +32 -0
- package/ngp/node_modules/braces/lib/utils.js +112 -0
- package/ngp/node_modules/braces/package.json +77 -0
- package/ngp/node_modules/bytes/History.md +82 -0
- package/ngp/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/bytes/Readme.md +125 -0
- package/ngp/node_modules/bytes/index.js +159 -0
- package/ngp/node_modules/bytes/package.json +39 -0
- package/ngp/node_modules/call-bind/.eslintignore +1 -0
- package/ngp/node_modules/call-bind/.eslintrc +17 -0
- package/ngp/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/call-bind/.nycrc +13 -0
- package/ngp/node_modules/call-bind/CHANGELOG.md +42 -0
- package/ngp/node_modules/call-bind/LICENSE +21 -0
- package/ngp/node_modules/call-bind/README.md +2 -0
- package/ngp/node_modules/call-bind/callBound.js +15 -0
- package/ngp/node_modules/call-bind/index.js +47 -0
- package/ngp/node_modules/call-bind/package.json +80 -0
- package/ngp/node_modules/call-bind/test/callBound.js +55 -0
- package/ngp/node_modules/call-bind/test/index.js +66 -0
- package/ngp/node_modules/chokidar/LICENSE +21 -0
- package/ngp/node_modules/chokidar/README.md +308 -0
- package/ngp/node_modules/chokidar/index.js +973 -0
- package/ngp/node_modules/chokidar/lib/constants.js +65 -0
- package/ngp/node_modules/chokidar/lib/fsevents-handler.js +524 -0
- package/ngp/node_modules/chokidar/lib/nodefs-handler.js +654 -0
- package/ngp/node_modules/chokidar/package.json +85 -0
- package/ngp/node_modules/chokidar/types/index.d.ts +188 -0
- package/ngp/node_modules/compressible/HISTORY.md +111 -0
- package/ngp/node_modules/compressible/LICENSE +24 -0
- package/ngp/node_modules/compressible/README.md +61 -0
- package/ngp/node_modules/compressible/index.js +58 -0
- package/ngp/node_modules/compressible/package.json +48 -0
- package/ngp/node_modules/compression/HISTORY.md +307 -0
- package/ngp/node_modules/compression/LICENSE +23 -0
- package/ngp/node_modules/compression/README.md +240 -0
- package/ngp/node_modules/compression/index.js +288 -0
- package/ngp/node_modules/compression/package.json +47 -0
- package/ngp/node_modules/content-disposition/HISTORY.md +60 -0
- package/ngp/node_modules/content-disposition/LICENSE +22 -0
- package/ngp/node_modules/content-disposition/README.md +142 -0
- package/ngp/node_modules/content-disposition/index.js +458 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/package.json +51 -0
- package/ngp/node_modules/content-disposition/package.json +44 -0
- package/ngp/node_modules/content-type/HISTORY.md +24 -0
- package/ngp/node_modules/content-type/LICENSE +22 -0
- package/ngp/node_modules/content-type/README.md +92 -0
- package/ngp/node_modules/content-type/index.js +222 -0
- package/ngp/node_modules/content-type/package.json +40 -0
- package/ngp/node_modules/cookie/HISTORY.md +142 -0
- package/ngp/node_modules/cookie/LICENSE +24 -0
- package/ngp/node_modules/cookie/README.md +302 -0
- package/ngp/node_modules/cookie/SECURITY.md +25 -0
- package/ngp/node_modules/cookie/index.js +270 -0
- package/ngp/node_modules/cookie/package.json +44 -0
- package/ngp/node_modules/cookie-signature/History.md +38 -0
- package/ngp/node_modules/cookie-signature/Readme.md +42 -0
- package/ngp/node_modules/cookie-signature/index.js +51 -0
- package/ngp/node_modules/cookie-signature/package.json +18 -0
- package/ngp/node_modules/crabatool/index.js +28 -0
- package/ngp/node_modules/crabatool/ngp/config.js +25 -0
- package/ngp/node_modules/crabatool/ngp/ngp.js +3 -0
- package/ngp/node_modules/crabatool/ngp/package.json +15 -0
- package/ngp/node_modules/crabatool/ngp/readme.md +4 -0
- package/ngp/node_modules/crabatool/package.json +25 -0
- package/ngp/node_modules/crabatool/readme.md +12 -0
- package/ngp/node_modules/crabatool/server.js +124 -0
- package/ngp/node_modules/debug/.coveralls.yml +1 -0
- package/ngp/node_modules/debug/.eslintrc +11 -0
- package/ngp/node_modules/debug/.travis.yml +14 -0
- package/ngp/node_modules/debug/CHANGELOG.md +362 -0
- package/ngp/node_modules/debug/LICENSE +19 -0
- package/ngp/node_modules/debug/Makefile +50 -0
- package/ngp/node_modules/debug/README.md +312 -0
- package/ngp/node_modules/debug/component.json +19 -0
- package/ngp/node_modules/debug/karma.conf.js +70 -0
- package/ngp/node_modules/debug/node.js +1 -0
- package/ngp/node_modules/debug/package.json +49 -0
- package/ngp/node_modules/debug/src/browser.js +185 -0
- package/ngp/node_modules/debug/src/debug.js +202 -0
- package/ngp/node_modules/debug/src/index.js +10 -0
- package/ngp/node_modules/debug/src/inspector-log.js +15 -0
- package/ngp/node_modules/debug/src/node.js +248 -0
- package/ngp/node_modules/depd/History.md +103 -0
- package/ngp/node_modules/depd/LICENSE +22 -0
- package/ngp/node_modules/depd/Readme.md +280 -0
- package/ngp/node_modules/depd/index.js +538 -0
- package/ngp/node_modules/depd/lib/browser/index.js +77 -0
- package/ngp/node_modules/depd/package.json +45 -0
- package/ngp/node_modules/destroy/LICENSE +23 -0
- package/ngp/node_modules/destroy/README.md +63 -0
- package/ngp/node_modules/destroy/index.js +209 -0
- package/ngp/node_modules/destroy/package.json +48 -0
- package/ngp/node_modules/ee-first/LICENSE +22 -0
- package/ngp/node_modules/ee-first/README.md +80 -0
- package/ngp/node_modules/ee-first/index.js +95 -0
- package/ngp/node_modules/ee-first/package.json +29 -0
- package/ngp/node_modules/encodeurl/HISTORY.md +14 -0
- package/ngp/node_modules/encodeurl/LICENSE +22 -0
- package/ngp/node_modules/encodeurl/README.md +128 -0
- package/ngp/node_modules/encodeurl/index.js +60 -0
- package/ngp/node_modules/encodeurl/package.json +40 -0
- package/ngp/node_modules/escape-html/LICENSE +24 -0
- package/ngp/node_modules/escape-html/Readme.md +43 -0
- package/ngp/node_modules/escape-html/index.js +78 -0
- package/ngp/node_modules/escape-html/package.json +24 -0
- package/ngp/node_modules/etag/HISTORY.md +83 -0
- package/ngp/node_modules/etag/LICENSE +22 -0
- package/ngp/node_modules/etag/README.md +159 -0
- package/ngp/node_modules/etag/index.js +131 -0
- package/ngp/node_modules/etag/package.json +47 -0
- package/ngp/node_modules/express/History.md +3579 -0
- package/ngp/node_modules/express/LICENSE +24 -0
- package/ngp/node_modules/express/Readme.md +166 -0
- package/ngp/node_modules/express/index.js +11 -0
- package/ngp/node_modules/express/lib/application.js +661 -0
- package/ngp/node_modules/express/lib/express.js +116 -0
- package/ngp/node_modules/express/lib/middleware/init.js +43 -0
- package/ngp/node_modules/express/lib/middleware/query.js +47 -0
- package/ngp/node_modules/express/lib/request.js +525 -0
- package/ngp/node_modules/express/lib/response.js +1169 -0
- package/ngp/node_modules/express/lib/router/index.js +673 -0
- package/ngp/node_modules/express/lib/router/layer.js +181 -0
- package/ngp/node_modules/express/lib/router/route.js +225 -0
- package/ngp/node_modules/express/lib/utils.js +304 -0
- package/ngp/node_modules/express/lib/view.js +182 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/index.js +65 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/package.json +51 -0
- package/ngp/node_modules/express/package.json +99 -0
- package/ngp/node_modules/fill-range/LICENSE +21 -0
- package/ngp/node_modules/fill-range/README.md +237 -0
- package/ngp/node_modules/fill-range/index.js +249 -0
- package/ngp/node_modules/fill-range/package.json +69 -0
- package/ngp/node_modules/finalhandler/HISTORY.md +195 -0
- package/ngp/node_modules/finalhandler/LICENSE +22 -0
- package/ngp/node_modules/finalhandler/README.md +147 -0
- package/ngp/node_modules/finalhandler/SECURITY.md +25 -0
- package/ngp/node_modules/finalhandler/index.js +336 -0
- package/ngp/node_modules/finalhandler/package.json +46 -0
- package/ngp/node_modules/forwarded/HISTORY.md +21 -0
- package/ngp/node_modules/forwarded/LICENSE +22 -0
- package/ngp/node_modules/forwarded/README.md +57 -0
- package/ngp/node_modules/forwarded/index.js +90 -0
- package/ngp/node_modules/forwarded/package.json +45 -0
- package/ngp/node_modules/fresh/HISTORY.md +70 -0
- package/ngp/node_modules/fresh/LICENSE +23 -0
- package/ngp/node_modules/fresh/README.md +119 -0
- package/ngp/node_modules/fresh/index.js +137 -0
- package/ngp/node_modules/fresh/package.json +46 -0
- package/ngp/node_modules/function-bind/.editorconfig +20 -0
- package/ngp/node_modules/function-bind/.eslintrc +15 -0
- package/ngp/node_modules/function-bind/.jscs.json +176 -0
- package/ngp/node_modules/function-bind/.travis.yml +168 -0
- package/ngp/node_modules/function-bind/LICENSE +20 -0
- package/ngp/node_modules/function-bind/README.md +48 -0
- package/ngp/node_modules/function-bind/implementation.js +52 -0
- package/ngp/node_modules/function-bind/index.js +5 -0
- package/ngp/node_modules/function-bind/package.json +63 -0
- package/ngp/node_modules/function-bind/test/.eslintrc +9 -0
- package/ngp/node_modules/function-bind/test/index.js +252 -0
- package/ngp/node_modules/get-intrinsic/.eslintignore +1 -0
- package/ngp/node_modules/get-intrinsic/.eslintrc +43 -0
- package/ngp/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/get-intrinsic/.nycrc +13 -0
- package/ngp/node_modules/get-intrinsic/CHANGELOG.md +64 -0
- package/ngp/node_modules/get-intrinsic/LICENSE +21 -0
- package/ngp/node_modules/get-intrinsic/README.md +65 -0
- package/ngp/node_modules/get-intrinsic/index.js +330 -0
- package/ngp/node_modules/get-intrinsic/package.json +78 -0
- package/ngp/node_modules/get-intrinsic/test/GetIntrinsic.js +260 -0
- package/ngp/node_modules/glob-parent/CHANGELOG.md +110 -0
- package/ngp/node_modules/glob-parent/LICENSE +15 -0
- package/ngp/node_modules/glob-parent/README.md +137 -0
- package/ngp/node_modules/glob-parent/index.js +42 -0
- package/ngp/node_modules/glob-parent/package.json +48 -0
- package/ngp/node_modules/has/LICENSE-MIT +22 -0
- package/ngp/node_modules/has/README.md +18 -0
- package/ngp/node_modules/has/package.json +48 -0
- package/ngp/node_modules/has/src/index.js +5 -0
- package/ngp/node_modules/has/test/index.js +10 -0
- package/ngp/node_modules/has-symbols/.eslintrc +11 -0
- package/ngp/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/has-symbols/.nycrc +9 -0
- package/ngp/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/ngp/node_modules/has-symbols/LICENSE +21 -0
- package/ngp/node_modules/has-symbols/README.md +46 -0
- package/ngp/node_modules/has-symbols/index.js +13 -0
- package/ngp/node_modules/has-symbols/package.json +101 -0
- package/ngp/node_modules/has-symbols/shams.js +42 -0
- package/ngp/node_modules/has-symbols/test/index.js +22 -0
- package/ngp/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/ngp/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/ngp/node_modules/has-symbols/test/tests.js +56 -0
- package/ngp/node_modules/http-errors/HISTORY.md +180 -0
- package/ngp/node_modules/http-errors/LICENSE +23 -0
- package/ngp/node_modules/http-errors/README.md +169 -0
- package/ngp/node_modules/http-errors/index.js +289 -0
- package/ngp/node_modules/http-errors/package.json +50 -0
- package/ngp/node_modules/iconv-lite/Changelog.md +184 -0
- package/ngp/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/iconv-lite/README.md +166 -0
- package/ngp/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/iconv-lite/encodings/index.js +23 -0
- package/ngp/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/iconv-lite/encodings/utf32.js +281 -0
- package/ngp/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/ngp/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/iconv-lite/package.json +45 -0
- package/ngp/node_modules/inherits/LICENSE +16 -0
- package/ngp/node_modules/inherits/README.md +42 -0
- package/ngp/node_modules/inherits/inherits.js +9 -0
- package/ngp/node_modules/inherits/inherits_browser.js +27 -0
- package/ngp/node_modules/inherits/package.json +29 -0
- package/ngp/node_modules/ipaddr.js/LICENSE +19 -0
- package/ngp/node_modules/ipaddr.js/README.md +233 -0
- package/ngp/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/ngp/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/ngp/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/ngp/node_modules/ipaddr.js/package.json +35 -0
- package/ngp/node_modules/is-binary-path/index.d.ts +17 -0
- package/ngp/node_modules/is-binary-path/index.js +7 -0
- package/ngp/node_modules/is-binary-path/license +9 -0
- package/ngp/node_modules/is-binary-path/package.json +40 -0
- package/ngp/node_modules/is-binary-path/readme.md +34 -0
- package/ngp/node_modules/is-extglob/LICENSE +21 -0
- package/ngp/node_modules/is-extglob/README.md +107 -0
- package/ngp/node_modules/is-extglob/index.js +20 -0
- package/ngp/node_modules/is-extglob/package.json +69 -0
- package/ngp/node_modules/is-glob/LICENSE +21 -0
- package/ngp/node_modules/is-glob/README.md +206 -0
- package/ngp/node_modules/is-glob/index.js +150 -0
- package/ngp/node_modules/is-glob/package.json +81 -0
- package/ngp/node_modules/is-number/LICENSE +21 -0
- package/ngp/node_modules/is-number/README.md +187 -0
- package/ngp/node_modules/is-number/index.js +18 -0
- package/ngp/node_modules/is-number/package.json +82 -0
- package/ngp/node_modules/media-typer/HISTORY.md +22 -0
- package/ngp/node_modules/media-typer/LICENSE +22 -0
- package/ngp/node_modules/media-typer/README.md +81 -0
- package/ngp/node_modules/media-typer/index.js +270 -0
- package/ngp/node_modules/media-typer/package.json +26 -0
- package/ngp/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/ngp/node_modules/merge-descriptors/LICENSE +23 -0
- package/ngp/node_modules/merge-descriptors/README.md +48 -0
- package/ngp/node_modules/merge-descriptors/index.js +60 -0
- package/ngp/node_modules/merge-descriptors/package.json +32 -0
- package/ngp/node_modules/methods/HISTORY.md +29 -0
- package/ngp/node_modules/methods/LICENSE +24 -0
- package/ngp/node_modules/methods/README.md +51 -0
- package/ngp/node_modules/methods/index.js +69 -0
- package/ngp/node_modules/methods/package.json +36 -0
- package/ngp/node_modules/mime/CHANGELOG.md +164 -0
- package/ngp/node_modules/mime/LICENSE +21 -0
- package/ngp/node_modules/mime/README.md +90 -0
- package/ngp/node_modules/mime/cli.js +8 -0
- package/ngp/node_modules/mime/mime.js +108 -0
- package/ngp/node_modules/mime/package.json +44 -0
- package/ngp/node_modules/mime/src/build.js +53 -0
- package/ngp/node_modules/mime/src/test.js +60 -0
- package/ngp/node_modules/mime/types.json +1 -0
- package/ngp/node_modules/mime-db/HISTORY.md +507 -0
- package/ngp/node_modules/mime-db/LICENSE +23 -0
- package/ngp/node_modules/mime-db/README.md +100 -0
- package/ngp/node_modules/mime-db/db.json +8519 -0
- package/ngp/node_modules/mime-db/index.js +12 -0
- package/ngp/node_modules/mime-db/package.json +60 -0
- package/ngp/node_modules/mime-types/HISTORY.md +397 -0
- package/ngp/node_modules/mime-types/LICENSE +23 -0
- package/ngp/node_modules/mime-types/README.md +113 -0
- package/ngp/node_modules/mime-types/index.js +188 -0
- package/ngp/node_modules/mime-types/package.json +44 -0
- package/ngp/node_modules/ms/index.js +152 -0
- package/ngp/node_modules/ms/license.md +21 -0
- package/ngp/node_modules/ms/package.json +37 -0
- package/ngp/node_modules/ms/readme.md +51 -0
- package/ngp/node_modules/negotiator/HISTORY.md +108 -0
- package/ngp/node_modules/negotiator/LICENSE +24 -0
- package/ngp/node_modules/negotiator/README.md +203 -0
- package/ngp/node_modules/negotiator/index.js +82 -0
- package/ngp/node_modules/negotiator/lib/charset.js +169 -0
- package/ngp/node_modules/negotiator/lib/encoding.js +184 -0
- package/ngp/node_modules/negotiator/lib/language.js +179 -0
- package/ngp/node_modules/negotiator/lib/mediaType.js +294 -0
- package/ngp/node_modules/negotiator/package.json +42 -0
- package/ngp/node_modules/normalize-path/LICENSE +21 -0
- package/ngp/node_modules/normalize-path/README.md +127 -0
- package/ngp/node_modules/normalize-path/index.js +35 -0
- package/ngp/node_modules/normalize-path/package.json +77 -0
- package/ngp/node_modules/object-inspect/.eslintrc +53 -0
- package/ngp/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/object-inspect/.nycrc +13 -0
- package/ngp/node_modules/object-inspect/CHANGELOG.md +360 -0
- package/ngp/node_modules/object-inspect/LICENSE +21 -0
- package/ngp/node_modules/object-inspect/example/all.js +23 -0
- package/ngp/node_modules/object-inspect/example/circular.js +6 -0
- package/ngp/node_modules/object-inspect/example/fn.js +5 -0
- package/ngp/node_modules/object-inspect/example/inspect.js +10 -0
- package/ngp/node_modules/object-inspect/index.js +512 -0
- package/ngp/node_modules/object-inspect/package-support.json +20 -0
- package/ngp/node_modules/object-inspect/package.json +94 -0
- package/ngp/node_modules/object-inspect/readme.markdown +86 -0
- package/ngp/node_modules/object-inspect/test/bigint.js +58 -0
- package/ngp/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/ngp/node_modules/object-inspect/test/circular.js +16 -0
- package/ngp/node_modules/object-inspect/test/deep.js +12 -0
- package/ngp/node_modules/object-inspect/test/element.js +53 -0
- package/ngp/node_modules/object-inspect/test/err.js +48 -0
- package/ngp/node_modules/object-inspect/test/fakes.js +29 -0
- package/ngp/node_modules/object-inspect/test/fn.js +76 -0
- package/ngp/node_modules/object-inspect/test/has.js +15 -0
- package/ngp/node_modules/object-inspect/test/holes.js +15 -0
- package/ngp/node_modules/object-inspect/test/indent-option.js +271 -0
- package/ngp/node_modules/object-inspect/test/inspect.js +139 -0
- package/ngp/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/ngp/node_modules/object-inspect/test/number.js +58 -0
- package/ngp/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/ngp/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/ngp/node_modules/object-inspect/test/undef.js +12 -0
- package/ngp/node_modules/object-inspect/test/values.js +211 -0
- package/ngp/node_modules/object-inspect/test-core-js.js +26 -0
- package/ngp/node_modules/object-inspect/util.inspect.js +1 -0
- package/ngp/node_modules/on-finished/HISTORY.md +98 -0
- package/ngp/node_modules/on-finished/LICENSE +23 -0
- package/ngp/node_modules/on-finished/README.md +162 -0
- package/ngp/node_modules/on-finished/index.js +234 -0
- package/ngp/node_modules/on-finished/package.json +39 -0
- package/ngp/node_modules/on-headers/HISTORY.md +21 -0
- package/ngp/node_modules/on-headers/LICENSE +22 -0
- package/ngp/node_modules/on-headers/README.md +81 -0
- package/ngp/node_modules/on-headers/index.js +132 -0
- package/ngp/node_modules/on-headers/package.json +42 -0
- package/ngp/node_modules/parseurl/HISTORY.md +58 -0
- package/ngp/node_modules/parseurl/LICENSE +24 -0
- package/ngp/node_modules/parseurl/README.md +133 -0
- package/ngp/node_modules/parseurl/index.js +158 -0
- package/ngp/node_modules/parseurl/package.json +40 -0
- package/ngp/node_modules/path-to-regexp/History.md +36 -0
- package/ngp/node_modules/path-to-regexp/LICENSE +21 -0
- package/ngp/node_modules/path-to-regexp/Readme.md +35 -0
- package/ngp/node_modules/path-to-regexp/index.js +129 -0
- package/ngp/node_modules/path-to-regexp/package.json +30 -0
- package/ngp/node_modules/picomatch/CHANGELOG.md +136 -0
- package/ngp/node_modules/picomatch/LICENSE +21 -0
- package/ngp/node_modules/picomatch/README.md +708 -0
- package/ngp/node_modules/picomatch/index.js +3 -0
- package/ngp/node_modules/picomatch/lib/constants.js +179 -0
- package/ngp/node_modules/picomatch/lib/parse.js +1091 -0
- package/ngp/node_modules/picomatch/lib/picomatch.js +342 -0
- package/ngp/node_modules/picomatch/lib/scan.js +391 -0
- package/ngp/node_modules/picomatch/lib/utils.js +64 -0
- package/ngp/node_modules/picomatch/package.json +81 -0
- package/ngp/node_modules/proxy-addr/HISTORY.md +161 -0
- package/ngp/node_modules/proxy-addr/LICENSE +22 -0
- package/ngp/node_modules/proxy-addr/README.md +139 -0
- package/ngp/node_modules/proxy-addr/index.js +327 -0
- package/ngp/node_modules/proxy-addr/package.json +47 -0
- package/ngp/node_modules/qs/.editorconfig +40 -0
- package/ngp/node_modules/qs/.eslintrc +38 -0
- package/ngp/node_modules/qs/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/qs/.nycrc +13 -0
- package/ngp/node_modules/qs/CHANGELOG.md +388 -0
- package/ngp/node_modules/qs/LICENSE.md +29 -0
- package/ngp/node_modules/qs/README.md +623 -0
- package/ngp/node_modules/qs/dist/qs.js +2044 -0
- package/ngp/node_modules/qs/lib/formats.js +23 -0
- package/ngp/node_modules/qs/lib/index.js +11 -0
- package/ngp/node_modules/qs/lib/parse.js +263 -0
- package/ngp/node_modules/qs/lib/stringify.js +317 -0
- package/ngp/node_modules/qs/lib/utils.js +252 -0
- package/ngp/node_modules/qs/package.json +73 -0
- package/ngp/node_modules/qs/test/parse.js +841 -0
- package/ngp/node_modules/qs/test/stringify.js +865 -0
- package/ngp/node_modules/qs/test/utils.js +136 -0
- package/ngp/node_modules/range-parser/HISTORY.md +56 -0
- package/ngp/node_modules/range-parser/LICENSE +23 -0
- package/ngp/node_modules/range-parser/README.md +84 -0
- package/ngp/node_modules/range-parser/index.js +162 -0
- package/ngp/node_modules/range-parser/package.json +44 -0
- package/ngp/node_modules/raw-body/HISTORY.md +303 -0
- package/ngp/node_modules/raw-body/LICENSE +22 -0
- package/ngp/node_modules/raw-body/README.md +223 -0
- package/ngp/node_modules/raw-body/SECURITY.md +24 -0
- package/ngp/node_modules/raw-body/index.d.ts +87 -0
- package/ngp/node_modules/raw-body/index.js +329 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/History.md +97 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/Readme.md +152 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/index.js +170 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/package.json +42 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/Changelog.md +162 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/README.md +156 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/index.js +22 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/package.json +46 -0
- package/ngp/node_modules/raw-body/package.json +49 -0
- package/ngp/node_modules/readdirp/LICENSE +21 -0
- package/ngp/node_modules/readdirp/README.md +122 -0
- package/ngp/node_modules/readdirp/index.d.ts +43 -0
- package/ngp/node_modules/readdirp/index.js +287 -0
- package/ngp/node_modules/readdirp/package.json +122 -0
- package/ngp/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/safe-buffer/index.js +62 -0
- package/ngp/node_modules/safe-buffer/package.json +37 -0
- package/ngp/node_modules/safer-buffer/LICENSE +21 -0
- package/ngp/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/ngp/node_modules/safer-buffer/Readme.md +156 -0
- package/ngp/node_modules/safer-buffer/dangerous.js +58 -0
- package/ngp/node_modules/safer-buffer/package.json +34 -0
- package/ngp/node_modules/safer-buffer/safer.js +77 -0
- package/ngp/node_modules/safer-buffer/tests.js +406 -0
- package/ngp/node_modules/send/HISTORY.md +521 -0
- package/ngp/node_modules/send/LICENSE +23 -0
- package/ngp/node_modules/send/README.md +327 -0
- package/ngp/node_modules/send/SECURITY.md +24 -0
- package/ngp/node_modules/send/index.js +1143 -0
- package/ngp/node_modules/send/node_modules/ms/index.js +162 -0
- package/ngp/node_modules/send/node_modules/ms/license.md +21 -0
- package/ngp/node_modules/send/node_modules/ms/package.json +38 -0
- package/ngp/node_modules/send/node_modules/ms/readme.md +59 -0
- package/ngp/node_modules/send/package.json +62 -0
- package/ngp/node_modules/serve-static/HISTORY.md +471 -0
- package/ngp/node_modules/serve-static/LICENSE +25 -0
- package/ngp/node_modules/serve-static/README.md +257 -0
- package/ngp/node_modules/serve-static/index.js +210 -0
- package/ngp/node_modules/serve-static/package.json +42 -0
- package/ngp/node_modules/setprototypeof/LICENSE +13 -0
- package/ngp/node_modules/setprototypeof/README.md +31 -0
- package/ngp/node_modules/setprototypeof/index.d.ts +2 -0
- package/ngp/node_modules/setprototypeof/index.js +17 -0
- package/ngp/node_modules/setprototypeof/package.json +38 -0
- package/ngp/node_modules/setprototypeof/test/index.js +24 -0
- package/ngp/node_modules/side-channel/.eslintignore +1 -0
- package/ngp/node_modules/side-channel/.eslintrc +11 -0
- package/ngp/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/side-channel/.nycrc +13 -0
- package/ngp/node_modules/side-channel/CHANGELOG.md +65 -0
- package/ngp/node_modules/side-channel/LICENSE +21 -0
- package/ngp/node_modules/side-channel/README.md +2 -0
- package/ngp/node_modules/side-channel/index.js +124 -0
- package/ngp/node_modules/side-channel/package.json +67 -0
- package/ngp/node_modules/side-channel/test/index.js +78 -0
- package/ngp/node_modules/statuses/HISTORY.md +82 -0
- package/ngp/node_modules/statuses/LICENSE +23 -0
- package/ngp/node_modules/statuses/README.md +136 -0
- package/ngp/node_modules/statuses/codes.json +65 -0
- package/ngp/node_modules/statuses/index.js +146 -0
- package/ngp/node_modules/statuses/package.json +49 -0
- package/ngp/node_modules/to-regex-range/LICENSE +21 -0
- package/ngp/node_modules/to-regex-range/README.md +305 -0
- package/ngp/node_modules/to-regex-range/index.js +288 -0
- package/ngp/node_modules/to-regex-range/package.json +88 -0
- package/ngp/node_modules/toidentifier/HISTORY.md +9 -0
- package/ngp/node_modules/toidentifier/LICENSE +21 -0
- package/ngp/node_modules/toidentifier/README.md +61 -0
- package/ngp/node_modules/toidentifier/index.js +32 -0
- package/ngp/node_modules/toidentifier/package.json +38 -0
- package/ngp/node_modules/type-is/HISTORY.md +259 -0
- package/ngp/node_modules/type-is/LICENSE +23 -0
- package/ngp/node_modules/type-is/README.md +170 -0
- package/ngp/node_modules/type-is/index.js +266 -0
- package/ngp/node_modules/type-is/package.json +45 -0
- package/ngp/node_modules/uglify-js/LICENSE +29 -0
- package/ngp/node_modules/uglify-js/README.md +1423 -0
- package/ngp/node_modules/uglify-js/bin/uglifyjs +603 -0
- package/ngp/node_modules/uglify-js/lib/ast.js +2132 -0
- package/ngp/node_modules/uglify-js/lib/compress.js +13762 -0
- package/ngp/node_modules/uglify-js/lib/minify.js +277 -0
- package/ngp/node_modules/uglify-js/lib/mozilla-ast.js +1274 -0
- package/ngp/node_modules/uglify-js/lib/output.js +1936 -0
- package/ngp/node_modules/uglify-js/lib/parse.js +2559 -0
- package/ngp/node_modules/uglify-js/lib/propmangle.js +259 -0
- package/ngp/node_modules/uglify-js/lib/scope.js +860 -0
- package/ngp/node_modules/uglify-js/lib/sourcemap.js +195 -0
- package/ngp/node_modules/uglify-js/lib/transform.js +250 -0
- package/ngp/node_modules/uglify-js/lib/utils.js +285 -0
- package/ngp/node_modules/uglify-js/package.json +56 -0
- package/ngp/node_modules/uglify-js/tools/domprops.html +456 -0
- package/ngp/node_modules/uglify-js/tools/domprops.json +8325 -0
- package/ngp/node_modules/uglify-js/tools/exports.js +8 -0
- package/ngp/node_modules/uglify-js/tools/node.js +110 -0
- package/ngp/node_modules/uglify-js/tools/tty.js +22 -0
- package/ngp/node_modules/unpipe/HISTORY.md +4 -0
- package/ngp/node_modules/unpipe/LICENSE +22 -0
- package/ngp/node_modules/unpipe/README.md +43 -0
- package/ngp/node_modules/unpipe/index.js +69 -0
- package/ngp/node_modules/unpipe/package.json +27 -0
- package/ngp/node_modules/utils-merge/LICENSE +20 -0
- package/ngp/node_modules/utils-merge/README.md +34 -0
- package/ngp/node_modules/utils-merge/index.js +23 -0
- package/ngp/node_modules/utils-merge/package.json +40 -0
- package/ngp/node_modules/vary/HISTORY.md +39 -0
- package/ngp/node_modules/vary/LICENSE +22 -0
- package/ngp/node_modules/vary/README.md +101 -0
- package/ngp/node_modules/vary/index.js +149 -0
- package/ngp/node_modules/vary/package.json +43 -0
- package/ngp/package-lock.json +1508 -0
- package/package.json +3 -2
- package/readme.md +0 -4
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40)
|
|
13
|
+
- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e)
|
|
14
|
+
- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27)
|
|
15
|
+
- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869)
|
|
16
|
+
- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15)
|
|
17
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383)
|
|
18
|
+
- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee)
|
|
19
|
+
- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a)
|
|
20
|
+
- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7)
|
|
21
|
+
|
|
22
|
+
## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23
|
|
23
|
+
|
|
24
|
+
### Commits
|
|
25
|
+
|
|
26
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868)
|
|
27
|
+
- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03)
|
|
28
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1)
|
|
29
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e)
|
|
30
|
+
- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40)
|
|
31
|
+
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6)
|
|
32
|
+
- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec)
|
|
33
|
+
- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a)
|
|
34
|
+
- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452)
|
|
35
|
+
- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82)
|
|
36
|
+
- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932)
|
|
37
|
+
- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4)
|
|
38
|
+
|
|
39
|
+
## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20
|
|
40
|
+
|
|
41
|
+
### Commits
|
|
42
|
+
|
|
43
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082)
|
|
44
|
+
- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe)
|
|
45
|
+
|
|
46
|
+
## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01
|
|
47
|
+
|
|
48
|
+
### Commits
|
|
49
|
+
|
|
50
|
+
- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e)
|
|
51
|
+
|
|
52
|
+
## v1.0.0 - 2019-12-01
|
|
53
|
+
|
|
54
|
+
### Commits
|
|
55
|
+
|
|
56
|
+
- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4)
|
|
57
|
+
- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8)
|
|
58
|
+
- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770)
|
|
59
|
+
- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c)
|
|
60
|
+
- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec)
|
|
61
|
+
- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077)
|
|
62
|
+
- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c)
|
|
63
|
+
- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885)
|
|
64
|
+
- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448)
|
|
65
|
+
- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Jordan Harband
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
var callBound = require('call-bind/callBound');
|
|
5
|
+
var inspect = require('object-inspect');
|
|
6
|
+
|
|
7
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
8
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
9
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
10
|
+
|
|
11
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
12
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
13
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
14
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
15
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
16
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* This function traverses the list returning the node corresponding to the
|
|
20
|
+
* given key.
|
|
21
|
+
*
|
|
22
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
23
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
24
|
+
* used nodes can be accessed relatively quickly.
|
|
25
|
+
*/
|
|
26
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
27
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
28
|
+
if (curr.key === key) {
|
|
29
|
+
prev.next = curr.next;
|
|
30
|
+
curr.next = list.next;
|
|
31
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
32
|
+
return curr;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var listGet = function (objects, key) {
|
|
38
|
+
var node = listGetNode(objects, key);
|
|
39
|
+
return node && node.value;
|
|
40
|
+
};
|
|
41
|
+
var listSet = function (objects, key, value) {
|
|
42
|
+
var node = listGetNode(objects, key);
|
|
43
|
+
if (node) {
|
|
44
|
+
node.value = value;
|
|
45
|
+
} else {
|
|
46
|
+
// Prepend the new node to the beginning of the list
|
|
47
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
48
|
+
key: key,
|
|
49
|
+
next: objects.next,
|
|
50
|
+
value: value
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var listHas = function (objects, key) {
|
|
55
|
+
return !!listGetNode(objects, key);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
module.exports = function getSideChannel() {
|
|
59
|
+
var $wm;
|
|
60
|
+
var $m;
|
|
61
|
+
var $o;
|
|
62
|
+
var channel = {
|
|
63
|
+
assert: function (key) {
|
|
64
|
+
if (!channel.has(key)) {
|
|
65
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
69
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
70
|
+
if ($wm) {
|
|
71
|
+
return $weakMapGet($wm, key);
|
|
72
|
+
}
|
|
73
|
+
} else if ($Map) {
|
|
74
|
+
if ($m) {
|
|
75
|
+
return $mapGet($m, key);
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
79
|
+
return listGet($o, key);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
has: function (key) {
|
|
84
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
85
|
+
if ($wm) {
|
|
86
|
+
return $weakMapHas($wm, key);
|
|
87
|
+
}
|
|
88
|
+
} else if ($Map) {
|
|
89
|
+
if ($m) {
|
|
90
|
+
return $mapHas($m, key);
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
94
|
+
return listHas($o, key);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
},
|
|
99
|
+
set: function (key, value) {
|
|
100
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
101
|
+
if (!$wm) {
|
|
102
|
+
$wm = new $WeakMap();
|
|
103
|
+
}
|
|
104
|
+
$weakMapSet($wm, key, value);
|
|
105
|
+
} else if ($Map) {
|
|
106
|
+
if (!$m) {
|
|
107
|
+
$m = new $Map();
|
|
108
|
+
}
|
|
109
|
+
$mapSet($m, key, value);
|
|
110
|
+
} else {
|
|
111
|
+
if (!$o) {
|
|
112
|
+
/*
|
|
113
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
114
|
+
* to special-case handling of the first node: we can always refer to
|
|
115
|
+
* it as (previous node).next, instead of something like (list).head
|
|
116
|
+
*/
|
|
117
|
+
$o = { key: {}, next: null };
|
|
118
|
+
}
|
|
119
|
+
listSet($o, key, value);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return channel;
|
|
124
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "side-channel",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
".": [
|
|
9
|
+
{
|
|
10
|
+
"default": "./index.js"
|
|
11
|
+
},
|
|
12
|
+
"./index.js"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"prepublish": "safe-publish-latest",
|
|
17
|
+
"lint": "eslint .",
|
|
18
|
+
"pretest": "npm run lint",
|
|
19
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
20
|
+
"test": "npm run tests-only",
|
|
21
|
+
"posttest": "npx aud --production",
|
|
22
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
23
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/ljharb/side-channel.git"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"weakmap",
|
|
31
|
+
"map",
|
|
32
|
+
"side",
|
|
33
|
+
"channel",
|
|
34
|
+
"metadata"
|
|
35
|
+
],
|
|
36
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
37
|
+
"funding": {
|
|
38
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/ljharb/side-channel/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/ljharb/side-channel#readme",
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@ljharb/eslint-config": "^17.3.0",
|
|
47
|
+
"aud": "^1.1.3",
|
|
48
|
+
"auto-changelog": "^2.2.1",
|
|
49
|
+
"eslint": "^7.16.0",
|
|
50
|
+
"nyc": "^10.3.2",
|
|
51
|
+
"safe-publish-latest": "^1.1.4",
|
|
52
|
+
"tape": "^5.0.1"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"call-bind": "^1.0.0",
|
|
56
|
+
"get-intrinsic": "^1.0.2",
|
|
57
|
+
"object-inspect": "^1.9.0"
|
|
58
|
+
},
|
|
59
|
+
"auto-changelog": {
|
|
60
|
+
"output": "CHANGELOG.md",
|
|
61
|
+
"template": "keepachangelog",
|
|
62
|
+
"unreleased": false,
|
|
63
|
+
"commitLimit": false,
|
|
64
|
+
"backfillLimit": false,
|
|
65
|
+
"hideCredit": true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var getSideChannel = require('../');
|
|
6
|
+
|
|
7
|
+
test('export', function (t) {
|
|
8
|
+
t.equal(typeof getSideChannel, 'function', 'is a function');
|
|
9
|
+
t.equal(getSideChannel.length, 0, 'takes no arguments');
|
|
10
|
+
|
|
11
|
+
var channel = getSideChannel();
|
|
12
|
+
t.ok(channel, 'is truthy');
|
|
13
|
+
t.equal(typeof channel, 'object', 'is an object');
|
|
14
|
+
|
|
15
|
+
t.end();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('assert', function (t) {
|
|
19
|
+
var channel = getSideChannel();
|
|
20
|
+
t['throws'](
|
|
21
|
+
function () { channel.assert({}); },
|
|
22
|
+
TypeError,
|
|
23
|
+
'nonexistent value throws'
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
var o = {};
|
|
27
|
+
channel.set(o, 'data');
|
|
28
|
+
t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
|
|
29
|
+
|
|
30
|
+
t.end();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('has', function (t) {
|
|
34
|
+
var channel = getSideChannel();
|
|
35
|
+
var o = [];
|
|
36
|
+
|
|
37
|
+
t.equal(channel.has(o), false, 'nonexistent value yields false');
|
|
38
|
+
|
|
39
|
+
channel.set(o, 'foo');
|
|
40
|
+
t.equal(channel.has(o), true, 'existent value yields true');
|
|
41
|
+
|
|
42
|
+
t.end();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('get', function (t) {
|
|
46
|
+
var channel = getSideChannel();
|
|
47
|
+
var o = {};
|
|
48
|
+
t.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
|
|
49
|
+
|
|
50
|
+
var data = {};
|
|
51
|
+
channel.set(o, data);
|
|
52
|
+
t.equal(channel.get(o), data, '"get" yields data set by "set"');
|
|
53
|
+
|
|
54
|
+
t.end();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('set', function (t) {
|
|
58
|
+
var channel = getSideChannel();
|
|
59
|
+
var o = function () {};
|
|
60
|
+
t.equal(channel.get(o), undefined, 'value not set');
|
|
61
|
+
|
|
62
|
+
channel.set(o, 42);
|
|
63
|
+
t.equal(channel.get(o), 42, 'value was set');
|
|
64
|
+
|
|
65
|
+
channel.set(o, Infinity);
|
|
66
|
+
t.equal(channel.get(o), Infinity, 'value was set again');
|
|
67
|
+
|
|
68
|
+
var o2 = {};
|
|
69
|
+
channel.set(o2, 17);
|
|
70
|
+
t.equal(channel.get(o), Infinity, 'o is not modified');
|
|
71
|
+
t.equal(channel.get(o2), 17, 'o2 is set');
|
|
72
|
+
|
|
73
|
+
channel.set(o, 14);
|
|
74
|
+
t.equal(channel.get(o), 14, 'o is modified');
|
|
75
|
+
t.equal(channel.get(o2), 17, 'o2 is not modified');
|
|
76
|
+
|
|
77
|
+
t.end();
|
|
78
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
|
|
18
|
+
1.5.0 / 2018-03-27
|
|
19
|
+
==================
|
|
20
|
+
|
|
21
|
+
* Add `103 Early Hints`
|
|
22
|
+
|
|
23
|
+
1.4.0 / 2017-10-20
|
|
24
|
+
==================
|
|
25
|
+
|
|
26
|
+
* Add `STATUS_CODES` export
|
|
27
|
+
|
|
28
|
+
1.3.1 / 2016-11-11
|
|
29
|
+
==================
|
|
30
|
+
|
|
31
|
+
* Fix return type in JSDoc
|
|
32
|
+
|
|
33
|
+
1.3.0 / 2016-05-17
|
|
34
|
+
==================
|
|
35
|
+
|
|
36
|
+
* Add `421 Misdirected Request`
|
|
37
|
+
* perf: enable strict mode
|
|
38
|
+
|
|
39
|
+
1.2.1 / 2015-02-01
|
|
40
|
+
==================
|
|
41
|
+
|
|
42
|
+
* Fix message for status 451
|
|
43
|
+
- `451 Unavailable For Legal Reasons`
|
|
44
|
+
|
|
45
|
+
1.2.0 / 2014-09-28
|
|
46
|
+
==================
|
|
47
|
+
|
|
48
|
+
* Add `208 Already Repored`
|
|
49
|
+
* Add `226 IM Used`
|
|
50
|
+
* Add `306 (Unused)`
|
|
51
|
+
* Add `415 Unable For Legal Reasons`
|
|
52
|
+
* Add `508 Loop Detected`
|
|
53
|
+
|
|
54
|
+
1.1.1 / 2014-09-24
|
|
55
|
+
==================
|
|
56
|
+
|
|
57
|
+
* Add missing 308 to `codes.json`
|
|
58
|
+
|
|
59
|
+
1.1.0 / 2014-09-21
|
|
60
|
+
==================
|
|
61
|
+
|
|
62
|
+
* Add `codes.json` for universal support
|
|
63
|
+
|
|
64
|
+
1.0.4 / 2014-08-20
|
|
65
|
+
==================
|
|
66
|
+
|
|
67
|
+
* Package cleanup
|
|
68
|
+
|
|
69
|
+
1.0.3 / 2014-06-08
|
|
70
|
+
==================
|
|
71
|
+
|
|
72
|
+
* Add 308 to `.redirect` category
|
|
73
|
+
|
|
74
|
+
1.0.2 / 2014-03-13
|
|
75
|
+
==================
|
|
76
|
+
|
|
77
|
+
* Add `.retry` category
|
|
78
|
+
|
|
79
|
+
1.0.1 / 2014-03-12
|
|
80
|
+
==================
|
|
81
|
+
|
|
82
|
+
* Initial release
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
|
5
|
+
Copyright (c) 2016 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# statuses
|
|
2
|
+
|
|
3
|
+
[![NPM Version][npm-version-image]][npm-url]
|
|
4
|
+
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
|
+
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
+
[![Build Status][ci-image]][ci-url]
|
|
7
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
|
+
|
|
9
|
+
HTTP status utility for node.
|
|
10
|
+
|
|
11
|
+
This module provides a list of status codes and messages sourced from
|
|
12
|
+
a few different projects:
|
|
13
|
+
|
|
14
|
+
* The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)
|
|
15
|
+
* The [Node.js project](https://nodejs.org/)
|
|
16
|
+
* The [NGINX project](https://www.nginx.com/)
|
|
17
|
+
* The [Apache HTTP Server project](https://httpd.apache.org/)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
This is a [Node.js](https://nodejs.org/en/) module available through the
|
|
22
|
+
[npm registry](https://www.npmjs.com/). Installation is done using the
|
|
23
|
+
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
$ npm install statuses
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
<!-- eslint-disable no-unused-vars -->
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
var status = require('statuses')
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### status(code)
|
|
38
|
+
|
|
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
|
+
|
|
42
|
+
<!-- eslint-disable no-undef -->
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
status(403) // => 'Forbidden'
|
|
46
|
+
status('403') // => 'Forbidden'
|
|
47
|
+
status(306) // throws
|
|
48
|
+
```
|
|
49
|
+
|
|
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 -->
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
status('forbidden') // => 403
|
|
59
|
+
status('Forbidden') // => 403
|
|
60
|
+
status('foo') // throws
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### status.codes
|
|
64
|
+
|
|
65
|
+
Returns an array of all the status codes as `Integer`s.
|
|
66
|
+
|
|
67
|
+
### status.code[msg]
|
|
68
|
+
|
|
69
|
+
Returns the numeric status code for a known status message (in lower-case),
|
|
70
|
+
otherwise `undefined`.
|
|
71
|
+
|
|
72
|
+
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
status['not found'] // => 404
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### status.empty[code]
|
|
79
|
+
|
|
80
|
+
Returns `true` if a status code expects an empty body.
|
|
81
|
+
|
|
82
|
+
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
status.empty[200] // => undefined
|
|
86
|
+
status.empty[204] // => true
|
|
87
|
+
status.empty[304] // => true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### status.message[code]
|
|
91
|
+
|
|
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).
|
|
95
|
+
|
|
96
|
+
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
status.message[404] // => 'Not Found'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### status.redirect[code]
|
|
103
|
+
|
|
104
|
+
Returns `true` if a status code is a valid redirect status.
|
|
105
|
+
|
|
106
|
+
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
status.redirect[200] // => undefined
|
|
110
|
+
status.redirect[301] // => true
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### status.retry[code]
|
|
114
|
+
|
|
115
|
+
Returns `true` if you should retry the rest.
|
|
116
|
+
|
|
117
|
+
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
status.retry[501] // => undefined
|
|
121
|
+
status.retry[503] // => true
|
|
122
|
+
```
|
|
123
|
+
|
|
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
|
|
131
|
+
[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
|
|
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
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"100": "Continue",
|
|
3
|
+
"101": "Switching Protocols",
|
|
4
|
+
"102": "Processing",
|
|
5
|
+
"103": "Early Hints",
|
|
6
|
+
"200": "OK",
|
|
7
|
+
"201": "Created",
|
|
8
|
+
"202": "Accepted",
|
|
9
|
+
"203": "Non-Authoritative Information",
|
|
10
|
+
"204": "No Content",
|
|
11
|
+
"205": "Reset Content",
|
|
12
|
+
"206": "Partial Content",
|
|
13
|
+
"207": "Multi-Status",
|
|
14
|
+
"208": "Already Reported",
|
|
15
|
+
"226": "IM Used",
|
|
16
|
+
"300": "Multiple Choices",
|
|
17
|
+
"301": "Moved Permanently",
|
|
18
|
+
"302": "Found",
|
|
19
|
+
"303": "See Other",
|
|
20
|
+
"304": "Not Modified",
|
|
21
|
+
"305": "Use Proxy",
|
|
22
|
+
"307": "Temporary Redirect",
|
|
23
|
+
"308": "Permanent Redirect",
|
|
24
|
+
"400": "Bad Request",
|
|
25
|
+
"401": "Unauthorized",
|
|
26
|
+
"402": "Payment Required",
|
|
27
|
+
"403": "Forbidden",
|
|
28
|
+
"404": "Not Found",
|
|
29
|
+
"405": "Method Not Allowed",
|
|
30
|
+
"406": "Not Acceptable",
|
|
31
|
+
"407": "Proxy Authentication Required",
|
|
32
|
+
"408": "Request Timeout",
|
|
33
|
+
"409": "Conflict",
|
|
34
|
+
"410": "Gone",
|
|
35
|
+
"411": "Length Required",
|
|
36
|
+
"412": "Precondition Failed",
|
|
37
|
+
"413": "Payload Too Large",
|
|
38
|
+
"414": "URI Too Long",
|
|
39
|
+
"415": "Unsupported Media Type",
|
|
40
|
+
"416": "Range Not Satisfiable",
|
|
41
|
+
"417": "Expectation Failed",
|
|
42
|
+
"418": "I'm a Teapot",
|
|
43
|
+
"421": "Misdirected Request",
|
|
44
|
+
"422": "Unprocessable Entity",
|
|
45
|
+
"423": "Locked",
|
|
46
|
+
"424": "Failed Dependency",
|
|
47
|
+
"425": "Too Early",
|
|
48
|
+
"426": "Upgrade Required",
|
|
49
|
+
"428": "Precondition Required",
|
|
50
|
+
"429": "Too Many Requests",
|
|
51
|
+
"431": "Request Header Fields Too Large",
|
|
52
|
+
"451": "Unavailable For Legal Reasons",
|
|
53
|
+
"500": "Internal Server Error",
|
|
54
|
+
"501": "Not Implemented",
|
|
55
|
+
"502": "Bad Gateway",
|
|
56
|
+
"503": "Service Unavailable",
|
|
57
|
+
"504": "Gateway Timeout",
|
|
58
|
+
"505": "HTTP Version Not Supported",
|
|
59
|
+
"506": "Variant Also Negotiates",
|
|
60
|
+
"507": "Insufficient Storage",
|
|
61
|
+
"508": "Loop Detected",
|
|
62
|
+
"509": "Bandwidth Limit Exceeded",
|
|
63
|
+
"510": "Not Extended",
|
|
64
|
+
"511": "Network Authentication Required"
|
|
65
|
+
}
|