alicezetion 1.8.5 → 1.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. package/.cache/nix/binary-cache-v6.sqlite +0 -0
  2. package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
  3. package/.cache/replit/modules/nodejs-20:v25-20240206-fdbd396.res +1 -0
  4. package/.cache/replit/modules/replit:v4-20240206-fdbd396.res +1 -0
  5. package/.cache/replit/modules.stamp +0 -1
  6. package/.cache/replit/nix/env.json +1 -1
  7. package/.cache/typescript/5.3/node_modules/.package-lock.json +137 -0
  8. package/.cache/typescript/5.3/node_modules/@types/bluebird/LICENSE +21 -0
  9. package/.cache/typescript/5.3/node_modules/@types/bluebird/README.md +15 -0
  10. package/.cache/typescript/5.3/node_modules/@types/bluebird/index.d.ts +1365 -0
  11. package/.cache/typescript/5.3/node_modules/@types/bluebird/package.json +25 -0
  12. package/.cache/typescript/5.3/node_modules/@types/caseless/LICENSE +21 -0
  13. package/.cache/typescript/5.3/node_modules/@types/caseless/README.md +48 -0
  14. package/.cache/typescript/5.3/node_modules/@types/caseless/index.d.ts +29 -0
  15. package/.cache/typescript/5.3/node_modules/@types/caseless/package.json +35 -0
  16. package/.cache/typescript/5.3/node_modules/@types/cheerio/LICENSE +21 -0
  17. package/.cache/typescript/5.3/node_modules/@types/cheerio/README.md +15 -0
  18. package/.cache/typescript/5.3/node_modules/@types/cheerio/index.d.ts +318 -0
  19. package/.cache/typescript/5.3/node_modules/@types/cheerio/package.json +71 -0
  20. package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
  21. package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
  22. package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
  24. package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
  25. package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
  26. package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
  27. package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
  28. package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
  29. package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
  30. package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4487 -0
  31. package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +596 -0
  32. package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
  33. package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
  34. package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
  35. package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
  36. package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
  37. package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
  38. package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
  39. package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4311 -0
  40. package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +411 -0
  41. package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
  42. package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1887 -0
  43. package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
  44. package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
  45. package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
  46. package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
  47. package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +315 -0
  48. package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
  49. package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
  50. package/.cache/typescript/5.3/node_modules/@types/node/package.json +229 -0
  51. package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
  52. package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +645 -0
  53. package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1561 -0
  54. package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
  55. package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
  56. package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
  57. package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
  58. package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
  59. package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
  60. package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
  61. package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +366 -0
  62. package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
  63. package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
  64. package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1465 -0
  65. package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
  66. package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
  67. package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
  68. package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
  69. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  70. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
  71. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
  72. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
  73. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
  74. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
  75. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
  76. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
  77. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
  78. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
  79. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
  80. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
  81. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
  82. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
  83. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  84. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
  85. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
  86. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
  87. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
  88. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  89. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
  90. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
  91. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
  92. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  93. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
  94. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +315 -0
  95. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
  96. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
  97. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  98. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
  99. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
  100. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  101. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
  102. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
  103. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
  104. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
  105. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  106. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
  107. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
  108. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
  109. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  110. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
  111. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  112. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
  113. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
  114. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  115. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  116. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
  117. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
  118. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  119. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
  120. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
  121. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
  122. package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  123. package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
  124. package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
  125. package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
  126. package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
  127. package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
  128. package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +179 -0
  129. package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
  130. package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
  131. package/.cache/typescript/5.3/node_modules/@types/npmlog/LICENSE +21 -0
  132. package/.cache/typescript/5.3/node_modules/@types/npmlog/README.md +15 -0
  133. package/.cache/typescript/5.3/node_modules/@types/npmlog/index.d.ts +84 -0
  134. package/.cache/typescript/5.3/node_modules/@types/npmlog/package.json +32 -0
  135. package/.cache/typescript/5.3/node_modules/@types/request/LICENSE +21 -0
  136. package/.cache/typescript/5.3/node_modules/@types/request/README.md +15 -0
  137. package/.cache/typescript/5.3/node_modules/@types/request/index.d.ts +395 -0
  138. package/.cache/typescript/5.3/node_modules/@types/request/package.json +70 -0
  139. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/LICENSE +21 -0
  140. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/README.md +15 -0
  141. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/index.d.ts +321 -0
  142. package/.cache/typescript/5.3/node_modules/@types/tough-cookie/package.json +35 -0
  143. package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
  144. package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
  145. package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
  146. package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
  147. package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
  148. package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
  149. package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
  150. package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
  151. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  152. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
  153. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
  154. package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  155. package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
  156. package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
  157. package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
  158. package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
  159. package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
  160. package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
  161. package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
  162. package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
  163. package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
  164. package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
  165. package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
  166. package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
  167. package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
  168. package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
  169. package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
  170. package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
  171. package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  172. package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
  173. package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
  174. package/.cache/typescript/5.3/node_modules/form-data/README.md +350 -0
  175. package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +350 -0
  176. package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +51 -0
  177. package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
  178. package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +483 -0
  179. package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
  180. package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
  181. package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
  182. package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
  183. package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
  184. package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
  185. package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
  186. package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
  187. package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
  188. package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
  189. package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
  190. package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
  191. package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
  192. package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
  193. package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
  194. package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
  195. package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
  196. package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
  197. package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
  198. package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
  199. package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
  200. package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
  201. package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
  202. package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
  203. package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
  204. package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  205. package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
  206. package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
  207. package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
  208. package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
  209. package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
  210. package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
  211. package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  212. package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
  213. package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
  214. package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
  215. package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
  216. package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
  217. package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
  218. package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
  219. package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
  220. package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  221. package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
  222. package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
  223. package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
  224. package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
  225. package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
  226. package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
  227. package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
  228. package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
  229. package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
  230. package/.cache/typescript/5.3/package-lock.json +149 -0
  231. package/.cache/typescript/5.3/package.json +1 -0
  232. package/.replit +1 -0
  233. package/index.js +2 -0
  234. package/leiamnash/edit.js +59 -0
  235. package/leiamnash/token.js +112 -0
  236. package/package.json +1 -1
  237. package/utils.js +18 -2
  238. package/.cache/replit/__replit_disk_meta.json +0 -1
  239. package/replit.nix +0 -6
