ibm-cloud-sdk-core 4.3.3 → 4.3.4
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/iamtest.env +3 -0
- package/package.json +2 -2
- package/sdk-test-utilities/node_modules/.package-lock.json +508 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js +156 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/package.json +30 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js +119 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/index.js +165 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md +147 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js +228 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +93 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/package.json +71 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/readme.md +314 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/templates.js +128 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/conversions.js +868 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/index.js +78 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/package.json +46 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json +43 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/package.json +25 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/test.js +7 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/license +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json +41 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md +27 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/package.json +44 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/readme.md +70 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/index.js +131 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/readme.md +66 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/package.json +30 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/README.md +5 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/immutableUtils.js +66 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.d.ts +94 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.js +34 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/jasmineUtils.js +218 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/utils.js +462 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/package.json +35 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/README.md +3 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.js +60 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/package.json +29 -0
- package/sdk-test-utilities/node_modules/@jest/types/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/types/README.md +30 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Circus.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Config.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Global.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/TestResult.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.d.ts +1204 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/package.json +38 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.d.ts +35 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.js +577 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.d.ts +2 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.js +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.d.ts +88 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.js +609 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/license +23 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/package.json +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/readme.md +1424 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.js +90 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.d.ts +723 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.js +2220 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.d.ts +30 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.js +484 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.js +71 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.js +480 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.d.ts +43 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.js +204 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.js +80 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.js +208 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.d.ts +6 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.js +56 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.d.ts +11 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.js +53 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.js +121 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.d.ts +24 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.js +142 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.d.ts +39 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.js +99 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/index.d.ts +111 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/index.d.ts +184 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/README.md +86 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/index.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/node/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/node/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@types/node/assert.d.ts +1040 -0
- package/sdk-test-utilities/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/sdk-test-utilities/node_modules/@types/node/buffer.d.ts +2363 -0
- package/sdk-test-utilities/node_modules/@types/node/child_process.d.ts +1544 -0
- package/sdk-test-utilities/node_modules/@types/node/cluster.d.ts +578 -0
- package/sdk-test-utilities/node_modules/@types/node/console.d.ts +452 -0
- package/sdk-test-utilities/node_modules/@types/node/constants.d.ts +19 -0
- package/sdk-test-utilities/node_modules/@types/node/crypto.d.ts +4523 -0
- package/sdk-test-utilities/node_modules/@types/node/dgram.d.ts +596 -0
- package/sdk-test-utilities/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/sdk-test-utilities/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/sdk-test-utilities/node_modules/@types/node/dns.d.ts +864 -0
- package/sdk-test-utilities/node_modules/@types/node/dom-events.d.ts +124 -0
- package/sdk-test-utilities/node_modules/@types/node/domain.d.ts +170 -0
- package/sdk-test-utilities/node_modules/@types/node/events.d.ts +909 -0
- package/sdk-test-utilities/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/sdk-test-utilities/node_modules/@types/node/fs.d.ts +4317 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.d.ts +411 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.global.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@types/node/http.d.ts +1908 -0
- package/sdk-test-utilities/node_modules/@types/node/http2.d.ts +2418 -0
- package/sdk-test-utilities/node_modules/@types/node/https.d.ts +550 -0
- package/sdk-test-utilities/node_modules/@types/node/index.d.ts +89 -0
- package/sdk-test-utilities/node_modules/@types/node/inspector.d.ts +2746 -0
- package/sdk-test-utilities/node_modules/@types/node/module.d.ts +315 -0
- package/sdk-test-utilities/node_modules/@types/node/net.d.ts +999 -0
- package/sdk-test-utilities/node_modules/@types/node/os.d.ts +495 -0
- package/sdk-test-utilities/node_modules/@types/node/package.json +217 -0
- package/sdk-test-utilities/node_modules/@types/node/path.d.ts +191 -0
- package/sdk-test-utilities/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/sdk-test-utilities/node_modules/@types/node/process.d.ts +1754 -0
- package/sdk-test-utilities/node_modules/@types/node/punycode.d.ts +117 -0
- package/sdk-test-utilities/node_modules/@types/node/querystring.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/sdk-test-utilities/node_modules/@types/node/readline.d.ts +540 -0
- package/sdk-test-utilities/node_modules/@types/node/repl.d.ts +430 -0
- package/sdk-test-utilities/node_modules/@types/node/sea.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/web.d.ts +367 -0
- package/sdk-test-utilities/node_modules/@types/node/stream.d.ts +1707 -0
- package/sdk-test-utilities/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/node/test.d.ts +1718 -0
- package/sdk-test-utilities/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@types/node/timers.d.ts +240 -0
- package/sdk-test-utilities/node_modules/@types/node/tls.d.ts +1217 -0
- package/sdk-test-utilities/node_modules/@types/node/trace_events.d.ts +197 -0
- package/sdk-test-utilities/node_modules/@types/node/tty.d.ts +208 -0
- package/sdk-test-utilities/node_modules/@types/node/url.d.ts +952 -0
- package/sdk-test-utilities/node_modules/@types/node/util.d.ts +2292 -0
- package/sdk-test-utilities/node_modules/@types/node/v8.d.ts +808 -0
- package/sdk-test-utilities/node_modules/@types/node/vm.d.ts +924 -0
- package/sdk-test-utilities/node_modules/@types/node/wasi.d.ts +181 -0
- package/sdk-test-utilities/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/sdk-test-utilities/node_modules/@types/node/zlib.d.ts +530 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/README.md +78 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/index.d.ts +59 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/yargs/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.mts +1 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.ts +5 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.mts +46 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.ts +1031 -0
- package/sdk-test-utilities/node_modules/@types/yargs/package.json +87 -0
- package/sdk-test-utilities/node_modules/@types/yargs/yargs.d.ts +9 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/index.d.ts +112 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/package.json +25 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.d.ts +345 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.js +163 -0
- package/sdk-test-utilities/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/ansi-styles/readme.md +152 -0
- package/sdk-test-utilities/node_modules/braces/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/braces/README.md +586 -0
- package/sdk-test-utilities/node_modules/braces/index.js +170 -0
- package/sdk-test-utilities/node_modules/braces/lib/compile.js +60 -0
- package/sdk-test-utilities/node_modules/braces/lib/constants.js +57 -0
- package/sdk-test-utilities/node_modules/braces/lib/expand.js +113 -0
- package/sdk-test-utilities/node_modules/braces/lib/parse.js +331 -0
- package/sdk-test-utilities/node_modules/braces/lib/stringify.js +32 -0
- package/sdk-test-utilities/node_modules/braces/lib/utils.js +122 -0
- package/sdk-test-utilities/node_modules/braces/package.json +77 -0
- package/sdk-test-utilities/node_modules/chalk/index.d.ts +415 -0
- package/sdk-test-utilities/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/chalk/package.json +68 -0
- package/sdk-test-utilities/node_modules/chalk/readme.md +341 -0
- package/sdk-test-utilities/node_modules/chalk/source/index.js +229 -0
- package/sdk-test-utilities/node_modules/chalk/source/templates.js +134 -0
- package/sdk-test-utilities/node_modules/chalk/source/util.js +39 -0
- package/sdk-test-utilities/node_modules/ci-info/CHANGELOG.md +178 -0
- package/sdk-test-utilities/node_modules/ci-info/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/ci-info/README.md +135 -0
- package/sdk-test-utilities/node_modules/ci-info/index.d.ts +75 -0
- package/sdk-test-utilities/node_modules/ci-info/index.js +90 -0
- package/sdk-test-utilities/node_modules/ci-info/package.json +45 -0
- package/sdk-test-utilities/node_modules/ci-info/vendors.json +321 -0
- package/sdk-test-utilities/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/color-convert/conversions.js +839 -0
- package/sdk-test-utilities/node_modules/color-convert/index.js +81 -0
- package/sdk-test-utilities/node_modules/color-convert/package.json +48 -0
- package/sdk-test-utilities/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/color-name/package.json +28 -0
- package/sdk-test-utilities/node_modules/diff-sequences/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/diff-sequences/README.md +404 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.d.ts +38 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.js +798 -0
- package/sdk-test-utilities/node_modules/diff-sequences/package.json +39 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/license +9 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/package.json +43 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/readme.md +29 -0
- package/sdk-test-utilities/node_modules/expect/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/expect/README.md +3 -0
- package/sdk-test-utilities/node_modules/expect/build/asymmetricMatchers.js +375 -0
- package/sdk-test-utilities/node_modules/expect/build/extractExpectedAssertionsErrors.js +86 -0
- package/sdk-test-utilities/node_modules/expect/build/index.d.ts +370 -0
- package/sdk-test-utilities/node_modules/expect/build/index.js +410 -0
- package/sdk-test-utilities/node_modules/expect/build/jestMatchersObject.js +123 -0
- package/sdk-test-utilities/node_modules/expect/build/matchers.js +1292 -0
- package/sdk-test-utilities/node_modules/expect/build/print.js +122 -0
- package/sdk-test-utilities/node_modules/expect/build/spyMatchers.js +1254 -0
- package/sdk-test-utilities/node_modules/expect/build/toThrowMatchers.js +481 -0
- package/sdk-test-utilities/node_modules/expect/build/types.js +3 -0
- package/sdk-test-utilities/node_modules/expect/package.json +43 -0
- package/sdk-test-utilities/node_modules/fill-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/fill-range/README.md +237 -0
- package/sdk-test-utilities/node_modules/fill-range/index.js +248 -0
- package/sdk-test-utilities/node_modules/fill-range/package.json +74 -0
- package/sdk-test-utilities/node_modules/graceful-fs/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/graceful-fs/README.md +143 -0
- package/sdk-test-utilities/node_modules/graceful-fs/clone.js +23 -0
- package/sdk-test-utilities/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/sdk-test-utilities/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/sdk-test-utilities/node_modules/graceful-fs/package.json +53 -0
- package/sdk-test-utilities/node_modules/graceful-fs/polyfills.js +355 -0
- package/sdk-test-utilities/node_modules/has-flag/index.d.ts +39 -0
- package/sdk-test-utilities/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/has-flag/package.json +46 -0
- package/sdk-test-utilities/node_modules/has-flag/readme.md +89 -0
- package/sdk-test-utilities/node_modules/is-number/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/is-number/README.md +187 -0
- package/sdk-test-utilities/node_modules/is-number/index.js +18 -0
- package/sdk-test-utilities/node_modules/is-number/package.json +82 -0
- package/sdk-test-utilities/node_modules/jest-diff/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-diff/README.md +671 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/cleanupSemantic.js +599 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/constants.js +19 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffLines.js +193 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffStrings.js +66 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/getAlignedDiffs.js +223 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.d.ts +93 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.js +232 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/joinAlignedDiffs.js +271 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/normalizeDiffOptions.js +59 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/printDiffs.js +79 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-diff/package.json +36 -0
- package/sdk-test-utilities/node_modules/jest-get-type/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.d.ts +27 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.js +53 -0
- package/sdk-test-utilities/node_modules/jest-get-type/package.json +27 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/README.md +24 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/Replaceable.js +64 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +111 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.d.ts +138 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.js +542 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/package.json +37 -0
- package/sdk-test-utilities/node_modules/jest-message-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.d.ts +68 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.js +518 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-message-util/package.json +43 -0
- package/sdk-test-utilities/node_modules/jest-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-util/Readme.md +87 -0
- package/sdk-test-utilities/node_modules/jest-util/build/ErrorWithStack.js +28 -0
- package/sdk-test-utilities/node_modules/jest-util/build/clearLine.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/convertDescriptorToString.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createDirectory.js +71 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createProcessObject.js +109 -0
- package/sdk-test-utilities/node_modules/jest-util/build/deepCyclicCopy.js +76 -0
- package/sdk-test-utilities/node_modules/jest-util/build/formatTime.js +24 -0
- package/sdk-test-utilities/node_modules/jest-util/build/globsToMatcher.js +98 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.d.ts +136 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.js +199 -0
- package/sdk-test-utilities/node_modules/jest-util/build/installCommonGlobals.js +115 -0
- package/sdk-test-utilities/node_modules/jest-util/build/interopRequireDefault.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/invariant.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isInteractive.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isNonNullable.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isPromise.js +20 -0
- package/sdk-test-utilities/node_modules/jest-util/build/pluralize.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/preRunMessage.js +38 -0
- package/sdk-test-utilities/node_modules/jest-util/build/replacePathSepForGlob.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/requireOrImportModule.js +77 -0
- package/sdk-test-utilities/node_modules/jest-util/build/setGlobal.js +17 -0
- package/sdk-test-utilities/node_modules/jest-util/build/specialChars.js +25 -0
- package/sdk-test-utilities/node_modules/jest-util/build/testPathPatternToRegExp.js +19 -0
- package/sdk-test-utilities/node_modules/jest-util/build/tryRealpath.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/package.json +38 -0
- package/sdk-test-utilities/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/sdk-test-utilities/node_modules/js-tokens/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/js-tokens/README.md +240 -0
- package/sdk-test-utilities/node_modules/js-tokens/index.js +23 -0
- package/sdk-test-utilities/node_modules/js-tokens/package.json +30 -0
- package/sdk-test-utilities/node_modules/micromatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/micromatch/README.md +1017 -0
- package/sdk-test-utilities/node_modules/micromatch/index.js +467 -0
- package/sdk-test-utilities/node_modules/micromatch/package.json +101 -0
- package/sdk-test-utilities/node_modules/picocolors/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/picocolors/README.md +21 -0
- package/sdk-test-utilities/node_modules/picocolors/package.json +25 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.browser.js +4 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.js +65 -0
- package/sdk-test-utilities/node_modules/picomatch/CHANGELOG.md +136 -0
- package/sdk-test-utilities/node_modules/picomatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/picomatch/README.md +708 -0
- package/sdk-test-utilities/node_modules/picomatch/index.js +3 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/constants.js +179 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/parse.js +1091 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/picomatch.js +342 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/scan.js +391 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/utils.js +64 -0
- package/sdk-test-utilities/node_modules/picomatch/package.json +81 -0
- package/sdk-test-utilities/node_modules/pretty-format/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/pretty-format/README.md +463 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/collections.js +180 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.d.ts +163 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.js +478 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +89 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMCollection.js +67 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMElement.js +101 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/Immutable.js +217 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactElement.js +143 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactTestComponent.js +66 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/markup.js +113 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.d.ts +167 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.js +164 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/package.json +52 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/readme.md +144 -0
- package/sdk-test-utilities/node_modules/pretty-format/package.json +43 -0
- package/sdk-test-utilities/node_modules/react-is/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/react-is/README.md +104 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.development.js +221 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.production.min.js +14 -0
- package/sdk-test-utilities/node_modules/react-is/index.js +7 -0
- package/sdk-test-utilities/node_modules/react-is/package.json +26 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.development.js +220 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.production.min.js +15 -0
- package/sdk-test-utilities/node_modules/slash/index.d.ts +25 -0
- package/sdk-test-utilities/node_modules/slash/index.js +11 -0
- package/sdk-test-utilities/node_modules/slash/license +9 -0
- package/sdk-test-utilities/node_modules/slash/package.json +35 -0
- package/sdk-test-utilities/node_modules/slash/readme.md +44 -0
- package/sdk-test-utilities/node_modules/stack-utils/LICENSE.md +21 -0
- package/sdk-test-utilities/node_modules/stack-utils/index.js +344 -0
- package/sdk-test-utilities/node_modules/stack-utils/package.json +39 -0
- package/sdk-test-utilities/node_modules/stack-utils/readme.md +143 -0
- package/sdk-test-utilities/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/supports-color/index.js +135 -0
- package/sdk-test-utilities/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/supports-color/readme.md +76 -0
- package/sdk-test-utilities/node_modules/to-regex-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/to-regex-range/README.md +305 -0
- package/sdk-test-utilities/node_modules/to-regex-range/index.js +288 -0
- package/sdk-test-utilities/node_modules/to-regex-range/package.json +88 -0
- package/sdk-test-utilities/node_modules/undici-types/README.md +6 -0
- package/sdk-test-utilities/node_modules/undici-types/agent.d.ts +31 -0
- package/sdk-test-utilities/node_modules/undici-types/api.d.ts +43 -0
- package/sdk-test-utilities/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/sdk-test-utilities/node_modules/undici-types/cache.d.ts +36 -0
- package/sdk-test-utilities/node_modules/undici-types/client.d.ts +97 -0
- package/sdk-test-utilities/node_modules/undici-types/connector.d.ts +34 -0
- package/sdk-test-utilities/node_modules/undici-types/content-type.d.ts +21 -0
- package/sdk-test-utilities/node_modules/undici-types/cookies.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/sdk-test-utilities/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/sdk-test-utilities/node_modules/undici-types/errors.d.ts +128 -0
- package/sdk-test-utilities/node_modules/undici-types/fetch.d.ts +209 -0
- package/sdk-test-utilities/node_modules/undici-types/file.d.ts +39 -0
- package/sdk-test-utilities/node_modules/undici-types/filereader.d.ts +54 -0
- package/sdk-test-utilities/node_modules/undici-types/formdata.d.ts +108 -0
- package/sdk-test-utilities/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/global-origin.d.ts +7 -0
- package/sdk-test-utilities/node_modules/undici-types/handlers.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/header.d.ts +4 -0
- package/sdk-test-utilities/node_modules/undici-types/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/undici-types/interceptors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-client.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/package.json +55 -0
- package/sdk-test-utilities/node_modules/undici-types/patch.d.ts +71 -0
- package/sdk-test-utilities/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/sdk-test-utilities/node_modules/undici-types/pool.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/sdk-test-utilities/node_modules/undici-types/readable.d.ts +61 -0
- package/sdk-test-utilities/node_modules/undici-types/webidl.d.ts +220 -0
- package/sdk-test-utilities/node_modules/undici-types/websocket.d.ts +131 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
5
|
+
* Released under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const isNumber = require('is-number');
|
|
11
|
+
|
|
12
|
+
const toRegexRange = (min, max, options) => {
|
|
13
|
+
if (isNumber(min) === false) {
|
|
14
|
+
throw new TypeError('toRegexRange: expected the first argument to be a number');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (max === void 0 || min === max) {
|
|
18
|
+
return String(min);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (isNumber(max) === false) {
|
|
22
|
+
throw new TypeError('toRegexRange: expected the second argument to be a number.');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let opts = { relaxZeros: true, ...options };
|
|
26
|
+
if (typeof opts.strictZeros === 'boolean') {
|
|
27
|
+
opts.relaxZeros = opts.strictZeros === false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let relax = String(opts.relaxZeros);
|
|
31
|
+
let shorthand = String(opts.shorthand);
|
|
32
|
+
let capture = String(opts.capture);
|
|
33
|
+
let wrap = String(opts.wrap);
|
|
34
|
+
let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
|
|
35
|
+
|
|
36
|
+
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
|
|
37
|
+
return toRegexRange.cache[cacheKey].result;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let a = Math.min(min, max);
|
|
41
|
+
let b = Math.max(min, max);
|
|
42
|
+
|
|
43
|
+
if (Math.abs(a - b) === 1) {
|
|
44
|
+
let result = min + '|' + max;
|
|
45
|
+
if (opts.capture) {
|
|
46
|
+
return `(${result})`;
|
|
47
|
+
}
|
|
48
|
+
if (opts.wrap === false) {
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
return `(?:${result})`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let isPadded = hasPadding(min) || hasPadding(max);
|
|
55
|
+
let state = { min, max, a, b };
|
|
56
|
+
let positives = [];
|
|
57
|
+
let negatives = [];
|
|
58
|
+
|
|
59
|
+
if (isPadded) {
|
|
60
|
+
state.isPadded = isPadded;
|
|
61
|
+
state.maxLen = String(state.max).length;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (a < 0) {
|
|
65
|
+
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
66
|
+
negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
|
|
67
|
+
a = state.a = 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (b >= 0) {
|
|
71
|
+
positives = splitToPatterns(a, b, state, opts);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
state.negatives = negatives;
|
|
75
|
+
state.positives = positives;
|
|
76
|
+
state.result = collatePatterns(negatives, positives, opts);
|
|
77
|
+
|
|
78
|
+
if (opts.capture === true) {
|
|
79
|
+
state.result = `(${state.result})`;
|
|
80
|
+
} else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
|
|
81
|
+
state.result = `(?:${state.result})`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
toRegexRange.cache[cacheKey] = state;
|
|
85
|
+
return state.result;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
function collatePatterns(neg, pos, options) {
|
|
89
|
+
let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
|
|
90
|
+
let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
|
|
91
|
+
let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
|
|
92
|
+
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
93
|
+
return subpatterns.join('|');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function splitToRanges(min, max) {
|
|
97
|
+
let nines = 1;
|
|
98
|
+
let zeros = 1;
|
|
99
|
+
|
|
100
|
+
let stop = countNines(min, nines);
|
|
101
|
+
let stops = new Set([max]);
|
|
102
|
+
|
|
103
|
+
while (min <= stop && stop <= max) {
|
|
104
|
+
stops.add(stop);
|
|
105
|
+
nines += 1;
|
|
106
|
+
stop = countNines(min, nines);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
stop = countZeros(max + 1, zeros) - 1;
|
|
110
|
+
|
|
111
|
+
while (min < stop && stop <= max) {
|
|
112
|
+
stops.add(stop);
|
|
113
|
+
zeros += 1;
|
|
114
|
+
stop = countZeros(max + 1, zeros) - 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
stops = [...stops];
|
|
118
|
+
stops.sort(compare);
|
|
119
|
+
return stops;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Convert a range to a regex pattern
|
|
124
|
+
* @param {Number} `start`
|
|
125
|
+
* @param {Number} `stop`
|
|
126
|
+
* @return {String}
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
function rangeToPattern(start, stop, options) {
|
|
130
|
+
if (start === stop) {
|
|
131
|
+
return { pattern: start, count: [], digits: 0 };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let zipped = zip(start, stop);
|
|
135
|
+
let digits = zipped.length;
|
|
136
|
+
let pattern = '';
|
|
137
|
+
let count = 0;
|
|
138
|
+
|
|
139
|
+
for (let i = 0; i < digits; i++) {
|
|
140
|
+
let [startDigit, stopDigit] = zipped[i];
|
|
141
|
+
|
|
142
|
+
if (startDigit === stopDigit) {
|
|
143
|
+
pattern += startDigit;
|
|
144
|
+
|
|
145
|
+
} else if (startDigit !== '0' || stopDigit !== '9') {
|
|
146
|
+
pattern += toCharacterClass(startDigit, stopDigit, options);
|
|
147
|
+
|
|
148
|
+
} else {
|
|
149
|
+
count++;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (count) {
|
|
154
|
+
pattern += options.shorthand === true ? '\\d' : '[0-9]';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return { pattern, count: [count], digits };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function splitToPatterns(min, max, tok, options) {
|
|
161
|
+
let ranges = splitToRanges(min, max);
|
|
162
|
+
let tokens = [];
|
|
163
|
+
let start = min;
|
|
164
|
+
let prev;
|
|
165
|
+
|
|
166
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
167
|
+
let max = ranges[i];
|
|
168
|
+
let obj = rangeToPattern(String(start), String(max), options);
|
|
169
|
+
let zeros = '';
|
|
170
|
+
|
|
171
|
+
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
172
|
+
if (prev.count.length > 1) {
|
|
173
|
+
prev.count.pop();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
prev.count.push(obj.count[0]);
|
|
177
|
+
prev.string = prev.pattern + toQuantifier(prev.count);
|
|
178
|
+
start = max + 1;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (tok.isPadded) {
|
|
183
|
+
zeros = padZeros(max, tok, options);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
|
|
187
|
+
tokens.push(obj);
|
|
188
|
+
start = max + 1;
|
|
189
|
+
prev = obj;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return tokens;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
196
|
+
let result = [];
|
|
197
|
+
|
|
198
|
+
for (let ele of arr) {
|
|
199
|
+
let { string } = ele;
|
|
200
|
+
|
|
201
|
+
// only push if _both_ are negative...
|
|
202
|
+
if (!intersection && !contains(comparison, 'string', string)) {
|
|
203
|
+
result.push(prefix + string);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// or _both_ are positive
|
|
207
|
+
if (intersection && contains(comparison, 'string', string)) {
|
|
208
|
+
result.push(prefix + string);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Zip strings
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
function zip(a, b) {
|
|
219
|
+
let arr = [];
|
|
220
|
+
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
221
|
+
return arr;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function compare(a, b) {
|
|
225
|
+
return a > b ? 1 : b > a ? -1 : 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function contains(arr, key, val) {
|
|
229
|
+
return arr.some(ele => ele[key] === val);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function countNines(min, len) {
|
|
233
|
+
return Number(String(min).slice(0, -len) + '9'.repeat(len));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function countZeros(integer, zeros) {
|
|
237
|
+
return integer - (integer % Math.pow(10, zeros));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function toQuantifier(digits) {
|
|
241
|
+
let [start = 0, stop = ''] = digits;
|
|
242
|
+
if (stop || start > 1) {
|
|
243
|
+
return `{${start + (stop ? ',' + stop : '')}}`;
|
|
244
|
+
}
|
|
245
|
+
return '';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function toCharacterClass(a, b, options) {
|
|
249
|
+
return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function hasPadding(str) {
|
|
253
|
+
return /^-?(0+)\d/.test(str);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function padZeros(value, tok, options) {
|
|
257
|
+
if (!tok.isPadded) {
|
|
258
|
+
return value;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
let diff = Math.abs(tok.maxLen - String(value).length);
|
|
262
|
+
let relax = options.relaxZeros !== false;
|
|
263
|
+
|
|
264
|
+
switch (diff) {
|
|
265
|
+
case 0:
|
|
266
|
+
return '';
|
|
267
|
+
case 1:
|
|
268
|
+
return relax ? '0?' : '0';
|
|
269
|
+
case 2:
|
|
270
|
+
return relax ? '0{0,2}' : '00';
|
|
271
|
+
default: {
|
|
272
|
+
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Cache
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
toRegexRange.cache = {};
|
|
282
|
+
toRegexRange.clearCache = () => (toRegexRange.cache = {});
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Expose `toRegexRange`
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
module.exports = toRegexRange;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "to-regex-range",
|
|
3
|
+
"description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.",
|
|
4
|
+
"version": "5.0.1",
|
|
5
|
+
"homepage": "https://github.com/micromatch/to-regex-range",
|
|
6
|
+
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
|
7
|
+
"contributors": [
|
|
8
|
+
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
|
9
|
+
"Rouven Weßling (www.rouvenwessling.de)"
|
|
10
|
+
],
|
|
11
|
+
"repository": "micromatch/to-regex-range",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/micromatch/to-regex-range/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"files": [
|
|
17
|
+
"index.js"
|
|
18
|
+
],
|
|
19
|
+
"main": "index.js",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=8.0"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "mocha"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"is-number": "^7.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"fill-range": "^6.0.0",
|
|
31
|
+
"gulp-format-md": "^2.0.0",
|
|
32
|
+
"mocha": "^6.0.2",
|
|
33
|
+
"text-table": "^0.2.0",
|
|
34
|
+
"time-diff": "^0.3.1"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"bash",
|
|
38
|
+
"date",
|
|
39
|
+
"expand",
|
|
40
|
+
"expansion",
|
|
41
|
+
"expression",
|
|
42
|
+
"glob",
|
|
43
|
+
"match",
|
|
44
|
+
"match date",
|
|
45
|
+
"match number",
|
|
46
|
+
"match numbers",
|
|
47
|
+
"match year",
|
|
48
|
+
"matches",
|
|
49
|
+
"matching",
|
|
50
|
+
"number",
|
|
51
|
+
"numbers",
|
|
52
|
+
"numerical",
|
|
53
|
+
"range",
|
|
54
|
+
"ranges",
|
|
55
|
+
"regex",
|
|
56
|
+
"regexp",
|
|
57
|
+
"regular",
|
|
58
|
+
"regular expression",
|
|
59
|
+
"sequence"
|
|
60
|
+
],
|
|
61
|
+
"verb": {
|
|
62
|
+
"layout": "default",
|
|
63
|
+
"toc": false,
|
|
64
|
+
"tasks": [
|
|
65
|
+
"readme"
|
|
66
|
+
],
|
|
67
|
+
"plugins": [
|
|
68
|
+
"gulp-format-md"
|
|
69
|
+
],
|
|
70
|
+
"lint": {
|
|
71
|
+
"reflinks": true
|
|
72
|
+
},
|
|
73
|
+
"helpers": {
|
|
74
|
+
"examples": {
|
|
75
|
+
"displayName": "examples"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"related": {
|
|
79
|
+
"list": [
|
|
80
|
+
"expand-range",
|
|
81
|
+
"fill-range",
|
|
82
|
+
"micromatch",
|
|
83
|
+
"repeat-element",
|
|
84
|
+
"repeat-string"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# undici-types
|
|
2
|
+
|
|
3
|
+
This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
|
|
4
|
+
|
|
5
|
+
- [GitHub nodejs/undici](https://github.com/nodejs/undici)
|
|
6
|
+
- [Undici Documentation](https://undici.nodejs.org/#/)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { URL } from 'url'
|
|
2
|
+
import Pool from './pool'
|
|
3
|
+
import Dispatcher from "./dispatcher";
|
|
4
|
+
|
|
5
|
+
export default Agent
|
|
6
|
+
|
|
7
|
+
declare class Agent extends Dispatcher{
|
|
8
|
+
constructor(opts?: Agent.Options)
|
|
9
|
+
/** `true` after `dispatcher.close()` has been called. */
|
|
10
|
+
closed: boolean;
|
|
11
|
+
/** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
|
|
12
|
+
destroyed: boolean;
|
|
13
|
+
/** Dispatches a request. */
|
|
14
|
+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare namespace Agent {
|
|
18
|
+
export interface Options extends Pool.Options {
|
|
19
|
+
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
20
|
+
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
21
|
+
/** Integer. Default: `0` */
|
|
22
|
+
maxRedirections?: number;
|
|
23
|
+
|
|
24
|
+
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface DispatchOptions extends Dispatcher.DispatchOptions {
|
|
28
|
+
/** Integer. */
|
|
29
|
+
maxRedirections?: number;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { URL, UrlObject } from 'url'
|
|
2
|
+
import { Duplex } from 'stream'
|
|
3
|
+
import Dispatcher from './dispatcher'
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
request,
|
|
7
|
+
stream,
|
|
8
|
+
pipeline,
|
|
9
|
+
connect,
|
|
10
|
+
upgrade,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Performs an HTTP request. */
|
|
14
|
+
declare function request(
|
|
15
|
+
url: string | URL | UrlObject,
|
|
16
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
|
|
17
|
+
): Promise<Dispatcher.ResponseData>;
|
|
18
|
+
|
|
19
|
+
/** A faster version of `request`. */
|
|
20
|
+
declare function stream(
|
|
21
|
+
url: string | URL | UrlObject,
|
|
22
|
+
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
|
|
23
|
+
factory: Dispatcher.StreamFactory
|
|
24
|
+
): Promise<Dispatcher.StreamData>;
|
|
25
|
+
|
|
26
|
+
/** For easy use with `stream.pipeline`. */
|
|
27
|
+
declare function pipeline(
|
|
28
|
+
url: string | URL | UrlObject,
|
|
29
|
+
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
|
|
30
|
+
handler: Dispatcher.PipelineHandler
|
|
31
|
+
): Duplex;
|
|
32
|
+
|
|
33
|
+
/** Starts two-way communications with the requested resource. */
|
|
34
|
+
declare function connect(
|
|
35
|
+
url: string | URL | UrlObject,
|
|
36
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
|
|
37
|
+
): Promise<Dispatcher.ConnectData>;
|
|
38
|
+
|
|
39
|
+
/** Upgrade to a different protocol. */
|
|
40
|
+
declare function upgrade(
|
|
41
|
+
url: string | URL | UrlObject,
|
|
42
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
|
|
43
|
+
): Promise<Dispatcher.UpgradeData>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Pool from './pool'
|
|
2
|
+
import Dispatcher from './dispatcher'
|
|
3
|
+
import { URL } from 'url'
|
|
4
|
+
|
|
5
|
+
export default BalancedPool
|
|
6
|
+
|
|
7
|
+
declare class BalancedPool extends Dispatcher {
|
|
8
|
+
constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
|
|
9
|
+
|
|
10
|
+
addUpstream(upstream: string | URL): BalancedPool;
|
|
11
|
+
removeUpstream(upstream: string | URL): BalancedPool;
|
|
12
|
+
upstreams: Array<string>;
|
|
13
|
+
|
|
14
|
+
/** `true` after `pool.close()` has been called. */
|
|
15
|
+
closed: boolean;
|
|
16
|
+
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
17
|
+
destroyed: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { RequestInfo, Response, Request } from './fetch'
|
|
2
|
+
|
|
3
|
+
export interface CacheStorage {
|
|
4
|
+
match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
|
|
5
|
+
has (cacheName: string): Promise<boolean>,
|
|
6
|
+
open (cacheName: string): Promise<Cache>,
|
|
7
|
+
delete (cacheName: string): Promise<boolean>,
|
|
8
|
+
keys (): Promise<string[]>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare const CacheStorage: {
|
|
12
|
+
prototype: CacheStorage
|
|
13
|
+
new(): CacheStorage
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Cache {
|
|
17
|
+
match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
|
|
18
|
+
matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
|
|
19
|
+
add (request: RequestInfo): Promise<undefined>,
|
|
20
|
+
addAll (requests: RequestInfo[]): Promise<undefined>,
|
|
21
|
+
put (request: RequestInfo, response: Response): Promise<undefined>,
|
|
22
|
+
delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
|
|
23
|
+
keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CacheQueryOptions {
|
|
27
|
+
ignoreSearch?: boolean,
|
|
28
|
+
ignoreMethod?: boolean,
|
|
29
|
+
ignoreVary?: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
33
|
+
cacheName?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare const caches: CacheStorage
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { URL } from 'url'
|
|
2
|
+
import { TlsOptions } from 'tls'
|
|
3
|
+
import Dispatcher from './dispatcher'
|
|
4
|
+
import buildConnector from "./connector";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
8
|
+
*/
|
|
9
|
+
export class Client extends Dispatcher {
|
|
10
|
+
constructor(url: string | URL, options?: Client.Options);
|
|
11
|
+
/** Property to get and set the pipelining factor. */
|
|
12
|
+
pipelining: number;
|
|
13
|
+
/** `true` after `client.close()` has been called. */
|
|
14
|
+
closed: boolean;
|
|
15
|
+
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
16
|
+
destroyed: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare namespace Client {
|
|
20
|
+
export interface OptionsInterceptors {
|
|
21
|
+
Client: readonly Dispatcher.DispatchInterceptor[];
|
|
22
|
+
}
|
|
23
|
+
export interface Options {
|
|
24
|
+
/** TODO */
|
|
25
|
+
interceptors?: OptionsInterceptors;
|
|
26
|
+
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
27
|
+
maxHeaderSize?: number;
|
|
28
|
+
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
29
|
+
headersTimeout?: number;
|
|
30
|
+
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
|
|
31
|
+
socketTimeout?: never;
|
|
32
|
+
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
|
|
33
|
+
requestTimeout?: never;
|
|
34
|
+
/** TODO */
|
|
35
|
+
connectTimeout?: number;
|
|
36
|
+
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
37
|
+
bodyTimeout?: number;
|
|
38
|
+
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
|
|
39
|
+
idleTimeout?: never;
|
|
40
|
+
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
|
|
41
|
+
keepAlive?: never;
|
|
42
|
+
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
|
|
43
|
+
keepAliveTimeout?: number;
|
|
44
|
+
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
|
|
45
|
+
maxKeepAliveTimeout?: never;
|
|
46
|
+
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
|
|
47
|
+
keepAliveMaxTimeout?: number;
|
|
48
|
+
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
49
|
+
keepAliveTimeoutThreshold?: number;
|
|
50
|
+
/** TODO */
|
|
51
|
+
socketPath?: string;
|
|
52
|
+
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
|
|
53
|
+
pipelining?: number;
|
|
54
|
+
/** @deprecated use the connect option instead */
|
|
55
|
+
tls?: never;
|
|
56
|
+
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
57
|
+
strictContentLength?: boolean;
|
|
58
|
+
/** TODO */
|
|
59
|
+
maxCachedSessions?: number;
|
|
60
|
+
/** TODO */
|
|
61
|
+
maxRedirections?: number;
|
|
62
|
+
/** TODO */
|
|
63
|
+
connect?: buildConnector.BuildOptions | buildConnector.connector;
|
|
64
|
+
/** TODO */
|
|
65
|
+
maxRequestsPerClient?: number;
|
|
66
|
+
/** TODO */
|
|
67
|
+
localAddress?: string;
|
|
68
|
+
/** Max response body size in bytes, -1 is disabled */
|
|
69
|
+
maxResponseSize?: number;
|
|
70
|
+
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
71
|
+
autoSelectFamily?: boolean;
|
|
72
|
+
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
73
|
+
autoSelectFamilyAttemptTimeout?: number;
|
|
74
|
+
/**
|
|
75
|
+
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
allowH2?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame.
|
|
81
|
+
* @default 100
|
|
82
|
+
*/
|
|
83
|
+
maxConcurrentStreams?: number
|
|
84
|
+
}
|
|
85
|
+
export interface SocketInfo {
|
|
86
|
+
localAddress?: string
|
|
87
|
+
localPort?: number
|
|
88
|
+
remoteAddress?: string
|
|
89
|
+
remotePort?: number
|
|
90
|
+
remoteFamily?: string
|
|
91
|
+
timeout?: number
|
|
92
|
+
bytesWritten?: number
|
|
93
|
+
bytesRead?: number
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export default Client;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TLSSocket, ConnectionOptions } from 'tls'
|
|
2
|
+
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net'
|
|
3
|
+
|
|
4
|
+
export default buildConnector
|
|
5
|
+
declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector
|
|
6
|
+
|
|
7
|
+
declare namespace buildConnector {
|
|
8
|
+
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
|
|
9
|
+
allowH2?: boolean;
|
|
10
|
+
maxCachedSessions?: number | null;
|
|
11
|
+
socketPath?: string | null;
|
|
12
|
+
timeout?: number | null;
|
|
13
|
+
port?: number;
|
|
14
|
+
keepAlive?: boolean | null;
|
|
15
|
+
keepAliveInitialDelay?: number | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Options {
|
|
19
|
+
hostname: string
|
|
20
|
+
host?: string
|
|
21
|
+
protocol: string
|
|
22
|
+
port: string
|
|
23
|
+
servername?: string
|
|
24
|
+
localAddress?: string | null
|
|
25
|
+
httpSocket?: Socket
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Callback = (...args: CallbackArgs) => void
|
|
29
|
+
type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
|
|
30
|
+
|
|
31
|
+
export interface connector {
|
|
32
|
+
(options: buildConnector.Options, callback: buildConnector.Callback): void
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
interface MIMEType {
|
|
4
|
+
type: string
|
|
5
|
+
subtype: string
|
|
6
|
+
parameters: Map<string, string>
|
|
7
|
+
essence: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Parse a string to a {@link MIMEType} object. Returns `failure` if the string
|
|
12
|
+
* couldn't be parsed.
|
|
13
|
+
* @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
|
|
14
|
+
*/
|
|
15
|
+
export function parseMIMEType (input: string): 'failure' | MIMEType
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Convert a MIMEType object to a string.
|
|
19
|
+
* @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
|
|
20
|
+
*/
|
|
21
|
+
export function serializeAMimeType (mimeType: MIMEType): string
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import type { Headers } from './fetch'
|
|
4
|
+
|
|
5
|
+
export interface Cookie {
|
|
6
|
+
name: string
|
|
7
|
+
value: string
|
|
8
|
+
expires?: Date | number
|
|
9
|
+
maxAge?: number
|
|
10
|
+
domain?: string
|
|
11
|
+
path?: string
|
|
12
|
+
secure?: boolean
|
|
13
|
+
httpOnly?: boolean
|
|
14
|
+
sameSite?: 'Strict' | 'Lax' | 'None'
|
|
15
|
+
unparsed?: string[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function deleteCookie (
|
|
19
|
+
headers: Headers,
|
|
20
|
+
name: string,
|
|
21
|
+
attributes?: { name?: string, domain?: string }
|
|
22
|
+
): void
|
|
23
|
+
|
|
24
|
+
export function getCookies (headers: Headers): Record<string, string>
|
|
25
|
+
|
|
26
|
+
export function getSetCookies (headers: Headers): Cookie[]
|
|
27
|
+
|
|
28
|
+
export function setCookie (headers: Headers, cookie: Cookie): void
|