@chainlink/external-adapter-framework 2.8.0 → 2.9.0

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 (175) hide show
  1. package/README.md +1 -1
  2. package/adapter/basic.js +21 -4
  3. package/adapter/basic.js.map +1 -1
  4. package/adapter/endpoint.js +13 -0
  5. package/adapter/endpoint.js.map +1 -1
  6. package/adapter/por.js +6 -6
  7. package/adapter/por.js.map +1 -1
  8. package/adapter/price.js +1 -0
  9. package/adapter/price.js.map +1 -1
  10. package/cache/local.js +5 -1
  11. package/cache/local.js.map +1 -1
  12. package/cache/redis.js +3 -1
  13. package/cache/redis.js.map +1 -1
  14. package/cache/response.js +5 -0
  15. package/cache/response.js.map +1 -1
  16. package/config/index.js +9 -6
  17. package/config/index.js.map +1 -1
  18. package/generator-adapter/node_modules/.yarn-integrity +4 -4
  19. package/generator-adapter/node_modules/@types/node/README.md +3 -3
  20. package/generator-adapter/node_modules/@types/node/assert/strict.d.ts +105 -2
  21. package/generator-adapter/node_modules/@types/node/assert.d.ts +162 -101
  22. package/generator-adapter/node_modules/@types/node/async_hooks.d.ts +25 -5
  23. package/generator-adapter/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  24. package/generator-adapter/node_modules/@types/node/buffer.d.ts +9 -5
  25. package/generator-adapter/node_modules/@types/node/child_process.d.ts +67 -44
  26. package/generator-adapter/node_modules/@types/node/cluster.d.ts +19 -20
  27. package/generator-adapter/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
  28. package/generator-adapter/node_modules/@types/node/console.d.ts +19 -18
  29. package/generator-adapter/node_modules/@types/node/crypto.d.ts +1247 -355
  30. package/generator-adapter/node_modules/@types/node/dgram.d.ts +10 -9
  31. package/generator-adapter/node_modules/@types/node/diagnostics_channel.d.ts +1 -3
  32. package/generator-adapter/node_modules/@types/node/dns/promises.d.ts +1 -1
  33. package/generator-adapter/node_modules/@types/node/dns.d.ts +23 -18
  34. package/generator-adapter/node_modules/@types/node/domain.d.ts +1 -1
  35. package/generator-adapter/node_modules/@types/node/events.d.ts +81 -35
  36. package/generator-adapter/node_modules/@types/node/fs/promises.d.ts +62 -22
  37. package/generator-adapter/node_modules/@types/node/fs.d.ts +364 -98
  38. package/generator-adapter/node_modules/@types/node/globals.d.ts +4 -4
  39. package/generator-adapter/node_modules/@types/node/globals.typedarray.d.ts +20 -0
  40. package/generator-adapter/node_modules/@types/node/http.d.ts +120 -32
  41. package/generator-adapter/node_modules/@types/node/http2.d.ts +185 -65
  42. package/generator-adapter/node_modules/@types/node/https.d.ts +92 -63
  43. package/generator-adapter/node_modules/@types/node/index.d.ts +10 -5
  44. package/generator-adapter/node_modules/@types/node/inspector.d.ts +277 -0
  45. package/generator-adapter/node_modules/@types/node/inspector.generated.d.ts +908 -886
  46. package/generator-adapter/node_modules/@types/node/module.d.ts +21 -18
  47. package/generator-adapter/node_modules/@types/node/net.d.ts +35 -16
  48. package/generator-adapter/node_modules/@types/node/os.d.ts +22 -10
  49. package/generator-adapter/node_modules/@types/node/package.json +13 -3
  50. package/generator-adapter/node_modules/@types/node/path.d.ts +1 -1
  51. package/generator-adapter/node_modules/@types/node/perf_hooks.d.ts +28 -16
  52. package/generator-adapter/node_modules/@types/node/process.d.ts +30 -30
  53. package/generator-adapter/node_modules/@types/node/punycode.d.ts +1 -1
  54. package/generator-adapter/node_modules/@types/node/querystring.d.ts +1 -1
  55. package/generator-adapter/node_modules/@types/node/readline/promises.d.ts +1 -1
  56. package/generator-adapter/node_modules/@types/node/readline.d.ts +13 -13
  57. package/generator-adapter/node_modules/@types/node/repl.d.ts +23 -13
  58. package/generator-adapter/node_modules/@types/node/sea.d.ts +10 -1
  59. package/generator-adapter/node_modules/@types/node/sqlite.d.ts +245 -23
  60. package/generator-adapter/node_modules/@types/node/stream/consumers.d.ts +2 -2
  61. package/generator-adapter/node_modules/@types/node/stream/web.d.ts +6 -55
  62. package/generator-adapter/node_modules/@types/node/stream.d.ts +63 -37
  63. package/generator-adapter/node_modules/@types/node/string_decoder.d.ts +3 -3
  64. package/generator-adapter/node_modules/@types/node/test.d.ts +196 -40
  65. package/generator-adapter/node_modules/@types/node/timers/promises.d.ts +1 -1
  66. package/generator-adapter/node_modules/@types/node/timers.d.ts +1 -3
  67. package/generator-adapter/node_modules/@types/node/tls.d.ts +124 -114
  68. package/generator-adapter/node_modules/@types/node/trace_events.d.ts +6 -6
  69. package/generator-adapter/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  70. package/generator-adapter/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  71. package/generator-adapter/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
  72. package/generator-adapter/node_modules/@types/node/ts5.6/index.d.ts +12 -5
  73. package/generator-adapter/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  74. package/generator-adapter/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  75. package/generator-adapter/node_modules/@types/node/tty.d.ts +1 -1
  76. package/generator-adapter/node_modules/@types/node/url.d.ts +109 -33
  77. package/generator-adapter/node_modules/@types/node/util.d.ts +31 -305
  78. package/generator-adapter/node_modules/@types/node/v8.d.ts +41 -8
  79. package/generator-adapter/node_modules/@types/node/vm.d.ts +258 -107
  80. package/generator-adapter/node_modules/@types/node/wasi.d.ts +23 -2
  81. package/generator-adapter/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  82. package/generator-adapter/node_modules/@types/node/web-globals/events.d.ts +3 -0
  83. package/generator-adapter/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
  84. package/generator-adapter/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  85. package/generator-adapter/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  86. package/generator-adapter/node_modules/@types/node/worker_threads.d.ts +142 -51
  87. package/generator-adapter/node_modules/@types/node/zlib.d.ts +36 -31
  88. package/generator-adapter/node_modules/undici-types/agent.d.ts +12 -11
  89. package/generator-adapter/node_modules/undici-types/api.d.ts +24 -24
  90. package/generator-adapter/node_modules/undici-types/balanced-pool.d.ts +11 -11
  91. package/generator-adapter/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  92. package/generator-adapter/node_modules/undici-types/client-stats.d.ts +15 -0
  93. package/generator-adapter/node_modules/undici-types/client.d.ts +18 -18
  94. package/generator-adapter/node_modules/undici-types/cookies.d.ts +2 -0
  95. package/generator-adapter/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  96. package/generator-adapter/node_modules/undici-types/dispatcher.d.ts +119 -99
  97. package/generator-adapter/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  98. package/generator-adapter/node_modules/undici-types/errors.d.ts +66 -54
  99. package/generator-adapter/node_modules/undici-types/eventsource.d.ts +9 -4
  100. package/generator-adapter/node_modules/undici-types/fetch.d.ts +18 -16
  101. package/generator-adapter/node_modules/undici-types/formdata.d.ts +7 -7
  102. package/generator-adapter/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  103. package/generator-adapter/node_modules/undici-types/global-origin.d.ts +5 -5
  104. package/generator-adapter/node_modules/undici-types/h2c-client.d.ts +73 -0
  105. package/generator-adapter/node_modules/undici-types/handlers.d.ts +8 -8
  106. package/generator-adapter/node_modules/undici-types/header.d.ts +157 -1
  107. package/generator-adapter/node_modules/undici-types/index.d.ts +56 -47
  108. package/generator-adapter/node_modules/undici-types/interceptors.d.ts +30 -8
  109. package/generator-adapter/node_modules/undici-types/mock-agent.d.ts +36 -18
  110. package/generator-adapter/node_modules/undici-types/mock-call-history.d.ts +111 -0
  111. package/generator-adapter/node_modules/undici-types/mock-client.d.ts +6 -4
  112. package/generator-adapter/node_modules/undici-types/mock-errors.d.ts +3 -3
  113. package/generator-adapter/node_modules/undici-types/mock-interceptor.d.ts +21 -20
  114. package/generator-adapter/node_modules/undici-types/mock-pool.d.ts +6 -4
  115. package/generator-adapter/node_modules/undici-types/package.json +1 -1
  116. package/generator-adapter/node_modules/undici-types/patch.d.ts +0 -4
  117. package/generator-adapter/node_modules/undici-types/pool-stats.d.ts +8 -8
  118. package/generator-adapter/node_modules/undici-types/pool.d.ts +14 -12
  119. package/generator-adapter/node_modules/undici-types/proxy-agent.d.ts +5 -4
  120. package/generator-adapter/node_modules/undici-types/readable.d.ts +18 -15
  121. package/generator-adapter/node_modules/undici-types/retry-agent.d.ts +1 -1
  122. package/generator-adapter/node_modules/undici-types/retry-handler.d.ts +19 -10
  123. package/generator-adapter/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  124. package/generator-adapter/node_modules/undici-types/util.d.ts +3 -3
  125. package/generator-adapter/node_modules/undici-types/utility.d.ts +7 -0
  126. package/generator-adapter/node_modules/undici-types/webidl.d.ts +142 -29
  127. package/generator-adapter/node_modules/undici-types/websocket.d.ts +38 -2
  128. package/generator-adapter/package.json +1 -1
  129. package/metrics/index.js +3 -0
  130. package/metrics/index.js.map +1 -1
  131. package/package.json +8 -8
  132. package/rate-limiting/burst.js +6 -6
  133. package/rate-limiting/burst.js.map +1 -1
  134. package/rate-limiting/fixed-interval.js +2 -3
  135. package/rate-limiting/fixed-interval.js.map +1 -1
  136. package/transports/abstract/streaming.js +7 -10
  137. package/transports/abstract/streaming.js.map +1 -1
  138. package/transports/abstract/subscription.js +4 -0
  139. package/transports/abstract/subscription.js.map +1 -1
  140. package/transports/http.js +5 -3
  141. package/transports/http.js.map +1 -1
  142. package/transports/index.js +1 -3
  143. package/transports/index.js.map +1 -1
  144. package/transports/sse.js +6 -2
  145. package/transports/sse.js.map +1 -1
  146. package/transports/websocket.d.ts +9 -1
  147. package/transports/websocket.js +25 -13
  148. package/transports/websocket.js.map +1 -1
  149. package/util/censor/censor-list.js +1 -1
  150. package/util/censor/censor-list.js.map +1 -1
  151. package/util/group-runner.js +3 -2
  152. package/util/group-runner.js.map +1 -1
  153. package/util/index.js +8 -1
  154. package/util/index.js.map +1 -1
  155. package/util/logger.js +8 -1
  156. package/util/logger.js.map +1 -1
  157. package/util/requester.js +11 -3
  158. package/util/requester.js.map +1 -1
  159. package/util/subscription-set/expiring-sorted-set.js +3 -0
  160. package/util/subscription-set/expiring-sorted-set.js.map +1 -1
  161. package/util/subscription-set/redis-sorted-set.js +3 -0
  162. package/util/subscription-set/redis-sorted-set.js.map +1 -1
  163. package/util/subscription-set/subscription-set.js +5 -0
  164. package/util/subscription-set/subscription-set.js.map +1 -1
  165. package/util/testing-utils.js +13 -6
  166. package/util/testing-utils.js.map +1 -1
  167. package/validation/error.js +13 -0
  168. package/validation/error.js.map +1 -1
  169. package/validation/input-params.js +14 -0
  170. package/validation/input-params.js.map +1 -1
  171. package/generator-adapter/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  172. package/generator-adapter/node_modules/@types/node/compatibility/index.d.ts +0 -9
  173. package/generator-adapter/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  174. package/generator-adapter/node_modules/undici-types/file.d.ts +0 -39
  175. package/generator-adapter/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,4 +1,6 @@
