cdk-common 2.1.43 → 2.1.44
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/lib/main.js +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +54 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +46 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +4 -2
- package/node_modules/@types/concat-stream/node_modules/undici-types/connector.d.ts +2 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +7 -5
- package/node_modules/@types/concat-stream/node_modules/undici-types/errors.d.ts +17 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +4 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +54 -7
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +46 -4
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +4 -2
- package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +2 -0
- package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +7 -5
- package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +17 -1
- package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +4 -1
- package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/package.json +3 -3
package/.jsii
CHANGED
|
@@ -13008,6 +13008,6 @@
|
|
|
13008
13008
|
"symbolId": "src/main:LambdaArmFunctionProps"
|
|
13009
13009
|
}
|
|
13010
13010
|
},
|
|
13011
|
-
"version": "2.1.
|
|
13012
|
-
"fingerprint": "
|
|
13011
|
+
"version": "2.1.44",
|
|
13012
|
+
"fingerprint": "FeoBJyH7v+tPCl5LCIq+GXqJoYhHN2ryXbfdXV6Cbos="
|
|
13013
13013
|
}
|
package/lib/main.js
CHANGED
|
@@ -38,5 +38,5 @@ class LambdaArmFunction extends constructs_1.Construct {
|
|
|
38
38
|
}
|
|
39
39
|
exports.LambdaArmFunction = LambdaArmFunction;
|
|
40
40
|
_a = JSII_RTTI_SYMBOL_1;
|
|
41
|
-
LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.1.
|
|
41
|
+
LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.1.44" };
|
|
42
42
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9tYWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbUNBQW1DO0FBQ25DLGlEQUFpRDtBQUNqRCwyQ0FBdUM7QUFLdkMsTUFBYSxpQkFBa0IsU0FBUSxzQkFBUztJQUU5QyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQTRCO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFakIsTUFBTSxlQUFlLEdBQUcsSUFBSSxHQUFHLENBQXlCO1lBQ3RELENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsbUNBQW1DLENBQUM7WUFDakUsQ0FBQyxNQ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AgIGNvbnN0IHdhcm5pbmcgPSBydW50aW1lV2FybmluZ3MuZ2V0KHByb3BzLnJ1bnRpbWUpO1xuICAgIGlmICh3YXJuaW5nKSB7XG4gICAgICBjZGsuQW5ub3RhdGlvbnMub2YodGhpcykuYWRkV2FybmluZyh3YXJuaW5nKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbnZhbGlkIFJ1bnRpbWUgJHtwcm9wcy5ydW50aW1lfSBhdCBBUk0sIFNlZSBodHRwczovL2RvY3MuYXdzLmFtYXpvbi5jb20vbGFtYmRhL2xhdGVzdC9kZy9mb3VuZGF0aW9uLWFyY2guaHRtbD9pY21waWQ9ZG9jc19sYW1iZGFfcnNzYCk7XG4gICAgfVxuXG4gICAgdGhpcy5sYW1iZGFGdW5jdGlvbiA9IG5ldyBsYW1iZGEuRnVuY3Rpb24odGhpcywgJ0xhbWJkYUZ1bmN0aW9uJywge1xuICAgICAgYXJjaGl0ZWN0dXJlOiBwcm9wcy5hcmNoaXRlY3R1cmUgPz8gbGFtYmRhLkFyY2hpdGVjdHVyZS5BUk1fNjQsXG4gICAgICAuLi5wcm9wcyxcbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 14 May 2026 16:39:50 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.8.0",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
},
|
|
148
148
|
"scripts": {},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"undici-types": "
|
|
150
|
+
"undici-types": ">=7.24.0 <7.24.7"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "e3b0c76dfc9cc84424890451a36d8ae1dbc86b0b0e49cc458f2a886fda8e4649",
|
|
154
154
|
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
|
@@ -87,6 +87,29 @@ declare module "node:sqlite" {
|
|
|
87
87
|
* @default true
|
|
88
88
|
*/
|
|
89
89
|
defensive?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Configuration for various SQLite limits. These limits
|
|
92
|
+
* can be used to prevent excessive resource consumption when handling
|
|
93
|
+
* potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html)
|
|
94
|
+
* in the SQLite documentation for details. Default values are determined by
|
|
95
|
+
* SQLite's compile-time defaults and may vary depending on how SQLite was
|
|
96
|
+
* built. The following properties are supported:
|
|
97
|
+
* @since v25.8.0
|
|
98
|
+
*/
|
|
99
|
+
limits?: NodeJS.PartialOptions<DatabaseLimits> | undefined;
|
|
100
|
+
}
|
|
101
|
+
interface DatabaseLimits {
|
|
102
|
+
length: number;
|
|
103
|
+
sqlLength: number;
|
|
104
|
+
column: number;
|
|
105
|
+
exprDepth: number;
|
|
106
|
+
compoundSelect: number;
|
|
107
|
+
vdbeOp: number;
|
|
108
|
+
functionArg: number;
|
|
109
|
+
attach: number;
|
|
110
|
+
likePatternLength: number;
|
|
111
|
+
variableNumber: number;
|
|
112
|
+
triggerDepth: number;
|
|
90
113
|
}
|
|
91
114
|
interface CreateSessionOptions {
|
|
92
115
|
/**
|
|
@@ -311,18 +334,17 @@ declare module "node:sqlite" {
|
|
|
311
334
|
* @since v22.13.0
|
|
312
335
|
* @param name The name of the SQLite function to create.
|
|
313
336
|
* @param options Optional configuration settings for the function.
|
|
314
|
-
* @param
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* The result defaults to `NULL` if the return value is `undefined`.
|
|
337
|
+
* @param fn The JavaScript function to call when the SQLite function is
|
|
338
|
+
* invoked. The return value of this function should be a valid SQLite data type:
|
|
339
|
+
* see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to
|
|
340
|
+
* `NULL` if the return value is `undefined`.
|
|
319
341
|
*/
|
|
320
342
|
function(
|
|
321
343
|
name: string,
|
|
322
344
|
options: FunctionOptions,
|
|
323
|
-
|
|
345
|
+
fn: (...args: SQLOutputValue[]) => SQLInputValue,
|
|
324
346
|
): void;
|
|
325
|
-
function(name: string,
|
|
347
|
+
function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void;
|
|
326
348
|
/**
|
|
327
349
|
* Sets an authorizer callback that SQLite will invoke whenever it attempts to
|
|
328
350
|
* access data or modify the database schema through prepared statements.
|
|
@@ -392,6 +414,31 @@ declare module "node:sqlite" {
|
|
|
392
414
|
* @since v24.0.0
|
|
393
415
|
*/
|
|
394
416
|
readonly isTransaction: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* An object for getting and setting SQLite database limits at runtime.
|
|
419
|
+
* Each property corresponds to an SQLite limit and can be read or written.
|
|
420
|
+
*
|
|
421
|
+
* ```js
|
|
422
|
+
* const db = new DatabaseSync(':memory:');
|
|
423
|
+
*
|
|
424
|
+
* // Read current limit
|
|
425
|
+
* console.log(db.limits.length);
|
|
426
|
+
*
|
|
427
|
+
* // Set a new limit
|
|
428
|
+
* db.limits.sqlLength = 100000;
|
|
429
|
+
*
|
|
430
|
+
* // Reset a limit to its compile-time maximum
|
|
431
|
+
* db.limits.sqlLength = Infinity;
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* Available properties: `length`, `sqlLength`, `column`, `exprDepth`,
|
|
435
|
+
* `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`,
|
|
436
|
+
* `variableNumber`, `triggerDepth`.
|
|
437
|
+
*
|
|
438
|
+
* Setting a property to `Infinity` resets the limit to its compile-time maximum value.
|
|
439
|
+
* @since v25.8.0
|
|
440
|
+
*/
|
|
441
|
+
readonly limits: DatabaseLimits;
|
|
395
442
|
/**
|
|
396
443
|
* Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
|
|
397
444
|
* the constructor. An exception is thrown if the database is already open.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module "node:test" {
|
|
2
|
-
import { AssertMethodNames } from "node:assert";
|
|
2
|
+
import { AssertMethodNames, AssertPredicate } from "node:assert";
|
|
3
3
|
import { Readable, ReadableEventMap } from "node:stream";
|
|
4
4
|
import { TestEvent } from "node:test/reporters";
|
|
5
5
|
import { URL } from "node:url";
|
|
@@ -111,7 +111,12 @@ declare module "node:test" {
|
|
|
111
111
|
function only(name?: string, fn?: SuiteFn): Promise<void>;
|
|
112
112
|
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
113
113
|
function only(fn?: SuiteFn): Promise<void>;
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* This flips the pass/fail reporting for a specific test or suite: a flagged test
|
|
116
|
+
* case must throw in order to pass, and a flagged test case that does not throw
|
|
117
|
+
* fails.
|
|
118
|
+
* @since v25.5.0
|
|
119
|
+
*/
|
|
115
120
|
function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
116
121
|
function expectFailure(name?: string, fn?: SuiteFn): Promise<void>;
|
|
117
122
|
function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
@@ -992,6 +997,34 @@ declare module "node:test" {
|
|
|
992
997
|
* @since v21.7.0, v20.12.0
|
|
993
998
|
*/
|
|
994
999
|
readonly attempt: number;
|
|
1000
|
+
/**
|
|
1001
|
+
* The unique identifier of the worker running the current test file. This value is
|
|
1002
|
+
* derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests
|
|
1003
|
+
* with `--test-isolation=process` (the default), each test file runs in a separate
|
|
1004
|
+
* child process and is assigned a worker ID from 1 to N, where N is the number of
|
|
1005
|
+
* concurrent workers. When running with `--test-isolation=none`, all tests run in
|
|
1006
|
+
* the same process and the worker ID is always 1. This value is `undefined` when
|
|
1007
|
+
* not running in a test context.
|
|
1008
|
+
*
|
|
1009
|
+
* This property is useful for splitting resources (like database connections or
|
|
1010
|
+
* server ports) across concurrent test files:
|
|
1011
|
+
*
|
|
1012
|
+
* ```js
|
|
1013
|
+
* import { test } from 'node:test';
|
|
1014
|
+
* import { process } from 'node:process';
|
|
1015
|
+
*
|
|
1016
|
+
* test('database operations', async (t) => {
|
|
1017
|
+
* // Worker ID is available via context
|
|
1018
|
+
* console.log(`Running in worker ${t.workerId}`);
|
|
1019
|
+
*
|
|
1020
|
+
* // Or via environment variable (available at import time)
|
|
1021
|
+
* const workerId = process.env.NODE_TEST_WORKER_ID;
|
|
1022
|
+
* // Use workerId to allocate separate resources per worker
|
|
1023
|
+
* });
|
|
1024
|
+
* ```
|
|
1025
|
+
* @since v25.8.0
|
|
1026
|
+
*/
|
|
1027
|
+
readonly workerId: number | undefined;
|
|
995
1028
|
/**
|
|
996
1029
|
* This function is used to set the number of assertions and subtests that are expected to run
|
|
997
1030
|
* within the test. If the number of assertions and subtests that run does not match the
|
|
@@ -1272,6 +1305,17 @@ declare module "node:test" {
|
|
|
1272
1305
|
* @default false
|
|
1273
1306
|
*/
|
|
1274
1307
|
concurrency?: number | boolean | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed
|
|
1310
|
+
* in the test results as the reason why the test is expected to fail. If a
|
|
1311
|
+
* `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes
|
|
1312
|
+
* only if the thrown error matches, following the behavior of
|
|
1313
|
+
* `assert.throws`. To provide both a reason and validation, pass an object
|
|
1314
|
+
* with `label` (string) and `match` (RegExp, Function, Object, or Error).
|
|
1315
|
+
* @since v25.5.0
|
|
1316
|
+
* @default false
|
|
1317
|
+
*/
|
|
1318
|
+
expectFailure?: boolean | string | AssertPredicate | undefined;
|
|
1275
1319
|
/**
|
|
1276
1320
|
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
|
1277
1321
|
* run. Otherwise, the test is skipped.
|
|
@@ -1310,8 +1354,6 @@ declare module "node:test" {
|
|
|
1310
1354
|
* @since v22.2.0
|
|
1311
1355
|
*/
|
|
1312
1356
|
plan?: number | undefined;
|
|
1313
|
-
// added in v25.5.0, undocumented
|
|
1314
|
-
expectFailure?: boolean | undefined;
|
|
1315
1357
|
}
|
|
1316
1358
|
/**
|
|
1317
1359
|
* This function creates a hook that runs before executing a suite.
|
|
@@ -235,7 +235,7 @@ declare module "node:url" {
|
|
|
235
235
|
/**
|
|
236
236
|
* `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`.
|
|
237
237
|
*
|
|
238
|
-
* Because it invokes the deprecated `url.parse()
|
|
238
|
+
* Because it invokes the deprecated `url.parse()` internally, passing a string argument
|
|
239
239
|
* to `url.format()` is itself deprecated.
|
|
240
240
|
*
|
|
241
241
|
* Canonicalizing a URL string can be performed using the WHATWG URL API, by
|
|
@@ -265,6 +265,8 @@ declare module "node:url" {
|
|
|
265
265
|
* url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
|
266
266
|
* ```
|
|
267
267
|
*
|
|
268
|
+
* Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated.
|
|
269
|
+
*
|
|
268
270
|
* To achieve the same result using the WHATWG URL API:
|
|
269
271
|
*
|
|
270
272
|
* ```js
|
|
@@ -283,7 +285,7 @@ declare module "node:url" {
|
|
|
283
285
|
* resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
|
284
286
|
* ```
|
|
285
287
|
* @since v0.1.25
|
|
286
|
-
* @
|
|
288
|
+
* @deprecated Use the WHATWG URL API instead.
|
|
287
289
|
* @param from The base URL to use if `to` is a relative URL.
|
|
288
290
|
* @param to The target URL to resolve.
|
|
289
291
|
*/
|
|
@@ -13,6 +13,7 @@ declare namespace buildConnector {
|
|
|
13
13
|
port?: number;
|
|
14
14
|
keepAlive?: boolean | null;
|
|
15
15
|
keepAliveInitialDelay?: number | null;
|
|
16
|
+
typeOfService?: number | null;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface Options {
|
|
@@ -22,6 +23,7 @@ declare namespace buildConnector {
|
|
|
22
23
|
port: string
|
|
23
24
|
servername?: string
|
|
24
25
|
localAddress?: string | null
|
|
26
|
+
socketPath?: string | null
|
|
25
27
|
httpSocket?: Socket
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -96,7 +96,7 @@ declare class Dispatcher extends EventEmitter {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
declare namespace Dispatcher {
|
|
99
|
-
export interface ComposedDispatcher extends Dispatcher {}
|
|
99
|
+
export interface ComposedDispatcher extends Dispatcher { }
|
|
100
100
|
export type Dispatch = Dispatcher['dispatch']
|
|
101
101
|
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
|
|
102
102
|
export interface DispatchOptions {
|
|
@@ -113,6 +113,8 @@ declare namespace Dispatcher {
|
|
|
113
113
|
idempotent?: boolean;
|
|
114
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'`. */
|
|
115
115
|
blocking?: boolean;
|
|
116
|
+
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. Default: `0` */
|
|
117
|
+
typeOfService?: number | null;
|
|
116
118
|
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
|
|
117
119
|
upgrade?: boolean | string | null;
|
|
118
120
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
|
|
@@ -213,10 +215,10 @@ declare namespace Dispatcher {
|
|
|
213
215
|
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
|
|
214
216
|
|
|
215
217
|
export interface DispatchController {
|
|
216
|
-
get aborted
|
|
217
|
-
get paused
|
|
218
|
-
get reason
|
|
219
|
-
abort
|
|
218
|
+
get aborted(): boolean
|
|
219
|
+
get paused(): boolean
|
|
220
|
+
get reason(): Error | null
|
|
221
|
+
abort(reason: Error): void
|
|
220
222
|
pause(): void
|
|
221
223
|
resume(): void
|
|
222
224
|
}
|
|
@@ -154,8 +154,24 @@ declare namespace Errors {
|
|
|
154
154
|
code: 'UND_ERR_PRX_TLS'
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
class MaxOriginsReachedError extends UndiciError {
|
|
157
|
+
export class MaxOriginsReachedError extends UndiciError {
|
|
158
158
|
name: 'MaxOriginsReachedError'
|
|
159
159
|
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
/** SOCKS5 proxy related error. */
|
|
163
|
+
export class Socks5ProxyError extends UndiciError {
|
|
164
|
+
constructor (
|
|
165
|
+
message?: string,
|
|
166
|
+
code?: string
|
|
167
|
+
)
|
|
168
|
+
name: 'Socks5ProxyError'
|
|
169
|
+
code: string
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** WebSocket decompressed message exceeded maximum size. */
|
|
173
|
+
export class MessageSizeExceededError extends UndiciError {
|
|
174
|
+
name: 'MessageSizeExceededError'
|
|
175
|
+
code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'
|
|
176
|
+
}
|
|
161
177
|
}
|
|
@@ -18,6 +18,7 @@ import { SnapshotAgent } from './snapshot-agent'
|
|
|
18
18
|
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
|
|
19
19
|
import mockErrors from './mock-errors'
|
|
20
20
|
import ProxyAgent from './proxy-agent'
|
|
21
|
+
import Socks5ProxyAgent from './socks5-proxy-agent'
|
|
21
22
|
import EnvHttpProxyAgent from './env-http-proxy-agent'
|
|
22
23
|
import RetryHandler from './retry-handler'
|
|
23
24
|
import RetryAgent from './retry-agent'
|
|
@@ -43,7 +44,7 @@ export { Interceptable } from './mock-interceptor'
|
|
|
43
44
|
|
|
44
45
|
declare function globalThisInstall (): void
|
|
45
46
|
|
|
46
|
-
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, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
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 }
|
|
47
48
|
export default Undici
|
|
48
49
|
|
|
49
50
|
declare namespace Undici {
|
|
@@ -73,6 +74,8 @@ declare namespace Undici {
|
|
|
73
74
|
const MockCallHistory: typeof import('./mock-call-history').MockCallHistory
|
|
74
75
|
const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog
|
|
75
76
|
const mockErrors: typeof import('./mock-errors').default
|
|
77
|
+
const ProxyAgent: typeof import('./proxy-agent').default
|
|
78
|
+
const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default
|
|
76
79
|
const fetch: typeof import('./fetch').fetch
|
|
77
80
|
const Headers: typeof import('./fetch').Headers
|
|
78
81
|
const Response: typeof import('./fetch').Response
|
|
@@ -60,6 +60,13 @@ declare namespace Interceptors {
|
|
|
60
60
|
* @default []
|
|
61
61
|
*/
|
|
62
62
|
excludeHeaderNames?: string[]
|
|
63
|
+
/**
|
|
64
|
+
* Maximum bytes buffered per paused waiting deduplicated handler.
|
|
65
|
+
* If a waiting handler remains paused and exceeds this threshold,
|
|
66
|
+
* it is failed with an abort error to prevent unbounded memory growth.
|
|
67
|
+
* @default 5 * 1024 * 1024
|
|
68
|
+
*/
|
|
69
|
+
maxBufferSize?: number
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Dispatcher from './dispatcher'
|
|
2
|
+
import buildConnector from './connector'
|
|
3
|
+
import { IncomingHttpHeaders } from './header'
|
|
4
|
+
import Pool from './pool'
|
|
5
|
+
|
|
6
|
+
export default Socks5ProxyAgent
|
|
7
|
+
|
|
8
|
+
declare class Socks5ProxyAgent extends Dispatcher {
|
|
9
|
+
constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare namespace Socks5ProxyAgent {
|
|
13
|
+
export interface Options extends Pool.Options {
|
|
14
|
+
/** Additional headers to send with the proxy connection */
|
|
15
|
+
headers?: IncomingHttpHeaders;
|
|
16
|
+
/** SOCKS5 proxy username for authentication */
|
|
17
|
+
username?: string;
|
|
18
|
+
/** SOCKS5 proxy password for authentication */
|
|
19
|
+
password?: string;
|
|
20
|
+
/** Custom connector function for proxy connection */
|
|
21
|
+
connect?: buildConnector.connector;
|
|
22
|
+
/** TLS options for the proxy connection (for SOCKS5 over TLS) */
|
|
23
|
+
proxyTls?: buildConnector.BuildOptions;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 14 May 2026 16:39:50 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.8.0",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
},
|
|
148
148
|
"scripts": {},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"undici-types": "
|
|
150
|
+
"undici-types": ">=7.24.0 <7.24.7"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "e3b0c76dfc9cc84424890451a36d8ae1dbc86b0b0e49cc458f2a886fda8e4649",
|
|
154
154
|
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
|
@@ -87,6 +87,29 @@ declare module "node:sqlite" {
|
|
|
87
87
|
* @default true
|
|
88
88
|
*/
|
|
89
89
|
defensive?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Configuration for various SQLite limits. These limits
|
|
92
|
+
* can be used to prevent excessive resource consumption when handling
|
|
93
|
+
* potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html)
|
|
94
|
+
* in the SQLite documentation for details. Default values are determined by
|
|
95
|
+
* SQLite's compile-time defaults and may vary depending on how SQLite was
|
|
96
|
+
* built. The following properties are supported:
|
|
97
|
+
* @since v25.8.0
|
|
98
|
+
*/
|
|
99
|
+
limits?: NodeJS.PartialOptions<DatabaseLimits> | undefined;
|
|
100
|
+
}
|
|
101
|
+
interface DatabaseLimits {
|
|
102
|
+
length: number;
|
|
103
|
+
sqlLength: number;
|
|
104
|
+
column: number;
|
|
105
|
+
exprDepth: number;
|
|
106
|
+
compoundSelect: number;
|
|
107
|
+
vdbeOp: number;
|
|
108
|
+
functionArg: number;
|
|
109
|
+
attach: number;
|
|
110
|
+
likePatternLength: number;
|
|
111
|
+
variableNumber: number;
|
|
112
|
+
triggerDepth: number;
|
|
90
113
|
}
|
|
91
114
|
interface CreateSessionOptions {
|
|
92
115
|
/**
|
|
@@ -311,18 +334,17 @@ declare module "node:sqlite" {
|
|
|
311
334
|
* @since v22.13.0
|
|
312
335
|
* @param name The name of the SQLite function to create.
|
|
313
336
|
* @param options Optional configuration settings for the function.
|
|
314
|
-
* @param
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* The result defaults to `NULL` if the return value is `undefined`.
|
|
337
|
+
* @param fn The JavaScript function to call when the SQLite function is
|
|
338
|
+
* invoked. The return value of this function should be a valid SQLite data type:
|
|
339
|
+
* see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to
|
|
340
|
+
* `NULL` if the return value is `undefined`.
|
|
319
341
|
*/
|
|
320
342
|
function(
|
|
321
343
|
name: string,
|
|
322
344
|
options: FunctionOptions,
|
|
323
|
-
|
|
345
|
+
fn: (...args: SQLOutputValue[]) => SQLInputValue,
|
|
324
346
|
): void;
|
|
325
|
-
function(name: string,
|
|
347
|
+
function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void;
|
|
326
348
|
/**
|
|
327
349
|
* Sets an authorizer callback that SQLite will invoke whenever it attempts to
|
|
328
350
|
* access data or modify the database schema through prepared statements.
|
|
@@ -392,6 +414,31 @@ declare module "node:sqlite" {
|
|
|
392
414
|
* @since v24.0.0
|
|
393
415
|
*/
|
|
394
416
|
readonly isTransaction: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* An object for getting and setting SQLite database limits at runtime.
|
|
419
|
+
* Each property corresponds to an SQLite limit and can be read or written.
|
|
420
|
+
*
|
|
421
|
+
* ```js
|
|
422
|
+
* const db = new DatabaseSync(':memory:');
|
|
423
|
+
*
|
|
424
|
+
* // Read current limit
|
|
425
|
+
* console.log(db.limits.length);
|
|
426
|
+
*
|
|
427
|
+
* // Set a new limit
|
|
428
|
+
* db.limits.sqlLength = 100000;
|
|
429
|
+
*
|
|
430
|
+
* // Reset a limit to its compile-time maximum
|
|
431
|
+
* db.limits.sqlLength = Infinity;
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* Available properties: `length`, `sqlLength`, `column`, `exprDepth`,
|
|
435
|
+
* `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`,
|
|
436
|
+
* `variableNumber`, `triggerDepth`.
|
|
437
|
+
*
|
|
438
|
+
* Setting a property to `Infinity` resets the limit to its compile-time maximum value.
|
|
439
|
+
* @since v25.8.0
|
|
440
|
+
*/
|
|
441
|
+
readonly limits: DatabaseLimits;
|
|
395
442
|
/**
|
|
396
443
|
* Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
|
|
397
444
|
* the constructor. An exception is thrown if the database is already open.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module "node:test" {
|
|
2
|
-
import { AssertMethodNames } from "node:assert";
|
|
2
|
+
import { AssertMethodNames, AssertPredicate } from "node:assert";
|
|
3
3
|
import { Readable, ReadableEventMap } from "node:stream";
|
|
4
4
|
import { TestEvent } from "node:test/reporters";
|
|
5
5
|
import { URL } from "node:url";
|
|
@@ -111,7 +111,12 @@ declare module "node:test" {
|
|
|
111
111
|
function only(name?: string, fn?: SuiteFn): Promise<void>;
|
|
112
112
|
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
113
113
|
function only(fn?: SuiteFn): Promise<void>;
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* This flips the pass/fail reporting for a specific test or suite: a flagged test
|
|
116
|
+
* case must throw in order to pass, and a flagged test case that does not throw
|
|
117
|
+
* fails.
|
|
118
|
+
* @since v25.5.0
|
|
119
|
+
*/
|
|
115
120
|
function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
116
121
|
function expectFailure(name?: string, fn?: SuiteFn): Promise<void>;
|
|
117
122
|
function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
@@ -992,6 +997,34 @@ declare module "node:test" {
|
|
|
992
997
|
* @since v21.7.0, v20.12.0
|
|
993
998
|
*/
|
|
994
999
|
readonly attempt: number;
|
|
1000
|
+
/**
|
|
1001
|
+
* The unique identifier of the worker running the current test file. This value is
|
|
1002
|
+
* derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests
|
|
1003
|
+
* with `--test-isolation=process` (the default), each test file runs in a separate
|
|
1004
|
+
* child process and is assigned a worker ID from 1 to N, where N is the number of
|
|
1005
|
+
* concurrent workers. When running with `--test-isolation=none`, all tests run in
|
|
1006
|
+
* the same process and the worker ID is always 1. This value is `undefined` when
|
|
1007
|
+
* not running in a test context.
|
|
1008
|
+
*
|
|
1009
|
+
* This property is useful for splitting resources (like database connections or
|
|
1010
|
+
* server ports) across concurrent test files:
|
|
1011
|
+
*
|
|
1012
|
+
* ```js
|
|
1013
|
+
* import { test } from 'node:test';
|
|
1014
|
+
* import { process } from 'node:process';
|
|
1015
|
+
*
|
|
1016
|
+
* test('database operations', async (t) => {
|
|
1017
|
+
* // Worker ID is available via context
|
|
1018
|
+
* console.log(`Running in worker ${t.workerId}`);
|
|
1019
|
+
*
|
|
1020
|
+
* // Or via environment variable (available at import time)
|
|
1021
|
+
* const workerId = process.env.NODE_TEST_WORKER_ID;
|
|
1022
|
+
* // Use workerId to allocate separate resources per worker
|
|
1023
|
+
* });
|
|
1024
|
+
* ```
|
|
1025
|
+
* @since v25.8.0
|
|
1026
|
+
*/
|
|
1027
|
+
readonly workerId: number | undefined;
|
|
995
1028
|
/**
|
|
996
1029
|
* This function is used to set the number of assertions and subtests that are expected to run
|
|
997
1030
|
* within the test. If the number of assertions and subtests that run does not match the
|
|
@@ -1272,6 +1305,17 @@ declare module "node:test" {
|
|
|
1272
1305
|
* @default false
|
|
1273
1306
|
*/
|
|
1274
1307
|
concurrency?: number | boolean | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed
|
|
1310
|
+
* in the test results as the reason why the test is expected to fail. If a
|
|
1311
|
+
* `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes
|
|
1312
|
+
* only if the thrown error matches, following the behavior of
|
|
1313
|
+
* `assert.throws`. To provide both a reason and validation, pass an object
|
|
1314
|
+
* with `label` (string) and `match` (RegExp, Function, Object, or Error).
|
|
1315
|
+
* @since v25.5.0
|
|
1316
|
+
* @default false
|
|
1317
|
+
*/
|
|
1318
|
+
expectFailure?: boolean | string | AssertPredicate | undefined;
|
|
1275
1319
|
/**
|
|
1276
1320
|
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
|
1277
1321
|
* run. Otherwise, the test is skipped.
|
|
@@ -1310,8 +1354,6 @@ declare module "node:test" {
|
|
|
1310
1354
|
* @since v22.2.0
|
|
1311
1355
|
*/
|
|
1312
1356
|
plan?: number | undefined;
|
|
1313
|
-
// added in v25.5.0, undocumented
|
|
1314
|
-
expectFailure?: boolean | undefined;
|
|
1315
1357
|
}
|
|
1316
1358
|
/**
|
|
1317
1359
|
* This function creates a hook that runs before executing a suite.
|
|
@@ -235,7 +235,7 @@ declare module "node:url" {
|
|
|
235
235
|
/**
|
|
236
236
|
* `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`.
|
|
237
237
|
*
|
|
238
|
-
* Because it invokes the deprecated `url.parse()
|
|
238
|
+
* Because it invokes the deprecated `url.parse()` internally, passing a string argument
|
|
239
239
|
* to `url.format()` is itself deprecated.
|
|
240
240
|
*
|
|
241
241
|
* Canonicalizing a URL string can be performed using the WHATWG URL API, by
|
|
@@ -265,6 +265,8 @@ declare module "node:url" {
|
|
|
265
265
|
* url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
|
266
266
|
* ```
|
|
267
267
|
*
|
|
268
|
+
* Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated.
|
|
269
|
+
*
|
|
268
270
|
* To achieve the same result using the WHATWG URL API:
|
|
269
271
|
*
|
|
270
272
|
* ```js
|
|
@@ -283,7 +285,7 @@ declare module "node:url" {
|
|
|
283
285
|
* resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
|
284
286
|
* ```
|
|
285
287
|
* @since v0.1.25
|
|
286
|
-
* @
|
|
288
|
+
* @deprecated Use the WHATWG URL API instead.
|
|
287
289
|
* @param from The base URL to use if `to` is a relative URL.
|
|
288
290
|
* @param to The target URL to resolve.
|
|
289
291
|
*/
|
|
@@ -13,6 +13,7 @@ declare namespace buildConnector {
|
|
|
13
13
|
port?: number;
|
|
14
14
|
keepAlive?: boolean | null;
|
|
15
15
|
keepAliveInitialDelay?: number | null;
|
|
16
|
+
typeOfService?: number | null;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface Options {
|
|
@@ -22,6 +23,7 @@ declare namespace buildConnector {
|
|
|
22
23
|
port: string
|
|
23
24
|
servername?: string
|
|
24
25
|
localAddress?: string | null
|
|
26
|
+
socketPath?: string | null
|
|
25
27
|
httpSocket?: Socket
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -96,7 +96,7 @@ declare class Dispatcher extends EventEmitter {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
declare namespace Dispatcher {
|
|
99
|
-
export interface ComposedDispatcher extends Dispatcher {}
|
|
99
|
+
export interface ComposedDispatcher extends Dispatcher { }
|
|
100
100
|
export type Dispatch = Dispatcher['dispatch']
|
|
101
101
|
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
|
|
102
102
|
export interface DispatchOptions {
|
|
@@ -113,6 +113,8 @@ declare namespace Dispatcher {
|
|
|
113
113
|
idempotent?: boolean;
|
|
114
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'`. */
|
|
115
115
|
blocking?: boolean;
|
|
116
|
+
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. Default: `0` */
|
|
117
|
+
typeOfService?: number | null;
|
|
116
118
|
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
|
|
117
119
|
upgrade?: boolean | string | null;
|
|
118
120
|
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
|
|
@@ -213,10 +215,10 @@ declare namespace Dispatcher {
|
|
|
213
215
|
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
|
|
214
216
|
|
|
215
217
|
export interface DispatchController {
|
|
216
|
-
get aborted
|
|
217
|
-
get paused
|
|
218
|
-
get reason
|
|
219
|
-
abort
|
|
218
|
+
get aborted(): boolean
|
|
219
|
+
get paused(): boolean
|
|
220
|
+
get reason(): Error | null
|
|
221
|
+
abort(reason: Error): void
|
|
220
222
|
pause(): void
|
|
221
223
|
resume(): void
|
|
222
224
|
}
|
|
@@ -154,8 +154,24 @@ declare namespace Errors {
|
|
|
154
154
|
code: 'UND_ERR_PRX_TLS'
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
class MaxOriginsReachedError extends UndiciError {
|
|
157
|
+
export class MaxOriginsReachedError extends UndiciError {
|
|
158
158
|
name: 'MaxOriginsReachedError'
|
|
159
159
|
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
/** SOCKS5 proxy related error. */
|
|
163
|
+
export class Socks5ProxyError extends UndiciError {
|
|
164
|
+
constructor (
|
|
165
|
+
message?: string,
|
|
166
|
+
code?: string
|
|
167
|
+
)
|
|
168
|
+
name: 'Socks5ProxyError'
|
|
169
|
+
code: string
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** WebSocket decompressed message exceeded maximum size. */
|
|
173
|
+
export class MessageSizeExceededError extends UndiciError {
|
|
174
|
+
name: 'MessageSizeExceededError'
|
|
175
|
+
code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'
|
|
176
|
+
}
|
|
161
177
|
}
|
|
@@ -18,6 +18,7 @@ import { SnapshotAgent } from './snapshot-agent'
|
|
|
18
18
|
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
|
|
19
19
|
import mockErrors from './mock-errors'
|
|
20
20
|
import ProxyAgent from './proxy-agent'
|
|
21
|
+
import Socks5ProxyAgent from './socks5-proxy-agent'
|
|
21
22
|
import EnvHttpProxyAgent from './env-http-proxy-agent'
|
|
22
23
|
import RetryHandler from './retry-handler'
|
|
23
24
|
import RetryAgent from './retry-agent'
|
|
@@ -43,7 +44,7 @@ export { Interceptable } from './mock-interceptor'
|
|
|
43
44
|
|
|
44
45
|
declare function globalThisInstall (): void
|
|
45
46
|
|
|
46
|
-
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, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
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 }
|
|
47
48
|
export default Undici
|
|
48
49
|
|
|
49
50
|
declare namespace Undici {
|
|
@@ -73,6 +74,8 @@ declare namespace Undici {
|
|
|
73
74
|
const MockCallHistory: typeof import('./mock-call-history').MockCallHistory
|
|
74
75
|
const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog
|
|
75
76
|
const mockErrors: typeof import('./mock-errors').default
|
|
77
|
+
const ProxyAgent: typeof import('./proxy-agent').default
|
|
78
|
+
const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default
|
|
76
79
|
const fetch: typeof import('./fetch').fetch
|
|
77
80
|
const Headers: typeof import('./fetch').Headers
|
|
78
81
|
const Response: typeof import('./fetch').Response
|
|
@@ -60,6 +60,13 @@ declare namespace Interceptors {
|
|
|
60
60
|
* @default []
|
|
61
61
|
*/
|
|
62
62
|
excludeHeaderNames?: string[]
|
|
63
|
+
/**
|
|
64
|
+
* Maximum bytes buffered per paused waiting deduplicated handler.
|
|
65
|
+
* If a waiting handler remains paused and exceeds this threshold,
|
|
66
|
+
* it is failed with an abort error to prevent unbounded memory growth.
|
|
67
|
+
* @default 5 * 1024 * 1024
|
|
68
|
+
*/
|
|
69
|
+
maxBufferSize?: number
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Dispatcher from './dispatcher'
|
|
2
|
+
import buildConnector from './connector'
|
|
3
|
+
import { IncomingHttpHeaders } from './header'
|
|
4
|
+
import Pool from './pool'
|
|
5
|
+
|
|
6
|
+
export default Socks5ProxyAgent
|
|
7
|
+
|
|
8
|
+
declare class Socks5ProxyAgent extends Dispatcher {
|
|
9
|
+
constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare namespace Socks5ProxyAgent {
|
|
13
|
+
export interface Options extends Pool.Options {
|
|
14
|
+
/** Additional headers to send with the proxy connection */
|
|
15
|
+
headers?: IncomingHttpHeaders;
|
|
16
|
+
/** SOCKS5 proxy username for authentication */
|
|
17
|
+
username?: string;
|
|
18
|
+
/** SOCKS5 proxy password for authentication */
|
|
19
|
+
password?: string;
|
|
20
|
+
/** Custom connector function for proxy connection */
|
|
21
|
+
connect?: buildConnector.connector;
|
|
22
|
+
/** TLS options for the proxy connection (for SOCKS5 over TLS) */
|
|
23
|
+
proxyTls?: buildConnector.BuildOptions;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"jest": "^27",
|
|
51
51
|
"jest-junit": "^17",
|
|
52
52
|
"jsii": "5.9.x",
|
|
53
|
-
"jsii-diff": "^1.
|
|
53
|
+
"jsii-diff": "^1.130.0",
|
|
54
54
|
"jsii-docgen": "^10.5.0",
|
|
55
|
-
"jsii-pacmak": "^1.
|
|
55
|
+
"jsii-pacmak": "^1.130.0",
|
|
56
56
|
"jsii-rosetta": "5.9.x",
|
|
57
57
|
"projen": "0.99.61",
|
|
58
58
|
"ts-jest": "^27",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"access": "public",
|
|
89
89
|
"provenance": true
|
|
90
90
|
},
|
|
91
|
-
"version": "2.1.
|
|
91
|
+
"version": "2.1.44",
|
|
92
92
|
"jest": {
|
|
93
93
|
"coverageProvider": "v8",
|
|
94
94
|
"testMatch": [
|