@chainlink/external-adapter-framework 2.13.0 → 2.13.2

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 (190) hide show
  1. package/README.md +1 -1
  2. package/adapter/market-status.d.ts +5 -0
  3. package/adapter/market-status.js +5 -0
  4. package/adapter/market-status.js.map +1 -1
  5. package/generator-adapter/generators/app/templates/src/index.ts.ejs +1 -1
  6. package/generator-adapter/node_modules/.yarn-integrity +33 -37
  7. package/generator-adapter/node_modules/@inquirer/ansi/package.json +28 -26
  8. package/generator-adapter/node_modules/@inquirer/checkbox/dist/index.d.ts +6 -1
  9. package/generator-adapter/node_modules/@inquirer/checkbox/dist/index.js +30 -10
  10. package/generator-adapter/node_modules/@inquirer/checkbox/package.json +23 -21
  11. package/generator-adapter/node_modules/@inquirer/confirm/package.json +21 -19
  12. package/generator-adapter/node_modules/@inquirer/core/dist/index.d.ts +1 -1
  13. package/generator-adapter/node_modules/@inquirer/core/dist/index.js +1 -1
  14. package/generator-adapter/node_modules/@inquirer/core/dist/lib/create-prompt.js +51 -25
  15. package/generator-adapter/node_modules/@inquirer/core/dist/lib/key.d.ts +2 -0
  16. package/generator-adapter/node_modules/@inquirer/core/dist/lib/key.js +1 -0
  17. package/generator-adapter/node_modules/@inquirer/core/dist/lib/utils.js +1 -1
  18. package/generator-adapter/node_modules/@inquirer/core/package.json +22 -20
  19. package/generator-adapter/node_modules/@inquirer/editor/dist/index.d.ts +3 -0
  20. package/generator-adapter/node_modules/@inquirer/editor/dist/index.js +5 -5
  21. package/generator-adapter/node_modules/@inquirer/editor/package.json +22 -20
  22. package/generator-adapter/node_modules/@inquirer/expand/package.json +21 -19
  23. package/generator-adapter/node_modules/@inquirer/external-editor/package.json +33 -31
  24. package/generator-adapter/node_modules/@inquirer/figures/package.json +18 -16
  25. package/generator-adapter/node_modules/@inquirer/input/dist/index.js +5 -3
  26. package/generator-adapter/node_modules/@inquirer/input/package.json +21 -19
  27. package/generator-adapter/node_modules/@inquirer/number/package.json +21 -19
  28. package/generator-adapter/node_modules/@inquirer/password/dist/index.d.ts +6 -1
  29. package/generator-adapter/node_modules/@inquirer/password/dist/index.js +7 -2
  30. package/generator-adapter/node_modules/@inquirer/password/package.json +22 -20
  31. package/generator-adapter/node_modules/@inquirer/prompts/README.md +15 -0
  32. package/generator-adapter/node_modules/@inquirer/prompts/package.json +31 -29
  33. package/generator-adapter/node_modules/@inquirer/rawlist/README.md +4 -0
  34. package/generator-adapter/node_modules/@inquirer/rawlist/dist/index.d.ts +9 -2
  35. package/generator-adapter/node_modules/@inquirer/rawlist/dist/index.js +24 -7
  36. package/generator-adapter/node_modules/@inquirer/rawlist/package.json +21 -19
  37. package/generator-adapter/node_modules/@inquirer/search/README.md +2 -1
  38. package/generator-adapter/node_modules/@inquirer/search/dist/index.d.ts +1 -0
  39. package/generator-adapter/node_modules/@inquirer/search/dist/index.js +11 -4
  40. package/generator-adapter/node_modules/@inquirer/search/package.json +22 -20
  41. package/generator-adapter/node_modules/@inquirer/select/dist/index.d.ts +5 -2
  42. package/generator-adapter/node_modules/@inquirer/select/dist/index.js +28 -11
  43. package/generator-adapter/node_modules/@inquirer/select/package.json +23 -21
  44. package/generator-adapter/node_modules/@inquirer/type/package.json +18 -16
  45. package/generator-adapter/node_modules/@types/node/README.md +1 -1
  46. package/generator-adapter/node_modules/@types/node/child_process.d.ts +6 -6
  47. package/generator-adapter/node_modules/@types/node/crypto.d.ts +8 -8
  48. package/generator-adapter/node_modules/@types/node/http.d.ts +31 -11
  49. package/generator-adapter/node_modules/@types/node/https.d.ts +6 -0
  50. package/generator-adapter/node_modules/@types/node/inspector.generated.d.ts +14 -1
  51. package/generator-adapter/node_modules/@types/node/module.d.ts +27 -16
  52. package/generator-adapter/node_modules/@types/node/net.d.ts +21 -2
  53. package/generator-adapter/node_modules/@types/node/package.json +3 -3
  54. package/generator-adapter/node_modules/@types/node/perf_hooks.d.ts +125 -65
  55. package/generator-adapter/node_modules/@types/node/process.d.ts +2 -7
  56. package/generator-adapter/node_modules/@types/node/sqlite.d.ts +31 -10
  57. package/generator-adapter/node_modules/@types/node/stream/web.d.ts +5 -5
  58. package/generator-adapter/node_modules/@types/node/stream.d.ts +27 -4
  59. package/generator-adapter/node_modules/@types/node/tls.d.ts +7 -7
  60. package/generator-adapter/node_modules/@types/node/url.d.ts +2 -2
  61. package/generator-adapter/node_modules/@types/node/util.d.ts +9 -1
  62. package/generator-adapter/node_modules/@types/node/v8.d.ts +26 -0
  63. package/generator-adapter/node_modules/@types/node/vm.d.ts +30 -15
  64. package/generator-adapter/node_modules/@types/node/worker_threads.d.ts +17 -19
  65. package/generator-adapter/node_modules/@types/node/zlib.d.ts +68 -4
  66. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.d.ts +0 -3
  67. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js +1 -0
  68. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js.map +1 -1
  69. package/generator-adapter/node_modules/@yeoman/adapter/dist/log.d.ts +0 -2
  70. package/generator-adapter/node_modules/@yeoman/adapter/dist/log.js.map +1 -1
  71. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.d.ts +0 -1
  72. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js.map +1 -1
  73. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.d.ts +0 -1
  74. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.js.map +1 -1
  75. package/generator-adapter/node_modules/@yeoman/adapter/package.json +11 -11
  76. package/generator-adapter/node_modules/@yeoman/types/package.json +3 -7
  77. package/generator-adapter/node_modules/@yeoman/types/types/environment/environment.d.ts +7 -5
  78. package/generator-adapter/node_modules/ansi-styles/index.d.ts +341 -232
  79. package/generator-adapter/node_modules/ansi-styles/index.js +130 -190
  80. package/generator-adapter/node_modules/ansi-styles/license +1 -1
  81. package/generator-adapter/node_modules/ansi-styles/package.json +10 -8
  82. package/generator-adapter/node_modules/ansi-styles/readme.md +32 -53
  83. package/generator-adapter/node_modules/chalk/package.json +3 -3
  84. package/generator-adapter/node_modules/chalk/readme.md +25 -53
  85. package/generator-adapter/node_modules/chalk/source/index.d.ts +6 -1
  86. package/generator-adapter/node_modules/chalk/source/vendor/supports-color/browser.js +6 -2
  87. package/generator-adapter/node_modules/chalk/source/vendor/supports-color/index.js +10 -2
  88. package/generator-adapter/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  89. package/generator-adapter/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  90. package/generator-adapter/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  91. package/generator-adapter/node_modules/{p-queue/dist/options copy.js → fast-string-truncated-width/dist/types.js} +1 -0
  92. package/generator-adapter/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  93. package/generator-adapter/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  94. package/generator-adapter/node_modules/fast-string-truncated-width/license +21 -0
  95. package/generator-adapter/node_modules/fast-string-truncated-width/package.json +35 -0
  96. package/generator-adapter/node_modules/fast-string-truncated-width/readme.md +59 -0
  97. package/generator-adapter/node_modules/fast-string-width/dist/index.d.ts +4 -0
  98. package/generator-adapter/node_modules/fast-string-width/dist/index.js +14 -0
  99. package/generator-adapter/node_modules/fast-string-width/license +21 -0
  100. package/generator-adapter/node_modules/fast-string-width/package.json +34 -0
  101. package/generator-adapter/node_modules/fast-string-width/readme.md +42 -0
  102. package/generator-adapter/node_modules/fast-wrap-ansi/LICENSE +23 -0
  103. package/generator-adapter/node_modules/fast-wrap-ansi/README.md +26 -0
  104. package/generator-adapter/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  105. package/generator-adapter/node_modules/fast-wrap-ansi/lib/main.js +219 -0
  106. package/generator-adapter/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
  107. package/generator-adapter/node_modules/fast-wrap-ansi/package.json +51 -0
  108. package/generator-adapter/node_modules/iconv-lite/lib/index.d.ts +114 -26
  109. package/generator-adapter/node_modules/iconv-lite/lib/index.js +39 -40
  110. package/generator-adapter/node_modules/iconv-lite/package.json +13 -2
  111. package/generator-adapter/node_modules/iconv-lite/types/encodings.d.ts +423 -0
  112. package/generator-adapter/node_modules/inquirer/dist/types.d.ts +12 -11
  113. package/generator-adapter/node_modules/inquirer/dist/ui/prompt.js +9 -1
  114. package/generator-adapter/node_modules/inquirer/dist/ui/skipped-renderer.d.ts +13 -0
  115. package/generator-adapter/node_modules/inquirer/dist/ui/skipped-renderer.js +57 -0
  116. package/generator-adapter/node_modules/inquirer/package.json +21 -19
  117. package/generator-adapter/node_modules/log-symbols/package.json +1 -1
  118. package/generator-adapter/node_modules/log-symbols/symbols.js +1 -1
  119. package/generator-adapter/node_modules/mem-fs/dist/index.d.ts +0 -2
  120. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/LICENSE +21 -0
  121. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/README.md +447 -0
  122. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/index.js +346 -0
  123. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/lib/inspect-stream.js +13 -0
  124. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/lib/is-stream.js +15 -0
  125. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/lib/normalize.js +9 -0
  126. package/generator-adapter/node_modules/mem-fs/node_modules/vinyl/package.json +59 -0
  127. package/generator-adapter/node_modules/mem-fs/package.json +9 -9
  128. package/generator-adapter/node_modules/ora/index.d.ts +3 -1
  129. package/generator-adapter/node_modules/ora/index.js +299 -109
  130. package/generator-adapter/node_modules/ora/package.json +3 -4
  131. package/generator-adapter/node_modules/ora/readme.md +24 -0
  132. package/generator-adapter/node_modules/p-queue/dist/index.js +145 -22
  133. package/generator-adapter/node_modules/p-queue/dist/options.d.ts +17 -1
  134. package/generator-adapter/node_modules/p-queue/package.json +1 -1
  135. package/generator-adapter/node_modules/p-queue/readme.md +32 -1
  136. package/generator-adapter/node_modules/stdin-discarder/index.js +50 -22
  137. package/generator-adapter/node_modules/stdin-discarder/package.json +1 -1
  138. package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/package.json +3 -3
  139. package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/readme.md +53 -25
  140. package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/index.d.ts +1 -6
  141. package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/supports-color/browser.js +2 -6
  142. package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/supports-color/index.js +2 -10
  143. package/generator-adapter/package.json +4 -4
  144. package/package.json +14 -14
  145. package/transports/websocket.d.ts +5 -0
  146. package/transports/websocket.js +25 -13
  147. package/transports/websocket.js.map +1 -1
  148. package/generator-adapter/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  149. package/generator-adapter/node_modules/emoji-regex/README.md +0 -107
  150. package/generator-adapter/node_modules/emoji-regex/index.d.ts +0 -3
  151. package/generator-adapter/node_modules/emoji-regex/index.js +0 -4
  152. package/generator-adapter/node_modules/emoji-regex/index.mjs +0 -4
  153. package/generator-adapter/node_modules/emoji-regex/package.json +0 -45
  154. package/generator-adapter/node_modules/iconv-lite/Changelog.md +0 -236
  155. package/generator-adapter/node_modules/jake/node_modules/ansi-styles/index.d.ts +0 -345
  156. package/generator-adapter/node_modules/jake/node_modules/ansi-styles/index.js +0 -163
  157. package/generator-adapter/node_modules/jake/node_modules/ansi-styles/license +0 -9
  158. package/generator-adapter/node_modules/jake/node_modules/ansi-styles/package.json +0 -56
  159. package/generator-adapter/node_modules/jake/node_modules/ansi-styles/readme.md +0 -152
  160. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser-symbols.js +0 -4
  161. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser.js +0 -1
  162. package/generator-adapter/node_modules/ora/node_modules/log-symbols/index.d.ts +0 -22
  163. package/generator-adapter/node_modules/ora/node_modules/log-symbols/index.js +0 -1
  164. package/generator-adapter/node_modules/ora/node_modules/log-symbols/license +0 -9
  165. package/generator-adapter/node_modules/ora/node_modules/log-symbols/package.json +0 -60
  166. package/generator-adapter/node_modules/ora/node_modules/log-symbols/readme.md +0 -39
  167. package/generator-adapter/node_modules/ora/node_modules/log-symbols/symbols.js +0 -14
  168. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/index.d.ts +0 -15
  169. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/index.js +0 -14
  170. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/license +0 -9
  171. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/package.json +0 -59
  172. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/readme.md +0 -37
  173. package/generator-adapter/node_modules/p-queue/dist/options copy.d.ts +0 -121
  174. package/generator-adapter/node_modules/wrap-ansi/index.d.ts +0 -41
  175. package/generator-adapter/node_modules/wrap-ansi/index.js +0 -222
  176. package/generator-adapter/node_modules/wrap-ansi/license +0 -9
  177. package/generator-adapter/node_modules/wrap-ansi/node_modules/string-width/index.d.ts +0 -39
  178. package/generator-adapter/node_modules/wrap-ansi/node_modules/string-width/index.js +0 -82
  179. package/generator-adapter/node_modules/wrap-ansi/node_modules/string-width/license +0 -9
  180. package/generator-adapter/node_modules/wrap-ansi/node_modules/string-width/package.json +0 -64
  181. package/generator-adapter/node_modules/wrap-ansi/node_modules/string-width/readme.md +0 -66
  182. package/generator-adapter/node_modules/wrap-ansi/package.json +0 -69
  183. package/generator-adapter/node_modules/wrap-ansi/readme.md +0 -75
  184. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/license +0 -0
  185. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/index.js +0 -0
  186. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/utilities.js +0 -0
  187. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -0
  188. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -0
  189. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -0
  190. /package/generator-adapter/node_modules/{ora → yeoman-generator}/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -0
