cdk-common 2.0.1024 → 2.0.1026

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 (106) 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/crypto.d.ts +23 -0
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +1 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +4 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +10 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +4 -4
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +61 -10
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +119 -0
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +33 -0
  13. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/eventsource.d.ts +0 -2
  14. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/filereader.d.ts +1 -1
  15. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/interceptors.d.ts +3 -1
  16. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/package.json +1 -1
  17. package/node_modules/@types/concat-stream/node_modules/undici-types/patch.d.ts +33 -0
  18. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/websocket.d.ts +0 -2
  19. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  20. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +23 -0
  21. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +1 -1
  22. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +1 -1
  23. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +4 -1
  24. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +10 -0
  25. package/node_modules/@types/form-data/node_modules/@types/node/package.json +4 -4
  26. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +61 -10
  27. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +119 -0
  28. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +33 -0
  29. package/node_modules/@types/form-data/node_modules/undici-types/LICENSE +21 -0
  30. package/node_modules/@types/form-data/node_modules/undici-types/README.md +6 -0
  31. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +31 -0
  32. package/node_modules/@types/form-data/node_modules/undici-types/api.d.ts +43 -0
  33. package/node_modules/@types/form-data/node_modules/undici-types/balanced-pool.d.ts +29 -0
  34. package/node_modules/@types/form-data/node_modules/undici-types/cache.d.ts +36 -0
  35. package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +108 -0
  36. package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +34 -0
  37. package/node_modules/@types/form-data/node_modules/undici-types/content-type.d.ts +21 -0
  38. package/node_modules/@types/form-data/node_modules/undici-types/cookies.d.ts +28 -0
  39. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  40. package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +255 -0
  41. package/node_modules/@types/form-data/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  42. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +149 -0
  43. package/node_modules/@types/form-data/node_modules/undici-types/eventsource.d.ts +61 -0
  44. package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +209 -0
  45. package/node_modules/@types/form-data/node_modules/undici-types/file.d.ts +39 -0
  46. package/node_modules/@types/form-data/node_modules/undici-types/filereader.d.ts +54 -0
  47. package/node_modules/@types/form-data/node_modules/undici-types/formdata.d.ts +108 -0
  48. package/node_modules/@types/form-data/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  49. package/node_modules/@types/form-data/node_modules/undici-types/global-origin.d.ts +7 -0
  50. package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +15 -0
  51. package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +4 -0
  52. package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +71 -0
  53. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +17 -0
  54. package/node_modules/@types/form-data/node_modules/undici-types/mock-agent.d.ts +50 -0
  55. package/node_modules/@types/form-data/node_modules/undici-types/mock-client.d.ts +25 -0
  56. package/node_modules/@types/form-data/node_modules/undici-types/mock-errors.d.ts +12 -0
  57. package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  58. package/node_modules/@types/form-data/node_modules/undici-types/mock-pool.d.ts +25 -0
  59. package/node_modules/@types/form-data/node_modules/undici-types/package.json +55 -0
  60. package/node_modules/@types/form-data/node_modules/undici-types/patch.d.ts +33 -0
  61. package/node_modules/@types/form-data/node_modules/undici-types/pool-stats.d.ts +19 -0
  62. package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +39 -0
  63. package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +28 -0
  64. package/node_modules/@types/form-data/node_modules/undici-types/readable.d.ts +60 -0
  65. package/node_modules/@types/form-data/node_modules/undici-types/retry-agent.d.ts +8 -0
  66. package/node_modules/@types/form-data/node_modules/undici-types/retry-handler.d.ts +116 -0
  67. package/node_modules/@types/form-data/node_modules/undici-types/util.d.ts +18 -0
  68. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +222 -0
  69. package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +150 -0
  70. package/package.json +1 -1
  71. package/node_modules/undici-types/patch.d.ts +0 -71
  72. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/LICENSE +0 -0
  73. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/README.md +0 -0
  74. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/agent.d.ts +0 -0
  75. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/api.d.ts +0 -0
  76. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/balanced-pool.d.ts +0 -0
  77. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cache.d.ts +0 -0
  78. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/client.d.ts +0 -0
  79. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/connector.d.ts +0 -0
  80. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/content-type.d.ts +0 -0
  81. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cookies.d.ts +0 -0
  82. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/diagnostics-channel.d.ts +0 -0
  83. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/dispatcher.d.ts +0 -0
  84. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/env-http-proxy-agent.d.ts +0 -0
  85. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/errors.d.ts +0 -0
  86. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/fetch.d.ts +0 -0
  87. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/file.d.ts +0 -0
  88. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/formdata.d.ts +0 -0
  89. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/global-dispatcher.d.ts +0 -0
  90. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/global-origin.d.ts +0 -0
  91. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/handlers.d.ts +0 -0
  92. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/header.d.ts +0 -0
  93. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/index.d.ts +0 -0
  94. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-agent.d.ts +0 -0
  95. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-client.d.ts +0 -0
  96. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-errors.d.ts +0 -0
  97. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-interceptor.d.ts +0 -0
  98. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-pool.d.ts +0 -0
  99. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool-stats.d.ts +0 -0
  100. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool.d.ts +0 -0
  101. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/proxy-agent.d.ts +0 -0
  102. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/readable.d.ts +0 -0
  103. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-agent.d.ts +0 -0
  104. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-handler.d.ts +0 -0
  105. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/util.d.ts +0 -0
  106. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/webidl.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.9.3",
