cdk-common 2.0.1201 → 2.0.1203

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 (217) hide show
  1. package/.jsii +3 -3
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +5 -5
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +26 -6
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +1 -2
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +2 -2
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +15 -15
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +17 -17
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +35 -28
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +1 -1
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +16 -16
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +1 -1
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +1 -2
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +16 -9
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +28 -19
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +7 -6
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +1 -0
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +2 -2
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +6 -3
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +1 -1
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +7 -5
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +3 -7
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +63 -29
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +2 -5
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +8 -7
  28. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +13 -3
  29. package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +1 -1
  30. package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +8 -8
  31. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +21 -11
  32. package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +1 -1
  33. package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +1 -1
  34. package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -1
  35. package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +13 -13
  36. package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +14 -16
  37. package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
  38. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +182 -2
  39. package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +8 -19
  40. package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +1 -1
  41. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +53 -15
  42. package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +1 -1
  43. package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +1 -1
  44. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +2 -48
  45. package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +6 -6
  46. package/node_modules/@types/concat-stream/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
  47. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.1/index.d.ts +98 -0
  48. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  49. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
  50. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +9 -5
  51. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  52. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +96 -0
  53. package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +1 -1
  54. package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +52 -19
  55. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +16 -295
  56. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +29 -32
  57. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +17 -10
  58. package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
  59. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +34 -18
  60. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +5 -7
  61. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/agent.d.ts +7 -7
  62. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/api.d.ts +24 -24
  63. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/balanced-pool.d.ts +11 -11
  64. package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  65. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/client.d.ts +12 -13
  66. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cookies.d.ts +2 -0
  67. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/diagnostics-channel.d.ts +10 -10
  68. package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +281 -0
  69. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/env-http-proxy-agent.d.ts +2 -2
  70. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/errors.d.ts +69 -47
  71. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/fetch.d.ts +17 -16
  72. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/formdata.d.ts +7 -7
  73. package/node_modules/@types/concat-stream/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  74. package/node_modules/@types/concat-stream/node_modules/undici-types/global-origin.d.ts +7 -0
  75. package/node_modules/@types/concat-stream/node_modules/undici-types/h2c-client.d.ts +75 -0
  76. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/handlers.d.ts +7 -7
  77. package/node_modules/@types/concat-stream/node_modules/undici-types/header.d.ts +160 -0
  78. package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +75 -0
  79. package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +34 -0
  80. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-agent.d.ts +33 -18
  81. package/node_modules/@types/concat-stream/node_modules/undici-types/mock-call-history.d.ts +111 -0
  82. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-client.d.ts +4 -4
  83. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-errors.d.ts +3 -3
  84. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-interceptor.d.ts +19 -19
  85. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-pool.d.ts +4 -4
  86. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/package.json +1 -1
  87. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/patch.d.ts +0 -4
  88. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool-stats.d.ts +8 -8
  89. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool.d.ts +12 -12
  90. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/proxy-agent.d.ts +4 -4
  91. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/readable.d.ts +18 -15
  92. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-agent.d.ts +1 -1
  93. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-handler.d.ts +10 -10
  94. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/util.d.ts +3 -3
  95. package/node_modules/@types/concat-stream/node_modules/undici-types/utility.d.ts +7 -0
  96. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/webidl.d.ts +44 -6
  97. package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/websocket.d.ts +35 -1
  98. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  99. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +5 -5
  100. package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +26 -6
  101. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +1 -2
  102. package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +2 -2
  103. package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +15 -15
  104. package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +17 -17
  105. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +35 -28
  106. package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +1 -1
  107. package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  108. package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +16 -16
  109. package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +1 -1
  110. package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +1 -2
  111. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +16 -9
  112. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +28 -19
  113. package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +7 -6
  114. package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +1 -0
  115. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +2 -2
  116. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +6 -3
  117. package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +1 -1
  118. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +7 -5
  119. package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +3 -7
  120. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +63 -29
  121. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +2 -5
  122. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +8 -7
  123. package/node_modules/@types/form-data/node_modules/@types/node/package.json +13 -3
  124. package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +1 -1
  125. package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +8 -8
  126. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +21 -11
  127. package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +1 -1
  128. package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +1 -1
  129. package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -1
  130. package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +13 -13
  131. package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +14 -16
  132. package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
  133. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +182 -2
  134. package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +8 -19
  135. package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +1 -1
  136. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +53 -15
  137. package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +1 -1
  138. package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +1 -1
  139. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +2 -48
  140. package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +6 -6
  141. package/node_modules/@types/form-data/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
  142. package/node_modules/@types/form-data/node_modules/@types/node/ts5.1/index.d.ts +98 -0
  143. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  144. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
  145. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +9 -5
  146. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  147. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +96 -0
  148. package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +1 -1
  149. package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +52 -19
  150. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +16 -295
  151. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +29 -32
  152. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +17 -10
  153. package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
  154. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +34 -18
  155. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +5 -7
  156. package/node_modules/@types/form-data/node_modules/undici-types/LICENSE +21 -0
  157. package/node_modules/@types/form-data/node_modules/undici-types/README.md +6 -0
  158. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +31 -0
  159. package/node_modules/@types/form-data/node_modules/undici-types/api.d.ts +43 -0
  160. package/node_modules/@types/form-data/node_modules/undici-types/balanced-pool.d.ts +29 -0
  161. package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  162. package/node_modules/@types/form-data/node_modules/undici-types/cache.d.ts +36 -0
  163. package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +107 -0
  164. package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +34 -0
  165. package/node_modules/@types/form-data/node_modules/undici-types/content-type.d.ts +21 -0
  166. package/node_modules/@types/form-data/node_modules/undici-types/cookies.d.ts +30 -0
  167. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  168. package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +281 -0
  169. package/node_modules/@types/form-data/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  170. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +171 -0
  171. package/node_modules/@types/form-data/node_modules/undici-types/eventsource.d.ts +61 -0
  172. package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +210 -0
  173. package/node_modules/@types/form-data/node_modules/undici-types/formdata.d.ts +108 -0
  174. package/node_modules/@types/form-data/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  175. package/node_modules/@types/form-data/node_modules/undici-types/global-origin.d.ts +7 -0
  176. package/node_modules/@types/form-data/node_modules/undici-types/h2c-client.d.ts +75 -0
  177. package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +15 -0
  178. package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +160 -0
  179. package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +75 -0
  180. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +34 -0
  181. package/node_modules/@types/form-data/node_modules/undici-types/mock-agent.d.ts +65 -0
  182. package/node_modules/@types/form-data/node_modules/undici-types/mock-call-history.d.ts +111 -0
  183. package/node_modules/@types/form-data/node_modules/undici-types/mock-client.d.ts +25 -0
  184. package/node_modules/@types/form-data/node_modules/undici-types/mock-errors.d.ts +12 -0
  185. package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  186. package/node_modules/@types/form-data/node_modules/undici-types/mock-pool.d.ts +25 -0
  187. package/node_modules/@types/form-data/node_modules/undici-types/package.json +55 -0
  188. package/node_modules/@types/form-data/node_modules/undici-types/patch.d.ts +29 -0
  189. package/node_modules/@types/form-data/node_modules/undici-types/pool-stats.d.ts +19 -0
  190. package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +39 -0
  191. package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +28 -0
  192. package/node_modules/@types/form-data/node_modules/undici-types/readable.d.ts +68 -0
  193. package/node_modules/@types/form-data/node_modules/undici-types/retry-agent.d.ts +8 -0
  194. package/node_modules/@types/form-data/node_modules/undici-types/retry-handler.d.ts +116 -0
  195. package/node_modules/@types/form-data/node_modules/undici-types/util.d.ts +18 -0
  196. package/node_modules/@types/form-data/node_modules/undici-types/utility.d.ts +7 -0
  197. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +266 -0
  198. package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +184 -0
  199. package/package.json +2 -2
  200. package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/index.d.ts +0 -9
  201. package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  202. package/node_modules/@types/form-data/node_modules/@types/node/compatibility/index.d.ts +0 -9
  203. package/node_modules/@types/form-data/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  204. package/node_modules/undici-types/dispatcher.d.ts +0 -256
  205. package/node_modules/undici-types/file.d.ts +0 -39
  206. package/node_modules/undici-types/filereader.d.ts +0 -54
  207. package/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  208. package/node_modules/undici-types/global-origin.d.ts +0 -7
  209. package/node_modules/undici-types/header.d.ts +0 -4
  210. package/node_modules/undici-types/index.d.ts +0 -71
  211. package/node_modules/undici-types/interceptors.d.ts +0 -17
  212. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/LICENSE +0 -0
  213. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/README.md +0 -0
  214. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cache.d.ts +0 -0
  215. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/connector.d.ts +0 -0
  216. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/content-type.d.ts +0 -0
  217. /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/eventsource.d.ts +0 -0
