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.
Files changed (82) hide show
  1. package/.jsii +8 -2
  2. package/API.md +6 -0
  3. package/lib/main.js +1 -1
  4. package/lib/managed-policies.d.ts +2 -1
  5. package/lib/managed-policies.js +2 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +36 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +8 -4
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +50 -33
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +1 -1
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +198 -164
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +9 -8
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +39 -21
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +89 -76
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +52 -22
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +29 -22
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +82 -50
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +7 -6
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +3 -2
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +2 -1
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +114 -7
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +2 -2
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +2 -2
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +88 -64
  28. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  29. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  30. package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +2 -2
  31. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +12 -3
  32. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +20 -3
  33. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +24 -3
  34. package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
  35. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +40 -3
  36. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +25 -24
  37. package/node_modules/@types/concat-stream/node_modules/undici-types/agent.d.ts +1 -0
  38. package/node_modules/@types/concat-stream/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  39. package/node_modules/@types/concat-stream/node_modules/undici-types/errors.d.ts +5 -15
  40. package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +5 -0
  41. package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
  42. package/node_modules/@types/concat-stream/node_modules/undici-types/snapshot-agent.d.ts +5 -3
  43. package/node_modules/@types/concat-stream/node_modules/undici-types/webidl.d.ts +82 -21
  44. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  45. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +36 -1
  46. package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  47. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +8 -4
  48. package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +50 -33
  49. package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +1 -1
  50. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +198 -164
  51. package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +9 -8
  52. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +39 -21
  53. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +89 -76
  54. package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  55. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +52 -22
  56. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +29 -22
  57. package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +82 -50
  58. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +7 -6
  59. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +3 -2
  60. package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
  61. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +2 -1
  62. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +114 -7
  63. package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +2 -2
  64. package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +2 -2
  65. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +88 -64
  66. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  67. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  68. package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +2 -2
  69. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +12 -3
  70. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +20 -3
  71. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +24 -3
  72. package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
  73. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +40 -3
  74. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +25 -24
  75. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +1 -0
  76. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  77. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +5 -15
  78. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +5 -0
  79. package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
  80. package/node_modules/@types/form-data/node_modules/undici-types/snapshot-agent.d.ts +5 -3
  81. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +82 -21
  82. 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 | Buffer | NodeJS.ArrayBufferView, value?: number): number;
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: Buffer) => void;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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<Buffer>;
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): Buffer;
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 {
@@ -16,7 +16,6 @@ declare namespace DiagnosticsChannel {
16
16
  statusText: string;
17
17
  headers: Array<Buffer>;
18
18
  }
19
- type Error = unknown
20
19
  interface ConnectParams {
21
20
  host: URL['host'];
22
21
  hostname: URL['hostname'];
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "7.14.0",
3
+ "version": "7.16.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
@@ -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?: 'record' | 'playback' | 'update'
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 (): 'record' | 'playback' | 'update'
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?: 'record' | 'playback' | 'update'
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
- opts?: ConvertToIntOpts
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, opts?: {
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, opts?: ConvertToIntOpts): number
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 (V: unknown): ArrayBufferLike
151
- ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
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
- TypedArray: NodeJS.TypedArray | ArrayBufferLike
159
- ): NodeJS.TypedArray | ArrayBufferLike
160
- TypedArray (
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
- TypedArray: NodeJS.TypedArray | ArrayBufferLike,
163
- opts?: { allowShared: false }
164
- ): NodeJS.TypedArray | ArrayBuffer
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
- DataView (V: unknown, opts?: { allowShared: boolean }): DataView
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
- opts?: { allowShared: boolean }
177
- ): NodeJS.TypedArray | ArrayBufferLike | DataView
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
+ }
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "jsii-docgen": "^10.5.0",
55
55
  "jsii-pacmak": "^1.116.0",
56
56
  "jsii-rosetta": "5.7.x",
57
- "projen": "0.98.1",
57
+ "projen": "0.98.3",
58
58
  "ts-jest": "^27",
59
59
  "typescript": "^5"
60
60
  },
@@ -87,7 +87,7 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "version": "2.0.1307",
90
+ "version": "2.0.1309",
91
91
  "jest": {
92
92
  "coverageProvider": "v8",
93
93
  "testMatch": [