@@ -80,37 +80,48 @@ declare module "module" {
80
80
  */
81
81
  directory?: string;
82
82
  }
83
+ interface EnableCompileCacheOptions {
84
+ /**
85
+ * Optional. Directory to store the compile cache. If not specified, the directory specified by
86
+ * the [`NODE_COMPILE_CACHE=dir`](https://nodejs.org/docs/latest-v24.x/api/cli.html#node_compile_cachedir)
87
+ * environment variable will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` otherwise.
88
+ * @since v24.12.0
89
+ */
90
+ directory?: string | undefined;
91
+ /**
92
+ * Optional. If `true`, enables portable compile cache so that the cache can be reused even if the project directory
93
+ * is moved. This is a best-effort feature. If not specified, it will depend on whether the environment variable
94
+ * [NODE_COMPILE_CACHE_PORTABLE=1](https://nodejs.org/docs/latest-v24.x/api/cli.html#node_compile_cache_portable1) is set.
95
+ * @since v24.12.0
96
+ */
97
+ portable?: boolean | undefined;
98
+ }
83
99
  /**
84
100
  * Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
85
101
  * in the current Node.js instance.
86
102
  *
87
- * If `cacheDir` is not specified, Node.js will either use the directory specified by the
88
- * `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use
89
- * `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's
90
- * recommended to call `module.enableCompileCache()` without specifying the `cacheDir`,
91
- * so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
103
+ * For general use cases, it's recommended to call `module.enableCompileCache()` without specifying the
104
+ * `options.directory`, so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
92
105
  * variable when necessary.
93
106
  *
94
- * Since compile cache is supposed to be a quiet optimization that is not required for the
95
- * application to be functional, this method is designed to not throw any exception when the
96
- * compile cache cannot be enabled. Instead, it will return an object containing an error
97
- * message in the `message` field to aid debugging.
98
- * If compile cache is enabled successfully, the `directory` field in the returned object
99
- * contains the path to the directory where the compile cache is stored. The `status`
100
- * field in the returned object would be one of the `module.constants.compileCacheStatus`
101
- * values to indicate the result of the attempt to enable the
107
+ * Since compile cache is supposed to be a optimization that is not mission critical, this method is
108
+ * designed to not throw any exception when the compile cache cannot be enabled. Instead, it will return
109
+ * an object containing an error message in the `message` field to aid debugging. If compile cache is
110
+ * enabled successfully, the `directory` field in the returned object contains the path to the directory
111
+ * where the compile cache is stored. The `status` field in the returned object would be one of the
112
+ * `module.constants.compileCacheStatus` values to indicate the result of the attempt to enable the
102
113
  * [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
103
114
  *
104
115
  * This method only affects the current Node.js instance. To enable it in child worker threads,
105
116
  * either call this method in child worker threads too, or set the
106
117
  * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can
107
118
  * be inherited into the child workers. The directory can be obtained either from the
108
- * `directory` field returned by this method, or with {@link getCompileCacheDir}.
119
+ * `directory` field returned by this method, or with {@link getCompileCacheDir `module.getCompileCacheDir()`}.
109
120
  * @since v22.8.0
110
- * @param cacheDir Optional path to specify the directory where the compile cache
121
+ * @param options Optional. If a string is passed, it is considered to be `options.directory`.
111
122
  * will be stored/retrieved.
112
123
  */