@@ -34,7 +34,7 @@
34
34
  *
35
35
  * console.log(x); // 1; y is not defined.
36
36
  * ```
37
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/vm.js)
37
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/vm.js)
38
38
  */
39
39
  declare module "vm" {
40
40
  import { ImportAttributes } from "node:module";
@@ -60,6 +60,7 @@ declare module "vm" {
60
60
  specifier: string,
61
61
  referrer: T,
62
62
  importAttributes: ImportAttributes,
63
+ phase: "source" | "evaluation",
63
64
  ) => Module | Promise<Module>;
64
65
  interface ScriptOptions extends BaseOptions {
65
66
  /**
@@ -71,7 +72,8 @@ declare module "vm" {
71
72
  /**
72
73
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
73
74
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
74
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
75
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
76
+ * @experimental
75
77
  */
76
78
  importModuleDynamically?:
77
79
  | DynamicModuleLoader<Script>
@@ -122,7 +124,8 @@ declare module "vm" {
122
124
  /**
123
125
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
124
126
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
125
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
127
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
128
+ * @experimental
126
129
  */
127
130
  importModuleDynamically?:
128
131
  | DynamicModuleLoader<Script>
@@ -137,7 +140,8 @@ declare module "vm" {
137
140
  /**
138
141
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
139
142
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
140
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
143
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
144
+ * @experimental
141
145
  */
142
146
  importModuleDynamically?:
143
147
  | DynamicModuleLoader<Script>
@@ -165,7 +169,8 @@ declare module "vm" {
165
169
  /**
166
170
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
167
171
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
168
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
172
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
173
+ * @experimental
169
174
  */
170
175
  importModuleDynamically?:
171
176
  | DynamicModuleLoader<ReturnType<typeof compileFunction>>
@@ -208,7 +213,8 @@ declare module "vm" {
208
213
  /**
209
214
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
210
215
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
211
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
216
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
217
+ * @experimental
212
218
  */
213
219
  importModuleDynamically?:
214
220
  | DynamicModuleLoader<Context>
@@ -410,9 +416,9 @@ declare module "vm" {
410
416
  }
411
417
  /**
412
418
  * If the given `contextObject` is an object, the `vm.createContext()` method will
413
- * [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
419
+ * [prepare that object](https://nodejs.org/docs/latest-v24.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
414
420
  * and return a reference to it so that it can be used in calls to {@link runInContext} or
415
- * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
421
+ * [`script.runInContext()`](https://nodejs.org/docs/latest-v24.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
416
422
  * Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
417
423
  * existing properties but also having the built-in objects and functions any standard
418
424
  * [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
@@ -907,7 +913,8 @@ declare module "vm" {
907
913
  /**
908
914
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
909
915
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
910
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
916
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
917
+ * @experimental
911
918
  */
912
919
  importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
913
920
  }
@@ -1005,7 +1012,7 @@ declare module "vm" {
1005
1012
  * and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
1006
1013
  * context to load the requested module.
1007
1014
  *
1008
- * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
1015
+ * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
1009
1016
  * @since v21.7.0, v20.12.0
1010
1017
  */
1011
1018
  const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
@@ -67,7 +67,7 @@
67
67
  * wat2wasm demo.wat
68
68
  * ```
