@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1-alpha.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 (179) hide show
  1. package/.jsii +2 -2
  2. package/node_modules/@types/node/README.md +3 -3
  3. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  4. package/node_modules/@types/node/assert.d.ts +211 -92
  5. package/node_modules/@types/node/async_hooks.d.ts +103 -19
  6. package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
  7. package/node_modules/@types/node/buffer.d.ts +88 -516
  8. package/node_modules/@types/node/child_process.d.ts +167 -231
  9. package/node_modules/@types/node/cluster.d.ts +172 -26
  10. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  11. package/node_modules/@types/node/console.d.ts +66 -28
  12. package/node_modules/@types/node/constants.d.ts +14 -12
  13. package/node_modules/@types/node/crypto.d.ts +1458 -497
  14. package/node_modules/@types/node/dgram.d.ts +44 -30
  15. package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
  16. package/node_modules/@types/node/dns/promises.d.ts +120 -42
  17. package/node_modules/@types/node/dns.d.ts +209 -95
  18. package/node_modules/@types/node/domain.d.ts +14 -18
  19. package/node_modules/@types/node/events.d.ts +245 -113
  20. package/node_modules/@types/node/fs/promises.d.ts +194 -96
  21. package/node_modules/@types/node/fs.d.ts +695 -270
  22. package/node_modules/@types/node/globals.d.ts +97 -308
  23. package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  24. package/node_modules/@types/node/http.d.ts +363 -97
  25. package/node_modules/@types/node/http2.d.ts +684 -231
  26. package/node_modules/@types/node/https.d.ts +122 -87
  27. package/node_modules/@types/node/index.d.ts +24 -11
  28. package/node_modules/@types/node/inspector.d.ts +220 -2690
  29. package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
  30. package/node_modules/@types/node/module.d.ts +705 -149
  31. package/node_modules/@types/node/net.d.ts +178 -54
  32. package/node_modules/@types/node/os.d.ts +47 -17
  33. package/node_modules/@types/node/package.json +22 -97
  34. package/node_modules/@types/node/path.d.ts +12 -3
  35. package/node_modules/@types/node/perf_hooks.d.ts +500 -97
  36. package/node_modules/@types/node/process.d.ts +657 -87
  37. package/node_modules/@types/node/punycode.d.ts +5 -5
  38. package/node_modules/@types/node/querystring.d.ts +24 -13
  39. package/node_modules/@types/node/readline/promises.d.ts +25 -14
  40. package/node_modules/@types/node/readline.d.ts +102 -41
  41. package/node_modules/@types/node/repl.d.ts +38 -30
  42. package/node_modules/@types/node/sea.d.ts +162 -0
  43. package/node_modules/@types/node/sqlite.d.ts +1040 -0
  44. package/node_modules/@types/node/stream/consumers.d.ts +33 -7
  45. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  46. package/node_modules/@types/node/stream/web.d.ts +251 -28
  47. package/node_modules/@types/node/stream.d.ts +1060 -1055
  48. package/node_modules/@types/node/string_decoder.d.ts +8 -8
  49. package/node_modules/@types/node/test.d.ts +2133 -1166
  50. package/node_modules/@types/node/timers/promises.d.ts +31 -16
  51. package/node_modules/@types/node/timers.d.ts +159 -114
  52. package/node_modules/@types/node/tls.d.ts +232 -163
  53. package/node_modules/@types/node/trace_events.d.ts +43 -28
  54. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  55. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  56. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  57. package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  58. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  59. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  60. package/node_modules/@types/node/tty.d.ts +9 -9
  61. package/node_modules/@types/node/url.d.ts +236 -84
  62. package/node_modules/@types/node/util.d.ts +562 -412
  63. package/node_modules/@types/node/v8.d.ts +368 -21
  64. package/node_modules/@types/node/vm.d.ts +443 -149
  65. package/node_modules/@types/node/wasi.d.ts +62 -18
  66. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  67. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  68. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  69. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  70. package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
  71. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  72. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  73. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  74. package/node_modules/@types/node/worker_threads.d.ts +310 -107
  75. package/node_modules/@types/node/zlib.d.ts +301 -73
  76. package/node_modules/undici-types/LICENSE +21 -0
  77. package/node_modules/undici-types/agent.d.ts +13 -12
  78. package/node_modules/undici-types/api.d.ts +26 -26
  79. package/node_modules/undici-types/balanced-pool.d.ts +19 -7
  80. package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  81. package/node_modules/undici-types/client-stats.d.ts +15 -0
  82. package/node_modules/undici-types/client.d.ts +26 -15
  83. package/node_modules/undici-types/connector.d.ts +2 -2
  84. package/node_modules/undici-types/cookies.d.ts +2 -0
  85. package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
  86. package/node_modules/undici-types/dispatcher.d.ts +148 -113
  87. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  88. package/node_modules/undici-types/errors.d.ts +79 -46
  89. package/node_modules/undici-types/eventsource.d.ts +66 -0
  90. package/node_modules/undici-types/fetch.d.ts +41 -39
  91. package/node_modules/undici-types/formdata.d.ts +8 -8
  92. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  93. package/node_modules/undici-types/global-origin.d.ts +5 -5
  94. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  95. package/node_modules/undici-types/handlers.d.ts +11 -5
  96. package/node_modules/undici-types/header.d.ts +157 -1
  97. package/node_modules/undici-types/index.d.ts +68 -43
  98. package/node_modules/undici-types/interceptors.d.ts +71 -3
  99. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  100. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  101. package/node_modules/undici-types/mock-client.d.ts +6 -4
  102. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  103. package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
  104. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  105. package/node_modules/undici-types/package.json +1 -1
  106. package/node_modules/undici-types/patch.d.ts +0 -42
  107. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  108. package/node_modules/undici-types/pool.d.ts +21 -8
  109. package/node_modules/undici-types/proxy-agent.d.ts +5 -6
  110. package/node_modules/undici-types/readable.d.ts +24 -17
  111. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  112. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  113. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  114. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  115. package/node_modules/undici-types/util.d.ts +18 -0
  116. package/node_modules/undici-types/utility.d.ts +7 -0
  117. package/node_modules/undici-types/webidl.d.ts +157 -36
  118. package/node_modules/undici-types/websocket.d.ts +67 -12
  119. package/package.json +9 -60
  120. package/version.json +1 -1
  121. package/node_modules/@types/node/dom-events.d.ts +0 -122
  122. package/node_modules/@types/node/globals.global.d.ts +0 -1
  123. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  124. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  125. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  126. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  127. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  128. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  129. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  130. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  131. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
  132. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
  133. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
  134. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  135. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  136. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  137. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  138. package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
  139. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
  140. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
  141. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
  142. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  143. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
  144. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  145. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  146. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  147. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  148. package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
  149. package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  150. package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
  151. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  152. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
  153. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
  154. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  155. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  156. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  157. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  158. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  159. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  160. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  161. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
  162. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  163. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  164. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
  165. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  166. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  167. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  168. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  169. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  170. package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  171. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
  172. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
  173. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
  174. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  175. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  176. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  177. package/node_modules/argparse/CHANGELOG.md +0 -216
  178. package/node_modules/undici-types/file.d.ts +0 -39
  179. package/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,5 +1,5 @@