1
1
  declare module "process" {
2
+ import { Control, MessageOptions, SendHandle } from "node:child_process";
3
+ import { PathLike } from "node:fs";
2
4
  import * as tty from "node:tty";
3
5
  import { Worker } from "node:worker_threads";
4
6
 
@@ -194,7 +196,7 @@ declare module "process" {
194
196
  readonly ipv6: boolean;
195
197
  /**
196
198
  * A boolean value that is `true` if the current Node.js build supports
197
- * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v22.x/api/modules.md#loading-ecmascript-modules-using-require).
199
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require).
198
200
  * @since v22.10.0
199
201
  */
200
202
  readonly require_module: boolean;
@@ -275,10 +277,8 @@ declare module "process" {
275
277
  | "loong64"
276
278
  | "mips"
277
279
  | "mipsel"
278
- | "ppc"
279
280
  | "ppc64"
280
281
  | "riscv64"
281
- | "s390"
282
282
  | "s390x"
283
283
  | "x64";
284
284
  type Signals =
@@ -332,7 +332,7 @@ declare module "process" {
332
332
  */
333
333
  type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
334
334
  type WarningListener = (warning: Error) => void;
335
- type MessageListener = (message: unknown, sendHandle: unknown) => void;
335
+ type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
336
336
  type SignalsListener = (signal: Signals) => void;
337
337
  type MultipleResolveListener = (
338
338
  type: MultipleResolveType,
@@ -348,7 +348,7 @@ declare module "process" {
348
348
  /**
349
349
  * Can be used to change the default timezone at runtime
350
350
  */
351
- TZ?: string;
351
+ TZ?: string | undefined;
352
352
  }
353
353
  interface HRTime {
354
354
  /**
@@ -749,7 +749,7 @@ declare module "process" {
749
749
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
750
750
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
751
751
  *
752
- * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v22.x/api/os.html#dlopen-constants)`
752
+ * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v24.x/api/os.html#dlopen-constants)`
753
753
  * documentation for details.
754
754
  *
755
755
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -992,7 +992,7 @@ declare module "process" {
992
992
  * @since v0.1.13
993
993
  * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
994
994
  */
995
- exit(code?: number | string | null | undefined): never;
995
+ exit(code?: number | string | null): never;
996
996
  /**
997
997
  * A number which will be the process exit code, when the process either
998
998
  * exits gracefully, or is exited via {@link exit} without specifying
@@ -1003,7 +1003,7 @@ declare module "process" {
1003
1003
  * @default undefined
1004
1004
  * @since v0.11.8
1005
1005
  */
1006
- exitCode?: number | string | number | undefined;
1006
+ exitCode: number | string | null | undefined;
1007
1007
  finalization: {
1008
1008
  /**
1009
1009
  * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
@@ -1467,7 +1467,7 @@ declare module "process" {
1467
1467
  * @since v20.12.0
1468
1468
  * @param path The path to the .env file
1469
1469
  */
1470
- loadEnvFile(path?: string | URL | Buffer): void;
1470
+ loadEnvFile(path?: PathLike): void;
1471
1471
  /**
1472
1472
  * The `process.pid` property returns the PID of the process.
1473
1473
  *
@@ -1491,6 +1491,18 @@ declare module "process" {
1491
1491
  * @since v9.2.0, v8.10.0, v6.13.0
1492
1492
  */
1493
1493
  readonly ppid: number;
1494
+ /**
1495
+ * The `process.threadCpuUsage()` method returns the user and system CPU time usage of
1496
+ * the current worker thread, in an object with properties `user` and `system`, whose
1497
+ * values are microsecond values (millionth of a second).
1498
+ *
1499
+ * The result of a previous call to `process.threadCpuUsage()` can be passed as the
1500
+ * argument to the function, to get a diff reading.
1501
+ * @since v23.9.0
1502
+ * @param previousValue A previous return value from calling
1503
+ * `process.threadCpuUsage()`
1504
+ */
1505
+ threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
1494
1506
  /**
1495
1507
  * The `process.title` property returns the current process title (i.e. returns
1496
1508
  * the current value of `ps`). Assigning a new value to `process.title` modifies
@@ -1511,7 +1523,8 @@ declare module "process" {
1511
1523
  title: string;
1512
1524
  /**
1513
1525
  * The operating system CPU architecture for which the Node.js binary was compiled.
1514
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1526
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
1527
+ * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
1515
1528
  *
1516
1529
  * ```js
1517
1530
  * import { arch } from 'node:process';
@@ -1557,7 +1570,7 @@ declare module "process" {
1557
1570
  * @since v0.1.17
1558
1571
  * @deprecated Since v14.0.0 - Use `main` instead.
1559
1572
  */
1560
- mainModule?: Module | undefined;
1573
+ mainModule?: Module;
1561
1574
  memoryUsage: MemoryUsageFn;
1562
1575
  /**
1563
1576
  * Gets the amount of memory available to the process (in bytes) based on
@@ -1571,7 +1584,7 @@ declare module "process" {
1571
1584
  constrainedMemory(): number;
1572
1585
  /**
1573
1586
  * Gets the amount of free memory that is still available to the process (in bytes).
1574
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v22.x/api/process.html#processavailablememory) for more information.
1587
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
1575
1588
  * @since v20.13.0
1576
1589
  */
1577
1590
  availableMemory(): number;
@@ -1749,18 +1762,7 @@ declare module "process" {
1749
1762
  * If no IPC channel exists, this property is undefined.
1750
1763
  * @since v7.1.0
1751
1764
  */
1752
- channel?: {
1753
- /**
1754
- * This method makes the IPC channel keep the event loop of the process running if .unref() has been called before.
1755
- * @since v7.1.0
1756
- */
1757
- ref(): void;
1758
- /**
1759
- * This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open.
1760
- * @since v7.1.0
1761
- */
1762
- unref(): void;
1763
- };
1765
+ channel?: Control;
1764
1766
  /**
1765
1767
  * If Node.js is spawned with an IPC channel, the `process.send()` method can be
1766
1768
  * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
@@ -1774,10 +1776,8 @@ declare module "process" {
1774
1776
  */
1775
1777
  send?(
1776
1778
  message: any,
1777
- sendHandle?: any,
1778
- options?: {
1779
- keepOpen?: boolean | undefined;
1780
- },
1779
+ sendHandle?: SendHandle,
1780
+ options?: MessageOptions,
1781
1781
  callback?: (error: Error | null) => void,
1782
1782
  ): boolean;
1783
1783
  /**
@@ -1844,7 +1844,7 @@ declare module "process" {
1844
1844
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1845
1845
  /**
1846
1846
  * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1847
- * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v22.x/api/report.html).
1847
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
1848
1848
  * @since v11.8.0
1849
1849
  */
1850
1850
  report: ProcessReport;
@@ -1980,7 +1980,7 @@ declare module "process" {
1980
1980
  emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1981
1981
  emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1982
1982
  emit(event: "warning", warning: Error): boolean;
1983
- emit(event: "message", message: unknown, sendHandle: unknown): this;
1983
+ emit(event: "message", message: unknown, sendHandle: SendHandle): this;
1984
1984
  emit(event: Signals, signal?: Signals): boolean;
1985
1985
  emit(
1986
1986
  event: "multipleResolves",
@@ -24,7 +24,7 @@
24
24
  * made available to developers as a convenience. Fixes or other modifications to
25
25
  * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26
26
  * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
28
28
  */
29
29
  declare module "punycode" {
30
30
  /**
@@ -9,7 +9,7 @@
9
9
  * `querystring` is more performant than `URLSearchParams` but is not a
10
10
  * standardized API. Use `URLSearchParams` when performance is not critical or
11
11
  * when compatibility with browser code is desirable.
12
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
13
13
  */
14
14
  declare module "querystring" {
15
15
  interface StringifyOptions {
@@ -64,7 +64,7 @@ declare module "readline/promises" {
64
64
  constructor(
65
65
  stream: NodeJS.WritableStream,
66
66
  options?: {
67
- autoCommit?: boolean;
67
+ autoCommit?: boolean | undefined;
68
68
  },
69
69
  );
70
70
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
- * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream
3
- * (such as [`process.stdin`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdin)) one line at a time.
2
+ * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
3
+ * (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
4
4
  *
5
5
  * To use the promise-based APIs:
6
6
  *
@@ -31,7 +31,7 @@
31
31
  *
32
32
  * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
33
33
  * received on the `input` stream.
34
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
35
35
  */
36
36
  declare module "readline" {
37
37
  import { Abortable, EventEmitter } from "node:events";
@@ -46,7 +46,7 @@ declare module "readline" {
46
46
  }
47
47
  /**
48
48
  * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
49
- * single `input` [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream.
49
+ * single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
50
50
  * The `output` stream is used to print prompts for user input that arrives on,
51
51
  * and is read from, the `input` stream.
52
52
  * @since v0.1.104
@@ -100,7 +100,7 @@ declare module "readline" {
100
100
  * > Instances of the `readline.Interface` class are constructed using the
101
101
  * > `readline.createInterface()` method.
102
102
  *
103
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
103
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
104
104
  */
105
105
  protected constructor(
106
106
  input: NodeJS.ReadableStream,
@@ -114,7 +114,7 @@ declare module "readline" {
114
114
  * > Instances of the `readline.Interface` class are constructed using the
115
115
  * > `readline.createInterface()` method.
116
116
  *
117
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
117
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
118
118
  */
119
119
  protected constructor(options: ReadLineOptions);
120
120
  /**
@@ -320,11 +320,11 @@ declare module "readline" {
320
320
  export type CompleterResult = [string[], string];
321
321
  export interface ReadLineOptions {
322
322
  /**
323
- * The [`Readable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream to listen to
323
+ * The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
324
324
  */
325
325
  input: NodeJS.ReadableStream;
326
326
  /**
327
- * The [`Writable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream to write readline data to.
327
+ * The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
328
328
  */
329
329
  output?: NodeJS.WritableStream | undefined;
330
330
  /**
@@ -369,7 +369,7 @@ declare module "readline" {
369
369
  * `crlfDelay` will be coerced to a number no less than `100`.
370
370
  * It can be set to `Infinity`, in which case
371
371
  * `\r` followed by `\n` will always be considered a single newline
372
- * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v22.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
372
+ * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
373
373
  * @default 100
374
374
  */
375
375
  crlfDelay?: number | undefined;
@@ -557,7 +557,7 @@ declare module "readline" {
557
557
  cols: number;
558
558
  }
559
559
  /**
560
- * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream
560
+ * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
561
561
  * in a specified direction identified by `dir`.
562
562
  * @since v0.7.7
563
563
  * @param callback Invoked once the operation completes.
@@ -565,7 +565,7 @@ declare module "readline" {
565
565
  */
566
566
  export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
567
567
  /**
568
- * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream from
568
+ * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
569
569
  * the current position of the cursor down.
570
570
  * @since v0.7.7
571
571
  * @param callback Invoked once the operation completes.
@@ -574,7 +574,7 @@ declare module "readline" {
574
574
  export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
575
575
  /**
576
576
  * The `readline.cursorTo()` method moves cursor to the specified position in a
577
- * given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
577
+ * given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
578
578
  * @since v0.7.7
579
579
  * @param callback Invoked once the operation completes.
580
580
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
@@ -582,7 +582,7 @@ declare module "readline" {
582
582
  export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
583
583
  /**
584
584
  * The `readline.moveCursor()` method moves the cursor _relative_ to its current
585
- * position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
585
+ * position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
586
586
  * @since v0.7.7
587
587
  * @param callback Invoked once the operation completes.
588
588
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
@@ -6,7 +6,7 @@
6
6
  * ```js
7
7
  * import repl from 'node:repl';
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/repl.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/repl.js)
10
10
  */
11
11
  declare module "repl" {
12
12
  import { AsyncCompleter, Completer, Interface } from "node:readline";
@@ -39,7 +39,7 @@ declare module "repl" {
39
39
  * The function to be used when evaluating each given line of input.
40
40
  * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
41
41
  * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
42
- * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#custom-evaluation-functions)
42
+ * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#custom-evaluation-functions)
43
43
  * section for more details.
44
44
  */
45
45
  eval?: REPLEval | undefined;
@@ -72,13 +72,13 @@ declare module "repl" {
72
72
  * The function to invoke to format the output of each command before writing to `output`.
73
73
  * @default a wrapper for `util.inspect`
74
74
  *
75
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_customizing_repl_output
75
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_customizing_repl_output
76
76
  */
77
77
  writer?: REPLWriter | undefined;
78
78
  /**
79
79
  * An optional function used for custom Tab auto completion.
80
80
  *
81
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#readline_use_of_the_completer_function
81
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#readline_use_of_the_completer_function
82
82
  */
83
83
  completer?: Completer | AsyncCompleter | undefined;
84
84
  /**
@@ -123,6 +123,12 @@ declare module "repl" {
123
123
  */
124
124
  action: REPLCommandAction;
125
125
  }
126
+ interface REPLServerSetupHistoryOptions {
127
+ filePath?: string | undefined;
128
+ size?: number | undefined;
129
+ removeHistoryDuplicates?: boolean | undefined;
130
+ onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
131
+ }
126
132
  /**
127
133
  * Instances of `repl.REPLServer` are created using the {@link start} method
128
134
  * or directly using the JavaScript `new` keyword.
@@ -166,33 +172,33 @@ declare module "repl" {
166
172
  /**
167
173
  * A value indicating whether the REPL is currently in "editor mode".
168
174
  *
169
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_commands_and_special_keys
175
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_commands_and_special_keys
170
176
  */
171
177
  readonly editorMode: boolean;
172
178
  /**
173
179
  * A value indicating whether the `_` variable has been assigned.
174
180
  *
175
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
181
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
176
182
  */
177
183
  readonly underscoreAssigned: boolean;
178
184
  /**
179
185
  * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
180
186
  *
181
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
187
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
182
188
  */
183
189
  readonly last: any;
184
190
  /**
185
191
  * A value indicating whether the `_error` variable has been assigned.
186
192
  *
187
193
  * @since v9.8.0
188
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
194
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
189
195
  */
190
196
  readonly underscoreErrAssigned: boolean;
191
197
  /**
192
198
  * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
193
199
  *
194
200
  * @since v9.8.0
195
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
201
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
196
202
  */
197
203
  readonly lastError: any;
198
204
  /**
@@ -244,7 +250,7 @@ declare module "repl" {
244
250
  *
245
251
  * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
246
252
  *
247
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_class_replserver
253
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver
248
254
  */
249
255
  private constructor();
250
256
  /**
@@ -289,7 +295,7 @@ declare module "repl" {
289
295
  * The `replServer.displayPrompt()` method readies the REPL instance for input
290
296
  * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
291
297
  *
292
- * When multi-line input is being entered, an ellipsis is printed rather than the
298
+ * When multi-line input is being entered, a pipe `'|'` is printed rather than the
293
299
  * 'prompt'.
294
300
  *
295
301
  * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
@@ -316,7 +322,11 @@ declare module "repl" {
316
322
  * @param historyPath the path to the history file
317
323
  * @param callback called when history writes are ready or upon error
318
324
  */
319
- setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
325
+ setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
326
+ setupHistory(
327
+ historyConfig?: REPLServerSetupHistoryOptions,
328
+ callback?: (err: Error | null, repl: this) => void,
329
+ ): void;
320
330
  /**
321
331
  * events.EventEmitter
322
332
  * 1. close - inherited from `readline.Interface`
@@ -416,7 +426,7 @@ declare module "repl" {
416
426
  /**
417
427
  * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
418
428
  *
419
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_recoverable_errors
429
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors
420
430
  */
421
431
  class Recoverable extends SyntaxError {
422
432
  err: Error;
@@ -111,7 +111,7 @@
111
111
  * ```
112
112
  * @since v19.7.0, v18.16.0
113
113
  * @experimental
114
- * @see [source](https://github.com/nodejs/node/blob/v22.x/src/node_sea.cc)
114
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/src/node_sea.cc)
115
115
  */
116
116
  declare module "node:sea" {
117
117
  type AssetKey = string;
@@ -150,4 +150,13 @@ declare module "node:sea" {
150
150
  * @since v20.12.0
151
151
  */
152
152
  function getRawAsset(key: AssetKey): ArrayBuffer;
153
+ /**
154
+ * This method can be used to retrieve an array of all the keys of assets
155
+ * embedded into the single-executable application.
156
+ * An error is thrown when not running inside a single-executable application.
157
+ * @since v24.8.0
158
+ * @returns An array containing all the keys of the assets
159
+ * embedded in the executable. If no assets are embedded, returns an empty array.
160
+ */
161
+ function getAssetKeys(): string[];
153
162
  }