cdk-common 2.0.1289 → 2.0.1291

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 (93) hide show
  1. package/.jsii +2 -2
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +105 -2
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +119 -95
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +117 -7
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +79 -0
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +224 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +28 -3
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +2 -23
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +5 -0
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/events.d.ts +3 -0
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +33 -47
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +6 -0
  16. package/node_modules/@types/concat-stream/node_modules/undici-types/agent.d.ts +0 -4
  17. package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +0 -2
  18. package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +0 -6
  19. package/node_modules/@types/concat-stream/node_modules/undici-types/h2c-client.d.ts +0 -2
  20. package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +3 -1
  21. package/node_modules/@types/concat-stream/node_modules/undici-types/mock-interceptor.d.ts +0 -1
  22. package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
  23. package/node_modules/@types/concat-stream/node_modules/undici-types/snapshot-agent.d.ts +107 -0
  24. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  25. package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +105 -2
  26. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +119 -95
  27. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +117 -7
  28. package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +79 -0
  29. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +224 -0
  30. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +28 -3
  31. package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
  32. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +2 -23
  33. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +5 -0
  34. package/node_modules/@types/form-data/node_modules/@types/node/web-globals/events.d.ts +3 -0
  35. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +33 -47
  36. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +6 -0
  37. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +0 -4
  38. package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +0 -2
  39. package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +0 -6
  40. package/node_modules/@types/form-data/node_modules/undici-types/h2c-client.d.ts +0 -2
  41. package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +3 -1
  42. package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +0 -1
  43. package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
  44. package/node_modules/@types/form-data/node_modules/undici-types/snapshot-agent.d.ts +107 -0
  45. package/node_modules/async-function/.eslintrc +16 -0
  46. package/node_modules/async-function/.github/FUNDING.yml +12 -0
  47. package/node_modules/async-function/.nycrc +9 -0
  48. package/node_modules/async-function/CHANGELOG.md +16 -0
  49. package/node_modules/async-function/LICENSE +21 -0
  50. package/node_modules/async-function/README.md +51 -0
  51. package/node_modules/async-function/index.d.mts +3 -0
  52. package/node_modules/async-function/index.d.ts +13 -0
  53. package/node_modules/async-function/index.js +8 -0
  54. package/node_modules/async-function/index.mjs +4 -0
  55. package/node_modules/async-function/legacy.js +18 -0
  56. package/node_modules/async-function/package.json +86 -0
  57. package/node_modules/async-function/require.mjs +5 -0
  58. package/node_modules/async-function/test/index.js +40 -0
  59. package/node_modules/async-function/tsconfig.json +9 -0
  60. package/node_modules/async-generator-function/.eslintrc +26 -0
  61. package/node_modules/async-generator-function/.github/FUNDING.yml +12 -0
  62. package/node_modules/async-generator-function/.nycrc +9 -0
  63. package/node_modules/async-generator-function/CHANGELOG.md +15 -0
  64. package/node_modules/async-generator-function/LICENSE +21 -0
  65. package/node_modules/async-generator-function/README.md +52 -0
  66. package/node_modules/async-generator-function/index.d.mts +3 -0
  67. package/node_modules/async-generator-function/index.d.ts +22 -0
  68. package/node_modules/async-generator-function/index.js +8 -0
  69. package/node_modules/async-generator-function/index.mjs +4 -0
  70. package/node_modules/async-generator-function/legacy.js +18 -0
  71. package/node_modules/async-generator-function/package.json +87 -0
  72. package/node_modules/async-generator-function/require.mjs +5 -0
  73. package/node_modules/async-generator-function/test/index.js +40 -0
  74. package/node_modules/async-generator-function/tsconfig.json +9 -0
  75. package/node_modules/generator-function/.eslintrc +16 -0
  76. package/node_modules/generator-function/.github/FUNDING.yml +12 -0
  77. package/node_modules/generator-function/.nycrc +9 -0
  78. package/node_modules/generator-function/CHANGELOG.md +21 -0
  79. package/node_modules/generator-function/LICENSE.md +7 -0
  80. package/node_modules/generator-function/README.md +51 -0
  81. package/node_modules/generator-function/index.d.mts +3 -0
  82. package/node_modules/generator-function/index.d.ts +3 -0
  83. package/node_modules/generator-function/index.js +8 -0
  84. package/node_modules/generator-function/index.mjs +4 -0
  85. package/node_modules/generator-function/legacy.js +18 -0
  86. package/node_modules/generator-function/package.json +88 -0
  87. package/node_modules/generator-function/require.mjs +5 -0
  88. package/node_modules/generator-function/test/index.js +42 -0
  89. package/node_modules/generator-function/tsconfig.json +9 -0
  90. package/node_modules/get-intrinsic/CHANGELOG.md +7 -0
  91. package/node_modules/get-intrinsic/index.js +8 -13
  92. package/node_modules/get-intrinsic/package.json +7 -4
  93. package/package.json +3 -3