@@ -0,0 +1,1561 @@
1
+ declare module "process" {
2
+ import * as tty from "node:tty";
3
+ import { Worker } from "node:worker_threads";
4
+ global {
5
+ var process: NodeJS.Process;
6
+ namespace NodeJS {
7
+ // this namespace merge is here because these are specifically used
8
+ // as the type for process.stdin, process.stdout, and process.stderr.
9
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
10
+ interface ReadStream extends tty.ReadStream {}
11
+ interface WriteStream extends tty.WriteStream {}
12
+ interface MemoryUsageFn {
13
+ /**
14
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
15
+ * usage which can be slow depending on the program memory allocations.
16
+ */
17
+ (): MemoryUsage;
18
+ /**
19
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
20
+ */
21
+ rss(): number;
22
+ }
23
+ interface MemoryUsage {
24
+ rss: number;
25
+ heapTotal: number;
26
+ heapUsed: number;
27
+ external: number;
28
+ arrayBuffers: number;
29
+ }
30
+ interface CpuUsage {
31
+ user: number;
32
+ system: number;
33
+ }
34
+ interface ProcessRelease {
35
+ name: string;
36
+ sourceUrl?: string | undefined;
37
+ headersUrl?: string | undefined;
38
+ libUrl?: string | undefined;
39
+ lts?: string | undefined;
40
+ }
41
+ interface ProcessVersions extends Dict<string> {
42
+ http_parser: string;
43
+ node: string;
44
+ v8: string;
45
+ ares: string;
46
+ uv: string;
47
+ zlib: string;
48
+ modules: string;
49
+ openssl: string;
50
+ }
51
+ type Platform =
52
+ | "aix"
53
+ | "android"
54
+ | "darwin"
55
+ | "freebsd"
56
+ | "haiku"
57
+ | "linux"
58
+ | "openbsd"
59
+ | "sunos"
60
+ | "win32"
61
+ | "cygwin"
62
+ | "netbsd";
63
+ type Architecture =
64
+ | "arm"
65
+ | "arm64"
66
+ | "ia32"
67
+ | "mips"
68
+ | "mipsel"
69
+ | "ppc"
70
+ | "ppc64"
71
+ | "riscv64"
72
+ | "s390"
73
+ | "s390x"
74
+ | "x64";
75
+ type Signals =
76
+ | "SIGABRT"
77
+ | "SIGALRM"
78
+ | "SIGBUS"
79
+ | "SIGCHLD"
80
+ | "SIGCONT"
81
+ | "SIGFPE"
82
+ | "SIGHUP"
83
+ | "SIGILL"
84
+ | "SIGINT"
85
+ | "SIGIO"
86
+ | "SIGIOT"
87
+ | "SIGKILL"
88
+ | "SIGPIPE"
89
+ | "SIGPOLL"
90
+ | "SIGPROF"
91
+ | "SIGPWR"
92
+ | "SIGQUIT"
93
+ | "SIGSEGV"
94
+ | "SIGSTKFLT"
95
+ | "SIGSTOP"
96
+ | "SIGSYS"
97
+ | "SIGTERM"
98
+ | "SIGTRAP"
99
+ | "SIGTSTP"
100
+ | "SIGTTIN"
101
+ | "SIGTTOU"
102
+ | "SIGUNUSED"
103
+ | "SIGURG"
104
+ | "SIGUSR1"
105
+ | "SIGUSR2"
106
+ | "SIGVTALRM"
107
+ | "SIGWINCH"
108
+ | "SIGXCPU"
109
+ | "SIGXFSZ"
110
+ | "SIGBREAK"
111
+ | "SIGLOST"
112
+ | "SIGINFO";
113
+ type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
114
+ type MultipleResolveType = "resolve" | "reject";
115
+ type BeforeExitListener = (code: number) => void;
116
+ type DisconnectListener = () => void;
117
+ type ExitListener = (code: number) => void;
118
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
119
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
120
+ /**
121
+ * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
122
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
123
+ */
124
+ type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
125
+ type WarningListener = (warning: Error) => void;
126
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
127
+ type SignalsListener = (signal: Signals) => void;
128
+ type MultipleResolveListener = (
129
+ type: MultipleResolveType,
130
+ promise: Promise<unknown>,
131
+ value: unknown,
132
+ ) => void;
133
+ type WorkerListener = (worker: Worker) => void;
134
+ interface Socket extends ReadWriteStream {
135
+ isTTY?: true | undefined;
136
+ }
137
+ // Alias for compatibility
138
+ interface ProcessEnv extends Dict<string> {
139
+ /**
140
+ * Can be used to change the default timezone at runtime
141
+ */
142
+ TZ?: string;
143
+ }
144
+ interface HRTime {
145
+ (time?: [number, number]): [number, number];
146
+ bigint(): bigint;
147
+ }
148
+ interface ProcessReport {
149
+ /**
150
+ * Directory where the report is written.
151
+ * working directory of the Node.js process.
152
+ * @default '' indicating that reports are written to the current
153
+ */
154
+ directory: string;
155
+ /**
156
+ * Filename where the report is written.
157
+ * The default value is the empty string.
158
+ * @default '' the output filename will be comprised of a timestamp,
159
+ * PID, and sequence number.
160
+ */
161
+ filename: string;
162
+ /**
163
+ * Returns a JSON-formatted diagnostic report for the running process.
164
+ * The report's JavaScript stack trace is taken from err, if present.
165
+ */
166
+ getReport(err?: Error): string;
167
+ /**
168
+ * If true, a diagnostic report is generated on fatal errors,
169
+ * such as out of memory errors or failed C++ assertions.
170
+ * @default false
171
+ */
172
+ reportOnFatalError: boolean;
173
+ /**
174
+ * If true, a diagnostic report is generated when the process
175
+ * receives the signal specified by process.report.signal.
176
+ * @default false
177
+ */
178
+ reportOnSignal: boolean;
179
+ /**
180
+ * If true, a diagnostic report is generated on uncaught exception.
181
+ * @default false
182
+ */
183
+ reportOnUncaughtException: boolean;
184
+ /**
185
+ * The signal used to trigger the creation of a diagnostic report.
186
+ * @default 'SIGUSR2'
187
+ */
188
+ signal: Signals;
189
+ /**
190
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
191
+ * includes the date, time, PID, and a sequence number.
192
+ * The report's JavaScript stack trace is taken from err, if present.
193
+ *
194
+ * @param fileName Name of the file where the report is written.
195
+ * This should be a relative path, that will be appended to the directory specified in
196
+ * `process.report.directory`, or the current working directory of the Node.js process,
197
+ * if unspecified.
198
+ * @param error A custom error used for reporting the JavaScript stack.
199
+ * @return Filename of the generated report.
200
+ */
201
+ writeReport(fileName?: string): string;
202
+ writeReport(error?: Error): string;
203
+ writeReport(fileName?: string, err?: Error): string;
204
+ }
205
+ interface ResourceUsage {
206
+ fsRead: number;
207
+ fsWrite: number;
208
+ involuntaryContextSwitches: number;
209
+ ipcReceived: number;
210
+ ipcSent: number;
211
+ majorPageFault: number;
212
+ maxRSS: number;
213
+ minorPageFault: number;
214
+ sharedMemorySize: number;
215
+ signalsCount: number;
216
+ swappedOut: number;
217
+ systemCPUTime: number;
218
+ unsharedDataSize: number;
219
+ unsharedStackSize: number;
220
+ userCPUTime: number;
221
+ voluntaryContextSwitches: number;
222
+ }
223
+ interface EmitWarningOptions {
224
+ /**
225
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
226
+ *
227
+ * @default 'Warning'
228
+ */
229
+ type?: string | undefined;
230
+ /**
231
+ * A unique identifier for the warning instance being emitted.
232
+ */
233
+ code?: string | undefined;
234
+ /**
235
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
236
+ *
237
+ * @default process.emitWarning
238
+ */
239
+ ctor?: Function | undefined;
240
+ /**
241
+ * Additional text to include with the error.
242
+ */
243
+ detail?: string | undefined;
244
+ }
245
+ interface ProcessConfig {
246
+ readonly target_defaults: {
247
+ readonly cflags: any[];
248
+ readonly default_configuration: string;
249
+ readonly defines: string[];
250
+ readonly include_dirs: string[];
251
+ readonly libraries: string[];
252
+ };
253
+ readonly variables: {
254
+ readonly clang: number;
255
+ readonly host_arch: string;
256
+ readonly node_install_npm: boolean;
257
+ readonly node_install_waf: boolean;
258
+ readonly node_prefix: string;
259
+ readonly node_shared_openssl: boolean;
260
+ readonly node_shared_v8: boolean;
261
+ readonly node_shared_zlib: boolean;
262
+ readonly node_use_dtrace: boolean;
263
+ readonly node_use_etw: boolean;
264
+ readonly node_use_openssl: boolean;
265
+ readonly target_arch: string;
266
+ readonly v8_no_strict_aliasing: number;
267
+ readonly v8_use_snapshot: boolean;
268
+ readonly visibility: string;
269
+ };
270
+ }
271
+ interface Process extends EventEmitter {
272
+ /**
273
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
274
+ * a `Writable` stream.
275
+ *
276
+ * For example, to copy `process.stdin` to `process.stdout`:
277
+ *
278
+ * ```js
279
+ * import { stdin, stdout } from 'node:process';
280
+ *
281
+ * stdin.pipe(stdout);
282
+ * ```
283
+ *
284
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
285
+ */
286
+ stdout: WriteStream & {
287
+ fd: 1;
288
+ };
289
+ /**
290
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
291
+ * a `Writable` stream.
292
+ *
293
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
294
+ */
295
+ stderr: WriteStream & {
296
+ fd: 2;
297
+ };
298
+ /**
299
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
300
+ * a `Readable` stream.
301
+ *
302
+ * For details of how to read from `stdin` see `readable.read()`.
303
+ *
304
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
305
+ * is compatible with scripts written for Node.js prior to v0.10\.
306
+ * For more information see `Stream compatibility`.
307
+ *
308
+ * In "old" streams mode the `stdin` stream is paused by default, so one
309
+ * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode.
310
+ */
311
+ stdin: ReadStream & {
312
+ fd: 0;
313
+ };
314
+ openStdin(): Socket;
315
+ /**
316
+ * The `process.argv` property returns an array containing the command-line
317
+ * arguments passed when the Node.js process was launched. The first element will
318
+ * be {@link execPath}. See `process.argv0` if access to the original value
319
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
320
+ * file being executed. The remaining elements will be any additional command-line
321
+ * arguments.
322
+ *
323
+ * For example, assuming the following script for `process-args.js`:
324
+ *
325
+ * ```js
326
+ * import { argv } from 'node:process';
327
+ *
328
+ * // print process.argv
329
+ * argv.forEach((val, index) => {
330
+ * console.log(`${index}: ${val}`);
331
+ * });
332
+ * ```
333
+ *
334
+ * Launching the Node.js process as:
335
+ *
336
+ * ```bash
337
+ * node process-args.js one two=three four
338
+ * ```
339
+ *
340
+ * Would generate the output:
341
+ *
342
+ * ```text
343
+ * 0: /usr/local/bin/node
344
+ * 1: /Users/mjr/work/node/process-args.js
345
+ * 2: one
346
+ * 3: two=three
347
+ * 4: four
348
+ * ```
349
+ * @since v0.1.27
350
+ */
351
+ argv: string[];
352
+ /**
353
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
354
+ *
355
+ * ```console
356
+ * $ bash -c 'exec -a customArgv0 ./node'
357
+ * > process.argv[0]
358
+ * '/Volumes/code/external/node/out/Release/node'
359
+ * > process.argv0
360
+ * 'customArgv0'
361
+ * ```
362
+ * @since v6.4.0
363
+ */
364
+ argv0: string;
365
+ /**
366
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
367
+ * options passed when the Node.js process was launched. These options do not
368
+ * appear in the array returned by the {@link argv} property, and do not
369
+ * include the Node.js executable, the name of the script, or any options following
370
+ * the script name. These options are useful in order to spawn child processes with
371
+ * the same execution environment as the parent.
372
+ *
373
+ * ```bash
374
+ * node --harmony script.js --version
375
+ * ```
376
+ *
377
+ * Results in `process.execArgv`:
378
+ *
379
+ * ```js
380
+ * ['--harmony']
381
+ * ```
382
+ *
383
+ * And `process.argv`:
384
+ *
385
+ * ```js
386
+ * ['/usr/local/bin/node', 'script.js', '--version']
387
+ * ```
388
+ *
389
+ * Refer to `Worker constructor` for the detailed behavior of worker
390
+ * threads with this property.
391
+ * @since v0.7.7
392
+ */
393
+ execArgv: string[];
394
+ /**
395
+ * The `process.execPath` property returns the absolute pathname of the executable
396
+ * that started the Node.js process. Symbolic links, if any, are resolved.
397
+ *
398
+ * ```js
399
+ * '/usr/local/bin/node'
400
+ * ```
401
+ * @since v0.1.100
402
+ */
403
+ execPath: string;
404
+ /**
405
+ * The `process.abort()` method causes the Node.js process to exit immediately and
406
+ * generate a core file.
407
+ *
408
+ * This feature is not available in `Worker` threads.
409
+ * @since v0.7.0
410
+ */
411
+ abort(): never;
412
+ /**
413
+ * The `process.chdir()` method changes the current working directory of the
414
+ * Node.js process or throws an exception if doing so fails (for instance, if
415
+ * the specified `directory` does not exist).
416
+ *
417
+ * ```js
418
+ * import { chdir, cwd } from 'node:process';
419
+ *
420
+ * console.log(`Starting directory: ${cwd()}`);
421
+ * try {
422
+ * chdir('/tmp');
423
+ * console.log(`New directory: ${cwd()}`);
424
+ * } catch (err) {
425
+ * console.error(`chdir: ${err}`);
426
+ * }
427
+ * ```
428
+ *
429
+ * This feature is not available in `Worker` threads.
430
+ * @since v0.1.17
431
+ */
432
+ chdir(directory: string): void;
433
+ /**
434
+ * The `process.cwd()` method returns the current working directory of the Node.js
435
+ * process.
436
+ *
437
+ * ```js
438
+ * import { cwd } from 'node:process';
439
+ *
440
+ * console.log(`Current directory: ${cwd()}`);
441
+ * ```
442
+ * @since v0.1.8
443
+ */
444
+ cwd(): string;
445
+ /**
446
+ * The port used by the Node.js debugger when enabled.
447
+ *
448
+ * ```js
449
+ * import process from 'node:process';
450
+ *
451
+ * process.debugPort = 5858;
452
+ * ```
453
+ * @since v0.7.2
454
+ */
455
+ debugPort: number;
456
+ /**
457
+ * The `process.emitWarning()` method can be used to emit custom or application
458
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
459
+ *
460
+ * ```js
461
+ * import { emitWarning } from 'node:process';
462
+ *
463
+ * // Emit a warning with a code and additional detail.
464
+ * emitWarning('Something happened!', {
465
+ * code: 'MY_WARNING',
466
+ * detail: 'This is some additional information',
467
+ * });
468
+ * // Emits:
469
+ * // (node:56338) [MY_WARNING] Warning: Something happened!
470
+ * // This is some additional information
471
+ * ```
472
+ *
473
+ * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler.
474
+ *
475
+ * ```js
476
+ * import process from 'node:process';
477
+ *
478
+ * process.on('warning', (warning) => {
479
+ * console.warn(warning.name); // 'Warning'
480
+ * console.warn(warning.message); // 'Something happened!'
481
+ * console.warn(warning.code); // 'MY_WARNING'
482
+ * console.warn(warning.stack); // Stack trace
483
+ * console.warn(warning.detail); // 'This is some additional information'
484
+ * });
485
+ * ```
486
+ *
487
+ * If `warning` is passed as an `Error` object, the `options` argument is ignored.
488
+ * @since v8.0.0
489
+ * @param warning The warning to emit.
490
+ */
491
+ emitWarning(warning: string | Error, ctor?: Function): void;
492
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
493
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
494
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
495
+ /**
496
+ * The `process.env` property returns an object containing the user environment.
497
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
498
+ *
499
+ * An example of this object looks like:
500
+ *
501
+ * ```js
502
+ * {
503
+ * TERM: 'xterm-256color',
504
+ * SHELL: '/usr/local/bin/bash',
505
+ * USER: 'maciej',
506
+ * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
507
+ * PWD: '/Users/maciej',
508
+ * EDITOR: 'vim',
509
+ * SHLVL: '1',
510
+ * HOME: '/Users/maciej',
511
+ * LOGNAME: 'maciej',
512
+ * _: '/usr/local/bin/node'
513
+ * }
514
+ * ```
515
+ *
516
+ * It is possible to modify this object, but such modifications will not be
517
+ * reflected outside the Node.js process, or (unless explicitly requested)
518
+ * to other `Worker` threads.
519
+ * In other words, the following example would not work:
520
+ *
521
+ * ```bash
522
+ * node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
523
+ * ```
524
+ *
525
+ * While the following will:
526
+ *
527
+ * ```js
528
+ * import { env } from 'node:process';
529
+ *
530
+ * env.foo = 'bar';
531
+ * console.log(env.foo);
532
+ * ```
533
+ *
534
+ * Assigning a property on `process.env` will implicitly convert the value
535
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
536
+ * throw an error when the value is not a string, number, or boolean.
537
+ *
538
+ * ```js
539
+ * import { env } from 'node:process';
540
+ *
541
+ * env.test = null;
542
+ * console.log(env.test);
543
+ * // => 'null'
544
+ * env.test = undefined;
545
+ * console.log(env.test);
546
+ * // => 'undefined'
547
+ * ```
548
+ *
549
+ * Use `delete` to delete a property from `process.env`.
550
+ *
551
+ * ```js
552
+ * import { env } from 'node:process';
553
+ *
554
+ * env.TEST = 1;
555
+ * delete env.TEST;
556
+ * console.log(env.TEST);
557
+ * // => undefined
558
+ * ```
559
+ *
560
+ * On Windows operating systems, environment variables are case-insensitive.
561
+ *
562
+ * ```js
563
+ * import { env } from 'node:process';
564
+ *
565
+ * env.TEST = 1;
566
+ * console.log(env.test);
567
+ * // => 1
568
+ * ```
569
+ *
570
+ * Unless explicitly specified when creating a `Worker` instance,
571
+ * each `Worker` thread has its own copy of `process.env`, based on its
572
+ * parent thread's `process.env`, or whatever was specified as the `env` option
573
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
574
+ * across `Worker` threads, and only the main thread can make changes that
575
+ * are visible to the operating system or to native add-ons. On Windows, a copy of`process.env` on a `Worker` instance operates in a case-sensitive manner
576
+ * unlike the main thread.
577
+ * @since v0.1.27
578
+ */
579
+ env: ProcessEnv;
580
+ /**
581
+ * The `process.exit()` method instructs Node.js to terminate the process
582
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
583
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
584
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
585
+ * called.
586
+ *
587
+ * To exit with a 'failure' code:
588
+ *
589
+ * ```js
590
+ * import { exit } from 'node:process';
591
+ *
592
+ * exit(1);
593
+ * ```
594
+ *
595
+ * The shell that executed Node.js should see the exit code as `1`.
596
+ *
597
+ * Calling `process.exit()` will force the process to exit as quickly as possible
598
+ * even if there are still asynchronous operations pending that have not yet
599
+ * completed fully, including I/O operations to `process.stdout` and`process.stderr`.
600
+ *
601
+ * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_
602
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
603
+ * tell the process which exit code to use when the process exits gracefully.
604
+ *
605
+ * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being
606
+ * truncated and lost:
607
+ *
608
+ * ```js
609
+ * import { exit } from 'node:process';
610
+ *
611
+ * // This is an example of what *not* to do:
612
+ * if (someConditionNotMet()) {
613
+ * printUsageToStdout();
614
+ * exit(1);
615
+ * }
616
+ * ```
617
+ *
618
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
619
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
620
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
621
+ *
622
+ * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
623
+ * scheduling any additional work for the event loop:
624
+ *
625
+ * ```js
626
+ * import process from 'node:process';
627
+ *
628
+ * // How to properly set the exit code while letting
629
+ * // the process exit gracefully.
630
+ * if (someConditionNotMet()) {
631
+ * printUsageToStdout();
632
+ * process.exitCode = 1;
633
+ * }
634
+ * ```
635
+ *
636
+ * If it is necessary to terminate the Node.js process due to an error condition,
637
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
638
+ * is safer than calling `process.exit()`.
639
+ *
640
+ * In `Worker` threads, this function stops the current thread rather
641
+ * than the current process.
642
+ * @since v0.1.13
643
+ * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
644
+ */
645
+ exit(code?: number): never;
646
+ /**
647
+ * A number which will be the process exit code, when the process either
648
+ * exits gracefully, or is exited via {@link exit} without specifying
649
+ * a code.
650
+ *
651
+ * Specifying a code to {@link exit} will override any
652
+ * previous setting of `process.exitCode`.
653
+ * @since v0.11.8
654
+ */
655
+ exitCode?: number | undefined;
656
+ /**
657
+ * The `process.getgid()` method returns the numerical group identity of the
658
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
659
+ *
660
+ * ```js
661
+ * import process from 'process';
662
+ *
663
+ * if (process.getgid) {
664
+ * console.log(`Current gid: ${process.getgid()}`);
665
+ * }
666
+ * ```
667
+ *
668
+ * This function is only available on POSIX platforms (i.e. not Windows or
669
+ * Android).
670
+ * @since v0.1.31
671
+ */
672
+ getgid?: () => number;
673
+ /**
674
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
675
+ * numeric ID or a group name
676
+ * string. If a group name is specified, this method blocks while resolving the
677
+ * associated numeric ID.
678
+ *
679
+ * ```js
680
+ * import process from 'process';
681
+ *
682
+ * if (process.getgid &#x26;&#x26; process.setgid) {
683
+ * console.log(`Current gid: ${process.getgid()}`);
684
+ * try {
685
+ * process.setgid(501);
686
+ * console.log(`New gid: ${process.getgid()}`);
687
+ * } catch (err) {
688
+ * console.log(`Failed to set gid: ${err}`);
689
+ * }
690
+ * }
691
+ * ```
692
+ *
693
+ * This function is only available on POSIX platforms (i.e. not Windows or
694
+ * Android).
695
+ * This feature is not available in `Worker` threads.
696
+ * @since v0.1.31
697
+ * @param id The group name or ID
698
+ */
699
+ setgid?: (id: number | string) => void;
700
+ /**
701
+ * The `process.getuid()` method returns the numeric user identity of the process.
702
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
703
+ *
704
+ * ```js
705
+ * import process from 'process';
706
+ *
707
+ * if (process.getuid) {
708
+ * console.log(`Current uid: ${process.getuid()}`);
709
+ * }
710
+ * ```
711
+ *
712
+ * This function is only available on POSIX platforms (i.e. not Windows or
713
+ * Android).
714
+ * @since v0.1.28
715
+ */
716
+ getuid?: () => number;
717
+ /**
718
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
719
+ * numeric ID or a username string.
720
+ * If a username is specified, the method blocks while resolving the associated
721
+ * numeric ID.
722
+ *
723
+ * ```js
724
+ * import process from 'process';
725
+ *
726
+ * if (process.getuid &#x26;&#x26; process.setuid) {
727
+ * console.log(`Current uid: ${process.getuid()}`);
728
+ * try {
729
+ * process.setuid(501);
730
+ * console.log(`New uid: ${process.getuid()}`);
731
+ * } catch (err) {
732
+ * console.log(`Failed to set uid: ${err}`);
733
+ * }
734
+ * }
735
+ * ```
736
+ *
737
+ * This function is only available on POSIX platforms (i.e. not Windows or
738
+ * Android).
739
+ * This feature is not available in `Worker` threads.
740
+ * @since v0.1.28
741
+ */
742
+ setuid?: (id: number | string) => void;
743
+ /**
744
+ * The `process.geteuid()` method returns the numerical effective user identity of
745
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
746
+ *
747
+ * ```js
748
+ * import process from 'process';
749
+ *
750
+ * if (process.geteuid) {
751
+ * console.log(`Current uid: ${process.geteuid()}`);
752
+ * }
753
+ * ```
754
+ *
755
+ * This function is only available on POSIX platforms (i.e. not Windows or
756
+ * Android).
757
+ * @since v2.0.0
758
+ */
759
+ geteuid?: () => number;
760
+ /**
761
+ * The `process.seteuid()` method sets the effective user identity of the process.
762
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
763
+ * string. If a username is specified, the method blocks while resolving the
764
+ * associated numeric ID.
765
+ *
766
+ * ```js
767
+ * import process from 'process';
768
+ *
769
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
770
+ * console.log(`Current uid: ${process.geteuid()}`);
771
+ * try {
772
+ * process.seteuid(501);
773
+ * console.log(`New uid: ${process.geteuid()}`);
774
+ * } catch (err) {
775
+ * console.log(`Failed to set uid: ${err}`);
776
+ * }
777
+ * }
778
+ * ```
779
+ *
780
+ * This function is only available on POSIX platforms (i.e. not Windows or
781
+ * Android).
782
+ * This feature is not available in `Worker` threads.
783
+ * @since v2.0.0
784
+ * @param id A user name or ID
785
+ */
786
+ seteuid?: (id: number | string) => void;
787
+ /**
788
+ * The `process.getegid()` method returns the numerical effective group identity
789
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
790
+ *
791
+ * ```js
792
+ * import process from 'process';
793
+ *
794
+ * if (process.getegid) {
795
+ * console.log(`Current gid: ${process.getegid()}`);
796
+ * }
797
+ * ```
798
+ *
799
+ * This function is only available on POSIX platforms (i.e. not Windows or
800
+ * Android).
801
+ * @since v2.0.0
802
+ */
803
+ getegid?: () => number;
804
+ /**
805
+ * The `process.setegid()` method sets the effective group identity of the process.
806
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
807
+ * name string. If a group name is specified, this method blocks while resolving
808
+ * the associated a numeric ID.
809
+ *
810
+ * ```js
811
+ * import process from 'process';
812
+ *
813
+ * if (process.getegid &#x26;&#x26; process.setegid) {
814
+ * console.log(`Current gid: ${process.getegid()}`);
815
+ * try {
816
+ * process.setegid(501);
817
+ * console.log(`New gid: ${process.getegid()}`);
818
+ * } catch (err) {
819
+ * console.log(`Failed to set gid: ${err}`);
820
+ * }
821
+ * }
822
+ * ```
823
+ *
824
+ * This function is only available on POSIX platforms (i.e. not Windows or
825
+ * Android).
826
+ * This feature is not available in `Worker` threads.
827
+ * @since v2.0.0
828
+ * @param id A group name or ID
829
+ */
830
+ setegid?: (id: number | string) => void;
831
+ /**
832
+ * The `process.getgroups()` method returns an array with the supplementary group
833
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
834
+ * Node.js ensures it always is.
835
+ *
836
+ * ```js
837
+ * import process from 'process';
838
+ *
839
+ * if (process.getgroups) {
840
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
841
+ * }
842
+ * ```
843
+ *
844
+ * This function is only available on POSIX platforms (i.e. not Windows or
845
+ * Android).
846
+ * @since v0.9.4
847
+ */
848
+ getgroups?: () => number[];
849
+ /**
850
+ * The `process.setgroups()` method sets the supplementary group IDs for the
851
+ * Node.js process. This is a privileged operation that requires the Node.js
852
+ * process to have `root` or the `CAP_SETGID` capability.
853
+ *
854
+ * The `groups` array can contain numeric group IDs, group names, or both.
855
+ *
856
+ * ```js
857
+ * import process from 'process';
858
+ *
859
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
860
+ * try {
861
+ * process.setgroups([501]);
862
+ * console.log(process.getgroups()); // new groups
863
+ * } catch (err) {
864
+ * console.log(`Failed to set groups: ${err}`);
865
+ * }
866
+ * }
867
+ * ```
868
+ *
869
+ * This function is only available on POSIX platforms (i.e. not Windows or
870
+ * Android).
871
+ * This feature is not available in `Worker` threads.
872
+ * @since v0.9.4
873
+ */
874
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
875
+ /**
876
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
877
+ * that will be invoked when an uncaught exception occurs, which will receive the
878
+ * exception value itself as its first argument.
879
+ *
880
+ * If such a function is set, the `'uncaughtException'` event will
881
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
882
+ * command line or set through `v8.setFlagsFromString()`, the process will
883
+ * not abort. Actions configured to take place on exceptions such as report
884
+ * generations will be affected too
885
+ *
886
+ * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
887
+ * method with a non-`null` argument while another capture function is set will
888
+ * throw an error.
889
+ *
890
+ * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
891
+ * @since v9.3.0
892
+ */
893
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
894
+ /**
895
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
896
+ * @since v9.3.0
897
+ */
898
+ hasUncaughtExceptionCaptureCallback(): boolean;
899
+ /**
900
+ * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled.
901
+ * @since v20.7.0
902
+ * @experimental
903
+ */
904
+ readonly sourceMapsEnabled: boolean;
905
+ /**
906
+ * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for
907
+ * stack traces.
908
+ *
909
+ * It provides same features as launching Node.js process with commandline options`--enable-source-maps`.
910
+ *
911
+ * Only source maps in JavaScript files that are loaded after source maps has been
912
+ * enabled will be parsed and loaded.
913
+ * @since v16.6.0, v14.18.0
914
+ * @experimental
915
+ */
916
+ setSourceMapsEnabled(value: boolean): void;
917
+ /**
918
+ * The `process.version` property contains the Node.js version string.
919
+ *
920
+ * ```js
921
+ * import { version } from 'node:process';
922
+ *
923
+ * console.log(`Version: ${version}`);
924
+ * // Version: v14.8.0
925
+ * ```
926
+ *
927
+ * To get the version string without the prepended _v_, use`process.versions.node`.
928
+ * @since v0.1.3
929
+ */
930
+ readonly version: string;
931
+ /**
932
+ * The `process.versions` property returns an object listing the version strings of
933
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
934
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
935
+ * to load modules that were compiled against a different module ABI version.
936
+ *
937
+ * ```js
938
+ * import { versions } from 'node:process';
939
+ *
940
+ * console.log(versions);
941
+ * ```
942
+ *
943
+ * Will generate an object similar to:
944
+ *
945
+ * ```console
946
+ * { node: '20.2.0',
947
+ * acorn: '8.8.2',
948
+ * ada: '2.4.0',
949
+ * ares: '1.19.0',
950
+ * base64: '0.5.0',
951
+ * brotli: '1.0.9',
952
+ * cjs_module_lexer: '1.2.2',
953
+ * cldr: '43.0',
954
+ * icu: '73.1',
955
+ * llhttp: '8.1.0',
956
+ * modules: '115',
957
+ * napi: '8',
958
+ * nghttp2: '1.52.0',
959
+ * nghttp3: '0.7.0',
960
+ * ngtcp2: '0.8.1',
961
+ * openssl: '3.0.8+quic',
962
+ * simdutf: '3.2.9',
963
+ * tz: '2023c',
964
+ * undici: '5.22.0',
965
+ * unicode: '15.0',
966
+ * uv: '1.44.2',
967
+ * uvwasi: '0.0.16',
968
+ * v8: '11.3.244.8-node.9',
969
+ * zlib: '1.2.13' }
970
+ * ```
971
+ * @since v0.2.0
972
+ */
973
+ readonly versions: ProcessVersions;
974
+ /**
975
+ * The `process.config` property returns a frozen `Object` containing the
976
+ * JavaScript representation of the configure options used to compile the current
977
+ * Node.js executable. This is the same as the `config.gypi` file that was produced
978
+ * when running the `./configure` script.
979
+ *
980
+ * An example of the possible output looks like:
981
+ *
982
+ * ```js
983
+ * {
984
+ * target_defaults:
985
+ * { cflags: [],
986
+ * default_configuration: 'Release',
987
+ * defines: [],
988
+ * include_dirs: [],
989
+ * libraries: [] },
990
+ * variables:
991
+ * {
992
+ * host_arch: 'x64',
993
+ * napi_build_version: 5,
994
+ * node_install_npm: 'true',
995
+ * node_prefix: '',
996
+ * node_shared_cares: 'false',
997
+ * node_shared_http_parser: 'false',
998
+ * node_shared_libuv: 'false',
999
+ * node_shared_zlib: 'false',
1000
+ * node_use_openssl: 'true',
1001
+ * node_shared_openssl: 'false',
1002
+ * strict_aliasing: 'true',
1003
+ * target_arch: 'x64',
1004
+ * v8_use_snapshot: 1
1005
+ * }
1006
+ * }
1007
+ * ```
1008
+ * @since v0.7.7
1009
+ */
1010
+ readonly config: ProcessConfig;
1011
+ /**
1012
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
1013
+ *
1014
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
1015
+ *
1016
+ * This method will throw an error if the target `pid` does not exist. As a special
1017
+ * case, a signal of `0` can be used to test for the existence of a process.
1018
+ * Windows platforms will throw an error if the `pid` is used to kill a process
1019
+ * group.
1020
+ *
1021
+ * Even though the name of this function is `process.kill()`, it is really just a
1022
+ * signal sender, like the `kill` system call. The signal sent may do something
1023
+ * other than kill the target process.
1024
+ *
1025
+ * ```js
1026
+ * import process, { kill } from 'node:process';
1027
+ *
1028
+ * process.on('SIGHUP', () => {
1029
+ * console.log('Got SIGHUP signal.');
1030
+ * });
1031
+ *
1032
+ * setTimeout(() => {
1033
+ * console.log('Exiting.');
1034
+ * process.exit(0);
1035
+ * }, 100);
1036
+ *
1037
+ * kill(process.pid, 'SIGHUP');
1038
+ * ```
1039
+ *
1040
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
1041
+ * debugger. See `Signal Events`.
1042
+ * @since v0.0.6
1043
+ * @param pid A process ID
1044
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
1045
+ */
1046
+ kill(pid: number, signal?: string | number): true;
1047
+ /**
1048
+ * The `process.pid` property returns the PID of the process.
1049
+ *
1050
+ * ```js
1051
+ * import { pid } from 'node:process';
1052
+ *
1053
+ * console.log(`This process is pid ${pid}`);
1054
+ * ```
1055
+ * @since v0.1.15
1056
+ */
1057
+ readonly pid: number;
1058
+ /**
1059
+ * The `process.ppid` property returns the PID of the parent of the
1060
+ * current process.
1061
+ *
1062
+ * ```js
1063
+ * import { ppid } from 'node:process';
1064
+ *
1065
+ * console.log(`The parent process is pid ${ppid}`);
1066
+ * ```
1067
+ * @since v9.2.0, v8.10.0, v6.13.0
1068
+ */
1069
+ readonly ppid: number;
1070
+ /**
1071
+ * The `process.title` property returns the current process title (i.e. returns
1072
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
1073
+ * the current value of `ps`.
1074
+ *
1075
+ * When a new value is assigned, different platforms will impose different maximum
1076
+ * length restrictions on the title. Usually such restrictions are quite limited.
1077
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
1078
+ * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8
1079
+ * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
1080
+ * cases.
1081
+ *
1082
+ * Assigning a value to `process.title` might not result in an accurate label
1083
+ * within process manager applications such as macOS Activity Monitor or Windows
1084
+ * Services Manager.
1085
+ * @since v0.1.104
1086
+ */
1087
+ title: string;
1088
+ /**
1089
+ * The operating system CPU architecture for which the Node.js binary was compiled.
1090
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1091
+ *
1092
+ * ```js
1093
+ * import { arch } from 'node:process';
1094
+ *
1095
+ * console.log(`This processor architecture is ${arch}`);
1096
+ * ```
1097
+ * @since v0.5.0
1098
+ */
1099
+ readonly arch: Architecture;
1100
+ /**
1101
+ * The `process.platform` property returns a string identifying the operating
1102
+ * system platform for which the Node.js binary was compiled.
1103
+ *
1104
+ * Currently possible values are:
1105
+ *
1106
+ * * `'aix'`
1107
+ * * `'darwin'`
1108
+ * * `'freebsd'`
1109
+ * * `'linux'`
1110
+ * * `'openbsd'`
1111
+ * * `'sunos'`
1112
+ * * `'win32'`
1113
+ *
1114
+ * ```js
1115
+ * import { platform } from 'node:process';
1116
+ *
1117
+ * console.log(`This platform is ${platform}`);
1118
+ * ```
1119
+ *
1120
+ * The value `'android'` may also be returned if the Node.js is built on the
1121
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
1122
+ * @since v0.1.16
1123
+ */
1124
+ readonly platform: Platform;
1125
+ /**
1126
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
1127
+ * runtime, `require.main` may still refer to the original main module in
1128
+ * modules that were required before the change occurred. Generally, it's
1129
+ * safe to assume that the two refer to the same module.
1130
+ *
1131
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
1132
+ * is no entry script.
1133
+ * @since v0.1.17
1134
+ * @deprecated Since v14.0.0 - Use `main` instead.
1135
+ */
1136
+ mainModule?: Module | undefined;
1137
+ memoryUsage: MemoryUsageFn;
1138
+ /**
1139
+ * Gets the amount of memory available to the process (in bytes) based on
1140
+ * limits imposed by the OS. If there is no such constraint, or the constraint
1141
+ * is unknown, `undefined` is returned.
1142
+ *
1143
+ * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
1144
+ * information.
1145
+ * @since v19.6.0, v18.15.0
1146
+ * @experimental
1147
+ */
1148
+ constrainedMemory(): number | undefined;
1149
+ /**
1150
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
1151
+ * the current process, in an object with properties `user` and `system`, whose
1152
+ * values are microsecond values (millionth of a second). These values measure time
1153
+ * spent in user and system code respectively, and may end up being greater than
1154
+ * actual elapsed time if multiple CPU cores are performing work for this process.
1155
+ *
1156
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
1157
+ * argument to the function, to get a diff reading.
1158
+ *
1159
+ * ```js
1160
+ * import { cpuUsage } from 'node:process';
1161
+ *
1162
+ * const startUsage = cpuUsage();
1163
+ * // { user: 38579, system: 6986 }
1164
+ *
1165
+ * // spin the CPU for 500 milliseconds
1166
+ * const now = Date.now();
1167
+ * while (Date.now() - now < 500);
1168
+ *
1169
+ * console.log(cpuUsage(startUsage));
1170
+ * // { user: 514883, system: 11226 }
1171
+ * ```
1172
+ * @since v6.1.0
1173
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
1174
+ */
1175
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
1176
+ /**
1177
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
1178
+ * fully drained after the current operation on the JavaScript stack runs to
1179
+ * completion and before the event loop is allowed to continue. It's possible to
1180
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
1181
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
1182
+ *
1183
+ * ```js
1184
+ * import { nextTick } from 'node:process';
1185
+ *
1186
+ * console.log('start');
1187
+ * nextTick(() => {
1188
+ * console.log('nextTick callback');
1189
+ * });
1190
+ * console.log('scheduled');
1191
+ * // Output:
1192
+ * // start
1193
+ * // scheduled
1194
+ * // nextTick callback
1195
+ * ```
1196
+ *
1197
+ * This is important when developing APIs in order to give users the opportunity
1198
+ * to assign event handlers _after_ an object has been constructed but before any
1199
+ * I/O has occurred:
1200
+ *
1201
+ * ```js
1202
+ * import { nextTick } from 'node:process';
1203
+ *
1204
+ * function MyThing(options) {
1205
+ * this.setupOptions(options);
1206
+ *
1207
+ * nextTick(() => {
1208
+ * this.startDoingStuff();
1209
+ * });
1210
+ * }
1211
+ *
1212
+ * const thing = new MyThing();
1213
+ * thing.getReadyForStuff();
1214
+ *
1215
+ * // thing.startDoingStuff() gets called now, not before.
1216
+ * ```
1217
+ *
1218
+ * It is very important for APIs to be either 100% synchronous or 100%
1219
+ * asynchronous. Consider this example:
1220
+ *
1221
+ * ```js
1222
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
1223
+ * function maybeSync(arg, cb) {
1224
+ * if (arg) {
1225
+ * cb();
1226
+ * return;
1227
+ * }
1228
+ *
1229
+ * fs.stat('file', cb);
1230
+ * }
1231
+ * ```
1232
+ *
1233
+ * This API is hazardous because in the following case:
1234
+ *
1235
+ * ```js
1236
+ * const maybeTrue = Math.random() > 0.5;
1237
+ *
1238
+ * maybeSync(maybeTrue, () => {
1239
+ * foo();
1240
+ * });
1241
+ *
1242
+ * bar();
1243
+ * ```
1244
+ *
1245
+ * It is not clear whether `foo()` or `bar()` will be called first.
1246
+ *
1247
+ * The following approach is much better:
1248
+ *
1249
+ * ```js
1250
+ * import { nextTick } from 'node:process';
1251
+ *
1252
+ * function definitelyAsync(arg, cb) {
1253
+ * if (arg) {
1254
+ * nextTick(cb);
1255
+ * return;
1256
+ * }
1257
+ *
1258
+ * fs.stat('file', cb);
1259
+ * }
1260
+ * ```
1261
+ * @since v0.1.26
1262
+ * @param args Additional arguments to pass when invoking the `callback`
1263
+ */
1264
+ nextTick(callback: Function, ...args: any[]): void;
1265
+ /**
1266
+ * The `process.release` property returns an `Object` containing metadata related
1267
+ * to the current release, including URLs for the source tarball and headers-only
1268
+ * tarball.
1269
+ *
1270
+ * `process.release` contains the following properties:
1271
+ *
1272
+ * ```js
1273
+ * {
1274
+ * name: 'node',
1275
+ * lts: 'Hydrogen',
1276
+ * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
1277
+ * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
1278
+ * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
1279
+ * }
1280
+ * ```
1281
+ *
1282
+ * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
1283
+ * relied upon to exist.
1284
+ * @since v3.0.0
1285
+ */
1286
+ readonly release: ProcessRelease;
1287
+ features: {
1288
+ inspector: boolean;
1289
+ debug: boolean;
1290
+ uv: boolean;
1291
+ ipv6: boolean;
1292
+ tls_alpn: boolean;
1293
+ tls_sni: boolean;
1294
+ tls_ocsp: boolean;
1295
+ tls: boolean;
1296
+ };
1297
+ /**
1298
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
1299
+ * processes inherit the mask from the parent process.
1300
+ * @since v0.1.19
1301
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
1302
+ * security vulnerability. There is no safe, cross-platform alternative API.
1303
+ */
1304
+ umask(): number;
1305
+ /**
1306
+ * Can only be set if not in worker thread.
1307
+ */
1308
+ umask(mask: string | number): number;
1309
+ /**
1310
+ * The `process.uptime()` method returns the number of seconds the current Node.js
1311
+ * process has been running.
1312
+ *
1313
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
1314
+ * seconds.
1315
+ * @since v0.5.0
1316
+ */
1317
+ uptime(): number;
1318
+ hrtime: HRTime;
1319
+ /**
1320
+ * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel.
1321
+ * If no IPC channel exists, this property is undefined.
1322
+ * @since v7.1.0
1323
+ */
1324
+ channel?: {
1325
+ /**
1326
+ * This method makes the IPC channel keep the event loop of the process running if .unref() has been called before.
1327
+ * @since v7.1.0
1328
+ */
1329
+ ref(): void;
1330
+ /**
1331
+ * This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open.
1332
+ * @since v7.1.0
1333
+ */
1334
+ unref(): void;
1335
+ };
1336
+ /**
1337
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
1338
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
1339
+ *
1340
+ * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`.
1341
+ *
1342
+ * The message goes through serialization and parsing. The resulting message might
1343
+ * not be the same as what is originally sent.
1344
+ * @since v0.5.9
1345
+ * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
1346
+ */
1347
+ send?(
1348
+ message: any,
1349
+ sendHandle?: any,
1350
+ options?: {
1351
+ swallowErrors?: boolean | undefined;
1352
+ },
1353
+ callback?: (error: Error | null) => void,
1354
+ ): boolean;
1355
+ /**
1356
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
1357
+ * IPC channel to the parent process, allowing the child process to exit gracefully
1358
+ * once there are no other connections keeping it alive.
1359
+ *
1360
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
1361
+ *
1362
+ * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
1363
+ * @since v0.7.2
1364
+ */
1365
+ disconnect(): void;
1366
+ /**
1367
+ * 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
1368
+ * channel is connected and will return `false` after`process.disconnect()` is called.
1369
+ *
1370
+ * Once `process.connected` is `false`, it is no longer possible to send messages
1371
+ * over the IPC channel using `process.send()`.
1372
+ * @since v0.7.2
1373
+ */
1374
+ connected: boolean;
1375
+ /**
1376
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
1377
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
1378
+ *
1379
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
1380
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
1381
+ * return `true` in the following cases:
1382
+ *
1383
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
1384
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
1385
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
1386
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
1387
+ * etc.
1388
+ * * Flags may contain one or more equals (`=`) characters; all
1389
+ * characters after and including the first equals will be ignored;
1390
+ * e.g., `--stack-trace-limit=100`.
1391
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
1392
+ *
1393
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
1394
+ * appear only _once_; each will begin with one or more dashes. Flags
1395
+ * passed through to V8 will contain underscores instead of non-leading
1396
+ * dashes:
1397
+ *
1398
+ * ```js
1399
+ * import { allowedNodeEnvironmentFlags } from 'node:process';
1400
+ *
1401
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
1402
+ * // -r
1403
+ * // --inspect-brk
1404
+ * // --abort_on_uncaught_exception
1405
+ * // ...
1406
+ * });
1407
+ * ```
1408
+ *
1409
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
1410
+ * silently.
1411
+ *
1412
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
1413
+ * contain what _would have_ been allowable.
1414
+ * @since v10.10.0
1415
+ */
1416
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
1417
+ /**
1418
+ * `process.report` is an object whose methods are used to generate diagnostic
1419
+ * reports for the current process. Additional documentation is available in the `report documentation`.
1420
+ * @since v11.8.0
1421
+ */
1422
+ report?: ProcessReport | undefined;
1423
+ /**
1424
+ * ```js
1425
+ * import { resourceUsage } from 'node:process';
1426
+ *
1427
+ * console.log(resourceUsage());
1428
+ * /*
1429
+ * Will output:
1430
+ * {
1431
+ * userCPUTime: 82872,
1432
+ * systemCPUTime: 4143,
1433
+ * maxRSS: 33164,
1434
+ * sharedMemorySize: 0,
1435
+ * unsharedDataSize: 0,
1436
+ * unsharedStackSize: 0,
1437
+ * minorPageFault: 2469,
1438
+ * majorPageFault: 0,
1439
+ * swappedOut: 0,
1440
+ * fsRead: 0,
1441
+ * fsWrite: 8,
1442
+ * ipcSent: 0,
1443
+ * ipcReceived: 0,
1444
+ * signalsCount: 0,
1445
+ * voluntaryContextSwitches: 79,
1446
+ * involuntaryContextSwitches: 1
1447
+ * }
1448
+ *
1449
+ * ```
1450
+ * @since v12.6.0
1451
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
1452
+ */
1453
+ resourceUsage(): ResourceUsage;
1454
+ /**
1455
+ * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
1456
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
1457
+ * flag's behavior.
1458
+ * @since v0.8.0
1459
+ */
1460
+ traceDeprecation: boolean;
1461
+ /* EventEmitter */
1462
+ addListener(event: "beforeExit", listener: BeforeExitListener): this;
1463
+ addListener(event: "disconnect", listener: DisconnectListener): this;
1464
+ addListener(event: "exit", listener: ExitListener): this;
1465
+ addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
1466
+ addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1467
+ addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1468
+ addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1469
+ addListener(event: "warning", listener: WarningListener): this;
1470
+ addListener(event: "message", listener: MessageListener): this;
1471
+ addListener(event: Signals, listener: SignalsListener): this;
1472
+ addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1473
+ addListener(event: "worker", listener: WorkerListener): this;
1474
+ emit(event: "beforeExit", code: number): boolean;
1475
+ emit(event: "disconnect"): boolean;
1476
+ emit(event: "exit", code: number): boolean;
1477
+ emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
1478
+ emit(event: "uncaughtException", error: Error): boolean;
1479
+ emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1480
+ emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1481
+ emit(event: "warning", warning: Error): boolean;
1482
+ emit(event: "message", message: unknown, sendHandle: unknown): this;
1483
+ emit(event: Signals, signal?: Signals): boolean;
1484
+ emit(
1485
+ event: "multipleResolves",
1486
+ type: MultipleResolveType,
1487
+ promise: Promise<unknown>,
1488
+ value: unknown,
1489
+ ): this;
1490
+ emit(event: "worker", listener: WorkerListener): this;
1491
+ on(event: "beforeExit", listener: BeforeExitListener): this;
1492
+ on(event: "disconnect", listener: DisconnectListener): this;
1493
+ on(event: "exit", listener: ExitListener): this;
1494
+ on(event: "rejectionHandled", listener: RejectionHandledListener): this;
1495
+ on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1496
+ on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1497
+ on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1498
+ on(event: "warning", listener: WarningListener): this;
1499
+ on(event: "message", listener: MessageListener): this;
1500
+ on(event: Signals, listener: SignalsListener): this;
1501
+ on(event: "multipleResolves", listener: MultipleResolveListener): this;
1502
+ on(event: "worker", listener: WorkerListener): this;
1503
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
1504
+ once(event: "beforeExit", listener: BeforeExitListener): this;
1505
+ once(event: "disconnect", listener: DisconnectListener): this;
1506
+ once(event: "exit", listener: ExitListener): this;
1507
+ once(event: "rejectionHandled", listener: RejectionHandledListener): this;
1508
+ once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1509
+ once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1510
+ once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1511
+ once(event: "warning", listener: WarningListener): this;
1512
+ once(event: "message", listener: MessageListener): this;
1513
+ once(event: Signals, listener: SignalsListener): this;
1514
+ once(event: "multipleResolves", listener: MultipleResolveListener): this;
1515
+ once(event: "worker", listener: WorkerListener): this;
1516
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
1517
+ prependListener(event: "beforeExit", listener: BeforeExitListener): this;
1518
+ prependListener(event: "disconnect", listener: DisconnectListener): this;
1519
+ prependListener(event: "exit", listener: ExitListener): this;
1520
+ prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
1521
+ prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1522
+ prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1523
+ prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1524
+ prependListener(event: "warning", listener: WarningListener): this;
1525
+ prependListener(event: "message", listener: MessageListener): this;
1526
+ prependListener(event: Signals, listener: SignalsListener): this;
1527
+ prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1528
+ prependListener(event: "worker", listener: WorkerListener): this;
1529
+ prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
1530
+ prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
1531
+ prependOnceListener(event: "exit", listener: ExitListener): this;
1532
+ prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
1533
+ prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1534
+ prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1535
+ prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1536
+ prependOnceListener(event: "warning", listener: WarningListener): this;
1537
+ prependOnceListener(event: "message", listener: MessageListener): this;
1538
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
1539
+ prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1540
+ prependOnceListener(event: "worker", listener: WorkerListener): this;
1541
+ listeners(event: "beforeExit"): BeforeExitListener[];
1542
+ listeners(event: "disconnect"): DisconnectListener[];
1543
+ listeners(event: "exit"): ExitListener[];
1544
+ listeners(event: "rejectionHandled"): RejectionHandledListener[];
1545
+ listeners(event: "uncaughtException"): UncaughtExceptionListener[];
1546
+ listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
1547
+ listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
1548
+ listeners(event: "warning"): WarningListener[];
1549
+ listeners(event: "message"): MessageListener[];
1550
+ listeners(event: Signals): SignalsListener[];
1551
+ listeners(event: "multipleResolves"): MultipleResolveListener[];
1552
+ listeners(event: "worker"): WorkerListener[];
1553
+ }
1554
+ }
1555
+ }
1556
+ export = process;
1557
+ }
1558
+ declare module "node:process" {
1559
+ import process = require("process");
1560
+ export = process;
1561
+ }