cdk-ecr-deployment 0.0.76 → 0.0.79
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/.jsii +28 -25
- package/lambda/Dockerfile +25 -0
- package/lambda/install.js +64 -0
- package/lib/index.js +40 -23
- package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
- package/node_modules/@sindresorhus/is/dist/index.js +427 -0
- package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
- package/node_modules/@sindresorhus/is/dist/types.js +3 -0
- package/node_modules/@sindresorhus/is/license +9 -0
- package/node_modules/@sindresorhus/is/package.json +96 -0
- package/node_modules/@sindresorhus/is/readme.md +628 -0
- package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
- package/node_modules/@szmarczak/http-timer/README.md +93 -0
- package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
- package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
- package/node_modules/@szmarczak/http-timer/package.json +72 -0
- package/node_modules/@types/cacheable-request/LICENSE +21 -0
- package/node_modules/@types/cacheable-request/README.md +16 -0
- package/node_modules/@types/cacheable-request/index.d.ts +137 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1365 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +357 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +643 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1004 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3748 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1368 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2738 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1477 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +542 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +798 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1563 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@types/cacheable-request/package.json +35 -0
- package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
- package/node_modules/@types/http-cache-semantics/README.md +16 -0
- package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
- package/node_modules/@types/http-cache-semantics/package.json +25 -0
- package/node_modules/@types/keyv/LICENSE +21 -0
- package/node_modules/@types/keyv/README.md +16 -0
- package/node_modules/@types/keyv/index.d.ts +77 -0
- package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1365 -0
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +357 -0
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +643 -0
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1004 -0
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3748 -0
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
- package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1368 -0
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2738 -0
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1477 -0
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +542 -0
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +798 -0
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1563 -0
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@types/keyv/package.json +32 -0
- package/node_modules/@types/responselike/LICENSE +21 -0
- package/node_modules/@types/responselike/README.md +16 -0
- package/node_modules/@types/responselike/index.d.ts +34 -0
- package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1365 -0
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +357 -0
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +643 -0
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1004 -0
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3748 -0
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
- package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1368 -0
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2738 -0
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1477 -0
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +542 -0
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +798 -0
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1563 -0
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@types/responselike/package.json +25 -0
- package/node_modules/cacheable-lookup/LICENSE +21 -0
- package/node_modules/cacheable-lookup/README.md +240 -0
- package/node_modules/cacheable-lookup/index.d.ts +139 -0
- package/node_modules/cacheable-lookup/package.json +45 -0
- package/node_modules/cacheable-lookup/source/index.js +436 -0
- package/node_modules/cacheable-request/LICENSE +21 -0
- package/node_modules/cacheable-request/README.md +206 -0
- package/node_modules/cacheable-request/package.json +56 -0
- package/node_modules/cacheable-request/src/index.js +251 -0
- package/node_modules/clone-response/LICENSE +21 -0
- package/node_modules/clone-response/README.md +62 -0
- package/node_modules/clone-response/package.json +44 -0
- package/node_modules/clone-response/src/index.js +17 -0
- package/node_modules/decompress-response/index.d.ts +22 -0
- package/node_modules/decompress-response/index.js +58 -0
- package/node_modules/decompress-response/license +9 -0
- package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
- package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
- package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
- package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
- package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
- package/node_modules/decompress-response/package.json +56 -0
- package/node_modules/decompress-response/readme.md +48 -0
- package/node_modules/defer-to-connect/LICENSE +21 -0
- package/node_modules/defer-to-connect/README.md +38 -0
- package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
- package/node_modules/defer-to-connect/dist/source/index.js +47 -0
- package/node_modules/defer-to-connect/package.json +71 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +94 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/get-stream/buffer-stream.js +52 -0
- package/node_modules/get-stream/index.d.ts +108 -0
- package/node_modules/get-stream/index.js +60 -0
- package/node_modules/get-stream/license +9 -0
- package/node_modules/get-stream/package.json +50 -0
- package/node_modules/get-stream/readme.md +124 -0
- package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
- package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
- package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
- package/node_modules/got/dist/source/as-promise/index.js +175 -0
- package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
- package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
- package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
- package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
- package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
- package/node_modules/got/dist/source/as-promise/types.js +40 -0
- package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
- package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
- package/node_modules/got/dist/source/core/index.d.ts +1124 -0
- package/node_modules/got/dist/source/core/index.js +1491 -0
- package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
- package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
- package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
- package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
- package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
- package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
- package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
- package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
- package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
- package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
- package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
- package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
- package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
- package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
- package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
- package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
- package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
- package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
- package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
- package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
- package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
- package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
- package/node_modules/got/dist/source/create.d.ts +5 -0
- package/node_modules/got/dist/source/create.js +240 -0
- package/node_modules/got/dist/source/index.d.ts +4 -0
- package/node_modules/got/dist/source/index.js +132 -0
- package/node_modules/got/dist/source/types.d.ts +342 -0
- package/node_modules/got/dist/source/types.js +2 -0
- package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
- package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
- package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
- package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
- package/node_modules/got/license +9 -0
- package/node_modules/got/package.json +130 -0
- package/node_modules/got/readme.md +2476 -0
- package/node_modules/http-cache-semantics/LICENSE +9 -0
- package/node_modules/http-cache-semantics/README.md +203 -0
- package/node_modules/http-cache-semantics/index.js +673 -0
- package/node_modules/http-cache-semantics/package.json +24 -0
- package/node_modules/http2-wrapper/LICENSE +21 -0
- package/node_modules/http2-wrapper/README.md +470 -0
- package/node_modules/http2-wrapper/package.json +54 -0
- package/node_modules/http2-wrapper/source/agent.js +670 -0
- package/node_modules/http2-wrapper/source/auto.js +149 -0
- package/node_modules/http2-wrapper/source/client-request.js +445 -0
- package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
- package/node_modules/http2-wrapper/source/index.js +28 -0
- package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
- package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
- package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
- package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
- package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
- package/node_modules/json-buffer/.travis.yml +3 -0
- package/node_modules/json-buffer/LICENSE +22 -0
- package/node_modules/json-buffer/README.md +24 -0
- package/node_modules/json-buffer/index.js +58 -0
- package/node_modules/json-buffer/package.json +34 -0
- package/node_modules/json-buffer/test/index.js +63 -0
- package/node_modules/keyv/LICENSE +21 -0
- package/node_modules/keyv/README.md +288 -0
- package/node_modules/keyv/package.json +49 -0
- package/node_modules/keyv/src/index.js +111 -0
- package/node_modules/lowercase-keys/index.d.ts +16 -0
- package/node_modules/lowercase-keys/index.js +10 -0
- package/node_modules/lowercase-keys/license +9 -0
- package/node_modules/lowercase-keys/package.json +38 -0
- package/node_modules/lowercase-keys/readme.md +32 -0
- package/node_modules/mimic-response/index.js +32 -0
- package/node_modules/mimic-response/license +9 -0
- package/node_modules/mimic-response/package.json +37 -0
- package/node_modules/mimic-response/readme.md +54 -0
- package/node_modules/normalize-url/index.d.ts +267 -0
- package/node_modules/normalize-url/index.js +216 -0
- package/node_modules/normalize-url/license +9 -0
- package/node_modules/normalize-url/package.json +50 -0
- package/node_modules/normalize-url/readme.md +286 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/p-cancelable/index.d.ts +176 -0
- package/node_modules/p-cancelable/index.js +111 -0
- package/node_modules/p-cancelable/license +9 -0
- package/node_modules/p-cancelable/package.json +49 -0
- package/node_modules/p-cancelable/readme.md +153 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +65 -0
- package/node_modules/pump/index.js +82 -0
- package/node_modules/pump/package.json +24 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/quick-lru/index.d.ts +97 -0
- package/node_modules/quick-lru/index.js +123 -0
- package/node_modules/quick-lru/license +9 -0
- package/node_modules/quick-lru/package.json +43 -0
- package/node_modules/quick-lru/readme.md +111 -0
- package/node_modules/resolve-alpn/LICENSE +22 -0
- package/node_modules/resolve-alpn/README.md +60 -0
- package/node_modules/resolve-alpn/index.js +43 -0
- package/node_modules/resolve-alpn/package.json +34 -0
- package/node_modules/responselike/LICENSE +19 -0
- package/node_modules/responselike/README.md +77 -0
- package/node_modules/responselike/package.json +38 -0
- package/node_modules/responselike/src/index.js +34 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/package.json +7 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type DnsLookupIpVersion = 'auto' | 'ipv4' | 'ipv6';
|
|
2
|
+
declare type DnsIpFamily = 0 | 4 | 6;
|
|
3
|
+
export declare const isDnsLookupIpVersion: (value: any) => boolean;
|
|
4
|
+
export declare const dnsLookupIpVersionToFamily: (dnsLookupIpVersion: DnsLookupIpVersion) => DnsIpFamily;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0;
|
|
4
|
+
const conversionTable = {
|
|
5
|
+
auto: 0,
|
|
6
|
+
ipv4: 4,
|
|
7
|
+
ipv6: 6
|
|
8
|
+
};
|
|
9
|
+
exports.isDnsLookupIpVersion = (value) => {
|
|
10
|
+
return value in conversionTable;
|
|
11
|
+
};
|
|
12
|
+
exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => {
|
|
13
|
+
if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) {
|
|
14
|
+
return conversionTable[dnsLookupIpVersion];
|
|
15
|
+
}
|
|
16
|
+
throw new Error('Invalid DNS lookup IP version');
|
|
17
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs_1 = require("fs");
|
|
4
|
+
const util_1 = require("util");
|
|
5
|
+
const is_1 = require("@sindresorhus/is");
|
|
6
|
+
const is_form_data_1 = require("./is-form-data");
|
|
7
|
+
const statAsync = util_1.promisify(fs_1.stat);
|
|
8
|
+
exports.default = async (body, headers) => {
|
|
9
|
+
if (headers && 'content-length' in headers) {
|
|
10
|
+
return Number(headers['content-length']);
|
|
11
|
+
}
|
|
12
|
+
if (!body) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
if (is_1.default.string(body)) {
|
|
16
|
+
return Buffer.byteLength(body);
|
|
17
|
+
}
|
|
18
|
+
if (is_1.default.buffer(body)) {
|
|
19
|
+
return body.length;
|
|
20
|
+
}
|
|
21
|
+
if (is_form_data_1.default(body)) {
|
|
22
|
+
return util_1.promisify(body.getLength.bind(body))();
|
|
23
|
+
}
|
|
24
|
+
if (body instanceof fs_1.ReadStream) {
|
|
25
|
+
const { size } = await statAsync(body.path);
|
|
26
|
+
if (size === 0) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return size;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// TODO: Update https://github.com/sindresorhus/get-stream
|
|
4
|
+
const getBuffer = async (stream) => {
|
|
5
|
+
const chunks = [];
|
|
6
|
+
let length = 0;
|
|
7
|
+
for await (const chunk of stream) {
|
|
8
|
+
chunks.push(chunk);
|
|
9
|
+
length += Buffer.byteLength(chunk);
|
|
10
|
+
}
|
|
11
|
+
if (Buffer.isBuffer(chunks[0])) {
|
|
12
|
+
return Buffer.concat(chunks, length);
|
|
13
|
+
}
|
|
14
|
+
return Buffer.from(chunks.join(''));
|
|
15
|
+
};
|
|
16
|
+
exports.default = getBuffer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Readable } from 'stream';
|
|
3
|
+
interface FormData extends Readable {
|
|
4
|
+
getBoundary: () => string;
|
|
5
|
+
getLength: (callback: (error: Error | null, length: number) => void) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: (body: unknown) => body is FormData;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isResponseOk = void 0;
|
|
4
|
+
exports.isResponseOk = (response) => {
|
|
5
|
+
const { statusCode } = response;
|
|
6
|
+
const limitStatusCode = response.request.options.followRedirect ? 299 : 399;
|
|
7
|
+
return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304;
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { URL } from 'url';
|
|
2
|
+
export interface URLOptions {
|
|
3
|
+
href?: string;
|
|
4
|
+
protocol?: string;
|
|
5
|
+
host?: string;
|
|
6
|
+
hostname?: string;
|
|
7
|
+
port?: string | number;
|
|
8
|
+
pathname?: string;
|
|
9
|
+
search?: string;
|
|
10
|
+
searchParams?: unknown;
|
|
11
|
+
path?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: (origin: string, options: URLOptions) => URL;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* istanbul ignore file: deprecated */
|
|
4
|
+
const url_1 = require("url");
|
|
5
|
+
const keys = [
|
|
6
|
+
'protocol',
|
|
7
|
+
'host',
|
|
8
|
+
'hostname',
|
|
9
|
+
'port',
|
|
10
|
+
'pathname',
|
|
11
|
+
'search'
|
|
12
|
+
];
|
|
13
|
+
exports.default = (origin, options) => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
if (options.path) {
|
|
16
|
+
if (options.pathname) {
|
|
17
|
+
throw new TypeError('Parameters `path` and `pathname` are mutually exclusive.');
|
|
18
|
+
}
|
|
19
|
+
if (options.search) {
|
|
20
|
+
throw new TypeError('Parameters `path` and `search` are mutually exclusive.');
|
|
21
|
+
}
|
|
22
|
+
if (options.searchParams) {
|
|
23
|
+
throw new TypeError('Parameters `path` and `searchParams` are mutually exclusive.');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (options.search && options.searchParams) {
|
|
27
|
+
throw new TypeError('Parameters `search` and `searchParams` are mutually exclusive.');
|
|
28
|
+
}
|
|
29
|
+
if (!origin) {
|
|
30
|
+
if (!options.protocol) {
|
|
31
|
+
throw new TypeError('No URL protocol specified');
|
|
32
|
+
}
|
|
33
|
+
origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ''}`;
|
|
34
|
+
}
|
|
35
|
+
const url = new url_1.URL(origin);
|
|
36
|
+
if (options.path) {
|
|
37
|
+
const searchIndex = options.path.indexOf('?');
|
|
38
|
+
if (searchIndex === -1) {
|
|
39
|
+
options.pathname = options.path;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
options.pathname = options.path.slice(0, searchIndex);
|
|
43
|
+
options.search = options.path.slice(searchIndex + 1);
|
|
44
|
+
}
|
|
45
|
+
delete options.path;
|
|
46
|
+
}
|
|
47
|
+
for (const key of keys) {
|
|
48
|
+
if (options[key]) {
|
|
49
|
+
url[key] = options[key].toString();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return url;
|
|
53
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function default_1(from, to, events) {
|
|
4
|
+
const fns = {};
|
|
5
|
+
for (const event of events) {
|
|
6
|
+
fns[event] = (...args) => {
|
|
7
|
+
to.emit(event, ...args);
|
|
8
|
+
};
|
|
9
|
+
from.on(event, fns[event]);
|
|
10
|
+
}
|
|
11
|
+
return () => {
|
|
12
|
+
for (const event of events) {
|
|
13
|
+
from.off(event, fns[event]);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ClientRequest } from 'http';
|
|
2
|
+
declare const reentry: unique symbol;
|
|
3
|
+
interface TimedOutOptions {
|
|
4
|
+
host?: string;
|
|
5
|
+
hostname?: string;
|
|
6
|
+
protocol?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Delays {
|
|
9
|
+
lookup?: number;
|
|
10
|
+
connect?: number;
|
|
11
|
+
secureConnect?: number;
|
|
12
|
+
socket?: number;
|
|
13
|
+
response?: number;
|
|
14
|
+
send?: number;
|
|
15
|
+
request?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare type ErrorCode = 'ETIMEDOUT' | 'ECONNRESET' | 'EADDRINUSE' | 'ECONNREFUSED' | 'EPIPE' | 'ENOTFOUND' | 'ENETUNREACH' | 'EAI_AGAIN';
|
|
18
|
+
export declare class TimeoutError extends Error {
|
|
19
|
+
event: string;
|
|
20
|
+
code: ErrorCode;
|
|
21
|
+
constructor(threshold: number, event: string);
|
|
22
|
+
}
|
|
23
|
+
declare const _default: (request: ClientRequest, delays: Delays, options: TimedOutOptions) => () => void;
|
|
24
|
+
export default _default;
|
|
25
|
+
declare module 'http' {
|
|
26
|
+
interface ClientRequest {
|
|
27
|
+
[reentry]: boolean;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimeoutError = void 0;
|
|
4
|
+
const net = require("net");
|
|
5
|
+
const unhandle_1 = require("./unhandle");
|
|
6
|
+
const reentry = Symbol('reentry');
|
|
7
|
+
const noop = () => { };
|
|
8
|
+
class TimeoutError extends Error {
|
|
9
|
+
constructor(threshold, event) {
|
|
10
|
+
super(`Timeout awaiting '${event}' for ${threshold}ms`);
|
|
11
|
+
this.event = event;
|
|
12
|
+
this.name = 'TimeoutError';
|
|
13
|
+
this.code = 'ETIMEDOUT';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.TimeoutError = TimeoutError;
|
|
17
|
+
exports.default = (request, delays, options) => {
|
|
18
|
+
if (reentry in request) {
|
|
19
|
+
return noop;
|
|
20
|
+
}
|
|
21
|
+
request[reentry] = true;
|
|
22
|
+
const cancelers = [];
|
|
23
|
+
const { once, unhandleAll } = unhandle_1.default();
|
|
24
|
+
const addTimeout = (delay, callback, event) => {
|
|
25
|
+
var _a;
|
|
26
|
+
const timeout = setTimeout(callback, delay, delay, event);
|
|
27
|
+
(_a = timeout.unref) === null || _a === void 0 ? void 0 : _a.call(timeout);
|
|
28
|
+
const cancel = () => {
|
|
29
|
+
clearTimeout(timeout);
|
|
30
|
+
};
|
|
31
|
+
cancelers.push(cancel);
|
|
32
|
+
return cancel;
|
|
33
|
+
};
|
|
34
|
+
const { host, hostname } = options;
|
|
35
|
+
const timeoutHandler = (delay, event) => {
|
|
36
|
+
request.destroy(new TimeoutError(delay, event));
|
|
37
|
+
};
|
|
38
|
+
const cancelTimeouts = () => {
|
|
39
|
+
for (const cancel of cancelers) {
|
|
40
|
+
cancel();
|
|
41
|
+
}
|
|
42
|
+
unhandleAll();
|
|
43
|
+
};
|
|
44
|
+
request.once('error', error => {
|
|
45
|
+
cancelTimeouts();
|
|
46
|
+
// Save original behavior
|
|
47
|
+
/* istanbul ignore next */
|
|
48
|
+
if (request.listenerCount('error') === 0) {
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
request.once('close', cancelTimeouts);
|
|
53
|
+
once(request, 'response', (response) => {
|
|
54
|
+
once(response, 'end', cancelTimeouts);
|
|
55
|
+
});
|
|
56
|
+
if (typeof delays.request !== 'undefined') {
|
|
57
|
+
addTimeout(delays.request, timeoutHandler, 'request');
|
|
58
|
+
}
|
|
59
|
+
if (typeof delays.socket !== 'undefined') {
|
|
60
|
+
const socketTimeoutHandler = () => {
|
|
61
|
+
timeoutHandler(delays.socket, 'socket');
|
|
62
|
+
};
|
|
63
|
+
request.setTimeout(delays.socket, socketTimeoutHandler);
|
|
64
|
+
// `request.setTimeout(0)` causes a memory leak.
|
|
65
|
+
// We can just remove the listener and forget about the timer - it's unreffed.
|
|
66
|
+
// See https://github.com/sindresorhus/got/issues/690
|
|
67
|
+
cancelers.push(() => {
|
|
68
|
+
request.removeListener('timeout', socketTimeoutHandler);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
once(request, 'socket', (socket) => {
|
|
72
|
+
var _a;
|
|
73
|
+
const { socketPath } = request;
|
|
74
|
+
/* istanbul ignore next: hard to test */
|
|
75
|
+
if (socket.connecting) {
|
|
76
|
+
const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : '') !== 0);
|
|
77
|
+
if (typeof delays.lookup !== 'undefined' && !hasPath && typeof socket.address().address === 'undefined') {
|
|
78
|
+
const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup');
|
|
79
|
+
once(socket, 'lookup', cancelTimeout);
|
|
80
|
+
}
|
|
81
|
+
if (typeof delays.connect !== 'undefined') {
|
|
82
|
+
const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect');
|
|
83
|
+
if (hasPath) {
|
|
84
|
+
once(socket, 'connect', timeConnect());
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
once(socket, 'lookup', (error) => {
|
|
88
|
+
if (error === null) {
|
|
89
|
+
once(socket, 'connect', timeConnect());
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (typeof delays.secureConnect !== 'undefined' && options.protocol === 'https:') {
|
|
95
|
+
once(socket, 'connect', () => {
|
|
96
|
+
const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect');
|
|
97
|
+
once(socket, 'secureConnect', cancelTimeout);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (typeof delays.send !== 'undefined') {
|
|
102
|
+
const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send');
|
|
103
|
+
/* istanbul ignore next: hard to test */
|
|
104
|
+
if (socket.connecting) {
|
|
105
|
+
once(socket, 'connect', () => {
|
|
106
|
+
once(request, 'upload-complete', timeRequest());
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
once(request, 'upload-complete', timeRequest());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
if (typeof delays.response !== 'undefined') {
|
|
115
|
+
once(request, 'upload-complete', () => {
|
|
116
|
+
const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response');
|
|
117
|
+
once(request, 'response', cancelTimeout);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return cancelTimeouts;
|
|
121
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
declare type Origin = EventEmitter;
|
|
4
|
+
declare type Event = string | symbol;
|
|
5
|
+
declare type Fn = (...args: any[]) => void;
|
|
6
|
+
interface Unhandler {
|
|
7
|
+
once: (origin: Origin, event: Event, fn: Fn) => void;
|
|
8
|
+
unhandleAll: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: () => Unhandler;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// When attaching listeners, it's very easy to forget about them.
|
|
4
|
+
// Especially if you do error handling and set timeouts.
|
|
5
|
+
// So instead of checking if it's proper to throw an error on every timeout ever,
|
|
6
|
+
// use this simple tool which will remove all listeners you have attached.
|
|
7
|
+
exports.default = () => {
|
|
8
|
+
const handlers = [];
|
|
9
|
+
return {
|
|
10
|
+
once(origin, event, fn) {
|
|
11
|
+
origin.once(event, fn);
|
|
12
|
+
handlers.push({ origin, event, fn });
|
|
13
|
+
},
|
|
14
|
+
unhandleAll() {
|
|
15
|
+
for (const handler of handlers) {
|
|
16
|
+
const { origin, event, fn } = handler;
|
|
17
|
+
origin.removeListener(event, fn);
|
|
18
|
+
}
|
|
19
|
+
handlers.length = 0;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { URL, UrlWithStringQuery } from 'url';
|
|
2
|
+
export interface LegacyUrlOptions {
|
|
3
|
+
protocol: string;
|
|
4
|
+
hostname: string;
|
|
5
|
+
host: string;
|
|
6
|
+
hash: string | null;
|
|
7
|
+
search: string | null;
|
|
8
|
+
pathname: string;
|
|
9
|
+
href: string;
|
|
10
|
+
path: string;
|
|
11
|
+
port?: number;
|
|
12
|
+
auth?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: (url: URL | UrlWithStringQuery) => LegacyUrlOptions;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const is_1 = require("@sindresorhus/is");
|
|
4
|
+
exports.default = (url) => {
|
|
5
|
+
// Cast to URL
|
|
6
|
+
url = url;
|
|
7
|
+
const options = {
|
|
8
|
+
protocol: url.protocol,
|
|
9
|
+
hostname: is_1.default.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,
|
|
10
|
+
host: url.host,
|
|
11
|
+
hash: url.hash,
|
|
12
|
+
search: url.search,
|
|
13
|
+
pathname: url.pathname,
|
|
14
|
+
href: url.href,
|
|
15
|
+
path: `${url.pathname || ''}${url.search || ''}`
|
|
16
|
+
};
|
|
17
|
+
if (is_1.default.string(url.port) && url.port.length > 0) {
|
|
18
|
+
options.port = Number(url.port);
|
|
19
|
+
}
|
|
20
|
+
if (url.username || url.password) {
|
|
21
|
+
options.auth = `${url.username || ''}:${url.password || ''}`;
|
|
22
|
+
}
|
|
23
|
+
return options;
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class WeakableMap {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.weakMap = new WeakMap();
|
|
6
|
+
this.map = new Map();
|
|
7
|
+
}
|
|
8
|
+
set(key, value) {
|
|
9
|
+
if (typeof key === 'object') {
|
|
10
|
+
this.weakMap.set(key, value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
this.map.set(key, value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
get(key) {
|
|
17
|
+
if (typeof key === 'object') {
|
|
18
|
+
return this.weakMap.get(key);
|
|
19
|
+
}
|
|
20
|
+
return this.map.get(key);
|
|
21
|
+
}
|
|
22
|
+
has(key) {
|
|
23
|
+
if (typeof key === 'object') {
|
|
24
|
+
return this.weakMap.has(key);
|
|
25
|
+
}
|
|
26
|
+
return this.map.has(key);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = WeakableMap;
|