@@ -603,6 +603,9 @@ declare module "crypto" {
603
603
  * * `'ed25519'` (OID 1.3.101.112)
604
604
  * * `'ed448'` (OID 1.3.101.113)
605
605
  * * `'dh'` (OID 1.2.840.113549.1.3.1)
606
+ * * `'ml-dsa-44'` (OID 2.16.840.1.101.3.4.3.17)
607
+ * * `'ml-dsa-65'` (OID 2.16.840.1.101.3.4.3.18)
608
+ * * `'ml-dsa-87'` (OID 2.16.840.1.101.3.4.3.19)
606
609
  *
607
610
  * This property is `undefined` for unrecognized `KeyObject` types and symmetric
608
611
  * keys.
@@ -2456,7 +2459,18 @@ declare module "crypto" {
2456
2459
  * @since v6.6.0
2457
2460
  */
2458
2461
  function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
2459
- type KeyType = "rsa" | "rsa-pss" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448";
2462
+ type KeyType =
2463
+ | "rsa"
2464
+ | "rsa-pss"
2465
+ | "dsa"
2466
+ | "ec"
2467
+ | "ed25519"
2468
+ | "ed448"
2469
+ | "x25519"
2470
+ | "x448"
2471
+ | "ml-dsa-44"
2472
+ | "ml-dsa-65"
2473
+ | "ml-dsa-87";
2460
2474
  type KeyFormat = "pem" | "der" | "jwk";
2461
2475
  interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
2462
2476
  format: T;
@@ -2471,6 +2485,7 @@ declare module "crypto" {
2471
2485
  interface ED448KeyPairKeyObjectOptions {}
2472
2486
  interface X25519KeyPairKeyObjectOptions {}
2473
2487
  interface X448KeyPairKeyObjectOptions {}
2488
+ interface MLDSAKeyPairKeyObjectOptions {}
2474
2489
  interface ECKeyPairKeyObjectOptions {
2475
2490
  /**
2476
2491
  * Name of the curve to use
@@ -2635,13 +2650,22 @@ declare module "crypto" {
2635
2650
  type: "pkcs8";
2636
2651
  };
2637
2652
  }
2653
+ interface MLDSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2654
+ publicKeyEncoding: {
2655
+ type: "spki";
2656
+ format: PubF;
2657
+ };
2658
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2659
+ type: "pkcs8";
2660
+ };
2661
+ }
2638
2662
  interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
2639
2663
  publicKey: T1;
2640
2664
  privateKey: T2;
2641
2665
  }
2642
2666
  /**
2643
2667
  * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2644
- * Ed25519, Ed448, X25519, X448, and DH are currently supported.
2668
+ * Ed25519, Ed448, X25519, X448, DH, and ML-DSA are currently supported.
2645
2669
  *
2646
2670
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2647
2671
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2678,7 +2702,8 @@ declare module "crypto" {
2678
2702
  * When PEM encoding was selected, the respective key will be a string, otherwise
2679
2703
  * it will be a buffer containing the data encoded as DER.
2680
2704
  * @since v10.12.0
2681
- * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2705
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`,
2706
+ * `'ed448'`, `'x25519'`, `'x448'`, `'dh'`, `'ml-dsa-44'`, `'ml-dsa-65'`, or `'ml-dsa-87'`.
2682
2707
  */
2683
2708
  function generateKeyPairSync(
2684
2709
  type: "rsa",
@@ -2816,6 +2841,26 @@ declare module "crypto" {
2816
2841
  options: X448KeyPairOptions<"der", "der">,
2817
2842
  ): KeyPairSyncResult<Buffer, Buffer>;
2818
2843
  function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2844
+ function generateKeyPairSync(
2845
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2846
+ options: MLDSAKeyPairOptions<"pem", "pem">,
2847
+ ): KeyPairSyncResult<string, string>;
2848
+ function generateKeyPairSync(
2849
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2850
+ options: MLDSAKeyPairOptions<"pem", "der">,
2851
+ ): KeyPairSyncResult<string, Buffer>;
2852
+ function generateKeyPairSync(
2853
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2854
+ options: MLDSAKeyPairOptions<"der", "pem">,
2855
+ ): KeyPairSyncResult<Buffer, string>;
2856
+ function generateKeyPairSync(
2857
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2858
+ options: MLDSAKeyPairOptions<"der", "der">,
2859
+ ): KeyPairSyncResult<Buffer, Buffer>;
2860
+ function generateKeyPairSync(
2861
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2862
+ options?: MLDSAKeyPairKeyObjectOptions,
2863
+ ): KeyPairKeyObjectResult;
2819
2864
  /**
2820
2865
  * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2821
2866
  * Ed25519, Ed448, X25519, X448, and DH are currently supported.
@@ -2853,7 +2898,8 @@ declare module "crypto" {
2853
2898
  * If this method is invoked as its `util.promisify()` ed version, it returns
2854
2899
  * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
2855
2900
  * @since v10.12.0
2856
- * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2901
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`,
2902
+ * `'ed448'`, `'x25519'`, `'x448'`, `'dh'`, `'ml-dsa-44'`, `'ml-dsa-65'`, or `'ml-dsa-87'`.
2857
2903
  */
2858
2904
  function generateKeyPair(
2859
2905
  type: "rsa",
@@ -3055,6 +3101,31 @@ declare module "crypto" {
3055
3101
  options: X448KeyPairKeyObjectOptions | undefined,
3056
3102
  callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
3057
3103
  ): void;
3104
+ function generateKeyPair(
3105
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3106
+ options: MLDSAKeyPairOptions<"pem", "pem">,
3107
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
3108
+ ): void;
3109
+ function generateKeyPair(
3110
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3111
+ options: MLDSAKeyPairOptions<"pem", "der">,
3112
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3113
+ ): void;
3114
+ function generateKeyPair(
3115
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3116
+ options: MLDSAKeyPairOptions<"der", "pem">,
3117
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3118
+ ): void;
3119
+ function generateKeyPair(
3120
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3121
+ options: MLDSAKeyPairOptions<"der", "der">,
3122
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3123
+ ): void;
3124
+ function generateKeyPair(
3125
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3126
+ options: MLDSAKeyPairKeyObjectOptions | undefined,
3127
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
3128
+ ): void;
3058
3129
  namespace generateKeyPair {
3059
3130
  function __promisify__(
3060
3131
  type: "rsa",
@@ -3297,11 +3368,46 @@ declare module "crypto" {
3297
3368
  privateKey: Buffer;
3298
3369
  }>;
3299
3370
  function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3371
+ function __promisify__(
3372
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3373
+ options: MLDSAKeyPairOptions<"pem", "pem">,
3374
+ ): Promise<{
3375
+ publicKey: string;
3376
+ privateKey: string;
3377
+ }>;
3378
+ function __promisify__(
3379
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3380
+ options: MLDSAKeyPairOptions<"pem", "der">,
3381
+ ): Promise<{
3382
+ publicKey: string;
3383
+ privateKey: Buffer;
3384
+ }>;
3385
+ function __promisify__(
3386
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3387
+ options: MLDSAKeyPairOptions<"der", "pem">,
3388
+ ): Promise<{
3389
+ publicKey: Buffer;
3390
+ privateKey: string;
3391
+ }>;
3392
+ function __promisify__(
3393
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3394
+ options: MLDSAKeyPairOptions<"der", "der">,
3395
+ ): Promise<{
3396
+ publicKey: Buffer;
3397
+ privateKey: Buffer;
3398
+ }>;
3399
+ function __promisify__(
3400
+ type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3401
+ options?: MLDSAKeyPairKeyObjectOptions,
3402
+ ): Promise<KeyPairKeyObjectResult>;
3300
3403
  }
3301
3404
  /**
3302
3405
  * Calculates and returns the signature for `data` using the given private key and
3303
3406
  * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
3304
- * dependent upon the key type (especially Ed25519 and Ed448).
3407
+ * dependent upon the key type.
3408
+ *
3409
+ * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
3410
+ * ML-DSA.
3305
3411
  *
3306
3412
  * If `key` is not a `KeyObject`, this function behaves as if `key` had been
3307
3413
  * passed to {@link createPrivateKey}. If it is an object, the following
@@ -3322,8 +3428,12 @@ declare module "crypto" {
3322
3428
  callback: (error: Error | null, data: Buffer) => void,
3323
3429
  ): void;
3324
3430
  /**
3325
- * Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
3326
- * key type (especially Ed25519 and Ed448).
3431
+ * Verifies the given signature for `data` using the given key and algorithm. If
3432
+ * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
3433
+ * key type.
3434
+ *
3435
+ * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
3436
+ * ML-DSA.
3327
3437
  *
3328
3438
  * If `key` is not a `KeyObject`, this function behaves as if `key` had been
3329
3439
  * passed to {@link createPublicKey}. If it is an object, the following
@@ -584,6 +584,85 @@ declare module "events" {
584
584
  */
585
585
  readonly asyncResource: EventEmitterReferencingAsyncResource;
586
586
  }
587
+ /**
588
+ * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
589
+ * that emulates a subset of the `EventEmitter` API.
590
+ * @since v14.5.0
591
+ */
592
+ export interface NodeEventTarget extends EventTarget {
593
+ /**
594
+ * Node.js-specific extension to the `EventTarget` class that emulates the
595
+ * equivalent `EventEmitter` API. The only difference between `addListener()` and
596
+ * `addEventListener()` is that `addListener()` will return a reference to the
597
+ * `EventTarget`.
598
+ * @since v14.5.0
599
+ */
600
+ addListener(type: string, listener: (arg: any) => void): this;
601
+ /**
602
+ * Node.js-specific extension to the `EventTarget` class that dispatches the
603
+ * `arg` to the list of handlers for `type`.
604
+ * @since v15.2.0
605
+ * @returns `true` if event listeners registered for the `type` exist,
606
+ * otherwise `false`.
607
+ */
608
+ emit(type: string, arg: any): boolean;
609
+ /**
610
+ * Node.js-specific extension to the `EventTarget` class that returns an array
611
+ * of event `type` names for which event listeners are registered.
612
+ * @since 14.5.0
613
+ */
614
+ eventNames(): string[];
615
+ /**
616
+ * Node.js-specific extension to the `EventTarget` class that returns the number
617
+ * of event listeners registered for the `type`.
618
+ * @since v14.5.0
619
+ */
620
+ listenerCount(type: string): number;
621
+ /**
622
+ * Node.js-specific extension to the `EventTarget` class that sets the number
623
+ * of max event listeners as `n`.
624
+ * @since v14.5.0
625
+ */
626
+ setMaxListeners(n: number): void;
627
+ /**
628
+ * Node.js-specific extension to the `EventTarget` class that returns the number
629
+ * of max event listeners.
630
+ * @since v14.5.0
631
+ */
632
+ getMaxListeners(): number;
633
+ /**
634
+ * Node.js-specific alias for `eventTarget.removeEventListener()`.
635
+ * @since v14.5.0
636
+ */
637
+ off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
638
+ /**
639
+ * Node.js-specific alias for `eventTarget.addEventListener()`.
640
+ * @since v14.5.0
641
+ */
642
+ on(type: string, listener: (arg: any) => void): this;
643
+ /**
644
+ * Node.js-specific extension to the `EventTarget` class that adds a `once`
645
+ * listener for the given event `type`. This is equivalent to calling `on`
646
+ * with the `once` option set to `true`.
647
+ * @since v14.5.0
648
+ */
649
+ once(type: string, listener: (arg: any) => void): this;
650
+ /**
651
+ * Node.js-specific extension to the `EventTarget` class. If `type` is specified,
652
+ * removes all registered listeners for `type`, otherwise removes all registered
653
+ * listeners.
654
+ * @since v14.5.0
655
+ */
656
+ removeAllListeners(type?: string): this;
657
+ /**
658
+ * Node.js-specific extension to the `EventTarget` class that removes the
659
+ * `listener` for the given `type`. The only difference between `removeListener()`
660
+ * and `removeEventListener()` is that `removeListener()` will return a reference
661
+ * to the `EventTarget`.
662
+ * @since v14.5.0
663
+ */
664
+ removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
665
+ }
587
666
  }
588
667
  global {
589
668
  namespace NodeJS {
@@ -450,6 +450,230 @@ declare module "fs" {
450
450
  prependListener<K extends keyof ReadStreamEvents>(event: K, listener: ReadStreamEvents[K]): this;
451
451
  prependOnceListener<K extends keyof ReadStreamEvents>(event: K, listener: ReadStreamEvents[K]): this;
452
452
  }
453
+ export interface Utf8StreamOptions {
454
+ /**
455
+ * Appends writes to dest file instead of truncating it.
456
+ * @default true
457
+ */
458
+ append?: boolean | undefined;
459
+ /**
460
+ * Which type of data you can send to the write
461
+ * function, supported values are `'utf8'` or `'buffer'`.
462
+ * @default 'utf8'
463
+ */
464
+ contentMode?: "utf8" | "buffer" | undefined;
465
+ /**
466
+ * A path to a file to be written to (mode controlled by the
467
+ * append option).
468
+ */
469
+ dest?: string | undefined;
470
+ /**
471
+ * A file descriptor, something that is returned by `fs.open()`
472
+ * or `fs.openSync()`.
473
+ */
474
+ fd?: number | undefined;
475
+ /**
476
+ * An object that has the same API as the `fs` module, useful
477
+ * for mocking, testing, or customizing the behavior of the stream.
478
+ */
479
+ fs?: object | undefined;
480
+ /**
481
+ * Perform a `fs.fsyncSync()` every time a write is
482
+ * completed.
483
+ */
484
+ fsync?: boolean | undefined;
485
+ /**
486
+ * The maximum length of the internal buffer. If a write
487
+ * operation would cause the buffer to exceed `maxLength`, the data written is
488
+ * dropped and a drop event is emitted with the dropped data
489
+ */
490
+ maxLength?: number | undefined;
491
+ /**
492
+ * The maximum number of bytes that can be written;
493
+ * @default 16384
494
+ */
495
+ maxWrite?: number | undefined;
496
+ /**
497
+ * The minimum length of the internal buffer that is
498
+ * required to be full before flushing.
499
+ */
500
+ minLength?: number | undefined;
501
+ /**
502
+ * Ensure directory for `dest` file exists when true.
503
+ * @default false
504
+ */
505
+ mkdir?: boolean | undefined;
506
+ /**
507
+ * Specify the creating file mode (see `fs.open()`).
508
+ */
509
+ mode?: number | string | undefined;
510
+ /**
511
+ * Calls flush every `periodicFlush` milliseconds.
512
+ */
513
+ periodicFlush?: number | undefined;
514
+ /**
515
+ * A function that will be called when `write()`,
516
+ * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error.
517
+ * If the return value is `true` the operation will be retried, otherwise it
518
+ * will bubble the error. The `err` is the error that caused this function to
519
+ * be called, `writeBufferLen` is the length of the buffer that was written,
520
+ * and `remainingBufferLen` is the length of the remaining buffer that the
521
+ * stream did not try to write.
522
+ */
523
+ retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined;
524
+ /**
525
+ * Perform writes synchronously.
526
+ */
527
+ sync?: boolean | undefined;
528
+ }
529
+ /**
530
+ * An optimized UTF-8 stream writer that allows for flushing all the internal
531
+ * buffering on demand. It handles `EAGAIN` errors correctly, allowing for
532
+ * customization, for example, by dropping content if the disk is busy.
533
+ * @since v24.6.0
534
+ * @experimental
535
+ */
536
+ export class Utf8Stream extends EventEmitter {
537
+ constructor(options: Utf8StreamOptions);
538
+ /**
539
+ * Whether the stream is appending to the file or truncating it.
540
+ */
541
+ readonly append: boolean;
542
+ /**
543
+ * The type of data that can be written to the stream. Supported
544
+ * values are `'utf8'` or `'buffer'`.
545
+ * @default 'utf8'
546
+ */
547
+ readonly contentMode: "utf8" | "buffer";
548
+ /**
549
+ * Close the stream immediately, without flushing the internal buffer.
550
+ */
551
+ destroy(): void;
552
+ /**
553
+ * Close the stream gracefully, flushing the internal buffer before closing.
554
+ */
555
+ end(): void;
556
+ /**
557
+ * The file descriptor that is being written to.
558
+ */
559
+ readonly fd: number;
560
+ /**
561
+ * The file that is being written to.
562
+ */
563
+ readonly file: string;
564
+ /**
565
+ * Writes the current buffer to the file if a write was not in progress. Do
566
+ * nothing if `minLength` is zero or if it is already writing.
567
+ */
568
+ flush(callback: (err: Error | null) => void): void;
569
+ /**
570
+ * Flushes the buffered data synchronously. This is a costly operation.
571
+ */
572
+ flushSync(): void;
573
+ /**
574
+ * Whether the stream is performing a `fs.fsyncSync()` after every
575
+ * write operation.
576
+ */
577
+ readonly fsync: boolean;
578
+ /**
579
+ * The maximum length of the internal buffer. If a write
580
+ * operation would cause the buffer to exceed `maxLength`, the data written is
581
+ * dropped and a drop event is emitted with the dropped data.
582
+ */
583
+ readonly maxLength: number;
584
+ /**
585
+ * The minimum length of the internal buffer that is required to be
586
+ * full before flushing.
587
+ */
588
+ readonly minLength: number;
589
+ /**
590
+ * Whether the stream should ensure that the directory for the
591
+ * `dest` file exists. If `true`, it will create the directory if it does not
592
+ * exist.
593
+ * @default false
594
+ */
595
+ readonly mkdir: boolean;
596
+ /**
597
+ * The mode of the file that is being written to.
598
+ */
599
+ readonly mode: number | string;
600
+ /**
601
+ * The number of milliseconds between flushes. If set to `0`, no
602
+ * periodic flushes will be performed.
603
+ */
604
+ readonly periodicFlush: number;
605
+ /**
606
+ * Reopen the file in place, useful for log rotation.
607
+ * @param file A path to a file to be written to (mode
608
+ * controlled by the append option).
609
+ */
610
+ reopen(file: PathLike): void;
611
+ /**
612
+ * Whether the stream is writing synchronously or asynchronously.
613
+ */
614
+ readonly sync: boolean;
615
+ /**
616
+ * When the `options.contentMode` is set to `'utf8'` when the stream is created,
617
+ * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`,
618
+ * the `data` argument must be a `Buffer`.
619
+ * @param data The data to write.
620
+ */
621
+ write(data: string | Buffer): boolean;
622
+ /**
623
+ * Whether the stream is currently writing data to the file.
624
+ */
625
+ readonly writing: boolean;
626
+ /**
627
+ * Calls `utf8Stream.destroy()`.
628
+ */
629
+ [Symbol.dispose](): void;
630
+ /**
631
+ * events.EventEmitter
632
+ * 1. change
633
+ * 2. close
634
+ * 3. error
635
+ */
636
+ addListener(event: "close", listener: () => void): this;
637
+ addListener(event: "drain", listener: () => void): this;
638
+ addListener(event: "drop", listener: (data: string | Buffer) => void): this;
639
+ addListener(event: "error", listener: (error: Error) => void): this;
640
+ addListener(event: "finish", listener: () => void): this;
641
+ addListener(event: "ready", listener: () => void): this;
642
+ addListener(event: "write", listener: (n: number) => void): this;
643
+ addListener(event: string, listener: (...args: any[]) => void): this;
644
+ on(event: "close", listener: () => void): this;
645
+ on(event: "drain", listener: () => void): this;
646
+ on(event: "drop", listener: (data: string | Buffer) => void): this;
647
+ on(event: "error", listener: (error: Error) => void): this;
648
+ on(event: "finish", listener: () => void): this;
649
+ on(event: "ready", listener: () => void): this;
650
+ on(event: "write", listener: (n: number) => void): this;
651
+ on(event: string, listener: (...args: any[]) => void): this;
652
+ once(event: "close", listener: () => void): this;
653
+ once(event: "drain", listener: () => void): this;
654
+ once(event: "drop", listener: (data: string | Buffer) => void): this;
655
+ once(event: "error", listener: (error: Error) => void): this;
656
+ once(event: "finish", listener: () => void): this;
657
+ once(event: "ready", listener: () => void): this;
658
+ once(event: "write", listener: (n: number) => void): this;
659
+ once(event: string, listener: (...args: any[]) => void): this;
660
+ prependListener(event: "close", listener: () => void): this;
661
+ prependListener(event: "drain", listener: () => void): this;
662
+ prependListener(event: "drop", listener: (data: string | Buffer) => void): this;
663
+ prependListener(event: "error", listener: (error: Error) => void): this;
664
+ prependListener(event: "finish", listener: () => void): this;
665
+ prependListener(event: "ready", listener: () => void): this;
666
+ prependListener(event: "write", listener: (n: number) => void): this;
667
+ prependListener(event: string, listener: (...args: any[]) => void): this;
668
+ prependOnceListener(event: "close", listener: () => void): this;
669
+ prependOnceListener(event: "drain", listener: () => void): this;
670
+ prependOnceListener(event: "drop", listener: (data: string | Buffer) => void): this;
671
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
672
+ prependOnceListener(event: "finish", listener: () => void): this;
673
+ prependOnceListener(event: "ready", listener: () => void): this;
674
+ prependOnceListener(event: "write", listener: (n: number) => void): this;
675
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
676
+ }
453
677
 
454
678
  /**
455
679
  * The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted.
@@ -269,6 +269,13 @@ declare module "http" {
269
269
  * @since v18.0.0
270
270
  */
271
271
  keepAliveTimeout?: number | undefined;
272
+ /**
273
+ * An additional buffer time added to the
274
+ * `server.keepAliveTimeout` to extend the internal socket timeout.
275
+ * @since 24.6.0
276
+ * @default 1000
277
+ */
278
+ keepAliveTimeoutBuffer?: number | undefined;
272
279
  /**
273
280
  * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
274
281
  * @default 30000
@@ -413,12 +420,18 @@ declare module "http" {
413
420
  /**
414
421
  * The number of milliseconds of inactivity a server needs to wait for additional
415
422
  * incoming data, after it has finished writing the last response, before a socket
416
- * will be destroyed. If the server receives new data before the keep-alive
417
- * timeout has fired, it will reset the regular inactivity timeout, i.e., `server.timeout`.
423
+ * will be destroyed.
424
+ *
425
+ * This timeout value is combined with the
426
+ * `server.keepAliveTimeoutBuffer` option to determine the actual socket
427
+ * timeout, calculated as:
428
+ * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer
429
+ * If the server receives new data before the keep-alive timeout has fired, it
430
+ * will reset the regular inactivity timeout, i.e., `server.timeout`.
418
431
  *
419
432
  * A value of `0` will disable the keep-alive timeout behavior on incoming
420
433
  * connections.
421
- * A value of `0` makes the http server behave similarly to Node.js versions prior
434
+ * A value of `0` makes the HTTP server behave similarly to Node.js versions prior
422
435
  * to 8.0.0, which did not have a keep-alive timeout.
423
436
  *
424
437
  * The socket timeout logic is set up on connection, so changing this value only
@@ -426,6 +439,18 @@ declare module "http" {
426
439
  * @since v8.0.0
427
440
  */
428
441
  keepAliveTimeout: number;
442
+ /**
443
+ * An additional buffer time added to the
444
+ * `server.keepAliveTimeout` to extend the internal socket timeout.
445
+ *
446
+ * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing
447
+ * the socket timeout slightly beyond the advertised keep-alive timeout.
448
+ *
449
+ * This option applies only to new incoming connections.
450
+ * @since v24.6.0
451
+ * @default 1000
452
+ */
453
+ keepAliveTimeoutBuffer: number;
429
454
  /**
430
455
  * Sets the timeout value in milliseconds for receiving the entire request from
431
456
  * the client.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.5.2",
3
+ "version": "24.6.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": "~7.12.0"
150
+ "undici-types": "~7.13.0"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "5df6870a3de1de1f3716802276fe0c64c2b3a2903d725578b50f533f42cfea46",
153
+ "typesPublisherContentHash": "c6b8073e736969ffdeaa3a20924802bc140d9c3e2953bb101d6da23c9409708b",
154
154
  "typeScriptVersion": "5.2"
155
155
  }
@@ -79,6 +79,7 @@
79
79
  * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/test.js)
80
80
  */
81
81
  declare module "node:test" {
82
+ import { AssertMethodNames } from "node:assert";
82
83
  import { Readable } from "node:stream";
83
84
  import TestFn = test.TestFn;
84
85
  import TestOptions = test.TestOptions;
@@ -1171,29 +1172,7 @@ declare module "node:test" {
1171
1172
  */
1172
1173
  readonly mock: MockTracker;
1173
1174
  }
1174
- interface TestContextAssert extends
1175
- Pick<
1176
- typeof import("assert"),
1177
- | "deepEqual"
1178
- | "deepStrictEqual"
1179
- | "doesNotMatch"
1180
- | "doesNotReject"
1181
- | "doesNotThrow"
1182
- | "equal"
1183
- | "fail"
1184
- | "ifError"
1185
- | "match"
1186
- | "notDeepEqual"
1187
- | "notDeepStrictEqual"
1188
- | "notEqual"
1189
- | "notStrictEqual"
1190
- | "ok"
1191
- | "partialDeepStrictEqual"
1192
- | "rejects"
1193
- | "strictEqual"
1194
- | "throws"
1195
- >
1196
- {
1175
+ interface TestContextAssert extends Pick<typeof import("assert"), AssertMethodNames> {
1197
1176
  /**
1198
1177
  * This function serializes `value` and writes it to the file specified by `path`.
1199
1178
  *
@@ -338,6 +338,11 @@ declare module "util" {
338
338
  * @since v9.7.0
339
339
  */
340
340
  export function getSystemErrorName(err: number): string;
341
+ /**
342
+ * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread.
343
+ * @since 24.6.0
344
+ */
345
+ export function setTraceSigInt(enable: boolean): void;
341
346
  /**
342
347
  * Returns a Map of all system error codes available from the Node.js API.
343
348
  * The mapping between error codes and error names is platform-dependent.
@@ -51,6 +51,7 @@ interface EventListenerObject {
51
51
  handleEvent(object: Event): void;
52
52
  }
53
53
 
54
+ type _EventListenerOptions = typeof globalThis extends { onmessage: any } ? {} : EventListenerOptions;
54
55
  interface EventListenerOptions {
55
56
  capture?: boolean;
56
57
  }
@@ -85,6 +86,8 @@ declare global {
85
86
  new(type: string, eventInitDict?: EventInit): Event;
86
87
  };
87
88
 
89
+ interface EventListenerOptions extends _EventListenerOptions {}
90
+
88
91
  interface EventTarget extends _EventTarget {}
89
92
  var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
90
93
  : {