1
1
  /**
2
- * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
2
+ * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users
3
3
  * currently depending on the `punycode` module should switch to using the
4
4
  * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
5
5
  * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
@@ -8,15 +8,15 @@
8
8
  * can be accessed using:
9
9
  *
10
10
  * ```js
11
- * const punycode = require('punycode');
11
+ * import punycode from 'node:punycode';
12
12
  * ```
13
13
  *
14
14
  * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
15
15
  * primarily intended for use in Internationalized Domain Names. Because host
16
16
  * names in URLs are limited to ASCII characters only, Domain Names that contain
17
17
  * non-ASCII characters must be converted into ASCII using the Punycode scheme.
18
- * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
19
- * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
18
+ * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
19
+ * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`.
20
20
  *
21
21
  * The `punycode` module provides a simple implementation of the Punycode standard.
22
22
  *
@@ -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/v20.2.0/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
  /**
@@ -3,20 +3,32 @@
3
3
  * query strings. It can be accessed using:
4
4
  *
5
5
  * ```js
6
- * const querystring = require('node:querystring');
6
+ * import querystring from 'node:querystring';
7
7
  * ```
8
8
  *
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/v20.2.0/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 {
16
+ /**
17
+ * The function to use when converting URL-unsafe characters to percent-encoding in the query string.
18
+ * @default `querystring.escape()`
19
+ */
16
20
  encodeURIComponent?: ((str: string) => string) | undefined;
