@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1

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 (179) hide show
  1. package/.jsii +2 -2
  2. package/node_modules/@types/node/README.md +3 -3
  3. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  4. package/node_modules/@types/node/assert.d.ts +211 -92
  5. package/node_modules/@types/node/async_hooks.d.ts +103 -19
  6. package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
  7. package/node_modules/@types/node/buffer.d.ts +88 -516
  8. package/node_modules/@types/node/child_process.d.ts +167 -231
  9. package/node_modules/@types/node/cluster.d.ts +172 -26
  10. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  11. package/node_modules/@types/node/console.d.ts +66 -28
  12. package/node_modules/@types/node/constants.d.ts +14 -12
  13. package/node_modules/@types/node/crypto.d.ts +1458 -497
  14. package/node_modules/@types/node/dgram.d.ts +44 -30
  15. package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
  16. package/node_modules/@types/node/dns/promises.d.ts +120 -42
  17. package/node_modules/@types/node/dns.d.ts +209 -95
  18. package/node_modules/@types/node/domain.d.ts +14 -18
  19. package/node_modules/@types/node/events.d.ts +245 -113
  20. package/node_modules/@types/node/fs/promises.d.ts +194 -96
  21. package/node_modules/@types/node/fs.d.ts +695 -270
  22. package/node_modules/@types/node/globals.d.ts +97 -308
  23. package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  24. package/node_modules/@types/node/http.d.ts +363 -97
  25. package/node_modules/@types/node/http2.d.ts +684 -231
  26. package/node_modules/@types/node/https.d.ts +122 -87
  27. package/node_modules/@types/node/index.d.ts +24 -11
  28. package/node_modules/@types/node/inspector.d.ts +220 -2690
  29. package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
  30. package/node_modules/@types/node/module.d.ts +705 -149
  31. package/node_modules/@types/node/net.d.ts +178 -54
  32. package/node_modules/@types/node/os.d.ts +47 -17
  33. package/node_modules/@types/node/package.json +22 -97
  34. package/node_modules/@types/node/path.d.ts +12 -3
  35. package/node_modules/@types/node/perf_hooks.d.ts +500 -97
  36. package/node_modules/@types/node/process.d.ts +657 -87
  37. package/node_modules/@types/node/punycode.d.ts +5 -5
  38. package/node_modules/@types/node/querystring.d.ts +24 -13
  39. package/node_modules/@types/node/readline/promises.d.ts +25 -14
  40. package/node_modules/@types/node/readline.d.ts +102 -41
  41. package/node_modules/@types/node/repl.d.ts +38 -30
  42. package/node_modules/@types/node/sea.d.ts +162 -0
  43. package/node_modules/@types/node/sqlite.d.ts +1040 -0
  44. package/node_modules/@types/node/stream/consumers.d.ts +33 -7
  45. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  46. package/node_modules/@types/node/stream/web.d.ts +251 -28
  47. package/node_modules/@types/node/stream.d.ts +1060 -1055
  48. package/node_modules/@types/node/string_decoder.d.ts +8 -8
  49. package/node_modules/@types/node/test.d.ts +2133 -1166
  50. package/node_modules/@types/node/timers/promises.d.ts +31 -16
  51. package/node_modules/@types/node/timers.d.ts +159 -114
  52. package/node_modules/@types/node/tls.d.ts +232 -163
  53. package/node_modules/@types/node/trace_events.d.ts +43 -28
  54. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  55. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  56. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  57. package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  58. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  59. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  60. package/node_modules/@types/node/tty.d.ts +9 -9
  61. package/node_modules/@types/node/url.d.ts +236 -84
  62. package/node_modules/@types/node/util.d.ts +562 -412
  63. package/node_modules/@types/node/v8.d.ts +368 -21
  64. package/node_modules/@types/node/vm.d.ts +443 -149
  65. package/node_modules/@types/node/wasi.d.ts +62 -18
  66. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  67. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  68. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  69. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  70. package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
  71. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  72. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  73. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  74. package/node_modules/@types/node/worker_threads.d.ts +310 -107
  75. package/node_modules/@types/node/zlib.d.ts +301 -73
  76. package/node_modules/undici-types/LICENSE +21 -0
  77. package/node_modules/undici-types/agent.d.ts +13 -12
  78. package/node_modules/undici-types/api.d.ts +26 -26
  79. package/node_modules/undici-types/balanced-pool.d.ts +19 -7
  80. package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  81. package/node_modules/undici-types/client-stats.d.ts +15 -0
  82. package/node_modules/undici-types/client.d.ts +26 -15
  83. package/node_modules/undici-types/connector.d.ts +2 -2
  84. package/node_modules/undici-types/cookies.d.ts +2 -0
  85. package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
  86. package/node_modules/undici-types/dispatcher.d.ts +148 -113
  87. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  88. package/node_modules/undici-types/errors.d.ts +79 -46
  89. package/node_modules/undici-types/eventsource.d.ts +66 -0
  90. package/node_modules/undici-types/fetch.d.ts +41 -39
  91. package/node_modules/undici-types/formdata.d.ts +8 -8
  92. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  93. package/node_modules/undici-types/global-origin.d.ts +5 -5
  94. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  95. package/node_modules/undici-types/handlers.d.ts +11 -5
  96. package/node_modules/undici-types/header.d.ts +157 -1
  97. package/node_modules/undici-types/index.d.ts +68 -43
  98. package/node_modules/undici-types/interceptors.d.ts +71 -3
  99. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  100. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  101. package/node_modules/undici-types/mock-client.d.ts +6 -4
  102. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  103. package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
  104. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  105. package/node_modules/undici-types/package.json +1 -1
  106. package/node_modules/undici-types/patch.d.ts +0 -42
  107. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  108. package/node_modules/undici-types/pool.d.ts +21 -8
  109. package/node_modules/undici-types/proxy-agent.d.ts +5 -6
  110. package/node_modules/undici-types/readable.d.ts +24 -17
  111. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  112. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  113. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  114. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  115. package/node_modules/undici-types/util.d.ts +18 -0
  116. package/node_modules/undici-types/utility.d.ts +7 -0
  117. package/node_modules/undici-types/webidl.d.ts +157 -36
  118. package/node_modules/undici-types/websocket.d.ts +67 -12
  119. package/package.json +9 -60
  120. package/version.json +1 -1
  121. package/node_modules/@types/node/dom-events.d.ts +0 -122
  122. package/node_modules/@types/node/globals.global.d.ts +0 -1
  123. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  124. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  125. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  126. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  127. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  128. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  129. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  130. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  131. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
  132. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
  133. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
  134. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  135. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  136. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  137. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  138. package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
  139. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
  140. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
  141. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
  142. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  143. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
  144. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  145. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  146. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  147. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  148. package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
  149. package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  150. package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
  151. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  152. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
  153. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
  154. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  155. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  156. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  157. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  158. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  159. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  160. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  161. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
  162. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  163. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  164. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
  165. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  166. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  167. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  168. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  169. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  170. package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  171. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
  172. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
  173. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
  174. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  175. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  176. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  177. package/node_modules/argparse/CHANGELOG.md +0 -216
  178. package/node_modules/undici-types/file.d.ts +0 -39
  179. package/node_modules/undici-types/filereader.d.ts +0 -54
