cdk-ecr-deployment 3.2.2 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +30 -34
- package/README.md +2 -2
- package/lambda-bin/.gitkeep +0 -0
- package/lambda-bin/bootstrap +0 -0
- package/{lambda → lambda-src}/Makefile +1 -1
- package/lib/index.js +6 -9
- package/package.json +1 -13
- package/lambda/install.js +0 -82
- package/node_modules/@sindresorhus/is/dist/index.d.ts +0 -232
- package/node_modules/@sindresorhus/is/dist/index.js +0 -434
- package/node_modules/@sindresorhus/is/dist/types.d.ts +0 -25
- package/node_modules/@sindresorhus/is/dist/types.js +0 -3
- package/node_modules/@sindresorhus/is/license +0 -9
- package/node_modules/@sindresorhus/is/package.json +0 -96
- package/node_modules/@sindresorhus/is/readme.md +0 -669
- package/node_modules/@szmarczak/http-timer/LICENSE +0 -21
- package/node_modules/@szmarczak/http-timer/README.md +0 -93
- package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +0 -32
- package/node_modules/@szmarczak/http-timer/dist/source/index.js +0 -126
- package/node_modules/@szmarczak/http-timer/package.json +0 -72
- package/node_modules/@types/cacheable-request/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/README.md +0 -16
- package/node_modules/@types/cacheable-request/index.d.ts +0 -137
- package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/cacheable-request/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/cacheable-request/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/cacheable-request/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/cacheable-request/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/cacheable-request/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/cacheable-request/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/cacheable-request/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/cacheable-request/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/cacheable-request/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/cacheable-request/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/cacheable-request/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/cacheable-request/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/cacheable-request/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/cacheable-request/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/cacheable-request/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/cacheable-request/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/cacheable-request/package.json +0 -35
- package/node_modules/@types/http-cache-semantics/LICENSE +0 -21
- package/node_modules/@types/http-cache-semantics/README.md +0 -15
- package/node_modules/@types/http-cache-semantics/index.d.ts +0 -165
- package/node_modules/@types/http-cache-semantics/package.json +0 -25
- package/node_modules/@types/keyv/LICENSE +0 -21
- package/node_modules/@types/keyv/README.md +0 -16
- package/node_modules/@types/keyv/index.d.ts +0 -90
- package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/keyv/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/keyv/package.json +0 -32
- package/node_modules/@types/responselike/LICENSE +0 -21
- package/node_modules/@types/responselike/README.md +0 -48
- package/node_modules/@types/responselike/index.d.ts +0 -29
- package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/responselike/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/responselike/package.json +0 -27
- package/node_modules/cacheable-lookup/LICENSE +0 -21
- package/node_modules/cacheable-lookup/README.md +0 -240
- package/node_modules/cacheable-lookup/index.d.ts +0 -139
- package/node_modules/cacheable-lookup/package.json +0 -45
- package/node_modules/cacheable-lookup/source/index.js +0 -436
- package/node_modules/cacheable-request/LICENSE +0 -21
- package/node_modules/cacheable-request/README.md +0 -206
- package/node_modules/cacheable-request/package.json +0 -56
- package/node_modules/cacheable-request/src/index.js +0 -251
- package/node_modules/clone-response/LICENSE +0 -21
- package/node_modules/clone-response/README.md +0 -62
- package/node_modules/clone-response/node_modules/mimic-response/index.js +0 -32
- package/node_modules/clone-response/node_modules/mimic-response/license +0 -9
- package/node_modules/clone-response/node_modules/mimic-response/package.json +0 -37
- package/node_modules/clone-response/node_modules/mimic-response/readme.md +0 -54
- package/node_modules/clone-response/package.json +0 -41
- package/node_modules/clone-response/src/index.js +0 -17
- package/node_modules/decompress-response/index.d.ts +0 -22
- package/node_modules/decompress-response/index.js +0 -58
- package/node_modules/decompress-response/license +0 -9
- package/node_modules/decompress-response/package.json +0 -56
- package/node_modules/decompress-response/readme.md +0 -48
- package/node_modules/defer-to-connect/LICENSE +0 -21
- package/node_modules/defer-to-connect/README.md +0 -38
- package/node_modules/defer-to-connect/dist/source/index.d.ts +0 -10
- package/node_modules/defer-to-connect/dist/source/index.js +0 -47
- package/node_modules/defer-to-connect/package.json +0 -71
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -94
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/get-stream/buffer-stream.js +0 -52
- package/node_modules/get-stream/index.d.ts +0 -108
- package/node_modules/get-stream/index.js +0 -60
- package/node_modules/get-stream/license +0 -9
- package/node_modules/get-stream/package.json +0 -50
- package/node_modules/get-stream/readme.md +0 -124
- package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +0 -2
- package/node_modules/got/dist/source/as-promise/create-rejection.js +0 -30
- package/node_modules/got/dist/source/as-promise/index.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/index.js +0 -176
- package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/normalize-arguments.js +0 -78
- package/node_modules/got/dist/source/as-promise/parse-body.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/parse-body.js +0 -25
- package/node_modules/got/dist/source/as-promise/types.d.ts +0 -256
- package/node_modules/got/dist/source/as-promise/types.js +0 -42
- package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +0 -5
- package/node_modules/got/dist/source/core/calculate-retry-delay.js +0 -29
- package/node_modules/got/dist/source/core/index.d.ts +0 -1124
- package/node_modules/got/dist/source/core/index.js +0 -1505
- package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +0 -5
- package/node_modules/got/dist/source/core/utils/dns-ip-version.js +0 -17
- package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +0 -3
- package/node_modules/got/dist/source/core/utils/get-body-size.js +0 -32
- package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +0 -4
- package/node_modules/got/dist/source/core/utils/get-buffer.js +0 -16
- package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +0 -8
- package/node_modules/got/dist/source/core/utils/is-form-data.js +0 -4
- package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +0 -2
- package/node_modules/got/dist/source/core/utils/is-response-ok.js +0 -8
- package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +0 -14
- package/node_modules/got/dist/source/core/utils/options-to-url.js +0 -53
- package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +0 -3
- package/node_modules/got/dist/source/core/utils/proxy-events.js +0 -17
- package/node_modules/got/dist/source/core/utils/timed-out.d.ts +0 -29
- package/node_modules/got/dist/source/core/utils/timed-out.js +0 -121
- package/node_modules/got/dist/source/core/utils/unhandle.d.ts +0 -11
- package/node_modules/got/dist/source/core/utils/unhandle.js +0 -22
- package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +0 -15
- package/node_modules/got/dist/source/core/utils/url-to-options.js +0 -24
- package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +0 -8
- package/node_modules/got/dist/source/core/utils/weakable-map.js +0 -29
- package/node_modules/got/dist/source/create.d.ts +0 -5
- package/node_modules/got/dist/source/create.js +0 -240
- package/node_modules/got/dist/source/index.d.ts +0 -4
- package/node_modules/got/dist/source/index.js +0 -132
- package/node_modules/got/dist/source/types.d.ts +0 -344
- package/node_modules/got/dist/source/types.js +0 -2
- package/node_modules/got/dist/source/utils/deep-freeze.d.ts +0 -1
- package/node_modules/got/dist/source/utils/deep-freeze.js +0 -12
- package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +0 -2
- package/node_modules/got/dist/source/utils/deprecation-warning.js +0 -13
- package/node_modules/got/license +0 -9
- package/node_modules/got/package.json +0 -131
- package/node_modules/got/readme.md +0 -2477
- package/node_modules/hpagent/.github/dependabot.yml +0 -8
- package/node_modules/hpagent/.github/workflows/build.yml +0 -29
- package/node_modules/hpagent/LICENSE +0 -21
- package/node_modules/hpagent/README.md +0 -138
- package/node_modules/hpagent/index.d.ts +0 -26
- package/node_modules/hpagent/index.js +0 -101
- package/node_modules/hpagent/index.mjs +0 -5
- package/node_modules/hpagent/package.json +0 -49
- package/node_modules/hpagent/test/got.test.js +0 -111
- package/node_modules/hpagent/test/http-http.test.js +0 -351
- package/node_modules/hpagent/test/http-https.test.js +0 -313
- package/node_modules/hpagent/test/https-http.test.js +0 -313
- package/node_modules/hpagent/test/https-https.test.js +0 -313
- package/node_modules/hpagent/test/index.test-d.ts +0 -45
- package/node_modules/hpagent/test/needle.test.js +0 -103
- package/node_modules/hpagent/test/node-fetch.test.js +0 -103
- package/node_modules/hpagent/test/simple-get.test.js +0 -139
- package/node_modules/hpagent/test/ssl.cert +0 -19
- package/node_modules/hpagent/test/ssl.key +0 -27
- package/node_modules/hpagent/test/utils.js +0 -59
- package/node_modules/http-cache-semantics/LICENSE +0 -9
- package/node_modules/http-cache-semantics/README.md +0 -203
- package/node_modules/http-cache-semantics/index.js +0 -674
- package/node_modules/http-cache-semantics/package.json +0 -18
- package/node_modules/http2-wrapper/LICENSE +0 -21
- package/node_modules/http2-wrapper/README.md +0 -470
- package/node_modules/http2-wrapper/package.json +0 -54
- package/node_modules/http2-wrapper/source/agent.js +0 -670
- package/node_modules/http2-wrapper/source/auto.js +0 -149
- package/node_modules/http2-wrapper/source/client-request.js +0 -445
- package/node_modules/http2-wrapper/source/incoming-message.js +0 -58
- package/node_modules/http2-wrapper/source/index.js +0 -28
- package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +0 -27
- package/node_modules/http2-wrapper/source/utils/errors.js +0 -45
- package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +0 -13
- package/node_modules/http2-wrapper/source/utils/proxy-events.js +0 -7
- package/node_modules/http2-wrapper/source/utils/url-to-options.js +0 -25
- package/node_modules/json-buffer/.travis.yml +0 -3
- package/node_modules/json-buffer/LICENSE +0 -22
- package/node_modules/json-buffer/README.md +0 -24
- package/node_modules/json-buffer/index.js +0 -58
- package/node_modules/json-buffer/package.json +0 -34
- package/node_modules/json-buffer/test/index.js +0 -63
- package/node_modules/keyv/README.md +0 -429
- package/node_modules/keyv/package.json +0 -57
- package/node_modules/keyv/src/index.d.ts +0 -112
- package/node_modules/keyv/src/index.js +0 -259
- package/node_modules/lowercase-keys/index.d.ts +0 -16
- package/node_modules/lowercase-keys/index.js +0 -10
- package/node_modules/lowercase-keys/license +0 -9
- package/node_modules/lowercase-keys/package.json +0 -38
- package/node_modules/lowercase-keys/readme.md +0 -32
- package/node_modules/mimic-response/index.d.ts +0 -17
- package/node_modules/mimic-response/index.js +0 -77
- package/node_modules/mimic-response/license +0 -9
- package/node_modules/mimic-response/package.json +0 -42
- package/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/normalize-url/index.d.ts +0 -267
- package/node_modules/normalize-url/index.js +0 -216
- package/node_modules/normalize-url/license +0 -9
- package/node_modules/normalize-url/package.json +0 -50
- package/node_modules/normalize-url/readme.md +0 -286
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/p-cancelable/index.d.ts +0 -176
- package/node_modules/p-cancelable/index.js +0 -111
- package/node_modules/p-cancelable/license +0 -9
- package/node_modules/p-cancelable/package.json +0 -49
- package/node_modules/p-cancelable/readme.md +0 -153
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -24
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/quick-lru/index.d.ts +0 -97
- package/node_modules/quick-lru/index.js +0 -123
- package/node_modules/quick-lru/license +0 -9
- package/node_modules/quick-lru/package.json +0 -43
- package/node_modules/quick-lru/readme.md +0 -111
- package/node_modules/resolve-alpn/LICENSE +0 -22
- package/node_modules/resolve-alpn/README.md +0 -60
- package/node_modules/resolve-alpn/index.js +0 -43
- package/node_modules/resolve-alpn/package.json +0 -34
- package/node_modules/responselike/LICENSE +0 -19
- package/node_modules/responselike/README.md +0 -77
- package/node_modules/responselike/package.json +0 -39
- package/node_modules/responselike/src/index.js +0 -34
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- /package/{lambda → lambda-src}/.dockerignore +0 -0
- /package/{lambda → lambda-src}/Dockerfile +0 -0
- /package/{lambda → lambda-src}/go.mod +0 -0
- /package/{lambda → lambda-src}/go.sum +0 -0
- /package/{lambda → lambda-src}/internal/iolimits/iolimits.go +0 -0
- /package/{lambda → lambda-src}/internal/iolimits/iolimits_test.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/reader.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/reader_test.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/s3file.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/s3file_test.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/src.go +0 -0
- /package/{lambda → lambda-src}/internal/tarfile/types.go +0 -0
- /package/{lambda → lambda-src}/main.go +0 -0
- /package/{lambda → lambda-src}/main_test.go +0 -0
- /package/{lambda → lambda-src}/s3/src.go +0 -0
- /package/{lambda → lambda-src}/s3/transport.go +0 -0
- /package/{lambda → lambda-src}/s3/transport_test.go +0 -0
- /package/{lambda → lambda-src}/utils.go +0 -0
- /package/{lambda → lambda-src}/utils_test.go +0 -0
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const http = require('http');
|
|
3
|
-
const https = require('https');
|
|
4
|
-
const resolveALPN = require('resolve-alpn');
|
|
5
|
-
const QuickLRU = require('quick-lru');
|
|
6
|
-
const Http2ClientRequest = require('./client-request');
|
|
7
|
-
const calculateServerName = require('./utils/calculate-server-name');
|
|
8
|
-
const urlToOptions = require('./utils/url-to-options');
|
|
9
|
-
|
|
10
|
-
const cache = new QuickLRU({maxSize: 100});
|
|
11
|
-
const queue = new Map();
|
|
12
|
-
|
|
13
|
-
const installSocket = (agent, socket, options) => {
|
|
14
|
-
socket._httpMessage = {shouldKeepAlive: true};
|
|
15
|
-
|
|
16
|
-
const onFree = () => {
|
|
17
|
-
agent.emit('free', socket, options);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
socket.on('free', onFree);
|
|
21
|
-
|
|
22
|
-
const onClose = () => {
|
|
23
|
-
agent.removeSocket(socket, options);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
socket.on('close', onClose);
|
|
27
|
-
|
|
28
|
-
const onRemove = () => {
|
|
29
|
-
agent.removeSocket(socket, options);
|
|
30
|
-
socket.off('close', onClose);
|
|
31
|
-
socket.off('free', onFree);
|
|
32
|
-
socket.off('agentRemove', onRemove);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
socket.on('agentRemove', onRemove);
|
|
36
|
-
|
|
37
|
-
agent.emit('free', socket, options);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const resolveProtocol = async options => {
|
|
41
|
-
const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`;
|
|
42
|
-
|
|
43
|
-
if (!cache.has(name)) {
|
|
44
|
-
if (queue.has(name)) {
|
|
45
|
-
const result = await queue.get(name);
|
|
46
|
-
return result.alpnProtocol;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const {path, agent} = options;
|
|
50
|
-
options.path = options.socketPath;
|
|
51
|
-
|
|
52
|
-
const resultPromise = resolveALPN(options);
|
|
53
|
-
queue.set(name, resultPromise);
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
const {socket, alpnProtocol} = await resultPromise;
|
|
57
|
-
cache.set(name, alpnProtocol);
|
|
58
|
-
|
|
59
|
-
options.path = path;
|
|
60
|
-
|
|
61
|
-
if (alpnProtocol === 'h2') {
|
|
62
|
-
// https://github.com/nodejs/node/issues/33343
|
|
63
|
-
socket.destroy();
|
|
64
|
-
} else {
|
|
65
|
-
const {globalAgent} = https;
|
|
66
|
-
const defaultCreateConnection = https.Agent.prototype.createConnection;
|
|
67
|
-
|
|
68
|
-
if (agent) {
|
|
69
|
-
if (agent.createConnection === defaultCreateConnection) {
|
|
70
|
-
installSocket(agent, socket, options);
|
|
71
|
-
} else {
|
|
72
|
-
socket.destroy();
|
|
73
|
-
}
|
|
74
|
-
} else if (globalAgent.createConnection === defaultCreateConnection) {
|
|
75
|
-
installSocket(globalAgent, socket, options);
|
|
76
|
-
} else {
|
|
77
|
-
socket.destroy();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
queue.delete(name);
|
|
82
|
-
|
|
83
|
-
return alpnProtocol;
|
|
84
|
-
} catch (error) {
|
|
85
|
-
queue.delete(name);
|
|
86
|
-
|
|
87
|
-
throw error;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return cache.get(name);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
module.exports = async (input, options, callback) => {
|
|
95
|
-
if (typeof input === 'string' || input instanceof URL) {
|
|
96
|
-
input = urlToOptions(new URL(input));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (typeof options === 'function') {
|
|
100
|
-
callback = options;
|
|
101
|
-
options = undefined;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
options = {
|
|
105
|
-
ALPNProtocols: ['h2', 'http/1.1'],
|
|
106
|
-
...input,
|
|
107
|
-
...options,
|
|
108
|
-
resolveSocket: true
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) {
|
|
112
|
-
throw new Error('The `ALPNProtocols` option must be an Array with at least one entry');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
options.protocol = options.protocol || 'https:';
|
|
116
|
-
const isHttps = options.protocol === 'https:';
|
|
117
|
-
|
|
118
|
-
options.host = options.hostname || options.host || 'localhost';
|
|
119
|
-
options.session = options.tlsSession;
|
|
120
|
-
options.servername = options.servername || calculateServerName(options);
|
|
121
|
-
options.port = options.port || (isHttps ? 443 : 80);
|
|
122
|
-
options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent;
|
|
123
|
-
|
|
124
|
-
const agents = options.agent;
|
|
125
|
-
|
|
126
|
-
if (agents) {
|
|
127
|
-
if (agents.addRequest) {
|
|
128
|
-
throw new Error('The `options.agent` object can contain only `http`, `https` or `http2` properties');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
options.agent = agents[isHttps ? 'https' : 'http'];
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (isHttps) {
|
|
135
|
-
const protocol = await resolveProtocol(options);
|
|
136
|
-
|
|
137
|
-
if (protocol === 'h2') {
|
|
138
|
-
if (agents) {
|
|
139
|
-
options.agent = agents.http2;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return new Http2ClientRequest(options, callback);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return http.request(options, callback);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
module.exports.protocolCache = cache;
|
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const http2 = require('http2');
|
|
3
|
-
const {Writable} = require('stream');
|
|
4
|
-
const {Agent, globalAgent} = require('./agent');
|
|
5
|
-
const IncomingMessage = require('./incoming-message');
|
|
6
|
-
const urlToOptions = require('./utils/url-to-options');
|
|
7
|
-
const proxyEvents = require('./utils/proxy-events');
|
|
8
|
-
const isRequestPseudoHeader = require('./utils/is-request-pseudo-header');
|
|
9
|
-
const {
|
|
10
|
-
ERR_INVALID_ARG_TYPE,
|
|
11
|
-
ERR_INVALID_PROTOCOL,
|
|
12
|
-
ERR_HTTP_HEADERS_SENT,
|
|
13
|
-
ERR_INVALID_HTTP_TOKEN,
|
|
14
|
-
ERR_HTTP_INVALID_HEADER_VALUE,
|
|
15
|
-
ERR_INVALID_CHAR
|
|
16
|
-
} = require('./utils/errors');
|
|
17
|
-
|
|
18
|
-
const {
|
|
19
|
-
HTTP2_HEADER_STATUS,
|
|
20
|
-
HTTP2_HEADER_METHOD,
|
|
21
|
-
HTTP2_HEADER_PATH,
|
|
22
|
-
HTTP2_METHOD_CONNECT
|
|
23
|
-
} = http2.constants;
|
|
24
|
-
|
|
25
|
-
const kHeaders = Symbol('headers');
|
|
26
|
-
const kOrigin = Symbol('origin');
|
|
27
|
-
const kSession = Symbol('session');
|
|
28
|
-
const kOptions = Symbol('options');
|
|
29
|
-
const kFlushedHeaders = Symbol('flushedHeaders');
|
|
30
|
-
const kJobs = Symbol('jobs');
|
|
31
|
-
|
|
32
|
-
const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/;
|
|
33
|
-
const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/;
|
|
34
|
-
|
|
35
|
-
class ClientRequest extends Writable {
|
|
36
|
-
constructor(input, options, callback) {
|
|
37
|
-
super({
|
|
38
|
-
autoDestroy: false
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const hasInput = typeof input === 'string' || input instanceof URL;
|
|
42
|
-
if (hasInput) {
|
|
43
|
-
input = urlToOptions(input instanceof URL ? input : new URL(input));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (typeof options === 'function' || options === undefined) {
|
|
47
|
-
// (options, callback)
|
|
48
|
-
callback = options;
|
|
49
|
-
options = hasInput ? input : {...input};
|
|
50
|
-
} else {
|
|
51
|
-
// (input, options, callback)
|
|
52
|
-
options = {...input, ...options};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (options.h2session) {
|
|
56
|
-
this[kSession] = options.h2session;
|
|
57
|
-
} else if (options.agent === false) {
|
|
58
|
-
this.agent = new Agent({maxFreeSessions: 0});
|
|
59
|
-
} else if (typeof options.agent === 'undefined' || options.agent === null) {
|
|
60
|
-
if (typeof options.createConnection === 'function') {
|
|
61
|
-
// This is a workaround - we don't have to create the session on our own.
|
|
62
|
-
this.agent = new Agent({maxFreeSessions: 0});
|
|
63
|
-
this.agent.createConnection = options.createConnection;
|
|
64
|
-
} else {
|
|
65
|
-
this.agent = globalAgent;
|
|
66
|
-
}
|
|
67
|
-
} else if (typeof options.agent.request === 'function') {
|
|
68
|
-
this.agent = options.agent;
|
|
69
|
-
} else {
|
|
70
|
-
throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], options.agent);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (options.protocol && options.protocol !== 'https:') {
|
|
74
|
-
throw new ERR_INVALID_PROTOCOL(options.protocol, 'https:');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const port = options.port || options.defaultPort || (this.agent && this.agent.defaultPort) || 443;
|
|
78
|
-
const host = options.hostname || options.host || 'localhost';
|
|
79
|
-
|
|
80
|
-
// Don't enforce the origin via options. It may be changed in an Agent.
|
|
81
|
-
delete options.hostname;
|
|
82
|
-
delete options.host;
|
|
83
|
-
delete options.port;
|
|
84
|
-
|
|
85
|
-
const {timeout} = options;
|
|
86
|
-
options.timeout = undefined;
|
|
87
|
-
|
|
88
|
-
this[kHeaders] = Object.create(null);
|
|
89
|
-
this[kJobs] = [];
|
|
90
|
-
|
|
91
|
-
this.socket = null;
|
|
92
|
-
this.connection = null;
|
|
93
|
-
|
|
94
|
-
this.method = options.method || 'GET';
|
|
95
|
-
this.path = options.path;
|
|
96
|
-
|
|
97
|
-
this.res = null;
|
|
98
|
-
this.aborted = false;
|
|
99
|
-
this.reusedSocket = false;
|
|
100
|
-
|
|
101
|
-
if (options.headers) {
|
|
102
|
-
for (const [header, value] of Object.entries(options.headers)) {
|
|
103
|
-
this.setHeader(header, value);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (options.auth && !('authorization' in this[kHeaders])) {
|
|
108
|
-
this[kHeaders].authorization = 'Basic ' + Buffer.from(options.auth).toString('base64');
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
options.session = options.tlsSession;
|
|
112
|
-
options.path = options.socketPath;
|
|
113
|
-
|
|
114
|
-
this[kOptions] = options;
|
|
115
|
-
|
|
116
|
-
// Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field.
|
|
117
|
-
if (port === 443) {
|
|
118
|
-
this[kOrigin] = `https://${host}`;
|
|
119
|
-
|
|
120
|
-
if (!(':authority' in this[kHeaders])) {
|
|
121
|
-
this[kHeaders][':authority'] = host;
|
|
122
|
-
}
|
|
123
|
-
} else {
|
|
124
|
-
this[kOrigin] = `https://${host}:${port}`;
|
|
125
|
-
|
|
126
|
-
if (!(':authority' in this[kHeaders])) {
|
|
127
|
-
this[kHeaders][':authority'] = `${host}:${port}`;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (timeout) {
|
|
132
|
-
this.setTimeout(timeout);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (callback) {
|
|
136
|
-
this.once('response', callback);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
this[kFlushedHeaders] = false;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
get method() {
|
|
143
|
-
return this[kHeaders][HTTP2_HEADER_METHOD];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
set method(value) {
|
|
147
|
-
if (value) {
|
|
148
|
-
this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
get path() {
|
|
153
|
-
return this[kHeaders][HTTP2_HEADER_PATH];
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
set path(value) {
|
|
157
|
-
if (value) {
|
|
158
|
-
this[kHeaders][HTTP2_HEADER_PATH] = value;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
get _mustNotHaveABody() {
|
|
163
|
-
return this.method === 'GET' || this.method === 'HEAD' || this.method === 'DELETE';
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
_write(chunk, encoding, callback) {
|
|
167
|
-
// https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156
|
|
168
|
-
if (this._mustNotHaveABody) {
|
|
169
|
-
callback(new Error('The GET, HEAD and DELETE methods must NOT have a body'));
|
|
170
|
-
/* istanbul ignore next: Node.js 12 throws directly */
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
this.flushHeaders();
|
|
175
|
-
|
|
176
|
-
const callWrite = () => this._request.write(chunk, encoding, callback);
|
|
177
|
-
if (this._request) {
|
|
178
|
-
callWrite();
|
|
179
|
-
} else {
|
|
180
|
-
this[kJobs].push(callWrite);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
_final(callback) {
|
|
185
|
-
if (this.destroyed) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
this.flushHeaders();
|
|
190
|
-
|
|
191
|
-
const callEnd = () => {
|
|
192
|
-
// For GET, HEAD and DELETE
|
|
193
|
-
if (this._mustNotHaveABody) {
|
|
194
|
-
callback();
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
this._request.end(callback);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
if (this._request) {
|
|
202
|
-
callEnd();
|
|
203
|
-
} else {
|
|
204
|
-
this[kJobs].push(callEnd);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
abort() {
|
|
209
|
-
if (this.res && this.res.complete) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (!this.aborted) {
|
|
214
|
-
process.nextTick(() => this.emit('abort'));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
this.aborted = true;
|
|
218
|
-
|
|
219
|
-
this.destroy();
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
_destroy(error, callback) {
|
|
223
|
-
if (this.res) {
|
|
224
|
-
this.res._dump();
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (this._request) {
|
|
228
|
-
this._request.destroy();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
callback(error);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
async flushHeaders() {
|
|
235
|
-
if (this[kFlushedHeaders] || this.destroyed) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
this[kFlushedHeaders] = true;
|
|
240
|
-
|
|
241
|
-
const isConnectMethod = this.method === HTTP2_METHOD_CONNECT;
|
|
242
|
-
|
|
243
|
-
// The real magic is here
|
|
244
|
-
const onStream = stream => {
|
|
245
|
-
this._request = stream;
|
|
246
|
-
|
|
247
|
-
if (this.destroyed) {
|
|
248
|
-
stream.destroy();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// Forwards `timeout`, `continue`, `close` and `error` events to this instance.
|
|
253
|
-
if (!isConnectMethod) {
|
|
254
|
-
proxyEvents(stream, this, ['timeout', 'continue', 'close', 'error']);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Wait for the `finish` event. We don't want to emit the `response` event
|
|
258
|
-
// before `request.end()` is called.
|
|
259
|
-
const waitForEnd = fn => {
|
|
260
|
-
return (...args) => {
|
|
261
|
-
if (!this.writable && !this.destroyed) {
|
|
262
|
-
fn(...args);
|
|
263
|
-
} else {
|
|
264
|
-
this.once('finish', () => {
|
|
265
|
-
fn(...args);
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
// This event tells we are ready to listen for the data.
|
|
272
|
-
stream.once('response', waitForEnd((headers, flags, rawHeaders) => {
|
|
273
|
-
// If we were to emit raw request stream, it would be as fast as the native approach.
|
|
274
|
-
// Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it).
|
|
275
|
-
const response = new IncomingMessage(this.socket, stream.readableHighWaterMark);
|
|
276
|
-
this.res = response;
|
|
277
|
-
|
|
278
|
-
response.req = this;
|
|
279
|
-
response.statusCode = headers[HTTP2_HEADER_STATUS];
|
|
280
|
-
response.headers = headers;
|
|
281
|
-
response.rawHeaders = rawHeaders;
|
|
282
|
-
|
|
283
|
-
response.once('end', () => {
|
|
284
|
-
if (this.aborted) {
|
|
285
|
-
response.aborted = true;
|
|
286
|
-
response.emit('aborted');
|
|
287
|
-
} else {
|
|
288
|
-
response.complete = true;
|
|
289
|
-
|
|
290
|
-
// Has no effect, just be consistent with the Node.js behavior
|
|
291
|
-
response.socket = null;
|
|
292
|
-
response.connection = null;
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
if (isConnectMethod) {
|
|
297
|
-
response.upgrade = true;
|
|
298
|
-
|
|
299
|
-
// The HTTP1 API says the socket is detached here,
|
|
300
|
-
// but we can't do that so we pass the original HTTP2 request.
|
|
301
|
-
if (this.emit('connect', response, stream, Buffer.alloc(0))) {
|
|
302
|
-
this.emit('close');
|
|
303
|
-
} else {
|
|
304
|
-
// No listeners attached, destroy the original request.
|
|
305
|
-
stream.destroy();
|
|
306
|
-
}
|
|
307
|
-
} else {
|
|
308
|
-
// Forwards data
|
|
309
|
-
stream.on('data', chunk => {
|
|
310
|
-
if (!response._dumped && !response.push(chunk)) {
|
|
311
|
-
stream.pause();
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
stream.once('end', () => {
|
|
316
|
-
response.push(null);
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
if (!this.emit('response', response)) {
|
|
320
|
-
// No listeners attached, dump the response.
|
|
321
|
-
response._dump();
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}));
|
|
325
|
-
|
|
326
|
-
// Emits `information` event
|
|
327
|
-
stream.once('headers', waitForEnd(
|
|
328
|
-
headers => this.emit('information', {statusCode: headers[HTTP2_HEADER_STATUS]})
|
|
329
|
-
));
|
|
330
|
-
|
|
331
|
-
stream.once('trailers', waitForEnd((trailers, flags, rawTrailers) => {
|
|
332
|
-
const {res} = this;
|
|
333
|
-
|
|
334
|
-
// Assigns trailers to the response object.
|
|
335
|
-
res.trailers = trailers;
|
|
336
|
-
res.rawTrailers = rawTrailers;
|
|
337
|
-
}));
|
|
338
|
-
|
|
339
|
-
const {socket} = stream.session;
|
|
340
|
-
this.socket = socket;
|
|
341
|
-
this.connection = socket;
|
|
342
|
-
|
|
343
|
-
for (const job of this[kJobs]) {
|
|
344
|
-
job();
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
this.emit('socket', this.socket);
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
// Makes a HTTP2 request
|
|
351
|
-
if (this[kSession]) {
|
|
352
|
-
try {
|
|
353
|
-
onStream(this[kSession].request(this[kHeaders]));
|
|
354
|
-
} catch (error) {
|
|
355
|
-
this.emit('error', error);
|
|
356
|
-
}
|
|
357
|
-
} else {
|
|
358
|
-
this.reusedSocket = true;
|
|
359
|
-
|
|
360
|
-
try {
|
|
361
|
-
onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders]));
|
|
362
|
-
} catch (error) {
|
|
363
|
-
this.emit('error', error);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
getHeader(name) {
|
|
369
|
-
if (typeof name !== 'string') {
|
|
370
|
-
throw new ERR_INVALID_ARG_TYPE('name', 'string', name);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
return this[kHeaders][name.toLowerCase()];
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
get headersSent() {
|
|
377
|
-
return this[kFlushedHeaders];
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
removeHeader(name) {
|
|
381
|
-
if (typeof name !== 'string') {
|
|
382
|
-
throw new ERR_INVALID_ARG_TYPE('name', 'string', name);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
if (this.headersSent) {
|
|
386
|
-
throw new ERR_HTTP_HEADERS_SENT('remove');
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
delete this[kHeaders][name.toLowerCase()];
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
setHeader(name, value) {
|
|
393
|
-
if (this.headersSent) {
|
|
394
|
-
throw new ERR_HTTP_HEADERS_SENT('set');
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (typeof name !== 'string' || (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name))) {
|
|
398
|
-
throw new ERR_INVALID_HTTP_TOKEN('Header name', name);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
if (typeof value === 'undefined') {
|
|
402
|
-
throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
if (isInvalidHeaderValue.test(value)) {
|
|
406
|
-
throw new ERR_INVALID_CHAR('header content', name);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
this[kHeaders][name.toLowerCase()] = value;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
setNoDelay() {
|
|
413
|
-
// HTTP2 sockets cannot be malformed, do nothing.
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
setSocketKeepAlive() {
|
|
417
|
-
// HTTP2 sockets cannot be malformed, do nothing.
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
setTimeout(ms, callback) {
|
|
421
|
-
const applyTimeout = () => this._request.setTimeout(ms, callback);
|
|
422
|
-
|
|
423
|
-
if (this._request) {
|
|
424
|
-
applyTimeout();
|
|
425
|
-
} else {
|
|
426
|
-
this[kJobs].push(applyTimeout);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
return this;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
get maxHeadersCount() {
|
|
433
|
-
if (!this.destroyed && this._request) {
|
|
434
|
-
return this._request.session.localSettings.maxHeaderListSize;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return undefined;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
set maxHeadersCount(_value) {
|
|
441
|
-
// Updating HTTP2 settings would affect all requests, do nothing.
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
module.exports = ClientRequest;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const {Readable} = require('stream');
|
|
3
|
-
|
|
4
|
-
class IncomingMessage extends Readable {
|
|
5
|
-
constructor(socket, highWaterMark) {
|
|
6
|
-
super({
|
|
7
|
-
highWaterMark,
|
|
8
|
-
autoDestroy: false
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
this.statusCode = null;
|
|
12
|
-
this.statusMessage = '';
|
|
13
|
-
this.httpVersion = '2.0';
|
|
14
|
-
this.httpVersionMajor = 2;
|
|
15
|
-
this.httpVersionMinor = 0;
|
|
16
|
-
this.headers = {};
|
|
17
|
-
this.trailers = {};
|
|
18
|
-
this.req = null;
|
|
19
|
-
|
|
20
|
-
this.aborted = false;
|
|
21
|
-
this.complete = false;
|
|
22
|
-
this.upgrade = null;
|
|
23
|
-
|
|
24
|
-
this.rawHeaders = [];
|
|
25
|
-
this.rawTrailers = [];
|
|
26
|
-
|
|
27
|
-
this.socket = socket;
|
|
28
|
-
this.connection = socket;
|
|
29
|
-
|
|
30
|
-
this._dumped = false;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_destroy(error) {
|
|
34
|
-
this.req._request.destroy(error);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
setTimeout(ms, callback) {
|
|
38
|
-
this.req.setTimeout(ms, callback);
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
_dump() {
|
|
43
|
-
if (!this._dumped) {
|
|
44
|
-
this._dumped = true;
|
|
45
|
-
|
|
46
|
-
this.removeAllListeners('data');
|
|
47
|
-
this.resume();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_read() {
|
|
52
|
-
if (this.req) {
|
|
53
|
-
this.req._request.resume();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
module.exports = IncomingMessage;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const http2 = require('http2');
|
|
3
|
-
const agent = require('./agent');
|
|
4
|
-
const ClientRequest = require('./client-request');
|
|
5
|
-
const IncomingMessage = require('./incoming-message');
|
|
6
|
-
const auto = require('./auto');
|
|
7
|
-
|
|
8
|
-
const request = (url, options, callback) => {
|
|
9
|
-
return new ClientRequest(url, options, callback);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const get = (url, options, callback) => {
|
|
13
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
14
|
-
const req = new ClientRequest(url, options, callback);
|
|
15
|
-
req.end();
|
|
16
|
-
|
|
17
|
-
return req;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = {
|
|
21
|
-
...http2,
|
|
22
|
-
ClientRequest,
|
|
23
|
-
IncomingMessage,
|
|
24
|
-
...agent,
|
|
25
|
-
request,
|
|
26
|
-
get,
|
|
27
|
-
auto
|
|
28
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const net = require('net');
|
|
3
|
-
/* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */
|
|
4
|
-
|
|
5
|
-
module.exports = options => {
|
|
6
|
-
let servername = options.host;
|
|
7
|
-
const hostHeader = options.headers && options.headers.host;
|
|
8
|
-
|
|
9
|
-
if (hostHeader) {
|
|
10
|
-
if (hostHeader.startsWith('[')) {
|
|
11
|
-
const index = hostHeader.indexOf(']');
|
|
12
|
-
if (index === -1) {
|
|
13
|
-
servername = hostHeader;
|
|
14
|
-
} else {
|
|
15
|
-
servername = hostHeader.slice(1, -1);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
servername = hostHeader.split(':', 1)[0];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (net.isIP(servername)) {
|
|
23
|
-
return '';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return servername;
|
|
27
|
-
};
|