cdk-ecr-deployment 2.5.6 → 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 +1 -0
- 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
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since v17.0.0
|
|
3
|
+
* @experimental
|
|
4
|
+
*/
|
|
5
|
+
declare module 'readline/promises' {
|
|
6
|
+
import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
|
|
7
|
+
import { Abortable } from 'node:events';
|
|
8
|
+
/**
|
|
9
|
+
* Instances of the `readlinePromises.Interface` class are constructed using the`readlinePromises.createInterface()` method. Every instance is associated with a
|
|
10
|
+
* single `input` `Readable` stream and a single `output` `Writable` stream.
|
|
11
|
+
* The `output` stream is used to print prompts for user input that arrives on,
|
|
12
|
+
* and is read from, the `input` stream.
|
|
13
|
+
* @since v17.0.0
|
|
14
|
+
*/
|
|
15
|
+
class Interface extends _Interface {
|
|
16
|
+
/**
|
|
17
|
+
* The `rl.question()` method displays the `query` by writing it to the `output`,
|
|
18
|
+
* waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
|
|
19
|
+
*
|
|
20
|
+
* When called, `rl.question()` will resume the `input` stream if it has been
|
|
21
|
+
* paused.
|
|
22
|
+
*
|
|
23
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
|
|
24
|
+
*
|
|
25
|
+
* If the question is called after `rl.close()`, it returns a rejected promise.
|
|
26
|
+
*
|
|
27
|
+
* Example usage:
|
|
28
|
+
*
|
|
29
|
+
* ```js
|
|
30
|
+
* const answer = await rl.question('What is your favorite food? ');
|
|
31
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Using an `AbortSignal` to cancel a question.
|
|
35
|
+
*
|
|
36
|
+
* ```js
|
|
37
|
+
* const signal = AbortSignal.timeout(10_000);
|
|
38
|
+
*
|
|
39
|
+
* signal.addEventListener('abort', () => {
|
|
40
|
+
* console.log('The food question timed out');
|
|
41
|
+
* }, { once: true });
|
|
42
|
+
*
|
|
43
|
+
* const answer = await rl.question('What is your favorite food? ', { signal });
|
|
44
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
|
45
|
+
* ```
|
|
46
|
+
* @since v17.0.0
|
|
47
|
+
* @param query A statement or query to write to `output`, prepended to the prompt.
|
|
48
|
+
* @return A promise that is fulfilled with the user's input in response to the `query`.
|
|
49
|
+
*/
|
|
50
|
+
question(query: string): Promise<string>;
|
|
51
|
+
question(query: string, options: Abortable): Promise<string>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @since v17.0.0
|
|
55
|
+
*/
|
|
56
|
+
class Readline {
|
|
57
|
+
/**
|
|
58
|
+
* @param stream A TTY stream.
|
|
59
|
+
*/
|
|
60
|
+
constructor(
|
|
61
|
+
stream: NodeJS.WritableStream,
|
|
62
|
+
options?: {
|
|
63
|
+
autoCommit?: boolean;
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
/**
|
|
67
|
+
* The `rl.clearLine()` method adds to the internal list of pending action an
|
|
68
|
+
* action that clears current line of the associated `stream` in a specified
|
|
69
|
+
* direction identified by `dir`.
|
|
70
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
|
|
71
|
+
* @since v17.0.0
|
|
72
|
+
* @return this
|
|
73
|
+
*/
|
|
74
|
+
clearLine(dir: Direction): this;
|
|
75
|
+
/**
|
|
76
|
+
* The `rl.clearScreenDown()` method adds to the internal list of pending action an
|
|
77
|
+
* action that clears the associated stream from the current position of the
|
|
78
|
+
* cursor down.
|
|
79
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
|
|
80
|
+
* @since v17.0.0
|
|
81
|
+
* @return this
|
|
82
|
+
*/
|
|
83
|
+
clearScreenDown(): this;
|
|
84
|
+
/**
|
|
85
|
+
* The `rl.commit()` method sends all the pending actions to the associated`stream` and clears the internal list of pending actions.
|
|
86
|
+
* @since v17.0.0
|
|
87
|
+
*/
|
|
88
|
+
commit(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* The `rl.cursorTo()` method adds to the internal list of pending action an action
|
|
91
|
+
* that moves cursor to the specified position in the associated `stream`.
|
|
92
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
|
|
93
|
+
* @since v17.0.0
|
|
94
|
+
* @return this
|
|
95
|
+
*/
|
|
96
|
+
cursorTo(x: number, y?: number): this;
|
|
97
|
+
/**
|
|
98
|
+
* The `rl.moveCursor()` method adds to the internal list of pending action an
|
|
99
|
+
* action that moves the cursor _relative_ to its current position in the
|
|
100
|
+
* associated `stream`.
|
|
101
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
|
|
102
|
+
* @since v17.0.0
|
|
103
|
+
* @return this
|
|
104
|
+
*/
|
|
105
|
+
moveCursor(dx: number, dy: number): this;
|
|
106
|
+
/**
|
|
107
|
+
* The `rl.rollback` methods clears the internal list of pending actions without
|
|
108
|
+
* sending it to the associated `stream`.
|
|
109
|
+
* @since v17.0.0
|
|
110
|
+
* @return this
|
|
111
|
+
*/
|
|
112
|
+
rollback(): this;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface`instance.
|
|
116
|
+
*
|
|
117
|
+
* ```js
|
|
118
|
+
* const readlinePromises = require('node:readline/promises');
|
|
119
|
+
* const rl = readlinePromises.createInterface({
|
|
120
|
+
* input: process.stdin,
|
|
121
|
+
* output: process.stdout,
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* Once the `readlinePromises.Interface` instance is created, the most common case
|
|
126
|
+
* is to listen for the `'line'` event:
|
|
127
|
+
*
|
|
128
|
+
* ```js
|
|
129
|
+
* rl.on('line', (line) => {
|
|
130
|
+
* console.log(`Received: ${line}`);
|
|
131
|
+
* });
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* If `terminal` is `true` for this instance then the `output` stream will get
|
|
135
|
+
* the best compatibility if it defines an `output.columns` property and emits
|
|
136
|
+
* a `'resize'` event on the `output` if or when the columns ever change
|
|
137
|
+
* (`process.stdout` does this automatically when it is a TTY).
|
|
138
|
+
* @since v17.0.0
|
|
139
|
+
*/
|
|
140
|
+
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
141
|
+
function createInterface(options: ReadLineOptions): Interface;
|
|
142
|
+
}
|
|
143
|
+
declare module 'node:readline/promises' {
|
|
144
|
+
export * from 'readline/promises';
|
|
145
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
|
|
2
|
+
* The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
|
|
3
3
|
*
|
|
4
4
|
* To use the promise-based APIs:
|
|
5
5
|
*
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* import * as readline from 'node:readline';
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* The following simple example illustrates the basic use of the `readline`
|
|
16
|
+
* The following simple example illustrates the basic use of the `node:readline`module.
|
|
17
17
|
*
|
|
18
18
|
* ```js
|
|
19
19
|
* import * as readline from 'node:readline/promises';
|
|
20
|
-
* import { stdin as input, stdout as output } from 'process';
|
|
20
|
+
* import { stdin as input, stdout as output } from 'node:process';
|
|
21
21
|
*
|
|
22
22
|
* const rl = readline.createInterface({ input, output });
|
|
23
23
|
*
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
|
32
32
|
* received on the `input` stream.
|
|
33
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
33
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
|
|
34
34
|
*/
|
|
35
35
|
declare module 'readline' {
|
|
36
36
|
import { Abortable, EventEmitter } from 'node:events';
|
|
37
|
-
|
|
37
|
+
import * as promises from 'node:readline/promises';
|
|
38
|
+
export { promises };
|
|
39
|
+
export interface Key {
|
|
38
40
|
sequence?: string | undefined;
|
|
39
41
|
name?: string | undefined;
|
|
40
42
|
ctrl?: boolean | undefined;
|
|
@@ -48,7 +50,7 @@ declare module 'readline' {
|
|
|
48
50
|
* and is read from, the `input` stream.
|
|
49
51
|
* @since v0.1.104
|
|
50
52
|
*/
|
|
51
|
-
class Interface extends EventEmitter {
|
|
53
|
+
export class Interface extends EventEmitter {
|
|
52
54
|
readonly terminal: boolean;
|
|
53
55
|
/**
|
|
54
56
|
* The current input data being processed by node.
|
|
@@ -71,7 +73,7 @@ declare module 'readline' {
|
|
|
71
73
|
* const showResults = debounce(() => {
|
|
72
74
|
* console.log(
|
|
73
75
|
* '\n',
|
|
74
|
-
* values.filter((val) => val.startsWith(rl.line)).join(' ')
|
|
76
|
+
* values.filter((val) => val.startsWith(rl.line)).join(' '),
|
|
75
77
|
* );
|
|
76
78
|
* }, 300);
|
|
77
79
|
* process.stdin.on('keypress', (c, k) => {
|
|
@@ -97,7 +99,7 @@ declare module 'readline' {
|
|
|
97
99
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
98
100
|
* > `readline.createInterface()` method.
|
|
99
101
|
*
|
|
100
|
-
* @see https://nodejs.org/dist/latest-
|
|
102
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
|
101
103
|
*/
|
|
102
104
|
protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
|
|
103
105
|
/**
|
|
@@ -106,12 +108,12 @@ declare module 'readline' {
|
|
|
106
108
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
107
109
|
* > `readline.createInterface()` method.
|
|
108
110
|
*
|
|
109
|
-
* @see https://nodejs.org/dist/latest-
|
|
111
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
|
110
112
|
*/
|
|
111
113
|
protected constructor(options: ReadLineOptions);
|
|
112
114
|
/**
|
|
113
115
|
* The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
|
|
114
|
-
* @since v15.3.0
|
|
116
|
+
* @since v15.3.0, v14.17.0
|
|
115
117
|
* @return the current prompt string
|
|
116
118
|
*/
|
|
117
119
|
getPrompt(): string;
|
|
@@ -121,13 +123,13 @@ declare module 'readline' {
|
|
|
121
123
|
*/
|
|
122
124
|
setPrompt(prompt: string): void;
|
|
123
125
|
/**
|
|
124
|
-
* The `rl.prompt()` method writes the `
|
|
126
|
+
* The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
|
|
125
127
|
* location at which to provide input.
|
|
126
128
|
*
|
|
127
129
|
* When called, `rl.prompt()` will resume the `input` stream if it has been
|
|
128
130
|
* paused.
|
|
129
131
|
*
|
|
130
|
-
* If the `
|
|
132
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
|
|
131
133
|
* @since v0.1.98
|
|
132
134
|
* @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
|
|
133
135
|
*/
|
|
@@ -139,12 +141,14 @@ declare module 'readline' {
|
|
|
139
141
|
* When called, `rl.question()` will resume the `input` stream if it has been
|
|
140
142
|
* paused.
|
|
141
143
|
*
|
|
142
|
-
* If the `
|
|
144
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
|
|
143
145
|
*
|
|
144
146
|
* The `callback` function passed to `rl.question()` does not follow the typical
|
|
145
147
|
* pattern of accepting an `Error` object or `null` as the first argument.
|
|
146
148
|
* The `callback` is called with the provided answer as the only argument.
|
|
147
149
|
*
|
|
150
|
+
* An error will be thrown if calling `rl.question()` after `rl.close()`.
|
|
151
|
+
*
|
|
148
152
|
* Example usage:
|
|
149
153
|
*
|
|
150
154
|
* ```js
|
|
@@ -169,25 +173,6 @@ declare module 'readline' {
|
|
|
169
173
|
*
|
|
170
174
|
* setTimeout(() => ac.abort(), 10000);
|
|
171
175
|
* ```
|
|
172
|
-
*
|
|
173
|
-
* If this method is invoked as it's util.promisify()ed version, it returns a
|
|
174
|
-
* Promise that fulfills with the answer. If the question is canceled using
|
|
175
|
-
* an `AbortController` it will reject with an `AbortError`.
|
|
176
|
-
*
|
|
177
|
-
* ```js
|
|
178
|
-
* const util = require('util');
|
|
179
|
-
* const question = util.promisify(rl.question).bind(rl);
|
|
180
|
-
*
|
|
181
|
-
* async function questionExample() {
|
|
182
|
-
* try {
|
|
183
|
-
* const answer = await question('What is you favorite food? ');
|
|
184
|
-
* console.log(`Oh, so your favorite food is ${answer}`);
|
|
185
|
-
* } catch (err) {
|
|
186
|
-
* console.error('Question rejected', err);
|
|
187
|
-
* }
|
|
188
|
-
* }
|
|
189
|
-
* questionExample();
|
|
190
|
-
* ```
|
|
191
176
|
* @since v0.3.3
|
|
192
177
|
* @param query A statement or query to write to `output`, prepended to the prompt.
|
|
193
178
|
* @param callback A callback function that is invoked with the user's input in response to the `query`.
|
|
@@ -198,7 +183,7 @@ declare module 'readline' {
|
|
|
198
183
|
* The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
|
|
199
184
|
* later if necessary.
|
|
200
185
|
*
|
|
201
|
-
* Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `
|
|
186
|
+
* Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
|
|
202
187
|
* @since v0.3.4
|
|
203
188
|
*/
|
|
204
189
|
pause(): this;
|
|
@@ -208,12 +193,12 @@ declare module 'readline' {
|
|
|
208
193
|
*/
|
|
209
194
|
resume(): this;
|
|
210
195
|
/**
|
|
211
|
-
* The `rl.close()` method closes the `
|
|
196
|
+
* The `rl.close()` method closes the `Interface` instance and
|
|
212
197
|
* relinquishes control over the `input` and `output` streams. When called,
|
|
213
198
|
* the `'close'` event will be emitted.
|
|
214
199
|
*
|
|
215
200
|
* Calling `rl.close()` does not immediately stop other events (including `'line'`)
|
|
216
|
-
* from being emitted by the `
|
|
201
|
+
* from being emitted by the `Interface` instance.
|
|
217
202
|
* @since v0.1.98
|
|
218
203
|
*/
|
|
219
204
|
close(): void;
|
|
@@ -228,7 +213,7 @@ declare module 'readline' {
|
|
|
228
213
|
* When called, `rl.write()` will resume the `input` stream if it has been
|
|
229
214
|
* paused.
|
|
230
215
|
*
|
|
231
|
-
* If the `
|
|
216
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
|
|
232
217
|
*
|
|
233
218
|
* ```js
|
|
234
219
|
* rl.write('Delete this!');
|
|
@@ -315,11 +300,11 @@ declare module 'readline' {
|
|
|
315
300
|
prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
|
|
316
301
|
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
317
302
|
}
|
|
318
|
-
type ReadLine = Interface; // type forwarded for backwards compatibility
|
|
319
|
-
type Completer = (line: string) => CompleterResult;
|
|
320
|
-
type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
|
|
321
|
-
type CompleterResult = [string[], string];
|
|
322
|
-
interface ReadLineOptions {
|
|
303
|
+
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
|
304
|
+
export type Completer = (line: string) => CompleterResult;
|
|
305
|
+
export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
|
|
306
|
+
export type CompleterResult = [string[], string];
|
|
307
|
+
export interface ReadLineOptions {
|
|
323
308
|
input: NodeJS.ReadableStream;
|
|
324
309
|
output?: NodeJS.WritableStream | undefined;
|
|
325
310
|
completer?: Completer | AsyncCompleter | undefined;
|
|
@@ -348,10 +333,10 @@ declare module 'readline' {
|
|
|
348
333
|
* The `readline.createInterface()` method creates a new `readline.Interface`instance.
|
|
349
334
|
*
|
|
350
335
|
* ```js
|
|
351
|
-
* const readline = require('readline');
|
|
336
|
+
* const readline = require('node:readline');
|
|
352
337
|
* const rl = readline.createInterface({
|
|
353
338
|
* input: process.stdin,
|
|
354
|
-
* output: process.stdout
|
|
339
|
+
* output: process.stdout,
|
|
355
340
|
* });
|
|
356
341
|
* ```
|
|
357
342
|
*
|
|
@@ -370,18 +355,12 @@ declare module 'readline' {
|
|
|
370
355
|
* (`process.stdout` does this automatically when it is a TTY).
|
|
371
356
|
*
|
|
372
357
|
* When creating a `readline.Interface` using `stdin` as input, the program
|
|
373
|
-
* will not terminate until it receives
|
|
374
|
-
*
|
|
375
|
-
* Windows).
|
|
376
|
-
* If you want your application to exit without waiting for user input, you can `unref()` the standard input stream:
|
|
377
|
-
*
|
|
378
|
-
* ```js
|
|
379
|
-
* process.stdin.unref();
|
|
380
|
-
* ```
|
|
358
|
+
* will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
|
|
359
|
+
* waiting for user input, call `process.stdin.unref()`.
|
|
381
360
|
* @since v0.1.98
|
|
382
361
|
*/
|
|
383
|
-
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
384
|
-
function createInterface(options: ReadLineOptions): Interface;
|
|
362
|
+
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
363
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
385
364
|
/**
|
|
386
365
|
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
|
|
387
366
|
*
|
|
@@ -405,11 +384,11 @@ declare module 'readline' {
|
|
|
405
384
|
* implement a small command-line interface:
|
|
406
385
|
*
|
|
407
386
|
* ```js
|
|
408
|
-
* const readline = require('readline');
|
|
387
|
+
* const readline = require('node:readline');
|
|
409
388
|
* const rl = readline.createInterface({
|
|
410
389
|
* input: process.stdin,
|
|
411
390
|
* output: process.stdout,
|
|
412
|
-
* prompt: 'OHAI> '
|
|
391
|
+
* prompt: 'OHAI> ',
|
|
413
392
|
* });
|
|
414
393
|
*
|
|
415
394
|
* rl.prompt();
|
|
@@ -437,15 +416,15 @@ declare module 'readline' {
|
|
|
437
416
|
* well as a `for await...of` loop:
|
|
438
417
|
*
|
|
439
418
|
* ```js
|
|
440
|
-
* const fs = require('fs');
|
|
441
|
-
* const readline = require('readline');
|
|
419
|
+
* const fs = require('node:fs');
|
|
420
|
+
* const readline = require('node:readline');
|
|
442
421
|
*
|
|
443
422
|
* async function processLineByLine() {
|
|
444
423
|
* const fileStream = fs.createReadStream('input.txt');
|
|
445
424
|
*
|
|
446
425
|
* const rl = readline.createInterface({
|
|
447
426
|
* input: fileStream,
|
|
448
|
-
* crlfDelay: Infinity
|
|
427
|
+
* crlfDelay: Infinity,
|
|
449
428
|
* });
|
|
450
429
|
* // Note: we use the crlfDelay option to recognize all instances of CR LF
|
|
451
430
|
* // ('\r\n') in input.txt as a single line break.
|
|
@@ -462,12 +441,12 @@ declare module 'readline' {
|
|
|
462
441
|
* Alternatively, one could use the `'line'` event:
|
|
463
442
|
*
|
|
464
443
|
* ```js
|
|
465
|
-
* const fs = require('fs');
|
|
466
|
-
* const readline = require('readline');
|
|
444
|
+
* const fs = require('node:fs');
|
|
445
|
+
* const readline = require('node:readline');
|
|
467
446
|
*
|
|
468
447
|
* const rl = readline.createInterface({
|
|
469
448
|
* input: fs.createReadStream('sample.txt'),
|
|
470
|
-
* crlfDelay: Infinity
|
|
449
|
+
* crlfDelay: Infinity,
|
|
471
450
|
* });
|
|
472
451
|
*
|
|
473
452
|
* rl.on('line', (line) => {
|
|
@@ -478,15 +457,15 @@ declare module 'readline' {
|
|
|
478
457
|
* Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
|
|
479
458
|
*
|
|
480
459
|
* ```js
|
|
481
|
-
* const { once } = require('events');
|
|
482
|
-
* const { createReadStream } = require('fs');
|
|
483
|
-
* const { createInterface } = require('readline');
|
|
460
|
+
* const { once } = require('node:events');
|
|
461
|
+
* const { createReadStream } = require('node:fs');
|
|
462
|
+
* const { createInterface } = require('node:readline');
|
|
484
463
|
*
|
|
485
464
|
* (async function processLineByLine() {
|
|
486
465
|
* try {
|
|
487
466
|
* const rl = createInterface({
|
|
488
467
|
* input: createReadStream('big-file.txt'),
|
|
489
|
-
* crlfDelay: Infinity
|
|
468
|
+
* crlfDelay: Infinity,
|
|
490
469
|
* });
|
|
491
470
|
*
|
|
492
471
|
* rl.on('line', (line) => {
|
|
@@ -503,9 +482,9 @@ declare module 'readline' {
|
|
|
503
482
|
* ```
|
|
504
483
|
* @since v0.7.7
|
|
505
484
|
*/
|
|
506
|
-
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
|
507
|
-
type Direction = -1 | 0 | 1;
|
|
508
|
-
interface CursorPos {
|
|
485
|
+
export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
|
486
|
+
export type Direction = -1 | 0 | 1;
|
|
487
|
+
export interface CursorPos {
|
|
509
488
|
rows: number;
|
|
510
489
|
cols: number;
|
|
511
490
|
}
|
|
@@ -516,7 +495,7 @@ declare module 'readline' {
|
|
|
516
495
|
* @param callback Invoked once the operation completes.
|
|
517
496
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
518
497
|
*/
|
|
519
|
-
function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
|
498
|
+
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
|
520
499
|
/**
|
|
521
500
|
* The `readline.clearScreenDown()` method clears the given `TTY` stream from
|
|
522
501
|
* the current position of the cursor down.
|
|
@@ -524,7 +503,7 @@ declare module 'readline' {
|
|
|
524
503
|
* @param callback Invoked once the operation completes.
|
|
525
504
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
526
505
|
*/
|
|
527
|
-
function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
|
506
|
+
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
|
528
507
|
/**
|
|
529
508
|
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
|
530
509
|
* given `TTY` `stream`.
|
|
@@ -532,118 +511,15 @@ declare module 'readline' {
|
|
|
532
511
|
* @param callback Invoked once the operation completes.
|
|
533
512
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
534
513
|
*/
|
|
535
|
-
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
514
|
+
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
536
515
|
/**
|
|
537
516
|
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
|
538
517
|
* position in a given `TTY` `stream`.
|
|
539
|
-
*
|
|
540
|
-
* ## Example: Tiny CLI
|
|
541
|
-
*
|
|
542
|
-
* The following example illustrates the use of `readline.Interface` class to
|
|
543
|
-
* implement a small command-line interface:
|
|
544
|
-
*
|
|
545
|
-
* ```js
|
|
546
|
-
* const readline = require('readline');
|
|
547
|
-
* const rl = readline.createInterface({
|
|
548
|
-
* input: process.stdin,
|
|
549
|
-
* output: process.stdout,
|
|
550
|
-
* prompt: 'OHAI> '
|
|
551
|
-
* });
|
|
552
|
-
*
|
|
553
|
-
* rl.prompt();
|
|
554
|
-
*
|
|
555
|
-
* rl.on('line', (line) => {
|
|
556
|
-
* switch (line.trim()) {
|
|
557
|
-
* case 'hello':
|
|
558
|
-
* console.log('world!');
|
|
559
|
-
* break;
|
|
560
|
-
* default:
|
|
561
|
-
* console.log(`Say what? I might have heard '${line.trim()}'`);
|
|
562
|
-
* break;
|
|
563
|
-
* }
|
|
564
|
-
* rl.prompt();
|
|
565
|
-
* }).on('close', () => {
|
|
566
|
-
* console.log('Have a great day!');
|
|
567
|
-
* process.exit(0);
|
|
568
|
-
* });
|
|
569
|
-
* ```
|
|
570
|
-
*
|
|
571
|
-
* ## Example: Read file stream line-by-Line
|
|
572
|
-
*
|
|
573
|
-
* A common use case for `readline` is to consume an input file one line at a
|
|
574
|
-
* time. The easiest way to do so is leveraging the `fs.ReadStream` API as
|
|
575
|
-
* well as a `for await...of` loop:
|
|
576
|
-
*
|
|
577
|
-
* ```js
|
|
578
|
-
* const fs = require('fs');
|
|
579
|
-
* const readline = require('readline');
|
|
580
|
-
*
|
|
581
|
-
* async function processLineByLine() {
|
|
582
|
-
* const fileStream = fs.createReadStream('input.txt');
|
|
583
|
-
*
|
|
584
|
-
* const rl = readline.createInterface({
|
|
585
|
-
* input: fileStream,
|
|
586
|
-
* crlfDelay: Infinity
|
|
587
|
-
* });
|
|
588
|
-
* // Note: we use the crlfDelay option to recognize all instances of CR LF
|
|
589
|
-
* // ('\r\n') in input.txt as a single line break.
|
|
590
|
-
*
|
|
591
|
-
* for await (const line of rl) {
|
|
592
|
-
* // Each line in input.txt will be successively available here as `line`.
|
|
593
|
-
* console.log(`Line from file: ${line}`);
|
|
594
|
-
* }
|
|
595
|
-
* }
|
|
596
|
-
*
|
|
597
|
-
* processLineByLine();
|
|
598
|
-
* ```
|
|
599
|
-
*
|
|
600
|
-
* Alternatively, one could use the `'line'` event:
|
|
601
|
-
*
|
|
602
|
-
* ```js
|
|
603
|
-
* const fs = require('fs');
|
|
604
|
-
* const readline = require('readline');
|
|
605
|
-
*
|
|
606
|
-
* const rl = readline.createInterface({
|
|
607
|
-
* input: fs.createReadStream('sample.txt'),
|
|
608
|
-
* crlfDelay: Infinity
|
|
609
|
-
* });
|
|
610
|
-
*
|
|
611
|
-
* rl.on('line', (line) => {
|
|
612
|
-
* console.log(`Line from file: ${line}`);
|
|
613
|
-
* });
|
|
614
|
-
* ```
|
|
615
|
-
*
|
|
616
|
-
* Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
|
|
617
|
-
*
|
|
618
|
-
* ```js
|
|
619
|
-
* const { once } = require('events');
|
|
620
|
-
* const { createReadStream } = require('fs');
|
|
621
|
-
* const { createInterface } = require('readline');
|
|
622
|
-
*
|
|
623
|
-
* (async function processLineByLine() {
|
|
624
|
-
* try {
|
|
625
|
-
* const rl = createInterface({
|
|
626
|
-
* input: createReadStream('big-file.txt'),
|
|
627
|
-
* crlfDelay: Infinity
|
|
628
|
-
* });
|
|
629
|
-
*
|
|
630
|
-
* rl.on('line', (line) => {
|
|
631
|
-
* // Process the line.
|
|
632
|
-
* });
|
|
633
|
-
*
|
|
634
|
-
* await once(rl, 'close');
|
|
635
|
-
*
|
|
636
|
-
* console.log('File processed.');
|
|
637
|
-
* } catch (err) {
|
|
638
|
-
* console.error(err);
|
|
639
|
-
* }
|
|
640
|
-
* })();
|
|
641
|
-
* ```
|
|
642
518
|
* @since v0.7.7
|
|
643
519
|
* @param callback Invoked once the operation completes.
|
|
644
520
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
645
521
|
*/
|
|
646
|
-
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
|
522
|
+
export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
|
647
523
|
}
|
|
648
524
|
declare module 'node:readline' {
|
|
649
525
|
export * from 'readline';
|