113
- function enableCompileCache(cacheDir?: string): EnableCompileCacheResult;
124
+ function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
114
125
  /**
115
126
  * Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
116
127
  * accumulated from modules already loaded
@@ -105,9 +105,14 @@ declare module "net" {
105
105
  * See `Writable` stream `write()` method for more
106
106
  * information.
107
107
  * @since v0.1.90
108
- * @param [encoding='utf8'] Only used when data is `string`.
109
108
  */
110
109
  write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
110
+ /**
111
+ * Sends data on the socket, with an explicit encoding for string data.
112
+ * @see {@link Socket.write} for full details.
113
+ * @since v0.1.90
114
+ * @param [encoding='utf8'] Only used when data is `string`.
115
+ */
111
116
  write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
112
117
  /**
113
118
  * Initiate a connection on a given socket.
@@ -347,12 +352,26 @@ declare module "net" {
347
352
  *
348
353
  * See `writable.end()` for further details.
349
354
  * @since v0.1.90
350
- * @param [encoding='utf8'] Only used when data is `string`.
351
355
  * @param callback Optional callback for when the socket is finished.
352
356
  * @return The socket itself.
353
357
  */
354
358
  end(callback?: () => void): this;
359
+ /**
360
+ * Half-closes the socket, with one final chunk of data.
361
+ * @see {@link Socket.end} for full details.
362
+ * @since v0.1.90
363
+ * @param callback Optional callback for when the socket is finished.
364
+ * @return The socket itself.
365
+ */
355
366
  end(buffer: Uint8Array | string, callback?: () => void): this;