69
69
  * @experimental
70
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/wasi.js)
70
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/wasi.js)
71
71
  */
72
72
  declare module "wasi" {
73
73
  interface WASIOptions {
@@ -15,28 +15,31 @@
15
15
  *
16
16
  * ```js
17
17
  * import {
18
- * Worker, isMainThread, parentPort, workerData,
18
+ * Worker,
19
+ * isMainThread,
20
+ * parentPort,
21
+ * workerData,
19
22
  * } from 'node:worker_threads';
20
- * import { parse } from 'some-js-parsing-library';
21
23
  *
22
- * if (isMainThread) {
23
- * module.exports = function parseJSAsync(script) {
24
- * return new Promise((resolve, reject) => {
25
- * const worker = new Worker(__filename, {
26
- * workerData: script,
27
- * });
28
- * worker.on('message', resolve);
29
- * worker.on('error', reject);
30
- * worker.on('exit', (code) => {
31
- * if (code !== 0)
32
- * reject(new Error(`Worker stopped with exit code ${code}`));
33
- * });
34
- * });
35
- * };
36
- * } else {
24
+ * if (!isMainThread) {
25
+ * const { parse } = await import('some-js-parsing-library');
37
26
  * const script = workerData;
38
27
  * parentPort.postMessage(parse(script));
39
28
  * }
29
+ *
30
+ * export default function parseJSAsync(script) {
31
+ * return new Promise((resolve, reject) => {
32
+ * const worker = new Worker(new URL(import.meta.url), {
33
+ * workerData: script,
34
+ * });
35
+ * worker.on('message', resolve);
36
+ * worker.on('error', reject);
37
+ * worker.on('exit', (code) => {
38
+ * if (code !== 0)
39
+ * reject(new Error(`Worker stopped with exit code ${code}`));
40
+ * });
41
+ * });
42
+ * };
40
43
  * ```
41
44
  *
42
45
  * The above example spawns a Worker thread for each `parseJSAsync()` call. In
@@ -49,7 +52,7 @@
49
52
  *
50
53
  * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
51
54
  * specifically `argv` and `execArgv` options.
52
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/worker_threads.js)
55
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/worker_threads.js)
53
56
  */
