cdk-ecr-deployment 2.5.5 → 2.5.21
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/.gitattributes +5 -4
- package/.jsii +673 -21
- package/.jsii.tabl.json +1 -0
- package/.projenrc.ts +100 -0
- package/API.md +4 -4
- package/README.md +4 -4
- package/lambda/go.mod +2 -5
- package/lambda/go.sum +39 -14
- package/lib/index.d.ts +7 -65
- package/lib/index.js +7 -45
- package/node_modules/@sindresorhus/is/dist/index.d.ts +12 -7
- package/node_modules/@sindresorhus/is/dist/index.js +9 -4
- package/node_modules/@sindresorhus/is/dist/types.d.ts +1 -0
- package/node_modules/@sindresorhus/is/package.json +1 -1
- package/node_modules/@sindresorhus/is/readme.md +25 -7
- package/node_modules/@types/cacheable-request/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +135 -75
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +67 -38
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +226 -104
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +87 -58
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +29 -29
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +888 -256
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +16 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +52 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +27 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +126 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +6 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +166 -93
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +169 -70
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +301 -126
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +22 -13
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +453 -125
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +74 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +103 -53
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +6 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +20 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +6 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +114 -22
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +36 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +15 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +37 -26
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +96 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +95 -82
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +145 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +51 -175
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +21 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +2 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +983 -824
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +1052 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +26 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +127 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +149 -50
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +30 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +888 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +11 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +66 -56
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +528 -70
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +271 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +421 -34
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +15 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +81 -37
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/cacheable-request/package.json +5 -5
- package/node_modules/@types/keyv/README.md +1 -1
- package/node_modules/@types/keyv/index.d.ts +16 -3
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +135 -75
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +67 -38
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +226 -104
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +87 -58
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +29 -29
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +888 -256
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +16 -16
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +52 -8
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +27 -18
- package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +126 -0
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +6 -5
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +166 -93
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +169 -70
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +301 -126
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +22 -13
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +453 -125
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +74 -46
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +103 -53
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +6 -2
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +20 -16
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +6 -4
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +114 -22
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +36 -14
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +15 -3
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +37 -26
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +96 -15
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +95 -82
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +145 -0
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +51 -175
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +21 -21
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +2 -14
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +983 -824
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +1052 -0
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +26 -1
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +127 -6
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +149 -50
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +30 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +888 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +11 -7
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +66 -56
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +528 -70
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +271 -14
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +421 -34
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +15 -21
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +81 -37
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/@types/keyv/package.json +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +135 -75
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +67 -38
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +226 -104
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +87 -58
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +29 -29
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +888 -256
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +16 -16
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +52 -8
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +27 -18
- package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +126 -0
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +6 -5
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +166 -93
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +169 -70
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +301 -126
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +22 -13
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +453 -125
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +74 -46
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +103 -53
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +6 -2
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +20 -16
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +6 -4
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +114 -22
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +36 -14
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +15 -3
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +37 -26
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +96 -15
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +95 -82
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +145 -0
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +51 -175
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +21 -21
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +2 -14
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +983 -824
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +1052 -0
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +26 -1
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +127 -6
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +149 -50
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +30 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +888 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +11 -7
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +66 -56
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +528 -70
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +271 -14
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +421 -34
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +15 -21
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +81 -37
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +11 -11
- package/node_modules/cacheable-request/package.json +1 -1
- package/node_modules/clone-response/node_modules/mimic-response/index.js +32 -0
- package/node_modules/{get-stream → clone-response/node_modules/mimic-response}/license +1 -1
- package/node_modules/clone-response/node_modules/mimic-response/package.json +37 -0
- package/node_modules/clone-response/node_modules/mimic-response/readme.md +54 -0
- package/node_modules/clone-response/package.json +3 -6
- package/node_modules/got/dist/source/as-promise/index.js +2 -1
- package/node_modules/got/dist/source/core/index.js +8 -0
- package/node_modules/got/dist/source/types.d.ts +8 -8
- package/node_modules/got/package.json +2 -1
- package/node_modules/http-cache-semantics/index.js +4 -3
- package/node_modules/http-cache-semantics/package.json +2 -8
- package/node_modules/keyv/README.md +141 -5
- package/node_modules/keyv/package.json +56 -50
- package/node_modules/keyv/src/index.d.ts +116 -0
- package/node_modules/keyv/src/index.js +179 -24
- package/node_modules/mimic-response/index.js +58 -13
- package/node_modules/mimic-response/license +1 -1
- package/node_modules/mimic-response/package.json +40 -35
- package/node_modules/mimic-response/readme.md +33 -9
- package/node_modules/responselike/package.json +3 -2
- package/package.json +54 -25
- package/rosetta/default.ts-fixture +17 -0
- package/changelog.md +0 -2
- package/node_modules/decompress-response/node_modules/mimic-response/index.js +0 -77
- package/node_modules/decompress-response/node_modules/mimic-response/package.json +0 -42
- package/node_modules/decompress-response/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/keyv/.nyc_output/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
- package/node_modules/keyv/.nyc_output/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
- package/node_modules/keyv/.nyc_output/processinfo/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
- package/node_modules/keyv/.nyc_output/processinfo/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
- package/node_modules/keyv/.nyc_output/processinfo/index.json +0 -1
- package/node_modules/keyv/test/test.js +0 -132
- package/node_modules/keyv/test/testdb.sqlite +0 -0
- package/releasetag.txt +0 -1
- package/version.txt +0 -1
- /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/buffer-stream.js +0 -0
- /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.d.ts +0 -0
- /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.js +0 -0
- /package/node_modules/{decompress-response/node_modules/mimic-response → cacheable-request/node_modules/get-stream}/license +0 -0
- /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/package.json +0 -0
- /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/readme.md +0 -0
- /package/node_modules/{decompress-response/node_modules/mimic-response → mimic-response}/index.d.ts +0 -0
|
@@ -6,64 +6,178 @@ const JSONB = require('json-buffer');
|
|
|
6
6
|
const loadStore = options => {
|
|
7
7
|
const adapters = {
|
|
8
8
|
redis: '@keyv/redis',
|
|
9
|
+
rediss: '@keyv/redis',
|
|
9
10
|
mongodb: '@keyv/mongo',
|
|
10
11
|
mongo: '@keyv/mongo',
|
|
11
12
|
sqlite: '@keyv/sqlite',
|
|
12
13
|
postgresql: '@keyv/postgres',
|
|
13
14
|
postgres: '@keyv/postgres',
|
|
14
15
|
mysql: '@keyv/mysql',
|
|
16
|
+
etcd: '@keyv/etcd',
|
|
17
|
+
offline: '@keyv/offline',
|
|
18
|
+
tiered: '@keyv/tiered',
|
|
15
19
|
};
|
|
16
20
|
if (options.adapter || options.uri) {
|
|
17
|
-
const adapter = options.adapter || /^[
|
|
21
|
+
const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0];
|
|
18
22
|
return new (require(adapters[adapter]))(options);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
return new Map();
|
|
22
26
|
};
|
|
23
27
|
|
|
28
|
+
const iterableAdapters = [
|
|
29
|
+
'sqlite',
|
|
30
|
+
'postgres',
|
|
31
|
+
'mysql',
|
|
32
|
+
'mongo',
|
|
33
|
+
'redis',
|
|
34
|
+
'tiered',
|
|
35
|
+
];
|
|
36
|
+
|
|
24
37
|
class Keyv extends EventEmitter {
|
|
25
|
-
constructor(uri, options) {
|
|
38
|
+
constructor(uri, {emitErrors = true, ...options} = {}) {
|
|
26
39
|
super();
|
|
27
|
-
this.opts =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
options,
|
|
35
|
-
);
|
|
40
|
+
this.opts = {
|
|
41
|
+
namespace: 'keyv',
|
|
42
|
+
serialize: JSONB.stringify,
|
|
43
|
+
deserialize: JSONB.parse,
|
|
44
|
+
...((typeof uri === 'string') ? {uri} : uri),
|
|
45
|
+
...options,
|
|
46
|
+
};
|
|
36
47
|
|
|
37
48
|
if (!this.opts.store) {
|
|
38
|
-
const adapterOptions =
|
|
49
|
+
const adapterOptions = {...this.opts};
|
|
39
50
|
this.opts.store = loadStore(adapterOptions);
|
|
40
51
|
}
|
|
41
52
|
|
|
42
|
-
if (
|
|
53
|
+
if (this.opts.compression) {
|
|
54
|
+
const compression = this.opts.compression;
|
|
55
|
+
this.opts.serialize = compression.serialize.bind(compression);
|
|
56
|
+
this.opts.deserialize = compression.deserialize.bind(compression);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof this.opts.store.on === 'function' && emitErrors) {
|
|
43
60
|
this.opts.store.on('error', error => this.emit('error', error));
|
|
44
61
|
}
|
|
45
62
|
|
|
46
63
|
this.opts.store.namespace = this.opts.namespace;
|
|
64
|
+
|
|
65
|
+
const generateIterator = iterator => async function * () {
|
|
66
|
+
for await (const [key, raw] of typeof iterator === 'function'
|
|
67
|
+
? iterator(this.opts.store.namespace)
|
|
68
|
+
: iterator) {
|
|
69
|
+
const data = this.opts.deserialize(raw);
|
|
70
|
+
if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
75
|
+
this.delete(key);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
yield [this._getKeyUnprefix(key), data.value];
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Attach iterators
|
|
84
|
+
if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) {
|
|
85
|
+
this.iterator = generateIterator(this.opts.store);
|
|
86
|
+
} else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts
|
|
87
|
+
&& this._checkIterableAdaptar()) {
|
|
88
|
+
this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
_checkIterableAdaptar() {
|
|
93
|
+
return iterableAdapters.includes(this.opts.store.opts.dialect)
|
|
94
|
+
|| iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0;
|
|
47
95
|
}
|
|
48
96
|
|
|
49
97
|
_getKeyPrefix(key) {
|
|
50
98
|
return `${this.opts.namespace}:${key}`;
|
|
51
99
|
}
|
|
52
100
|
|
|
101
|
+
_getKeyPrefixArray(keys) {
|
|
102
|
+
return keys.map(key => `${this.opts.namespace}:${key}`);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
_getKeyUnprefix(key) {
|
|
106
|
+
return key
|
|
107
|
+
.split(':')
|
|
108
|
+
.splice(1)
|
|
109
|
+
.join(':');
|
|
110
|
+
}
|
|
111
|
+
|
|
53
112
|
get(key, options) {
|
|
54
|
-
const
|
|
55
|
-
const
|
|
113
|
+
const {store} = this.opts;
|
|
114
|
+
const isArray = Array.isArray(key);
|
|
115
|
+
const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key);
|
|
116
|
+
if (isArray && store.getMany === undefined) {
|
|
117
|
+
const promises = [];
|
|
118
|
+
for (const key of keyPrefixed) {
|
|
119
|
+
promises.push(Promise.resolve()
|
|
120
|
+
.then(() => store.get(key))
|
|
121
|
+
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data))
|
|
122
|
+
.then(data => {
|
|
123
|
+
if (data === undefined || data === null) {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
128
|
+
return this.delete(key).then(() => undefined);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return (options && options.raw) ? data : data.value;
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return Promise.allSettled(promises)
|
|
137
|
+
.then(values => {
|
|
138
|
+
const data = [];
|
|
139
|
+
for (const value of values) {
|
|
140
|
+
data.push(value.value);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return data;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
56
147
|
return Promise.resolve()
|
|
57
|
-
.then(() => store.get(keyPrefixed))
|
|
58
|
-
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data)
|
|
148
|
+
.then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed))
|
|
149
|
+
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data))
|
|
59
150
|
.then(data => {
|
|
60
|
-
if (data === undefined) {
|
|
151
|
+
if (data === undefined || data === null) {
|
|
61
152
|
return undefined;
|
|
62
153
|
}
|
|
63
154
|
|
|
155
|
+
if (isArray) {
|
|
156
|
+
const result = [];
|
|
157
|
+
|
|
158
|
+
for (let row of data) {
|
|
159
|
+
if ((typeof row === 'string')) {
|
|
160
|
+
row = this.opts.deserialize(row);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (row === undefined || row === null) {
|
|
164
|
+
result.push(undefined);
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (typeof row.expires === 'number' && Date.now() > row.expires) {
|
|
169
|
+
this.delete(key).then(() => undefined);
|
|
170
|
+
result.push(undefined);
|
|
171
|
+
} else {
|
|
172
|
+
result.push((options && options.raw) ? row : row.value);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
|
|
64
179
|
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
65
|
-
this.delete(key);
|
|
66
|
-
return undefined;
|
|
180
|
+
return this.delete(key).then(() => undefined);
|
|
67
181
|
}
|
|
68
182
|
|
|
69
183
|
return (options && options.raw) ? data : data.value;
|
|
@@ -80,12 +194,16 @@ class Keyv extends EventEmitter {
|
|
|
80
194
|
ttl = undefined;
|
|
81
195
|
}
|
|
82
196
|
|
|
83
|
-
const {
|
|
197
|
+
const {store} = this.opts;
|
|
84
198
|
|
|
85
199
|
return Promise.resolve()
|
|
86
200
|
.then(() => {
|
|
87
201
|
const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null;
|
|
88
|
-
|
|
202
|
+
if (typeof value === 'symbol') {
|
|
203
|
+
this.emit('error', 'symbol cannot be serialized');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
value = {value, expires};
|
|
89
207
|
return this.opts.serialize(value);
|
|
90
208
|
})
|
|
91
209
|
.then(value => store.set(keyPrefixed, value, ttl))
|
|
@@ -93,17 +211,54 @@ class Keyv extends EventEmitter {
|
|
|
93
211
|
}
|
|
94
212
|
|
|
95
213
|
delete(key) {
|
|
214
|
+
const {store} = this.opts;
|
|
215
|
+
if (Array.isArray(key)) {
|
|
216
|
+
const keyPrefixed = this._getKeyPrefixArray(key);
|
|
217
|
+
if (store.deleteMany === undefined) {
|
|
218
|
+
const promises = [];
|
|
219
|
+
for (const key of keyPrefixed) {
|
|
220
|
+
promises.push(store.delete(key));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return Promise.allSettled(promises)
|
|
224
|
+
.then(values => values.every(x => x.value === true));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return Promise.resolve()
|
|
228
|
+
.then(() => store.deleteMany(keyPrefixed));
|
|
229
|
+
}
|
|
230
|
+
|
|
96
231
|
const keyPrefixed = this._getKeyPrefix(key);
|
|
97
|
-
const { store } = this.opts;
|
|
98
232
|
return Promise.resolve()
|
|
99
233
|
.then(() => store.delete(keyPrefixed));
|
|
100
234
|
}
|
|
101
235
|
|
|
102
236
|
clear() {
|
|
103
|
-
const {
|
|
237
|
+
const {store} = this.opts;
|
|
104
238
|
return Promise.resolve()
|
|
105
239
|
.then(() => store.clear());
|
|
106
240
|
}
|
|
241
|
+
|
|
242
|
+
has(key) {
|
|
243
|
+
const keyPrefixed = this._getKeyPrefix(key);
|
|
244
|
+
const {store} = this.opts;
|
|
245
|
+
return Promise.resolve()
|
|
246
|
+
.then(async () => {
|
|
247
|
+
if (typeof store.has === 'function') {
|
|
248
|
+
return store.has(keyPrefixed);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const value = await store.get(keyPrefixed);
|
|
252
|
+
return value !== undefined;
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
disconnect() {
|
|
257
|
+
const {store} = this.opts;
|
|
258
|
+
if (typeof store.disconnect === 'function') {
|
|
259
|
+
return store.disconnect();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
107
262
|
}
|
|
108
263
|
|
|
109
264
|
module.exports = Keyv;
|
|
@@ -3,30 +3,75 @@
|
|
|
3
3
|
// We define these manually to ensure they're always copied
|
|
4
4
|
// even if they would move up the prototype chain
|
|
5
5
|
// https://nodejs.org/api/http.html#http_class_http_incomingmessage
|
|
6
|
-
const
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'socket',
|
|
6
|
+
const knownProperties = [
|
|
7
|
+
'aborted',
|
|
8
|
+
'complete',
|
|
10
9
|
'headers',
|
|
11
|
-
'trailers',
|
|
12
|
-
'rawHeaders',
|
|
13
|
-
'statusCode',
|
|
14
10
|
'httpVersion',
|
|
15
11
|
'httpVersionMinor',
|
|
16
12
|
'httpVersionMajor',
|
|
13
|
+
'method',
|
|
14
|
+
'rawHeaders',
|
|
17
15
|
'rawTrailers',
|
|
18
|
-
'
|
|
16
|
+
'setTimeout',
|
|
17
|
+
'socket',
|
|
18
|
+
'statusCode',
|
|
19
|
+
'statusMessage',
|
|
20
|
+
'trailers',
|
|
21
|
+
'url'
|
|
19
22
|
];
|
|
20
23
|
|
|
21
24
|
module.exports = (fromStream, toStream) => {
|
|
22
|
-
|
|
25
|
+
if (toStream._readableState.autoDestroy) {
|
|
26
|
+
throw new Error('The second stream must have the `autoDestroy` option set to `false`');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
|
|
30
|
+
|
|
31
|
+
const properties = {};
|
|
23
32
|
|
|
24
|
-
for (const
|
|
25
|
-
// Don't overwrite existing properties
|
|
26
|
-
if (
|
|
33
|
+
for (const property of fromProperties) {
|
|
34
|
+
// Don't overwrite existing properties.
|
|
35
|
+
if (property in toStream) {
|
|
27
36
|
continue;
|
|
28
37
|
}
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
properties[property] = {
|
|
40
|
+
get() {
|
|
41
|
+
const value = fromStream[property];
|
|
42
|
+
const isFunction = typeof value === 'function';
|
|
43
|
+
|
|
44
|
+
return isFunction ? value.bind(fromStream) : value;
|
|
45
|
+
},
|
|
46
|
+
set(value) {
|
|
47
|
+
fromStream[property] = value;
|
|
48
|
+
},
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: false
|
|
51
|
+
};
|
|
31
52
|
}
|
|
53
|
+
|
|
54
|
+
Object.defineProperties(toStream, properties);
|
|
55
|
+
|
|
56
|
+
fromStream.once('aborted', () => {
|
|
57
|
+
toStream.destroy();
|
|
58
|
+
|
|
59
|
+
toStream.emit('aborted');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
fromStream.once('close', () => {
|
|
63
|
+
if (fromStream.complete) {
|
|
64
|
+
if (toStream.readable) {
|
|
65
|
+
toStream.once('end', () => {
|
|
66
|
+
toStream.emit('close');
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
toStream.emit('close');
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
toStream.emit('close');
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return toStream;
|
|
32
77
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
2
|
+
"name": "mimic-response",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "Mimic a Node.js HTTP response stream",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/mimic-response",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=10"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "xo && ava && tsd"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.d.ts",
|
|
21
|
+
"index.js"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"mimic",
|
|
25
|
+
"response",
|
|
26
|
+
"stream",
|
|
27
|
+
"http",
|
|
28
|
+
"https",
|
|
29
|
+
"request",
|
|
30
|
+
"get",
|
|
31
|
+
"core"
|
|
32
|
+
],
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^14.0.1",
|
|
35
|
+
"ava": "^2.4.0",
|
|
36
|
+
"create-test-server": "^2.4.0",
|
|
37
|
+
"p-event": "^4.1.0",
|
|
38
|
+
"pify": "^5.0.0",
|
|
39
|
+
"tsd": "^0.11.0",
|
|
40
|
+
"xo": "^0.30.0"
|
|
41
|
+
}
|
|
37
42
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
# mimic-response [](https://travis-ci.com/sindresorhus/mimic-response)
|
|
2
2
|
|
|
3
3
|
> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
## Install
|
|
7
6
|
|
|
8
7
|
```
|
|
9
8
|
$ npm install mimic-response
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
|
|
13
11
|
## Usage
|
|
14
12
|
|
|
15
13
|
```js
|
|
@@ -25,11 +23,31 @@ console.log(myStream.statusCode);
|
|
|
25
23
|
//=> 200
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
|
|
29
26
|
## API
|
|
30
27
|
|
|
31
28
|
### mimicResponse(from, to)
|
|
32
29
|
|
|
30
|
+
**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const stream = require('stream');
|
|
34
|
+
const mimicResponse = require('mimic-response');
|
|
35
|
+
|
|
36
|
+
const responseStream = getHttpResponseStream();
|
|
37
|
+
|
|
38
|
+
const myStream = new stream.PassThrough({
|
|
39
|
+
destroy(error, callback) {
|
|
40
|
+
responseStream.destroy();
|
|
41
|
+
|
|
42
|
+
callback(error);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
myStream.destroy();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead.
|
|
50
|
+
|
|
33
51
|
#### from
|
|
34
52
|
|
|
35
53
|
Type: `Stream`
|
|
@@ -42,13 +60,19 @@ Type: `Stream`
|
|
|
42
60
|
|
|
43
61
|
Any stream.
|
|
44
62
|
|
|
45
|
-
|
|
46
63
|
## Related
|
|
47
64
|
|
|
48
65
|
- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
|
|
49
66
|
- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
|
|
50
67
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
<div align="center">
|
|
71
|
+
<b>
|
|
72
|
+
<a href="https://tidelift.com/subscription/pkg/npm-mimic-response?utm_source=npm-mimic-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
73
|
+
</b>
|
|
74
|
+
<br>
|
|
75
|
+
<sub>
|
|
76
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
77
|
+
</sub>
|
|
78
|
+
</div>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "responselike",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A response-like object for mocking a Node.js HTTP response stream",
|
|
5
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
5
6
|
"main": "src/index.js",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "xo && nyc ava",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
],
|
|
21
22
|
"repository": {
|
|
22
23
|
"type": "git",
|
|
23
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/sindresorhus/responselike.git"
|
|
24
25
|
},
|
|
25
26
|
"author": "lukechilds",
|
|
26
27
|
"license": "MIT",
|