367
+ /**
368
+ * Half-closes the socket, with one final chunk of data.
369
+ * @see {@link Socket.end} for full details.
370
+ * @since v0.1.90
371
+ * @param [encoding='utf8'] Only used when data is `string`.
372
+ * @param callback Optional callback for when the socket is finished.
373
+ * @return The socket itself.
374
+ */
356
375
  end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
357
376
  /**
358
377
  * events.EventEmitter
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.10.13",
3
+ "version": "24.12.2",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -150,6 +150,6 @@
150
150
  "undici-types": "~7.16.0"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "2ec3065bf306401d19db2ee65619ca53b48d5461db1133c7eeb53d407b8dcbc8",
154
- "typeScriptVersion": "5.2"
153
+ "typesPublisherContentHash": "d7203ff42f0a932fc10105074ec5f78418782e8d306c14cb314ce869dff07f43",
154
+ "typeScriptVersion": "5.3"
155
155
  }
@@ -200,14 +200,6 @@ declare module "perf_hooks" {
200
200
  active: number;
201
201
  utilization: number;
202
202
  }
203
- /**
204
- * @param utilization1 The result of a previous call to `eventLoopUtilization()`.
205
- * @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
206
- */
207
- type EventLoopUtilityFunction = (
208
- utilization1?: EventLoopUtilization,
209
- utilization2?: EventLoopUtilization,
210
- ) => EventLoopUtilization;
211
203
  interface MarkOptions {
212
204
  /**
213
205
  * Additional optional detail to include with the mark.
@@ -264,11 +256,19 @@ declare module "perf_hooks" {
264
256
  */
265
257
  clearResourceTimings(name?: string): void;
266
258
  /**
267
- * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
268
- * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
269
- * No other CPU idle time is taken into consideration.
259
+ * This is an alias of `perf_hooks.eventLoopUtilization()`.
260
+ *
261
+ * _This property is an extension by Node.js. It is not available in Web browsers._
262
+ * @since v14.10.0, v12.19.0
263
+ * @param utilization1 The result of a previous call to
264
+ * `eventLoopUtilization()`.
265
+ * @param utilization2 The result of a previous call to
266
+ * `eventLoopUtilization()` prior to `utilization1`.
270
267
  */
271
- eventLoopUtilization: EventLoopUtilityFunction;
268
+ eventLoopUtilization(
269
+ utilization1?: EventLoopUtilization,
270
+ utilization2?: EventLoopUtilization,
271
+ ): EventLoopUtilization;
272
272
  /**
273
273
  * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
274
274
  * If you are only interested in performance entries of certain types or that have certain names, see
@@ -371,41 +371,12 @@ declare module "perf_hooks" {
371
371
  */
372
372
  readonly timeOrigin: number;
373
373
  /**
374
- * _This property is an extension by Node.js. It is not available in Web browsers._
375
- *
376
- * Wraps a function within a new function that measures the running time of the wrapped function.
377
- * A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
378
- *
379
- * ```js
380
- * import {
381
- * performance,
382
- * PerformanceObserver,
383
- * } from 'node:perf_hooks';
384
- *
385
- * function someFunction() {
386
- * console.log('hello world');
387
- * }
388
- *
389
- * const wrapped = performance.timerify(someFunction);
390
- *
391
- * const obs = new PerformanceObserver((list) => {
392
- * console.log(list.getEntries()[0].duration);
393
- *
394
- * performance.clearMarks();
395
- * performance.clearMeasures();
396
- * obs.disconnect();
397
- * });
398
- * obs.observe({ entryTypes: ['function'] });
399
- *
400
- * // A performance timeline entry will be created
401
- * wrapped();
402
- * ```
374
+ * This is an alias of `perf_hooks.timerify()`.
403
375
  *
404
- * If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported
405
- * once the finally handler is invoked.
406
- * @param fn
376
+ * _This property is an extension by Node.js. It is not available in Web browsers._
377
+ * @since v8.5.0
407
378
  */
408
- timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
379
+ timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
409
380
  /**
410
381
  * An object which is JSON representation of the performance object. It is similar to
411
382
  * [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers.
@@ -844,6 +815,83 @@ declare module "perf_hooks" {
844
815
  */
845
816
  add(other: RecordableHistogram): void;
846
817
  }
