@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1

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
@@ -4,9 +4,9 @@
4
4
  * applications. It can be accessed using:
5
5
  *
6
6
  * ```js
7
- * const repl = require('node:repl');
7
+ * import repl from 'node:repl';
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/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";
@@ -37,12 +37,10 @@ declare module "repl" {
37
37
  terminal?: boolean | undefined;
38
38
  /**
39
39
  * The function to be used when evaluating each given line of input.
40
- * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
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.
43
- *
44
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
45
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_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
+ * section for more details.
46
44
  */
47
45
  eval?: REPLEval | undefined;
48
46
  /**
@@ -54,33 +52,33 @@ declare module "repl" {
54
52
  * If `true`, specifies that the default `writer` function should include ANSI color
55
53
  * styling to REPL output. If a custom `writer` function is provided then this has no
56
54
  * effect.
57
- * Default: the REPL instance's `terminal` value.
55
+ * @default the REPL instance's `terminal` value
58
56
  */
59
57
  useColors?: boolean | undefined;
60
58
  /**
61
59
  * If `true`, specifies that the default evaluation function will use the JavaScript
62
60
  * `global` as the context as opposed to creating a new separate context for the REPL
63
61
  * instance. The node CLI REPL sets this value to `true`.
64
- * Default: `false`.
62
+ * @default false
65
63
  */
66
64
  useGlobal?: boolean | undefined;
67
65
  /**
68
66
  * If `true`, specifies that the default writer will not output the return value of a
69
67
  * command if it evaluates to `undefined`.
70
- * Default: `false`.
68
+ * @default false
71
69
  */
72
70
  ignoreUndefined?: boolean | undefined;
73
71
  /**
74
72
  * The function to invoke to format the output of each command before writing to `output`.
75
- * Default: a wrapper for `util.inspect`.
73
+ * @default a wrapper for `util.inspect`
76
74
  *
77
- * @see https://nodejs.org/dist/latest-v20.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
78
76
  */
79
77
  writer?: REPLWriter | undefined;
80
78
  /**
81
79
  * An optional function used for custom Tab auto completion.
82
80
  *
83
- * @see https://nodejs.org/dist/latest-v20.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
84
82
  */
85
83
  completer?: Completer | AsyncCompleter | undefined;
86
84
  /**
@@ -95,7 +93,7 @@ declare module "repl" {
95
93
  /**
96
94
  * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
97
95
  * pressed. This cannot be used together with a custom `eval` function.
98
- * Default: `false`.
96
+ * @default false
99
97
  */
100
98
  breakEvalOnSigint?: boolean | undefined;
101
99
  }
@@ -125,12 +123,18 @@ declare module "repl" {
125
123
  */
126
124
  action: REPLCommandAction;
127
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
+ }
128
132
  /**
129
133
  * Instances of `repl.REPLServer` are created using the {@link start} method
130
134
  * or directly using the JavaScript `new` keyword.
131
135
  *
132
136
  * ```js
133
- * const repl = require('node:repl');
137
+ * import repl from 'node:repl';
134
138
  *
135
139
  * const options = { useColors: true };
136
140
  *
