cdk-ecr-deployment 3.0.111 → 3.0.113

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 (162) hide show
  1. package/.jsii +2 -2
  2. package/lib/index.js +5 -5
  3. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +1 -1
  5. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +1 -1
  6. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  7. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +14 -381
  8. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +34 -29
  9. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +2 -1
  10. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +2 -2
  11. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3 -3
  12. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  13. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +5 -5
  14. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +5 -5
  15. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +2 -2
  16. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +2 -2
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +2 -2
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +17 -15
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +7 -7
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +238 -101
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +17 -23
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +5 -1
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +270 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +3 -3
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +11 -15
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +1 -1
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +9 -2
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +1 -1
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +19 -19
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +1 -1
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +1 -1
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +9 -9
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +4 -4
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +1 -1
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +17 -17
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +34 -15
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +3 -3
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +86 -3
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +5 -5
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +1 -1
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +5 -5
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +4 -4
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +94 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -1
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +7 -7
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +44 -44
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +12 -12
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +13 -13
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +1 -1
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +22 -22
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +8 -8
  56. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  57. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +1 -1
  58. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +1 -1
  59. package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  60. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +14 -381
  61. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +34 -29
  62. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +2 -1
  63. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +2 -2
  64. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3 -3
  65. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  66. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +5 -5
  67. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +5 -5
  68. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +2 -2
  69. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +2 -2
  70. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +2 -2
  71. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +17 -15
  72. package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  73. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +7 -7
  74. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +238 -101
  75. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +17 -23
  76. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +5 -1
  77. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +270 -0
  78. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +3 -3
  79. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +11 -15
  80. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +1 -1
  81. package/node_modules/@types/keyv/node_modules/@types/node/package.json +9 -2
  82. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +1 -1
  83. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +19 -19
  84. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  85. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +1 -1
  86. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +1 -1
  87. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +9 -9
  88. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +4 -4
  89. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +1 -1
  90. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +17 -17
  91. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +34 -15
  92. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +3 -3
  93. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +86 -3
  94. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +5 -5
  95. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +1 -1
  96. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +5 -5
  97. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +4 -4
  98. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +94 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -1
  102. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +7 -7
  103. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +44 -44
  104. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +12 -12
  105. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +13 -13
  106. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +1 -1
  107. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +22 -22
  108. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +8 -8
  109. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  110. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +1 -1
  111. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +1 -1
  112. package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  113. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +14 -381
  114. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +34 -29
  115. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +2 -1
  116. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +2 -2
  117. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3 -3
  118. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  119. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +5 -5
  120. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +5 -5
  121. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +2 -2
  122. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +2 -2
  123. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +2 -2
  124. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +17 -15
  125. package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  126. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +7 -7
  127. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +238 -101
  128. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +17 -23
  129. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +5 -1
  130. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +270 -0
  131. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +3 -3
  132. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +11 -15
  133. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +1 -1
  134. package/node_modules/@types/responselike/node_modules/@types/node/package.json +9 -2
  135. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +1 -1
  136. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +19 -19
  137. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  138. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +1 -1
  139. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +1 -1
  140. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +9 -9
  141. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +4 -4
  142. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +1 -1
  143. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +17 -17
  144. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +34 -15
  145. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +3 -3
  146. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +86 -3
  147. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +5 -5
  148. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +1 -1
  149. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +5 -5
  150. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +4 -4
  151. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +94 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -1
  155. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +7 -7
  156. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +44 -44
  157. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +12 -12
  158. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +13 -13
  159. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +1 -1
  160. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +22 -22
  161. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +8 -8
  162. package/package.json +1 -1
