@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1-alpha.0
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 +2 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +211 -92
- package/node_modules/@types/node/async_hooks.d.ts +103 -19
- package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/node_modules/@types/node/buffer.d.ts +88 -516
- package/node_modules/@types/node/child_process.d.ts +167 -231
- package/node_modules/@types/node/cluster.d.ts +172 -26
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +66 -28
- package/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/node/crypto.d.ts +1458 -497
- package/node_modules/@types/node/dgram.d.ts +44 -30
- package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
- package/node_modules/@types/node/dns/promises.d.ts +120 -42
- package/node_modules/@types/node/dns.d.ts +209 -95
- package/node_modules/@types/node/domain.d.ts +14 -18
- package/node_modules/@types/node/events.d.ts +245 -113
- package/node_modules/@types/node/fs/promises.d.ts +194 -96
- package/node_modules/@types/node/fs.d.ts +695 -270
- package/node_modules/@types/node/globals.d.ts +97 -308
- package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
- package/node_modules/@types/node/http.d.ts +363 -97
- package/node_modules/@types/node/http2.d.ts +684 -231
- package/node_modules/@types/node/https.d.ts +122 -87
- package/node_modules/@types/node/index.d.ts +24 -11
- package/node_modules/@types/node/inspector.d.ts +220 -2690
- package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
- package/node_modules/@types/node/module.d.ts +705 -149
- package/node_modules/@types/node/net.d.ts +178 -54
- package/node_modules/@types/node/os.d.ts +47 -17
- package/node_modules/@types/node/package.json +22 -97
- package/node_modules/@types/node/path.d.ts +12 -3
- package/node_modules/@types/node/perf_hooks.d.ts +500 -97
- package/node_modules/@types/node/process.d.ts +657 -87
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +24 -13
- package/node_modules/@types/node/readline/promises.d.ts +25 -14
- package/node_modules/@types/node/readline.d.ts +102 -41
- package/node_modules/@types/node/repl.d.ts +38 -30
- package/node_modules/@types/node/sea.d.ts +162 -0
- package/node_modules/@types/node/sqlite.d.ts +1040 -0
- package/node_modules/@types/node/stream/consumers.d.ts +33 -7
- package/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/node/stream/web.d.ts +251 -28
- package/node_modules/@types/node/stream.d.ts +1060 -1055
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +2133 -1166
- package/node_modules/@types/node/timers/promises.d.ts +31 -16
- package/node_modules/@types/node/timers.d.ts +159 -114
- package/node_modules/@types/node/tls.d.ts +232 -163
- package/node_modules/@types/node/trace_events.d.ts +43 -28
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +9 -9
- package/node_modules/@types/node/url.d.ts +236 -84
- package/node_modules/@types/node/util.d.ts +562 -412
- package/node_modules/@types/node/v8.d.ts +368 -21
- package/node_modules/@types/node/vm.d.ts +443 -149
- package/node_modules/@types/node/wasi.d.ts +62 -18
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +310 -107
- package/node_modules/@types/node/zlib.d.ts +301 -73
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +19 -7
- package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +26 -15
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
- package/node_modules/undici-types/dispatcher.d.ts +148 -113
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +79 -46
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +41 -39
- package/node_modules/undici-types/formdata.d.ts +8 -8
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +11 -5
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +68 -43
- package/node_modules/undici-types/interceptors.d.ts +71 -3
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -42
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +21 -8
- package/node_modules/undici-types/proxy-agent.d.ts +5 -6
- package/node_modules/undici-types/readable.d.ts +24 -17
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +157 -36
- package/node_modules/undici-types/websocket.d.ts +67 -12
- package/package.json +9 -60
- package/version.json +1 -1
- package/node_modules/@types/node/dom-events.d.ts +0 -122
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/argparse/CHANGELOG.md +0 -216
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,98 +1,104 @@
|
|
|
1
|
-
import { URL } from 'url'
|
|
2
|
-
import { Duplex, Readable, Writable } from 'stream'
|
|
3
|
-
import { EventEmitter } from 'events'
|
|
4
|
-
import { Blob } from 'buffer'
|
|
1
|
+
import { URL } from 'node:url'
|
|
2
|
+
import { Duplex, Readable, Writable } from 'node:stream'
|
|
3
|
+
import { EventEmitter } from 'node:events'
|
|
4
|
+
import { Blob } from 'node:buffer'
|
|
5
5
|
import { IncomingHttpHeaders } from './header'
|
|
6
6
|
import BodyReadable from './readable'
|
|
7
7
|
import { FormData } from './formdata'
|
|
8
8
|
import Errors from './errors'
|
|
9
|
+
import { Autocomplete } from './utility'
|
|
9
10
|
|
|
10
|
-
type AbortSignal = unknown
|
|
11
|
+
type AbortSignal = unknown
|
|
11
12
|
|
|
12
13
|
export default Dispatcher
|
|
13
14
|
|
|
15
|
+
export type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
|
|
16
|
+
|
|
14
17
|
/** Dispatcher is the core API used to dispatch requests. */
|
|
15
18
|
declare class Dispatcher extends EventEmitter {
|
|
16
19
|
/** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
|
|
17
|
-
dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.
|
|
20
|
+
dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
18
21
|
/** Starts two-way communications with the requested resource. */
|
|
19
|
-
connect(options: Dispatcher.ConnectOptions
|
|
20
|
-
connect(options: Dispatcher.ConnectOptions
|
|
22
|
+
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void
|
|
23
|
+
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>
|
|
24
|
+
/** Compose a chain of dispatchers */
|
|
25
|
+
compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
|
|
26
|
+
compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
|
|
21
27
|
/** Performs an HTTP request. */
|
|
22
|
-
request(options: Dispatcher.RequestOptions
|
|
23
|
-
request(options: Dispatcher.RequestOptions
|
|
28
|
+
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void
|
|
29
|
+
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>
|
|
24
30
|
/** For easy use with `stream.pipeline`. */
|
|
25
|
-
pipeline(options: Dispatcher.PipelineOptions
|
|
31
|
+
pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex
|
|
26
32
|
/** A faster version of `Dispatcher.request`. */
|
|
27
|
-
stream(options: Dispatcher.RequestOptions
|
|
28
|
-
stream(options: Dispatcher.RequestOptions
|
|
33
|
+
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void
|
|
34
|
+
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>
|
|
29
35
|
/** Upgrade to a different protocol. */
|
|
30
|
-
upgrade(options: Dispatcher.UpgradeOptions
|
|
31
|
-
upgrade(options: Dispatcher.UpgradeOptions
|
|
36
|
+
upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void
|
|
37
|
+
upgrade (options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>
|
|
32
38
|
/** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
|
|
33
|
-
close():
|
|
34
|
-
close
|
|
39
|
+
close (callback: () => void): void
|
|
40
|
+
close (): Promise<void>
|
|
35
41
|
/** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
|
|
36
|
-
destroy():
|
|
37
|
-
destroy(
|
|
38
|
-
destroy(
|
|
39
|
-
destroy
|
|
40
|
-
|
|
41
|
-
on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
42
|
-
on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
43
|
-
on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
44
|
-
on(eventName: 'drain', callback: (origin: URL) => void): this
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
once(eventName: '
|
|
48
|
-
once(eventName: '
|
|
49
|
-
once(eventName: '
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
off(eventName: '
|
|
54
|
-
off(eventName: '
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
addListener(eventName: '
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
removeListener(eventName: '
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
prependListener(eventName: '
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
prependOnceListener(eventName: '
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
listeners(eventName: '
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
rawListeners(eventName: '
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
emit(eventName: '
|
|
90
|
-
emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
|
|
91
|
-
emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
|
|
92
|
-
emit(eventName: 'drain', origin: URL): boolean;
|
|
42
|
+
destroy (err: Error | null, callback: () => void): void
|
|
43
|
+
destroy (callback: () => void): void
|
|
44
|
+
destroy (err: Error | null): Promise<void>
|
|
45
|
+
destroy (): Promise<void>
|
|
46
|
+
|
|
47
|
+
on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
48
|
+
on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
49
|
+
on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
50
|
+
on (eventName: 'drain', callback: (origin: URL) => void): this
|
|
51
|
+
|
|
52
|
+
once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
53
|
+
once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
54
|
+
once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
55
|
+
once (eventName: 'drain', callback: (origin: URL) => void): this
|
|
56
|
+
|
|
57
|
+
off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
58
|
+
off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
59
|
+
off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
60
|
+
off (eventName: 'drain', callback: (origin: URL) => void): this
|
|
61
|
+
|
|
62
|
+
addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
63
|
+
addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
64
|
+
addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
65
|
+
addListener (eventName: 'drain', callback: (origin: URL) => void): this
|
|
66
|
+
|
|
67
|
+
removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
68
|
+
removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
69
|
+
removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
70
|
+
removeListener (eventName: 'drain', callback: (origin: URL) => void): this
|
|
71
|
+
|
|
72
|
+
prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
73
|
+
prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
74
|
+
prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
75
|
+
prependListener (eventName: 'drain', callback: (origin: URL) => void): this
|
|
76
|
+
|
|
77
|
+
prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
|
|
78
|
+
prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
79
|
+
prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
|
|
80
|
+
prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this
|
|
81
|
+
|
|
82
|
+
listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
|
|
83
|
+
listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
|
|
84
|
+
listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
|
|
85
|
+
listeners (eventName: 'drain'): ((origin: URL) => void)[]
|
|
86
|
+
|
|
87
|
+
rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
|
|
88
|
+
rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
|
|
89
|
+
rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
|
|
90
|
+
rawListeners (eventName: 'drain'): ((origin: URL) => void)[]
|
|
91
|
+
|
|
92
|
+
emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean
|
|
93
|
+
emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
|
|
94
|
+
emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
|
|
95
|
+
emit (eventName: 'drain', origin: URL): boolean
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
declare namespace Dispatcher {
|
|
99
|
+
export interface ComposedDispatcher extends Dispatcher {}
|
|
100
|
+
export type Dispatch = Dispatcher['dispatch']
|
|
101
|
+
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
|
|
96
102
|
export interface DispatchOptions {
|
|
97
103
|
origin?: string | URL;
|
|
98
104
|
path: string;
|
|
@@ -100,12 +106,12 @@ declare namespace Dispatcher {
|
|
|
100
106
|
/** Default: `null` */
|
|
101
107
|
body?: string | Buffer | Uint8Array | Readable | null | FormData;
|
|
102
108
|
/** Default: `null` */
|
|
103
|
-
headers?:
|
|
109
|
+
headers?: UndiciHeaders;
|
|
104
110
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
105
111
|
query?: Record<string, any>;
|
|
106
112
|
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
|
|
107
113
|
idempotent?: boolean;
|
|
108
|
-
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. */
|
|
114
|
+
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
|
|
109
115
|
blocking?: boolean;
|
|
110
116
|
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
|
|
111
117
|
upgrade?: boolean | string | null;
|
|
@@ -117,37 +123,38 @@ declare namespace Dispatcher {
|
|
|
117
123
|
reset?: boolean;
|
|
118
124
|
/** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
|
|
119
125
|
throwOnError?: boolean;
|
|
120
|
-
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/
|
|
126
|
+
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
|
|
121
127
|
expectContinue?: boolean;
|
|
122
128
|
}
|
|
123
|
-
export interface ConnectOptions {
|
|
129
|
+
export interface ConnectOptions<TOpaque = null> {
|
|
130
|
+
origin: string | URL;
|
|
124
131
|
path: string;
|
|
125
132
|
/** Default: `null` */
|
|
126
|
-
headers?:
|
|
133
|
+
headers?: UndiciHeaders;
|
|
127
134
|
/** Default: `null` */
|
|
128
135
|
signal?: AbortSignal | EventEmitter | null;
|
|
129
136
|
/** This argument parameter is passed through to `ConnectData` */
|
|
130
|
-
opaque?:
|
|
131
|
-
/** Default:
|
|
132
|
-
|
|
137
|
+
opaque?: TOpaque;
|
|
138
|
+
/** Default: false */
|
|
139
|
+
redirectionLimitReached?: boolean;
|
|
133
140
|
/** Default: `null` */
|
|
134
|
-
|
|
141
|
+
responseHeaders?: 'raw' | null;
|
|
135
142
|
}
|
|
136
|
-
export interface RequestOptions extends DispatchOptions {
|
|
143
|
+
export interface RequestOptions<TOpaque = null> extends DispatchOptions {
|
|
137
144
|
/** Default: `null` */
|
|
138
|
-
opaque?:
|
|
145
|
+
opaque?: TOpaque;
|
|
139
146
|
/** Default: `null` */
|
|
140
147
|
signal?: AbortSignal | EventEmitter | null;
|
|
141
|
-
/** Default:
|
|
142
|
-
|
|
148
|
+
/** Default: false */
|
|
149
|
+
redirectionLimitReached?: boolean;
|
|
143
150
|
/** Default: `null` */
|
|
144
151
|
onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
|
|
145
152
|
/** Default: `null` */
|
|
146
|
-
|
|
153
|
+
responseHeaders?: 'raw' | null;
|
|
147
154
|
/** Default: `64 KiB` */
|
|
148
155
|
highWaterMark?: number;
|
|
149
156
|
}
|
|
150
|
-
export interface PipelineOptions extends RequestOptions {
|
|
157
|
+
export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
|
|
151
158
|
/** `true` if the `handler` will return an object stream. Default: `false` */
|
|
152
159
|
objectMode?: boolean;
|
|
153
160
|
}
|
|
@@ -156,86 +163,114 @@ declare namespace Dispatcher {
|
|
|
156
163
|
/** Default: `'GET'` */
|
|
157
164
|
method?: string;
|
|
158
165
|
/** Default: `null` */
|
|
159
|
-
headers?:
|
|
166
|
+
headers?: UndiciHeaders;
|
|
160
167
|
/** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
|
|
161
168
|
protocol?: string;
|
|
162
169
|
/** Default: `null` */
|
|
163
170
|
signal?: AbortSignal | EventEmitter | null;
|
|
164
|
-
/** Default:
|
|
165
|
-
|
|
171
|
+
/** Default: false */
|
|
172
|
+
redirectionLimitReached?: boolean;
|
|
166
173
|
/** Default: `null` */
|
|
167
|
-
|
|
174
|
+
responseHeaders?: 'raw' | null;
|
|
168
175
|
}
|
|
169
|
-
export interface ConnectData {
|
|
176
|
+
export interface ConnectData<TOpaque = null> {
|
|
170
177
|
statusCode: number;
|
|
171
178
|
headers: IncomingHttpHeaders;
|
|
172
179
|
socket: Duplex;
|
|
173
|
-
opaque:
|
|
180
|
+
opaque: TOpaque;
|
|
174
181
|
}
|
|
175
|
-
export interface ResponseData {
|
|
182
|
+
export interface ResponseData<TOpaque = null> {
|
|
176
183
|
statusCode: number;
|
|
177
184
|
headers: IncomingHttpHeaders;
|
|
178
185
|
body: BodyReadable & BodyMixin;
|
|
179
186
|
trailers: Record<string, string>;
|
|
180
|
-
opaque:
|
|
187
|
+
opaque: TOpaque;
|
|
181
188
|
context: object;
|
|
182
189
|
}
|
|
183
|
-
export interface PipelineHandlerData {
|
|
190
|
+
export interface PipelineHandlerData<TOpaque = null> {
|
|
184
191
|
statusCode: number;
|
|
185
192
|
headers: IncomingHttpHeaders;
|
|
186
|
-
opaque:
|
|
193
|
+
opaque: TOpaque;
|
|
187
194
|
body: BodyReadable;
|
|
188
195
|
context: object;
|
|
189
196
|
}
|
|
190
|
-
export interface StreamData {
|
|
191
|
-
opaque:
|
|
197
|
+
export interface StreamData<TOpaque = null> {
|
|
198
|
+
opaque: TOpaque;
|
|
192
199
|
trailers: Record<string, string>;
|
|
193
200
|
}
|
|
194
|
-
export interface UpgradeData {
|
|
201
|
+
export interface UpgradeData<TOpaque = null> {
|
|
195
202
|
headers: IncomingHttpHeaders;
|
|
196
203
|
socket: Duplex;
|
|
197
|
-
opaque:
|
|
204
|
+
opaque: TOpaque;
|
|
198
205
|
}
|
|
199
|
-
export interface StreamFactoryData {
|
|
206
|
+
export interface StreamFactoryData<TOpaque = null> {
|
|
200
207
|
statusCode: number;
|
|
201
208
|
headers: IncomingHttpHeaders;
|
|
202
|
-
opaque:
|
|
209
|
+
opaque: TOpaque;
|
|
203
210
|
context: object;
|
|
204
211
|
}
|
|
205
|
-
export type StreamFactory = (data: StreamFactoryData) => Writable
|
|
206
|
-
|
|
212
|
+
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
|
|
213
|
+
|
|
214
|
+
export interface DispatchController {
|
|
215
|
+
get aborted () : boolean
|
|
216
|
+
get paused () : boolean
|
|
217
|
+
get reason () : Error | null
|
|
218
|
+
abort (reason: Error): void
|
|
219
|
+
pause(): void
|
|
220
|
+
resume(): void
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface DispatchHandler {
|
|
224
|
+
onRequestStart?(controller: DispatchController, context: any): void;
|
|
225
|
+
onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
|
|
226
|
+
onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
|
|
227
|
+
onResponseData?(controller: DispatchController, chunk: Buffer): void;
|
|
228
|
+
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
|
|
229
|
+
onResponseError?(controller: DispatchController, error: Error): void;
|
|
230
|
+
|
|
207
231
|
/** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
|
|
208
|
-
|
|
232
|
+
/** @deprecated */
|
|
233
|
+
onConnect?(abort: (err?: Error) => void): void;
|
|
209
234
|
/** Invoked when an error has occurred. */
|
|
235
|
+
/** @deprecated */
|
|
210
236
|
onError?(err: Error): void;
|
|
211
237
|
/** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
|
|
238
|
+
/** @deprecated */
|
|
212
239
|
onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
|
|
240
|
+
/** Invoked when response is received, before headers have been read. **/
|
|
241
|
+
/** @deprecated */
|
|
242
|
+
onResponseStarted?(): void;
|
|
213
243
|
/** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
|
|
214
|
-
|
|
244
|
+
/** @deprecated */
|
|
245
|
+
onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
|
|
215
246
|
/** Invoked when response payload data is received. */
|
|
247
|
+
/** @deprecated */
|
|
216
248
|
onData?(chunk: Buffer): boolean;
|
|
217
249
|
/** Invoked when response payload and trailers have been received and the request has completed. */
|
|
250
|
+
/** @deprecated */
|
|
218
251
|
onComplete?(trailers: string[] | null): void;
|
|
219
252
|
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
|
|
253
|
+
/** @deprecated */
|
|
220
254
|
onBodySent?(chunkSize: number, totalBytesSent: number): void;
|
|
221
255
|
}
|
|
222
|
-
export type PipelineHandler = (data: PipelineHandlerData) => Readable
|
|
223
|
-
export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'
|
|
256
|
+
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable
|
|
257
|
+
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>
|
|
224
258
|
|
|
225
259
|
/**
|
|
226
260
|
* @link https://fetch.spec.whatwg.org/#body-mixin
|
|
227
261
|
*/
|
|
228
262
|
interface BodyMixin {
|
|
229
|
-
readonly body?: never;
|
|
263
|
+
readonly body?: never;
|
|
230
264
|
readonly bodyUsed: boolean;
|
|
231
265
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
232
266
|
blob(): Promise<Blob>;
|
|
267
|
+
bytes(): Promise<Uint8Array>;
|
|
233
268
|
formData(): Promise<never>;
|
|
234
269
|
json(): Promise<unknown>;
|
|
235
270
|
text(): Promise<string>;
|
|
236
271
|
}
|
|
237
272
|
|
|
238
273
|
export interface DispatchInterceptor {
|
|
239
|
-
(dispatch:
|
|
274
|
+
(dispatch: Dispatch): Dispatch
|
|
240
275
|
}
|
|
241
276
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Agent from './agent'
|
|
2
|
+
import ProxyAgent from './proxy-agent'
|
|
3
|
+
import Dispatcher from './dispatcher'
|
|
4
|
+
|
|
5
|
+
export default EnvHttpProxyAgent
|
|
6
|
+
|
|
7
|
+
declare class EnvHttpProxyAgent extends Dispatcher {
|
|
8
|
+
constructor (opts?: EnvHttpProxyAgent.Options)
|
|
9
|
+
|
|
10
|
+
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare namespace EnvHttpProxyAgent {
|
|
14
|
+
export interface Options extends Omit<ProxyAgent.Options, 'uri'> {
|
|
15
|
+
/** Overrides the value of the HTTP_PROXY environment variable */
|
|
16
|
+
httpProxy?: string;
|
|
17
|
+
/** Overrides the value of the HTTPS_PROXY environment variable */
|
|
18
|
+
httpsProxy?: string;
|
|
19
|
+
/** Overrides the value of the NO_PROXY environment variable */
|
|
20
|
+
noProxy?: string;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { IncomingHttpHeaders } from
|
|
1
|
+
import { IncomingHttpHeaders } from './header'
|
|
2
2
|
import Client from './client'
|
|
3
3
|
|
|
4
4
|
export default Errors
|
|
5
5
|
|
|
6
6
|
declare namespace Errors {
|
|
7
7
|
export class UndiciError extends Error {
|
|
8
|
-
name: string
|
|
9
|
-
code: string
|
|
8
|
+
name: string
|
|
9
|
+
code: string
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/** Connect timeout error. */
|
|
13
13
|
export class ConnectTimeoutError extends UndiciError {
|
|
14
|
-
name: 'ConnectTimeoutError'
|
|
15
|
-
code: 'UND_ERR_CONNECT_TIMEOUT'
|
|
14
|
+
name: 'ConnectTimeoutError'
|
|
15
|
+
code: 'UND_ERR_CONNECT_TIMEOUT'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/** A header exceeds the `headersTimeout` option. */
|
|
19
19
|
export class HeadersTimeoutError extends UndiciError {
|
|
20
|
-
name: 'HeadersTimeoutError'
|
|
21
|
-
code: 'UND_ERR_HEADERS_TIMEOUT'
|
|
20
|
+
name: 'HeadersTimeoutError'
|
|
21
|
+
code: 'UND_ERR_HEADERS_TIMEOUT'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/** Headers overflow error. */
|
|
@@ -29,100 +29,133 @@ declare namespace Errors {
|
|
|
29
29
|
|
|
30
30
|
/** A body exceeds the `bodyTimeout` option. */
|
|
31
31
|
export class BodyTimeoutError extends UndiciError {
|
|
32
|
-
name: 'BodyTimeoutError'
|
|
33
|
-
code: 'UND_ERR_BODY_TIMEOUT'
|
|
32
|
+
name: 'BodyTimeoutError'
|
|
33
|
+
code: 'UND_ERR_BODY_TIMEOUT'
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export class
|
|
36
|
+
export class ResponseError extends UndiciError {
|
|
37
37
|
constructor (
|
|
38
|
-
message
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
message: string,
|
|
39
|
+
code: number,
|
|
40
|
+
options: {
|
|
41
|
+
headers?: IncomingHttpHeaders | string[] | null,
|
|
42
|
+
body?: null | Record<string, any> | string
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
name: 'ResponseError'
|
|
46
|
+
code: 'UND_ERR_RESPONSE'
|
|
47
47
|
statusCode: number
|
|
48
|
-
|
|
48
|
+
body: null | Record<string, any> | string
|
|
49
|
+
headers: IncomingHttpHeaders | string[] | null
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/** Passed an invalid argument. */
|
|
52
53
|
export class InvalidArgumentError extends UndiciError {
|
|
53
|
-
name: 'InvalidArgumentError'
|
|
54
|
-
code: 'UND_ERR_INVALID_ARG'
|
|
54
|
+
name: 'InvalidArgumentError'
|
|
55
|
+
code: 'UND_ERR_INVALID_ARG'
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/** Returned an invalid value. */
|
|
58
59
|
export class InvalidReturnValueError extends UndiciError {
|
|
59
|
-
name: 'InvalidReturnValueError'
|
|
60
|
-
code: 'UND_ERR_INVALID_RETURN_VALUE'
|
|
60
|
+
name: 'InvalidReturnValueError'
|
|
61
|
+
code: 'UND_ERR_INVALID_RETURN_VALUE'
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
/** The request has been aborted by the user. */
|
|
64
65
|
export class RequestAbortedError extends UndiciError {
|
|
65
|
-
name: 'AbortError'
|
|
66
|
-
code: 'UND_ERR_ABORTED'
|
|
66
|
+
name: 'AbortError'
|
|
67
|
+
code: 'UND_ERR_ABORTED'
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/** Expected error with reason. */
|
|
70
71
|
export class InformationalError extends UndiciError {
|
|
71
|
-
name: 'InformationalError'
|
|
72
|
-
code: 'UND_ERR_INFO'
|
|
72
|
+
name: 'InformationalError'
|
|
73
|
+
code: 'UND_ERR_INFO'
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
/** Request body length does not match content-length header. */
|
|
76
77
|
export class RequestContentLengthMismatchError extends UndiciError {
|
|
77
|
-
name: 'RequestContentLengthMismatchError'
|
|
78
|
-
code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
|
78
|
+
name: 'RequestContentLengthMismatchError'
|
|
79
|
+
code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
/** Response body length does not match content-length header. */
|
|
82
83
|
export class ResponseContentLengthMismatchError extends UndiciError {
|
|
83
|
-
name: 'ResponseContentLengthMismatchError'
|
|
84
|
-
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
|
84
|
+
name: 'ResponseContentLengthMismatchError'
|
|
85
|
+
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
/** Trying to use a destroyed client. */
|
|
88
89
|
export class ClientDestroyedError extends UndiciError {
|
|
89
|
-
name: 'ClientDestroyedError'
|
|
90
|
-
code: 'UND_ERR_DESTROYED'
|
|
90
|
+
name: 'ClientDestroyedError'
|
|
91
|
+
code: 'UND_ERR_DESTROYED'
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
/** Trying to use a closed client. */
|
|
94
95
|
export class ClientClosedError extends UndiciError {
|
|
95
|
-
name: 'ClientClosedError'
|
|
96
|
-
code: 'UND_ERR_CLOSED'
|
|
96
|
+
name: 'ClientClosedError'
|
|
97
|
+
code: 'UND_ERR_CLOSED'
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
/** There is an error with the socket. */
|
|
100
101
|
export class SocketError extends UndiciError {
|
|
101
|
-
name: 'SocketError'
|
|
102
|
-
code: 'UND_ERR_SOCKET'
|
|
102
|
+
name: 'SocketError'
|
|
103
|
+
code: 'UND_ERR_SOCKET'
|
|
103
104
|
socket: Client.SocketInfo | null
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
/** Encountered unsupported functionality. */
|
|
107
108
|
export class NotSupportedError extends UndiciError {
|
|
108
|
-
name: 'NotSupportedError'
|
|
109
|
-
code: 'UND_ERR_NOT_SUPPORTED'
|
|
109
|
+
name: 'NotSupportedError'
|
|
110
|
+
code: 'UND_ERR_NOT_SUPPORTED'
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
/** No upstream has been added to the BalancedPool. */
|
|
113
114
|
export class BalancedPoolMissingUpstreamError extends UndiciError {
|
|
114
|
-
name: 'MissingUpstreamError'
|
|
115
|
-
code: 'UND_ERR_BPL_MISSING_UPSTREAM'
|
|
115
|
+
name: 'MissingUpstreamError'
|
|
116
|
+
code: 'UND_ERR_BPL_MISSING_UPSTREAM'
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
export class HTTPParserError extends UndiciError {
|
|
119
|
-
name: 'HTTPParserError'
|
|
120
|
-
code: string
|
|
120
|
+
name: 'HTTPParserError'
|
|
121
|
+
code: string
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
/** The response exceed the length allowed. */
|
|
124
125
|
export class ResponseExceededMaxSizeError extends UndiciError {
|
|
125
|
-
name: 'ResponseExceededMaxSizeError'
|
|
126
|
-
code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
|
126
|
+
name: 'ResponseExceededMaxSizeError'
|
|
127
|
+
code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export class RequestRetryError extends UndiciError {
|
|
131
|
+
constructor (
|
|
132
|
+
message: string,
|
|
133
|
+
statusCode: number,
|
|
134
|
+
headers?: IncomingHttpHeaders | string[] | null,
|
|
135
|
+
body?: null | Record<string, any> | string
|
|
136
|
+
)
|
|
137
|
+
name: 'RequestRetryError'
|
|
138
|
+
code: 'UND_ERR_REQ_RETRY'
|
|
139
|
+
statusCode: number
|
|
140
|
+
data: {
|
|
141
|
+
count: number;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
headers: Record<string, string | string[]>
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export class SecureProxyConnectionError extends UndiciError {
|
|
148
|
+
constructor (
|
|
149
|
+
cause?: Error,
|
|
150
|
+
message?: string,
|
|
151
|
+
options?: Record<any, any>
|
|
152
|
+
)
|
|
153
|
+
name: 'SecureProxyConnectionError'
|
|
154
|
+
code: 'UND_ERR_PRX_TLS'
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
class MaxOriginsReachedError extends UndiciError {
|
|
158
|
+
name: 'MaxOriginsReachedError'
|
|
159
|
+
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
127
160
|
}
|
|
128
161
|
}
|