cdk-common 2.1.60 → 2.1.61
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 +3 -3
- package/lib/integ-default.js +37 -4
- package/lib/main.js +38 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +454 -571
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +20 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +14 -14
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +3 -12
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +11 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +8 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +1 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +3 -20
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +2 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/@types/concat-stream/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/@types/concat-stream/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/webidl.d.ts +0 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +454 -571
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +20 -9
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +14 -14
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +3 -12
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +11 -11
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +1 -4
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +3 -20
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +2 -5
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/@types/form-data/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/@types/form-data/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/@types/form-data/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/@types/form-data/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +0 -1
- package/package.json +4 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/form-data/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
|
@@ -35,7 +35,7 @@ declare module "node:vm" {
|
|
|
35
35
|
/**
|
|
36
36
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
37
37
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
38
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
38
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
39
39
|
* @experimental
|
|
40
40
|
*/
|
|
41
41
|
importModuleDynamically?:
|
|
@@ -81,7 +81,7 @@ declare module "node:vm" {
|
|
|
81
81
|
/**
|
|
82
82
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
83
83
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
84
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
84
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
85
85
|
* @experimental
|
|
86
86
|
*/
|
|
87
87
|
importModuleDynamically?:
|
|
@@ -95,7 +95,7 @@ declare module "node:vm" {
|
|
|
95
95
|
/**
|
|
96
96
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
97
97
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
98
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
98
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
99
99
|
* @experimental
|
|
100
100
|
*/
|
|
101
101
|
importModuleDynamically?:
|
|
@@ -115,7 +115,7 @@ declare module "node:vm" {
|
|
|
115
115
|
/**
|
|
116
116
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
117
117
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
118
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
118
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
119
119
|
* @experimental
|
|
120
120
|
*/
|
|
121
121
|
importModuleDynamically?:
|
|
@@ -159,7 +159,7 @@ declare module "node:vm" {
|
|
|
159
159
|
/**
|
|
160
160
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
161
161
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
162
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
162
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
163
163
|
* @experimental
|
|
164
164
|
*/
|
|
165
165
|
importModuleDynamically?:
|
|
@@ -363,9 +363,9 @@ declare module "node:vm" {
|
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
365
365
|
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
366
|
-
* [prepare that object](https://nodejs.org/docs/latest-
|
|
366
|
+
* [prepare that object](https://nodejs.org/docs/latest-v26.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
|
367
367
|
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
|
368
|
-
* [`script.runInContext()`](https://nodejs.org/docs/latest-
|
|
368
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v26.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
369
369
|
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
|
370
370
|
* existing properties but also having the built-in objects and functions any standard
|
|
371
371
|
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
@@ -837,7 +837,7 @@ declare module "node:vm" {
|
|
|
837
837
|
/**
|
|
838
838
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
839
839
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
840
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
840
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
841
841
|
* @experimental
|
|
842
842
|
*/
|
|
843
843
|
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
|
@@ -1112,7 +1112,7 @@ declare module "node:vm" {
|
|
|
1112
1112
|
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
|
1113
1113
|
* context to load the requested module.
|
|
1114
1114
|
*
|
|
1115
|
-
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
1115
|
+
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
1116
1116
|
* @since v21.7.0, v20.12.0
|
|
1117
1117
|
*/
|
|
1118
1118
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
package/node_modules/@types/form-data/node_modules/@types/node/web-globals/domexception.d.ts
CHANGED
|
@@ -65,4 +65,19 @@ declare global {
|
|
|
65
65
|
readonly INVALID_NODE_TYPE_ERR: 24;
|
|
66
66
|
readonly DATA_CLONE_ERR: 25;
|
|
67
67
|
};
|
|
68
|
+
|
|
69
|
+
// Not conditional, as this is not yet exposed by the DOM lib generator.
|
|
70
|
+
interface QuotaExceededError extends DOMException {
|
|
71
|
+
readonly quota: number | null;
|
|
72
|
+
readonly requested: number | null;
|
|
73
|
+
}
|
|
74
|
+
var QuotaExceededError: {
|
|
75
|
+
prototype: QuotaExceededError;
|
|
76
|
+
new(message?: string, options?: QuotaExceededErrorOptions): QuotaExceededError;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
interface QuotaExceededErrorOptions {
|
|
80
|
+
quota?: number;
|
|
81
|
+
requested?: number;
|
|
82
|
+
}
|
|
68
83
|
}
|
|
@@ -22,9 +22,6 @@ declare module "node:worker_threads" {
|
|
|
22
22
|
const threadName: string | null;
|
|
23
23
|
const workerData: any;
|
|
24
24
|
interface WorkerPerformance extends Pick<Performance, "eventLoopUtilization"> {}
|
|
25
|
-
/** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
|
|
26
|
-
// TODO: remove in a future major @types/node version.
|
|
27
|
-
type TransferListItem = Transferable;
|
|
28
25
|
interface WorkerOptions {
|
|
29
26
|
/**
|
|
30
27
|
* List of arguments which would be stringified and appended to
|
|
@@ -340,13 +337,13 @@ declare module "node:worker_threads" {
|
|
|
340
337
|
interface Worker extends InternalEventEmitter<WorkerEventMap> {}
|
|
341
338
|
/**
|
|
342
339
|
* Mark an object as not transferable. If `object` occurs in the transfer list of
|
|
343
|
-
* a [`port.postMessage()`](https://nodejs.org/docs/latest-
|
|
340
|
+
* a [`port.postMessage()`](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) call, an error is thrown. This is a no-op if
|
|
344
341
|
* `object` is a primitive value.
|
|
345
342
|
*
|
|
346
343
|
* In particular, this makes sense for objects that can be cloned, rather than
|
|
347
344
|
* transferred, and which are used by other objects on the sending side.
|
|
348
345
|
* For example, Node.js marks the `ArrayBuffer`s it uses for its
|
|
349
|
-
* [`Buffer` pool](https://nodejs.org/docs/latest-
|
|
346
|
+
* [`Buffer` pool](https://nodejs.org/docs/latest-v26.x/api/buffer.html#static-method-bufferallocunsafesize) with this.
|
|
350
347
|
* `ArrayBuffer.prototype.transfer()` is disallowed on such array buffer
|
|
351
348
|
* instances.
|
|
352
349
|
*
|
|
@@ -55,7 +55,7 @@ declare module "node:zlib" {
|
|
|
55
55
|
}
|
|
56
56
|
| undefined;
|
|
57
57
|
/**
|
|
58
|
-
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-
|
|
58
|
+
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
|
|
59
59
|
* @default buffer.kMaxLength
|
|
60
60
|
*/
|
|
61
61
|
maxOutputLength?: number | undefined;
|
|
@@ -79,12 +79,12 @@ declare module "node:zlib" {
|
|
|
79
79
|
chunkSize?: number | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* Key-value object containing indexed
|
|
82
|
-
* [Zstd parameters](https://nodejs.org/docs/latest-
|
|
82
|
+
* [Zstd parameters](https://nodejs.org/docs/latest-v26.x/api/zlib.html#zstd-constants).
|
|
83
83
|
*/
|
|
84
84
|
params?: { [key: number]: number | boolean } | undefined;
|
|
85
85
|
/**
|
|
86
86
|
* Limits output size when using
|
|
87
|
-
* [convenience methods](https://nodejs.org/docs/latest-
|
|
87
|
+
* [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
|
|
88
88
|
* @default buffer.kMaxLength
|
|
89
89
|
*/
|
|
90
90
|
maxOutputLength?: number | undefined;
|
|
@@ -22,8 +22,6 @@ declare namespace Agent {
|
|
|
22
22
|
export interface Options extends Pool.Options {
|
|
23
23
|
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
24
24
|
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
25
|
-
|
|
26
|
-
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
|
|
27
25
|
maxOrigins?: number
|
|
28
26
|
}
|
|
29
27
|
|
|
@@ -3,7 +3,7 @@ import Dispatcher from './dispatcher'
|
|
|
3
3
|
import buildConnector from './connector'
|
|
4
4
|
import TClientStats from './client-stats'
|
|
5
5
|
|
|
6
|
-
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions
|
|
6
|
+
type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin'>
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
@@ -20,22 +20,17 @@ export class Client extends Dispatcher {
|
|
|
20
20
|
readonly stats: TClientStats
|
|
21
21
|
|
|
22
22
|
// Override dispatcher APIs.
|
|
23
|
-
override connect (
|
|
24
|
-
options: ClientConnectOptions
|
|
25
|
-
): Promise<Dispatcher.ConnectData
|
|
26
|
-
override connect (
|
|
27
|
-
options: ClientConnectOptions
|
|
28
|
-
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
23
|
+
override connect<TOpaque = null> (
|
|
24
|
+
options: ClientConnectOptions<TOpaque>
|
|
25
|
+
): Promise<Dispatcher.ConnectData<TOpaque>>
|
|
26
|
+
override connect<TOpaque = null> (
|
|
27
|
+
options: ClientConnectOptions<TOpaque>,
|
|
28
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void
|
|
29
29
|
): void
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export declare namespace Client {
|
|
33
|
-
export interface OptionsInterceptors {
|
|
34
|
-
Client: readonly Dispatcher.DispatchInterceptor[];
|
|
35
|
-
}
|
|
36
33
|
export interface Options {
|
|
37
|
-
/** TODO */
|
|
38
|
-
interceptors?: OptionsInterceptors;
|
|
39
34
|
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
40
35
|
maxHeaderSize?: number;
|
|
41
36
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
@@ -44,7 +39,7 @@ export declare namespace Client {
|
|
|
44
39
|
socketTimeout?: never;
|
|
45
40
|
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
|
|
46
41
|
requestTimeout?: never;
|
|
47
|
-
/**
|
|
42
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
48
43
|
connectTimeout?: number;
|
|
49
44
|
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
50
45
|
bodyTimeout?: number;
|
|
@@ -60,7 +55,7 @@ export declare namespace Client {
|
|
|
60
55
|
keepAliveMaxTimeout?: number;
|
|
61
56
|
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
62
57
|
keepAliveTimeoutThreshold?: number;
|
|
63
|
-
/**
|
|
58
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
64
59
|
socketPath?: string;
|
|
65
60
|
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
|
|
66
61
|
pipelining?: number;
|
|
@@ -68,23 +63,25 @@ export declare namespace Client {
|
|
|
68
63
|
tls?: never;
|
|
69
64
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
70
65
|
strictContentLength?: boolean;
|
|
71
|
-
/**
|
|
66
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
72
67
|
maxCachedSessions?: number;
|
|
73
|
-
/**
|
|
68
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
74
69
|
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
75
|
-
/**
|
|
70
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
76
71
|
maxRequestsPerClient?: number;
|
|
77
|
-
/**
|
|
72
|
+
/** Local IP address the socket should connect from. */
|
|
78
73
|
localAddress?: string;
|
|
79
74
|
/** Max response body size in bytes, -1 is disabled */
|
|
80
75
|
maxResponseSize?: number;
|
|
76
|
+
/** WebSocket-specific options */
|
|
77
|
+
webSocket?: Client.WebSocketOptions;
|
|
81
78
|
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
82
79
|
autoSelectFamily?: boolean;
|
|
83
80
|
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
84
81
|
autoSelectFamilyAttemptTimeout?: number;
|
|
85
82
|
/**
|
|
86
83
|
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
87
|
-
* @default
|
|
84
|
+
* @default true
|
|
88
85
|
*/
|
|
89
86
|
allowH2?: boolean;
|
|
90
87
|
/**
|
|
@@ -118,6 +115,15 @@ export declare namespace Client {
|
|
|
118
115
|
bytesWritten?: number
|
|
119
116
|
bytesRead?: number
|
|
120
117
|
}
|
|
118
|
+
export interface WebSocketOptions {
|
|
119
|
+
/**
|
|
120
|
+
* Maximum allowed payload size in bytes for WebSocket messages.
|
|
121
|
+
* Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages.
|
|
122
|
+
* Set to 0 to disable the limit.
|
|
123
|
+
* @default 134217728 (128 MB)
|
|
124
|
+
*/
|
|
125
|
+
maxPayloadSize?: number;
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
export default Client
|
|
@@ -2,17 +2,15 @@ import { URL } from 'node:url'
|
|
|
2
2
|
import { Duplex, Readable, Writable } from 'node:stream'
|
|
3
3
|
import { EventEmitter } from 'node:events'
|
|
4
4
|
import { Blob } from 'node:buffer'
|
|
5
|
-
import { IncomingHttpHeaders } from './header'
|
|
5
|
+
import { IncomingHttpHeaders, OutgoingHttpHeaders } from './header'
|
|
6
6
|
import BodyReadable from './readable'
|
|
7
7
|
import { FormData } from './formdata'
|
|
8
8
|
import Errors from './errors'
|
|
9
9
|
import { Autocomplete } from './utility'
|
|
10
10
|
|
|
11
|
-
type AbortSignal = unknown
|
|
12
|
-
|
|
13
11
|
export default Dispatcher
|
|
14
12
|
|
|
15
|
-
export type UndiciHeaders =
|
|
13
|
+
export type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
|
|
16
14
|
|
|
17
15
|
/** Dispatcher is the core API used to dispatch requests. */
|
|
18
16
|
declare class Dispatcher extends EventEmitter {
|
|
@@ -123,8 +121,6 @@ declare namespace Dispatcher {
|
|
|
123
121
|
bodyTimeout?: number | null;
|
|
124
122
|
/** Whether the request should stablish a keep-alive or not. Default `false` */
|
|
125
123
|
reset?: boolean;
|
|
126
|
-
/** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
|
|
127
|
-
throwOnError?: boolean;
|
|
128
124
|
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
|
|
129
125
|
expectContinue?: boolean;
|
|
130
126
|
}
|
|
@@ -137,8 +133,6 @@ declare namespace Dispatcher {
|
|
|
137
133
|
signal?: AbortSignal | EventEmitter | null;
|
|
138
134
|
/** This argument parameter is passed through to `ConnectData` */
|
|
139
135
|
opaque?: TOpaque;
|
|
140
|
-
/** Default: false */
|
|
141
|
-
redirectionLimitReached?: boolean;
|
|
142
136
|
/** Default: `null` */
|
|
143
137
|
responseHeaders?: 'raw' | null;
|
|
144
138
|
}
|
|
@@ -147,8 +141,6 @@ declare namespace Dispatcher {
|
|
|
147
141
|
opaque?: TOpaque;
|
|
148
142
|
/** Default: `null` */
|
|
149
143
|
signal?: AbortSignal | EventEmitter | null;
|
|
150
|
-
/** Default: false */
|
|
151
|
-
redirectionLimitReached?: boolean;
|
|
152
144
|
/** Default: `null` */
|
|
153
145
|
onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
|
|
154
146
|
/** Default: `null` */
|
|
@@ -170,8 +162,6 @@ declare namespace Dispatcher {
|
|
|
170
162
|
protocol?: string;
|
|
171
163
|
/** Default: `null` */
|
|
172
164
|
signal?: AbortSignal | EventEmitter | null;
|
|
173
|
-
/** Default: false */
|
|
174
|
-
redirectionLimitReached?: boolean;
|
|
175
165
|
/** Default: `null` */
|
|
176
166
|
responseHeaders?: 'raw' | null;
|
|
177
167
|
}
|
|
@@ -218,6 +208,8 @@ declare namespace Dispatcher {
|
|
|
218
208
|
get aborted(): boolean
|
|
219
209
|
get paused(): boolean
|
|
220
210
|
get reason(): Error | null
|
|
211
|
+
rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null
|
|
212
|
+
rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null
|
|
221
213
|
abort(reason: Error): void
|
|
222
214
|
pause(): void
|
|
223
215
|
resume(): void
|
|
@@ -231,30 +223,12 @@ declare namespace Dispatcher {
|
|
|
231
223
|
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
|
|
232
224
|
onResponseError?(controller: DispatchController, error: Error): void;
|
|
233
225
|
|
|
234
|
-
/** 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. */
|
|
235
|
-
/** @deprecated */
|
|
236
|
-
onConnect?(abort: (err?: Error) => void): void;
|
|
237
|
-
/** Invoked when an error has occurred. */
|
|
238
|
-
/** @deprecated */
|
|
239
|
-
onError?(err: Error): void;
|
|
240
|
-
/** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
|
|
241
|
-
/** @deprecated */
|
|
242
|
-
onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
|
|
243
226
|
/** Invoked when response is received, before headers have been read. **/
|
|
244
|
-
/** @deprecated */
|
|
245
227
|
onResponseStarted?(): void;
|
|
246
|
-
/** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
|
|
247
|
-
/** @deprecated */
|
|
248
|
-
onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
|
|
249
|
-
/** Invoked when response payload data is received. */
|
|
250
|
-
/** @deprecated */
|
|
251
|
-
onData?(chunk: Buffer): boolean;
|
|
252
|
-
/** Invoked when response payload and trailers have been received and the request has completed. */
|
|
253
|
-
/** @deprecated */
|
|
254
|
-
onComplete?(trailers: string[] | null): void;
|
|
255
228
|
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
|
|
256
|
-
|
|
257
|
-
|
|
229
|
+
onBodySent?(chunk: Buffer): void;
|
|
230
|
+
/** Invoked after the request body is fully sent. */
|
|
231
|
+
onRequestSent?(): void;
|
|
258
232
|
}
|
|
259
233
|
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable
|
|
260
234
|
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>
|
|
@@ -60,12 +60,32 @@ export interface SpecIterator<T, TReturn = any, TNext = undefined> {
|
|
|
60
60
|
next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export interface
|
|
63
|
+
export interface SpecIteratorObject<T, TReturn = undefined, TNext = unknown> extends SpecIterator<T, TReturn, TNext> {
|
|
64
|
+
[Symbol.iterator](): SpecIteratorObject<T, TReturn, TNext>;
|
|
65
|
+
map<U>(callbackfn: (value: T, index: number) => U): SpecIteratorObject<U>;
|
|
66
|
+
filter<S extends T>(predicate: (value: T, index: number) => value is S): SpecIteratorObject<S>;
|
|
67
|
+
filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject<T>;
|
|
68
|
+
take(limit: number): SpecIteratorObject<T>;
|
|
69
|
+
drop(count: number): SpecIteratorObject<T>;
|
|
70
|
+
flatMap<U>(callbackfn: (value: T, index: number) => Iterator<U> | Iterable<U>): SpecIteratorObject<U>;
|
|
71
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
|
|
72
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
|
|
73
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
|
|
74
|
+
toArray(): T[];
|
|
75
|
+
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
76
|
+
some(predicate: (value: T, index: number) => unknown): boolean;
|
|
77
|
+
every(predicate: (value: T, index: number) => unknown): boolean;
|
|
78
|
+
find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
|
|
79
|
+
find(predicate: (value: T, index: number) => unknown): T | undefined;
|
|
80
|
+
readonly [Symbol.toStringTag]: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface SpecIterableIterator<T> extends SpecIteratorObject<T> {
|
|
64
84
|
[Symbol.iterator](): SpecIterableIterator<T>;
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
export interface SpecIterable<T> {
|
|
68
|
-
[Symbol.iterator]():
|
|
88
|
+
[Symbol.iterator](): SpecIterableIterator<T>;
|
|
69
89
|
}
|
|
70
90
|
|
|
71
91
|
export type HeadersInit = [string, string][] | HeaderRecord | Headers
|
|
@@ -173,7 +193,7 @@ export declare class Request extends BodyMixin {
|
|
|
173
193
|
readonly signal: AbortSignal
|
|
174
194
|
readonly duplex: RequestDuplex
|
|
175
195
|
|
|
176
|
-
|
|
196
|
+
public clone (): Request
|
|
177
197
|
}
|
|
178
198
|
|
|
179
199
|
export interface ResponseInit {
|
|
@@ -203,7 +223,7 @@ export declare class Response extends BodyMixin {
|
|
|
203
223
|
readonly url: string
|
|
204
224
|
readonly redirected: boolean
|
|
205
225
|
|
|
206
|
-
|
|
226
|
+
public clone (): Response
|
|
207
227
|
|
|
208
228
|
static error (): Response
|
|
209
229
|
static json (data: any, init?: ResponseInit): Response
|
|
@@ -32,7 +32,7 @@ export declare namespace H2CClient {
|
|
|
32
32
|
maxHeaderSize?: number;
|
|
33
33
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
34
34
|
headersTimeout?: number;
|
|
35
|
-
/**
|
|
35
|
+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
|
|
36
36
|
connectTimeout?: number;
|
|
37
37
|
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
38
38
|
bodyTimeout?: number;
|
|
@@ -42,19 +42,19 @@ export declare namespace H2CClient {
|
|
|
42
42
|
keepAliveMaxTimeout?: number;
|
|
43
43
|
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
44
44
|
keepAliveTimeoutThreshold?: number;
|
|
45
|
-
/**
|
|
45
|
+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
|
|
46
46
|
socketPath?: string;
|
|
47
47
|
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
|
|
48
48
|
pipelining?: number;
|
|
49
49
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
50
50
|
strictContentLength?: boolean;
|
|
51
|
-
/**
|
|
51
|
+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
|
|
52
52
|
maxCachedSessions?: number;
|
|
53
|
-
/**
|
|
53
|
+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
|
|
54
54
|
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
|
|
55
|
-
/**
|
|
55
|
+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
|
|
56
56
|
maxRequestsPerClient?: number;
|
|
57
|
-
/**
|
|
57
|
+
/** Local IP address the socket should connect from. */
|
|
58
58
|
localAddress?: string;
|
|
59
59
|
/** Max response body size in bytes, -1 is disabled */
|
|
60
60
|
maxResponseSize?: number;
|
|
@@ -5,8 +5,7 @@ export declare class RedirectHandler implements Dispatcher.DispatchHandler {
|
|
|
5
5
|
dispatch: Dispatcher.Dispatch,
|
|
6
6
|
maxRedirections: number,
|
|
7
7
|
opts: Dispatcher.DispatchOptions,
|
|
8
|
-
handler: Dispatcher.DispatchHandler
|
|
9
|
-
redirectionLimitReached: boolean
|
|
8
|
+
handler: Dispatcher.DispatchHandler
|
|
10
9
|
)
|
|
11
10
|
}
|
|
12
11
|
|
|
@@ -5,6 +5,11 @@ import { Autocomplete } from './utility'
|
|
|
5
5
|
*/
|
|
6
6
|
export type IncomingHttpHeaders = Record<string, string | string[] | undefined>
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The header type declaration of `undici` for outgoing requests.
|
|
10
|
+
*/
|
|
11
|
+
export type OutgoingHttpHeaders = Record<string, number | string | string[] | undefined>
|
|
12
|
+
|
|
8
13
|
type HeaderNames = Autocomplete<
|
|
9
14
|
| 'Accept'
|
|
10
15
|
| 'Accept-CH'
|
|
@@ -11,6 +11,7 @@ import H2CClient from './h2c-client'
|
|
|
11
11
|
import buildConnector from './connector'
|
|
12
12
|
import errors from './errors'
|
|
13
13
|
import Agent from './agent'
|
|
14
|
+
import Dispatcher1Wrapper from './dispatcher1-wrapper'
|
|
14
15
|
import MockClient from './mock-client'
|
|
15
16
|
import MockPool from './mock-pool'
|
|
16
17
|
import MockAgent from './mock-agent'
|
|
@@ -44,7 +45,7 @@ export { Interceptable } from './mock-interceptor'
|
|
|
44
45
|
|
|
45
46
|
declare function globalThisInstall (): void
|
|
46
47
|
|
|
47
|
-
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
48
|
+
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, Dispatcher1Wrapper, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
48
49
|
export default Undici
|
|
49
50
|
|
|
50
51
|
declare namespace Undici {
|
|
@@ -60,6 +61,7 @@ declare namespace Undici {
|
|
|
60
61
|
const buildConnector: typeof import('./connector').default
|
|
61
62
|
const errors: typeof import('./errors').default
|
|
62
63
|
const Agent: typeof import('./agent').default
|
|
64
|
+
const Dispatcher1Wrapper: typeof import('./dispatcher1-wrapper').default
|
|
63
65
|
const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher
|
|
64
66
|
const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher
|
|
65
67
|
const request: typeof import('./api').request
|
|
@@ -8,7 +8,7 @@ export default Interceptors
|
|
|
8
8
|
declare namespace Interceptors {
|
|
9
9
|
export type DumpInterceptorOpts = { maxSize?: number }
|
|
10
10
|
export type RetryInterceptorOpts = RetryHandler.RetryOptions
|
|
11
|
-
export type RedirectInterceptorOpts = { maxRedirections?: number }
|
|
11
|
+
export type RedirectInterceptorOpts = { maxRedirections?: number, throwOnMaxRedirect?: boolean }
|
|
12
12
|
export type DecompressInterceptorOpts = {
|
|
13
13
|
skipErrorResponses?: boolean
|
|
14
14
|
skipStatusCodes?: number[]
|
|
@@ -35,7 +35,5 @@ declare namespace Pool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Agent from './agent'
|
|
2
2
|
import buildConnector from './connector'
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
|
-
import {
|
|
4
|
+
import { OutgoingHttpHeaders } from './header'
|
|
5
5
|
|
|
6
6
|
export default ProxyAgent
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ declare namespace ProxyAgent {
|
|
|
20
20
|
*/
|
|
21
21
|
auth?: string;
|
|
22
22
|
token?: string;
|
|
23
|
-
headers?:
|
|
23
|
+
headers?: OutgoingHttpHeaders;
|
|
24
24
|
requestTls?: buildConnector.BuildOptions;
|
|
25
25
|
proxyTls?: buildConnector.BuildOptions;
|
|
26
26
|
clientFactory?(origin: URL, opts: object): Dispatcher;
|
|
@@ -35,7 +35,5 @@ declare namespace RoundRobinPool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { RoundRobinPool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -30,7 +30,9 @@ declare namespace SnapshotRecorder {
|
|
|
30
30
|
ignoreHeaders?: string[]
|
|
31
31
|
excludeHeaders?: string[]
|
|
32
32
|
matchBody?: boolean
|
|
33
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
33
34
|
matchQuery?: boolean
|
|
35
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
34
36
|
caseSensitive?: boolean
|
|
35
37
|
shouldRecord?: (requestOpts: any) => boolean
|
|
36
38
|
shouldPlayback?: (requestOpts: any) => boolean
|
|
@@ -98,7 +100,9 @@ declare namespace SnapshotAgent {
|
|
|
98
100
|
ignoreHeaders?: string[]
|
|
99
101
|
excludeHeaders?: string[]
|
|
100
102
|
matchBody?: boolean
|
|
103
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
101
104
|
matchQuery?: boolean
|
|
105
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
102
106
|
caseSensitive?: boolean
|
|
103
107
|
shouldRecord?: (requestOpts: any) => boolean
|
|
104
108
|
shouldPlayback?: (requestOpts: any) => boolean
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dispatcher from './dispatcher'
|
|
2
2
|
import buildConnector from './connector'
|
|
3
|
-
import {
|
|
3
|
+
import { OutgoingHttpHeaders } from './header'
|
|
4
4
|
import Pool from './pool'
|
|
5
5
|
|
|
6
6
|
export default Socks5ProxyAgent
|
|
@@ -12,7 +12,7 @@ declare class Socks5ProxyAgent extends Dispatcher {
|
|
|
12
12
|
declare namespace Socks5ProxyAgent {
|
|
13
13
|
export interface Options extends Pool.Options {
|
|
14
14
|
/** Additional headers to send with the proxy connection */
|
|
15
|
-
headers?:
|
|
15
|
+
headers?: OutgoingHttpHeaders;
|
|
16
16
|
/** SOCKS5 proxy username for authentication */
|
|
17
17
|
username?: string;
|
|
18
18
|
/** SOCKS5 proxy password for authentication */
|
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"jsii-docgen": "^10.5.0",
|
|
55
55
|
"jsii-pacmak": "^1.136.0",
|
|
56
56
|
"jsii-rosetta": "5.9.x",
|
|
57
|
-
"projen": "0.
|
|
57
|
+
"projen": "0.100.0",
|
|
58
58
|
"ts-jest": "^27",
|
|
59
59
|
"typescript": "^5"
|
|
60
60
|
},
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"access": "public",
|
|
90
90
|
"provenance": true
|
|
91
91
|
},
|
|
92
|
-
"version": "2.1.
|
|
92
|
+
"version": "2.1.61",
|
|
93
93
|
"jest": {
|
|
94
94
|
"coverageProvider": "v8",
|
|
95
95
|
"testMatch": [
|
|
@@ -140,10 +140,8 @@
|
|
|
140
140
|
"module": "cdk_common"
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
"rootDir": "src"
|
|
146
|
-
}
|
|
143
|
+
"tsconfig": "tsconfig.json",
|
|
144
|
+
"validateTsconfig": "strict"
|
|
147
145
|
},
|
|
148
146
|
"awscdkio": {
|
|
149
147
|
"twitter": "neil_kuan",
|