@@ -5,22 +5,23 @@
5
5
  * To access it:
6
6
  *
7
7
  * ```js
8
- * const zlib = require('node:zlib');
8
+ * import zlib from 'node:zlib';
9
9
  * ```
10
10
  *
11
- * Compression and decompression are built around the Node.js `Streams API`.
11
+ * Compression and decompression are built around the Node.js
12
+ * [Streams API](https://nodejs.org/docs/latest-v24.x/api/stream.html).
12
13
  *
13
14
  * Compressing or decompressing a stream (such as a file) can be accomplished by
14
15
  * piping the source stream through a `zlib` `Transform` stream into a destination
15
16
  * stream:
16
17
  *
17
18
  * ```js
18
- * const { createGzip } = require('node:zlib');
19
- * const { pipeline } = require('node:stream');
20
- * const {
19
+ * import { createGzip } from 'node:zlib';
20
+ * import { pipeline } from 'node:stream';
21
+ * import {
21
22
  * createReadStream,
22
23
  * createWriteStream,
23
- * } = require('node:fs');
24
+ * } from 'node:fs';
24
25
  *
25
26
  * const gzip = createGzip();
26
27
  * const source = createReadStream('input.txt');
@@ -35,7 +36,7 @@
35
36
  *
36
37
  * // Or, Promisified
37
38
  *
38
- * const { promisify } = require('node:util');
39
+ * import { promisify } from 'node:util';
39
40
  * const pipe = promisify(pipeline);
40
41
  *
41
42
  * async function do_gzip(input, output) {
@@ -55,7 +56,7 @@
55
56
  * It is also possible to compress or decompress data in a single step:
56
57
  *
57
58
  * ```js
58
- * const { deflate, unzip } = require('node:zlib');
59
+ * import { deflate, unzip } from 'node:zlib';
59
60
  *
60
61
  * const input = '.................................';
61
62
  * deflate(input, (err, buffer) => {
@@ -77,7 +78,7 @@
77
78
  *
78
79
  * // Or, Promisified
79
80
  *
80
- * const { promisify } = require('node:util');
81
+ * import { promisify } from 'node:util';
81
82
  * const do_unzip = promisify(unzip);
82
83
  *
83
84
  * do_unzip(buffer)
@@ -88,9 +89,10 @@
88
89
  * });
89
90
  * ```
90
91
  * @since v0.5.8
91
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/zlib.js)
92
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
92
93
  */
93
94
  declare module "zlib" {
95
+ import { NonSharedBuffer } from "node:buffer";
94
96
  import * as stream from "node:stream";
95
97
  interface ZlibOptions {
96
98
  /**
@@ -106,11 +108,22 @@ declare module "zlib" {
106
108
  */
107
109
  chunkSize?: number | undefined;
108
110
  windowBits?: number | undefined;
109
- level?: number | undefined; // compression only
110
- memLevel?: number | undefined; // compression only
111
- strategy?: number | undefined; // compression only
112
- dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
111
+ /** compression only */
112
+ level?: number | undefined;
113
+ /** compression only */
114
+ memLevel?: number | undefined;
115
+ /** compression only */
116
+ strategy?: number | undefined;
117
+ /** deflate/inflate only, empty dictionary by default */
118
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined;
119
+ /**
120
+ * If `true`, returns an object with `buffer` and `engine`.
121
+ */
113
122
  info?: boolean | undefined;
123
+ /**
124
+ * Limits output size when using convenience methods.
125
+ * @default buffer.kMaxLength
126
+ */
114
127
  maxOutputLength?: number | undefined;
115
128
  }
116
129
  interface BrotliOptions {
@@ -134,11 +147,52 @@ declare module "zlib" {
134
147
  [key: number]: boolean | number;
135
148
  }
136
149
  | undefined;
150
+ /**
151
+ * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
152
+ * @default buffer.kMaxLength
153
+ */
154
+ maxOutputLength?: number | undefined;
155
+ /**
156
+ * If `true`, returns an object with `buffer` and `engine`.
157
+ */
158
+ info?: boolean | undefined;
159
+ }
160
+ interface ZstdOptions {
161
+ /**
162
+ * @default constants.ZSTD_e_continue
163
+ */
164
+ flush?: number | undefined;
165
+ /**
166
+ * @default constants.ZSTD_e_end
167
+ */
168
+ finishFlush?: number | undefined;
169
+ /**
170
+ * @default 16 * 1024
171
+ */
172
+ chunkSize?: number | undefined;
173
+ /**
174
+ * Key-value object containing indexed
175
+ * [Zstd parameters](https://nodejs.org/docs/latest-v24.x/api/zlib.html#zstd-constants).
176
+ */
177
+ params?: { [key: number]: number | boolean } | undefined;
178
+ /**
179
+ * Limits output size when using
180
+ * [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
181
+ * @default buffer.kMaxLength
182
+ */
137
183
  maxOutputLength?: number | undefined;
184
+ /**
185
+ * If `true`, returns an object with `buffer` and `engine`.
186
+ */
187
+ info?: boolean | undefined;
188
+ /**
189
+ * Optional dictionary used to improve compression efficiency when compressing or decompressing data that
190
+ * shares common patterns with the dictionary.
191
+ * @since v24.6.0
192
+ */
193
+ dictionary?: NodeJS.ArrayBufferView | undefined;
138
194
  }
139
195
  interface Zlib {
140
- /** @deprecated Use bytesWritten instead. */
141
- readonly bytesRead: number;
142
196
  readonly bytesWritten: number;
143
197
  shell?: boolean | string | undefined;
144
198
  close(callback?: () => void): void;
@@ -151,15 +205,94 @@ declare module "zlib" {
151
205
  interface ZlibReset {
152
206
  reset(): void;
153
207
  }
208
+ /**
209
+ * @since v10.16.0
210
+ */
211
+ class BrotliCompress extends stream.Transform {
212
+ constructor(options?: BrotliOptions);
213
+ }
154
214
  interface BrotliCompress extends stream.Transform, Zlib {}
215
+ /**
216
+ * @since v10.16.0
217
+ */
218
+ class BrotliDecompress extends stream.Transform {
219
+ constructor(options?: BrotliOptions);
220
+ }
155
221
  interface BrotliDecompress extends stream.Transform, Zlib {}
222
+ /**
223
+ * @since v0.5.8
224
+ */
225
+ class Gzip extends stream.Transform {
226
+ constructor(options?: ZlibOptions);
227
+ }
156
228
  interface Gzip extends stream.Transform, Zlib {}
229
+ /**
230
+ * @since v0.5.8
231
+ */
232
+ class Gunzip extends stream.Transform {
233
+ constructor(options?: ZlibOptions);
234
+ }
157
235
  interface Gunzip extends stream.Transform, Zlib {}
236
+ /**
237
+ * @since v0.5.8
238
+ */
239
+ class Deflate extends stream.Transform {
240
+ constructor(options?: ZlibOptions);
241
+ }
158
242
  interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
243
+ /**
244
+ * @since v0.5.8
245
+ */
246
+ class Inflate extends stream.Transform {
247
+ constructor(options?: ZlibOptions);
248
+ }
159
249
  interface Inflate extends stream.Transform, Zlib, ZlibReset {}
250
+ /**
251
+ * @since v0.5.8
252
+ */
253
+ class DeflateRaw extends stream.Transform {
254
+ constructor(options?: ZlibOptions);
255
+ }
160
256
  interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
257
+ /**
258
+ * @since v0.5.8
259
+ */
260
+ class InflateRaw extends stream.Transform {
261
+ constructor(options?: ZlibOptions);
262
+ }
161
263
  interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
264
+ /**
265
+ * @since v0.5.8
266
+ */
267
+ class Unzip extends stream.Transform {
268
+ constructor(options?: ZlibOptions);
269
+ }
162
270
  interface Unzip extends stream.Transform, Zlib {}
271
+ /**
272
+ * @since v22.15.0
273
+ * @experimental
274
+ */
275
+ class ZstdCompress extends stream.Transform {
276
+ constructor(options?: ZstdOptions);
277
+ }
278
+ interface ZstdCompress extends stream.Transform, Zlib {}
279
+ /**
280
+ * @since v22.15.0
281
+ * @experimental
282
+ */
283
+ class ZstdDecompress extends stream.Transform {
284
+ constructor(options?: ZstdOptions);
285
+ }
286
+ interface ZstdDecompress extends stream.Transform, Zlib {}
287
+ /**
288
+ * Computes a 32-bit [Cyclic Redundancy Check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksum of `data`.
289
+ * If `value` is specified, it is used as the starting value of the checksum, otherwise, 0 is used as the starting value.
290
+ * @param data When `data` is a string, it will be encoded as UTF-8 before being used for computation.
291
+ * @param value An optional starting value. It must be a 32-bit unsigned integer. @default 0
292
+ * @returns A 32-bit unsigned integer containing the checksum.
293
+ * @since v22.2.0
294
+ */
295
+ function crc32(data: string | NodeJS.ArrayBufferView, value?: number): number;
163
296
  /**
164
297
  * Creates and returns a new `BrotliCompress` object.
165
298
  * @since v11.7.0, v10.16.0
@@ -194,7 +327,7 @@ declare module "zlib" {
194
327
  /**
195
328
  * Creates and returns a new `DeflateRaw` object.
196
329
  *
197
- * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8\. Newer
330
+ * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits` is set to 8 for raw deflate streams. zlib would automatically set `windowBits` to 9 if was initially set to 8. Newer
198
331
  * versions of zlib will throw an exception,
199
332
  * so Node.js restored the original behavior of upgrading a value of 8 to 9,
200
333
  * since passing `windowBits = 9` to zlib actually results in a compressed stream
@@ -212,125 +345,165 @@ declare module "zlib" {
212
345
  * @since v0.5.8
213
346
  */
214
347
  function createUnzip(options?: ZlibOptions): Unzip;
348
+ /**
349
+ * Creates and returns a new `ZstdCompress` object.
350
+ * @since v22.15.0
351
+ */
352
+ function createZstdCompress(options?: ZstdOptions): ZstdCompress;
353
+ /**
354
+ * Creates and returns a new `ZstdDecompress` object.
355
+ * @since v22.15.0
356
+ */
357
+ function createZstdDecompress(options?: ZstdOptions): ZstdDecompress;
215
358
  type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
216
- type CompressCallback = (error: Error | null, result: Buffer) => void;
359
+ type CompressCallback = (error: Error | null, result: NonSharedBuffer) => void;
217
360
  /**
218
361
  * @since v11.7.0, v10.16.0
219
362
  */
220
363
  function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
221
364
  function brotliCompress(buf: InputType, callback: CompressCallback): void;
222
365
  namespace brotliCompress {
223
- function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
366
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
224
367
  }
225
368
  /**
226
369
  * Compress a chunk of data with `BrotliCompress`.
227
370
  * @since v11.7.0, v10.16.0
228
371
  */
229
- function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
372
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
230
373
  /**
231
374
  * @since v11.7.0, v10.16.0
232
375
  */
233
376
  function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
234
377
  function brotliDecompress(buf: InputType, callback: CompressCallback): void;
235
378
  namespace brotliDecompress {
236
- function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
379
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
237
380
  }
238
381
  /**
239
382
  * Decompress a chunk of data with `BrotliDecompress`.
240
383
  * @since v11.7.0, v10.16.0
241
384
  */
242
- function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
385
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
243
386
  /**
244
387
  * @since v0.6.0
245
388
  */
246
389
  function deflate(buf: InputType, callback: CompressCallback): void;
247
390
  function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
248
391
  namespace deflate {
249
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
392
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
250
393
  }
251
394
  /**
252
395
  * Compress a chunk of data with `Deflate`.
253
396
  * @since v0.11.12
254
397
  */
255
- function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
398
+ function deflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
256
399
  /**
257
400
  * @since v0.6.0
258
401
  */
259
402
  function deflateRaw(buf: InputType, callback: CompressCallback): void;
260
403
  function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
261
404
  namespace deflateRaw {
262
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
405
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
263
406
  }
264
407
  /**
265
408
  * Compress a chunk of data with `DeflateRaw`.
266
409
  * @since v0.11.12
267
410
  */
268
- function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
411
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
269
412
  /**
270
413
  * @since v0.6.0
271
414
  */
272
415
  function gzip(buf: InputType, callback: CompressCallback): void;
273
416
  function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
274
417
  namespace gzip {
275
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
418
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
276
419
  }
277
420
  /**
278
421
  * Compress a chunk of data with `Gzip`.
279
422
  * @since v0.11.12
280
423
  */
281
- function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
424
+ function gzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
282
425
  /**
283
426
  * @since v0.6.0
284
427
  */
285
428
  function gunzip(buf: InputType, callback: CompressCallback): void;
286
429
  function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
287
430
  namespace gunzip {
288
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
431
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
289
432
  }
290
433
  /**
291
434
  * Decompress a chunk of data with `Gunzip`.
292
435
  * @since v0.11.12
293
436
  */
294
- function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
437
+ function gunzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
295
438
  /**
296
439
  * @since v0.6.0
297
440
  */
298
441
  function inflate(buf: InputType, callback: CompressCallback): void;
299
442
  function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
300
443
  namespace inflate {
301
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
444
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
302
445
  }
303
446
  /**
304
447
  * Decompress a chunk of data with `Inflate`.
305
448
  * @since v0.11.12
306
449
  */
307
- function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
450
+ function inflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
308
451
  /**
309
452
  * @since v0.6.0
310
453
  */
311
454
  function inflateRaw(buf: InputType, callback: CompressCallback): void;
312
455
  function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
313
456
  namespace inflateRaw {
314
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
457
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
315
458
  }
316
459
  /**
317
460
  * Decompress a chunk of data with `InflateRaw`.
318
461
  * @since v0.11.12
319
462
  */
320
- function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
463
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
321
464
  /**
322
465
  * @since v0.6.0
323
466
  */
324
467
  function unzip(buf: InputType, callback: CompressCallback): void;
325
468
  function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
326
469
  namespace unzip {
327
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
470
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
328
471
  }
329
472
  /**
330
473
  * Decompress a chunk of data with `Unzip`.
331
474
  * @since v0.11.12
332
475
  */
333
- function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
476
+ function unzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
477
+ /**
478
+ * @since v22.15.0
479
+ * @experimental
480
+ */
481
+ function zstdCompress(buf: InputType, callback: CompressCallback): void;
482
+ function zstdCompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
483
+ namespace zstdCompress {
484
+ function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
485
+ }
486
+ /**
487
+ * Compress a chunk of data with `ZstdCompress`.
488
+ * @since v22.15.0
489
+ * @experimental
490
+ */
491
+ function zstdCompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
492
+ /**
493
+ * @since v22.15.0
494
+ * @experimental
495
+ */
496
+ function zstdDecompress(buf: InputType, callback: CompressCallback): void;
497
+ function zstdDecompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
498
+ namespace zstdDecompress {
499
+ function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
500
+ }
501
+ /**
502
+ * Decompress a chunk of data with `ZstdDecompress`.
503
+ * @since v22.15.0
504
+ * @experimental
505
+ */
506
+ function zstdDecompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
334
507
  namespace constants {
335
508
  const BROTLI_DECODE: number;
336
509
  const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
@@ -402,49 +575,106 @@ declare module "zlib" {
402
575
  const INFLATE: number;
403
576
  const INFLATERAW: number;
404
577
  const UNZIP: number;
405
- // Allowed flush values.
406
- const Z_NO_FLUSH: number;
407
- const Z_PARTIAL_FLUSH: number;
408
- const Z_SYNC_FLUSH: number;
409
- const Z_FULL_FLUSH: number;
410
- const Z_FINISH: number;
578
+ const ZLIB_VERNUM: number;
579
+ const ZSTD_CLEVEL_DEFAULT: number;
580
+ const ZSTD_COMPRESS: number;
581
+ const ZSTD_DECOMPRESS: number;
582
+ const ZSTD_btlazy2: number;
583
+ const ZSTD_btopt: number;
584
+ const ZSTD_btultra: number;
585
+ const ZSTD_btultra2: number;
586
+ const ZSTD_c_chainLog: number;
587
+ const ZSTD_c_checksumFlag: number;
588
+ const ZSTD_c_compressionLevel: number;
589
+ const ZSTD_c_contentSizeFlag: number;
590
+ const ZSTD_c_dictIDFlag: number;
591
+ const ZSTD_c_enableLongDistanceMatching: number;
592
+ const ZSTD_c_hashLog: number;
593
+ const ZSTD_c_jobSize: number;
594
+ const ZSTD_c_ldmBucketSizeLog: number;
595
+ const ZSTD_c_ldmHashLog: number;
596
+ const ZSTD_c_ldmHashRateLog: number;
597
+ const ZSTD_c_ldmMinMatch: number;
598
+ const ZSTD_c_minMatch: number;
599
+ const ZSTD_c_nbWorkers: number;
600
+ const ZSTD_c_overlapLog: number;
601
+ const ZSTD_c_searchLog: number;
602
+ const ZSTD_c_strategy: number;
603
+ const ZSTD_c_targetLength: number;
604
+ const ZSTD_c_windowLog: number;
605
+ const ZSTD_d_windowLogMax: number;
606
+ const ZSTD_dfast: number;
607
+ const ZSTD_e_continue: number;
608
+ const ZSTD_e_end: number;
609
+ const ZSTD_e_flush: number;
610
+ const ZSTD_error_GENERIC: number;
611
+ const ZSTD_error_checksum_wrong: number;
612
+ const ZSTD_error_corruption_detected: number;
613
+ const ZSTD_error_dictionaryCreation_failed: number;
614
+ const ZSTD_error_dictionary_corrupted: number;
615
+ const ZSTD_error_dictionary_wrong: number;
616
+ const ZSTD_error_dstBuffer_null: number;
617
+ const ZSTD_error_dstSize_tooSmall: number;
618
+ const ZSTD_error_frameParameter_unsupported: number;
619
+ const ZSTD_error_frameParameter_windowTooLarge: number;
620
+ const ZSTD_error_init_missing: number;
621
+ const ZSTD_error_literals_headerWrong: number;
622
+ const ZSTD_error_maxSymbolValue_tooLarge: number;
623
+ const ZSTD_error_maxSymbolValue_tooSmall: number;
624
+ const ZSTD_error_memory_allocation: number;
625
+ const ZSTD_error_noForwardProgress_destFull: number;
626
+ const ZSTD_error_noForwardProgress_inputEmpty: number;
627
+ const ZSTD_error_no_error: number;
628
+ const ZSTD_error_parameter_combination_unsupported: number;
629
+ const ZSTD_error_parameter_outOfBound: number;
630
+ const ZSTD_error_parameter_unsupported: number;
631
+ const ZSTD_error_prefix_unknown: number;
632
+ const ZSTD_error_srcSize_wrong: number;
633
+ const ZSTD_error_stabilityCondition_notRespected: number;
634
+ const ZSTD_error_stage_wrong: number;
635
+ const ZSTD_error_tableLog_tooLarge: number;
636
+ const ZSTD_error_version_unsupported: number;
637
+ const ZSTD_error_workSpace_tooSmall: number;
638
+ const ZSTD_fast: number;
639
+ const ZSTD_greedy: number;
640
+ const ZSTD_lazy: number;
641
+ const ZSTD_lazy2: number;
642
+ const Z_BEST_COMPRESSION: number;
643
+ const Z_BEST_SPEED: number;
411
644
  const Z_BLOCK: number;
412
- const Z_TREES: number;
413
- // Return codes for the compression/decompression functions.
414
- // Negative values are errors, positive values are used for special but normal events.
415
- const Z_OK: number;
416
- const Z_STREAM_END: number;
417
- const Z_NEED_DICT: number;
418
- const Z_ERRNO: number;
419
- const Z_STREAM_ERROR: number;
420
- const Z_DATA_ERROR: number;
421
- const Z_MEM_ERROR: number;
422
645
  const Z_BUF_ERROR: number;
423
- const Z_VERSION_ERROR: number;
424
- // Compression levels.
425
- const Z_NO_COMPRESSION: number;
426
- const Z_BEST_SPEED: number;
427
- const Z_BEST_COMPRESSION: number;
646
+ const Z_DATA_ERROR: number;
647
+ const Z_DEFAULT_CHUNK: number;
428
648
  const Z_DEFAULT_COMPRESSION: number;
429
- // Compression strategy.
430
- const Z_FILTERED: number;
431
- const Z_HUFFMAN_ONLY: number;
432
- const Z_RLE: number;
433
- const Z_FIXED: number;
649
+ const Z_DEFAULT_LEVEL: number;
650
+ const Z_DEFAULT_MEMLEVEL: number;
434
651
  const Z_DEFAULT_STRATEGY: number;
435
652
  const Z_DEFAULT_WINDOWBITS: number;
436
- const Z_MIN_WINDOWBITS: number;
437
- const Z_MAX_WINDOWBITS: number;
438
- const Z_MIN_CHUNK: number;
653
+ const Z_ERRNO: number;
654
+ const Z_FILTERED: number;
655
+ const Z_FINISH: number;
656
+ const Z_FIXED: number;
657
+ const Z_FULL_FLUSH: number;
658
+ const Z_HUFFMAN_ONLY: number;
439
659
  const Z_MAX_CHUNK: number;
440
- const Z_DEFAULT_CHUNK: number;
441
- const Z_MIN_MEMLEVEL: number;
660
+ const Z_MAX_LEVEL: number;
442
661
  const Z_MAX_MEMLEVEL: number;
443
- const Z_DEFAULT_MEMLEVEL: number;
662
+ const Z_MAX_WINDOWBITS: number;
663
+ const Z_MEM_ERROR: number;
664
+ const Z_MIN_CHUNK: number;
444
665
  const Z_MIN_LEVEL: number;
445
- const Z_MAX_LEVEL: number;
446
- const Z_DEFAULT_LEVEL: number;
447
- const ZLIB_VERNUM: number;
666
+ const Z_MIN_MEMLEVEL: number;
667
+ const Z_MIN_WINDOWBITS: number;
668
+ const Z_NEED_DICT: number;
669
+ const Z_NO_COMPRESSION: number;
670
+ const Z_NO_FLUSH: number;
671
+ const Z_OK: number;
672
+ const Z_PARTIAL_FLUSH: number;
673
+ const Z_RLE: number;
674
+ const Z_STREAM_END: number;
675
+ const Z_STREAM_ERROR: number;
676
+ const Z_SYNC_FLUSH: number;
677
+ const Z_VERSION_ERROR: number;
448
678
  }
449
679
  // Allowed flush values.
450
680
  /** @deprecated Use `constants.Z_NO_FLUSH` */
@@ -459,8 +689,6 @@ declare module "zlib" {
459
689
  const Z_FINISH: number;
460
690
  /** @deprecated Use `constants.Z_BLOCK` */
461
691
  const Z_BLOCK: number;
462
- /** @deprecated Use `constants.Z_TREES` */
463
- const Z_TREES: number;
464
692
  // Return codes for the compression/decompression functions.
465
693
  // Negative values are errors, positive values are used for special but normal events.
466
694
  /** @deprecated Use `constants.Z_OK` */
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Matteo Collina and Undici contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,31 +1,32 @@
1
- import { URL } from 'url'
1
+ import { URL } from 'node:url'
2
2
  import Pool from './pool'
3
- import Dispatcher from "./dispatcher";
3
+ import Dispatcher from './dispatcher'
4
+ import TClientStats from './client-stats'
5
+ import TPoolStats from './pool-stats'
4
6
 
5
7
  export default Agent
6
8
 
7
- declare class Agent extends Dispatcher{
8
- constructor(opts?: Agent.Options)
9
+ declare class Agent extends Dispatcher {
10
+ constructor (opts?: Agent.Options)
9
11
  /** `true` after `dispatcher.close()` has been called. */
10
- closed: boolean;
12
+ closed: boolean
11
13
  /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12
- destroyed: boolean;
14
+ destroyed: boolean
13
15
  /** Dispatches a request. */
14
- dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
16
+ dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
17
+ /** Aggregate stats for a Agent by origin. */
18
+ readonly stats: Record<string, TClientStats | TPoolStats>
15
19
  }
16
20
 
17
21
  declare namespace Agent {
18
22
  export interface Options extends Pool.Options {
19
23
  /** Default: `(origin, opts) => new Pool(origin, opts)`. */
20
24
  factory?(origin: string | URL, opts: Object): Dispatcher;
21
- /** Integer. Default: `0` */
22
- maxRedirections?: number;
23
25
 
24
- interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
26
+ interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
27
+ maxOrigins?: number
25
28
  }
26
29
 
27
30
  export interface DispatchOptions extends Dispatcher.DispatchOptions {
28
- /** Integer. */
29
- maxRedirections?: number;
30
31
  }
31
32
  }