@@ -134,7 +134,7 @@ declare module "buffer" {
134
134
  export interface BlobOptions {
135
135
  /**
136
136
  * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
137
- * will be converted to the platform native line-ending as specified by `require('node:os').EOL`.
137
+ * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
138
138
  */
139
139
  endings?: "transparent" | "native";
140
140
  /**
@@ -210,7 +210,7 @@ declare module "buffer" {
210
210
  export interface FileOptions {
211
211
  /**
212
212
  * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
213
- * converted to the platform native line-ending as specified by `require('node:os').EOL`.
213
+ * converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
214
214
  */
215
215
  endings?: "native" | "transparent";
216
216
  /** The File content-type. */
@@ -267,100 +267,9 @@ declare module "buffer" {
267
267
  * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
268
268
  */
269
269
  interface BufferConstructor {
270
- /**
271
- * Allocates a new buffer containing the given {str}.
272
- *
273
- * @param str String to store in buffer.
274
- * @param encoding encoding to use, optional. Default is 'utf8'
275
- * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
276
- */
277
- new(str: string, encoding?: BufferEncoding): Buffer;
278
- /**
279
- * Allocates a new buffer of {size} octets.
280
- *
281
- * @param size count of octets to allocate.
282
- * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
283
- */
284
- new(size: number): Buffer;
285
- /**
286
- * Allocates a new buffer containing the given {array} of octets.
287
- *
288
- * @param array The octets to store.
289
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
290
- */
291
- new(array: Uint8Array): Buffer;
292
- /**
293
- * Produces a Buffer backed by the same allocated memory as
294
- * the given {ArrayBuffer}/{SharedArrayBuffer}.
295
- *
296
- * @param arrayBuffer The ArrayBuffer with which to share memory.
297
- * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
298
- */
299
- new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
300
- /**
301
- * Allocates a new buffer containing the given {array} of octets.
302
- *
303
- * @param array The octets to store.
304
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
305
- */
306
- new(array: readonly any[]): Buffer;
307
- /**
308
- * Copies the passed {buffer} data onto a new {Buffer} instance.
309
- *
310
- * @param buffer The buffer to copy.
311
- * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
312
- */
313
- new(buffer: Buffer): Buffer;
314
- /**
315
- * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
316
- * Array entries outside that range will be truncated to fit into it.
317
- *
318
- * ```js
319
- * import { Buffer } from 'node:buffer';
320
- *
321
- * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
322
- * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
323
- * ```
324
- *
325
- * If `array` is an `Array`\-like object (that is, one with a `length` property of
326
- * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
327
- * a `Uint8Array`. This means all other `TypedArray` variants get treated as an `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
328
- *
329
- * A `TypeError` will be thrown if `array` is not an `Array` or another type
330
- * appropriate for `Buffer.from()` variants.
331
- *
332
- * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
333
- * @since v5.10.0
334
- */
335
- from(
336
- arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
337
- byteOffset?: number,
338
- length?: number,
339
- ): Buffer;
340
- /**
341
- * Creates a new Buffer using the passed {data}
342
- * @param data data to create a new Buffer
343
- */
344
- from(data: Uint8Array | readonly number[]): Buffer;
345
- from(data: WithImplicitCoercion<Uint8Array | readonly number[] | string>): Buffer;
346
- /**
347
- * Creates a new Buffer containing the given JavaScript string {str}.
348
- * If provided, the {encoding} parameter identifies the character encoding.
349
- * If not provided, {encoding} defaults to 'utf8'.
350
- */
351
- from(
352
- str:
353
- | WithImplicitCoercion<string>
354
- | {
355
- [Symbol.toPrimitive](hint: "string"): string;
356
- },
357
- encoding?: BufferEncoding,
358
- ): Buffer;
359
- /**
360
- * Creates a new Buffer using the passed {data}
361
- * @param values to create a new Buffer
362
- */
363
- of(...items: number[]): Buffer;
270
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
271
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
272
+
364
273
  /**
365
274
  * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
366
275
  *
@@ -432,62 +341,6 @@ declare module "buffer" {
432
341
  string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
433
342
  encoding?: BufferEncoding,
434
343
  ): number;
435
- /**
436
- * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
437
- *
438
- * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
439
- *
440
- * If `totalLength` is not provided, it is calculated from the `Buffer` instances
441
- * in `list` by adding their lengths.
442
- *
443
- * If `totalLength` is provided, it is coerced to an unsigned integer. If the
444
- * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
445
- * truncated to `totalLength`.
446
- *
447
- * ```js
448
- * import { Buffer } from 'node:buffer';
449
- *
450
- * // Create a single `Buffer` from a list of three `Buffer` instances.
451
- *
452
- * const buf1 = Buffer.alloc(10);
453
- * const buf2 = Buffer.alloc(14);
454
- * const buf3 = Buffer.alloc(18);
455
- * const totalLength = buf1.length + buf2.length + buf3.length;
456
- *
457
- * console.log(totalLength);
458
- * // Prints: 42
459
- *
460
- * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
461
- *
462
- * console.log(bufA);
463
- * // Prints: <Buffer 00 00 00 00 ...>
464
- * console.log(bufA.length);
465
- * // Prints: 42
466
- * ```
467
- *
468
- * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
469
- * @since v0.7.11
470
- * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
471
- * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
472
- */
473
- concat(list: readonly Uint8Array[], totalLength?: number): Buffer;
474
- /**
475
- * Copies the underlying memory of `view` into a new `Buffer`.
476
- *
477
- * ```js
478
- * const u16 = new Uint16Array([0, 0xffff]);
479
- * const buf = Buffer.copyBytesFrom(u16, 1, 1);
480
- * u16[1] = 0;
481
- * console.log(buf.length); // 2
482
- * console.log(buf[0]); // 255
483
- * console.log(buf[1]); // 255
484
- * ```
485
- * @since v19.8.0
486
- * @param view The {TypedArray} to copy.
487
- * @param [offset=0] The starting offset within `view`.
488
- * @param [length=view.length - offset] The number of elements from `view` to copy.
489
- */
490
- copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
491
344
  /**
492
345
  * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
493
346
  *
@@ -506,135 +359,6 @@ declare module "buffer" {
506
359
  * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
507
360
  */
508
361
  compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
509
- /**
510
- * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
511
- *
512
- * ```js
513
- * import { Buffer } from 'node:buffer';
514
- *
515
- * const buf = Buffer.alloc(5);
516
- *
517
- * console.log(buf);
518
- * // Prints: <Buffer 00 00 00 00 00>
519
- * ```
520
- *
521
- * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
522
- *
523
- * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
524
- *
525
- * ```js
526
- * import { Buffer } from 'node:buffer';
527
- *
528
- * const buf = Buffer.alloc(5, 'a');
529
- *
530
- * console.log(buf);
531
- * // Prints: <Buffer 61 61 61 61 61>
532
- * ```
533
- *
534
- * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
535
- * initialized by calling `buf.fill(fill, encoding)`.
536
- *
537
- * ```js
538
- * import { Buffer } from 'node:buffer';
539
- *
540
- * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
541
- *
542
- * console.log(buf);
543
- * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
544
- * ```
545
- *
546
- * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
547
- * contents will never contain sensitive data from previous allocations, including
548
- * data that might not have been allocated for `Buffer`s.
549
- *
550
- * A `TypeError` will be thrown if `size` is not a number.
551
- * @since v5.10.0
552
- * @param size The desired length of the new `Buffer`.
553
- * @param [fill=0] A value to pre-fill the new `Buffer` with.
554
- * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
555
- */
556
- alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
557
- /**
558
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
559
- *
560
- * The underlying memory for `Buffer` instances created in this way is _not_
561
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
562
- *
563
- * ```js
564
- * import { Buffer } from 'node:buffer';
565
- *
566
- * const buf = Buffer.allocUnsafe(10);
567
- *
568
- * console.log(buf);
569
- * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
570
- *
571
- * buf.fill(0);
572
- *
573
- * console.log(buf);
574
- * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
575
- * ```
576
- *
577
- * A `TypeError` will be thrown if `size` is not a number.
578
- *
579
- * The `Buffer` module pre-allocates an internal `Buffer` instance of
580
- * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
581
- * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
582
- *
583
- * Use of this pre-allocated internal memory pool is a key difference between
584
- * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
585
- * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
586
- * than or equal to half `Buffer.poolSize`. The
587
- * difference is subtle but can be important when an application requires the
588
- * additional performance that `Buffer.allocUnsafe()` provides.
589
- * @since v5.10.0
590
- * @param size The desired length of the new `Buffer`.
591
- */
592
- allocUnsafe(size: number): Buffer;
593
- /**
594
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
595
- * `size` is 0.
596
- *
597
- * The underlying memory for `Buffer` instances created in this way is _not_
598
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
599
- * such `Buffer` instances with zeroes.
600
- *
601
- * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
602
- * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
603
- * allows applications to avoid the garbage collection overhead of creating many
604
- * individually allocated `Buffer` instances. This approach improves both
605
- * performance and memory usage by eliminating the need to track and clean up as
606
- * many individual `ArrayBuffer` objects.
607
- *
608
- * However, in the case where a developer may need to retain a small chunk of
609
- * memory from a pool for an indeterminate amount of time, it may be appropriate
610
- * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
611
- * then copying out the relevant bits.
612
- *
613
- * ```js
614
- * import { Buffer } from 'node:buffer';
615
- *
616
- * // Need to keep around a few small chunks of memory.
617
- * const store = [];
618
- *
619
- * socket.on('readable', () => {
620
- * let data;
621
- * while (null !== (data = readable.read())) {
622
- * // Allocate for retained data.
623
- * const sb = Buffer.allocUnsafeSlow(10);
624
- *
625
- * // Copy the data into the new allocation.
626
- * data.copy(sb, 0, 0, 10);
627
- *
628
- * store.push(sb);
629
- * }
630
- * });
631
- * ```
632
- *
633
- * A `TypeError` will be thrown if `size` is not a number.
634
- * @since v5.12.0
635
- * @param size The desired length of the new `Buffer`.
636
- */
637
- allocUnsafeSlow(size: number): Buffer;
638
362
  /**
639
363
  * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
640
364
  * for pooling. This value may be modified.
@@ -642,7 +366,10 @@ declare module "buffer" {
642
366
  */
643
367
  poolSize: number;
644
368
  }
645
- interface Buffer extends Uint8Array {
369
+ interface Buffer {
370
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
371
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
372
+
646
373
  /**
647
374
  * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
648
375
  * not contain enough space to fit the entire string, only part of `string` will be
@@ -879,100 +606,6 @@ declare module "buffer" {
879
606
  * @return The number of bytes copied.
880
607
  */
881
608
  copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
882
- /**
883
- * Returns a new `Buffer` that references the same memory as the original, but
884
- * offset and cropped by the `start` and `end` indices.
885
- *
886
- * This method is not compatible with the `Uint8Array.prototype.slice()`,
887
- * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
888
- *
889
- * ```js
890
- * import { Buffer } from 'node:buffer';
891
- *
892
- * const buf = Buffer.from('buffer');
893
- *
894
- * const copiedBuf = Uint8Array.prototype.slice.call(buf);
895
- * copiedBuf[0]++;
896
- * console.log(copiedBuf.toString());
897
- * // Prints: cuffer
898
- *
899
- * console.log(buf.toString());
900
- * // Prints: buffer
901
- *
902
- * // With buf.slice(), the original buffer is modified.
903
- * const notReallyCopiedBuf = buf.slice();
904
- * notReallyCopiedBuf[0]++;
905
- * console.log(notReallyCopiedBuf.toString());
906
- * // Prints: cuffer
907
- * console.log(buf.toString());
908
- * // Also prints: cuffer (!)
909
- * ```
910
- * @since v0.3.0
911
- * @deprecated Use `subarray` instead.
912
- * @param [start=0] Where the new `Buffer` will start.
913
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
914
- */
915
- slice(start?: number, end?: number): Buffer;
916
- /**
917
- * Returns a new `Buffer` that references the same memory as the original, but
918
- * offset and cropped by the `start` and `end` indices.
919
- *
920
- * Specifying `end` greater than `buf.length` will return the same result as
921
- * that of `end` equal to `buf.length`.
922
- *
923
- * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
924
- *
925
- * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
926
- *
927
- * ```js
928
- * import { Buffer } from 'node:buffer';
929
- *
930
- * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
931
- * // from the original `Buffer`.
932
- *
933
- * const buf1 = Buffer.allocUnsafe(26);
934
- *
935
- * for (let i = 0; i < 26; i++) {
936
- * // 97 is the decimal ASCII value for 'a'.
937
- * buf1[i] = i + 97;
938
- * }
939
- *
940
- * const buf2 = buf1.subarray(0, 3);
941
- *
942
- * console.log(buf2.toString('ascii', 0, buf2.length));
943
- * // Prints: abc
944
- *
945
- * buf1[0] = 33;
946
- *
947
- * console.log(buf2.toString('ascii', 0, buf2.length));
948
- * // Prints: !bc
949
- * ```
950
- *
951
- * Specifying negative indexes causes the slice to be generated relative to the
952
- * end of `buf` rather than the beginning.
953
- *
954
- * ```js
955
- * import { Buffer } from 'node:buffer';
956
- *
957
- * const buf = Buffer.from('buffer');
958
- *
959
- * console.log(buf.subarray(-6, -1).toString());
960
- * // Prints: buffe
961
- * // (Equivalent to buf.subarray(0, 5).)
962
- *
963
- * console.log(buf.subarray(-6, -2).toString());
964
- * // Prints: buff
965
- * // (Equivalent to buf.subarray(0, 4).)
966
- *
967
- * console.log(buf.subarray(-5, -2).toString());
968
- * // Prints: uff
969
- * // (Equivalent to buf.subarray(1, 4).)
970
- * ```
971
- * @since v3.0.0
972
- * @param [start=0] Where the new `Buffer` will start.
973
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
974
- */
975
- subarray(start?: number, end?: number): Buffer;
976
609
  /**
977
610
  * Writes `value` to `buf` at the specified `offset` as big-endian.
978
611
  *
@@ -1630,7 +1263,7 @@ declare module "buffer" {
1630
1263
  * @since v5.10.0
1631
1264
  * @return A reference to `buf`.
1632
1265
  */
1633
- swap16(): Buffer;
1266
+ swap16(): this;
1634
1267
  /**
1635
1268
  * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
1636
1269
  * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
@@ -1656,7 +1289,7 @@ declare module "buffer" {
1656
1289
  * @since v5.10.0
1657
1290
  * @return A reference to `buf`.
1658
1291
  */
1659
- swap32(): Buffer;
1292
+ swap32(): this;
1660
1293
  /**
1661
1294
  * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
1662
1295
  * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
@@ -1682,7 +1315,7 @@ declare module "buffer" {
1682
1315
  * @since v6.3.0
1683
1316
  * @return A reference to `buf`.
1684
1317
  */
1685
- swap64(): Buffer;
1318
+ swap64(): this;
1686
1319
  /**
1687
1320
  * Writes `value` to `buf` at the specified `offset`. `value` must be a
1688
1321
  * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
@@ -2279,7 +1912,7 @@ declare module "buffer" {
2279
1912
  function btoa(data: string): string;
2280
1913
  interface Blob extends _Blob {}
2281
1914
  /**
2282
- * `Blob` class is a global reference for `require('node:buffer').Blob`
1915
+ * `Blob` class is a global reference for `import { Blob } from 'node:buffer'`
2283
1916
  * https://nodejs.org/api/buffer.html#class-blob
2284
1917
  * @since v18.0.0
2285
1918
  */
@@ -2287,7 +1920,7 @@ declare module "buffer" {
2287
1920
  : typeof import("buffer").Blob;
2288
1921
  interface File extends _File {}
2289
1922
  /**
2290
- * `File` class is a global reference for `require('node:buffer').File`
1923
+ * `File` class is a global reference for `import { File } from 'node:buffer'`
2291
1924
  * https://nodejs.org/api/buffer.html#class-file
2292
1925
  * @since v20.0.0
2293
1926
  */