17
21
  }
18
22
  interface ParseOptions {
23
+ /**
24
+ * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations.
25
+ * @default 1000
26
+ */
19
27
  maxKeys?: number | undefined;
28
+ /**
29
+ * The function to use when decoding percent-encoded characters in the query string.
30
+ * @default `querystring.unescape()`
31
+ */
20
32
  decodeURIComponent?: ((str: string) => string) | undefined;
21
33
  }
22
34
  interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
@@ -25,9 +37,8 @@ declare module "querystring" {
25
37
  | string
26
38
  | number
27
39
  | boolean
28
- | readonly string[]
29
- | readonly number[]
30
- | readonly boolean[]
40
+ | bigint
41
+ | ReadonlyArray<string | number | boolean | bigint>
31
42
  | null
32
43
  >
33
44
  {}
@@ -35,7 +46,7 @@ declare module "querystring" {
35
46
  * The `querystring.stringify()` method produces a URL query string from a
36
47
  * given `obj` by iterating through the object's "own properties".
37
48
  *
38
- * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
49
+ * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
39
50
  * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
40
51
  * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
41
52
  * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
@@ -54,7 +65,7 @@ declare module "querystring" {
54
65
  * ```
55
66
  *
56
67
  * By default, characters requiring percent-encoding within the query string will
57
- * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
68
+ * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified:
58
69
  *
59
70
  * ```js
60
71
  * // Assuming gbkEncodeURIComponent function already exists,
@@ -74,14 +85,14 @@ declare module "querystring" {
74
85
  *
75
86
  * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
76
87
  *
77
- * ```js
88
+ * ```json
78
89
  * {
79
- * foo: 'bar',
80
- * abc: ['xyz', '123']
90
+ * "foo": "bar",
91
+ * "abc": ["xyz", "123"]
81
92
  * }
82
93
  * ```
83
94
  *
84
- * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
95
+ * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`,
85
96
  * `obj.hasOwnProperty()`, and others
86
97
  * are not defined and _will not work_.
87
98
  *
@@ -98,7 +109,7 @@ declare module "querystring" {
98
109
  * @since v0.1.25
99
110
  * @param str The URL query string to parse
100
111
  * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
101
- * @param [eq='='] . The substring used to delimit keys and values in the query string.
112
+ * @param [eq='='] The substring used to delimit keys and values in the query string.
102
113
  */
103
114
  function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
104
115
  /**
@@ -110,7 +121,7 @@ declare module "querystring" {
110
121
  */
111
122
  const decode: typeof parse;
112
123
  /**
113
- * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
124
+ * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL
114
125
  * query strings.
115
126
  *
116
127
  * The `querystring.escape()` method is used by `querystring.stringify()` and is
@@ -1,12 +1,16 @@
1
1
  /**
2
2
  * @since v17.0.0
3
- * @experimental
4
3
  */
5
4
  declare module "readline/promises" {
6
- import { AsyncCompleter, Completer, Direction, Interface as _Interface, ReadLineOptions } from "node:readline";
7
5
  import { Abortable } from "node:events";
6
+ import {
7
+ CompleterResult,
8
+ Direction,
9
+ Interface as _Interface,
10
+ ReadLineOptions as _ReadLineOptions,
11
+ } from "node:readline";
8
12
  /**
9
- * Instances of the `readlinePromises.Interface` class are constructed using the`readlinePromises.createInterface()` method. Every instance is associated with a
13
+ * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a
10
14
  * single `input` `Readable` stream and a single `output` `Writable` stream.
11
15
  * The `output` stream is used to print prompts for user input that arrives on,
12
16
  * and is read from, the `input` stream.
@@ -15,12 +19,12 @@ declare module "readline/promises" {
15
19
  class Interface extends _Interface {
16
20
  /**
17
21
  * The `rl.question()` method displays the `query` by writing it to the `output`,
18
- * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
22
+ * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
19
23
  *
20
24
  * When called, `rl.question()` will resume the `input` stream if it has been
21
25
  * paused.
22
26
  *
23
- * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
27
+ * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
24
28
  *
25
29
  * If the question is called after `rl.close()`, it returns a rejected promise.
26
30
  *
@@ -60,14 +64,14 @@ declare module "readline/promises" {
60
64
  constructor(
61
65
  stream: NodeJS.WritableStream,
62
66
  options?: {
63
- autoCommit?: boolean;
67
+ autoCommit?: boolean | undefined;
64
68
  },
65
69
  );
66
70
  /**
67
71
  * The `rl.clearLine()` method adds to the internal list of pending action an
68
72
  * action that clears current line of the associated `stream` in a specified
69
73
  * direction identified by `dir`.
70
- * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
74
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
71
75
  * @since v17.0.0
72
76
  * @return this
73
77
  */
@@ -76,20 +80,20 @@ declare module "readline/promises" {
76
80
  * The `rl.clearScreenDown()` method adds to the internal list of pending action an
77
81
  * action that clears the associated stream from the current position of the
78
82
  * cursor down.
79
- * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
83
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
80
84
  * @since v17.0.0
81
85
  * @return this
82
86
  */
83
87
  clearScreenDown(): this;
84
88
  /**
85
- * The `rl.commit()` method sends all the pending actions to the associated`stream` and clears the internal list of pending actions.
89
+ * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
86
90
  * @since v17.0.0
87
91
  */
88
92
  commit(): Promise<void>;
89
93
  /**
90
94
  * The `rl.cursorTo()` method adds to the internal list of pending action an action
91
95
  * that moves cursor to the specified position in the associated `stream`.
92
- * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
96
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
93
97
  * @since v17.0.0
94
98
  * @return this
95
99
  */
@@ -98,7 +102,7 @@ declare module "readline/promises" {
98
102
  * The `rl.moveCursor()` method adds to the internal list of pending action an
99
103
  * action that moves the cursor _relative_ to its current position in the
100
104
  * associated `stream`.
101
- * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
105
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
102
106
  * @since v17.0.0
103
107
  * @return this
104
108
  */
@@ -111,11 +115,18 @@ declare module "readline/promises" {
111
115
  */
112
116
  rollback(): this;
113
117
  }
118
+ type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
119
+ interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
120
+ /**
121
+ * An optional function used for Tab autocompletion.
122
+ */
123
+ completer?: Completer | undefined;
124
+ }
114
125
  /**
115
- * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface`instance.
126
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
116
127
  *
117
128
  * ```js
118
- * const readlinePromises = require('node:readline/promises');
129
+ * import readlinePromises from 'node:readline/promises';
119
130
  * const rl = readlinePromises.createInterface({
120
131
  * input: process.stdin,
121
132
  * output: process.stdout,
@@ -140,7 +151,7 @@ declare module "readline/promises" {
140
151
  function createInterface(
141
152
  input: NodeJS.ReadableStream,
142
153
  output?: NodeJS.WritableStream,
143
- completer?: Completer | AsyncCompleter,
154
+ completer?: Completer,
144
155
  terminal?: boolean,
145
156
  ): Interface;
146
157
  function createInterface(options: ReadLineOptions): Interface;
@@ -1,5 +1,6 @@
1
1
  /**
2
- * The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) 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.
3
4
  *
4
5
  * To use the promise-based APIs:
5
6
  *
@@ -13,7 +14,7 @@
13
14
  * import * as readline from 'node:readline';
14
15
  * ```
15
16
  *
16
- * The following simple example illustrates the basic use of the `node:readline`module.
17
+ * The following simple example illustrates the basic use of the `node:readline` module.
17
18
  *
18
19
  * ```js
19
20
  * import * as readline from 'node:readline/promises';
@@ -28,9 +29,9 @@
28
29
  * rl.close();
29
30
  * ```
30
31
  *
31
- * 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
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
32
33
  * received on the `input` stream.
33
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
34
35
  */
35
36
  declare module "readline" {
36
37
  import { Abortable, EventEmitter } from "node:events";
@@ -44,13 +45,13 @@ declare module "readline" {
44
45
  shift?: boolean | undefined;
45
46
  }
46
47
  /**
47
- * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
48
- * single `input` `Readable` stream and a single `output` `Writable` stream.
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-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.
49
50
  * The `output` stream is used to print prompts for user input that arrives on,
50
51
  * and is read from, the `input` stream.
51
52
  * @since v0.1.104
52
53
  */
53
- export class Interface extends EventEmitter {
54
+ export class Interface extends EventEmitter implements Disposable {
54
55
  readonly terminal: boolean;
55
56
  /**
56
57
  * The current input data being processed by node.
@@ -99,7 +100,7 @@ declare module "readline" {
99
100
  * > Instances of the `readline.Interface` class are constructed using the
100
101
  * > `readline.createInterface()` method.
101
102
  *
102
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
103
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
103
104
  */
104
105
  protected constructor(
105
106
  input: NodeJS.ReadableStream,
@@ -113,7 +114,7 @@ declare module "readline" {
113
114
  * > Instances of the `readline.Interface` class are constructed using the
114
115
  * > `readline.createInterface()` method.
115
116
  *
116
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
117
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
117
118
  */
118
119
  protected constructor(options: ReadLineOptions);
119
120
  /**
@@ -123,7 +124,7 @@ declare module "readline" {
123
124
  */
124
125
  getPrompt(): string;
125
126
  /**
126
- * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
127
+ * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called.
127
128
  * @since v0.1.98
128
129
  */
129
130
  setPrompt(prompt: string): void;
@@ -134,19 +135,19 @@ declare module "readline" {
134
135
  * When called, `rl.prompt()` will resume the `input` stream if it has been
135
136
  * paused.
136
137
  *
137
- * If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
138
+ * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written.
138
139
  * @since v0.1.98
139
140
  * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
140
141
  */
141
142
  prompt(preserveCursor?: boolean): void;
142
143
  /**
143
144
  * The `rl.question()` method displays the `query` by writing it to the `output`,
144
- * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
145
+ * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
145
146
  *
146
147
  * When called, `rl.question()` will resume the `input` stream if it has been
147
148
  * paused.
148
149
  *
149
- * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
150
+ * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
150
151
  *
151
152
  * The `callback` function passed to `rl.question()` does not follow the typical
152
153
  * pattern of accepting an `Error` object or `null` as the first argument.
@@ -188,7 +189,7 @@ declare module "readline" {
188
189
  * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
189
190
  * later if necessary.
190
191
  *
191
- * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
192
+ * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance.
192
193
  * @since v0.3.4
193
194
  */
194
195
  pause(): this;
@@ -207,6 +208,11 @@ declare module "readline" {
207
208
  * @since v0.1.98
208
209
  */
209
210
  close(): void;
211
+ /**
212
+ * Alias for `rl.close()`.
213
+ * @since v22.15.0
214
+ */
215
+ [Symbol.dispose](): void;
210
216
  /**
211
217
  * The `rl.write()` method will write either `data` or a key sequence identified
212
218
  * by `key` to the `output`. The `key` argument is supported only if `output` is
@@ -218,7 +224,7 @@ declare module "readline" {
218
224
  * When called, `rl.write()` will resume the `input` stream if it has been
219
225
  * paused.
220
226
  *
221
- * If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
227
+ * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written.
222
228
  *
223
229
  * ```js
224
230
  * rl.write('Delete this!');
@@ -226,7 +232,7 @@ declare module "readline" {
226
232
  * rl.write(null, { ctrl: true, name: 'u' });
227
233
  * ```
228
234
  *
229
- * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
235
+ * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_.
230
236
  * @since v0.1.98
231
237
  */
232
238
  write(data: string | Buffer, key?: Key): void;
@@ -251,6 +257,7 @@ declare module "readline" {
251
257
  */
252
258
  addListener(event: string, listener: (...args: any[]) => void): this;
253
259
  addListener(event: "close", listener: () => void): this;
260
+ addListener(event: "error", listener: (error: Error) => void): this;
254
261
  addListener(event: "line", listener: (input: string) => void): this;
255
262
  addListener(event: "pause", listener: () => void): this;
256
263
  addListener(event: "resume", listener: () => void): this;
@@ -260,6 +267,7 @@ declare module "readline" {
260
267
  addListener(event: "history", listener: (history: string[]) => void): this;
261
268
  emit(event: string | symbol, ...args: any[]): boolean;
262
269
  emit(event: "close"): boolean;
270
+ emit(event: "error", error: Error): boolean;
263
271
  emit(event: "line", input: string): boolean;
264
272
  emit(event: "pause"): boolean;
265
273
  emit(event: "resume"): boolean;
@@ -269,6 +277,7 @@ declare module "readline" {
269
277
  emit(event: "history", history: string[]): boolean;
270
278
  on(event: string, listener: (...args: any[]) => void): this;
271
279
  on(event: "close", listener: () => void): this;
280
+ on(event: "error", listener: (error: Error) => void): this;
272
281
  on(event: "line", listener: (input: string) => void): this;
273
282
  on(event: "pause", listener: () => void): this;
274
283
  on(event: "resume", listener: () => void): this;
@@ -278,6 +287,7 @@ declare module "readline" {
278
287
  on(event: "history", listener: (history: string[]) => void): this;
279
288
  once(event: string, listener: (...args: any[]) => void): this;
280
289
  once(event: "close", listener: () => void): this;
290
+ once(event: "error", listener: (error: Error) => void): this;
281
291
  once(event: "line", listener: (input: string) => void): this;
282
292
  once(event: "pause", listener: () => void): this;
283
293
  once(event: "resume", listener: () => void): this;
@@ -287,6 +297,7 @@ declare module "readline" {
287
297
  once(event: "history", listener: (history: string[]) => void): this;
288
298
  prependListener(event: string, listener: (...args: any[]) => void): this;
289
299
  prependListener(event: "close", listener: () => void): this;
300
+ prependListener(event: "error", listener: (error: Error) => void): this;
290
301
  prependListener(event: "line", listener: (input: string) => void): this;
291
302
  prependListener(event: "pause", listener: () => void): this;
292
303
  prependListener(event: "resume", listener: () => void): this;
@@ -296,6 +307,7 @@ declare module "readline" {
296
307
  prependListener(event: "history", listener: (history: string[]) => void): this;
297
308
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
298
309
  prependOnceListener(event: "close", listener: () => void): this;
310
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
299
311
  prependOnceListener(event: "line", listener: (input: string) => void): this;
300
312
  prependOnceListener(event: "pause", listener: () => void): this;
301
313
  prependOnceListener(event: "resume", listener: () => void): this;
@@ -303,7 +315,7 @@ declare module "readline" {
303
315
  prependOnceListener(event: "SIGINT", listener: () => void): this;
304
316
  prependOnceListener(event: "SIGTSTP", listener: () => void): this;
305
317
  prependOnceListener(event: "history", listener: (history: string[]) => void): this;
306
- [Symbol.asyncIterator](): AsyncIterableIterator<string>;
318
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
307
319
  }
308
320
  export type ReadLine = Interface; // type forwarded for backwards compatibility
309
321
  export type Completer = (line: string) => CompleterResult;
@@ -313,35 +325,84 @@ declare module "readline" {
313
325
  ) => void;
314
326
  export type CompleterResult = [string[], string];
315
327
  export interface ReadLineOptions {
328
+ /**
329
+ * The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
330
+ */
316
331
  input: NodeJS.ReadableStream;
332
+ /**
333
+ * The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
334
+ */
317
335
  output?: NodeJS.WritableStream | undefined;
336
+ /**
337
+ * An optional function used for Tab autocompletion.
338
+ */
318
339
  completer?: Completer | AsyncCompleter | undefined;
340
+ /**
341
+ * `true` if the `input` and `output` streams should be treated like a TTY,
342
+ * and have ANSI/VT100 escape codes written to it.
343
+ * Default: checking `isTTY` on the `output` stream upon instantiation.
344
+ */
319
345
  terminal?: boolean | undefined;
320
346
  /**
321
- * Initial list of history lines. This option makes sense
322
- * only if `terminal` is set to `true` by the user or by an internal `output`
323
- * check, otherwise the history caching mechanism is not initialized at all.
347
+ * Initial list of history lines.
348
+ * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
349
+ * otherwise the history caching mechanism is not initialized at all.
324
350
  * @default []
325
351
  */
326
352
  history?: string[] | undefined;
353
+ /**
354
+ * Maximum number of history lines retained.
355
+ * To disable the history set this value to `0`.
356
+ * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
357
+ * otherwise the history caching mechanism is not initialized at all.
358
+ * @default 30
359
+ */
327
360
  historySize?: number | undefined;
328
- prompt?: string | undefined;
329
- crlfDelay?: number | undefined;
330
361
  /**
331
- * If `true`, when a new input line added
332
- * to the history list duplicates an older one, this removes the older line
333
- * from the list.
362
+ * If `true`, when a new input line added to the history list duplicates an older one,
363
+ * this removes the older line from the list.
334
364
  * @default false
335
365
  */
336
366
  removeHistoryDuplicates?: boolean | undefined;
367
+ /**
368
+ * The prompt string to use.
369
+ * @default "> "
370
+ */
371
+ prompt?: string | undefined;
372
+ /**
373
+ * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
374
+ * both `\r` and `\n` will be treated as separate end-of-line input.
375
+ * `crlfDelay` will be coerced to a number no less than `100`.
376
+ * It can be set to `Infinity`, in which case
377
+ * `\r` followed by `\n` will always be considered a single newline
378
+ * (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).
379
+ * @default 100
380
+ */
381
+ crlfDelay?: number | undefined;
382
+ /**
383
+ * The duration `readline` will wait for a character
384
+ * (when reading an ambiguous key sequence in milliseconds
385
+ * one that can both form a complete key sequence using the input read so far
386
+ * and can take additional input to complete a longer key sequence).
387
+ * @default 500
388
+ */
337
389
  escapeCodeTimeout?: number | undefined;
390
+ /**
391
+ * The number of spaces a tab is equal to (minimum 1).
392
+ * @default 8
393
+ */
338
394
  tabSize?: number | undefined;
395
+ /**
396
+ * Allows closing the interface using an AbortSignal.
397
+ * Aborting the signal will internally call `close` on the interface.
398
+ */
399
+ signal?: AbortSignal | undefined;
339
400
  }
340
401
  /**
341
- * The `readline.createInterface()` method creates a new `readline.Interface`instance.
402
+ * The `readline.createInterface()` method creates a new `readline.Interface` instance.
342
403
  *
343
404
  * ```js
344
- * const readline = require('node:readline');
405
+ * import readline from 'node:readline';
345
406
  * const rl = readline.createInterface({
346
407
  * input: process.stdin,
347
408
  * output: process.stdout,
@@ -382,7 +443,7 @@ declare module "readline" {
382
443
  *
383
444
  * If the `stream` is a `TTY`, then it must be in raw mode.
384
445
  *
385
- * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
446
+ * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop
386
447
  * the `input` from emitting `'keypress'` events.
387
448
  *
388
449
  * ```js
@@ -397,7 +458,7 @@ declare module "readline" {
397
458
  * implement a small command-line interface:
398
459
  *
399
460
  * ```js
400
- * const readline = require('node:readline');
461
+ * import readline from 'node:readline';
401
462
  * const rl = readline.createInterface({
402
463
  * input: process.stdin,
403
464
  * output: process.stdout,
@@ -429,8 +490,8 @@ declare module "readline" {
429
490
  * well as a `for await...of` loop:
430
491
  *
431
492
  * ```js
432
- * const fs = require('node:fs');
433
- * const readline = require('node:readline');
493
+ * import fs from 'node:fs';
494
+ * import readline from 'node:readline';
434
495
  *
435
496
  * async function processLineByLine() {
436
497
  * const fileStream = fs.createReadStream('input.txt');
@@ -454,8 +515,8 @@ declare module "readline" {
454
515
  * Alternatively, one could use the `'line'` event:
455
516
  *
456
517
  * ```js
457
- * const fs = require('node:fs');
458
- * const readline = require('node:readline');
518
+ * import fs from 'node:fs';
519
+ * import readline from 'node:readline';
459
520
  *
460
521
  * const rl = readline.createInterface({
461
522
  * input: fs.createReadStream('sample.txt'),
@@ -467,12 +528,12 @@ declare module "readline" {
467
528
  * });
468
529
  * ```
469
530
  *
470
- * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
531
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied:
471
532
  *
472
533
  * ```js
473
- * const { once } = require('node:events');
474
- * const { createReadStream } = require('node:fs');
475
- * const { createInterface } = require('node:readline');
534
+ * import { once } from 'node:events';
535
+ * import { createReadStream } from 'node:fs';
536
+ * import { createInterface } from 'node:readline';
476
537
  *
477
538
  * (async function processLineByLine() {
478
539
  * try {
@@ -502,7 +563,7 @@ declare module "readline" {
502
563
  cols: number;
503
564
  }
504
565
  /**
505
- * The `readline.clearLine()` method clears current line of given `TTY` stream
566
+ * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
506
567
  * in a specified direction identified by `dir`.
507
568
  * @since v0.7.7
508
569
  * @param callback Invoked once the operation completes.
@@ -510,7 +571,7 @@ declare module "readline" {
510
571
  */
511
572
  export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
512
573
  /**
513
- * The `readline.clearScreenDown()` method clears the given `TTY` stream from
574
+ * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
514
575
  * the current position of the cursor down.
515
576
  * @since v0.7.7
516
577
  * @param callback Invoked once the operation completes.
@@ -519,7 +580,7 @@ declare module "readline" {
519
580
  export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
520
581
  /**
521
582
  * The `readline.cursorTo()` method moves cursor to the specified position in a
522
- * given `TTY` `stream`.
583
+ * given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
523
584
  * @since v0.7.7
524
585
  * @param callback Invoked once the operation completes.
525
586
  * @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`.
@@ -527,7 +588,7 @@ declare module "readline" {
527
588
  export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
528
589
  /**
529
590
  * The `readline.moveCursor()` method moves the cursor _relative_ to its current
530
- * position in a given `TTY` `stream`.
591
+ * position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
531
592
  * @since v0.7.7
532
593
  * @param callback Invoked once the operation completes.
533
594
  * @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`.