54
57
  declare module "worker_threads" {
55
58
  import { Context } from "node:vm";
@@ -59,6 +62,7 @@ declare module "worker_threads" {
59
62
  import { Readable, Writable } from "node:stream";
60
63
  import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
61
64
  import { URL } from "node:url";
65
+ import { HeapInfo } from "node:v8";
62
66
  const isInternalThread: boolean;
63
67
  const isMainThread: boolean;
64
68
  const parentPort: null | MessagePort;
@@ -184,6 +188,11 @@ declare module "worker_threads" {
184
188
  * @since v10.5.0
185
189
  */
186
190
  postMessage(value: any, transferList?: readonly Transferable[]): void;
191
+ /**
192
+ * If true, the `MessagePort` object will keep the Node.js event loop active.
193
+ * @since v18.1.0, v16.17.0
194
+ */
195
+ hasRef(): boolean;
187
196
  /**
188
197
  * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
189
198
  * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
@@ -466,6 +475,13 @@ declare module "worker_threads" {
466
475
  * @return A promise for a Readable Stream containing a V8 heap snapshot
467
476
  */
468
477
  getHeapSnapshot(): Promise<Readable>;
478
+ /**
479
+ * This method returns a `Promise` that will resolve to an object identical to `v8.getHeapStatistics()`,
480
+ * or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running.
481
+ * This methods allows the statistics to be observed from outside the actual thread.
482
+ * @since v24.0.0
483
+ */
484
+ getHeapStatistics(): Promise<HeapInfo>;
469
485
  addListener(event: "error", listener: (err: Error) => void): this;
470
486
  addListener(event: "exit", listener: (exitCode: number) => void): this;
471
487
  addListener(event: "message", listener: (value: any) => void): this;
@@ -9,7 +9,7 @@
9
9
  * ```
10
10
  *
11
11
  * Compression and decompression are built around the Node.js
12
- * [Streams API](https://nodejs.org/docs/latest-v22.x/api/stream.html).
12
+ * [Streams API](https://nodejs.org/docs/latest-v24.x/api/stream.html).
13
13
  *
14
14
  * Compressing or decompressing a stream (such as a file) can be accomplished by
15
15
  * piping the source stream through a `zlib` `Transform` stream into a destination
@@ -89,7 +89,7 @@
89
89
  * });
90
90
  * ```
91
91
  * @since v0.5.8
92
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
92
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
93
93
  */
94
94
  declare module "zlib" {
95
95
  import * as stream from "node:stream";
@@ -143,7 +143,7 @@ declare module "zlib" {
143
143
  }
144
144
  | undefined;
145
145
  /**
146
- * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
146
+ * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
147
147
  * @default buffer.kMaxLength
148
148
  */
149
149
  maxOutputLength?: number | undefined;
@@ -163,19 +163,17 @@ declare module "zlib" {
163
163
  chunkSize?: number | undefined;
164
164
  /**
165
165
  * Key-value object containing indexed
166
- * [Zstd parameters](https://nodejs.org/docs/latest-v22.x/api/zlib.html#zstd-constants).
166
+ * [Zstd parameters](https://nodejs.org/docs/latest-v24.x/api/zlib.html#zstd-constants).
167
167
  */
168
168
  params?: { [key: number]: number | boolean } | undefined;
169
169
  /**
170
170
  * Limits output size when using
171
- * [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
171
+ * [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
172
172
  * @default buffer.kMaxLength
173
173
  */
174
174
  maxOutputLength?: number | undefined;
175
175
  }
176
176
  interface Zlib {
177
- /** @deprecated Use bytesWritten instead. */
178
- readonly bytesRead: number;
179
177
  readonly bytesWritten: number;
180
178
  shell?: boolean | string | undefined;
181
179
  close(callback?: () => void): void;
@@ -1,17 +1,17 @@
1
1
  import { URL } from 'url'
2
2
  import Pool from './pool'
3
- import Dispatcher from "./dispatcher";
3
+ import Dispatcher from './dispatcher'
4
4
 
5
5
  export default Agent
6
6
 
7
- declare class Agent extends Dispatcher{
8
- constructor(opts?: Agent.Options)
7
+ declare class Agent extends Dispatcher {
8
+ constructor (opts?: Agent.Options)
9
9
  /** `true` after `dispatcher.close()` has been called. */
10
- closed: boolean;
10
+ closed: boolean
11
11
  /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12
- destroyed: boolean;
12
+ destroyed: boolean
13
13
  /** Dispatches a request. */
14
- dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
14
+ dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
15
15
  }
16
16
 
17
17
  declare namespace Agent {
@@ -21,7 +21,7 @@ declare namespace Agent {
21
21
  /** Integer. Default: `0` */
22
22
  maxRedirections?: number;
23
23
 
24
- interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
24
+ interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
25
25
  }
26
26
 
27
27
  export interface DispatchOptions extends Dispatcher.DispatchOptions {
@@ -2,42 +2,42 @@ import { URL, UrlObject } from 'url'
2
2
  import { Duplex } from 'stream'
3
3
  import Dispatcher from './dispatcher'
4
4
 
5
- export {
6
- request,
7
- stream,
8
- pipeline,
9
- connect,
10
- upgrade,
11
- }
12
-
13
5
  /** Performs an HTTP request. */
14
- declare function request(
6
+ declare function request<TOpaque = null> (
15
7
  url: string | URL | UrlObject,
16
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
17
- ): Promise<Dispatcher.ResponseData>;
8
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
9
+ ): Promise<Dispatcher.ResponseData<TOpaque>>
18
10
 
19
11
  /** A faster version of `request`. */
20
- declare function stream(
12
+ declare function stream<TOpaque = null> (
21
13
  url: string | URL | UrlObject,
22
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
23
- factory: Dispatcher.StreamFactory
24
- ): Promise<Dispatcher.StreamData>;
14
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>,
15
+ factory: Dispatcher.StreamFactory<TOpaque>
16
+ ): Promise<Dispatcher.StreamData<TOpaque>>
25
17
 
26
18
  /** For easy use with `stream.pipeline`. */
27
- declare function pipeline(
19
+ declare function pipeline<TOpaque = null> (
28
20
  url: string | URL | UrlObject,
29
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
30
- handler: Dispatcher.PipelineHandler
31
- ): Duplex;
21
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>,
22
+ handler: Dispatcher.PipelineHandler<TOpaque>
23
+ ): Duplex
32
24
 
33
25
  /** Starts two-way communications with the requested resource. */
34
- declare function connect(
26
+ declare function connect<TOpaque = null> (
35
27
  url: string | URL | UrlObject,
36
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
37
- ): Promise<Dispatcher.ConnectData>;
28
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'>
29
+ ): Promise<Dispatcher.ConnectData<TOpaque>>
38
30
 
39
31
  /** Upgrade to a different protocol. */
40
- declare function upgrade(
32
+ declare function upgrade (
41
33
  url: string | URL | UrlObject,
42
34
  options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
43
- ): Promise<Dispatcher.UpgradeData>;
35
+ ): Promise<Dispatcher.UpgradeData>
36
+
37
+ export {
38
+ request,
39
+ stream,
40
+ pipeline,
41
+ connect,
42
+ upgrade
43
+ }
@@ -4,26 +4,26 @@ import { URL } from 'url'
4
4
 
5
5
  export default BalancedPool
6
6
 
7
- type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
7
+ type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
8
8
 
9
9
  declare class BalancedPool extends Dispatcher {
10
- constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
10
+ constructor (url: string | string[] | URL | URL[], options?: Pool.Options)
11
11
 
12
- addUpstream(upstream: string | URL): BalancedPool;
13
- removeUpstream(upstream: string | URL): BalancedPool;
14
- upstreams: Array<string>;
12
+ addUpstream (upstream: string | URL): BalancedPool
13
+ removeUpstream (upstream: string | URL): BalancedPool
14
+ upstreams: Array<string>
15
15
 
16
16
  /** `true` after `pool.close()` has been called. */
17
- closed: boolean;
17
+ closed: boolean
18
18
  /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
19
- destroyed: boolean;
19
+ destroyed: boolean
20
20
 
21
21
  // Override dispatcher APIs.
22
- override connect(
22
+ override connect (
23
23
  options: BalancedPoolConnectOptions
24
- ): Promise<Dispatcher.ConnectData>;
25
- override connect(
24
+ ): Promise<Dispatcher.ConnectData>
25
+ override connect (
26
26
  options: BalancedPoolConnectOptions,
27
27
  callback: (err: Error | null, data: Dispatcher.ConnectData) => void
28
- ): void;
28
+ ): void
29
29
  }
@@ -0,0 +1,172 @@
1
+ import { Readable, Writable } from 'node:stream'
2
+
3
+ export default CacheHandler
4
+
5
+ declare namespace CacheHandler {
6
+ export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE'
7
+
8
+ export interface CacheHandlerOptions {
9
+ store: CacheStore
10
+
11
+ cacheByDefault?: number
12
+
13
+ type?: CacheOptions['type']
14
+ }
15
+
16
+ export interface CacheOptions {
17
+ store?: CacheStore
18
+
19
+ /**
20
+ * The methods to cache
21
+ * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST)
22
+ * invalidate the cache for a origin.
23
+ * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons
24
+ * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1
25
+ */
26
+ methods?: CacheMethods[]
27
+
28
+ /**
29
+ * RFC9111 allows for caching responses that we aren't explicitly told to
30
+ * cache or to not cache.
31
+ * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5
32
+ * @default undefined
33
+ */
34
+ cacheByDefault?: number
35
+
36
+ /**
37
+ * TODO docs
38
+ * @default 'shared'
39
+ */
40
+ type?: 'shared' | 'private'
41
+ }
42
+
43
+ export interface CacheControlDirectives {
44
+ 'max-stale'?: number;
45
+ 'min-fresh'?: number;
46
+ 'max-age'?: number;
47
+ 's-maxage'?: number;
48
+ 'stale-while-revalidate'?: number;
49
+ 'stale-if-error'?: number;
50
+ public?: true;
51
+ private?: true | string[];
52
+ 'no-store'?: true;
53
+ 'no-cache'?: true | string[];
54
+ 'must-revalidate'?: true;
55
+ 'proxy-revalidate'?: true;
56
+ immutable?: true;
57
+ 'no-transform'?: true;
58
+ 'must-understand'?: true;
59
+ 'only-if-cached'?: true;
60
+ }
61
+
62
+ export interface CacheKey {
63
+ origin: string
64
+ method: string
65
+ path: string
66
+ headers?: Record<string, string | string[]>
67
+ }
68
+
69
+ export interface CacheValue {
70
+ statusCode: number
71
+ statusMessage: string
72
+ headers: Record<string, string | string[]>
73
+ vary?: Record<string, string | string[] | null>
74
+ etag?: string
75
+ cacheControlDirectives?: CacheControlDirectives
76
+ cachedAt: number
77
+ staleAt: number
78
+ deleteAt: number
79
+ }
80
+
81
+ export interface DeleteByUri {
82
+ origin: string
83
+ method: string
84
+ path: string
85
+ }
86
+
87
+ type GetResult = {
88
+ statusCode: number
89
+ statusMessage: string
90
+ headers: Record<string, string | string[]>
91
+ vary?: Record<string, string | string[] | null>
92
+ etag?: string
93
+ body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string
94
+ cacheControlDirectives: CacheControlDirectives,
95
+ cachedAt: number
96
+ staleAt: number
97
+ deleteAt: number
98
+ }
99
+
100
+ /**
101
+ * Underlying storage provider for cached responses
102
+ */
103
+ export interface CacheStore {
104
+ get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
105
+
106
+ createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined
107
+
108
+ delete(key: CacheKey): void | Promise<void>
109
+ }
110
+
111
+ export interface MemoryCacheStoreOpts {
112
+ /**
113
+ * @default Infinity
114
+ */
115
+ maxCount?: number
116
+
117
+ /**
118
+ * @default Infinity
119
+ */
120
+ maxSize?: number
121
+
122
+ /**
123
+ * @default Infinity
124
+ */
125
+ maxEntrySize?: number
126
+
127
+ errorCallback?: (err: Error) => void
128
+ }
129
+
130
+ export class MemoryCacheStore implements CacheStore {
131
+ constructor (opts?: MemoryCacheStoreOpts)
132
+
133
+ get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
134
+
135
+ createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
136
+
137
+ delete (key: CacheKey): void | Promise<void>
138
+ }
139
+
140
+ export interface SqliteCacheStoreOpts {
141
+ /**
142
+ * Location of the database
143
+ * @default ':memory:'
144
+ */
145
+ location?: string
146
+
147
+ /**
148
+ * @default Infinity
149
+ */
150
+ maxCount?: number
151
+
152
+ /**
153
+ * @default Infinity
154
+ */
155
+ maxEntrySize?: number
156
+ }
157
+
158
+ export class SqliteCacheStore implements CacheStore {
159
+ constructor (opts?: SqliteCacheStoreOpts)
160
+
161
+ /**
162
+ * Closes the connection to the database
163
+ */
164
+ close (): void
165
+
166
+ get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
167
+
168
+ createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
169
+
170
+ delete (key: CacheKey): void | Promise<void>
171
+ }
172
+ }
@@ -1,30 +1,29 @@
1
1
  import { URL } from 'url'
2
- import { TlsOptions } from 'tls'
3
2
  import Dispatcher from './dispatcher'
4
- import buildConnector from "./connector";
3
+ import buildConnector from './connector'
5
4
 
6
- type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
5
+ type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
7
6
 
8
7
  /**
9
8
  * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
10
9
  */
11
10
  export class Client extends Dispatcher {
12
- constructor(url: string | URL, options?: Client.Options);
11
+ constructor (url: string | URL, options?: Client.Options)
13
12
  /** Property to get and set the pipelining factor. */
14
- pipelining: number;
13
+ pipelining: number
15
14
  /** `true` after `client.close()` has been called. */
16
- closed: boolean;
15
+ closed: boolean
17
16
  /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
18
- destroyed: boolean;
17
+ destroyed: boolean
19
18
 
20
19
  // Override dispatcher APIs.
21
- override connect(
20
+ override connect (
22
21
  options: ClientConnectOptions
23
- ): Promise<Dispatcher.ConnectData>;
24
- override connect(
22
+ ): Promise<Dispatcher.ConnectData>
23
+ override connect (
25
24
  options: ClientConnectOptions,
26
25
  callback: (err: Error | null, data: Dispatcher.ConnectData) => void
27
- ): void;
26
+ ): void
28
27
  }
29
28
 
30
29
  export declare namespace Client {
@@ -71,7 +70,7 @@ export declare namespace Client {
71
70
  /** TODO */
72
71
  maxRedirections?: number;
73
72
  /** TODO */
74
- connect?: buildConnector.BuildOptions | buildConnector.connector;
73
+ connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
75
74
  /** TODO */
76
75
  maxRequestsPerClient?: number;
77
76
  /** TODO */
@@ -105,4 +104,4 @@ export declare namespace Client {
105
104
  }
106
105
  }
107
106
 
108
- export default Client;
107
+ export default Client
@@ -26,3 +26,5 @@ export function getCookies (headers: Headers): Record<string, string>
26
26
  export function getSetCookies (headers: Headers): Cookie[]
27
27
 
28
28
  export function setCookie (headers: Headers, cookie: Cookie): void
29
+
30
+ export function parseCookie (cookie: string): Cookie | null
@@ -1,7 +1,7 @@
1
- import { Socket } from "net";
2
- import { URL } from "url";
3
- import Connector from "./connector";
4
- import Dispatcher from "./dispatcher";
1
+ import { Socket } from 'net'
2
+ import { URL } from 'url'
3
+ import buildConnector from './connector'
4
+ import Dispatcher from './dispatcher'
5
5
 
6
6
  declare namespace DiagnosticsChannel {
7
7
  interface Request {
@@ -16,15 +16,15 @@ declare namespace DiagnosticsChannel {
16
16
  statusText: string;
17
17
  headers: Array<Buffer>;
18
18
  }
19
- type Error = unknown;
19
+ type Error = unknown
20
20
  interface ConnectParams {
21
- host: URL["host"];
22
- hostname: URL["hostname"];
23
- protocol: URL["protocol"];
24
- port: URL["port"];
21
+ host: URL['host'];
22
+ hostname: URL['hostname'];
23
+ protocol: URL['protocol'];
24
+ port: URL['port'];
25
25
  servername: string | null;
26
26
  }
27
- type Connector = Connector.connector;
27
+ type Connector = buildConnector.connector
28
28
  export interface RequestCreateMessage {
29
29
  request: Request;
30
30
  }