aws-delivlib 15.4.0 → 15.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
  2. package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
  3. package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
  4. package/lib/package-integrity/handler/validate.bundle.js +11361 -9248
  5. package/lib/publishing/github/node_modules/.yarn-integrity +5 -5
  6. package/lib/publishing/github/node_modules/@types/aws-lambda/README.md +1 -1
  7. package/lib/publishing/github/node_modules/@types/aws-lambda/package.json +2 -2
  8. package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +2 -2
  9. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +3 -3
  10. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +13 -56
  11. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +189 -190
  12. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +151 -43
  13. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +12 -13
  14. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +103 -237
  15. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +40 -155
  16. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +238 -384
  17. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +45 -404
  18. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +3 -10
  19. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +1019 -1600
  20. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +133 -81
  21. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
  22. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +9 -15
  23. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +136 -183
  24. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +12 -32
  25. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +872 -840
  26. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ffi.d.ts +500 -0
  27. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +256 -85
  28. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +865 -525
  29. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +12 -34
  30. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +63 -0
  31. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +433 -312
  32. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +548 -893
  33. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +64 -243
  34. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +25 -7
  35. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +35 -0
  36. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +70 -58
  37. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +764 -410
  38. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +54 -219
  39. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +224 -226
  40. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +41 -49
  41. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +13 -18
  42. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +8 -0
  43. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +8 -0
  44. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +119 -141
  45. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +339 -690
  46. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +390 -205
  47. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +3 -31
  48. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +3 -16
  49. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +2191 -0
  50. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +3 -6
  51. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +66 -152
  52. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +101 -109
  53. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +1 -116
  54. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +486 -68
  55. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +91 -15
  56. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +449 -0
  57. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +136 -15
  58. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +197 -454
  59. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +603 -491
  60. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +3 -43
  61. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +60 -0
  62. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +585 -292
  63. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +3 -18
  64. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +3 -141
  65. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +180 -267
  66. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +3 -97
  67. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
  68. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  69. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
  70. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +26 -6
  71. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  72. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +118 -0
  73. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +61 -43
  74. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +156 -584
  75. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +558 -0
  76. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +173 -1099
  77. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +175 -36
  78. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vfs.d.ts +211 -0
  79. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +293 -209
  80. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +24 -74
  81. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  82. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  83. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +9 -0
  84. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  85. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  86. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  87. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +9 -0
  88. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
  89. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  90. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  91. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  92. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  93. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +97 -0
  94. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  95. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +24 -0
  96. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +260 -407
  97. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +131 -0
  98. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +782 -165
  99. package/lib/publishing/github/node_modules/semver/classes/range.js +2 -2
  100. package/lib/publishing/github/node_modules/semver/internal/constants.js +30 -0
  101. package/lib/publishing/github/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  102. package/lib/publishing/github/node_modules/semver/package.json +1 -1
  103. package/lib/publishing/github/node_modules/undici-types/agent.d.ts +12 -13
  104. package/lib/publishing/github/node_modules/undici-types/api.d.ts +26 -26
  105. package/lib/publishing/github/node_modules/undici-types/balanced-pool.d.ts +13 -12
  106. package/lib/publishing/github/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  107. package/lib/publishing/github/node_modules/undici-types/client-stats.d.ts +15 -0
  108. package/lib/publishing/github/node_modules/undici-types/client.d.ts +63 -37
  109. package/lib/publishing/github/node_modules/undici-types/connector.d.ts +5 -2
  110. package/lib/publishing/github/node_modules/undici-types/cookies.d.ts +3 -1
  111. package/lib/publishing/github/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  112. package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +136 -139
  113. package/lib/publishing/github/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  114. package/lib/publishing/github/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  115. package/lib/publishing/github/node_modules/undici-types/errors.d.ts +92 -54
  116. package/lib/publishing/github/node_modules/undici-types/eventsource.d.ts +9 -4
  117. package/lib/publishing/github/node_modules/undici-types/fetch.d.ts +51 -25
  118. package/lib/publishing/github/node_modules/undici-types/formdata.d.ts +7 -7
  119. package/lib/publishing/github/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  120. package/lib/publishing/github/node_modules/undici-types/global-origin.d.ts +5 -5
  121. package/lib/publishing/github/node_modules/undici-types/h2c-client.d.ts +73 -0
  122. package/lib/publishing/github/node_modules/undici-types/handlers.d.ts +10 -9
  123. package/lib/publishing/github/node_modules/undici-types/header.d.ts +162 -1
  124. package/lib/publishing/github/node_modules/undici-types/index.d.ts +69 -47
  125. package/lib/publishing/github/node_modules/undici-types/interceptors.d.ts +72 -9
  126. package/lib/publishing/github/node_modules/undici-types/mock-agent.d.ts +36 -18
  127. package/lib/publishing/github/node_modules/undici-types/mock-call-history.d.ts +111 -0
  128. package/lib/publishing/github/node_modules/undici-types/mock-client.d.ts +6 -4
  129. package/lib/publishing/github/node_modules/undici-types/mock-errors.d.ts +3 -3
  130. package/lib/publishing/github/node_modules/undici-types/mock-interceptor.d.ts +26 -21
  131. package/lib/publishing/github/node_modules/undici-types/mock-pool.d.ts +6 -4
  132. package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
  133. package/lib/publishing/github/node_modules/undici-types/patch.d.ts +0 -4
  134. package/lib/publishing/github/node_modules/undici-types/pool-stats.d.ts +8 -8
  135. package/lib/publishing/github/node_modules/undici-types/pool.d.ts +14 -14
  136. package/lib/publishing/github/node_modules/undici-types/proxy-agent.d.ts +14 -6
  137. package/lib/publishing/github/node_modules/undici-types/readable.d.ts +19 -16
  138. package/lib/publishing/github/node_modules/undici-types/retry-agent.d.ts +1 -1
  139. package/lib/publishing/github/node_modules/undici-types/retry-handler.d.ts +19 -10
  140. package/lib/publishing/github/node_modules/undici-types/round-robin-pool.d.ts +39 -0
  141. package/lib/publishing/github/node_modules/undici-types/snapshot-agent.d.ts +113 -0
  142. package/lib/publishing/github/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  143. package/lib/publishing/github/node_modules/undici-types/util.d.ts +3 -3
  144. package/lib/publishing/github/node_modules/undici-types/utility.d.ts +7 -0
  145. package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +148 -30
  146. package/lib/publishing/github/node_modules/undici-types/websocket.d.ts +48 -10
  147. package/lib/shellable.d.ts +7 -3
  148. package/lib/shellable.js +44 -30
  149. package/package.json +11 -11
  150. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  151. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/index.d.ts +0 -9
  152. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  153. package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  154. package/lib/publishing/github/node_modules/undici-types/file.d.ts +0 -39
  155. package/lib/publishing/github/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,9 +1,8 @@