818
+ interface CreateHistogramOptions {
819
+ /**
820
+ * The lowest discernible value. Must be an integer value greater than 0.
821
+ * @default 1
822
+ */
823
+ lowest?: number | bigint | undefined;
824
+ /**
825
+ * The highest recordable value. Must be an integer value that is equal to
826
+ * or greater than two times `lowest`.
827
+ * @default Number.MAX_SAFE_INTEGER
828
+ */
829
+ highest?: number | bigint | undefined;
830
+ /**
831
+ * The number of accuracy digits. Must be a number between `1` and `5`.
832
+ * @default 3
833
+ */
834
+ figures?: number | undefined;
835
+ }
836
+ /**
837
+ * Returns a {@link RecordableHistogram `RecordableHistogram`}.
838
+ * @since v15.9.0, v14.18.0
839
+ */
840
+ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
841
+ /**
842
+ * The `eventLoopUtilization()` function returns an object that contains the
843
+ * cumulative duration of time the event loop has been both idle and active as a
844
+ * high resolution milliseconds timer. The `utilization` value is the calculated
845
+ * Event Loop Utilization (ELU).
846
+ *
847
+ * If bootstrapping has not yet finished on the main thread the properties have
848
+ * the value of `0`. The ELU is immediately available on
849
+ * [Worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#worker-threads)
850
+ * since bootstrap happens within the event loop.
851
+ *
852
+ * Both `utilization1` and `utilization2` are optional parameters.
853
+ *
854
+ * If `utilization1` is passed, then the delta between the current call's `active`
855
+ * and `idle` times, as well as the corresponding `utilization` value are
856
+ * calculated and returned (similar to `process.hrtime()`).
857
+ *
858
+ * If `utilization1` and `utilization2` are both passed, then the delta is
859
+ * calculated between the two arguments. This is a convenience option because,
860
+ * unlike `process.hrtime()`, calculating the ELU is more complex than a
861
+ * single subtraction.
862
+ *
863
+ * ELU is similar to CPU utilization, except that it only measures event loop
864
+ * statistics and not CPU usage. It represents the percentage of time the event
865
+ * loop has spent outside the event loop's event provider (e.g. `epoll_wait`).
866
+ * No other CPU idle time is taken into consideration. The following is an example
867
+ * of how a mostly idle process will have a high ELU.
868
+ *
869
+ * ```js
870
+ * import { eventLoopUtilization } from 'node:perf_hooks';
871
+ * import { spawnSync } from 'node:child_process';
872
+ *
873
+ * setImmediate(() => {
874
+ * const elu = eventLoopUtilization();
875
+ * spawnSync('sleep', ['5']);
876
+ * console.log(eventLoopUtilization(elu).utilization);
877
+ * });
878
+ * ```
879
+ *
880
+ * Although the CPU is mostly idle while running this script, the value of `utilization`
881
+ * is `1`. This is because the call to `child_process.spawnSync()` blocks the event loop
882
+ * from proceeding.
883
+ *
884
+ * Passing in a user-defined object instead of the result of a previous call to
885
+ * `eventLoopUtilization()` will lead to undefined behavior. The return values are not
886
+ * guaranteed to reflect any correct state of the event loop.
887
+ * @since v24.12.0
888
+ * @param utilization1 The result of a previous call to `eventLoopUtilization()`.
889
+ * @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
890
+ */
891
+ function eventLoopUtilization(
892
+ utilization1?: EventLoopUtilization,
893
+ utilization2?: EventLoopUtilization,
894
+ ): EventLoopUtilization;
847
895
  /**
848
896
  * _This property is an extension by Node.js. It is not available in Web browsers._
849
897
  *
@@ -873,28 +921,40 @@ declare module "perf_hooks" {
873
921
  * @since v11.10.0
874
922
  */