3
+ "version": "22.10.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -217,9 +217,9 @@
217
217
  },
218
218
  "scripts": {},
219
219
  "dependencies": {
220
- "undici-types": "~6.19.8"
220
+ "undici-types": "~6.20.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "b6aac29bd05fd45bf1e413969174cab33920f03b086f10916dba01864e150462",
224
- "typeScriptVersion": "4.9"
223
+ "typesPublisherContentHash": "ce362bea3fcf1e354f4dc2b40d8779a88c8b89b200fed59ec53f508677acde75",
224
+ "typeScriptVersion": "5.0"
225
225
  }
@@ -168,6 +168,66 @@ declare module "process" {
168
168
  libUrl?: string | undefined;
169
169
  lts?: string | undefined;
170
170
  }
171
+ interface ProcessFeatures {
172
+ /**
173
+ * A boolean value that is `true` if the current Node.js build is caching builtin modules.
174
+ * @since v12.0.0
175
+ */
176
+ readonly cached_builtins: boolean;
177
+ /**
178
+ * A boolean value that is `true` if the current Node.js build is a debug build.
179
+ * @since v0.5.5
180
+ */
181
+ readonly debug: boolean;
182
+ /**
183
+ * A boolean value that is `true` if the current Node.js build includes the inspector.
184
+ * @since v11.10.0
185
+ */
186
+ readonly inspector: boolean;
187
+ /**
188
+ * A boolean value that is `true` if the current Node.js build includes support for IPv6.
189
+ * @since v0.5.3
190
+ */
191
+ readonly ipv6: boolean;
192
+ /**
193
+ * A boolean value that is `true` if the current Node.js build supports
194
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v22.x/api/modules.md#loading-ecmascript-modules-using-require).
195
+ * @since v22.10.0
196
+ */
197
+ readonly require_module: boolean;
198
+ /**
199
+ * A boolean value that is `true` if the current Node.js build includes support for TLS.
200
+ * @since v0.5.3
201
+ */
202
+ readonly tls: boolean;
203
+ /**
204
+ * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS.
205
+ * @since v4.8.0
206
+ */
207
+ readonly tls_alpn: boolean;
208
+ /**
209
+ * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS.
210
+ * @since v0.11.13
211
+ */
212
+ readonly tls_ocsp: boolean;
213
+ /**
214
+ * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS.
215
+ * @since v0.5.3
216
+ */
217
+ readonly tls_sni: boolean;
218
+ /**
219
+ * A value that is `"strip"` if Node.js is run with `--experimental-strip-types`,
220
+ * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` otherwise.
221
+ * @since v22.10.0
222
+ */
223
+ readonly typescript: "strip" | "transform" | false;
224
+ /**
225
+ * A boolean value that is `true` if the current Node.js build includes support for libuv.
226
+ * Since it's currently not possible to build Node.js without libuv, this value is always `true`.
227
+ * @since v0.5.3
228
+ */
229
+ readonly uv: boolean;
230
+ }
171
231
  interface ProcessVersions extends Dict<string> {
172
232
  http_parser: string;
173
233
  node: string;
@@ -1612,16 +1672,7 @@ declare module "process" {
1612
1672
  * @since v3.0.0
1613
1673
  */
1614
1674
  readonly release: ProcessRelease;
1615
- features: {
1616
- inspector: boolean;
1617
- debug: boolean;
1618
- uv: boolean;
1619
- ipv6: boolean;
1620
- tls_alpn: boolean;
1621
- tls_sni: boolean;
1622
- tls_ocsp: boolean;
1623
- tls: boolean;
1624
- };
1675
+ readonly features: ProcessFeatures;
1625
1676
  /**
1626
1677
  * `process.umask()` returns the Node.js process's file mode creation mask. Child
1627
1678
  * processes inherit the mask from the parent process.
@@ -365,6 +365,20 @@ declare module "node:test" {
365
365
  * @default undefined
366
366
  */
367
367
  setup?: ((reporter: TestsStream) => void | Promise<void>) | undefined;
368
+ /**
369
+ * An array of CLI flags to pass to the `node` executable when
370
+ * spawning the subprocesses. This option has no effect when `isolation` is `'none`'.
371
+ * @since v22.10.0
372
+ * @default []
373
+ */
374
+ execArgv?: readonly string[] | undefined;
375
+ /**
376
+ * An array of CLI flags to pass to each test file when spawning the
377
+ * subprocesses. This option has no effect when `isolation` is `'none'`.
378
+ * @since v22.10.0
379
+ * @default []
380
+ */
381
+ argv?: readonly string[] | undefined;
368
382
  /**
369
383
  * Allows aborting an in-progress test execution.
370
384
  */
@@ -400,6 +414,53 @@ declare module "node:test" {
400
414
  * @default undefined
401
415
  */
402
416
  shard?: TestShard | undefined;
417
+ /**
418
+ * enable [code coverage](https://nodejs.org/docs/latest-v22.x/api/test.html#collecting-code-coverage) collection.
419
+ * @since v22.10.0
420
+ * @default false
421
+ */
422
+ coverage?: boolean | undefined;
423
+ /**
424
+ * Excludes specific files from code coverage
425
+ * using a glob pattern, which can match both absolute and relative file paths.
426
+ * This property is only applicable when `coverage` was set to `true`.
427
+ * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided,
428
+ * files must meet **both** criteria to be included in the coverage report.
429
+ * @since v22.10.0
430
+ * @default undefined
431
+ */
432
+ coverageExcludeGlobs?: string | readonly string[] | undefined;
433
+ /**
434
+ * Includes specific files in code coverage
435
+ * using a glob pattern, which can match both absolute and relative file paths.
436
+ * This property is only applicable when `coverage` was set to `true`.
437
+ * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided,
438
+ * files must meet **both** criteria to be included in the coverage report.
439
+ * @since v22.10.0
440
+ * @default undefined
441
+ */
442
+ coverageIncludeGlobs?: string | readonly string[] | undefined;
443
+ /**
444
+ * Require a minimum percent of covered lines. If code
445
+ * coverage does not reach the threshold specified, the process will exit with code `1`.
446
+ * @since v22.10.0
447
+ * @default 0
448
+ */
449
+ lineCoverage?: number | undefined;
450
+ /**
451
+ * Require a minimum percent of covered branches. If code
452
+ * coverage does not reach the threshold specified, the process will exit with code `1`.
453
+ * @since v22.10.0
454
+ * @default 0
455
+ */
456
+ branchCoverage?: number | undefined;
457
+ /**
458
+ * Require a minimum percent of covered functions. If code
459
+ * coverage does not reach the threshold specified, the process will exit with code `1`.
460
+ * @since v22.10.0
461
+ * @default 0
462
+ */
463
+ functionCoverage?: number | undefined;
403
464
  }
404
465
  /**
405
466
  * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.
@@ -419,6 +480,7 @@ declare module "node:test" {
419
480
  addListener(event: "test:start", listener: (data: TestStart) => void): this;
420
481
  addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
421
482
  addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
483
+ addListener(event: "test:summary", listener: (data: TestSummary) => void): this;
422
484
  addListener(event: "test:watch:drained", listener: () => void): this;
423
485
  addListener(event: string, listener: (...args: any[]) => void): this;
424
486
  emit(event: "test:coverage", data: TestCoverage): boolean;
@@ -432,6 +494,7 @@ declare module "node:test" {
432
494
  emit(event: "test:start", data: TestStart): boolean;
433
495
  emit(event: "test:stderr", data: TestStderr): boolean;
434
496
  emit(event: "test:stdout", data: TestStdout): boolean;
497
+ emit(event: "test:summary", data: TestSummary): boolean;
435
498
  emit(event: "test:watch:drained"): boolean;
436
499
  emit(event: string | symbol, ...args: any[]): boolean;
437
500
  on(event: "test:coverage", listener: (data: TestCoverage) => void): this;
@@ -445,6 +508,7 @@ declare module "node:test" {
445
508
  on(event: "test:start", listener: (data: TestStart) => void): this;
446
509
  on(event: "test:stderr", listener: (data: TestStderr) => void): this;
447
510
  on(event: "test:stdout", listener: (data: TestStdout) => void): this;
511
+ on(event: "test:summary", listener: (data: TestSummary) => void): this;
448
512
  on(event: "test:watch:drained", listener: () => void): this;
449
513
  on(event: string, listener: (...args: any[]) => void): this;
450
514
  once(event: "test:coverage", listener: (data: TestCoverage) => void): this;
@@ -458,6 +522,7 @@ declare module "node:test" {
458
522
  once(event: "test:start", listener: (data: TestStart) => void): this;
459
523
  once(event: "test:stderr", listener: (data: TestStderr) => void): this;
460
524
  once(event: "test:stdout", listener: (data: TestStdout) => void): this;
525
+ once(event: "test:summary", listener: (data: TestSummary) => void): this;
461
526
  once(event: "test:watch:drained", listener: () => void): this;
462
527
  once(event: string, listener: (...args: any[]) => void): this;
463
528
  prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
@@ -471,6 +536,7 @@ declare module "node:test" {
471
536
  prependListener(event: "test:start", listener: (data: TestStart) => void): this;
472
537
  prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
473
538
  prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
539
+ prependListener(event: "test:summary", listener: (data: TestSummary) => void): this;
474
540
  prependListener(event: "test:watch:drained", listener: () => void): this;
475
541
  prependListener(event: string, listener: (...args: any[]) => void): this;
476
542
  prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
@@ -484,6 +550,7 @@ declare module "node:test" {
484
550
  prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this;
485
551
  prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
486
552
  prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
553
+ prependOnceListener(event: "test:summary", listener: (data: TestSummary) => void): this;
487
554
  prependOnceListener(event: "test:watch:drained", listener: () => void): this;
488
555
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
489
556
  }
@@ -2047,6 +2114,57 @@ interface TestStdout {
2047
2114
  */
2048
2115
  message: string;
2049
2116
  }
2117
+ interface TestSummary {
2118
+ /**
2119
+ * An object containing the counts of various test results.
2120
+ */
2121
+ counts: {
2122
+ /**
2123
+ * The total number of cancelled tests.
2124
+ */
2125
+ cancelled: number;
2126
+ /**
2127
+ * The total number of passed tests.
2128
+ */
2129
+ passed: number;
2130
+ /**
2131
+ * The total number of skipped tests.
2132
+ */
2133
+ skipped: number;
2134
+ /**
2135
+ * The total number of suites run.
2136
+ */
2137
+ suites: number;
2138
+ /**
2139
+ * The total number of tests run, excluding suites.
2140
+ */
2141
+ tests: number;
2142
+ /**
2143
+ * The total number of TODO tests.
2144
+ */
2145
+ todo: number;
2146
+ /**
2147
+ * The total number of top level tests and suites.
2148
+ */
2149
+ topLevel: number;
2150
+ };
2151
+ /**
2152
+ * The duration of the test run in milliseconds.
2153
+ */
2154
+ duration_ms: number;
2155
+ /**
2156
+ * The path of the test file that generated the
2157
+ * summary. If the summary corresponds to multiple files, this value is
2158
+ * `undefined`.
2159
+ */
2160
+ file: string | undefined;
2161
+ /**
2162
+ * Indicates whether or not the test run is considered
2163
+ * successful or not. If any error condition occurs, such as a failing test or
2164
+ * unmet coverage threshold, this value will be set to `false`.
2165
+ */
2166
+ success: boolean;
2167
+ }
2050
2168
 
2051
2169
  /**
2052
2170
  * The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
@@ -2080,6 +2198,7 @@ declare module "node:test/reporters" {
2080
2198
  | { type: "test:start"; data: TestStart }
2081
2199
  | { type: "test:stderr"; data: TestStderr }
2082
2200
  | { type: "test:stdout"; data: TestStdout }
2201
+ | { type: "test:summary"; data: TestSummary }
2083
2202
  | { type: "test:watch:drained"; data: undefined };
2084
2203
  type TestEventGenerator = AsyncGenerator<TestEvent, void>;
2085
2204
 
@@ -594,6 +594,39 @@ declare module "worker_threads" {
594
594
  * @since v14.5.0, v12.19.0
595
595
  */
596
596
  function markAsUntransferable(object: object): void;
597
+ /**
598
+ * Check if an object is marked as not transferable with
599
+ * {@link markAsUntransferable}.
600
+ * @since v21.0.0
601
+ */
602
+ function isMarkedAsUntransferable(object: object): boolean;
603
+ /**
604
+ * Mark an object as not cloneable. If `object` is used as `message` in
605
+ * a `port.postMessage()` call, an error is thrown. This is a no-op if `object` is a
606
+ * primitive value.
607
+ *
608
+ * This has no effect on `ArrayBuffer`, or any `Buffer` like objects.
609
+ *
610
+ * This operation cannot be undone.
611
+ *
612
+ * ```js
613
+ * const { markAsUncloneable } = require('node:worker_threads');
614
+ *
615
+ * const anyObject = { foo: 'bar' };
616
+ * markAsUncloneable(anyObject);
617
+ * const { port1 } = new MessageChannel();
618
+ * try {
619
+ * // This will throw an error, because anyObject is not cloneable.
620
+ * port1.postMessage(anyObject)
621
+ * } catch (error) {
622
+ * // error.name === 'DataCloneError'
623
+ * }
624
+ * ```
625
+ *
626
+ * There is no equivalent to this API in browsers.
627
+ * @since v22.10.0
628
+ */
629
+ function markAsUncloneable(object: object): void;
597
630
  /**
598
631
  * Transfer a `MessagePort` to a different `vm` Context. The original `port` object is rendered unusable, and the returned `MessagePort` instance
599
632
  * takes its place.
@@ -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.
@@ -0,0 +1,6 @@
1
+ # undici-types
2
+
3
+ This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
4
+
5
+ - [GitHub nodejs/undici](https://github.com/nodejs/undici)
6
+ - [Undici Documentation](https://undici.nodejs.org/#/)
@@ -0,0 +1,31 @@
1
+ import { URL } from 'url'
2
+ import Pool from './pool'
3
+ import Dispatcher from "./dispatcher";
4
+
5
+ export default Agent
6
+
7
+ declare class Agent extends Dispatcher{
8
+ constructor(opts?: Agent.Options)
9
+ /** `true` after `dispatcher.close()` has been called. */
10
+ closed: boolean;
11
+ /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12
+ destroyed: boolean;
13
+ /** Dispatches a request. */
14
+ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
15
+ }
16
+
17
+ declare namespace Agent {
18
+ export interface Options extends Pool.Options {
19
+ /** Default: `(origin, opts) => new Pool(origin, opts)`. */
20
+ factory?(origin: string | URL, opts: Object): Dispatcher;
21
+ /** Integer. Default: `0` */
22
+ maxRedirections?: number;
23
+
24
+ interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
25
+ }
26
+
27
+ export interface DispatchOptions extends Dispatcher.DispatchOptions {
28
+ /** Integer. */
29
+ maxRedirections?: number;
30
+ }
31
+ }
@@ -0,0 +1,43 @@
1
+ import { URL, UrlObject } from 'url'
2
+ import { Duplex } from 'stream'
3
+ import Dispatcher from './dispatcher'
4
+
5
+ export {
6
+ request,
7
+ stream,
8
+ pipeline,
9
+ connect,
10
+ upgrade,
11
+ }
12
+
13
+ /** Performs an HTTP request. */
14
+ declare function request(
15
+ url: string | URL | UrlObject,
16
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
17
+ ): Promise<Dispatcher.ResponseData>;
18
+
19
+ /** A faster version of `request`. */
20
+ declare function stream(
21
+ url: string | URL | UrlObject,
22
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
23
+ factory: Dispatcher.StreamFactory
24
+ ): Promise<Dispatcher.StreamData>;
25
+
26
+ /** For easy use with `stream.pipeline`. */
27
+ declare function pipeline(
28
+ url: string | URL | UrlObject,
29
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
30
+ handler: Dispatcher.PipelineHandler
31
+ ): Duplex;
32
+
33
+ /** Starts two-way communications with the requested resource. */
34
+ declare function connect(
35
+ url: string | URL | UrlObject,
36
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
37
+ ): Promise<Dispatcher.ConnectData>;
38
+
39
+ /** Upgrade to a different protocol. */
40
+ declare function upgrade(
41
+ url: string | URL | UrlObject,
42
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
43
+ ): Promise<Dispatcher.UpgradeData>;
@@ -0,0 +1,29 @@
1
+ import Pool from './pool'
2
+ import Dispatcher from './dispatcher'
3
+ import { URL } from 'url'
4
+
5
+ export default BalancedPool
6
+
7
+ type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
8
+
9
+ declare class BalancedPool extends Dispatcher {
10
+ constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
11
+
12
+ addUpstream(upstream: string | URL): BalancedPool;
13
+ removeUpstream(upstream: string | URL): BalancedPool;
14
+ upstreams: Array<string>;
15
+
16
+ /** `true` after `pool.close()` has been called. */
17
+ closed: boolean;
18
+ /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
19
+ destroyed: boolean;
20
+
21
+ // Override dispatcher APIs.
22
+ override connect(
23
+ options: BalancedPoolConnectOptions
24
+ ): Promise<Dispatcher.ConnectData>;
25
+ override connect(
26
+ options: BalancedPoolConnectOptions,
27
+ callback: (err: Error | null, data: Dispatcher.ConnectData) => void
28
+ ): void;
29
+ }
@@ -0,0 +1,36 @@
1
+ import type { RequestInfo, Response, Request } from './fetch'
2
+
3
+ export interface CacheStorage {
4
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
5
+ has (cacheName: string): Promise<boolean>,
6
+ open (cacheName: string): Promise<Cache>,
7
+ delete (cacheName: string): Promise<boolean>,
8
+ keys (): Promise<string[]>
9
+ }
10
+
11
+ declare const CacheStorage: {
12
+ prototype: CacheStorage
13
+ new(): CacheStorage
14
+ }
15
+
16
+ export interface Cache {
17
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
18
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
19
+ add (request: RequestInfo): Promise<undefined>,
20
+ addAll (requests: RequestInfo[]): Promise<undefined>,
21
+ put (request: RequestInfo, response: Response): Promise<undefined>,
22
+ delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
23
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
24
+ }
25
+
26
+ export interface CacheQueryOptions {
27
+ ignoreSearch?: boolean,
28
+ ignoreMethod?: boolean,
29
+ ignoreVary?: boolean
30
+ }
31
+
32
+ export interface MultiCacheQueryOptions extends CacheQueryOptions {
33
+ cacheName?: string
34
+ }
35
+
36
+ export declare const caches: CacheStorage
@@ -0,0 +1,108 @@
1
+ import { URL } from 'url'
2
+ import { TlsOptions } from 'tls'
3
+ import Dispatcher from './dispatcher'
4
+ import buildConnector from "./connector";
5
+
6
+ type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
7
+
8
+ /**
9
+ * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
10
+ */
11
+ export class Client extends Dispatcher {
12
+ constructor(url: string | URL, options?: Client.Options);
13
+ /** Property to get and set the pipelining factor. */
14
+ pipelining: number;
15
+ /** `true` after `client.close()` has been called. */
16
+ closed: boolean;
17
+ /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
18
+ destroyed: boolean;
19
+
20
+ // Override dispatcher APIs.
21
+ override connect(
22
+ options: ClientConnectOptions
23
+ ): Promise<Dispatcher.ConnectData>;
24
+ override connect(
25
+ options: ClientConnectOptions,
26
+ callback: (err: Error | null, data: Dispatcher.ConnectData) => void
27
+ ): void;
28
+ }
29
+
30
+ export declare namespace Client {
31
+ export interface OptionsInterceptors {
32
+ Client: readonly Dispatcher.DispatchInterceptor[];
33
+ }
34
+ export interface Options {
35
+ /** TODO */
36
+ interceptors?: OptionsInterceptors;
37
+ /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
38
+ maxHeaderSize?: number;
39
+ /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
40
+ headersTimeout?: number;
41
+ /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
42
+ socketTimeout?: never;
43
+ /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
44
+ requestTimeout?: never;
45
+ /** TODO */
46
+ connectTimeout?: number;
47
+ /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
48
+ bodyTimeout?: number;
49
+ /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
50
+ idleTimeout?: never;
51
+ /** @deprecated unsupported keepAlive, use pipelining=0 instead */
52
+ keepAlive?: never;
53
+ /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
54
+ keepAliveTimeout?: number;
55
+ /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
56
+ maxKeepAliveTimeout?: never;
57
+ /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
58
+ keepAliveMaxTimeout?: number;
59
+ /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
60
+ keepAliveTimeoutThreshold?: number;
61
+ /** TODO */
62
+ socketPath?: string;
63
+ /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
64
+ pipelining?: number;
65
+ /** @deprecated use the connect option instead */
66
+ tls?: never;
67
+ /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
68
+ strictContentLength?: boolean;
69
+ /** TODO */
70
+ maxCachedSessions?: number;
71
+ /** TODO */
72
+ maxRedirections?: number;
73
+ /** TODO */
74
+ connect?: buildConnector.BuildOptions | buildConnector.connector;
75
+ /** TODO */
76
+ maxRequestsPerClient?: number;
77
+ /** TODO */
78
+ localAddress?: string;
79
+ /** Max response body size in bytes, -1 is disabled */
80
+ maxResponseSize?: number;
81
+ /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
82
+ autoSelectFamily?: boolean;
83
+ /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
84
+ autoSelectFamilyAttemptTimeout?: number;
85
+ /**
86
+ * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
87
+ * @default false
88
+ */
89
+ allowH2?: boolean;
90
+ /**
91
+ * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
92
+ * @default 100
93
+ */
94
+ maxConcurrentStreams?: number
95
+ }
96
+ export interface SocketInfo {
97
+ localAddress?: string
98
+ localPort?: number
99
+ remoteAddress?: string
100
+ remotePort?: number
101
+ remoteFamily?: string
102
+ timeout?: number
103
+ bytesWritten?: number
104
+ bytesRead?: number
105
+ }
106
+ }
107
+
108
+ export default Client;
@@ -0,0 +1,34 @@
1
+ import { TLSSocket, ConnectionOptions } from 'tls'
2
+ import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net'
3
+
4
+ export default buildConnector
5
+ declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector
6
+
7
+ declare namespace buildConnector {
8
+ export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
9
+ allowH2?: boolean;
10
+ maxCachedSessions?: number | null;
11
+ socketPath?: string | null;
12
+ timeout?: number | null;
13
+ port?: number;
14
+ keepAlive?: boolean | null;
15
+ keepAliveInitialDelay?: number | null;
16
+ }
17
+
18
+ export interface Options {
19
+ hostname: string
20
+ host?: string
21
+ protocol: string
22
+ port: string
23
+ servername?: string
24
+ localAddress?: string | null
25
+ httpSocket?: Socket
26
+ }
27
+
28
+ export type Callback = (...args: CallbackArgs) => void
29
+ type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
30
+
31
+ export interface connector {
32
+ (options: buildConnector.Options, callback: buildConnector.Callback): void
33
+ }
34
+ }
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+
3
+ interface MIMEType {
4
+ type: string
5
+ subtype: string
6
+ parameters: Map<string, string>
7
+ essence: string
8
+ }
9
+
10
+ /**
11
+ * Parse a string to a {@link MIMEType} object. Returns `failure` if the string
12
+ * couldn't be parsed.
13
+ * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
14
+ */
15
+ export function parseMIMEType (input: string): 'failure' | MIMEType
16
+
17
+ /**
18
+ * Convert a MIMEType object to a string.
19
+ * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
20
+ */
21
+ export function serializeAMimeType (mimeType: MIMEType): string