cdk-common 2.0.1307 → 2.0.1309
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 +8 -2
- package/API.md +6 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +2 -1
- package/lib/managed-policies.js +2 -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/assert.d.ts +36 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +8 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +50 -33
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +198 -164
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +9 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +39 -21
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +89 -76
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +52 -22
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +29 -22
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +82 -50
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +7 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +3 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +2 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +114 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +88 -64
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +12 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +20 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +24 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +40 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +25 -24
- package/node_modules/@types/concat-stream/node_modules/undici-types/agent.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/errors.d.ts +5 -15
- package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +5 -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/snapshot-agent.d.ts +5 -3
- package/node_modules/@types/concat-stream/node_modules/undici-types/webidl.d.ts +82 -21
- 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.d.ts +36 -1
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +8 -4
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +50 -33
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +198 -164
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +9 -8
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +39 -21
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +89 -76
- package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +52 -22
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +29 -22
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +82 -50
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +7 -6
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +3 -2
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +2 -1
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +114 -7
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +88 -64
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +12 -3
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +20 -3
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +24 -3
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +40 -3
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +25 -24
- package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
- package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +5 -15
- package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +5 -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/snapshot-agent.d.ts +5 -3
- package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +82 -21
- package/package.json +2 -2
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
|
|
93
93
|
*/
|
|
94
94
|
declare module "zlib" {
|
|
95
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
95
96
|
import * as stream from "node:stream";
|
|
96
97
|
interface ZlibOptions {
|
|
97
98
|
/**
|
|
@@ -227,7 +228,7 @@ declare module "zlib" {
|
|
|
227
228
|
* @returns A 32-bit unsigned integer containing the checksum.
|
|
228
229
|
* @since v22.2.0
|
|
229
230
|
*/
|
|
230
|
-
function crc32(data: string |
|
|
231
|
+
function crc32(data: string | NodeJS.ArrayBufferView, value?: number): number;
|
|
231
232
|
/**
|
|
232
233
|
* Creates and returns a new `BrotliCompress` object.
|
|
233
234
|
* @since v11.7.0, v10.16.0
|
|
@@ -291,124 +292,124 @@ declare module "zlib" {
|
|
|
291
292
|
*/
|
|
292
293
|
function createZstdDecompress(options?: ZstdOptions): ZstdDecompress;
|
|
293
294
|
type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
294
|
-
type CompressCallback = (error: Error | null, result:
|
|
295
|
+
type CompressCallback = (error: Error | null, result: NonSharedBuffer) => void;
|
|
295
296
|
/**
|
|
296
297
|
* @since v11.7.0, v10.16.0
|
|
297
298
|
*/
|
|
298
299
|
function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
299
300
|
function brotliCompress(buf: InputType, callback: CompressCallback): void;
|
|
300
301
|
namespace brotliCompress {
|
|
301
|
-
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<
|
|
302
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
|
|
302
303
|
}
|
|
303
304
|
/**
|
|
304
305
|
* Compress a chunk of data with `BrotliCompress`.
|
|
305
306
|
* @since v11.7.0, v10.16.0
|
|
306
307
|
*/
|
|
307
|
-
function brotliCompressSync(buf: InputType, options?: BrotliOptions):
|
|
308
|
+
function brotliCompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
|
|
308
309
|
/**
|
|
309
310
|
* @since v11.7.0, v10.16.0
|
|
310
311
|
*/
|
|
311
312
|
function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
312
313
|
function brotliDecompress(buf: InputType, callback: CompressCallback): void;
|
|
313
314
|
namespace brotliDecompress {
|
|
314
|
-
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<
|
|
315
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
|
|
315
316
|
}
|
|
316
317
|
/**
|
|
317
318
|
* Decompress a chunk of data with `BrotliDecompress`.
|
|
318
319
|
* @since v11.7.0, v10.16.0
|
|
319
320
|
*/
|
|
320
|
-
function brotliDecompressSync(buf: InputType, options?: BrotliOptions):
|
|
321
|
+
function brotliDecompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
|
|
321
322
|
/**
|
|
322
323
|
* @since v0.6.0
|
|
323
324
|
*/
|
|
324
325
|
function deflate(buf: InputType, callback: CompressCallback): void;
|
|
325
326
|
function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
326
327
|
namespace deflate {
|
|
327
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
328
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
328
329
|
}
|
|
329
330
|
/**
|
|
330
331
|
* Compress a chunk of data with `Deflate`.
|
|
331
332
|
* @since v0.11.12
|
|
332
333
|
*/
|
|
333
|
-
function deflateSync(buf: InputType, options?: ZlibOptions):
|
|
334
|
+
function deflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
334
335
|
/**
|
|
335
336
|
* @since v0.6.0
|
|
336
337
|
*/
|
|
337
338
|
function deflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
338
339
|
function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
339
340
|
namespace deflateRaw {
|
|
340
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
341
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
341
342
|
}
|
|
342
343
|
/**
|
|
343
344
|
* Compress a chunk of data with `DeflateRaw`.
|
|
344
345
|
* @since v0.11.12
|
|
345
346
|
*/
|
|
346
|
-
function deflateRawSync(buf: InputType, options?: ZlibOptions):
|
|
347
|
+
function deflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
347
348
|
/**
|
|
348
349
|
* @since v0.6.0
|
|
349
350
|
*/
|
|
350
351
|
function gzip(buf: InputType, callback: CompressCallback): void;
|
|
351
352
|
function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
352
353
|
namespace gzip {
|
|
353
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
354
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
354
355
|
}
|
|
355
356
|
/**
|
|
356
357
|
* Compress a chunk of data with `Gzip`.
|
|
357
358
|
* @since v0.11.12
|
|
358
359
|
*/
|
|
359
|
-
function gzipSync(buf: InputType, options?: ZlibOptions):
|
|
360
|
+
function gzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
360
361
|
/**
|
|
361
362
|
* @since v0.6.0
|
|
362
363
|
*/
|
|
363
364
|
function gunzip(buf: InputType, callback: CompressCallback): void;
|
|
364
365
|
function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
365
366
|
namespace gunzip {
|
|
366
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
367
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
367
368
|
}
|
|
368
369
|
/**
|
|
369
370
|
* Decompress a chunk of data with `Gunzip`.
|
|
370
371
|
* @since v0.11.12
|
|
371
372
|
*/
|
|
372
|
-
function gunzipSync(buf: InputType, options?: ZlibOptions):
|
|
373
|
+
function gunzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
373
374
|
/**
|
|
374
375
|
* @since v0.6.0
|
|
375
376
|
*/
|
|
376
377
|
function inflate(buf: InputType, callback: CompressCallback): void;
|
|
377
378
|
function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
378
379
|
namespace inflate {
|
|
379
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
380
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
380
381
|
}
|
|
381
382
|
/**
|
|
382
383
|
* Decompress a chunk of data with `Inflate`.
|
|
383
384
|
* @since v0.11.12
|
|
384
385
|
*/
|
|
385
|
-
function inflateSync(buf: InputType, options?: ZlibOptions):
|
|
386
|
+
function inflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
386
387
|
/**
|
|
387
388
|
* @since v0.6.0
|
|
388
389
|
*/
|
|
389
390
|
function inflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
390
391
|
function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
391
392
|
namespace inflateRaw {
|
|
392
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
393
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
393
394
|
}
|
|
394
395
|
/**
|
|
395
396
|
* Decompress a chunk of data with `InflateRaw`.
|
|
396
397
|
* @since v0.11.12
|
|
397
398
|
*/
|
|
398
|
-
function inflateRawSync(buf: InputType, options?: ZlibOptions):
|
|
399
|
+
function inflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
399
400
|
/**
|
|
400
401
|
* @since v0.6.0
|
|
401
402
|
*/
|
|
402
403
|
function unzip(buf: InputType, callback: CompressCallback): void;
|
|
403
404
|
function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
404
405
|
namespace unzip {
|
|
405
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
406
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
406
407
|
}
|
|
407
408
|
/**
|
|
408
409
|
* Decompress a chunk of data with `Unzip`.
|
|
409
410
|
* @since v0.11.12
|
|
410
411
|
*/
|
|
411
|
-
function unzipSync(buf: InputType, options?: ZlibOptions):
|
|
412
|
+
function unzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
412
413
|
/**
|
|
413
414
|
* @since v22.15.0
|
|
414
415
|
* @experimental
|
|
@@ -416,14 +417,14 @@ declare module "zlib" {
|
|
|
416
417
|
function zstdCompress(buf: InputType, callback: CompressCallback): void;
|
|
417
418
|
function zstdCompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
|
|
418
419
|
namespace zstdCompress {
|
|
419
|
-
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<
|
|
420
|
+
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
|
|
420
421
|
}
|
|
421
422
|
/**
|
|
422
423
|
* Compress a chunk of data with `ZstdCompress`.
|
|
423
424
|
* @since v22.15.0
|
|
424
425
|
* @experimental
|
|
425
426
|
*/
|
|
426
|
-
function zstdCompressSync(buf: InputType, options?: ZstdOptions):
|
|
427
|
+
function zstdCompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
|
|
427
428
|
/**
|
|
428
429
|
* @since v22.15.0
|
|
429
430
|
* @experimental
|
|
@@ -431,14 +432,14 @@ declare module "zlib" {
|
|
|
431
432
|
function zstdDecompress(buf: InputType, callback: CompressCallback): void;
|
|
432
433
|
function zstdDecompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
|
|
433
434
|
namespace zstdDecompress {
|
|
434
|
-
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<
|
|
435
|
+
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
|
|
435
436
|
}
|
|
436
437
|
/**
|
|
437
438
|
* Decompress a chunk of data with `ZstdDecompress`.
|
|
438
439
|
* @since v22.15.0
|
|
439
440
|
* @experimental
|
|
440
441
|
*/
|
|
441
|
-
function zstdDecompressSync(buf: InputType, options?: ZstdOptions):
|
|
442
|
+
function zstdDecompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
|
|
442
443
|
namespace constants {
|
|
443
444
|
const BROTLI_DECODE: number;
|
|
444
445
|
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
|
|
@@ -24,6 +24,7 @@ declare namespace Agent {
|
|
|
24
24
|
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
25
25
|
|
|
26
26
|
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
|
|
27
|
+
maxOrigins?: number
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface DispatchOptions extends Dispatcher.DispatchOptions {
|
|
@@ -49,21 +49,6 @@ declare namespace Errors {
|
|
|
49
49
|
headers: IncomingHttpHeaders | string[] | null
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export class ResponseStatusCodeError extends UndiciError {
|
|
53
|
-
constructor (
|
|
54
|
-
message?: string,
|
|
55
|
-
statusCode?: number,
|
|
56
|
-
headers?: IncomingHttpHeaders | string[] | null,
|
|
57
|
-
body?: null | Record<string, any> | string
|
|
58
|
-
)
|
|
59
|
-
name: 'ResponseStatusCodeError'
|
|
60
|
-
code: 'UND_ERR_RESPONSE_STATUS_CODE'
|
|
61
|
-
body: null | Record<string, any> | string
|
|
62
|
-
status: number
|
|
63
|
-
statusCode: number
|
|
64
|
-
headers: IncomingHttpHeaders | string[] | null
|
|
65
|
-
}
|
|
66
|
-
|
|
67
52
|
/** Passed an invalid argument. */
|
|
68
53
|
export class InvalidArgumentError extends UndiciError {
|
|
69
54
|
name: 'InvalidArgumentError'
|
|
@@ -168,4 +153,9 @@ declare namespace Errors {
|
|
|
168
153
|
name: 'SecureProxyConnectionError'
|
|
169
154
|
code: 'UND_ERR_PRX_TLS'
|
|
170
155
|
}
|
|
156
|
+
|
|
157
|
+
class MaxOriginsReachedError extends UndiciError {
|
|
158
|
+
name: 'MaxOriginsReachedError'
|
|
159
|
+
code: 'UND_ERR_MAX_ORIGINS_REACHED'
|
|
160
|
+
}
|
|
171
161
|
}
|
|
@@ -9,6 +9,10 @@ declare namespace Interceptors {
|
|
|
9
9
|
export type DumpInterceptorOpts = { maxSize?: number }
|
|
10
10
|
export type RetryInterceptorOpts = RetryHandler.RetryOptions
|
|
11
11
|
export type RedirectInterceptorOpts = { maxRedirections?: number }
|
|
12
|
+
export type DecompressInterceptorOpts = {
|
|
13
|
+
skipErrorResponses?: boolean
|
|
14
|
+
skipStatusCodes?: number[]
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
|
|
14
18
|
export type CacheInterceptorOpts = CacheHandler.CacheOptions
|
|
@@ -28,6 +32,7 @@ declare namespace Interceptors {
|
|
|
28
32
|
export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
29
33
|
export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
30
34
|
export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
35
|
+
export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
31
36
|
export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
32
37
|
export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
33
38
|
export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
|
@@ -18,9 +18,11 @@ declare class SnapshotRecorder {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
declare namespace SnapshotRecorder {
|
|
21
|
+
type SnapshotRecorderMode = 'record' | 'playback' | 'update'
|
|
22
|
+
|
|
21
23
|
export interface Options {
|
|
22
24
|
snapshotPath?: string
|
|
23
|
-
mode?:
|
|
25
|
+
mode?: SnapshotRecorderMode
|
|
24
26
|
maxSnapshots?: number
|
|
25
27
|
autoFlush?: boolean
|
|
26
28
|
flushInterval?: number
|
|
@@ -77,7 +79,7 @@ declare class SnapshotAgent extends MockAgent {
|
|
|
77
79
|
saveSnapshots (filePath?: string): Promise<void>
|
|
78
80
|
loadSnapshots (filePath?: string): Promise<void>
|
|
79
81
|
getRecorder (): SnapshotRecorder
|
|
80
|
-
getMode ():
|
|
82
|
+
getMode (): SnapshotRecorder.SnapshotRecorderMode
|
|
81
83
|
clearSnapshots (): void
|
|
82
84
|
resetCallCounts (): void
|
|
83
85
|
deleteSnapshot (requestOpts: any): boolean
|
|
@@ -87,7 +89,7 @@ declare class SnapshotAgent extends MockAgent {
|
|
|
87
89
|
|
|
88
90
|
declare namespace SnapshotAgent {
|
|
89
91
|
export interface Options extends MockAgent.Options {
|
|
90
|
-
mode?:
|
|
92
|
+
mode?: SnapshotRecorder.SnapshotRecorderMode
|
|
91
93
|
snapshotPath?: string
|
|
92
94
|
maxSnapshots?: number
|
|
93
95
|
autoFlush?: boolean
|
|
@@ -10,11 +10,6 @@ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) =>
|
|
|
10
10
|
|
|
11
11
|
type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
|
|
12
12
|
|
|
13
|
-
interface ConvertToIntOpts {
|
|
14
|
-
clamp?: boolean
|
|
15
|
-
enforceRange?: boolean
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
interface WebidlErrors {
|
|
19
14
|
/**
|
|
20
15
|
* @description Instantiate an error
|
|
@@ -74,7 +69,7 @@ interface WebidlUtil {
|
|
|
74
69
|
V: unknown,
|
|
75
70
|
bitLength: number,
|
|
76
71
|
signedness: 'signed' | 'unsigned',
|
|
77
|
-
|
|
72
|
+
flags?: number
|
|
78
73
|
): number
|
|
79
74
|
|
|
80
75
|
/**
|
|
@@ -94,15 +89,17 @@ interface WebidlUtil {
|
|
|
94
89
|
* This is only effective in some newer Node.js versions.
|
|
95
90
|
*/
|
|
96
91
|
markAsUncloneable (V: any): void
|
|
92
|
+
|
|
93
|
+
IsResizableArrayBuffer (V: ArrayBufferLike): boolean
|
|
94
|
+
|
|
95
|
+
HasFlag (flag: number, attributes: number): boolean
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
interface WebidlConverters {
|
|
100
99
|
/**
|
|
101
100
|
* @see https://webidl.spec.whatwg.org/#es-DOMString
|
|
102
101
|
*/
|
|
103
|
-
DOMString (V: unknown, prefix: string, argument: string,
|
|
104
|
-
legacyNullToEmptyString: boolean
|
|
105
|
-
}): string
|
|
102
|
+
DOMString (V: unknown, prefix: string, argument: string, flags?: number): string
|
|
106
103
|
|
|
107
104
|
/**
|
|
108
105
|
* @see https://webidl.spec.whatwg.org/#es-ByteString
|
|
@@ -142,39 +139,78 @@ interface WebidlConverters {
|
|
|
142
139
|
/**
|
|
143
140
|
* @see https://webidl.spec.whatwg.org/#es-unsigned-short
|
|
144
141
|
*/
|
|
145
|
-
['unsigned short'] (V: unknown,
|
|
142
|
+
['unsigned short'] (V: unknown, flags?: number): number
|
|
146
143
|
|
|
147
144
|
/**
|
|
148
145
|
* @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
|
149
146
|
*/
|
|
150
|
-
ArrayBuffer (
|
|
151
|
-
|
|
147
|
+
ArrayBuffer (
|
|
148
|
+
V: unknown,
|
|
149
|
+
prefix: string,
|
|
150
|
+
argument: string,
|
|
151
|
+
options?: { allowResizable: boolean }
|
|
152
|
+
): ArrayBuffer
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
|
|
156
|
+
*/
|
|
157
|
+
SharedArrayBuffer (
|
|
158
|
+
V: unknown,
|
|
159
|
+
prefix: string,
|
|
160
|
+
argument: string,
|
|
161
|
+
options?: { allowResizable: boolean }
|
|
162
|
+
): SharedArrayBuffer
|
|
152
163
|
|
|
153
164
|
/**
|
|
154
165
|
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
155
166
|
*/
|
|
156
167
|
TypedArray (
|
|
157
168
|
V: unknown,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
169
|
+
T: new () => NodeJS.TypedArray,
|
|
170
|
+
prefix: string,
|
|
171
|
+
argument: string,
|
|
172
|
+
flags?: number
|
|
173
|
+
): NodeJS.TypedArray
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
177
|
+
*/
|
|
178
|
+
DataView (
|
|
161
179
|
V: unknown,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
180
|
+
prefix: string,
|
|
181
|
+
argument: string,
|
|
182
|
+
flags?: number
|
|
183
|
+
): DataView
|
|
165
184
|
|
|
166
185
|
/**
|
|
167
186
|
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
168
187
|
*/
|
|
169
|
-
|
|
188
|
+
ArrayBufferView (
|
|
189
|
+
V: unknown,
|
|
190
|
+
prefix: string,
|
|
191
|
+
argument: string,
|
|
192
|
+
flags?: number
|
|
193
|
+
): NodeJS.ArrayBufferView
|
|
170
194
|
|
|
171
195
|
/**
|
|
172
196
|
* @see https://webidl.spec.whatwg.org/#BufferSource
|
|
173
197
|
*/
|
|
174
198
|
BufferSource (
|
|
175
199
|
V: unknown,
|
|
176
|
-
|
|
177
|
-
|
|
200
|
+
prefix: string,
|
|
201
|
+
argument: string,
|
|
202
|
+
flags?: number
|
|
203
|
+
): ArrayBuffer | NodeJS.ArrayBufferView
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource
|
|
207
|
+
*/
|
|
208
|
+
AllowSharedBufferSource (
|
|
209
|
+
V: unknown,
|
|
210
|
+
prefix: string,
|
|
211
|
+
argument: string,
|
|
212
|
+
flags?: number
|
|
213
|
+
): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView
|
|
178
214
|
|
|
179
215
|
['sequence<ByteString>']: SequenceConverter<string>
|
|
180
216
|
|
|
@@ -192,6 +228,13 @@ interface WebidlConverters {
|
|
|
192
228
|
*/
|
|
193
229
|
RequestInit (V: unknown): undici.RequestInit
|
|
194
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull
|
|
233
|
+
*/
|
|
234
|
+
EventHandlerNonNull (V: unknown): Function | null
|
|
235
|
+
|
|
236
|
+
WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string
|
|
237
|
+
|
|
195
238
|
[Key: string]: (...args: any[]) => unknown
|
|
196
239
|
}
|
|
197
240
|
|
|
@@ -210,6 +253,10 @@ interface WebidlIs {
|
|
|
210
253
|
AbortSignal: WebidlIsFunction<AbortSignal>
|
|
211
254
|
MessagePort: WebidlIsFunction<MessagePort>
|
|
212
255
|
USVString: WebidlIsFunction<string>
|
|
256
|
+
/**
|
|
257
|
+
* @see https://webidl.spec.whatwg.org/#BufferSource
|
|
258
|
+
*/
|
|
259
|
+
BufferSource: WebidlIsFunction<ArrayBuffer | NodeJS.TypedArray>
|
|
213
260
|
}
|
|
214
261
|
|
|
215
262
|
export interface Webidl {
|
|
@@ -217,6 +264,7 @@ export interface Webidl {
|
|
|
217
264
|
util: WebidlUtil
|
|
218
265
|
converters: WebidlConverters
|
|
219
266
|
is: WebidlIs
|
|
267
|
+
attributes: WebIDLExtendedAttributes
|
|
220
268
|
|
|
221
269
|
/**
|
|
222
270
|
* @description Performs a brand-check on {@param V} to ensure it is a
|
|
@@ -278,3 +326,16 @@ export interface Webidl {
|
|
|
278
326
|
|
|
279
327
|
argumentLengthCheck (args: { length: number }, min: number, context: string): void
|
|
280
328
|
}
|
|
329
|
+
|
|
330
|
+
interface WebIDLExtendedAttributes {
|
|
331
|
+
/** https://webidl.spec.whatwg.org/#Clamp */
|
|
332
|
+
Clamp: number
|
|
333
|
+
/** https://webidl.spec.whatwg.org/#EnforceRange */
|
|
334
|
+
EnforceRange: number
|
|
335
|
+
/** https://webidl.spec.whatwg.org/#AllowShared */
|
|
336
|
+
AllowShared: number
|
|
337
|
+
/** https://webidl.spec.whatwg.org/#AllowResizable */
|
|
338
|
+
AllowResizable: number
|
|
339
|
+
/** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */
|
|
340
|
+
LegacyNullToEmptyString: number
|
|
341
|
+
}
|
|
@@ -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: Tue, 21 Oct 2025 00:04:31 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -44,6 +44,13 @@ declare module "assert" {
|
|
|
44
44
|
* @default true
|
|
45
45
|
*/
|
|
46
46
|
strict?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* If set to `true`, skips prototype and constructor
|
|
49
|
+
* comparison in deep equality checks.
|
|
50
|
+
* @since v24.9.0
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
skipPrototype?: boolean | undefined;
|
|
47
54
|
}
|
|
48
55
|
interface Assert extends Pick<typeof assert, AssertMethodNames> {
|
|
49
56
|
readonly [kOptions]: AssertOptions & { strict: false };
|
|
@@ -67,7 +74,8 @@ declare module "assert" {
|
|
|
67
74
|
* ```
|
|
68
75
|
*
|
|
69
76
|
* **Important**: When destructuring assertion methods from an `Assert` instance,
|
|
70
|
-
* the methods lose their connection to the instance's configuration options (such
|
|
77
|
+
* the methods lose their connection to the instance's configuration options (such
|
|
78
|
+
* as `diff`, `strict`, and `skipPrototype` settings).
|
|
71
79
|
* The destructured methods will fall back to default behavior instead.
|
|
72
80
|
*
|
|
73
81
|
* ```js
|
|
@@ -81,6 +89,33 @@ declare module "assert" {
|
|
|
81
89
|
* strictEqual({ a: 1 }, { b: { c: 1 } });
|
|
82
90
|
* ```
|
|
83
91
|
*
|
|
92
|
+
* The `skipPrototype` option affects all deep equality methods:
|
|
93
|
+
*
|
|
94
|
+
* ```js
|
|
95
|
+
* class Foo {
|
|
96
|
+
* constructor(a) {
|
|
97
|
+
* this.a = a;
|
|
98
|
+
* }
|
|
99
|
+
* }
|
|
100
|
+
*
|
|
101
|
+
* class Bar {
|
|
102
|
+
* constructor(a) {
|
|
103
|
+
* this.a = a;
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
*
|
|
107
|
+
* const foo = new Foo(1);
|
|
108
|
+
* const bar = new Bar(1);
|
|
109
|
+
*
|
|
110
|
+
* // Default behavior - fails due to different constructors
|
|
111
|
+
* const assert1 = new Assert();
|
|
112
|
+
* assert1.deepStrictEqual(foo, bar); // AssertionError
|
|
113
|
+
*
|
|
114
|
+
* // Skip prototype comparison - passes if properties are equal
|
|
115
|
+
* const assert2 = new Assert({ skipPrototype: true });
|
|
116
|
+
* assert2.deepStrictEqual(foo, bar); // OK
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
84
119
|
* When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
|
|
85
120
|
* (diff: 'simple', non-strict mode).
|
|
86
121
|
* To maintain custom options when using destructured methods, avoid
|
|
@@ -451,7 +451,16 @@ declare module "buffer" {
|
|
|
451
451
|
*/
|
|
452
452
|
subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
|
|
453
453
|
}
|
|
454
|
+
// TODO: remove globals in future version
|
|
455
|
+
/**
|
|
456
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
457
|
+
* TypeScript versions earlier than 5.7.
|
|
458
|
+
*/
|
|
454
459
|
type NonSharedBuffer = Buffer<ArrayBuffer>;
|
|
460
|
+
/**
|
|
461
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
462
|
+
* TypeScript versions earlier than 5.7.
|
|
463
|
+
*/
|
|
455
464
|
type AllowSharedBuffer = Buffer<ArrayBufferLike>;
|
|
456
465
|
}
|
|
457
466
|
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
@@ -59,7 +59,7 @@ declare module "buffer" {
|
|
|
59
59
|
* @since v19.4.0, v18.14.0
|
|
60
60
|
* @param input The input to validate.
|
|
61
61
|
*/
|
|
62
|
-
export function isUtf8(input:
|
|
62
|
+
export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
63
63
|
/**
|
|
64
64
|
* This function returns `true` if `input` contains only valid ASCII-encoded data,
|
|
65
65
|
* including the case in which `input` is empty.
|
|
@@ -68,7 +68,7 @@ declare module "buffer" {
|
|
|
68
68
|
* @since v19.6.0, v18.15.0
|
|
69
69
|
* @param input The input to validate.
|
|
70
70
|
*/
|
|
71
|
-
export function isAscii(input:
|
|
71
|
+
export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
72
72
|
export let INSPECT_MAX_BYTES: number;
|
|
73
73
|
export const kMaxLength: number;
|
|
74
74
|
export const kStringMaxLength: number;
|
|
@@ -113,7 +113,11 @@ declare module "buffer" {
|
|
|
113
113
|
* @param fromEnc The current encoding.
|
|
114
114
|
* @param toEnc To target encoding.
|
|
115
115
|
*/
|
|
116
|
-
export function transcode(
|
|
116
|
+
export function transcode(
|
|
117
|
+
source: Uint8Array,
|
|
118
|
+
fromEnc: TranscodeEncoding,
|
|
119
|
+
toEnc: TranscodeEncoding,
|
|
120
|
+
): NonSharedBuffer;
|
|
117
121
|
/**
|
|
118
122
|
* Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
|
|
119
123
|
* a prior call to `URL.createObjectURL()`.
|
|
@@ -330,7 +334,7 @@ declare module "buffer" {
|
|
|
330
334
|
* @return The number of bytes contained within `string`.
|
|
331
335
|
*/
|
|
332
336
|
byteLength(
|
|
333
|
-
string: string |
|
|
337
|
+
string: string | NodeJS.ArrayBufferView | ArrayBufferLike,
|
|
334
338
|
encoding?: BufferEncoding,
|
|
335
339
|
): number;
|
|
336
340
|
/**
|