@@ -168,33 +172,33 @@ declare module "repl" {
168
172
  /**
169
173
  * A value indicating whether the REPL is currently in "editor mode".
170
174
  *
171
- * @see https://nodejs.org/dist/latest-v20.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
172
176
  */
173
177
  readonly editorMode: boolean;
174
178
  /**
175
179
  * A value indicating whether the `_` variable has been assigned.
176
180
  *
177
- * @see https://nodejs.org/dist/latest-v20.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
178
182
  */
179
183
  readonly underscoreAssigned: boolean;
180
184
  /**
181
185
  * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
182
186
  *
183
- * @see https://nodejs.org/dist/latest-v20.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
184
188
  */
185
189
  readonly last: any;
186
190
  /**
187
191
  * A value indicating whether the `_error` variable has been assigned.
188
192
  *
189
193
  * @since v9.8.0
190
- * @see https://nodejs.org/dist/latest-v20.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
191
195
  */
192
196
  readonly underscoreErrAssigned: boolean;
193
197
  /**
194
198
  * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
195
199
  *
196
200
  * @since v9.8.0
197
- * @see https://nodejs.org/dist/latest-v20.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
198
202
  */
199
203
  readonly lastError: any;
200
204
  /**
@@ -246,18 +250,18 @@ declare module "repl" {
246
250
  *
247
251
  * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
248
252
  *
249
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
253
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver
250
254
  */
251
255
  private constructor();
252
256
  /**
253
257
  * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
254
- * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
258
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
255
259
  * properties:
256
260
  *
257
261
  * The following example shows two new commands added to the REPL instance:
258
262
  *
259
263
  * ```js
260
- * const repl = require('node:repl');
264
+ * import repl from 'node:repl';
261
265
  *
262
266
  * const replServer = repl.start({ prompt: '> ' });
263
267
  * replServer.defineCommand('sayhello', {
@@ -289,22 +293,22 @@ declare module "repl" {
289
293
  defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
290
294
  /**
291
295
  * The `replServer.displayPrompt()` method readies the REPL instance for input
292
- * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
296
+ * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
293
297
  *
294
- * 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
295
299
  * 'prompt'.
296
300
  *
297
301
  * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
298
302
  *
299
303
  * The `replServer.displayPrompt` method is primarily intended to be called from
300
- * within the action function for commands registered using the`replServer.defineCommand()` method.
304
+ * within the action function for commands registered using the `replServer.defineCommand()` method.
301
305
  * @since v0.1.91
302
306
  */
303
307
  displayPrompt(preserveCursor?: boolean): void;
304
308
  /**
305
309
  * The `replServer.clearBufferedCommand()` method clears any command that has been
306
310
  * buffered but not yet executed. This method is primarily intended to be
307
- * called from within the action function for commands registered using the`replServer.defineCommand()` method.
311
+ * called from within the action function for commands registered using the `replServer.defineCommand()` method.
308
312
  * @since v9.0.0
309
313
  */
310
314
  clearBufferedCommand(): void;
@@ -318,7 +322,11 @@ declare module "repl" {
318
322
  * @param historyPath the path to the history file
319
323
  * @param callback called when history writes are ready or upon error
320
324
  */
321
- 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;
322
330
  /**
323
331
  * events.EventEmitter
324
332
  * 1. close - inherited from `readline.Interface`
@@ -407,7 +415,7 @@ declare module "repl" {
407
415
  * If `options` is a string, then it specifies the input prompt:
408
416
  *
409
417
  * ```js
410
- * const repl = require('node:repl');
418
+ * import repl from 'node:repl';
411
419
  *
412
420
  * // a Unix style prompt
413
421
  * repl.start('$ ');
@@ -418,7 +426,7 @@ declare module "repl" {
418
426
  /**
419
427
  * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
420
428
  *
421
- * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
429
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors
422
430
  */
423
431
  class Recoverable extends SyntaxError {
424
432
  err: Error;
@@ -0,0 +1,162 @@
1
+ /**
2
+ * This feature allows the distribution of a Node.js application conveniently to a
3
+ * system that does not have Node.js installed.
4
+ *
5
+ * Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing
6
+ * the injection of a blob prepared by Node.js, which can contain a bundled script,
7
+ * into the `node` binary. During start up, the program checks if anything has been
8
+ * injected. If the blob is found, it executes the script in the blob. Otherwise
9
+ * Node.js operates as it normally does.
10
+ *
11
+ * The single executable application feature currently only supports running a
12
+ * single embedded script using the `CommonJS` module system.
13
+ *
14
+ * Users can create a single executable application from their bundled script
15
+ * with the `node` binary itself and any tool which can inject resources into the
16
+ * binary.
17
+ *
18
+ * Here are the steps for creating a single executable application using one such
19
+ * tool, [postject](https://github.com/nodejs/postject):
20
+ *
21
+ * 1. Create a JavaScript file:
22
+ * ```bash
23
+ * echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
24
+ * ```
25
+ * 2. Create a configuration file building a blob that can be injected into the
26
+ * single executable application (see `Generating single executable preparation blobs` for details):
27
+ * ```bash
28
+ * echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json
29
+ * ```
30
+ * 3. Generate the blob to be injected:
31
+ * ```bash
32
+ * node --experimental-sea-config sea-config.json
33
+ * ```
34
+ * 4. Create a copy of the `node` executable and name it according to your needs:
35
+ * * On systems other than Windows:
36
+ * ```bash
37
+ * cp $(command -v node) hello
38
+ * ```
39
+ * * On Windows:
40
+ * ```text
41
+ * node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')"
42
+ * ```
43
+ * The `.exe` extension is necessary.
44
+ * 5. Remove the signature of the binary (macOS and Windows only):
45
+ * * On macOS:
46
+ * ```bash
47
+ * codesign --remove-signature hello
48
+ * ```
49
+ * * On Windows (optional):
50
+ * [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/).
51
+ * If this step is
52
+ * skipped, ignore any signature-related warning from postject.
53
+ * ```powershell
54
+ * signtool remove /s hello.exe
55
+ * ```
56
+ * 6. Inject the blob into the copied binary by running `postject` with
57
+ * the following options:
58
+ * * `hello` / `hello.exe` \- The name of the copy of the `node` executable
59
+ * created in step 4.
60
+ * * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary
61
+ * where the contents of the blob will be stored.
62
+ * * `sea-prep.blob` \- The name of the blob created in step 1.
63
+ * * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been
64
+ * injected.
65
+ * * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the
66
+ * segment in the binary where the contents of the blob will be
67
+ * stored.
68
+ * To summarize, here is the required command for each platform:
69
+ * * On Linux:
70
+ * ```bash
71
+ * npx postject hello NODE_SEA_BLOB sea-prep.blob \
72
+ * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
73
+ * ```
74
+ * * On Windows - PowerShell:
75
+ * ```powershell
76
+ * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob `
77
+ * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
78
+ * ```
79
+ * * On Windows - Command Prompt:
80
+ * ```text
81
+ * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^
82
+ * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
83
+ * ```
84
+ * * On macOS:
85
+ * ```bash
86
+ * npx postject hello NODE_SEA_BLOB sea-prep.blob \
87
+ * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
88
+ * --macho-segment-name NODE_SEA
89
+ * ```
90
+ * 7. Sign the binary (macOS and Windows only):
91
+ * * On macOS:
92
+ * ```bash
93
+ * codesign --sign - hello
94
+ * ```
95
+ * * On Windows (optional):
96
+ * A certificate needs to be present for this to work. However, the unsigned
97
+ * binary would still be runnable.
98
+ * ```powershell
99
+ * signtool sign /fd SHA256 hello.exe
100
+ * ```
101
+ * 8. Run the binary:
102
+ * * On systems other than Windows
103
+ * ```console
104
+ * $ ./hello world
105
+ * Hello, world!
106
+ * ```
107
+ * * On Windows
108
+ * ```console
109
+ * $ .\hello.exe world
110
+ * Hello, world!
111
+ * ```
112
+ * @since v19.7.0, v18.16.0
113
+ * @experimental
114
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/src/node_sea.cc)
115
+ */
116
+ declare module "node:sea" {
117
+ type AssetKey = string;
118
+ /**
119
+ * @since v20.12.0
120
+ * @return Whether this script is running inside a single-executable application.
121
+ */
122
+ function isSea(): boolean;
123
+ /**
124
+ * This method can be used to retrieve the assets configured to be bundled into the
125
+ * single-executable application at build time.
126
+ * An error is thrown when no matching asset can be found.
127
+ * @since v20.12.0
128
+ */
129
+ function getAsset(key: AssetKey): ArrayBuffer;
130
+ function getAsset(key: AssetKey, encoding: string): string;
131
+ /**
132
+ * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
133
+ * An error is thrown when no matching asset can be found.
134
+ * @since v20.12.0
135
+ */
136
+ function getAssetAsBlob(key: AssetKey, options?: {
137
+ type: string;
138
+ }): Blob;
139
+ /**
140
+ * This method can be used to retrieve the assets configured to be bundled into the
141
+ * single-executable application at build time.
142
+ * An error is thrown when no matching asset can be found.
143
+ *
144
+ * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not
145
+ * return a copy. Instead, it returns the raw asset bundled inside the executable.
146
+ *
147
+ * For now, users should avoid writing to the returned array buffer. If the
148
+ * injected section is not marked as writable or not aligned properly,
149
+ * writes to the returned array buffer is likely to result in a crash.
150
+ * @since v20.12.0
151
+ */
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[];
162
+ }