875
923
  function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
876
- interface CreateHistogramOptions {
877
- /**
878
- * The minimum recordable value. Must be an integer value greater than 0.
879
- * @default 1
880
- */
881
- lowest?: number | bigint | undefined;
882
- /**
883
- * The maximum recordable value. Must be an integer value greater than min.
884
- * @default Number.MAX_SAFE_INTEGER
885
- */
886
- highest?: number | bigint | undefined;
887
- /**
888
- * The number of accuracy digits. Must be a number between 1 and 5.
889
- * @default 3
890
- */
891
- figures?: number | undefined;
892
- }
893
924
  /**
894
- * Returns a `RecordableHistogram`.
895
- * @since v15.9.0, v14.18.0
925
+ * _This property is an extension by Node.js. It is not available in Web browsers._
926
+ *
927
+ * Wraps a function within a new function that measures the running time of the
928
+ * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'`
929
+ * event type in order for the timing details to be accessed.
930
+ *
931
+ * ```js
932
+ * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks';
933
+ *
934
+ * function someFunction() {
935
+ * console.log('hello world');
936
+ * }
937
+ *
938
+ * const wrapped = timerify(someFunction);
939
+ *
940
+ * const obs = new PerformanceObserver((list) => {
941
+ * console.log(list.getEntries()[0].duration);
942
+ *
943
+ * performance.clearMarks();
944
+ * performance.clearMeasures();
945
+ * obs.disconnect();
946
+ * });
947
+ * obs.observe({ entryTypes: ['function'] });
948
+ *
949
+ * // A performance timeline entry will be created
950
+ * wrapped();
951
+ * ```
952
+ *
953
+ * If the wrapped function returns a promise, a finally handler will be attached
954
+ * to the promise and the duration will be reported once the finally handler is invoked.
955
+ * @since v24.12.0
896
956
  */