1
- declare module "process" {
1
+ declare module "node:process" {
2
2
  import { Control, MessageOptions, SendHandle } from "node:child_process";
3
3
  import { PathLike } from "node:fs";
4
4
  import * as tty from "node:tty";
5
5
  import { Worker } from "node:worker_threads";
6
-
7
6
  interface BuiltInModule {
8
7
  "assert": typeof import("assert");
9
8
  "node:assert": typeof import("node:assert");
@@ -35,6 +34,7 @@ declare module "process" {
35
34
  "node:domain": typeof import("node:domain");
36
35
  "events": typeof import("events");
37
36
  "node:events": typeof import("node:events");
37
+ "node:ffi": typeof import("node:ffi");
38
38
  "fs": typeof import("fs");
39
39
  "node:fs": typeof import("node:fs");
40
40
  "fs/promises": typeof import("fs/promises");
@@ -69,6 +69,7 @@ declare module "process" {
69
69
  "node:punycode": typeof import("node:punycode");
70
70
  "querystring": typeof import("querystring");
71
71
  "node:querystring": typeof import("node:querystring");
72
+ "node:quic": typeof import("node:quic");
72
73
  "readline": typeof import("readline");
73
74
  "node:readline": typeof import("node:readline");
74
75
  "readline/promises": typeof import("readline/promises");
@@ -81,6 +82,8 @@ declare module "process" {
81
82
  "node:stream": typeof import("node:stream");
82
83
  "stream/consumers": typeof import("stream/consumers");
83
84
  "node:stream/consumers": typeof import("node:stream/consumers");
85
+ "stream/iter": typeof import("stream/iter");
86
+ "node:stream/iter": typeof import("node:stream/iter");
84
87
  "stream/promises": typeof import("stream/promises");
85
88
  "node:stream/promises": typeof import("node:stream/promises");
86
89
  "stream/web": typeof import("stream/web");
@@ -103,12 +106,11 @@ declare module "process" {
103
106
  "node:url": typeof import("node:url");
104
107
  "util": typeof import("util");
105
108
  "node:util": typeof import("node:util");
106
- "sys": typeof import("util");
107
- "node:sys": typeof import("node:util");
108
109
  "util/types": typeof import("util/types");
109
110
  "node:util/types": typeof import("node:util/types");
110
111
  "v8": typeof import("v8");
111
112
  "node:v8": typeof import("node:v8");
113
+ "node:vfs": typeof import("node:vfs");
112
114
  "vm": typeof import("vm");
113
115
  "node:vm": typeof import("node:vm");
114
116
  "wasi": typeof import("wasi");
@@ -118,8 +120,28 @@ declare module "process" {
118
120
  "zlib": typeof import("zlib");
119
121
  "node:zlib": typeof import("node:zlib");
120
122
  }
123
+ type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] };
124
+ interface ProcessEventMap extends SignalsEventMap {
125
+ "beforeExit": [code: number];
126
+ "disconnect": [];
127
+ "exit": [code: number];
128
+ "message": [
129
+ message: object | boolean | number | string | null,
130
+ sendHandle: SendHandle | undefined,
131
+ ];
132
+ "rejectionHandled": [promise: Promise<unknown>];
133
+ "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
134
+ "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
135
+ "unhandledRejection": [reason: unknown, promise: Promise<unknown>];
136
+ "warning": [warning: Error];
137
+ "worker": [worker: Worker];
138
+ "workerMessage": [value: any, source: number];
139
+ }
121
140
  global {
122
141
  var process: NodeJS.Process;
142
+ namespace process {
143
+ export { ProcessEventMap };
144
+ }
123
145
  namespace NodeJS {
124
146
  // this namespace merge is here because these are specifically used
125
147
  // as the type for process.stdin, process.stdout, and process.stderr.
@@ -196,7 +218,7 @@ declare module "process" {
196
218
  readonly ipv6: boolean;
197
219
  /**
198
220
  * A boolean value that is `true` if the current Node.js build supports
199
- * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v22.x/api/modules.md#loading-ecmascript-modules-using-require).
221
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v26.x/api/modules.md#loading-ecmascript-modules-using-require).
200
222
  * @since v22.10.0
201
223
  */
202
224
  readonly require_module: boolean;
@@ -233,12 +255,11 @@ declare module "process" {
233
255
  */
234
256
  readonly tls_sni: boolean;
235
257
  /**
236
- * A value that is `"strip"` by default,
237
- * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
238
- * Node.js is run with `--no-experimental-strip-types`.
258
+ * A value that is `"strip"` by default, and `false` if
259
+ * Node.js is run with `--no-strip-types`.
239
260
  * @since v22.10.0
240
261
  */
241
- readonly typescript: "strip" | "transform" | false;
262
+ readonly typescript: "strip" | false;
242
263
  /**
243
264
  * A boolean value that is `true` if the current Node.js build includes support for libuv.
244
265
  *
@@ -277,10 +298,8 @@ declare module "process" {
277
298
  | "loong64"
278
299
  | "mips"
279
300
  | "mipsel"
280
- | "ppc"
281
301
  | "ppc64"
282
302
  | "riscv64"
283
- | "s390"
284
303
  | "s390x"
285
304
  | "x64";
286
305
  type Signals =
@@ -322,26 +341,129 @@ declare module "process" {
322
341
  | "SIGLOST"
323
342
  | "SIGINFO";
324
343
  type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
325
- type MultipleResolveType = "resolve" | "reject";
326
- type BeforeExitListener = (code: number) => void;
327
- type DisconnectListener = () => void;
328
- type ExitListener = (code: number) => void;
329
- type RejectionHandledListener = (promise: Promise<unknown>) => void;
330
- type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
331
344
  /**
332
- * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
333
- * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
345
+ * @deprecated Global listener types will be removed in a future version.
346
+ * Callbacks passed directly to `process`'s EventEmitter methods
347
+ * have their parameter types inferred automatically.
348
+ *
349
+ * `process` event types are also available via `ProcessEventMap`:
350
+ *
351
+ * ```ts
352
+ * import type { ProcessEventMap } from 'node:process';
353
+ * const listener = (...args: ProcessEventMap['beforeExit']) => { ... };
354
+ * ```
355
+ */
356
+ type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void;
357
+ /**
358
+ * @deprecated Global listener types will be removed in a future version.
359
+ * Callbacks passed directly to `process`'s EventEmitter methods
360
+ * have their parameter types inferred automatically.
361
+ *
362
+ * `process` event types are also available via `ProcessEventMap`:
363
+ *
364
+ * ```ts
365
+ * import type { ProcessEventMap } from 'node:process';
366
+ * const listener = (...args: ProcessEventMap['disconnect']) => { ... };
367
+ * ```
368
+ */
369
+ type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void;
370
+ /**
371
+ * @deprecated Global listener types will be removed in a future version.
372
+ * Callbacks passed directly to `process`'s EventEmitter methods
373
+ * have their parameter types inferred automatically.
374
+ *
375
+ * `process` event types are also available via `ProcessEventMap`:
376
+ *
377
+ * ```ts
378
+ * import type { ProcessEventMap } from 'node:process';
379
+ * const listener = (...args: ProcessEventMap['exit']) => { ... };
380
+ * ```
381
+ */
382
+ type ExitListener = (...args: ProcessEventMap["exit"]) => void;
383
+ /**
384
+ * @deprecated Global listener types will be removed in a future version.
385
+ * Callbacks passed directly to `process`'s EventEmitter methods
386
+ * have their parameter types inferred automatically.
387
+ *
388
+ * `process` event types are also available via `ProcessEventMap`:
389
+ *
390
+ * ```ts
391
+ * import type { ProcessEventMap } from 'node:process';
392
+ * const listener = (...args: ProcessEventMap['message']) => { ... };
393
+ * ```
394
+ */
395
+ type MessageListener = (...args: ProcessEventMap["message"]) => void;
396
+ /**
397
+ * @deprecated Global listener types will be removed in a future version.
398
+ * Callbacks passed directly to `process`'s EventEmitter methods
399
+ * have their parameter types inferred automatically.
400
+ *
401
+ * `process` event types are also available via `ProcessEventMap`:
402
+ *
403
+ * ```ts
404
+ * import type { ProcessEventMap } from 'node:process';
405
+ * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... };
406
+ * ```
407
+ */
408
+ type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void;
409
+ /**
410
+ * @deprecated Global listener types will be removed in a future version.
411
+ * Callbacks passed directly to `process`'s EventEmitter methods
412
+ * have their parameter types inferred automatically.
334
413
  */
335
- type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
336
- type WarningListener = (warning: Error) => void;
337
- type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
338
414
  type SignalsListener = (signal: Signals) => void;
339
- type MultipleResolveListener = (
340
- type: MultipleResolveType,
341
- promise: Promise<unknown>,
342
- value: unknown,
343
- ) => void;
344
- type WorkerListener = (worker: Worker) => void;
415
+ /**
416
+ * @deprecated Global listener types will be removed in a future version.
417
+ * Callbacks passed directly to `process`'s EventEmitter methods
418
+ * have their parameter types inferred automatically.
419
+ *
420
+ * `process` event types are also available via `ProcessEventMap`:
421
+ *
422
+ * ```ts
423
+ * import type { ProcessEventMap } from 'node:process';
424
+ * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... };
425
+ * ```
426
+ */
427
+ type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void;
428
+ /**
429
+ * @deprecated Global listener types will be removed in a future version.
430
+ * Callbacks passed directly to `process`'s EventEmitter methods
431
+ * have their parameter types inferred automatically.
432
+ *
433
+ * `process` event types are also available via `ProcessEventMap`:
434
+ *
435
+ * ```ts
436
+ * import type { ProcessEventMap } from 'node:process';
437
+ * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... };
438
+ * ```
439
+ */
440
+ type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void;
441
+ /**
442
+ * @deprecated Global listener types will be removed in a future version.
443
+ * Callbacks passed directly to `process`'s EventEmitter methods
444
+ * have their parameter types inferred automatically.
445
+ *
446
+ * `process` event types are also available via `ProcessEventMap`:
447
+ *
448
+ * ```ts
449
+ * import type { ProcessEventMap } from 'node:process';
450
+ * const listener = (...args: ProcessEventMap['warning']) => { ... };
451
+ * ```
452
+ */
453
+ type WarningListener = (...args: ProcessEventMap["warning"]) => void;
454
+ /**
455
+ * @deprecated Global listener types will be removed in a future version.
456
+ * Callbacks passed directly to `process`'s EventEmitter methods
457
+ * have their parameter types inferred automatically.
458
+ *
459
+ * `process` event types are also available via `ProcessEventMap`:
460
+ *
461
+ * ```ts
462
+ * import type { ProcessEventMap } from 'node:process';
463
+ * const listener = (...args: ProcessEventMap['worker']) => { ... };
464
+ * ```
465
+ */
466
+ type WorkerListener = (...args: ProcessEventMap["worker"]) => void;
345
467
  interface Socket extends ReadWriteStream {
346
468
  isTTY?: true | undefined;
347
469
  }
@@ -428,6 +550,58 @@ declare module "process" {
428
550
  * @since v20.0.0
429
551
  */
430
552
  has(scope: string, reference?: string): boolean;
553
+ /**
554
+ * Drops the specified permission from the current process. This operation is
555
+ * **irreversible** — once a permission is dropped, it cannot be restored through
556
+ * any Node.js API.
557
+ *
558
+ * If no reference is provided, the entire scope is dropped. For example,
559
+ * `process.permission.drop('fs.read')` will revoke ALL file system read
560
+ * permissions.
561
+ *
562
+ * When a reference is provided, only the permission for that specific resource
563
+ * is dropped. For example, `process.permission.drop('fs.read', '/etc/myapp')`
564
+ * will revoke read access to that directory while keeping other read
565
+ * permissions intact.
566
+ *
567
+ * **Important:** You can only drop the exact resource that was explicitly
568
+ * granted. The reference passed to `drop()` must match the original grant:
569
+ *
570
+ * * If a permission was granted using a wildcard (`*`), such as
571
+ * `--allow-fs-read=*`, individual paths cannot be dropped - only the entire
572
+ * scope can be dropped (by calling `drop()` without a reference).
573
+ * * If a directory was granted (e.g. `--allow-fs-read=/my/folder`), you cannot
574
+ * drop access to individual files inside it. You must drop the same directory
575
+ * that was granted. Any remaining grants continue to apply.
576
+ *
577
+ * The available scopes are the same as [`process.permission.has()`][]:
578
+ *
579
+ * `fs` - All File System (drops both read and write)
580
+ * * `fs.read` - File System read operations
581
+ * * `fs.write` - File System write operations
582
+ * * `child` - Child process spawning operations
583
+ * * `worker` - Worker thread spawning operation
584
+ * * `net` - Network operations
585
+ * * `inspector` - Inspector operations
586
+ * * `wasi` - WASI operations
587
+ * * `addon` - Native addon operations
588
+ *
589
+ * ```js
590
+ * const fs = require('node:fs');
591
+ *
592
+ * // Read configuration during startup
593
+ * const config = fs.readFileSync('/etc/myapp/config.json', 'utf8');
594
+ *
595
+ * // Drop read access to the config directory after initialization
596
+ * process.permission.drop('fs.read', '/etc/myapp');
597
+ *
598
+ * // This will now throw ERR_ACCESS_DENIED
599
+ * fs.readFileSync('/etc/myapp/config.json');
600
+ * ```
601
+ * @since v26.3.0
602
+ * @experimental
603
+ */
604
+ drop(scope: string, reference?: string): void;
431
605
  }
432
606
  interface ProcessReport {
433
607
  /**
@@ -610,7 +784,8 @@ declare module "process" {
610
784
  * arguments passed when the Node.js process was launched. The first element will
611
785
  * be {@link execPath}. See `process.argv0` if access to the original value
612
786
  * of `argv[0]` is needed. The second element will be the path to the JavaScript
613
- * file being executed. The remaining elements will be any additional command-line
787
+ * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v26.x/api/cli.html#program-entry-point) was provided, the second element
788
+ * will be the absolute path to it. The remaining elements are additional command-line
614
789
  * arguments.
615
790
  *
616
791
  * For example, assuming the following script for `process-args.js`:
@@ -669,14 +844,14 @@ declare module "process" {
669
844
  *
670
845
  * Results in `process.execArgv`:
671
846
  *
672
- * ```js
847
+ * ```json
673
848
  * ["--icu-data-dir=./foo", "--require", "./bar.js"]
674
849
  * ```
675
850
  *
676
851
  * And `process.argv`:
677
852
  *
678
- * ```js
679
- * ['/usr/local/bin/node', 'script.js', '--version']
853
+ * ```json
854
+ * ["/usr/local/bin/node", "script.js", "--version"]
680
855
  * ```
681
856
  *
682
857
  * Refer to `Worker constructor` for the detailed behavior of worker
@@ -688,8 +863,8 @@ declare module "process" {
688
863
  * The `process.execPath` property returns the absolute pathname of the executable
689
864
  * that started the Node.js process. Symbolic links, if any, are resolved.
690
865
  *
691
- * ```js
692
- * '/usr/local/bin/node'
866
+ * ```json
867
+ * "/usr/local/bin/node"
693
868
  * ```
694
869
  * @since v0.1.100
695
870
  */
@@ -702,6 +877,28 @@ declare module "process" {
702
877
  * @since v0.7.0
703
878
  */
704
879
  abort(): never;
880
+ /**
881
+ * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback
882
+ * that will be invoked when an uncaught exception occurs, receiving the exception
883
+ * value as its first argument.
884
+ *
885
+ * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows
886
+ * multiple callbacks to be registered and does not conflict with the
887
+ * [`domain`](https://nodejs.org/docs/latest-v26.x/api/domain.html) module. Callbacks are called in reverse order of registration
888
+ * (most recent first). If a callback returns `true`, subsequent callbacks
889
+ * and the default uncaught exception handling are skipped.
890
+ *
891
+ * ```js
892
+ * import process from 'node:process';
893
+ *
894
+ * process.addUncaughtExceptionCaptureCallback((err) => {
895
+ * console.error('Caught exception:', err.message);
896
+ * return true; // Indicates exception was handled
897
+ * });
898
+ * ```
899
+ * @since v25.9.0
900
+ */
901
+ addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void;
705
902
  /**
706
903
  * The `process.chdir()` method changes the current working directory of the
707
904
  * Node.js process or throws an exception if doing so fails (for instance, if
@@ -751,7 +948,7 @@ declare module "process" {
751
948
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
752
949
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
753
950
  *
754
- * 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)`
951
+ * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v26.x/api/os.html#dlopen-constants)`
755
952
  * documentation for details.
756
953
  *
757
954
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -850,18 +1047,18 @@ declare module "process" {
850
1047
  *
851
1048
  * An example of this object looks like:
852
1049
  *
853
- * ```js
1050
+ * ```json
854
1051
  * {
855
- * TERM: 'xterm-256color',
856
- * SHELL: '/usr/local/bin/bash',
857
- * USER: 'maciej',
858
- * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
859
- * PWD: '/Users/maciej',
860
- * EDITOR: 'vim',
861
- * SHLVL: '1',
862
- * HOME: '/Users/maciej',
863
- * LOGNAME: 'maciej',
864
- * _: '/usr/local/bin/node'
1052
+ * "TERM": "xterm-256color",
1053
+ * "SHELL": "/usr/local/bin/bash",
1054
+ * "USER": "maciej",
1055
+ * "PATH": "~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin",
1056
+ * "PWD": "/Users/maciej",
1057
+ * "EDITOR": "vim",
1058
+ * "SHLVL": "1",
1059
+ * "HOME": "/Users/maciej",
1060
+ * "LOGNAME": "maciej",
1061
+ * "_": "/usr/local/bin/node"
865
1062
  * }
866
1063
  * ```
867
1064
  *
@@ -1298,10 +1495,11 @@ declare module "process" {
1298
1495
  * method with a non-`null` argument while another capture function is set will
1299
1496
  * throw an error.
1300
1497
  *
1301
- * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
1498
+ * To register multiple callbacks that can coexist, use
1499
+ * `process.addUncaughtExceptionCaptureCallback()` instead.
1302
1500
  * @since v9.3.0
1303
1501
  */
1304
- setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
1502
+ setUncaughtExceptionCaptureCallback(cb: ((err: unknown) => void) | null): void;
1305
1503
  /**
1306
1504
  * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
1307
1505
  * @since v9.3.0
@@ -1354,30 +1552,35 @@ declare module "process" {
1354
1552
  * Will generate an object similar to:
1355
1553
  *
1356
1554
  * ```console
1357
- * { node: '20.2.0',
1358
- * acorn: '8.8.2',
1359
- * ada: '2.4.0',
1360
- * ares: '1.19.0',
1361
- * base64: '0.5.0',
1362
- * brotli: '1.0.9',
1363
- * cjs_module_lexer: '1.2.2',
1364
- * cldr: '43.0',
1365
- * icu: '73.1',
1366
- * llhttp: '8.1.0',
1367
- * modules: '115',
1368
- * napi: '8',
1369
- * nghttp2: '1.52.0',
1370
- * nghttp3: '0.7.0',
1371
- * ngtcp2: '0.8.1',
1372
- * openssl: '3.0.8+quic',
1373
- * simdutf: '3.2.9',
1374
- * tz: '2023c',
1375
- * undici: '5.22.0',
1376
- * unicode: '15.0',
1377
- * uv: '1.44.2',
1378
- * uvwasi: '0.0.16',
1379
- * v8: '11.3.244.8-node.9',
1380
- * zlib: '1.2.13' }
1555
+ * { node: '26.0.0-pre',
1556
+ * acorn: '8.15.0',
1557
+ * ada: '3.4.1',
1558
+ * amaro: '1.1.5',
1559
+ * ares: '1.34.6',
1560
+ * brotli: '1.2.0',
1561
+ * merve: '1.0.0',
1562
+ * cldr: '48.0',
1563
+ * icu: '78.2',
1564
+ * llhttp: '9.3.0',
1565
+ * modules: '144',
1566
+ * napi: '10',
1567
+ * nbytes: '0.1.1',
1568
+ * ncrypto: '0.0.1',
1569
+ * nghttp2: '1.68.0',
1570
+ * nghttp3: '',
1571
+ * ngtcp2: '',
1572
+ * openssl: '3.5.4',
1573
+ * simdjson: '4.2.4',
1574
+ * simdutf: '7.3.3',
1575
+ * sqlite: '3.51.2',
1576
+ * tz: '2025c',
1577
+ * undici: '7.18.2',
1578
+ * unicode: '17.0',
1579
+ * uv: '1.51.0',
1580
+ * uvwasi: '0.0.23',
1581
+ * v8: '14.3.127.18-node.10',
1582
+ * zlib: '1.3.1-e00f703',
1583
+ * zstd: '1.5.7' }
1381
1584
  * ```
1382
1585
  * @since v0.2.0
1383
1586
  */
@@ -1390,29 +1593,28 @@ declare module "process" {
1390
1593
  *
1391
1594
  * An example of the possible output looks like:
1392
1595
  *
1393
- * ```js
1596
+ * ```json
1394
1597
  * {
1395
- * target_defaults:
1396
- * { cflags: [],
1397
- * default_configuration: 'Release',
1398
- * defines: [],
1399
- * include_dirs: [],
1400
- * libraries: [] },
1401
- * variables:
1598
+ * "target_defaults":
1599
+ * { "cflags": [],
1600
+ * "default_configuration": "Release",
1601
+ * "defines": [],
1602
+ * "include_dirs": [],
1603
+ * "libraries": [] },
1604
+ * "variables":
1402
1605
  * {
1403
- * host_arch: 'x64',
1404
- * napi_build_version: 5,
1405
- * node_install_npm: 'true',
1406
- * node_prefix: '',
1407
- * node_shared_cares: 'false',
1408
- * node_shared_http_parser: 'false',
1409
- * node_shared_libuv: 'false',
1410
- * node_shared_zlib: 'false',
1411
- * node_use_openssl: 'true',
1412
- * node_shared_openssl: 'false',
1413
- * strict_aliasing: 'true',
1414
- * target_arch: 'x64',
1415
- * v8_use_snapshot: 1
1606
+ * "host_arch": "x64",
1607
+ * "napi_build_version": 5,
1608
+ * "node_install_npm": "true",
1609
+ * "node_prefix": "",
1610
+ * "node_shared_cares": "false",
1611
+ * "node_shared_http_parser": "false",
1612
+ * "node_shared_libuv": "false",
1613
+ * "node_shared_zlib": "false",
1614
+ * "node_use_openssl": "true",
1615
+ * "node_shared_openssl": "false",
1616
+ * "target_arch": "x64",
1617
+ * "v8_use_snapshot": 1
1416
1618
  * }
1417
1619
  * }
1418
1620
  * ```
@@ -1500,7 +1702,7 @@ declare module "process" {
1500
1702
  *
1501
1703
  * The result of a previous call to `process.threadCpuUsage()` can be passed as the
1502
1704
  * argument to the function, to get a diff reading.
1503
- * @since v22.19.0
1705
+ * @since v23.9.0
1504
1706
  * @param previousValue A previous return value from calling
1505
1707
  * `process.threadCpuUsage()`
1506
1708
  */
@@ -1525,7 +1727,8 @@ declare module "process" {
1525
1727
  title: string;
1526
1728
  /**
1527
1729
  * The operating system CPU architecture for which the Node.js binary was compiled.
1528
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1730
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
1731
+ * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
1529
1732
  *
1530
1733
  * ```js
1531
1734
  * import { arch } from 'node:process';
@@ -1585,7 +1788,7 @@ declare module "process" {
1585
1788
  constrainedMemory(): number;
1586
1789
  /**
1587
1790
  * Gets the amount of free memory that is still available to the process (in bytes).
1588
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v22.x/api/process.html#processavailablememory) for more information.
1791
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v26.x/api/process.html#processavailablememory) for more information.
1589
1792
  * @since v20.13.0
1590
1793
  */
1591
1794
  availableMemory(): number;
@@ -1725,13 +1928,13 @@ declare module "process" {
1725
1928
  *
1726
1929
  * `process.release` contains the following properties:
1727
1930
  *
1728
- * ```js
1931
+ * ```json
1729
1932
  * {
1730
- * name: 'node',
1731
- * lts: 'Hydrogen',
1732
- * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
1733
- * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
1734
- * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
1933
+ * "name": "node",
1934
+ * "lts": "Hydrogen",
1935
+ * "sourceUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz",
1936
+ * "headersUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz",
1937
+ * "libUrl": "https://nodejs.org/download/release/v18.12.0/win-x64/node.lib"
1735
1938
  * }
1736
1939
  * ```
1737
1940
  *
@@ -1741,6 +1944,24 @@ declare module "process" {
1741
1944
  */
1742
1945
  readonly release: ProcessRelease;
1743
1946
  readonly features: ProcessFeatures;
1947
+ /**
1948
+ * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
1949
+ * is set on the current Node.js process. This property allows programmatic control over the
1950
+ * tracing of warnings, enabling or disabling stack traces for warnings at runtime.
1951
+ *
1952
+ * ```js
1953
+ * // Enable trace warnings
1954
+ * process.traceProcessWarnings = true;
1955
+ *
1956
+ * // Emit a warning with a stack trace
1957
+ * process.emitWarning('Warning with stack trace');
1958
+ *
1959
+ * // Disable trace warnings
1960
+ * process.traceProcessWarnings = false;
1961
+ * ```
1962
+ * @since v6.10.0
1963
+ */
1964
+ traceProcessWarnings: boolean;
1744
1965
  /**
1745
1966
  * `process.umask()` returns the Node.js process's file mode creation mask. Child
1746
1967
  * processes inherit the mask from the parent process.
@@ -1805,7 +2026,7 @@ declare module "process" {
1805
2026
  * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`.
1806
2027
  * @since v0.7.2
1807
2028
  */
1808
- disconnect(): void;
2029
+ disconnect?(): void;
1809
2030
  /**
1810
2031
  * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC
1811
2032
  * channel is connected and will return `false` after `process.disconnect()` is called.
@@ -1859,7 +2080,7 @@ declare module "process" {
1859
2080
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1860
2081
  /**
1861
2082
  * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1862
- * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v22.x/api/report.html).
2083
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v26.x/api/report.html).
1863
2084
  * @since v11.8.0
1864
2085
  */
1865
2086
  report: ProcessReport;
@@ -1962,7 +2183,19 @@ declare module "process" {
1962
2183
  * All other resources are discarded by the system when the processes are swapped, without triggering
1963
2184
  * any exit or close events and without running any cleanup handler.
1964
2185
  *
1965
- * This function will never return, unless an error occurred.
2186
+ * On success, all other resources are discarded by the system when the
2187
+ * processes are swapped, without triggering any exit or close events, without
2188
+ * running any JavaScript cleanup handler (for example `process.on('exit')`),
2189
+ * and without invoking native `AtExit` callbacks registered through the
2190
+ * embedder API. Callers that need to run cleanup logic should do so before
2191
+ * calling `process.execve()`.
2192
+ *
2193
+ * This function does not return on success. If the underlying `execve(2)`
2194
+ * system call fails, an `Error` is thrown whose `code` property is set to the
2195
+ * corresponding `errno` string (for example, `'ENOENT'` when `file` does not
2196
+ * exist), with `syscall` set to `'execve'` and `path` set to `file`. When
2197
+ * `execve(2)` fails the current process continues to run with its state
2198
+ * unchanged, so a caller may handle the error and take another action.
1966
2199
  *
1967
2200
  * This function is not available on Windows or IBM i.
1968
2201
  * @since v22.15.0
@@ -1974,111 +2207,63 @@ declare module "process" {
1974
2207
  * **Default:** `process.env`.
1975
2208
  */
1976
2209
  execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
1977
- /* EventEmitter */
1978
- addListener(event: "beforeExit", listener: BeforeExitListener): this;
1979
- addListener(event: "disconnect", listener: DisconnectListener): this;
1980
- addListener(event: "exit", listener: ExitListener): this;
1981
- addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
1982
- addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1983
- addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1984
- addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1985
- addListener(event: "warning", listener: WarningListener): this;
1986
- addListener(event: "message", listener: MessageListener): this;
1987
- addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1988
- addListener(event: Signals, listener: SignalsListener): this;
1989
- addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1990
- addListener(event: "worker", listener: WorkerListener): this;
1991
- emit(event: "beforeExit", code: number): boolean;
1992
- emit(event: "disconnect"): boolean;
1993
- emit(event: "exit", code: number): boolean;
1994
- emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
1995
- emit(event: "uncaughtException", error: Error): boolean;
1996
- emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1997
- emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1998
- emit(event: "warning", warning: Error): boolean;
1999
- emit(event: "message", message: unknown, sendHandle: SendHandle): this;
2000
- emit(event: "workerMessage", value: any, source: number): this;
2001
- emit(event: Signals, signal?: Signals): boolean;
2002
- emit(
2003
- event: "multipleResolves",
2004
- type: MultipleResolveType,
2005
- promise: Promise<unknown>,
2006
- value: unknown,
2210
+ // #region InternalEventEmitter
2211
+ addListener<E extends keyof ProcessEventMap>(
2212
+ eventName: E,
2213
+ listener: (...args: ProcessEventMap[E]) => void,
2214
+ ): this;
2215
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2216
+ emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
2217
+ emit(eventName: string | symbol, ...args: any[]): boolean;
2218
+ listenerCount<E extends keyof ProcessEventMap>(
2219
+ eventName: E,
2220
+ listener?: (...args: ProcessEventMap[E]) => void,
2221
+ ): number;
2222
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
2223
+ listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2224
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
2225
+ off<E extends keyof ProcessEventMap>(
2226
+ eventName: E,
2227
+ listener: (...args: ProcessEventMap[E]) => void,
2228
+ ): this;
2229
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
2230
+ on<E extends keyof ProcessEventMap>(
2231
+ eventName: E,
2232
+ listener: (...args: ProcessEventMap[E]) => void,
2233
+ ): this;
2234
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
2235
+ once<E extends keyof ProcessEventMap>(
2236
+ eventName: E,
2237
+ listener: (...args: ProcessEventMap[E]) => void,
2238
+ ): this;
2239
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
2240
+ prependListener<E extends keyof ProcessEventMap>(
2241
+ eventName: E,
2242
+ listener: (...args: ProcessEventMap[E]) => void,
2007
2243
  ): this;
2008
- emit(event: "worker", listener: WorkerListener): this;
2009
- on(event: "beforeExit", listener: BeforeExitListener): this;
2010
- on(event: "disconnect", listener: DisconnectListener): this;
2011
- on(event: "exit", listener: ExitListener): this;
2012
- on(event: "rejectionHandled", listener: RejectionHandledListener): this;
2013
- on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2014
- on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2015
- on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2016
- on(event: "warning", listener: WarningListener): this;
2017
- on(event: "message", listener: MessageListener): this;
2018
- on(event: Signals, listener: SignalsListener): this;
2019
- on(event: "multipleResolves", listener: MultipleResolveListener): this;
2020
- on(event: "worker", listener: WorkerListener): this;
2021
- on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2022
- on(event: string | symbol, listener: (...args: any[]) => void): this;
2023
- once(event: "beforeExit", listener: BeforeExitListener): this;
2024
- once(event: "disconnect", listener: DisconnectListener): this;
2025
- once(event: "exit", listener: ExitListener): this;
2026
- once(event: "rejectionHandled", listener: RejectionHandledListener): this;
2027
- once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2028
- once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2029
- once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2030
- once(event: "warning", listener: WarningListener): this;
2031
- once(event: "message", listener: MessageListener): this;
2032
- once(event: Signals, listener: SignalsListener): this;
2033
- once(event: "multipleResolves", listener: MultipleResolveListener): this;
2034
- once(event: "worker", listener: WorkerListener): this;
2035
- once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2036
- once(event: string | symbol, listener: (...args: any[]) => void): this;
2037
- prependListener(event: "beforeExit", listener: BeforeExitListener): this;
2038
- prependListener(event: "disconnect", listener: DisconnectListener): this;
2039
- prependListener(event: "exit", listener: ExitListener): this;
2040
- prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
2041
- prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2042
- prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2043
- prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2044
- prependListener(event: "warning", listener: WarningListener): this;
2045
- prependListener(event: "message", listener: MessageListener): this;
2046
- prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2047
- prependListener(event: Signals, listener: SignalsListener): this;
2048
- prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2049
- prependListener(event: "worker", listener: WorkerListener): this;
2050
- prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
2051
- prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
2052
- prependOnceListener(event: "exit", listener: ExitListener): this;
2053
- prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
2054
- prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2055
- prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2056
- prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2057
- prependOnceListener(event: "warning", listener: WarningListener): this;
2058
- prependOnceListener(event: "message", listener: MessageListener): this;
2059
- prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2060
- prependOnceListener(event: Signals, listener: SignalsListener): this;
2061
- prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2062
- prependOnceListener(event: "worker", listener: WorkerListener): this;
2063
- listeners(event: "beforeExit"): BeforeExitListener[];
2064
- listeners(event: "disconnect"): DisconnectListener[];
2065
- listeners(event: "exit"): ExitListener[];
2066
- listeners(event: "rejectionHandled"): RejectionHandledListener[];
2067
- listeners(event: "uncaughtException"): UncaughtExceptionListener[];
2068
- listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
2069
- listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2070
- listeners(event: "warning"): WarningListener[];
2071
- listeners(event: "message"): MessageListener[];
2072
- listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2073
- listeners(event: Signals): SignalsListener[];
2074
- listeners(event: "multipleResolves"): MultipleResolveListener[];
2075
- listeners(event: "worker"): WorkerListener[];
2244
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2245
+ prependOnceListener<E extends keyof ProcessEventMap>(
2246
+ eventName: E,
2247
+ listener: (...args: ProcessEventMap[E]) => void,
2248
+ ): this;
2249
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2250
+ rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2251
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
2252
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
2253
+ removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
2254
+ removeAllListeners(eventName?: string | symbol): this;
2255
+ removeListener<E extends keyof ProcessEventMap>(
2256
+ eventName: E,
2257
+ listener: (...args: ProcessEventMap[E]) => void,
2258
+ ): this;
2259
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2260
+ // #endregion
2076
2261
  }
2077
2262
  }
2078
2263
  }
2079
2264
  export = process;
2080
2265
  }
2081
- declare module "node:process" {
2082
- import process = require("process");
2266
+ declare module "process" {
2267
+ import process = require("node:process");
2083
2268
  export = process;
2084
2269
  }