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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
|
|
3
|
-
* can be accessed using:
|
|
2
|
+
* The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
|
|
3
|
+
* It can be accessed using:
|
|
4
4
|
*
|
|
5
5
|
* ```js
|
|
6
|
-
* const http2 = require('http2');
|
|
6
|
+
* const http2 = require('node:http2');
|
|
7
7
|
* ```
|
|
8
8
|
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http2.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'http2' {
|
|
12
12
|
import EventEmitter = require('node:events');
|
|
@@ -83,7 +83,7 @@ declare module 'http2' {
|
|
|
83
83
|
*/
|
|
84
84
|
readonly destroyed: boolean;
|
|
85
85
|
/**
|
|
86
|
-
* Set
|
|
86
|
+
* Set to `true` if the `END_STREAM` flag was set in the request or response
|
|
87
87
|
* HEADERS frame received, indicating that no additional data should be received
|
|
88
88
|
* and the readable side of the `Http2Stream` will be closed.
|
|
89
89
|
* @since v10.11.0
|
|
@@ -151,7 +151,7 @@ declare module 'http2' {
|
|
|
151
151
|
priority(options: StreamPriorityOptions): void;
|
|
152
152
|
/**
|
|
153
153
|
* ```js
|
|
154
|
-
* const http2 = require('http2');
|
|
154
|
+
* const http2 = require('node:http2');
|
|
155
155
|
* const client = http2.connect('http://example.org:8000');
|
|
156
156
|
* const { NGHTTP2_CANCEL } = http2.constants;
|
|
157
157
|
* const req = client.request({ ':path': '/' });
|
|
@@ -171,7 +171,7 @@ declare module 'http2' {
|
|
|
171
171
|
* trailers can be sent.
|
|
172
172
|
*
|
|
173
173
|
* ```js
|
|
174
|
-
* const http2 = require('http2');
|
|
174
|
+
* const http2 = require('node:http2');
|
|
175
175
|
* const server = http2.createServer();
|
|
176
176
|
* server.on('stream', (stream) => {
|
|
177
177
|
* stream.respond(undefined, { waitForTrailers: true });
|
|
@@ -332,7 +332,7 @@ declare module 'http2' {
|
|
|
332
332
|
* Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument.
|
|
333
333
|
*
|
|
334
334
|
* ```js
|
|
335
|
-
* const http2 = require('http2');
|
|
335
|
+
* const http2 = require('node:http2');
|
|
336
336
|
* const server = http2.createServer();
|
|
337
337
|
* server.on('stream', (stream) => {
|
|
338
338
|
* stream.respond({ ':status': 200 });
|
|
@@ -357,7 +357,7 @@ declare module 'http2' {
|
|
|
357
357
|
pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
|
|
358
358
|
/**
|
|
359
359
|
* ```js
|
|
360
|
-
* const http2 = require('http2');
|
|
360
|
+
* const http2 = require('node:http2');
|
|
361
361
|
* const server = http2.createServer();
|
|
362
362
|
* server.on('stream', (stream) => {
|
|
363
363
|
* stream.respond({ ':status': 200 });
|
|
@@ -365,16 +365,15 @@ declare module 'http2' {
|
|
|
365
365
|
* });
|
|
366
366
|
* ```
|
|
367
367
|
*
|
|
368
|
-
* When the `options.waitForTrailers` option is set, the
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
* header fields to the peer.
|
|
368
|
+
* Initiates a response. When the `options.waitForTrailers` option is set, the`'wantTrailers'` event will be emitted immediately after queuing the last chunk
|
|
369
|
+
* of payload data to be sent. The `http2stream.sendTrailers()` method can then be
|
|
370
|
+
* used to sent trailing header fields to the peer.
|
|
372
371
|
*
|
|
373
372
|
* When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
|
|
374
373
|
* close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
|
|
375
374
|
*
|
|
376
375
|
* ```js
|
|
377
|
-
* const http2 = require('http2');
|
|
376
|
+
* const http2 = require('node:http2');
|
|
378
377
|
* const server = http2.createServer();
|
|
379
378
|
* server.on('stream', (stream) => {
|
|
380
379
|
* stream.respond({ ':status': 200 }, { waitForTrailers: true });
|
|
@@ -397,8 +396,8 @@ declare module 'http2' {
|
|
|
397
396
|
* automatically.
|
|
398
397
|
*
|
|
399
398
|
* ```js
|
|
400
|
-
* const http2 = require('http2');
|
|
401
|
-
* const fs = require('fs');
|
|
399
|
+
* const http2 = require('node:http2');
|
|
400
|
+
* const fs = require('node:fs');
|
|
402
401
|
*
|
|
403
402
|
* const server = http2.createServer();
|
|
404
403
|
* server.on('stream', (stream) => {
|
|
@@ -408,7 +407,7 @@ declare module 'http2' {
|
|
|
408
407
|
* const headers = {
|
|
409
408
|
* 'content-length': stat.size,
|
|
410
409
|
* 'last-modified': stat.mtime.toUTCString(),
|
|
411
|
-
* 'content-type': 'text/plain; charset=utf-8'
|
|
410
|
+
* 'content-type': 'text/plain; charset=utf-8',
|
|
412
411
|
* };
|
|
413
412
|
* stream.respondWithFD(fd, headers);
|
|
414
413
|
* stream.on('close', () => fs.closeSync(fd));
|
|
@@ -439,8 +438,8 @@ declare module 'http2' {
|
|
|
439
438
|
* close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
|
|
440
439
|
*
|
|
441
440
|
* ```js
|
|
442
|
-
* const http2 = require('http2');
|
|
443
|
-
* const fs = require('fs');
|
|
441
|
+
* const http2 = require('node:http2');
|
|
442
|
+
* const fs = require('node:fs');
|
|
444
443
|
*
|
|
445
444
|
* const server = http2.createServer();
|
|
446
445
|
* server.on('stream', (stream) => {
|
|
@@ -450,7 +449,7 @@ declare module 'http2' {
|
|
|
450
449
|
* const headers = {
|
|
451
450
|
* 'content-length': stat.size,
|
|
452
451
|
* 'last-modified': stat.mtime.toUTCString(),
|
|
453
|
-
* 'content-type': 'text/plain; charset=utf-8'
|
|
452
|
+
* 'content-type': 'text/plain; charset=utf-8',
|
|
454
453
|
* };
|
|
455
454
|
* stream.respondWithFD(fd, headers, { waitForTrailers: true });
|
|
456
455
|
* stream.on('wantTrailers', () => {
|
|
@@ -482,7 +481,7 @@ declare module 'http2' {
|
|
|
482
481
|
* Example using a file path:
|
|
483
482
|
*
|
|
484
483
|
* ```js
|
|
485
|
-
* const http2 = require('http2');
|
|
484
|
+
* const http2 = require('node:http2');
|
|
486
485
|
* const server = http2.createServer();
|
|
487
486
|
* server.on('stream', (stream) => {
|
|
488
487
|
* function statCheck(stat, headers) {
|
|
@@ -500,7 +499,7 @@ declare module 'http2' {
|
|
|
500
499
|
* }
|
|
501
500
|
* } catch (err) {
|
|
502
501
|
* // Perform actual error handling.
|
|
503
|
-
* console.
|
|
502
|
+
* console.error(err);
|
|
504
503
|
* }
|
|
505
504
|
* stream.end();
|
|
506
505
|
* }
|
|
@@ -516,7 +515,7 @@ declare module 'http2' {
|
|
|
516
515
|
* results to determine if the file has been modified to return an appropriate`304` response:
|
|
517
516
|
*
|
|
518
517
|
* ```js
|
|
519
|
-
* const http2 = require('http2');
|
|
518
|
+
* const http2 = require('node:http2');
|
|
520
519
|
* const server = http2.createServer();
|
|
521
520
|
* server.on('stream', (stream) => {
|
|
522
521
|
* function statCheck(stat, headers) {
|
|
@@ -549,7 +548,7 @@ declare module 'http2' {
|
|
|
549
548
|
* close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
|
|
550
549
|
*
|
|
551
550
|
* ```js
|
|
552
|
-
* const http2 = require('http2');
|
|
551
|
+
* const http2 = require('node:http2');
|
|
553
552
|
* const server = http2.createServer();
|
|
554
553
|
* server.on('stream', (stream) => {
|
|
555
554
|
* stream.respondWithFile('/some/file',
|
|
@@ -748,7 +747,7 @@ declare module 'http2' {
|
|
|
748
747
|
* the delta.
|
|
749
748
|
*
|
|
750
749
|
* ```js
|
|
751
|
-
* const http2 = require('http2');
|
|
750
|
+
* const http2 = require('node:http2');
|
|
752
751
|
*
|
|
753
752
|
* const server = http2.createServer();
|
|
754
753
|
* const expectedWindowSize = 2 ** 20;
|
|
@@ -780,7 +779,7 @@ declare module 'http2' {
|
|
|
780
779
|
* @since v8.4.0
|
|
781
780
|
* @param callback Callback that is called once the session is connected or right away if the session is already connected.
|
|
782
781
|
*/
|
|
783
|
-
settings(settings: Settings): void;
|
|
782
|
+
settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
|
|
784
783
|
/**
|
|
785
784
|
* Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
|
|
786
785
|
* @since v9.4.0
|
|
@@ -846,14 +845,19 @@ declare module 'http2' {
|
|
|
846
845
|
* For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
|
|
847
846
|
* HTTP/2 request to the connected server.
|
|
848
847
|
*
|
|
848
|
+
* When a `ClientHttp2Session` is first created, the socket may not yet be
|
|
849
|
+
* connected. if `clienthttp2session.request()` is called during this time, the
|
|
850
|
+
* actual request will be deferred until the socket is ready to go.
|
|
851
|
+
* If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
|
|
852
|
+
*
|
|
849
853
|
* This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
|
|
850
854
|
*
|
|
851
855
|
* ```js
|
|
852
|
-
* const http2 = require('http2');
|
|
856
|
+
* const http2 = require('node:http2');
|
|
853
857
|
* const clientSession = http2.connect('https://localhost:1234');
|
|
854
858
|
* const {
|
|
855
859
|
* HTTP2_HEADER_PATH,
|
|
856
|
-
* HTTP2_HEADER_STATUS
|
|
860
|
+
* HTTP2_HEADER_STATUS,
|
|
857
861
|
* } = http2.constants;
|
|
858
862
|
*
|
|
859
863
|
* const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
|
|
@@ -923,7 +927,7 @@ declare module 'http2' {
|
|
|
923
927
|
* Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
|
|
924
928
|
*
|
|
925
929
|
* ```js
|
|
926
|
-
* const http2 = require('http2');
|
|
930
|
+
* const http2 = require('node:http2');
|
|
927
931
|
*
|
|
928
932
|
* const server = http2.createServer();
|
|
929
933
|
* server.on('session', (session) => {
|
|
@@ -964,7 +968,7 @@ declare module 'http2' {
|
|
|
964
968
|
* authoritative responses.
|
|
965
969
|
*
|
|
966
970
|
* ```js
|
|
967
|
-
* const http2 = require('http2');
|
|
971
|
+
* const http2 = require('node:http2');
|
|
968
972
|
* const options = getSecureOptionsSomehow();
|
|
969
973
|
* const server = http2.createSecureServer(options);
|
|
970
974
|
* server.on('stream', (stream) => {
|
|
@@ -990,7 +994,7 @@ declare module 'http2' {
|
|
|
990
994
|
* server using the `http2.createSecureServer()` method:
|
|
991
995
|
*
|
|
992
996
|
* ```js
|
|
993
|
-
* const http2 = require('http2');
|
|
997
|
+
* const http2 = require('node:http2');
|
|
994
998
|
* const options = getSecureOptionsSomehow();
|
|
995
999
|
* options.origins = ['https://example.com', 'https://example.org'];
|
|
996
1000
|
* const server = http2.createSecureServer(options);
|
|
@@ -1048,7 +1052,6 @@ declare module 'http2' {
|
|
|
1048
1052
|
*/
|
|
1049
1053
|
unknownProtocolTimeout?: number | undefined;
|
|
1050
1054
|
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
|
1051
|
-
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
|
1052
1055
|
}
|
|
1053
1056
|
export interface ClientSessionOptions extends SessionOptions {
|
|
1054
1057
|
maxReservedRemoteStreams?: number | undefined;
|
|
@@ -1432,7 +1435,7 @@ declare module 'http2' {
|
|
|
1432
1435
|
*/
|
|
1433
1436
|
readonly headersSent: boolean;
|
|
1434
1437
|
/**
|
|
1435
|
-
* A reference to the original HTTP2 request object.
|
|
1438
|
+
* A reference to the original HTTP2 `request` object.
|
|
1436
1439
|
* @since v15.7.0
|
|
1437
1440
|
*/
|
|
1438
1441
|
readonly req: Http2ServerRequest;
|
|
@@ -1453,7 +1456,7 @@ declare module 'http2' {
|
|
|
1453
1456
|
* All other interactions will be routed directly to the socket.
|
|
1454
1457
|
*
|
|
1455
1458
|
* ```js
|
|
1456
|
-
* const http2 = require('http2');
|
|
1459
|
+
* const http2 = require('node:http2');
|
|
1457
1460
|
* const server = http2.createServer((req, res) => {
|
|
1458
1461
|
* const ip = req.socket.remoteAddress;
|
|
1459
1462
|
* const port = req.socket.remotePort;
|
|
@@ -1636,8 +1639,8 @@ declare module 'http2' {
|
|
|
1636
1639
|
* This sends a chunk of the response body. This method may
|
|
1637
1640
|
* be called multiple times to provide successive parts of the body.
|
|
1638
1641
|
*
|
|
1639
|
-
* In the `http` module, the response body is omitted when the
|
|
1640
|
-
* request is a HEAD request. Similarly, the `204` and `304`
|
|
1642
|
+
* In the `node:http` module, the response body is omitted when the
|
|
1643
|
+
* request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
|
|
1641
1644
|
*
|
|
1642
1645
|
* `chunk` can be a string or a buffer. If `chunk` is a string,
|
|
1643
1646
|
* the second parameter specifies how to encode it into a byte stream.
|
|
@@ -1665,6 +1668,31 @@ declare module 'http2' {
|
|
|
1665
1668
|
* @since v8.4.0
|
|
1666
1669
|
*/
|
|
1667
1670
|
writeContinue(): void;
|
|
1671
|
+
/**
|
|
1672
|
+
* Sends a status `103 Early Hints` to the client with a Link header,
|
|
1673
|
+
* indicating that the user agent can preload/preconnect the linked resources.
|
|
1674
|
+
* The `hints` is an object containing the values of headers to be sent with
|
|
1675
|
+
* early hints message.
|
|
1676
|
+
*
|
|
1677
|
+
* **Example**
|
|
1678
|
+
*
|
|
1679
|
+
* ```js
|
|
1680
|
+
* const earlyHintsLink = '</styles.css>; rel=preload; as=style';
|
|
1681
|
+
* response.writeEarlyHints({
|
|
1682
|
+
* 'link': earlyHintsLink,
|
|
1683
|
+
* });
|
|
1684
|
+
*
|
|
1685
|
+
* const earlyHintsLinks = [
|
|
1686
|
+
* '</styles.css>; rel=preload; as=style',
|
|
1687
|
+
* '</scripts.js>; rel=preload; as=script',
|
|
1688
|
+
* ];
|
|
1689
|
+
* response.writeEarlyHints({
|
|
1690
|
+
* 'link': earlyHintsLinks,
|
|
1691
|
+
* });
|
|
1692
|
+
* ```
|
|
1693
|
+
* @since v18.11.0
|
|
1694
|
+
*/
|
|
1695
|
+
writeEarlyHints(hints: Record<string, string | string[]>): void;
|
|
1668
1696
|
/**
|
|
1669
1697
|
* Sends a response header to the request. The status code is a 3-digit HTTP
|
|
1670
1698
|
* status code, like `404`. The last argument, `headers`, are the response headers.
|
|
@@ -1995,7 +2023,7 @@ declare module 'http2' {
|
|
|
1995
2023
|
* for use with the `HTTP2-Settings` header field.
|
|
1996
2024
|
*
|
|
1997
2025
|
* ```js
|
|
1998
|
-
* const http2 = require('http2');
|
|
2026
|
+
* const http2 = require('node:http2');
|
|
1999
2027
|
*
|
|
2000
2028
|
* const packed = http2.getPackedSettings({ enablePush: false });
|
|
2001
2029
|
*
|
|
@@ -2020,7 +2048,7 @@ declare module 'http2' {
|
|
|
2020
2048
|
* with browser clients.
|
|
2021
2049
|
*
|
|
2022
2050
|
* ```js
|
|
2023
|
-
* const http2 = require('http2');
|
|
2051
|
+
* const http2 = require('node:http2');
|
|
2024
2052
|
*
|
|
2025
2053
|
* // Create an unencrypted HTTP/2 server.
|
|
2026
2054
|
* // Since there are no browsers known that support
|
|
@@ -2031,12 +2059,12 @@ declare module 'http2' {
|
|
|
2031
2059
|
* server.on('stream', (stream, headers) => {
|
|
2032
2060
|
* stream.respond({
|
|
2033
2061
|
* 'content-type': 'text/html; charset=utf-8',
|
|
2034
|
-
* ':status': 200
|
|
2062
|
+
* ':status': 200,
|
|
2035
2063
|
* });
|
|
2036
2064
|
* stream.end('<h1>Hello World</h1>');
|
|
2037
2065
|
* });
|
|
2038
2066
|
*
|
|
2039
|
-
* server.listen(
|
|
2067
|
+
* server.listen(8000);
|
|
2040
2068
|
* ```
|
|
2041
2069
|
* @since v8.4.0
|
|
2042
2070
|
* @param onRequestHandler See `Compatibility API`
|
|
@@ -2047,12 +2075,12 @@ declare module 'http2' {
|
|
|
2047
2075
|
* Returns a `tls.Server` instance that creates and manages `Http2Session`instances.
|
|
2048
2076
|
*
|
|
2049
2077
|
* ```js
|
|
2050
|
-
* const http2 = require('http2');
|
|
2051
|
-
* const fs = require('fs');
|
|
2078
|
+
* const http2 = require('node:http2');
|
|
2079
|
+
* const fs = require('node:fs');
|
|
2052
2080
|
*
|
|
2053
2081
|
* const options = {
|
|
2054
2082
|
* key: fs.readFileSync('server-key.pem'),
|
|
2055
|
-
* cert: fs.readFileSync('server-cert.pem')
|
|
2083
|
+
* cert: fs.readFileSync('server-cert.pem'),
|
|
2056
2084
|
* };
|
|
2057
2085
|
*
|
|
2058
2086
|
* // Create a secure HTTP/2 server
|
|
@@ -2061,12 +2089,12 @@ declare module 'http2' {
|
|
|
2061
2089
|
* server.on('stream', (stream, headers) => {
|
|
2062
2090
|
* stream.respond({
|
|
2063
2091
|
* 'content-type': 'text/html; charset=utf-8',
|
|
2064
|
-
* ':status': 200
|
|
2092
|
+
* ':status': 200,
|
|
2065
2093
|
* });
|
|
2066
2094
|
* stream.end('<h1>Hello World</h1>');
|
|
2067
2095
|
* });
|
|
2068
2096
|
*
|
|
2069
|
-
* server.listen(
|
|
2097
|
+
* server.listen(8443);
|
|
2070
2098
|
* ```
|
|
2071
2099
|
* @since v8.4.0
|
|
2072
2100
|
* @param onRequestHandler See `Compatibility API`
|
|
@@ -2077,7 +2105,7 @@ declare module 'http2' {
|
|
|
2077
2105
|
* Returns a `ClientHttp2Session` instance.
|
|
2078
2106
|
*
|
|
2079
2107
|
* ```js
|
|
2080
|
-
* const http2 = require('http2');
|
|
2108
|
+
* const http2 = require('node:http2');
|
|
2081
2109
|
* const client = http2.connect('https://localhost:1234');
|
|
2082
2110
|
*
|
|
2083
2111
|
* // Use the client
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
3
|
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'https' {
|
|
7
7
|
import { Duplex } from 'node:stream';
|
|
8
8
|
import * as tls from 'node:tls';
|
|
9
9
|
import * as http from 'node:http';
|
|
10
10
|
import { URL } from 'node:url';
|
|
11
|
-
type ServerOptions
|
|
11
|
+
type ServerOptions<
|
|
12
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
13
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
14
|
+
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
|
|
12
15
|
type RequestOptions = http.RequestOptions &
|
|
13
16
|
tls.SecureContextOptions & {
|
|
17
|
+
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
|
|
14
18
|
rejectUnauthorized?: boolean | undefined; // Defaults to true
|
|
15
19
|
servername?: string | undefined; // SNI TLS Extension
|
|
16
20
|
};
|
|
@@ -26,14 +30,33 @@ declare module 'https' {
|
|
|
26
30
|
constructor(options?: AgentOptions);
|
|
27
31
|
options: AgentOptions;
|
|
28
32
|
}
|
|
29
|
-
interface Server
|
|
33
|
+
interface Server<
|
|
34
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
35
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
36
|
+
> extends http.Server<Request, Response> {}
|
|
30
37
|
/**
|
|
31
38
|
* See `http.Server` for more information.
|
|
32
39
|
* @since v0.3.4
|
|
33
40
|
*/
|
|
34
|
-
class Server
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
class Server<
|
|
42
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
43
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
44
|
+
> extends tls.Server {
|
|
45
|
+
constructor(requestListener?: http.RequestListener<Request, Response>);
|
|
46
|
+
constructor(
|
|
47
|
+
options: ServerOptions<Request, Response>,
|
|
48
|
+
requestListener?: http.RequestListener<Request, Response>,
|
|
49
|
+
);
|
|
50
|
+
/**
|
|
51
|
+
* Closes all connections connected to this server.
|
|
52
|
+
* @since v18.2.0
|
|
53
|
+
*/
|
|
54
|
+
closeAllConnections(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Closes all connections connected to this server which are not sending a request or waiting for a response.
|
|
57
|
+
* @since v18.2.0
|
|
58
|
+
*/
|
|
59
|
+
closeIdleConnections(): void;
|
|
37
60
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
38
61
|
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
39
62
|
addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
@@ -45,12 +68,12 @@ declare module 'https' {
|
|
|
45
68
|
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
46
69
|
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
47
70
|
addListener(event: 'listening', listener: () => void): this;
|
|
48
|
-
addListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
49
|
-
addListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
71
|
+
addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
72
|
+
addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
50
73
|
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
51
|
-
addListener(event: 'connect', listener: (req:
|
|
52
|
-
addListener(event: 'request', listener: http.RequestListener): this;
|
|
53
|
-
addListener(event: 'upgrade', listener: (req:
|
|
74
|
+
addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
75
|
+
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
76
|
+
addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
54
77
|
emit(event: string, ...args: any[]): boolean;
|
|
55
78
|
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
|
|
56
79
|
emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
|
|
@@ -62,12 +85,30 @@ declare module 'https' {
|
|
|
62
85
|
emit(event: 'connection', socket: Duplex): boolean;
|
|
63
86
|
emit(event: 'error', err: Error): boolean;
|
|
64
87
|
emit(event: 'listening'): boolean;
|
|
65
|
-
emit(
|
|
66
|
-
|
|
88
|
+
emit(
|
|
89
|
+
event: 'checkContinue',
|
|
90
|
+
req: InstanceType<Request>,
|
|
91
|
+
res: InstanceType<Response> & {
|
|
92
|
+
req: InstanceType<Request>;
|
|
93
|
+
}
|
|
94
|
+
): boolean;
|
|
95
|
+
emit(
|
|
96
|
+
event: 'checkExpectation',
|
|
97
|
+
req: InstanceType<Request>,
|
|
98
|
+
res: InstanceType<Response> & {
|
|
99
|
+
req: InstanceType<Request>;
|
|
100
|
+
}
|
|
101
|
+
): boolean;
|
|
67
102
|
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
|
|
68
|
-
emit(event: 'connect', req:
|
|
69
|
-
emit(
|
|
70
|
-
|
|
103
|
+
emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
104
|
+
emit(
|
|
105
|
+
event: 'request',
|
|
106
|
+
req: InstanceType<Request>,
|
|
107
|
+
res: InstanceType<Response> & {
|
|
108
|
+
req: InstanceType<Request>;
|
|
109
|
+
}
|
|
110
|
+
): boolean;
|
|
111
|
+
emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
|
|
71
112
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
72
113
|
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
73
114
|
on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
@@ -79,12 +120,12 @@ declare module 'https' {
|
|
|
79
120
|
on(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
80
121
|
on(event: 'error', listener: (err: Error) => void): this;
|
|
81
122
|
on(event: 'listening', listener: () => void): this;
|
|
82
|
-
on(event: 'checkContinue', listener: http.RequestListener): this;
|
|
83
|
-
on(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
123
|
+
on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
124
|
+
on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
84
125
|
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
85
|
-
on(event: 'connect', listener: (req:
|
|
86
|
-
on(event: 'request', listener: http.RequestListener): this;
|
|
87
|
-
on(event: 'upgrade', listener: (req:
|
|
126
|
+
on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
127
|
+
on(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
128
|
+
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
88
129
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
89
130
|
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
90
131
|
once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
@@ -96,12 +137,12 @@ declare module 'https' {
|
|
|
96
137
|
once(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
97
138
|
once(event: 'error', listener: (err: Error) => void): this;
|
|
98
139
|
once(event: 'listening', listener: () => void): this;
|
|
99
|
-
once(event: 'checkContinue', listener: http.RequestListener): this;
|
|
100
|
-
once(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
140
|
+
once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
141
|
+
once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
101
142
|
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
102
|
-
once(event: 'connect', listener: (req:
|
|
103
|
-
once(event: 'request', listener: http.RequestListener): this;
|
|
104
|
-
once(event: 'upgrade', listener: (req:
|
|
143
|
+
once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
144
|
+
once(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
145
|
+
once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
105
146
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
106
147
|
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
107
148
|
prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
@@ -113,12 +154,12 @@ declare module 'https' {
|
|
|
113
154
|
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
114
155
|
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
115
156
|
prependListener(event: 'listening', listener: () => void): this;
|
|
116
|
-
prependListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
117
|
-
prependListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
157
|
+
prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
158
|
+
prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
118
159
|
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
119
|
-
prependListener(event: 'connect', listener: (req:
|
|
120
|
-
prependListener(event: 'request', listener: http.RequestListener): this;
|
|
121
|
-
prependListener(event: 'upgrade', listener: (req:
|
|
160
|
+
prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
161
|
+
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
162
|
+
prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
122
163
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
123
164
|
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
124
165
|
prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
@@ -130,22 +171,22 @@ declare module 'https' {
|
|
|
130
171
|
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
131
172
|
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
132
173
|
prependOnceListener(event: 'listening', listener: () => void): this;
|
|
133
|
-
prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
134
|
-
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
174
|
+
prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
|
|
175
|
+
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
|
|
135
176
|
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
136
|
-
prependOnceListener(event: 'connect', listener: (req:
|
|
137
|
-
prependOnceListener(event: 'request', listener: http.RequestListener): this;
|
|
138
|
-
prependOnceListener(event: 'upgrade', listener: (req:
|
|
177
|
+
prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
178
|
+
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
|
|
179
|
+
prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
|
|
139
180
|
}
|
|
140
181
|
/**
|
|
141
182
|
* ```js
|
|
142
183
|
* // curl -k https://localhost:8000/
|
|
143
|
-
* const https = require('https');
|
|
144
|
-
* const fs = require('fs');
|
|
184
|
+
* const https = require('node:https');
|
|
185
|
+
* const fs = require('node:fs');
|
|
145
186
|
*
|
|
146
187
|
* const options = {
|
|
147
188
|
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
148
|
-
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
|
|
189
|
+
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
|
|
149
190
|
* };
|
|
150
191
|
*
|
|
151
192
|
* https.createServer(options, (req, res) => {
|
|
@@ -157,12 +198,12 @@ declare module 'https' {
|
|
|
157
198
|
* Or
|
|
158
199
|
*
|
|
159
200
|
* ```js
|
|
160
|
-
* const https = require('https');
|
|
161
|
-
* const fs = require('fs');
|
|
201
|
+
* const https = require('node:https');
|
|
202
|
+
* const fs = require('node:fs');
|
|
162
203
|
*
|
|
163
204
|
* const options = {
|
|
164
205
|
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
|
|
165
|
-
* passphrase: 'sample'
|
|
206
|
+
* passphrase: 'sample',
|
|
166
207
|
* };
|
|
167
208
|
*
|
|
168
209
|
* https.createServer(options, (req, res) => {
|
|
@@ -174,8 +215,17 @@ declare module 'https' {
|
|
|
174
215
|
* @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
|
|
175
216
|
* @param requestListener A listener to be added to the `'request'` event.
|
|
176
217
|
*/
|
|
177
|
-
function createServer
|
|
178
|
-
|
|
218
|
+
function createServer<
|
|
219
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
220
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
221
|
+
>(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
|
|
222
|
+
function createServer<
|
|
223
|
+
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
|
|
224
|
+
Response extends typeof http.ServerResponse = typeof http.ServerResponse,
|
|
225
|
+
>(
|
|
226
|
+
options: ServerOptions<Request, Response>,
|
|
227
|
+
requestListener?: http.RequestListener<Request, Response>,
|
|
228
|
+
): Server<Request, Response>;
|
|
179
229
|
/**
|
|
180
230
|
* Makes a request to a secure web server.
|
|
181
231
|
*
|
|
@@ -189,13 +239,13 @@ declare module 'https' {
|
|
|
189
239
|
* upload a file with a POST request, then write to the `ClientRequest` object.
|
|
190
240
|
*
|
|
191
241
|
* ```js
|
|
192
|
-
* const https = require('https');
|
|
242
|
+
* const https = require('node:https');
|
|
193
243
|
*
|
|
194
244
|
* const options = {
|
|
195
245
|
* hostname: 'encrypted.google.com',
|
|
196
246
|
* port: 443,
|
|
197
247
|
* path: '/',
|
|
198
|
-
* method: 'GET'
|
|
248
|
+
* method: 'GET',
|
|
199
249
|
* };
|
|
200
250
|
*
|
|
201
251
|
* const req = https.request(options, (res) => {
|
|
@@ -222,7 +272,7 @@ declare module 'https' {
|
|
|
222
272
|
* path: '/',
|
|
223
273
|
* method: 'GET',
|
|
224
274
|
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
225
|
-
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
|
|
275
|
+
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
|
|
226
276
|
* };
|
|
227
277
|
* options.agent = new https.Agent(options);
|
|
228
278
|
*
|
|
@@ -241,7 +291,7 @@ declare module 'https' {
|
|
|
241
291
|
* method: 'GET',
|
|
242
292
|
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
|
|
243
293
|
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
|
|
244
|
-
* agent: false
|
|
294
|
+
* agent: false,
|
|
245
295
|
* };
|
|
246
296
|
*
|
|
247
297
|
* const req = https.request(options, (res) => {
|
|
@@ -262,9 +312,9 @@ declare module 'https' {
|
|
|
262
312
|
* Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
|
|
263
313
|
*
|
|
264
314
|
* ```js
|
|
265
|
-
* const tls = require('tls');
|
|
266
|
-
* const https = require('https');
|
|
267
|
-
* const crypto = require('crypto');
|
|
315
|
+
* const tls = require('node:tls');
|
|
316
|
+
* const https = require('node:https');
|
|
317
|
+
* const crypto = require('node:crypto');
|
|
268
318
|
*
|
|
269
319
|
* function sha256(s) {
|
|
270
320
|
* return crypto.createHash('sha256').update(s).digest('base64');
|
|
@@ -281,7 +331,7 @@ declare module 'https' {
|
|
|
281
331
|
* return err;
|
|
282
332
|
* }
|
|
283
333
|
*
|
|
284
|
-
* // Pin the public key, similar to HPKP pin-
|
|
334
|
+
* // Pin the public key, similar to HPKP pin-sha256 pinning
|
|
285
335
|
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
|
|
286
336
|
* if (sha256(cert.pubkey) !== pubkey256) {
|
|
287
337
|
* const msg = 'Certificate verification error: ' +
|
|
@@ -365,7 +415,7 @@ declare module 'https' {
|
|
|
365
415
|
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
|
|
366
416
|
*
|
|
367
417
|
* ```js
|
|
368
|
-
* const https = require('https');
|
|
418
|
+
* const https = require('node:https');
|
|
369
419
|
*
|
|
370
420
|
* https.get('https://encrypted.google.com/', (res) => {
|
|
371
421
|
* console.log('statusCode:', res.statusCode);
|