897
- function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
957
+ function timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
898
958
  import {
899
959
  performance as _performance,
900
960
  PerformanceEntry as _PerformanceEntry,
@@ -235,7 +235,7 @@ declare module "process" {
235
235
  /**
236
236
  * A value that is `"strip"` by default,
237
237
  * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
238
- * Node.js is run with `--no-experimental-strip-types`.
238
+ * Node.js is run with `--no-strip-types`.
239
239
  * @since v22.10.0
240
240
  */
241
241
  readonly typescript: "strip" | "transform" | false;
@@ -344,12 +344,7 @@ declare module "process" {
344
344
  isTTY?: true | undefined;
345
345
  }
346
346
  // Alias for compatibility
347
- interface ProcessEnv extends Dict<string> {
348
- /**
349
- * Can be used to change the default timezone at runtime
350
- */
351
- TZ?: string | undefined;
352
- }
347
+ interface ProcessEnv extends Dict<string> {}
353
348
  interface HRTime {
354
349
  /**
355
350
  * This is the legacy version of {@link process.hrtime.bigint()}
@@ -6,12 +6,7 @@
6
6
  * import sqlite from 'node:sqlite';
7
7
  * ```
8
8
  *
9
- * This module is only available under the `node:` scheme. The following will not
10
- * work:
11
- *
12
- * ```js
13
- * import sqlite from 'sqlite';
14
- * ```
9
+ * This module is only available under the `node:` scheme.
15
10
  *
16
11
  * The following example shows the basic usage of the `node:sqlite` module to open
17
12
  * an in-memory database, write data to the database, and then read the data back.
@@ -123,6 +118,14 @@ declare module "node:sqlite" {
123
118
  * @default false
124
119
  */
125
120
  allowUnknownNamedParameters?: boolean | undefined;
121
+ /**
122
+ * If `true`, enables the defensive flag. When the defensive flag is enabled,
123
+ * language features that allow ordinary SQL to deliberately corrupt the database
124
+ * file are disabled. The defensive flag can also be set using `enableDefensive()`.
125
+ * @since v24.12.0
126
+ * @default true
127
+ */
128
+ defensive?: boolean | undefined;
126
129
  }
127
130
  interface CreateSessionOptions {
128
131
  /**
@@ -294,6 +297,16 @@ declare module "node:sqlite" {
294
297
  * @param allow Whether to allow loading extensions.
295
298
  */
296
299
  enableLoadExtension(allow: boolean): void;
300
+ /**
301
+ * Enables or disables the defensive flag. When the defensive flag is active,
302
+ * language features that allow ordinary SQL to deliberately corrupt the
303
+ * database file are disabled.
304
+ * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive)
305
+ * in the SQLite documentation for details.
306
+ * @since v24.12.0
307
+ * @param active Whether to set the defensive flag.
308
+ */
309
+ enableDefensive(active: boolean): void;
297
310
  /**
298
311
  * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
299
312
  * @since v24.0.0
@@ -413,7 +426,7 @@ declare module "node:sqlite" {
413
426
  */
414
427
  prepare(sql: string): StatementSync;
415
428
  /**
416
- * Creates a new `SQLTagStore`, which is an LRU (Least Recently Used) cache for
429
+ * Creates a new {@link SQLTagStore `SQLTagStore`}, which is an LRU (Least Recently Used) cache for
417
430
  * storing prepared statements. This allows for the efficient reuse of prepared
418
431
  * statements by tagging them with a unique identifier.
419
432
  *
@@ -427,7 +440,7 @@ declare module "node:sqlite" {
427
440
  * import { DatabaseSync } from 'node:sqlite';
428
441
  *
429
442
  * const db = new DatabaseSync(':memory:');
430
- * const sql = db.createSQLTagStore();
443
+ * const sql = db.createTagStore();
431
444
  *
432
445
  * db.exec('CREATE TABLE users (id INT, name TEXT)');
433
446
  *
@@ -450,6 +463,7 @@ declare module "node:sqlite" {
450
463
  * // ]
451
464
  * ```
452
465
  * @since v24.9.0
466
+ * @param maxSize The maximum number of prepared statements to cache. **Default**: `1000`.
453
467
  * @returns A new SQL tag store for caching prepared statements.
454
468
  */
455
469
  createTagStore(maxSize?: number): SQLTagStore;
@@ -468,6 +482,8 @@ declare module "node:sqlite" {
468
482
  * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
469
483
  *
470
484
  * ```js
485
+ * import { DatabaseSync } from 'node:sqlite';
486
+ *
471
487
  * const sourceDb = new DatabaseSync(':memory:');
472
488
  * const targetDb = new DatabaseSync(':memory:');
473
489
  *
@@ -525,19 +541,24 @@ declare module "node:sqlite" {
525
541
  * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
526
542
  */
527
543
  close(): void;
544
+ /**
545
+ * Closes the session. If the session is already closed, does nothing.
546
+ * @since v24.9.0
547
+ */
548
+ [Symbol.dispose](): void;
528
549
  }
529
550
  /**
530
551
  * This class represents a single LRU (Least Recently Used) cache for storing
531
552
  * prepared statements.
532
553
  *
533
- * Instances of this class are created via the database.createSQLTagStore() method,
554
+ * Instances of this class are created via the database.createTagStore() method,
534
555
  * not by using a constructor. The store caches prepared statements based on the
535
556
  * provided SQL query string. When the same query is seen again, the store
536
557
  * retrieves the cached statement and safely applies the new values through
537
558
  * parameter binding, thereby preventing attacks like SQL injection.
538
559
  *
539
560
  * The cache has a maxSize that defaults to 1000 statements, but a custom size can
540
- * be provided (e.g., database.createSQLTagStore(100)). All APIs exposed by this
561
+ * be provided (e.g., database.createTagStore(100)). All APIs exposed by this
541
562
  * class execute synchronously.
542
563
  * @since v24.9.0
543
564
  */
@@ -105,7 +105,7 @@ declare module "stream/web" {
105
105
  }
106
106
  interface ReadableStreamReadDoneResult<T> {
107
107
  done: true;
108
- value?: T;
108
+ value: T | undefined;
109
109
  }
110
110
  type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
111
111
  interface ReadableByteStreamControllerCallback {
@@ -250,7 +250,7 @@ declare module "stream/web" {
250
250
  interface ReadableStreamDefaultController<R = any> {
251
251
  readonly desiredSize: number | null;
252
252
  close(): void;
253
- enqueue(chunk?: R): void;
253
+ enqueue(chunk: R): void;
254
254
  error(e?: any): void;
255
255
  }
256
256
  const ReadableStreamDefaultController: {
@@ -279,7 +279,7 @@ declare module "stream/web" {
279
279
  };
280
280
  interface TransformStreamDefaultController<O = any> {
281
281
  readonly desiredSize: number | null;
282
- enqueue(chunk?: O): void;
282
+ enqueue(chunk: O): void;
283
283
  error(reason?: any): void;
284
284
  terminate(): void;
285
285
  }
@@ -315,7 +315,7 @@ declare module "stream/web" {
315
315
  abort(reason?: any): Promise<void>;
316
316
  close(): Promise<void>;
317
317
  releaseLock(): void;
318
- write(chunk?: W): Promise<void>;
318
+ write(chunk: W): Promise<void>;
319
319
  }
320
320
  const WritableStreamDefaultWriter: {
321
321
  prototype: WritableStreamDefaultWriter;
@@ -339,7 +339,7 @@ declare module "stream/web" {
339
339
  size?: QueuingStrategySize<T>;
340
340
  }
341
341
  interface QueuingStrategySize<T = any> {
342
- (chunk?: T): number;
342
+ (chunk: T): number;
343
343
  }
344
344
  interface QueuingStrategyInit {
345
345
  /**
@@ -863,11 +863,20 @@ declare module "stream" {
863
863
  * @since v0.9.4
864
864
  * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
865
865
  * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
866
- * @param [encoding='utf8'] The encoding, if `chunk` is a string.
867
866
  * @param callback Callback for when this chunk of data is flushed.
868
867
  * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
869
868
  */
870
869
  write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
870
+ /**
871
+ * Writes data to the stream, with an explicit encoding for string data.
872
+ * @see {@link Writable.write} for full details.
873
+ * @since v0.9.4
874
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
875
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
876
+ * @param encoding The encoding, if `chunk` is a string.
877
+ * @param callback Callback for when this chunk of data is flushed.
878
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
879
+ */
871
880
  write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
872
881
  /**
873
882
  * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
@@ -892,13 +901,27 @@ declare module "stream" {
892
901
  * // Writing more now is not allowed!
893
902
  * ```
894
903
  * @since v0.9.4
904
+ * @param cb Callback for when the stream is finished.
905
+ */
906
+ end(cb?: () => void): this;
907
+ /**
908
+ * Signals that no more data will be written, with one final chunk of data.
909
+ * @see {@link Writable.end} for full details.
910
+ * @since v0.9.4
895
911
  * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
896
912
  * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
897
- * @param encoding The encoding if `chunk` is a string
898
- * @param callback Callback for when the stream is finished.
913
+ * @param cb Callback for when the stream is finished.
899
914
  */
900
- end(cb?: () => void): this;
901
915
  end(chunk: any, cb?: () => void): this;
916
+ /**
917
+ * Signals that no more data will be written, with one final chunk of data.
918
+ * @see {@link Writable.end} for full details.
919
+ * @since v0.9.4
920
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
921
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
922
+ * @param encoding The encoding if `chunk` is a string
923
+ * @param cb Callback for when the stream is finished.
924
+ */
902
925
  end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
903
926
  /**
904
927
  * The `writable.cork()` method forces all written data to be buffered in memory.
@@ -15,31 +15,31 @@ declare module "tls" {
15
15
  import * as stream from "stream";
16
16
  const CLIENT_RENEG_LIMIT: number;
17
17
  const CLIENT_RENEG_WINDOW: number;
18
- interface Certificate {
18
+ interface Certificate extends NodeJS.Dict<string | string[]> {
19
19
  /**
20
20
  * Country code.
21
21
  */
22
- C: string;
22
+ C?: string | string[];
23
23
  /**
24
24
  * Street.
25
25
  */
26
- ST: string;
26
+ ST?: string | string[];
27
27
  /**
28
28
  * Locality.
29
29
  */
30
- L: string;
30
+ L?: string | string[];
31
31
  /**
32
32
  * Organization.
33
33
  */
34
- O: string;
34
+ O?: string | string[];
35
35
  /**
36
36
  * Organizational unit.
37
37
  */
38
- OU: string;
38
+ OU?: string | string[];
39
39
  /**
40
40
  * Common name.
41
41
  */
42
- CN: string;
42
+ CN?: string | string[];
43
43
  }
44
44
  interface PeerCertificate {
45
45
  /**
@@ -80,7 +80,7 @@ declare module "url" {
80
80
  * function getURL(req) {
81
81
  * const proto = req.headers['x-forwarded-proto'] || 'https';
82
82
  * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
83
- * return new URL(req.url || '/', `${proto}://${host}`);
83
+ * return new URL(`${proto}://${host}${req.url || '/'}`);
84
84
  * }
85
85
  * ```
86
86
  *
@@ -90,7 +90,7 @@ declare module "url" {
90
90
  *
91
91
  * ```js
92
92
  * function getURL(req) {
93
- * return new URL(req.url || '/', 'https://example.com');
93
+ * return new URL(`https://example.com${req.url || '/'}`);
94
94
  * }
95
95
  * ```
96
96
  * @since v0.1.25