coupeeeez 0.0.1
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/LICENSE.MD +7 -0
- package/command +18 -0
- package/makeApp.ts +17 -0
- package/package.json +41 -0
- package/stream-api/Message.ts +6 -0
- package/stream-api/SSEInjected.ts +3 -0
- package/stream-api/SSEServer.ts +37 -0
- package/stream-api/SSEServers.ts +36 -0
- package/stream-api/StreamApi.ts +39 -0
- package/stream-api/app.ts +14 -0
- package/stream-api/index.ts +1 -0
- package/stream-api/node_modules/.package-lock.json +971 -0
- package/stream-api/node_modules/@types/body-parser/LICENSE +21 -0
- package/stream-api/node_modules/@types/body-parser/README.md +15 -0
- package/stream-api/node_modules/@types/body-parser/index.d.ts +95 -0
- package/stream-api/node_modules/@types/body-parser/package.json +64 -0
- package/stream-api/node_modules/@types/connect/LICENSE +21 -0
- package/stream-api/node_modules/@types/connect/README.md +15 -0
- package/stream-api/node_modules/@types/connect/index.d.ts +91 -0
- package/stream-api/node_modules/@types/connect/package.json +32 -0
- package/stream-api/node_modules/@types/express/LICENSE +21 -0
- package/stream-api/node_modules/@types/express/README.md +15 -0
- package/stream-api/node_modules/@types/express/index.d.ts +122 -0
- package/stream-api/node_modules/@types/express/package.json +45 -0
- package/stream-api/node_modules/@types/express-serve-static-core/LICENSE +21 -0
- package/stream-api/node_modules/@types/express-serve-static-core/README.md +15 -0
- package/stream-api/node_modules/@types/express-serve-static-core/index.d.ts +1244 -0
- package/stream-api/node_modules/@types/express-serve-static-core/package.json +51 -0
- package/stream-api/node_modules/@types/http-errors/LICENSE +21 -0
- package/stream-api/node_modules/@types/http-errors/README.md +15 -0
- package/stream-api/node_modules/@types/http-errors/index.d.ts +77 -0
- package/stream-api/node_modules/@types/http-errors/package.json +36 -0
- package/stream-api/node_modules/@types/mime/LICENSE +21 -0
- package/stream-api/node_modules/@types/mime/Mime.d.ts +10 -0
- package/stream-api/node_modules/@types/mime/README.md +15 -0
- package/stream-api/node_modules/@types/mime/index.d.ts +31 -0
- package/stream-api/node_modules/@types/mime/lite.d.ts +7 -0
- package/stream-api/node_modules/@types/mime/package.json +30 -0
- package/stream-api/node_modules/@types/node/LICENSE +21 -0
- package/stream-api/node_modules/@types/node/README.md +15 -0
- package/stream-api/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/stream-api/node_modules/@types/node/assert.d.ts +1115 -0
- package/stream-api/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/stream-api/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/stream-api/node_modules/@types/node/buffer.d.ts +1934 -0
- package/stream-api/node_modules/@types/node/child_process.d.ts +1476 -0
- package/stream-api/node_modules/@types/node/cluster.d.ts +578 -0
- package/stream-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/stream-api/node_modules/@types/node/console.d.ts +453 -0
- package/stream-api/node_modules/@types/node/constants.d.ts +21 -0
- package/stream-api/node_modules/@types/node/crypto.d.ts +5417 -0
- package/stream-api/node_modules/@types/node/dgram.d.ts +600 -0
- package/stream-api/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/stream-api/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/stream-api/node_modules/@types/node/dns.d.ts +923 -0
- package/stream-api/node_modules/@types/node/domain.d.ts +170 -0
- package/stream-api/node_modules/@types/node/events.d.ts +976 -0
- package/stream-api/node_modules/@types/node/fs/promises.d.ts +1317 -0
- package/stream-api/node_modules/@types/node/fs.d.ts +4714 -0
- package/stream-api/node_modules/@types/node/globals.d.ts +170 -0
- package/stream-api/node_modules/@types/node/globals.typedarray.d.ts +41 -0
- package/stream-api/node_modules/@types/node/http.d.ts +2134 -0
- package/stream-api/node_modules/@types/node/http2.d.ts +2756 -0
- package/stream-api/node_modules/@types/node/https.d.ts +579 -0
- package/stream-api/node_modules/@types/node/index.d.ts +101 -0
- package/stream-api/node_modules/@types/node/inspector.d.ts +277 -0
- package/stream-api/node_modules/@types/node/inspector.generated.d.ts +4233 -0
- package/stream-api/node_modules/@types/node/module.d.ts +894 -0
- package/stream-api/node_modules/@types/node/net.d.ts +1054 -0
- package/stream-api/node_modules/@types/node/os.d.ts +507 -0
- package/stream-api/node_modules/@types/node/package.json +155 -0
- package/stream-api/node_modules/@types/node/path.d.ts +200 -0
- package/stream-api/node_modules/@types/node/perf_hooks.d.ts +982 -0
- package/stream-api/node_modules/@types/node/process.d.ts +2069 -0
- package/stream-api/node_modules/@types/node/punycode.d.ts +117 -0
- package/stream-api/node_modules/@types/node/querystring.d.ts +152 -0
- package/stream-api/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/stream-api/node_modules/@types/node/readline.d.ts +594 -0
- package/stream-api/node_modules/@types/node/repl.d.ts +438 -0
- package/stream-api/node_modules/@types/node/sea.d.ts +162 -0
- package/stream-api/node_modules/@types/node/sqlite.d.ts +937 -0
- package/stream-api/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/stream-api/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/stream-api/node_modules/@types/node/stream/web.d.ts +573 -0
- package/stream-api/node_modules/@types/node/stream.d.ts +1683 -0
- package/stream-api/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/stream-api/node_modules/@types/node/test.d.ts +2339 -0
- package/stream-api/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/stream-api/node_modules/@types/node/timers.d.ts +285 -0
- package/stream-api/node_modules/@types/node/tls.d.ts +1269 -0
- package/stream-api/node_modules/@types/node/trace_events.d.ts +197 -0
- package/stream-api/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/stream-api/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/stream-api/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/stream-api/node_modules/@types/node/ts5.6/index.d.ts +103 -0
- package/stream-api/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/stream-api/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/stream-api/node_modules/@types/node/tty.d.ts +208 -0
- package/stream-api/node_modules/@types/node/url.d.ts +1057 -0
- package/stream-api/node_modules/@types/node/util.d.ts +2325 -0
- package/stream-api/node_modules/@types/node/v8.d.ts +952 -0
- package/stream-api/node_modules/@types/node/vm.d.ts +1180 -0
- package/stream-api/node_modules/@types/node/wasi.d.ts +202 -0
- package/stream-api/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/stream-api/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/stream-api/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/stream-api/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/stream-api/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/stream-api/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/stream-api/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/stream-api/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/stream-api/node_modules/@types/node/worker_threads.d.ts +896 -0
- package/stream-api/node_modules/@types/node/zlib.d.ts +681 -0
- package/stream-api/node_modules/@types/qs/LICENSE +21 -0
- package/stream-api/node_modules/@types/qs/README.md +15 -0
- package/stream-api/node_modules/@types/qs/index.d.ts +82 -0
- package/stream-api/node_modules/@types/qs/package.json +66 -0
- package/stream-api/node_modules/@types/range-parser/LICENSE +21 -0
- package/stream-api/node_modules/@types/range-parser/README.md +53 -0
- package/stream-api/node_modules/@types/range-parser/index.d.ts +34 -0
- package/stream-api/node_modules/@types/range-parser/package.json +25 -0
- package/stream-api/node_modules/@types/send/LICENSE +21 -0
- package/stream-api/node_modules/@types/send/README.md +15 -0
- package/stream-api/node_modules/@types/send/index.d.ts +187 -0
- package/stream-api/node_modules/@types/send/package.json +38 -0
- package/stream-api/node_modules/@types/serve-static/LICENSE +21 -0
- package/stream-api/node_modules/@types/serve-static/README.md +15 -0
- package/stream-api/node_modules/@types/serve-static/index.d.ts +107 -0
- package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/LICENSE +21 -0
- package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/README.md +15 -0
- package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/index.d.ts +225 -0
- package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/package.json +39 -0
- package/stream-api/node_modules/@types/serve-static/package.json +45 -0
- package/stream-api/node_modules/accepts/HISTORY.md +250 -0
- package/stream-api/node_modules/accepts/LICENSE +23 -0
- package/stream-api/node_modules/accepts/README.md +140 -0
- package/stream-api/node_modules/accepts/index.js +238 -0
- package/stream-api/node_modules/accepts/package.json +47 -0
- package/stream-api/node_modules/any-base/LICENSE +21 -0
- package/stream-api/node_modules/any-base/README.md +55 -0
- package/stream-api/node_modules/any-base/dist/any-base.js +94 -0
- package/stream-api/node_modules/any-base/dist/any-base.min.js +1 -0
- package/stream-api/node_modules/any-base/index.js +30 -0
- package/stream-api/node_modules/any-base/package.json +40 -0
- package/stream-api/node_modules/any-base/src/converter.js +80 -0
- package/stream-api/node_modules/body-parser/LICENSE +23 -0
- package/stream-api/node_modules/body-parser/README.md +494 -0
- package/stream-api/node_modules/body-parser/index.js +80 -0
- package/stream-api/node_modules/body-parser/lib/read.js +250 -0
- package/stream-api/node_modules/body-parser/lib/types/json.js +166 -0
- package/stream-api/node_modules/body-parser/lib/types/raw.js +43 -0
- package/stream-api/node_modules/body-parser/lib/types/text.js +37 -0
- package/stream-api/node_modules/body-parser/lib/types/urlencoded.js +142 -0
- package/stream-api/node_modules/body-parser/lib/utils.js +96 -0
- package/stream-api/node_modules/body-parser/package.json +52 -0
- package/stream-api/node_modules/bytes/History.md +97 -0
- package/stream-api/node_modules/bytes/LICENSE +23 -0
- package/stream-api/node_modules/bytes/Readme.md +152 -0
- package/stream-api/node_modules/bytes/index.js +170 -0
- package/stream-api/node_modules/bytes/package.json +42 -0
- package/stream-api/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/stream-api/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/stream-api/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/stream-api/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/stream-api/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/stream-api/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/stream-api/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/stream-api/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/stream-api/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/stream-api/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/stream-api/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/stream-api/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/stream-api/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/stream-api/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/stream-api/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/stream-api/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/stream-api/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/stream-api/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/stream-api/node_modules/call-bound/.eslintrc +13 -0
- package/stream-api/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/call-bound/.nycrc +9 -0
- package/stream-api/node_modules/call-bound/CHANGELOG.md +42 -0
- package/stream-api/node_modules/call-bound/LICENSE +21 -0
- package/stream-api/node_modules/call-bound/README.md +53 -0
- package/stream-api/node_modules/call-bound/index.d.ts +94 -0
- package/stream-api/node_modules/call-bound/index.js +19 -0
- package/stream-api/node_modules/call-bound/package.json +99 -0
- package/stream-api/node_modules/call-bound/test/index.js +61 -0
- package/stream-api/node_modules/call-bound/tsconfig.json +10 -0
- package/stream-api/node_modules/commander/LICENSE +22 -0
- package/stream-api/node_modules/commander/Readme.md +1159 -0
- package/stream-api/node_modules/commander/esm.mjs +16 -0
- package/stream-api/node_modules/commander/index.js +24 -0
- package/stream-api/node_modules/commander/lib/argument.js +150 -0
- package/stream-api/node_modules/commander/lib/command.js +2777 -0
- package/stream-api/node_modules/commander/lib/error.js +39 -0
- package/stream-api/node_modules/commander/lib/help.js +747 -0
- package/stream-api/node_modules/commander/lib/option.js +380 -0
- package/stream-api/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/stream-api/node_modules/commander/package-support.json +16 -0
- package/stream-api/node_modules/commander/package.json +82 -0
- package/stream-api/node_modules/commander/typings/esm.d.mts +3 -0
- package/stream-api/node_modules/commander/typings/index.d.ts +1113 -0
- package/stream-api/node_modules/content-disposition/HISTORY.md +72 -0
- package/stream-api/node_modules/content-disposition/LICENSE +22 -0
- package/stream-api/node_modules/content-disposition/README.md +142 -0
- package/stream-api/node_modules/content-disposition/index.js +458 -0
- package/stream-api/node_modules/content-disposition/package.json +43 -0
- package/stream-api/node_modules/content-type/HISTORY.md +29 -0
- package/stream-api/node_modules/content-type/LICENSE +22 -0
- package/stream-api/node_modules/content-type/README.md +94 -0
- package/stream-api/node_modules/content-type/index.js +225 -0
- package/stream-api/node_modules/content-type/package.json +42 -0
- package/stream-api/node_modules/cookie/LICENSE +24 -0
- package/stream-api/node_modules/cookie/README.md +317 -0
- package/stream-api/node_modules/cookie/SECURITY.md +25 -0
- package/stream-api/node_modules/cookie/index.js +335 -0
- package/stream-api/node_modules/cookie/package.json +44 -0
- package/stream-api/node_modules/cookie-signature/History.md +70 -0
- package/stream-api/node_modules/cookie-signature/LICENSE +22 -0
- package/stream-api/node_modules/cookie-signature/Readme.md +23 -0
- package/stream-api/node_modules/cookie-signature/index.js +47 -0
- package/stream-api/node_modules/cookie-signature/package.json +24 -0
- package/stream-api/node_modules/debug/LICENSE +20 -0
- package/stream-api/node_modules/debug/README.md +481 -0
- package/stream-api/node_modules/debug/package.json +64 -0
- package/stream-api/node_modules/debug/src/browser.js +272 -0
- package/stream-api/node_modules/debug/src/common.js +292 -0
- package/stream-api/node_modules/debug/src/index.js +10 -0
- package/stream-api/node_modules/debug/src/node.js +263 -0
- package/stream-api/node_modules/depd/History.md +103 -0
- package/stream-api/node_modules/depd/LICENSE +22 -0
- package/stream-api/node_modules/depd/Readme.md +280 -0
- package/stream-api/node_modules/depd/index.js +538 -0
- package/stream-api/node_modules/depd/lib/browser/index.js +77 -0
- package/stream-api/node_modules/depd/package.json +45 -0
- package/stream-api/node_modules/dunder-proto/.eslintrc +5 -0
- package/stream-api/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/dunder-proto/.nycrc +13 -0
- package/stream-api/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/stream-api/node_modules/dunder-proto/LICENSE +21 -0
- package/stream-api/node_modules/dunder-proto/README.md +54 -0
- package/stream-api/node_modules/dunder-proto/get.d.ts +5 -0
- package/stream-api/node_modules/dunder-proto/get.js +30 -0
- package/stream-api/node_modules/dunder-proto/package.json +76 -0
- package/stream-api/node_modules/dunder-proto/set.d.ts +5 -0
- package/stream-api/node_modules/dunder-proto/set.js +35 -0
- package/stream-api/node_modules/dunder-proto/test/get.js +34 -0
- package/stream-api/node_modules/dunder-proto/test/index.js +4 -0
- package/stream-api/node_modules/dunder-proto/test/set.js +50 -0
- package/stream-api/node_modules/dunder-proto/tsconfig.json +9 -0
- package/stream-api/node_modules/ee-first/LICENSE +22 -0
- package/stream-api/node_modules/ee-first/README.md +80 -0
- package/stream-api/node_modules/ee-first/index.js +95 -0
- package/stream-api/node_modules/ee-first/package.json +29 -0
- package/stream-api/node_modules/encodeurl/LICENSE +22 -0
- package/stream-api/node_modules/encodeurl/README.md +109 -0
- package/stream-api/node_modules/encodeurl/index.js +60 -0
- package/stream-api/node_modules/encodeurl/package.json +40 -0
- package/stream-api/node_modules/es-define-property/.eslintrc +13 -0
- package/stream-api/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/es-define-property/.nycrc +9 -0
- package/stream-api/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/stream-api/node_modules/es-define-property/LICENSE +21 -0
- package/stream-api/node_modules/es-define-property/README.md +49 -0
- package/stream-api/node_modules/es-define-property/index.d.ts +3 -0
- package/stream-api/node_modules/es-define-property/index.js +14 -0
- package/stream-api/node_modules/es-define-property/package.json +81 -0
- package/stream-api/node_modules/es-define-property/test/index.js +56 -0
- package/stream-api/node_modules/es-define-property/tsconfig.json +10 -0
- package/stream-api/node_modules/es-errors/.eslintrc +5 -0
- package/stream-api/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/es-errors/CHANGELOG.md +40 -0
- package/stream-api/node_modules/es-errors/LICENSE +21 -0
- package/stream-api/node_modules/es-errors/README.md +55 -0
- package/stream-api/node_modules/es-errors/eval.d.ts +3 -0
- package/stream-api/node_modules/es-errors/eval.js +4 -0
- package/stream-api/node_modules/es-errors/index.d.ts +3 -0
- package/stream-api/node_modules/es-errors/index.js +4 -0
- package/stream-api/node_modules/es-errors/package.json +80 -0
- package/stream-api/node_modules/es-errors/range.d.ts +3 -0
- package/stream-api/node_modules/es-errors/range.js +4 -0
- package/stream-api/node_modules/es-errors/ref.d.ts +3 -0
- package/stream-api/node_modules/es-errors/ref.js +4 -0
- package/stream-api/node_modules/es-errors/syntax.d.ts +3 -0
- package/stream-api/node_modules/es-errors/syntax.js +4 -0
- package/stream-api/node_modules/es-errors/test/index.js +19 -0
- package/stream-api/node_modules/es-errors/tsconfig.json +49 -0
- package/stream-api/node_modules/es-errors/type.d.ts +3 -0
- package/stream-api/node_modules/es-errors/type.js +4 -0
- package/stream-api/node_modules/es-errors/uri.d.ts +3 -0
- package/stream-api/node_modules/es-errors/uri.js +4 -0
- package/stream-api/node_modules/es-object-atoms/.eslintrc +16 -0
- package/stream-api/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/stream-api/node_modules/es-object-atoms/LICENSE +21 -0
- package/stream-api/node_modules/es-object-atoms/README.md +63 -0
- package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/stream-api/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/stream-api/node_modules/es-object-atoms/ToObject.js +10 -0
- package/stream-api/node_modules/es-object-atoms/index.d.ts +3 -0
- package/stream-api/node_modules/es-object-atoms/index.js +4 -0
- package/stream-api/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/stream-api/node_modules/es-object-atoms/isObject.js +6 -0
- package/stream-api/node_modules/es-object-atoms/package.json +80 -0
- package/stream-api/node_modules/es-object-atoms/test/index.js +38 -0
- package/stream-api/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/stream-api/node_modules/escape-html/LICENSE +24 -0
- package/stream-api/node_modules/escape-html/Readme.md +43 -0
- package/stream-api/node_modules/escape-html/index.js +78 -0
- package/stream-api/node_modules/escape-html/package.json +24 -0
- package/stream-api/node_modules/etag/HISTORY.md +83 -0
- package/stream-api/node_modules/etag/LICENSE +22 -0
- package/stream-api/node_modules/etag/README.md +159 -0
- package/stream-api/node_modules/etag/index.js +131 -0
- package/stream-api/node_modules/etag/package.json +47 -0
- package/stream-api/node_modules/express/History.md +3858 -0
- package/stream-api/node_modules/express/LICENSE +24 -0
- package/stream-api/node_modules/express/Readme.md +266 -0
- package/stream-api/node_modules/express/index.js +11 -0
- package/stream-api/node_modules/express/lib/application.js +631 -0
- package/stream-api/node_modules/express/lib/express.js +81 -0
- package/stream-api/node_modules/express/lib/request.js +515 -0
- package/stream-api/node_modules/express/lib/response.js +1039 -0
- package/stream-api/node_modules/express/lib/utils.js +269 -0
- package/stream-api/node_modules/express/lib/view.js +205 -0
- package/stream-api/node_modules/express/package.json +98 -0
- package/stream-api/node_modules/finalhandler/HISTORY.md +233 -0
- package/stream-api/node_modules/finalhandler/LICENSE +22 -0
- package/stream-api/node_modules/finalhandler/README.md +147 -0
- package/stream-api/node_modules/finalhandler/index.js +293 -0
- package/stream-api/node_modules/finalhandler/package.json +43 -0
- package/stream-api/node_modules/forwarded/HISTORY.md +21 -0
- package/stream-api/node_modules/forwarded/LICENSE +22 -0
- package/stream-api/node_modules/forwarded/README.md +57 -0
- package/stream-api/node_modules/forwarded/index.js +90 -0
- package/stream-api/node_modules/forwarded/package.json +45 -0
- package/stream-api/node_modules/fresh/HISTORY.md +80 -0
- package/stream-api/node_modules/fresh/LICENSE +23 -0
- package/stream-api/node_modules/fresh/README.md +117 -0
- package/stream-api/node_modules/fresh/index.js +136 -0
- package/stream-api/node_modules/fresh/package.json +46 -0
- package/stream-api/node_modules/function-bind/.eslintrc +21 -0
- package/stream-api/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/stream-api/node_modules/function-bind/.nycrc +13 -0
- package/stream-api/node_modules/function-bind/CHANGELOG.md +136 -0
- package/stream-api/node_modules/function-bind/LICENSE +20 -0
- package/stream-api/node_modules/function-bind/README.md +46 -0
- package/stream-api/node_modules/function-bind/implementation.js +84 -0
- package/stream-api/node_modules/function-bind/index.js +5 -0
- package/stream-api/node_modules/function-bind/package.json +87 -0
- package/stream-api/node_modules/function-bind/test/.eslintrc +9 -0
- package/stream-api/node_modules/function-bind/test/index.js +252 -0
- package/stream-api/node_modules/get-intrinsic/.eslintrc +42 -0
- package/stream-api/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/get-intrinsic/.nycrc +9 -0
- package/stream-api/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/stream-api/node_modules/get-intrinsic/LICENSE +21 -0
- package/stream-api/node_modules/get-intrinsic/README.md +71 -0
- package/stream-api/node_modules/get-intrinsic/index.js +378 -0
- package/stream-api/node_modules/get-intrinsic/package.json +97 -0
- package/stream-api/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/stream-api/node_modules/get-proto/.eslintrc +10 -0
- package/stream-api/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/get-proto/.nycrc +9 -0
- package/stream-api/node_modules/get-proto/CHANGELOG.md +21 -0
- package/stream-api/node_modules/get-proto/LICENSE +21 -0
- package/stream-api/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/stream-api/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/stream-api/node_modules/get-proto/README.md +50 -0
- package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/stream-api/node_modules/get-proto/index.d.ts +5 -0
- package/stream-api/node_modules/get-proto/index.js +27 -0
- package/stream-api/node_modules/get-proto/package.json +81 -0
- package/stream-api/node_modules/get-proto/test/index.js +68 -0
- package/stream-api/node_modules/get-proto/tsconfig.json +9 -0
- package/stream-api/node_modules/gopd/.eslintrc +16 -0
- package/stream-api/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/gopd/CHANGELOG.md +45 -0
- package/stream-api/node_modules/gopd/LICENSE +21 -0
- package/stream-api/node_modules/gopd/README.md +40 -0
- package/stream-api/node_modules/gopd/gOPD.d.ts +1 -0
- package/stream-api/node_modules/gopd/gOPD.js +4 -0
- package/stream-api/node_modules/gopd/index.d.ts +5 -0
- package/stream-api/node_modules/gopd/index.js +15 -0
- package/stream-api/node_modules/gopd/package.json +77 -0
- package/stream-api/node_modules/gopd/test/index.js +36 -0
- package/stream-api/node_modules/gopd/tsconfig.json +9 -0
- package/stream-api/node_modules/has-symbols/.eslintrc +11 -0
- package/stream-api/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/has-symbols/.nycrc +9 -0
- package/stream-api/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/stream-api/node_modules/has-symbols/LICENSE +21 -0
- package/stream-api/node_modules/has-symbols/README.md +46 -0
- package/stream-api/node_modules/has-symbols/index.d.ts +3 -0
- package/stream-api/node_modules/has-symbols/index.js +14 -0
- package/stream-api/node_modules/has-symbols/package.json +111 -0
- package/stream-api/node_modules/has-symbols/shams.d.ts +3 -0
- package/stream-api/node_modules/has-symbols/shams.js +45 -0
- package/stream-api/node_modules/has-symbols/test/index.js +22 -0
- package/stream-api/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/stream-api/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/stream-api/node_modules/has-symbols/test/tests.js +58 -0
- package/stream-api/node_modules/has-symbols/tsconfig.json +10 -0
- package/stream-api/node_modules/hasown/.eslintrc +5 -0
- package/stream-api/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/hasown/.nycrc +13 -0
- package/stream-api/node_modules/hasown/CHANGELOG.md +40 -0
- package/stream-api/node_modules/hasown/LICENSE +21 -0
- package/stream-api/node_modules/hasown/README.md +40 -0
- package/stream-api/node_modules/hasown/index.d.ts +3 -0
- package/stream-api/node_modules/hasown/index.js +8 -0
- package/stream-api/node_modules/hasown/package.json +92 -0
- package/stream-api/node_modules/hasown/tsconfig.json +6 -0
- package/stream-api/node_modules/http-errors/HISTORY.md +186 -0
- package/stream-api/node_modules/http-errors/LICENSE +23 -0
- package/stream-api/node_modules/http-errors/README.md +169 -0
- package/stream-api/node_modules/http-errors/index.js +290 -0
- package/stream-api/node_modules/http-errors/package.json +54 -0
- package/stream-api/node_modules/iconv-lite/Changelog.md +236 -0
- package/stream-api/node_modules/iconv-lite/LICENSE +21 -0
- package/stream-api/node_modules/iconv-lite/README.md +138 -0
- package/stream-api/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/stream-api/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/stream-api/node_modules/iconv-lite/encodings/index.js +23 -0
- package/stream-api/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/stream-api/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/stream-api/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/stream-api/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/stream-api/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/stream-api/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/stream-api/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/stream-api/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/stream-api/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/stream-api/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/stream-api/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/stream-api/node_modules/iconv-lite/lib/index.js +183 -0
- package/stream-api/node_modules/iconv-lite/lib/streams.js +105 -0
- package/stream-api/node_modules/iconv-lite/package.json +59 -0
- package/stream-api/node_modules/inherits/LICENSE +16 -0
- package/stream-api/node_modules/inherits/README.md +42 -0
- package/stream-api/node_modules/inherits/inherits.js +9 -0
- package/stream-api/node_modules/inherits/inherits_browser.js +27 -0
- package/stream-api/node_modules/inherits/package.json +29 -0
- package/stream-api/node_modules/ipaddr.js/LICENSE +19 -0
- package/stream-api/node_modules/ipaddr.js/README.md +233 -0
- package/stream-api/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/stream-api/node_modules/ipaddr.js/package.json +35 -0
- package/stream-api/node_modules/is-promise/LICENSE +19 -0
- package/stream-api/node_modules/is-promise/index.d.ts +2 -0
- package/stream-api/node_modules/is-promise/index.js +6 -0
- package/stream-api/node_modules/is-promise/index.mjs +3 -0
- package/stream-api/node_modules/is-promise/package.json +30 -0
- package/stream-api/node_modules/is-promise/readme.md +33 -0
- package/stream-api/node_modules/math-intrinsics/.eslintrc +16 -0
- package/stream-api/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/stream-api/node_modules/math-intrinsics/LICENSE +21 -0
- package/stream-api/node_modules/math-intrinsics/README.md +50 -0
- package/stream-api/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/abs.js +4 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/stream-api/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/floor.js +4 -0
- package/stream-api/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/isFinite.js +12 -0
- package/stream-api/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/isInteger.js +16 -0
- package/stream-api/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/isNaN.js +6 -0
- package/stream-api/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/stream-api/node_modules/math-intrinsics/max.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/max.js +4 -0
- package/stream-api/node_modules/math-intrinsics/min.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/min.js +4 -0
- package/stream-api/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/mod.js +9 -0
- package/stream-api/node_modules/math-intrinsics/package.json +86 -0
- package/stream-api/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/pow.js +4 -0
- package/stream-api/node_modules/math-intrinsics/round.d.ts +1 -0
- package/stream-api/node_modules/math-intrinsics/round.js +4 -0
- package/stream-api/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/stream-api/node_modules/math-intrinsics/sign.js +11 -0
- package/stream-api/node_modules/math-intrinsics/test/index.js +192 -0
- package/stream-api/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/stream-api/node_modules/media-typer/HISTORY.md +50 -0
- package/stream-api/node_modules/media-typer/LICENSE +22 -0
- package/stream-api/node_modules/media-typer/README.md +93 -0
- package/stream-api/node_modules/media-typer/index.js +143 -0
- package/stream-api/node_modules/media-typer/package.json +33 -0
- package/stream-api/node_modules/merge-descriptors/index.d.ts +11 -0
- package/stream-api/node_modules/merge-descriptors/index.js +26 -0
- package/stream-api/node_modules/merge-descriptors/license +11 -0
- package/stream-api/node_modules/merge-descriptors/package.json +50 -0
- package/stream-api/node_modules/merge-descriptors/readme.md +55 -0
- package/stream-api/node_modules/mime-db/HISTORY.md +541 -0
- package/stream-api/node_modules/mime-db/LICENSE +23 -0
- package/stream-api/node_modules/mime-db/README.md +109 -0
- package/stream-api/node_modules/mime-db/db.json +9342 -0
- package/stream-api/node_modules/mime-db/index.js +12 -0
- package/stream-api/node_modules/mime-db/package.json +56 -0
- package/stream-api/node_modules/mime-types/HISTORY.md +428 -0
- package/stream-api/node_modules/mime-types/LICENSE +23 -0
- package/stream-api/node_modules/mime-types/README.md +126 -0
- package/stream-api/node_modules/mime-types/index.js +211 -0
- package/stream-api/node_modules/mime-types/mimeScore.js +57 -0
- package/stream-api/node_modules/mime-types/package.json +49 -0
- package/stream-api/node_modules/ms/index.js +162 -0
- package/stream-api/node_modules/ms/license.md +21 -0
- package/stream-api/node_modules/ms/package.json +38 -0
- package/stream-api/node_modules/ms/readme.md +59 -0
- package/stream-api/node_modules/negotiator/HISTORY.md +114 -0
- package/stream-api/node_modules/negotiator/LICENSE +24 -0
- package/stream-api/node_modules/negotiator/README.md +212 -0
- package/stream-api/node_modules/negotiator/index.js +83 -0
- package/stream-api/node_modules/negotiator/lib/charset.js +169 -0
- package/stream-api/node_modules/negotiator/lib/encoding.js +205 -0
- package/stream-api/node_modules/negotiator/lib/language.js +179 -0
- package/stream-api/node_modules/negotiator/lib/mediaType.js +294 -0
- package/stream-api/node_modules/negotiator/package.json +43 -0
- package/stream-api/node_modules/object-inspect/.eslintrc +53 -0
- package/stream-api/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/object-inspect/.nycrc +13 -0
- package/stream-api/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/stream-api/node_modules/object-inspect/LICENSE +21 -0
- package/stream-api/node_modules/object-inspect/example/all.js +23 -0
- package/stream-api/node_modules/object-inspect/example/circular.js +6 -0
- package/stream-api/node_modules/object-inspect/example/fn.js +5 -0
- package/stream-api/node_modules/object-inspect/example/inspect.js +10 -0
- package/stream-api/node_modules/object-inspect/index.js +544 -0
- package/stream-api/node_modules/object-inspect/package-support.json +20 -0
- package/stream-api/node_modules/object-inspect/package.json +105 -0
- package/stream-api/node_modules/object-inspect/readme.markdown +84 -0
- package/stream-api/node_modules/object-inspect/test/bigint.js +58 -0
- package/stream-api/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/stream-api/node_modules/object-inspect/test/circular.js +16 -0
- package/stream-api/node_modules/object-inspect/test/deep.js +12 -0
- package/stream-api/node_modules/object-inspect/test/element.js +53 -0
- package/stream-api/node_modules/object-inspect/test/err.js +48 -0
- package/stream-api/node_modules/object-inspect/test/fakes.js +29 -0
- package/stream-api/node_modules/object-inspect/test/fn.js +76 -0
- package/stream-api/node_modules/object-inspect/test/global.js +17 -0
- package/stream-api/node_modules/object-inspect/test/has.js +15 -0
- package/stream-api/node_modules/object-inspect/test/holes.js +15 -0
- package/stream-api/node_modules/object-inspect/test/indent-option.js +271 -0
- package/stream-api/node_modules/object-inspect/test/inspect.js +139 -0
- package/stream-api/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/stream-api/node_modules/object-inspect/test/number.js +58 -0
- package/stream-api/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/stream-api/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/stream-api/node_modules/object-inspect/test/undef.js +12 -0
- package/stream-api/node_modules/object-inspect/test/values.js +261 -0
- package/stream-api/node_modules/object-inspect/test-core-js.js +26 -0
- package/stream-api/node_modules/object-inspect/util.inspect.js +1 -0
- package/stream-api/node_modules/on-finished/HISTORY.md +98 -0
- package/stream-api/node_modules/on-finished/LICENSE +23 -0
- package/stream-api/node_modules/on-finished/README.md +162 -0
- package/stream-api/node_modules/on-finished/index.js +234 -0
- package/stream-api/node_modules/on-finished/package.json +39 -0
- package/stream-api/node_modules/once/LICENSE +15 -0
- package/stream-api/node_modules/once/README.md +79 -0
- package/stream-api/node_modules/once/once.js +42 -0
- package/stream-api/node_modules/once/package.json +33 -0
- package/stream-api/node_modules/parseurl/HISTORY.md +58 -0
- package/stream-api/node_modules/parseurl/LICENSE +24 -0
- package/stream-api/node_modules/parseurl/README.md +133 -0
- package/stream-api/node_modules/parseurl/index.js +158 -0
- package/stream-api/node_modules/parseurl/package.json +40 -0
- package/stream-api/node_modules/path-to-regexp/LICENSE +21 -0
- package/stream-api/node_modules/path-to-regexp/Readme.md +224 -0
- package/stream-api/node_modules/path-to-regexp/dist/index.d.ts +144 -0
- package/stream-api/node_modules/path-to-regexp/dist/index.js +409 -0
- package/stream-api/node_modules/path-to-regexp/dist/index.js.map +1 -0
- package/stream-api/node_modules/path-to-regexp/package.json +64 -0
- package/stream-api/node_modules/proxy-addr/HISTORY.md +161 -0
- package/stream-api/node_modules/proxy-addr/LICENSE +22 -0
- package/stream-api/node_modules/proxy-addr/README.md +139 -0
- package/stream-api/node_modules/proxy-addr/index.js +327 -0
- package/stream-api/node_modules/proxy-addr/package.json +47 -0
- package/stream-api/node_modules/qs/.editorconfig +46 -0
- package/stream-api/node_modules/qs/.eslintrc +39 -0
- package/stream-api/node_modules/qs/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/qs/.nycrc +13 -0
- package/stream-api/node_modules/qs/CHANGELOG.md +622 -0
- package/stream-api/node_modules/qs/LICENSE.md +29 -0
- package/stream-api/node_modules/qs/README.md +733 -0
- package/stream-api/node_modules/qs/dist/qs.js +141 -0
- package/stream-api/node_modules/qs/lib/formats.js +23 -0
- package/stream-api/node_modules/qs/lib/index.js +11 -0
- package/stream-api/node_modules/qs/lib/parse.js +328 -0
- package/stream-api/node_modules/qs/lib/stringify.js +356 -0
- package/stream-api/node_modules/qs/lib/utils.js +268 -0
- package/stream-api/node_modules/qs/package.json +93 -0
- package/stream-api/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/stream-api/node_modules/qs/test/parse.js +1276 -0
- package/stream-api/node_modules/qs/test/stringify.js +1306 -0
- package/stream-api/node_modules/qs/test/utils.js +262 -0
- package/stream-api/node_modules/range-parser/HISTORY.md +56 -0
- package/stream-api/node_modules/range-parser/LICENSE +23 -0
- package/stream-api/node_modules/range-parser/README.md +84 -0
- package/stream-api/node_modules/range-parser/index.js +162 -0
- package/stream-api/node_modules/range-parser/package.json +44 -0
- package/stream-api/node_modules/raw-body/LICENSE +22 -0
- package/stream-api/node_modules/raw-body/README.md +223 -0
- package/stream-api/node_modules/raw-body/index.d.ts +85 -0
- package/stream-api/node_modules/raw-body/index.js +336 -0
- package/stream-api/node_modules/raw-body/package.json +46 -0
- package/stream-api/node_modules/router/HISTORY.md +228 -0
- package/stream-api/node_modules/router/LICENSE +23 -0
- package/stream-api/node_modules/router/README.md +416 -0
- package/stream-api/node_modules/router/index.js +748 -0
- package/stream-api/node_modules/router/lib/layer.js +247 -0
- package/stream-api/node_modules/router/lib/route.js +242 -0
- package/stream-api/node_modules/router/package.json +44 -0
- package/stream-api/node_modules/safer-buffer/LICENSE +21 -0
- package/stream-api/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/stream-api/node_modules/safer-buffer/Readme.md +156 -0
- package/stream-api/node_modules/safer-buffer/dangerous.js +58 -0
- package/stream-api/node_modules/safer-buffer/package.json +34 -0
- package/stream-api/node_modules/safer-buffer/safer.js +77 -0
- package/stream-api/node_modules/safer-buffer/tests.js +406 -0
- package/stream-api/node_modules/send/HISTORY.md +580 -0
- package/stream-api/node_modules/send/LICENSE +23 -0
- package/stream-api/node_modules/send/README.md +317 -0
- package/stream-api/node_modules/send/index.js +997 -0
- package/stream-api/node_modules/send/package.json +60 -0
- package/stream-api/node_modules/serve-static/HISTORY.md +516 -0
- package/stream-api/node_modules/serve-static/LICENSE +25 -0
- package/stream-api/node_modules/serve-static/README.md +253 -0
- package/stream-api/node_modules/serve-static/index.js +208 -0
- package/stream-api/node_modules/serve-static/package.json +41 -0
- package/stream-api/node_modules/setprototypeof/LICENSE +13 -0
- package/stream-api/node_modules/setprototypeof/README.md +31 -0
- package/stream-api/node_modules/setprototypeof/index.d.ts +2 -0
- package/stream-api/node_modules/setprototypeof/index.js +17 -0
- package/stream-api/node_modules/setprototypeof/package.json +38 -0
- package/stream-api/node_modules/setprototypeof/test/index.js +24 -0
- package/stream-api/node_modules/short-uuid/.codeclimate.yml +21 -0
- package/stream-api/node_modules/short-uuid/.csslintrc +2 -0
- package/stream-api/node_modules/short-uuid/.editorconfig +11 -0
- package/stream-api/node_modules/short-uuid/.eslintrc.js +15 -0
- package/stream-api/node_modules/short-uuid/.github/workflows/node.js.yml +31 -0
- package/stream-api/node_modules/short-uuid/.nyc_output/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +1 -0
- package/stream-api/node_modules/short-uuid/.nyc_output/3f261446-c11a-4630-b995-4f5dbc1395ef.json +1 -0
- package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +1 -0
- package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3f261446-c11a-4630-b995-4f5dbc1395ef.json +1 -0
- package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/index.json +1 -0
- package/stream-api/node_modules/short-uuid/CHANGELOG.md +237 -0
- package/stream-api/node_modules/short-uuid/LICENSE +21 -0
- package/stream-api/node_modules/short-uuid/README.md +128 -0
- package/stream-api/node_modules/short-uuid/index.d.ts +51 -0
- package/stream-api/node_modules/short-uuid/index.js +157 -0
- package/stream-api/node_modules/short-uuid/package.json +41 -0
- package/stream-api/node_modules/short-uuid/revisions.md +193 -0
- package/stream-api/node_modules/short-uuid/test/index.js +339 -0
- package/stream-api/node_modules/short-uuid/test/uuid25examples.js +74 -0
- package/stream-api/node_modules/side-channel/.editorconfig +9 -0
- package/stream-api/node_modules/side-channel/.eslintrc +12 -0
- package/stream-api/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/side-channel/.nycrc +13 -0
- package/stream-api/node_modules/side-channel/CHANGELOG.md +110 -0
- package/stream-api/node_modules/side-channel/LICENSE +21 -0
- package/stream-api/node_modules/side-channel/README.md +61 -0
- package/stream-api/node_modules/side-channel/index.d.ts +14 -0
- package/stream-api/node_modules/side-channel/index.js +43 -0
- package/stream-api/node_modules/side-channel/package.json +85 -0
- package/stream-api/node_modules/side-channel/test/index.js +104 -0
- package/stream-api/node_modules/side-channel/tsconfig.json +9 -0
- package/stream-api/node_modules/side-channel-list/.editorconfig +9 -0
- package/stream-api/node_modules/side-channel-list/.eslintrc +11 -0
- package/stream-api/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/side-channel-list/.nycrc +13 -0
- package/stream-api/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/stream-api/node_modules/side-channel-list/LICENSE +21 -0
- package/stream-api/node_modules/side-channel-list/README.md +62 -0
- package/stream-api/node_modules/side-channel-list/index.d.ts +13 -0
- package/stream-api/node_modules/side-channel-list/index.js +113 -0
- package/stream-api/node_modules/side-channel-list/list.d.ts +14 -0
- package/stream-api/node_modules/side-channel-list/package.json +77 -0
- package/stream-api/node_modules/side-channel-list/test/index.js +104 -0
- package/stream-api/node_modules/side-channel-list/tsconfig.json +9 -0
- package/stream-api/node_modules/side-channel-map/.editorconfig +9 -0
- package/stream-api/node_modules/side-channel-map/.eslintrc +11 -0
- package/stream-api/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/side-channel-map/.nycrc +13 -0
- package/stream-api/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/stream-api/node_modules/side-channel-map/LICENSE +21 -0
- package/stream-api/node_modules/side-channel-map/README.md +62 -0
- package/stream-api/node_modules/side-channel-map/index.d.ts +15 -0
- package/stream-api/node_modules/side-channel-map/index.js +68 -0
- package/stream-api/node_modules/side-channel-map/package.json +80 -0
- package/stream-api/node_modules/side-channel-map/test/index.js +114 -0
- package/stream-api/node_modules/side-channel-map/tsconfig.json +9 -0
- package/stream-api/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/stream-api/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/stream-api/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/stream-api/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/stream-api/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/stream-api/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/stream-api/node_modules/side-channel-weakmap/README.md +62 -0
- package/stream-api/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/stream-api/node_modules/side-channel-weakmap/index.js +84 -0
- package/stream-api/node_modules/side-channel-weakmap/package.json +87 -0
- package/stream-api/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/stream-api/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/stream-api/node_modules/statuses/HISTORY.md +87 -0
- package/stream-api/node_modules/statuses/LICENSE +23 -0
- package/stream-api/node_modules/statuses/README.md +139 -0
- package/stream-api/node_modules/statuses/codes.json +65 -0
- package/stream-api/node_modules/statuses/index.js +146 -0
- package/stream-api/node_modules/statuses/package.json +49 -0
- package/stream-api/node_modules/toidentifier/HISTORY.md +9 -0
- package/stream-api/node_modules/toidentifier/LICENSE +21 -0
- package/stream-api/node_modules/toidentifier/README.md +61 -0
- package/stream-api/node_modules/toidentifier/index.js +32 -0
- package/stream-api/node_modules/toidentifier/package.json +38 -0
- package/stream-api/node_modules/type-is/HISTORY.md +292 -0
- package/stream-api/node_modules/type-is/LICENSE +23 -0
- package/stream-api/node_modules/type-is/README.md +198 -0
- package/stream-api/node_modules/type-is/index.js +250 -0
- package/stream-api/node_modules/type-is/package.json +47 -0
- package/stream-api/node_modules/undici-types/LICENSE +21 -0
- package/stream-api/node_modules/undici-types/README.md +6 -0
- package/stream-api/node_modules/undici-types/agent.d.ts +32 -0
- package/stream-api/node_modules/undici-types/api.d.ts +43 -0
- package/stream-api/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/stream-api/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/stream-api/node_modules/undici-types/cache.d.ts +36 -0
- package/stream-api/node_modules/undici-types/client-stats.d.ts +15 -0
- package/stream-api/node_modules/undici-types/client.d.ts +108 -0
- package/stream-api/node_modules/undici-types/connector.d.ts +34 -0
- package/stream-api/node_modules/undici-types/content-type.d.ts +21 -0
- package/stream-api/node_modules/undici-types/cookies.d.ts +30 -0
- package/stream-api/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/stream-api/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/stream-api/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/stream-api/node_modules/undici-types/errors.d.ts +161 -0
- package/stream-api/node_modules/undici-types/eventsource.d.ts +66 -0
- package/stream-api/node_modules/undici-types/fetch.d.ts +211 -0
- package/stream-api/node_modules/undici-types/formdata.d.ts +108 -0
- package/stream-api/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/stream-api/node_modules/undici-types/global-origin.d.ts +7 -0
- package/stream-api/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/stream-api/node_modules/undici-types/handlers.d.ts +15 -0
- package/stream-api/node_modules/undici-types/header.d.ts +160 -0
- package/stream-api/node_modules/undici-types/index.d.ts +80 -0
- package/stream-api/node_modules/undici-types/interceptors.d.ts +39 -0
- package/stream-api/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/stream-api/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/stream-api/node_modules/undici-types/mock-client.d.ts +27 -0
- package/stream-api/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/stream-api/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/stream-api/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/stream-api/node_modules/undici-types/package.json +55 -0
- package/stream-api/node_modules/undici-types/patch.d.ts +29 -0
- package/stream-api/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/stream-api/node_modules/undici-types/pool.d.ts +41 -0
- package/stream-api/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/stream-api/node_modules/undici-types/readable.d.ts +68 -0
- package/stream-api/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/stream-api/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/stream-api/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/stream-api/node_modules/undici-types/util.d.ts +18 -0
- package/stream-api/node_modules/undici-types/utility.d.ts +7 -0
- package/stream-api/node_modules/undici-types/webidl.d.ts +341 -0
- package/stream-api/node_modules/undici-types/websocket.d.ts +186 -0
- package/stream-api/node_modules/unpipe/HISTORY.md +4 -0
- package/stream-api/node_modules/unpipe/LICENSE +22 -0
- package/stream-api/node_modules/unpipe/README.md +43 -0
- package/stream-api/node_modules/unpipe/index.js +69 -0
- package/stream-api/node_modules/unpipe/package.json +27 -0
- package/stream-api/node_modules/uuid/CHANGELOG.md +274 -0
- package/stream-api/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/stream-api/node_modules/uuid/LICENSE.md +9 -0
- package/stream-api/node_modules/uuid/README.md +466 -0
- package/stream-api/node_modules/uuid/dist/bin/uuid +2 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/stream-api/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/stream-api/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/stream-api/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/stream-api/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/stream-api/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/stream-api/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/stream-api/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/stream-api/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/stream-api/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/stream-api/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/stream-api/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/stream-api/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/stream-api/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/stream-api/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/stream-api/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/stream-api/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/stream-api/node_modules/uuid/dist/index.js +79 -0
- package/stream-api/node_modules/uuid/dist/md5-browser.js +223 -0
- package/stream-api/node_modules/uuid/dist/md5.js +23 -0
- package/stream-api/node_modules/uuid/dist/native-browser.js +11 -0
- package/stream-api/node_modules/uuid/dist/native.js +15 -0
- package/stream-api/node_modules/uuid/dist/nil.js +8 -0
- package/stream-api/node_modules/uuid/dist/parse.js +45 -0
- package/stream-api/node_modules/uuid/dist/regex.js +8 -0
- package/stream-api/node_modules/uuid/dist/rng-browser.js +25 -0
- package/stream-api/node_modules/uuid/dist/rng.js +24 -0
- package/stream-api/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/stream-api/node_modules/uuid/dist/sha1.js +23 -0
- package/stream-api/node_modules/uuid/dist/stringify.js +44 -0
- package/stream-api/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/stream-api/node_modules/uuid/dist/v1.js +107 -0
- package/stream-api/node_modules/uuid/dist/v3.js +16 -0
- package/stream-api/node_modules/uuid/dist/v35.js +80 -0
- package/stream-api/node_modules/uuid/dist/v4.js +43 -0
- package/stream-api/node_modules/uuid/dist/v5.js +16 -0
- package/stream-api/node_modules/uuid/dist/validate.js +17 -0
- package/stream-api/node_modules/uuid/dist/version.js +21 -0
- package/stream-api/node_modules/uuid/package.json +135 -0
- package/stream-api/node_modules/uuid/wrapper.mjs +10 -0
- package/stream-api/node_modules/vary/HISTORY.md +39 -0
- package/stream-api/node_modules/vary/LICENSE +22 -0
- package/stream-api/node_modules/vary/README.md +101 -0
- package/stream-api/node_modules/vary/index.js +149 -0
- package/stream-api/node_modules/vary/package.json +43 -0
- package/stream-api/node_modules/wrappy/LICENSE +15 -0
- package/stream-api/node_modules/wrappy/README.md +36 -0
- package/stream-api/node_modules/wrappy/package.json +29 -0
- package/stream-api/node_modules/wrappy/wrappy.js +33 -0
- package/stream-api/package-lock.json +985 -0
- package/stream-api/package.json +25 -0
- package/stream-api/tsconfig.json +10 -0
|
@@ -0,0 +1,1113 @@
|
|
|
1
|
+
// Type definitions for commander
|
|
2
|
+
// Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>
|
|
3
|
+
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
|
|
6
|
+
// This is a trick to encourage editor to suggest the known literals while still
|
|
7
|
+
// allowing any BaseType value.
|
|
8
|
+
// References:
|
|
9
|
+
// - https://github.com/microsoft/TypeScript/issues/29729
|
|
10
|
+
// - https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts
|
|
11
|
+
// - https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
|
|
12
|
+
type LiteralUnion<LiteralType, BaseType extends string | number> =
|
|
13
|
+
| LiteralType
|
|
14
|
+
| (BaseType & Record<never, never>);
|
|
15
|
+
|
|
16
|
+
export class CommanderError extends Error {
|
|
17
|
+
code: string;
|
|
18
|
+
exitCode: number;
|
|
19
|
+
message: string;
|
|
20
|
+
nestedError?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Constructs the CommanderError class
|
|
24
|
+
* @param exitCode - suggested exit code which could be used with process.exit
|
|
25
|
+
* @param code - an id string representing the error
|
|
26
|
+
* @param message - human-readable description of the error
|
|
27
|
+
*/
|
|
28
|
+
constructor(exitCode: number, code: string, message: string);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class InvalidArgumentError extends CommanderError {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs the InvalidArgumentError class
|
|
34
|
+
* @param message - explanation of why argument is invalid
|
|
35
|
+
*/
|
|
36
|
+
constructor(message: string);
|
|
37
|
+
}
|
|
38
|
+
export { InvalidArgumentError as InvalidOptionArgumentError }; // deprecated old name
|
|
39
|
+
|
|
40
|
+
export interface ErrorOptions {
|
|
41
|
+
// optional parameter for error()
|
|
42
|
+
/** an id string representing the error */
|
|
43
|
+
code?: string;
|
|
44
|
+
/** suggested exit code which could be used with process.exit */
|
|
45
|
+
exitCode?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class Argument {
|
|
49
|
+
description: string;
|
|
50
|
+
required: boolean;
|
|
51
|
+
variadic: boolean;
|
|
52
|
+
defaultValue?: any;
|
|
53
|
+
defaultValueDescription?: string;
|
|
54
|
+
parseArg?: <T>(value: string, previous: T) => T;
|
|
55
|
+
argChoices?: string[];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Initialize a new command argument with the given name and description.
|
|
59
|
+
* The default is that the argument is required, and you can explicitly
|
|
60
|
+
* indicate this with <> around the name. Put [] around the name for an optional argument.
|
|
61
|
+
*/
|
|
62
|
+
constructor(arg: string, description?: string);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Return argument name.
|
|
66
|
+
*/
|
|
67
|
+
name(): string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
71
|
+
*/
|
|
72
|
+
default(value: unknown, description?: string): this;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Set the custom handler for processing CLI command arguments into argument values.
|
|
76
|
+
*/
|
|
77
|
+
argParser<T>(fn: (value: string, previous: T) => T): this;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Only allow argument value to be one of choices.
|
|
81
|
+
*/
|
|
82
|
+
choices(values: readonly string[]): this;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Make argument required.
|
|
86
|
+
*/
|
|
87
|
+
argRequired(): this;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Make argument optional.
|
|
91
|
+
*/
|
|
92
|
+
argOptional(): this;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export class Option {
|
|
96
|
+
flags: string;
|
|
97
|
+
description: string;
|
|
98
|
+
|
|
99
|
+
required: boolean; // A value must be supplied when the option is specified.
|
|
100
|
+
optional: boolean; // A value is optional when the option is specified.
|
|
101
|
+
variadic: boolean;
|
|
102
|
+
mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
|
|
103
|
+
short?: string;
|
|
104
|
+
long?: string;
|
|
105
|
+
negate: boolean;
|
|
106
|
+
defaultValue?: any;
|
|
107
|
+
defaultValueDescription?: string;
|
|
108
|
+
presetArg?: unknown;
|
|
109
|
+
envVar?: string;
|
|
110
|
+
parseArg?: <T>(value: string, previous: T) => T;
|
|
111
|
+
hidden: boolean;
|
|
112
|
+
argChoices?: string[];
|
|
113
|
+
helpGroupHeading?: string;
|
|
114
|
+
|
|
115
|
+
constructor(flags: string, description?: string);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
119
|
+
*/
|
|
120
|
+
default(value: unknown, description?: string): this;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Preset to use when option used without option-argument, especially optional but also boolean and negated.
|
|
124
|
+
* The custom processing (parseArg) is called.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* new Option('--color').default('GREYSCALE').preset('RGB');
|
|
129
|
+
* new Option('--donate [amount]').preset('20').argParser(parseFloat);
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
preset(arg: unknown): this;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Add option name(s) that conflict with this option.
|
|
136
|
+
* An error will be displayed if conflicting options are found during parsing.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* new Option('--rgb').conflicts('cmyk');
|
|
141
|
+
* new Option('--js').conflicts(['ts', 'jsx']);
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
conflicts(names: string | string[]): this;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Specify implied option values for when this option is set and the implied options are not.
|
|
148
|
+
*
|
|
149
|
+
* The custom processing (parseArg) is not called on the implied values.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* program
|
|
153
|
+
* .addOption(new Option('--log', 'write logging information to file'))
|
|
154
|
+
* .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));
|
|
155
|
+
*/
|
|
156
|
+
implies(optionValues: OptionValues): this;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Set environment variable to check for option value.
|
|
160
|
+
*
|
|
161
|
+
* An environment variables is only used if when processed the current option value is
|
|
162
|
+
* undefined, or the source of the current value is 'default' or 'config' or 'env'.
|
|
163
|
+
*/
|
|
164
|
+
env(name: string): this;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Set the custom handler for processing CLI option arguments into option values.
|
|
168
|
+
*/
|
|
169
|
+
argParser<T>(fn: (value: string, previous: T) => T): this;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Whether the option is mandatory and must have a value after parsing.
|
|
173
|
+
*/
|
|
174
|
+
makeOptionMandatory(mandatory?: boolean): this;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Hide option in help.
|
|
178
|
+
*/
|
|
179
|
+
hideHelp(hide?: boolean): this;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Only allow option value to be one of choices.
|
|
183
|
+
*/
|
|
184
|
+
choices(values: readonly string[]): this;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Return option name.
|
|
188
|
+
*/
|
|
189
|
+
name(): string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Return option name, in a camelcase format that can be used
|
|
193
|
+
* as an object attribute key.
|
|
194
|
+
*/
|
|
195
|
+
attributeName(): string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Set the help group heading.
|
|
199
|
+
*/
|
|
200
|
+
helpGroup(heading: string): this;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Return whether a boolean option.
|
|
204
|
+
*
|
|
205
|
+
* Options are one of boolean, negated, required argument, or optional argument.
|
|
206
|
+
*/
|
|
207
|
+
isBoolean(): boolean;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export class Help {
|
|
211
|
+
/** output helpWidth, long lines are wrapped to fit */
|
|
212
|
+
helpWidth?: number;
|
|
213
|
+
minWidthToWrap: number;
|
|
214
|
+
sortSubcommands: boolean;
|
|
215
|
+
sortOptions: boolean;
|
|
216
|
+
showGlobalOptions: boolean;
|
|
217
|
+
|
|
218
|
+
constructor();
|
|
219
|
+
|
|
220
|
+
/*
|
|
221
|
+
* prepareContext is called by Commander after applying overrides from `Command.configureHelp()`
|
|
222
|
+
* and just before calling `formatHelp()`.
|
|
223
|
+
*
|
|
224
|
+
* Commander just uses the helpWidth and the others are provided for subclasses.
|
|
225
|
+
*/
|
|
226
|
+
prepareContext(contextOptions: {
|
|
227
|
+
error?: boolean;
|
|
228
|
+
helpWidth?: number;
|
|
229
|
+
outputHasColors?: boolean;
|
|
230
|
+
}): void;
|
|
231
|
+
|
|
232
|
+
/** Get the command term to show in the list of subcommands. */
|
|
233
|
+
subcommandTerm(cmd: Command): string;
|
|
234
|
+
/** Get the command summary to show in the list of subcommands. */
|
|
235
|
+
subcommandDescription(cmd: Command): string;
|
|
236
|
+
/** Get the option term to show in the list of options. */
|
|
237
|
+
optionTerm(option: Option): string;
|
|
238
|
+
/** Get the option description to show in the list of options. */
|
|
239
|
+
optionDescription(option: Option): string;
|
|
240
|
+
/** Get the argument term to show in the list of arguments. */
|
|
241
|
+
argumentTerm(argument: Argument): string;
|
|
242
|
+
/** Get the argument description to show in the list of arguments. */
|
|
243
|
+
argumentDescription(argument: Argument): string;
|
|
244
|
+
|
|
245
|
+
/** Get the command usage to be displayed at the top of the built-in help. */
|
|
246
|
+
commandUsage(cmd: Command): string;
|
|
247
|
+
/** Get the description for the command. */
|
|
248
|
+
commandDescription(cmd: Command): string;
|
|
249
|
+
|
|
250
|
+
/** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */
|
|
251
|
+
visibleCommands(cmd: Command): Command[];
|
|
252
|
+
/** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */
|
|
253
|
+
visibleOptions(cmd: Command): Option[];
|
|
254
|
+
/** Get an array of the visible global options. (Not including help.) */
|
|
255
|
+
visibleGlobalOptions(cmd: Command): Option[];
|
|
256
|
+
/** Get an array of the arguments which have descriptions. */
|
|
257
|
+
visibleArguments(cmd: Command): Argument[];
|
|
258
|
+
|
|
259
|
+
/** Get the longest command term length. */
|
|
260
|
+
longestSubcommandTermLength(cmd: Command, helper: Help): number;
|
|
261
|
+
/** Get the longest option term length. */
|
|
262
|
+
longestOptionTermLength(cmd: Command, helper: Help): number;
|
|
263
|
+
/** Get the longest global option term length. */
|
|
264
|
+
longestGlobalOptionTermLength(cmd: Command, helper: Help): number;
|
|
265
|
+
/** Get the longest argument term length. */
|
|
266
|
+
longestArgumentTermLength(cmd: Command, helper: Help): number;
|
|
267
|
+
|
|
268
|
+
/** Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations. */
|
|
269
|
+
displayWidth(str: string): number;
|
|
270
|
+
|
|
271
|
+
/** Style the titles. Called with 'Usage:', 'Options:', etc. */
|
|
272
|
+
styleTitle(title: string): string;
|
|
273
|
+
|
|
274
|
+
/** Usage: <str> */
|
|
275
|
+
styleUsage(str: string): string;
|
|
276
|
+
/** Style for command name in usage string. */
|
|
277
|
+
styleCommandText(str: string): string;
|
|
278
|
+
|
|
279
|
+
styleCommandDescription(str: string): string;
|
|
280
|
+
styleOptionDescription(str: string): string;
|
|
281
|
+
styleSubcommandDescription(str: string): string;
|
|
282
|
+
styleArgumentDescription(str: string): string;
|
|
283
|
+
/** Base style used by descriptions. */
|
|
284
|
+
styleDescriptionText(str: string): string;
|
|
285
|
+
|
|
286
|
+
styleOptionTerm(str: string): string;
|
|
287
|
+
styleSubcommandTerm(str: string): string;
|
|
288
|
+
styleArgumentTerm(str: string): string;
|
|
289
|
+
|
|
290
|
+
/** Base style used in terms and usage for options. */
|
|
291
|
+
styleOptionText(str: string): string;
|
|
292
|
+
/** Base style used in terms and usage for subcommands. */
|
|
293
|
+
styleSubcommandText(str: string): string;
|
|
294
|
+
/** Base style used in terms and usage for arguments. */
|
|
295
|
+
styleArgumentText(str: string): string;
|
|
296
|
+
|
|
297
|
+
/** Calculate the pad width from the maximum term length. */
|
|
298
|
+
padWidth(cmd: Command, helper: Help): number;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Wrap a string at whitespace, preserving existing line breaks.
|
|
302
|
+
* Wrapping is skipped if the width is less than `minWidthToWrap`.
|
|
303
|
+
*/
|
|
304
|
+
boxWrap(str: string, width: number): string;
|
|
305
|
+
|
|
306
|
+
/** Detect manually wrapped and indented strings by checking for line break followed by whitespace. */
|
|
307
|
+
preformatted(str: string): boolean;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Format the "item", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.
|
|
311
|
+
*
|
|
312
|
+
* So "TTT", 5, "DDD DDDD DD DDD" might be formatted for this.helpWidth=17 like so:
|
|
313
|
+
* TTT DDD DDDD
|
|
314
|
+
* DD DDD
|
|
315
|
+
*/
|
|
316
|
+
formatItem(
|
|
317
|
+
term: string,
|
|
318
|
+
termWidth: number,
|
|
319
|
+
description: string,
|
|
320
|
+
helper: Help,
|
|
321
|
+
): string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Format a list of items, given a heading and an array of formatted items.
|
|
325
|
+
*/
|
|
326
|
+
formatItemList(heading: string, items: string[], helper: Help): string[];
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Group items by their help group heading.
|
|
330
|
+
*/
|
|
331
|
+
groupItems<T extends Command | Option>(
|
|
332
|
+
unsortedItems: T[],
|
|
333
|
+
visibleItems: T[],
|
|
334
|
+
getGroup: (item: T) => string,
|
|
335
|
+
): Map<string, T[]>;
|
|
336
|
+
|
|
337
|
+
/** Generate the built-in help text. */
|
|
338
|
+
formatHelp(cmd: Command, helper: Help): string;
|
|
339
|
+
}
|
|
340
|
+
export type HelpConfiguration = Partial<Help>;
|
|
341
|
+
|
|
342
|
+
export interface ParseOptions {
|
|
343
|
+
from: 'node' | 'electron' | 'user';
|
|
344
|
+
}
|
|
345
|
+
export interface HelpContext {
|
|
346
|
+
// optional parameter for .help() and .outputHelp()
|
|
347
|
+
error: boolean;
|
|
348
|
+
}
|
|
349
|
+
export interface AddHelpTextContext {
|
|
350
|
+
// passed to text function used with .addHelpText()
|
|
351
|
+
error: boolean;
|
|
352
|
+
command: Command;
|
|
353
|
+
}
|
|
354
|
+
export interface OutputConfiguration {
|
|
355
|
+
writeOut?(str: string): void;
|
|
356
|
+
writeErr?(str: string): void;
|
|
357
|
+
outputError?(str: string, write: (str: string) => void): void;
|
|
358
|
+
|
|
359
|
+
getOutHelpWidth?(): number;
|
|
360
|
+
getErrHelpWidth?(): number;
|
|
361
|
+
|
|
362
|
+
getOutHasColors?(): boolean;
|
|
363
|
+
getErrHasColors?(): boolean;
|
|
364
|
+
stripColor?(str: string): string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
|
|
368
|
+
export type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
|
|
369
|
+
// The source is a string so author can define their own too.
|
|
370
|
+
export type OptionValueSource =
|
|
371
|
+
| LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string>
|
|
372
|
+
| undefined;
|
|
373
|
+
|
|
374
|
+
export type OptionValues = Record<string, any>;
|
|
375
|
+
|
|
376
|
+
export class Command {
|
|
377
|
+
args: string[];
|
|
378
|
+
processedArgs: any[];
|
|
379
|
+
readonly commands: readonly Command[];
|
|
380
|
+
readonly options: readonly Option[];
|
|
381
|
+
readonly registeredArguments: readonly Argument[];
|
|
382
|
+
parent: Command | null;
|
|
383
|
+
|
|
384
|
+
constructor(name?: string);
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Set the program version to `str`.
|
|
388
|
+
*
|
|
389
|
+
* This method auto-registers the "-V, --version" flag
|
|
390
|
+
* which will print the version number when passed.
|
|
391
|
+
*
|
|
392
|
+
* You can optionally supply the flags and description to override the defaults.
|
|
393
|
+
*/
|
|
394
|
+
version(str: string, flags?: string, description?: string): this;
|
|
395
|
+
/**
|
|
396
|
+
* Get the program version.
|
|
397
|
+
*/
|
|
398
|
+
version(): string | undefined;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Define a command, implemented using an action handler.
|
|
402
|
+
*
|
|
403
|
+
* @remarks
|
|
404
|
+
* The command description is supplied using `.description`, not as a parameter to `.command`.
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* ```ts
|
|
408
|
+
* program
|
|
409
|
+
* .command('clone <source> [destination]')
|
|
410
|
+
* .description('clone a repository into a newly created directory')
|
|
411
|
+
* .action((source, destination) => {
|
|
412
|
+
* console.log('clone command called');
|
|
413
|
+
* });
|
|
414
|
+
* ```
|
|
415
|
+
*
|
|
416
|
+
* @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
|
|
417
|
+
* @param opts - configuration options
|
|
418
|
+
* @returns new command
|
|
419
|
+
*/
|
|
420
|
+
command(
|
|
421
|
+
nameAndArgs: string,
|
|
422
|
+
opts?: CommandOptions,
|
|
423
|
+
): ReturnType<this['createCommand']>;
|
|
424
|
+
/**
|
|
425
|
+
* Define a command, implemented in a separate executable file.
|
|
426
|
+
*
|
|
427
|
+
* @remarks
|
|
428
|
+
* The command description is supplied as the second parameter to `.command`.
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```ts
|
|
432
|
+
* program
|
|
433
|
+
* .command('start <service>', 'start named service')
|
|
434
|
+
* .command('stop [service]', 'stop named service, or all if no name supplied');
|
|
435
|
+
* ```
|
|
436
|
+
*
|
|
437
|
+
* @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
|
|
438
|
+
* @param description - description of executable command
|
|
439
|
+
* @param opts - configuration options
|
|
440
|
+
* @returns `this` command for chaining
|
|
441
|
+
*/
|
|
442
|
+
command(
|
|
443
|
+
nameAndArgs: string,
|
|
444
|
+
description: string,
|
|
445
|
+
opts?: ExecutableCommandOptions,
|
|
446
|
+
): this;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Factory routine to create a new unattached command.
|
|
450
|
+
*
|
|
451
|
+
* See .command() for creating an attached subcommand, which uses this routine to
|
|
452
|
+
* create the command. You can override createCommand to customise subcommands.
|
|
453
|
+
*/
|
|
454
|
+
createCommand(name?: string): Command;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Add a prepared subcommand.
|
|
458
|
+
*
|
|
459
|
+
* See .command() for creating an attached subcommand which inherits settings from its parent.
|
|
460
|
+
*
|
|
461
|
+
* @returns `this` command for chaining
|
|
462
|
+
*/
|
|
463
|
+
addCommand(cmd: Command, opts?: CommandOptions): this;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Factory routine to create a new unattached argument.
|
|
467
|
+
*
|
|
468
|
+
* See .argument() for creating an attached argument, which uses this routine to
|
|
469
|
+
* create the argument. You can override createArgument to return a custom argument.
|
|
470
|
+
*/
|
|
471
|
+
createArgument(name: string, description?: string): Argument;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Define argument syntax for command.
|
|
475
|
+
*
|
|
476
|
+
* The default is that the argument is required, and you can explicitly
|
|
477
|
+
* indicate this with <> around the name. Put [] around the name for an optional argument.
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```
|
|
481
|
+
* program.argument('<input-file>');
|
|
482
|
+
* program.argument('[output-file]');
|
|
483
|
+
* ```
|
|
484
|
+
*
|
|
485
|
+
* @returns `this` command for chaining
|
|
486
|
+
*/
|
|
487
|
+
argument<T>(
|
|
488
|
+
flags: string,
|
|
489
|
+
description: string,
|
|
490
|
+
parseArg: (value: string, previous: T) => T,
|
|
491
|
+
defaultValue?: T,
|
|
492
|
+
): this;
|
|
493
|
+
argument(name: string, description?: string, defaultValue?: unknown): this;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Define argument syntax for command, adding a prepared argument.
|
|
497
|
+
*
|
|
498
|
+
* @returns `this` command for chaining
|
|
499
|
+
*/
|
|
500
|
+
addArgument(arg: Argument): this;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Define argument syntax for command, adding multiple at once (without descriptions).
|
|
504
|
+
*
|
|
505
|
+
* See also .argument().
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* ```
|
|
509
|
+
* program.arguments('<cmd> [env]');
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @returns `this` command for chaining
|
|
513
|
+
*/
|
|
514
|
+
arguments(names: string): this;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Customise or override default help command. By default a help command is automatically added if your command has subcommands.
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```ts
|
|
521
|
+
* program.helpCommand('help [cmd]');
|
|
522
|
+
* program.helpCommand('help [cmd]', 'show help');
|
|
523
|
+
* program.helpCommand(false); // suppress default help command
|
|
524
|
+
* program.helpCommand(true); // add help command even if no subcommands
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
helpCommand(nameAndArgs: string, description?: string): this;
|
|
528
|
+
helpCommand(enable: boolean): this;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Add prepared custom help command.
|
|
532
|
+
*/
|
|
533
|
+
addHelpCommand(cmd: Command): this;
|
|
534
|
+
/** @deprecated since v12, instead use helpCommand */
|
|
535
|
+
addHelpCommand(nameAndArgs: string, description?: string): this;
|
|
536
|
+
/** @deprecated since v12, instead use helpCommand */
|
|
537
|
+
addHelpCommand(enable?: boolean): this;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Add hook for life cycle event.
|
|
541
|
+
*/
|
|
542
|
+
hook(
|
|
543
|
+
event: HookEvent,
|
|
544
|
+
listener: (
|
|
545
|
+
thisCommand: Command,
|
|
546
|
+
actionCommand: Command,
|
|
547
|
+
) => void | Promise<void>,
|
|
548
|
+
): this;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Register callback to use as replacement for calling process.exit.
|
|
552
|
+
*/
|
|
553
|
+
exitOverride(callback?: (err: CommanderError) => never | void): this;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Display error message and exit (or call exitOverride).
|
|
557
|
+
*/
|
|
558
|
+
error(message: string, errorOptions?: ErrorOptions): never;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* You can customise the help with a subclass of Help by overriding createHelp,
|
|
562
|
+
* or by overriding Help properties using configureHelp().
|
|
563
|
+
*/
|
|
564
|
+
createHelp(): Help;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* You can customise the help by overriding Help properties using configureHelp(),
|
|
568
|
+
* or with a subclass of Help by overriding createHelp().
|
|
569
|
+
*/
|
|
570
|
+
configureHelp(configuration: HelpConfiguration): this;
|
|
571
|
+
/** Get configuration */
|
|
572
|
+
configureHelp(): HelpConfiguration;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The default output goes to stdout and stderr. You can customise this for special
|
|
576
|
+
* applications. You can also customise the display of errors by overriding outputError.
|
|
577
|
+
*
|
|
578
|
+
* The configuration properties are all functions:
|
|
579
|
+
* ```
|
|
580
|
+
* // functions to change where being written, stdout and stderr
|
|
581
|
+
* writeOut(str)
|
|
582
|
+
* writeErr(str)
|
|
583
|
+
* // matching functions to specify width for wrapping help
|
|
584
|
+
* getOutHelpWidth()
|
|
585
|
+
* getErrHelpWidth()
|
|
586
|
+
* // functions based on what is being written out
|
|
587
|
+
* outputError(str, write) // used for displaying errors, and not used for displaying help
|
|
588
|
+
* ```
|
|
589
|
+
*/
|
|
590
|
+
configureOutput(configuration: OutputConfiguration): this;
|
|
591
|
+
/** Get configuration */
|
|
592
|
+
configureOutput(): OutputConfiguration;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Copy settings that are useful to have in common across root command and subcommands.
|
|
596
|
+
*
|
|
597
|
+
* (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)
|
|
598
|
+
*/
|
|
599
|
+
copyInheritedSettings(sourceCommand: Command): this;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Display the help or a custom message after an error occurs.
|
|
603
|
+
*/
|
|
604
|
+
showHelpAfterError(displayHelp?: boolean | string): this;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Display suggestion of similar commands for unknown commands, or options for unknown options.
|
|
608
|
+
*/
|
|
609
|
+
showSuggestionAfterError(displaySuggestion?: boolean): this;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Register callback `fn` for the command.
|
|
613
|
+
*
|
|
614
|
+
* @example
|
|
615
|
+
* ```
|
|
616
|
+
* program
|
|
617
|
+
* .command('serve')
|
|
618
|
+
* .description('start service')
|
|
619
|
+
* .action(function() {
|
|
620
|
+
* // do work here
|
|
621
|
+
* });
|
|
622
|
+
* ```
|
|
623
|
+
*
|
|
624
|
+
* @returns `this` command for chaining
|
|
625
|
+
*/
|
|
626
|
+
action(fn: (this: this, ...args: any[]) => void | Promise<void>): this;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.
|
|
630
|
+
*
|
|
631
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required
|
|
632
|
+
* option-argument is indicated by `<>` and an optional option-argument by `[]`.
|
|
633
|
+
*
|
|
634
|
+
* See the README for more details, and see also addOption() and requiredOption().
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
*
|
|
638
|
+
* ```js
|
|
639
|
+
* program
|
|
640
|
+
* .option('-p, --pepper', 'add pepper')
|
|
641
|
+
* .option('--pt, --pizza-type <TYPE>', 'type of pizza') // required option-argument
|
|
642
|
+
* .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default
|
|
643
|
+
* .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function
|
|
644
|
+
* ```
|
|
645
|
+
*
|
|
646
|
+
* @returns `this` command for chaining
|
|
647
|
+
*/
|
|
648
|
+
option(
|
|
649
|
+
flags: string,
|
|
650
|
+
description?: string,
|
|
651
|
+
defaultValue?: string | boolean | string[],
|
|
652
|
+
): this;
|
|
653
|
+
option<T>(
|
|
654
|
+
flags: string,
|
|
655
|
+
description: string,
|
|
656
|
+
parseArg: (value: string, previous: T) => T,
|
|
657
|
+
defaultValue?: T,
|
|
658
|
+
): this;
|
|
659
|
+
/** @deprecated since v7, instead use choices or a custom function */
|
|
660
|
+
option(
|
|
661
|
+
flags: string,
|
|
662
|
+
description: string,
|
|
663
|
+
regexp: RegExp,
|
|
664
|
+
defaultValue?: string | boolean | string[],
|
|
665
|
+
): this;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Define a required option, which must have a value after parsing. This usually means
|
|
669
|
+
* the option must be specified on the command line. (Otherwise the same as .option().)
|
|
670
|
+
*
|
|
671
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
|
|
672
|
+
*/
|
|
673
|
+
requiredOption(
|
|
674
|
+
flags: string,
|
|
675
|
+
description?: string,
|
|
676
|
+
defaultValue?: string | boolean | string[],
|
|
677
|
+
): this;
|
|
678
|
+
requiredOption<T>(
|
|
679
|
+
flags: string,
|
|
680
|
+
description: string,
|
|
681
|
+
parseArg: (value: string, previous: T) => T,
|
|
682
|
+
defaultValue?: T,
|
|
683
|
+
): this;
|
|
684
|
+
/** @deprecated since v7, instead use choices or a custom function */
|
|
685
|
+
requiredOption(
|
|
686
|
+
flags: string,
|
|
687
|
+
description: string,
|
|
688
|
+
regexp: RegExp,
|
|
689
|
+
defaultValue?: string | boolean | string[],
|
|
690
|
+
): this;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Factory routine to create a new unattached option.
|
|
694
|
+
*
|
|
695
|
+
* See .option() for creating an attached option, which uses this routine to
|
|
696
|
+
* create the option. You can override createOption to return a custom option.
|
|
697
|
+
*/
|
|
698
|
+
|
|
699
|
+
createOption(flags: string, description?: string): Option;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Add a prepared Option.
|
|
703
|
+
*
|
|
704
|
+
* See .option() and .requiredOption() for creating and attaching an option in a single call.
|
|
705
|
+
*/
|
|
706
|
+
addOption(option: Option): this;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Whether to store option values as properties on command object,
|
|
710
|
+
* or store separately (specify false). In both cases the option values can be accessed using .opts().
|
|
711
|
+
*
|
|
712
|
+
* @returns `this` command for chaining
|
|
713
|
+
*/
|
|
714
|
+
storeOptionsAsProperties<T extends OptionValues>(): this & T;
|
|
715
|
+
storeOptionsAsProperties<T extends OptionValues>(
|
|
716
|
+
storeAsProperties: true,
|
|
717
|
+
): this & T;
|
|
718
|
+
storeOptionsAsProperties(storeAsProperties?: boolean): this;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Retrieve option value.
|
|
722
|
+
*/
|
|
723
|
+
getOptionValue(key: string): any;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Store option value.
|
|
727
|
+
*/
|
|
728
|
+
setOptionValue(key: string, value: unknown): this;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Store option value and where the value came from.
|
|
732
|
+
*/
|
|
733
|
+
setOptionValueWithSource(
|
|
734
|
+
key: string,
|
|
735
|
+
value: unknown,
|
|
736
|
+
source: OptionValueSource,
|
|
737
|
+
): this;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Get source of option value.
|
|
741
|
+
*/
|
|
742
|
+
getOptionValueSource(key: string): OptionValueSource | undefined;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Get source of option value. See also .optsWithGlobals().
|
|
746
|
+
*/
|
|
747
|
+
getOptionValueSourceWithGlobals(key: string): OptionValueSource | undefined;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Alter parsing of short flags with optional values.
|
|
751
|
+
*
|
|
752
|
+
* @example
|
|
753
|
+
* ```
|
|
754
|
+
* // for `.option('-f,--flag [value]'):
|
|
755
|
+
* .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
|
|
756
|
+
* .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
|
|
757
|
+
* ```
|
|
758
|
+
*
|
|
759
|
+
* @returns `this` command for chaining
|
|
760
|
+
*/
|
|
761
|
+
combineFlagAndOptionalValue(combine?: boolean): this;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Allow unknown options on the command line.
|
|
765
|
+
*
|
|
766
|
+
* @returns `this` command for chaining
|
|
767
|
+
*/
|
|
768
|
+
allowUnknownOption(allowUnknown?: boolean): this;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
|
|
772
|
+
*
|
|
773
|
+
* @returns `this` command for chaining
|
|
774
|
+
*/
|
|
775
|
+
allowExcessArguments(allowExcess?: boolean): this;
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Enable positional options. Positional means global options are specified before subcommands which lets
|
|
779
|
+
* subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
|
|
780
|
+
*
|
|
781
|
+
* The default behaviour is non-positional and global options may appear anywhere on the command line.
|
|
782
|
+
*
|
|
783
|
+
* @returns `this` command for chaining
|
|
784
|
+
*/
|
|
785
|
+
enablePositionalOptions(positional?: boolean): this;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Pass through options that come after command-arguments rather than treat them as command-options,
|
|
789
|
+
* so actual command-options come before command-arguments. Turning this on for a subcommand requires
|
|
790
|
+
* positional options to have been enabled on the program (parent commands).
|
|
791
|
+
*
|
|
792
|
+
* The default behaviour is non-positional and options may appear before or after command-arguments.
|
|
793
|
+
*
|
|
794
|
+
* @returns `this` command for chaining
|
|
795
|
+
*/
|
|
796
|
+
passThroughOptions(passThrough?: boolean): this;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
800
|
+
*
|
|
801
|
+
* Use parseAsync instead of parse if any of your action handlers are async.
|
|
802
|
+
*
|
|
803
|
+
* Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
|
|
804
|
+
*
|
|
805
|
+
* Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
|
|
806
|
+
* - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
|
|
807
|
+
* - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
|
|
808
|
+
* - `'user'`: just user arguments
|
|
809
|
+
*
|
|
810
|
+
* @example
|
|
811
|
+
* ```
|
|
812
|
+
* program.parse(); // parse process.argv and auto-detect electron and special node flags
|
|
813
|
+
* program.parse(process.argv); // assume argv[0] is app and argv[1] is script
|
|
814
|
+
* program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
815
|
+
* ```
|
|
816
|
+
*
|
|
817
|
+
* @returns `this` command for chaining
|
|
818
|
+
*/
|
|
819
|
+
parse(argv?: readonly string[], parseOptions?: ParseOptions): this;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
823
|
+
*
|
|
824
|
+
* Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
|
|
825
|
+
*
|
|
826
|
+
* Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
|
|
827
|
+
* - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
|
|
828
|
+
* - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
|
|
829
|
+
* - `'user'`: just user arguments
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* ```
|
|
833
|
+
* await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags
|
|
834
|
+
* await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script
|
|
835
|
+
* await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
836
|
+
* ```
|
|
837
|
+
*
|
|
838
|
+
* @returns Promise
|
|
839
|
+
*/
|
|
840
|
+
parseAsync(
|
|
841
|
+
argv?: readonly string[],
|
|
842
|
+
parseOptions?: ParseOptions,
|
|
843
|
+
): Promise<this>;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Called the first time parse is called to save state and allow a restore before subsequent calls to parse.
|
|
847
|
+
* Not usually called directly, but available for subclasses to save their custom state.
|
|
848
|
+
*
|
|
849
|
+
* This is called in a lazy way. Only commands used in parsing chain will have state saved.
|
|
850
|
+
*/
|
|
851
|
+
saveStateBeforeParse(): void;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Restore state before parse for calls after the first.
|
|
855
|
+
* Not usually called directly, but available for subclasses to save their custom state.
|
|
856
|
+
*
|
|
857
|
+
* This is called in a lazy way. Only commands used in parsing chain will have state restored.
|
|
858
|
+
*/
|
|
859
|
+
restoreStateBeforeParse(): void;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Parse options from `argv` removing known options,
|
|
863
|
+
* and return argv split into operands and unknown arguments.
|
|
864
|
+
*
|
|
865
|
+
* Side effects: modifies command by storing options. Does not reset state if called again.
|
|
866
|
+
*
|
|
867
|
+
* argv => operands, unknown
|
|
868
|
+
* --known kkk op => [op], []
|
|
869
|
+
* op --known kkk => [op], []
|
|
870
|
+
* sub --unknown uuu op => [sub], [--unknown uuu op]
|
|
871
|
+
* sub -- --unknown uuu op => [sub --unknown uuu op], []
|
|
872
|
+
*/
|
|
873
|
+
parseOptions(argv: string[]): ParseOptionsResult;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Return an object containing local option values as key-value pairs
|
|
877
|
+
*/
|
|
878
|
+
opts<T extends OptionValues>(): T;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Return an object containing merged local and global option values as key-value pairs.
|
|
882
|
+
*/
|
|
883
|
+
optsWithGlobals<T extends OptionValues>(): T;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Set the description.
|
|
887
|
+
*
|
|
888
|
+
* @returns `this` command for chaining
|
|
889
|
+
*/
|
|
890
|
+
|
|
891
|
+
description(str: string): this;
|
|
892
|
+
/** @deprecated since v8, instead use .argument to add command argument with description */
|
|
893
|
+
description(str: string, argsDescription: Record<string, string>): this;
|
|
894
|
+
/**
|
|
895
|
+
* Get the description.
|
|
896
|
+
*/
|
|
897
|
+
description(): string;
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Set the summary. Used when listed as subcommand of parent.
|
|
901
|
+
*
|
|
902
|
+
* @returns `this` command for chaining
|
|
903
|
+
*/
|
|
904
|
+
|
|
905
|
+
summary(str: string): this;
|
|
906
|
+
/**
|
|
907
|
+
* Get the summary.
|
|
908
|
+
*/
|
|
909
|
+
summary(): string;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Set an alias for the command.
|
|
913
|
+
*
|
|
914
|
+
* You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
|
|
915
|
+
*
|
|
916
|
+
* @returns `this` command for chaining
|
|
917
|
+
*/
|
|
918
|
+
alias(alias: string): this;
|
|
919
|
+
/**
|
|
920
|
+
* Get alias for the command.
|
|
921
|
+
*/
|
|
922
|
+
alias(): string;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Set aliases for the command.
|
|
926
|
+
*
|
|
927
|
+
* Only the first alias is shown in the auto-generated help.
|
|
928
|
+
*
|
|
929
|
+
* @returns `this` command for chaining
|
|
930
|
+
*/
|
|
931
|
+
aliases(aliases: readonly string[]): this;
|
|
932
|
+
/**
|
|
933
|
+
* Get aliases for the command.
|
|
934
|
+
*/
|
|
935
|
+
aliases(): string[];
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Set the command usage.
|
|
939
|
+
*
|
|
940
|
+
* @returns `this` command for chaining
|
|
941
|
+
*/
|
|
942
|
+
usage(str: string): this;
|
|
943
|
+
/**
|
|
944
|
+
* Get the command usage.
|
|
945
|
+
*/
|
|
946
|
+
usage(): string;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Set the name of the command.
|
|
950
|
+
*
|
|
951
|
+
* @returns `this` command for chaining
|
|
952
|
+
*/
|
|
953
|
+
name(str: string): this;
|
|
954
|
+
/**
|
|
955
|
+
* Get the name of the command.
|
|
956
|
+
*/
|
|
957
|
+
name(): string;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Set the name of the command from script filename, such as process.argv[1],
|
|
961
|
+
* or require.main.filename, or __filename.
|
|
962
|
+
*
|
|
963
|
+
* (Used internally and public although not documented in README.)
|
|
964
|
+
*
|
|
965
|
+
* @example
|
|
966
|
+
* ```ts
|
|
967
|
+
* program.nameFromFilename(require.main.filename);
|
|
968
|
+
* ```
|
|
969
|
+
*
|
|
970
|
+
* @returns `this` command for chaining
|
|
971
|
+
*/
|
|
972
|
+
nameFromFilename(filename: string): this;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Set the directory for searching for executable subcommands of this command.
|
|
976
|
+
*
|
|
977
|
+
* @example
|
|
978
|
+
* ```ts
|
|
979
|
+
* program.executableDir(__dirname);
|
|
980
|
+
* // or
|
|
981
|
+
* program.executableDir('subcommands');
|
|
982
|
+
* ```
|
|
983
|
+
*
|
|
984
|
+
* @returns `this` command for chaining
|
|
985
|
+
*/
|
|
986
|
+
executableDir(path: string): this;
|
|
987
|
+
/**
|
|
988
|
+
* Get the executable search directory.
|
|
989
|
+
*/
|
|
990
|
+
executableDir(): string | null;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Set the help group heading for this subcommand in parent command's help.
|
|
994
|
+
*
|
|
995
|
+
* @returns `this` command for chaining
|
|
996
|
+
*/
|
|
997
|
+
helpGroup(heading: string): this;
|
|
998
|
+
/**
|
|
999
|
+
* Get the help group heading for this subcommand in parent command's help.
|
|
1000
|
+
*/
|
|
1001
|
+
helpGroup(): string;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Set the default help group heading for subcommands added to this command.
|
|
1005
|
+
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
1006
|
+
*
|
|
1007
|
+
* @example
|
|
1008
|
+
* program.commandsGroup('Development Commands:);
|
|
1009
|
+
* program.command('watch')...
|
|
1010
|
+
* program.command('lint')...
|
|
1011
|
+
* ...
|
|
1012
|
+
*
|
|
1013
|
+
* @returns `this` command for chaining
|
|
1014
|
+
*/
|
|
1015
|
+
commandsGroup(heading: string): this;
|
|
1016
|
+
/**
|
|
1017
|
+
* Get the default help group heading for subcommands added to this command.
|
|
1018
|
+
*/
|
|
1019
|
+
commandsGroup(): string;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Set the default help group heading for options added to this command.
|
|
1023
|
+
* (This does not override a group set directly on the option using .helpGroup().)
|
|
1024
|
+
*
|
|
1025
|
+
* @example
|
|
1026
|
+
* program
|
|
1027
|
+
* .optionsGroup('Development Options:')
|
|
1028
|
+
* .option('-d, --debug', 'output extra debugging')
|
|
1029
|
+
* .option('-p, --profile', 'output profiling information')
|
|
1030
|
+
*
|
|
1031
|
+
* @returns `this` command for chaining
|
|
1032
|
+
*/
|
|
1033
|
+
optionsGroup(heading: string): this;
|
|
1034
|
+
/**
|
|
1035
|
+
* Get the default help group heading for options added to this command.
|
|
1036
|
+
*/
|
|
1037
|
+
optionsGroup(): string;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Output help information for this command.
|
|
1041
|
+
*
|
|
1042
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
1043
|
+
*
|
|
1044
|
+
*/
|
|
1045
|
+
outputHelp(context?: HelpContext): void;
|
|
1046
|
+
/** @deprecated since v7 */
|
|
1047
|
+
outputHelp(cb: (str: string) => string): void;
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Return command help documentation.
|
|
1051
|
+
*/
|
|
1052
|
+
helpInformation(context?: HelpContext): string;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* You can pass in flags and a description to override the help
|
|
1056
|
+
* flags and help description for your command. Pass in false
|
|
1057
|
+
* to disable the built-in help option.
|
|
1058
|
+
*/
|
|
1059
|
+
helpOption(flags?: string | boolean, description?: string): this;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Supply your own option to use for the built-in help option.
|
|
1063
|
+
* This is an alternative to using helpOption() to customise the flags and description etc.
|
|
1064
|
+
*/
|
|
1065
|
+
addHelpOption(option: Option): this;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Output help information and exit.
|
|
1069
|
+
*
|
|
1070
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
1071
|
+
*/
|
|
1072
|
+
help(context?: HelpContext): never;
|
|
1073
|
+
/** @deprecated since v7 */
|
|
1074
|
+
help(cb: (str: string) => string): never;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Add additional text to be displayed with the built-in help.
|
|
1078
|
+
*
|
|
1079
|
+
* Position is 'before' or 'after' to affect just this command,
|
|
1080
|
+
* and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
|
|
1081
|
+
*/
|
|
1082
|
+
addHelpText(position: AddHelpTextPosition, text: string): this;
|
|
1083
|
+
addHelpText(
|
|
1084
|
+
position: AddHelpTextPosition,
|
|
1085
|
+
text: (context: AddHelpTextContext) => string,
|
|
1086
|
+
): this;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
|
|
1090
|
+
*/
|
|
1091
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export interface CommandOptions {
|
|
1095
|
+
hidden?: boolean;
|
|
1096
|
+
isDefault?: boolean;
|
|
1097
|
+
/** @deprecated since v7, replaced by hidden */
|
|
1098
|
+
noHelp?: boolean;
|
|
1099
|
+
}
|
|
1100
|
+
export interface ExecutableCommandOptions extends CommandOptions {
|
|
1101
|
+
executableFile?: string;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
export interface ParseOptionsResult {
|
|
1105
|
+
operands: string[];
|
|
1106
|
+
unknown: string[];
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
export function createCommand(name?: string): Command;
|
|
1110
|
+
export function createOption(flags: string, description?: string): Option;
|
|
1111
|
+
export function createArgument(name: string, description?: string): Argument;
|
|
1112
|
+
|
|
1113
|
+
export const program: Command;
|