aizryu.js 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.0/node_modules/.package-lock.json +156 -0
- package/.cache/typescript/5.0/node_modules/@types/body-parser/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/body-parser/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/body-parser/index.d.ts +95 -0
- package/.cache/typescript/5.0/node_modules/@types/body-parser/package.json +58 -0
- package/.cache/typescript/5.0/node_modules/@types/connect/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/connect/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/connect/index.d.ts +91 -0
- package/.cache/typescript/5.0/node_modules/@types/connect/package.json +32 -0
- package/.cache/typescript/5.0/node_modules/@types/express/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/express/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/express/index.d.ts +128 -0
- package/.cache/typescript/5.0/node_modules/@types/express/package.json +45 -0
- package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/index.d.ts +1261 -0
- package/.cache/typescript/5.0/node_modules/@types/express-serve-static-core/package.json +55 -0
- package/.cache/typescript/5.0/node_modules/@types/http-errors/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/http-errors/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/http-errors/index.d.ts +77 -0
- package/.cache/typescript/5.0/node_modules/@types/http-errors/package.json +30 -0
- package/.cache/typescript/5.0/node_modules/@types/jsdom/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/jsdom/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/jsdom/base.d.ts +456 -0
- package/.cache/typescript/5.0/node_modules/@types/jsdom/index.d.ts +18 -0
- package/.cache/typescript/5.0/node_modules/@types/jsdom/package.json +45 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/Mime.d.ts +10 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/index.d.ts +31 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/lite.d.ts +7 -0
- package/.cache/typescript/5.0/node_modules/@types/mime/package.json +30 -0
- package/.cache/typescript/5.0/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.0/node_modules/@types/node/assert.d.ts +996 -0
- package/.cache/typescript/5.0/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.0/node_modules/@types/node/buffer.d.ts +2362 -0
- package/.cache/typescript/5.0/node_modules/@types/node/child_process.d.ts +1540 -0
- package/.cache/typescript/5.0/node_modules/@types/node/cluster.d.ts +432 -0
- package/.cache/typescript/5.0/node_modules/@types/node/console.d.ts +415 -0
- package/.cache/typescript/5.0/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.0/node_modules/@types/node/crypto.d.ts +4456 -0
- package/.cache/typescript/5.0/node_modules/@types/node/dgram.d.ts +586 -0
- package/.cache/typescript/5.0/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.0/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.0/node_modules/@types/node/dns.d.ts +809 -0
- package/.cache/typescript/5.0/node_modules/@types/node/dom-events.d.ts +122 -0
- package/.cache/typescript/5.0/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.0/node_modules/@types/node/events.d.ts +879 -0
- package/.cache/typescript/5.0/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.0/node_modules/@types/node/fs.d.ts +4291 -0
- package/.cache/typescript/5.0/node_modules/@types/node/globals.d.ts +381 -0
- package/.cache/typescript/5.0/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.0/node_modules/@types/node/http.d.ts +1888 -0
- package/.cache/typescript/5.0/node_modules/@types/node/http2.d.ts +2382 -0
- package/.cache/typescript/5.0/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.0/node_modules/@types/node/index.d.ts +88 -0
- package/.cache/typescript/5.0/node_modules/@types/node/inspector.d.ts +2747 -0
- package/.cache/typescript/5.0/node_modules/@types/node/module.d.ts +301 -0
- package/.cache/typescript/5.0/node_modules/@types/node/net.d.ts +949 -0
- package/.cache/typescript/5.0/node_modules/@types/node/os.d.ts +478 -0
- package/.cache/typescript/5.0/node_modules/@types/node/package.json +230 -0
- package/.cache/typescript/5.0/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.0/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.0/node_modules/@types/node/process.d.ts +1532 -0
- package/.cache/typescript/5.0/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.0/node_modules/@types/node/querystring.d.ts +141 -0
- package/.cache/typescript/5.0/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.0/node_modules/@types/node/readline.d.ts +539 -0
- package/.cache/typescript/5.0/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.0/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.0/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.0/node_modules/@types/node/stream/web.d.ts +350 -0
- package/.cache/typescript/5.0/node_modules/@types/node/stream.d.ts +1701 -0
- package/.cache/typescript/5.0/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.0/node_modules/@types/node/test.d.ts +1382 -0
- package/.cache/typescript/5.0/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.0/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.0/node_modules/@types/node/tls.d.ts +1210 -0
- package/.cache/typescript/5.0/node_modules/@types/node/trace_events.d.ts +182 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/globals.d.ts +381 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/process.d.ts +1532 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/util.d.ts +2186 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.0/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/.cache/typescript/5.0/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.0/node_modules/@types/node/url.d.ts +927 -0
- package/.cache/typescript/5.0/node_modules/@types/node/util.d.ts +2186 -0
- package/.cache/typescript/5.0/node_modules/@types/node/v8.d.ts +635 -0
- package/.cache/typescript/5.0/node_modules/@types/node/vm.d.ts +903 -0
- package/.cache/typescript/5.0/node_modules/@types/node/wasi.d.ts +158 -0
- package/.cache/typescript/5.0/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.0/node_modules/@types/node/zlib.d.ts +517 -0
- package/.cache/typescript/5.0/node_modules/@types/qs/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/qs/README.md +75 -0
- package/.cache/typescript/5.0/node_modules/@types/qs/index.d.ts +56 -0
- package/.cache/typescript/5.0/node_modules/@types/qs/package.json +65 -0
- package/.cache/typescript/5.0/node_modules/@types/range-parser/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/range-parser/README.md +53 -0
- package/.cache/typescript/5.0/node_modules/@types/range-parser/index.d.ts +34 -0
- package/.cache/typescript/5.0/node_modules/@types/range-parser/package.json +25 -0
- package/.cache/typescript/5.0/node_modules/@types/send/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/send/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/send/index.d.ts +225 -0
- package/.cache/typescript/5.0/node_modules/@types/send/package.json +33 -0
- package/.cache/typescript/5.0/node_modules/@types/serve-static/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/serve-static/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/serve-static/index.d.ts +107 -0
- package/.cache/typescript/5.0/node_modules/@types/serve-static/package.json +39 -0
- package/.cache/typescript/5.0/node_modules/@types/tough-cookie/LICENSE +21 -0
- package/.cache/typescript/5.0/node_modules/@types/tough-cookie/README.md +15 -0
- package/.cache/typescript/5.0/node_modules/@types/tough-cookie/index.d.ts +321 -0
- package/.cache/typescript/5.0/node_modules/@types/tough-cookie/package.json +35 -0
- package/.cache/typescript/5.0/node_modules/entities/LICENSE +11 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode.d.ts +211 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode.js +536 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/encode.d.ts +22 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/encode.js +77 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/encode.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/escape.d.ts +43 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/escape.js +122 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/escape.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.js +496 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.js +69 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.js +116 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.js +99 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/index.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/esm/package.json +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/index.d.ts +96 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/index.d.ts.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/index.js +126 -0
- package/.cache/typescript/5.0/node_modules/entities/lib/index.js.map +1 -0
- package/.cache/typescript/5.0/node_modules/entities/package.json +90 -0
- package/.cache/typescript/5.0/node_modules/entities/readme.md +122 -0
- package/.cache/typescript/5.0/node_modules/parse5/LICENSE +19 -0
- package/.cache/typescript/5.0/node_modules/parse5/README.md +38 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/doctype.js +120 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/error-codes.js +67 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/foreign-content.js +239 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/html.d.ts +288 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/html.js +529 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/token.d.ts +85 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/token.js +25 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/common/unicode.js +77 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/index.d.ts +60 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/index.js +57 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/package.json +1 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +115 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/index.d.ts +157 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/index.js +3163 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/parser/open-element-stack.js +316 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/serializer/index.js +173 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/index.js +2908 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +199 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/default.js +177 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/cjs/tree-adapters/interface.js +3 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/doctype.js +115 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/error-codes.js +64 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/foreign-content.js +230 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/html.d.ts +288 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/html.js +523 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/token.d.ts +85 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/token.js +21 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/common/unicode.js +69 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/index.d.ts +60 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/index.js +45 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/formatting-element-list.js +111 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/index.d.ts +157 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/index.js +3168 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/parser/open-element-stack.js +312 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/serializer/index.js +168 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/index.js +2904 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tokenizer/preprocessor.js +195 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/default.js +174 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.0/node_modules/parse5/dist/tree-adapters/interface.js +2 -0
- package/.cache/typescript/5.0/node_modules/parse5/package.json +50 -0
- package/.cache/typescript/5.0/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.0/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.0/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.0/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.0/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.0/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.0/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.0/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.0/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.0/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.0/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.0/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.0/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.0/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.0/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.0/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.0/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.0/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.0/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.0/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.0/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.0/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.0/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.0/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.0/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.0/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.0/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.0/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.0/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.0/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.0/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.0/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.0/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.0/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.0/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.0/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.0/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.0/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.0/package-lock.json +166 -0
- package/.cache/typescript/5.0/package.json +1 -0
- package/.replit +14 -0
- package/.upm/store.json +1 -0
- package/README.md +24 -0
- package/index.js +1 -0
- package/package.json +21 -0
@@ -0,0 +1,1532 @@
|
|
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"' && 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 && 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 && 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 && 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 && 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 && 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
|
+
* The `process.version` property contains the Node.js version string.
|
907
|
+
*
|
908
|
+
* ```js
|
909
|
+
* import { version } from 'node:process';
|
910
|
+
*
|
911
|
+
* console.log(`Version: ${version}`);
|
912
|
+
* // Version: v14.8.0
|
913
|
+
* ```
|
914
|
+
*
|
915
|
+
* To get the version string without the prepended _v_, use`process.versions.node`.
|
916
|
+
* @since v0.1.3
|
917
|
+
*/
|
918
|
+
readonly version: string;
|
919
|
+
/**
|
920
|
+
* The `process.versions` property returns an object listing the version strings of
|
921
|
+
* Node.js and its dependencies. `process.versions.modules` indicates the current
|
922
|
+
* ABI version, which is increased whenever a C++ API changes. Node.js will refuse
|
923
|
+
* to load modules that were compiled against a different module ABI version.
|
924
|
+
*
|
925
|
+
* ```js
|
926
|
+
* import { versions } from 'node:process';
|
927
|
+
*
|
928
|
+
* console.log(versions);
|
929
|
+
* ```
|
930
|
+
*
|
931
|
+
* Will generate an object similar to:
|
932
|
+
*
|
933
|
+
* ```console
|
934
|
+
* { node: '20.2.0',
|
935
|
+
* acorn: '8.8.2',
|
936
|
+
* ada: '2.4.0',
|
937
|
+
* ares: '1.19.0',
|
938
|
+
* base64: '0.5.0',
|
939
|
+
* brotli: '1.0.9',
|
940
|
+
* cjs_module_lexer: '1.2.2',
|
941
|
+
* cldr: '43.0',
|
942
|
+
* icu: '73.1',
|
943
|
+
* llhttp: '8.1.0',
|
944
|
+
* modules: '115',
|
945
|
+
* napi: '8',
|
946
|
+
* nghttp2: '1.52.0',
|
947
|
+
* nghttp3: '0.7.0',
|
948
|
+
* ngtcp2: '0.8.1',
|
949
|
+
* openssl: '3.0.8+quic',
|
950
|
+
* simdutf: '3.2.9',
|
951
|
+
* tz: '2023c',
|
952
|
+
* undici: '5.22.0',
|
953
|
+
* unicode: '15.0',
|
954
|
+
* uv: '1.44.2',
|
955
|
+
* uvwasi: '0.0.16',
|
956
|
+
* v8: '11.3.244.8-node.9',
|
957
|
+
* zlib: '1.2.13' }
|
958
|
+
* ```
|
959
|
+
* @since v0.2.0
|
960
|
+
*/
|
961
|
+
readonly versions: ProcessVersions;
|
962
|
+
/**
|
963
|
+
* The `process.config` property returns a frozen `Object` containing the
|
964
|
+
* JavaScript representation of the configure options used to compile the current
|
965
|
+
* Node.js executable. This is the same as the `config.gypi` file that was produced
|
966
|
+
* when running the `./configure` script.
|
967
|
+
*
|
968
|
+
* An example of the possible output looks like:
|
969
|
+
*
|
970
|
+
* ```js
|
971
|
+
* {
|
972
|
+
* target_defaults:
|
973
|
+
* { cflags: [],
|
974
|
+
* default_configuration: 'Release',
|
975
|
+
* defines: [],
|
976
|
+
* include_dirs: [],
|
977
|
+
* libraries: [] },
|
978
|
+
* variables:
|
979
|
+
* {
|
980
|
+
* host_arch: 'x64',
|
981
|
+
* napi_build_version: 5,
|
982
|
+
* node_install_npm: 'true',
|
983
|
+
* node_prefix: '',
|
984
|
+
* node_shared_cares: 'false',
|
985
|
+
* node_shared_http_parser: 'false',
|
986
|
+
* node_shared_libuv: 'false',
|
987
|
+
* node_shared_zlib: 'false',
|
988
|
+
* node_use_openssl: 'true',
|
989
|
+
* node_shared_openssl: 'false',
|
990
|
+
* strict_aliasing: 'true',
|
991
|
+
* target_arch: 'x64',
|
992
|
+
* v8_use_snapshot: 1
|
993
|
+
* }
|
994
|
+
* }
|
995
|
+
* ```
|
996
|
+
* @since v0.7.7
|
997
|
+
*/
|
998
|
+
readonly config: ProcessConfig;
|
999
|
+
/**
|
1000
|
+
* The `process.kill()` method sends the `signal` to the process identified by`pid`.
|
1001
|
+
*
|
1002
|
+
* 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.
|
1003
|
+
*
|
1004
|
+
* This method will throw an error if the target `pid` does not exist. As a special
|
1005
|
+
* case, a signal of `0` can be used to test for the existence of a process.
|
1006
|
+
* Windows platforms will throw an error if the `pid` is used to kill a process
|
1007
|
+
* group.
|
1008
|
+
*
|
1009
|
+
* Even though the name of this function is `process.kill()`, it is really just a
|
1010
|
+
* signal sender, like the `kill` system call. The signal sent may do something
|
1011
|
+
* other than kill the target process.
|
1012
|
+
*
|
1013
|
+
* ```js
|
1014
|
+
* import process, { kill } from 'node:process';
|
1015
|
+
*
|
1016
|
+
* process.on('SIGHUP', () => {
|
1017
|
+
* console.log('Got SIGHUP signal.');
|
1018
|
+
* });
|
1019
|
+
*
|
1020
|
+
* setTimeout(() => {
|
1021
|
+
* console.log('Exiting.');
|
1022
|
+
* process.exit(0);
|
1023
|
+
* }, 100);
|
1024
|
+
*
|
1025
|
+
* kill(process.pid, 'SIGHUP');
|
1026
|
+
* ```
|
1027
|
+
*
|
1028
|
+
* When `SIGUSR1` is received by a Node.js process, Node.js will start the
|
1029
|
+
* debugger. See `Signal Events`.
|
1030
|
+
* @since v0.0.6
|
1031
|
+
* @param pid A process ID
|
1032
|
+
* @param [signal='SIGTERM'] The signal to send, either as a string or number.
|
1033
|
+
*/
|
1034
|
+
kill(pid: number, signal?: string | number): true;
|
1035
|
+
/**
|
1036
|
+
* The `process.pid` property returns the PID of the process.
|
1037
|
+
*
|
1038
|
+
* ```js
|
1039
|
+
* import { pid } from 'node:process';
|
1040
|
+
*
|
1041
|
+
* console.log(`This process is pid ${pid}`);
|
1042
|
+
* ```
|
1043
|
+
* @since v0.1.15
|
1044
|
+
*/
|
1045
|
+
readonly pid: number;
|
1046
|
+
/**
|
1047
|
+
* The `process.ppid` property returns the PID of the parent of the
|
1048
|
+
* current process.
|
1049
|
+
*
|
1050
|
+
* ```js
|
1051
|
+
* import { ppid } from 'node:process';
|
1052
|
+
*
|
1053
|
+
* console.log(`The parent process is pid ${ppid}`);
|
1054
|
+
* ```
|
1055
|
+
* @since v9.2.0, v8.10.0, v6.13.0
|
1056
|
+
*/
|
1057
|
+
readonly ppid: number;
|
1058
|
+
/**
|
1059
|
+
* The `process.title` property returns the current process title (i.e. returns
|
1060
|
+
* the current value of `ps`). Assigning a new value to `process.title` modifies
|
1061
|
+
* the current value of `ps`.
|
1062
|
+
*
|
1063
|
+
* When a new value is assigned, different platforms will impose different maximum
|
1064
|
+
* length restrictions on the title. Usually such restrictions are quite limited.
|
1065
|
+
* For instance, on Linux and macOS, `process.title` is limited to the size of the
|
1066
|
+
* 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
|
1067
|
+
* allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
|
1068
|
+
* cases.
|
1069
|
+
*
|
1070
|
+
* Assigning a value to `process.title` might not result in an accurate label
|
1071
|
+
* within process manager applications such as macOS Activity Monitor or Windows
|
1072
|
+
* Services Manager.
|
1073
|
+
* @since v0.1.104
|
1074
|
+
*/
|
1075
|
+
title: string;
|
1076
|
+
/**
|
1077
|
+
* The operating system CPU architecture for which the Node.js binary was compiled.
|
1078
|
+
* Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
|
1079
|
+
*
|
1080
|
+
* ```js
|
1081
|
+
* import { arch } from 'node:process';
|
1082
|
+
*
|
1083
|
+
* console.log(`This processor architecture is ${arch}`);
|
1084
|
+
* ```
|
1085
|
+
* @since v0.5.0
|
1086
|
+
*/
|
1087
|
+
readonly arch: Architecture;
|
1088
|
+
/**
|
1089
|
+
* The `process.platform` property returns a string identifying the operating
|
1090
|
+
* system platform for which the Node.js binary was compiled.
|
1091
|
+
*
|
1092
|
+
* Currently possible values are:
|
1093
|
+
*
|
1094
|
+
* * `'aix'`
|
1095
|
+
* * `'darwin'`
|
1096
|
+
* * `'freebsd'`
|
1097
|
+
* * `'linux'`
|
1098
|
+
* * `'openbsd'`
|
1099
|
+
* * `'sunos'`
|
1100
|
+
* * `'win32'`
|
1101
|
+
*
|
1102
|
+
* ```js
|
1103
|
+
* import { platform } from 'node:process';
|
1104
|
+
*
|
1105
|
+
* console.log(`This platform is ${platform}`);
|
1106
|
+
* ```
|
1107
|
+
*
|
1108
|
+
* The value `'android'` may also be returned if the Node.js is built on the
|
1109
|
+
* 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).
|
1110
|
+
* @since v0.1.16
|
1111
|
+
*/
|
1112
|
+
readonly platform: Platform;
|
1113
|
+
/**
|
1114
|
+
* The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
|
1115
|
+
* runtime, `require.main` may still refer to the original main module in
|
1116
|
+
* modules that were required before the change occurred. Generally, it's
|
1117
|
+
* safe to assume that the two refer to the same module.
|
1118
|
+
*
|
1119
|
+
* As with `require.main`, `process.mainModule` will be `undefined` if there
|
1120
|
+
* is no entry script.
|
1121
|
+
* @since v0.1.17
|
1122
|
+
* @deprecated Since v14.0.0 - Use `main` instead.
|
1123
|
+
*/
|
1124
|
+
mainModule?: Module | undefined;
|
1125
|
+
memoryUsage: MemoryUsageFn;
|
1126
|
+
/**
|
1127
|
+
* Gets the amount of memory available to the process (in bytes) based on
|
1128
|
+
* limits imposed by the OS. If there is no such constraint, or the constraint
|
1129
|
+
* is unknown, `undefined` is returned.
|
1130
|
+
*
|
1131
|
+
* See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
|
1132
|
+
* information.
|
1133
|
+
* @since v19.6.0, v18.15.0
|
1134
|
+
* @experimental
|
1135
|
+
*/
|
1136
|
+
constrainedMemory(): number | undefined;
|
1137
|
+
/**
|
1138
|
+
* The `process.cpuUsage()` method returns the user and system CPU time usage of
|
1139
|
+
* the current process, in an object with properties `user` and `system`, whose
|
1140
|
+
* values are microsecond values (millionth of a second). These values measure time
|
1141
|
+
* spent in user and system code respectively, and may end up being greater than
|
1142
|
+
* actual elapsed time if multiple CPU cores are performing work for this process.
|
1143
|
+
*
|
1144
|
+
* The result of a previous call to `process.cpuUsage()` can be passed as the
|
1145
|
+
* argument to the function, to get a diff reading.
|
1146
|
+
*
|
1147
|
+
* ```js
|
1148
|
+
* import { cpuUsage } from 'node:process';
|
1149
|
+
*
|
1150
|
+
* const startUsage = cpuUsage();
|
1151
|
+
* // { user: 38579, system: 6986 }
|
1152
|
+
*
|
1153
|
+
* // spin the CPU for 500 milliseconds
|
1154
|
+
* const now = Date.now();
|
1155
|
+
* while (Date.now() - now < 500);
|
1156
|
+
*
|
1157
|
+
* console.log(cpuUsage(startUsage));
|
1158
|
+
* // { user: 514883, system: 11226 }
|
1159
|
+
* ```
|
1160
|
+
* @since v6.1.0
|
1161
|
+
* @param previousValue A previous return value from calling `process.cpuUsage()`
|
1162
|
+
*/
|
1163
|
+
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
1164
|
+
/**
|
1165
|
+
* `process.nextTick()` adds `callback` to the "next tick queue". This queue is
|
1166
|
+
* fully drained after the current operation on the JavaScript stack runs to
|
1167
|
+
* completion and before the event loop is allowed to continue. It's possible to
|
1168
|
+
* create an infinite loop if one were to recursively call `process.nextTick()`.
|
1169
|
+
* See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
|
1170
|
+
*
|
1171
|
+
* ```js
|
1172
|
+
* import { nextTick } from 'node:process';
|
1173
|
+
*
|
1174
|
+
* console.log('start');
|
1175
|
+
* nextTick(() => {
|
1176
|
+
* console.log('nextTick callback');
|
1177
|
+
* });
|
1178
|
+
* console.log('scheduled');
|
1179
|
+
* // Output:
|
1180
|
+
* // start
|
1181
|
+
* // scheduled
|
1182
|
+
* // nextTick callback
|
1183
|
+
* ```
|
1184
|
+
*
|
1185
|
+
* This is important when developing APIs in order to give users the opportunity
|
1186
|
+
* to assign event handlers _after_ an object has been constructed but before any
|
1187
|
+
* I/O has occurred:
|
1188
|
+
*
|
1189
|
+
* ```js
|
1190
|
+
* import { nextTick } from 'node:process';
|
1191
|
+
*
|
1192
|
+
* function MyThing(options) {
|
1193
|
+
* this.setupOptions(options);
|
1194
|
+
*
|
1195
|
+
* nextTick(() => {
|
1196
|
+
* this.startDoingStuff();
|
1197
|
+
* });
|
1198
|
+
* }
|
1199
|
+
*
|
1200
|
+
* const thing = new MyThing();
|
1201
|
+
* thing.getReadyForStuff();
|
1202
|
+
*
|
1203
|
+
* // thing.startDoingStuff() gets called now, not before.
|
1204
|
+
* ```
|
1205
|
+
*
|
1206
|
+
* It is very important for APIs to be either 100% synchronous or 100%
|
1207
|
+
* asynchronous. Consider this example:
|
1208
|
+
*
|
1209
|
+
* ```js
|
1210
|
+
* // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
|
1211
|
+
* function maybeSync(arg, cb) {
|
1212
|
+
* if (arg) {
|
1213
|
+
* cb();
|
1214
|
+
* return;
|
1215
|
+
* }
|
1216
|
+
*
|
1217
|
+
* fs.stat('file', cb);
|
1218
|
+
* }
|
1219
|
+
* ```
|
1220
|
+
*
|
1221
|
+
* This API is hazardous because in the following case:
|
1222
|
+
*
|
1223
|
+
* ```js
|
1224
|
+
* const maybeTrue = Math.random() > 0.5;
|
1225
|
+
*
|
1226
|
+
* maybeSync(maybeTrue, () => {
|
1227
|
+
* foo();
|
1228
|
+
* });
|
1229
|
+
*
|
1230
|
+
* bar();
|
1231
|
+
* ```
|
1232
|
+
*
|
1233
|
+
* It is not clear whether `foo()` or `bar()` will be called first.
|
1234
|
+
*
|
1235
|
+
* The following approach is much better:
|
1236
|
+
*
|
1237
|
+
* ```js
|
1238
|
+
* import { nextTick } from 'node:process';
|
1239
|
+
*
|
1240
|
+
* function definitelyAsync(arg, cb) {
|
1241
|
+
* if (arg) {
|
1242
|
+
* nextTick(cb);
|
1243
|
+
* return;
|
1244
|
+
* }
|
1245
|
+
*
|
1246
|
+
* fs.stat('file', cb);
|
1247
|
+
* }
|
1248
|
+
* ```
|
1249
|
+
* @since v0.1.26
|
1250
|
+
* @param args Additional arguments to pass when invoking the `callback`
|
1251
|
+
*/
|
1252
|
+
nextTick(callback: Function, ...args: any[]): void;
|
1253
|
+
/**
|
1254
|
+
* The `process.release` property returns an `Object` containing metadata related
|
1255
|
+
* to the current release, including URLs for the source tarball and headers-only
|
1256
|
+
* tarball.
|
1257
|
+
*
|
1258
|
+
* `process.release` contains the following properties:
|
1259
|
+
*
|
1260
|
+
* ```js
|
1261
|
+
* {
|
1262
|
+
* name: 'node',
|
1263
|
+
* lts: 'Hydrogen',
|
1264
|
+
* sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
|
1265
|
+
* headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
|
1266
|
+
* libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
|
1267
|
+
* }
|
1268
|
+
* ```
|
1269
|
+
*
|
1270
|
+
* In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
|
1271
|
+
* relied upon to exist.
|
1272
|
+
* @since v3.0.0
|
1273
|
+
*/
|
1274
|
+
readonly release: ProcessRelease;
|
1275
|
+
features: {
|
1276
|
+
inspector: boolean;
|
1277
|
+
debug: boolean;
|
1278
|
+
uv: boolean;
|
1279
|
+
ipv6: boolean;
|
1280
|
+
tls_alpn: boolean;
|
1281
|
+
tls_sni: boolean;
|
1282
|
+
tls_ocsp: boolean;
|
1283
|
+
tls: boolean;
|
1284
|
+
};
|
1285
|
+
/**
|
1286
|
+
* `process.umask()` returns the Node.js process's file mode creation mask. Child
|
1287
|
+
* processes inherit the mask from the parent process.
|
1288
|
+
* @since v0.1.19
|
1289
|
+
* @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 *
|
1290
|
+
* security vulnerability. There is no safe, cross-platform alternative API.
|
1291
|
+
*/
|
1292
|
+
umask(): number;
|
1293
|
+
/**
|
1294
|
+
* Can only be set if not in worker thread.
|
1295
|
+
*/
|
1296
|
+
umask(mask: string | number): number;
|
1297
|
+
/**
|
1298
|
+
* The `process.uptime()` method returns the number of seconds the current Node.js
|
1299
|
+
* process has been running.
|
1300
|
+
*
|
1301
|
+
* The return value includes fractions of a second. Use `Math.floor()` to get whole
|
1302
|
+
* seconds.
|
1303
|
+
* @since v0.5.0
|
1304
|
+
*/
|
1305
|
+
uptime(): number;
|
1306
|
+
hrtime: HRTime;
|
1307
|
+
/**
|
1308
|
+
* If Node.js is spawned with an IPC channel, the `process.send()` method can be
|
1309
|
+
* used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
|
1310
|
+
*
|
1311
|
+
* If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`.
|
1312
|
+
*
|
1313
|
+
* The message goes through serialization and parsing. The resulting message might
|
1314
|
+
* not be the same as what is originally sent.
|
1315
|
+
* @since v0.5.9
|
1316
|
+
* @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
|
1317
|
+
*/
|
1318
|
+
send?(
|
1319
|
+
message: any,
|
1320
|
+
sendHandle?: any,
|
1321
|
+
options?: {
|
1322
|
+
swallowErrors?: boolean | undefined;
|
1323
|
+
},
|
1324
|
+
callback?: (error: Error | null) => void,
|
1325
|
+
): boolean;
|
1326
|
+
/**
|
1327
|
+
* 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
|
1328
|
+
* IPC channel to the parent process, allowing the child process to exit gracefully
|
1329
|
+
* once there are no other connections keeping it alive.
|
1330
|
+
*
|
1331
|
+
* The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
|
1332
|
+
*
|
1333
|
+
* If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
|
1334
|
+
* @since v0.7.2
|
1335
|
+
*/
|
1336
|
+
disconnect(): void;
|
1337
|
+
/**
|
1338
|
+
* 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
|
1339
|
+
* channel is connected and will return `false` after`process.disconnect()` is called.
|
1340
|
+
*
|
1341
|
+
* Once `process.connected` is `false`, it is no longer possible to send messages
|
1342
|
+
* over the IPC channel using `process.send()`.
|
1343
|
+
* @since v0.7.2
|
1344
|
+
*/
|
1345
|
+
connected: boolean;
|
1346
|
+
/**
|
1347
|
+
* The `process.allowedNodeEnvironmentFlags` property is a special,
|
1348
|
+
* read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
|
1349
|
+
*
|
1350
|
+
* `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
|
1351
|
+
* representations. `process.allowedNodeEnvironmentFlags.has()` will
|
1352
|
+
* return `true` in the following cases:
|
1353
|
+
*
|
1354
|
+
* * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
|
1355
|
+
* * Flags passed through to V8 (as listed in `--v8-options`) may replace
|
1356
|
+
* one or more _non-leading_ dashes for an underscore, or vice-versa;
|
1357
|
+
* e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
|
1358
|
+
* etc.
|
1359
|
+
* * Flags may contain one or more equals (`=`) characters; all
|
1360
|
+
* characters after and including the first equals will be ignored;
|
1361
|
+
* e.g., `--stack-trace-limit=100`.
|
1362
|
+
* * Flags _must_ be allowable within `NODE_OPTIONS`.
|
1363
|
+
*
|
1364
|
+
* When iterating over `process.allowedNodeEnvironmentFlags`, flags will
|
1365
|
+
* appear only _once_; each will begin with one or more dashes. Flags
|
1366
|
+
* passed through to V8 will contain underscores instead of non-leading
|
1367
|
+
* dashes:
|
1368
|
+
*
|
1369
|
+
* ```js
|
1370
|
+
* import { allowedNodeEnvironmentFlags } from 'node:process';
|
1371
|
+
*
|
1372
|
+
* allowedNodeEnvironmentFlags.forEach((flag) => {
|
1373
|
+
* // -r
|
1374
|
+
* // --inspect-brk
|
1375
|
+
* // --abort_on_uncaught_exception
|
1376
|
+
* // ...
|
1377
|
+
* });
|
1378
|
+
* ```
|
1379
|
+
*
|
1380
|
+
* The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
|
1381
|
+
* silently.
|
1382
|
+
*
|
1383
|
+
* If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
|
1384
|
+
* contain what _would have_ been allowable.
|
1385
|
+
* @since v10.10.0
|
1386
|
+
*/
|
1387
|
+
allowedNodeEnvironmentFlags: ReadonlySet<string>;
|
1388
|
+
/**
|
1389
|
+
* `process.report` is an object whose methods are used to generate diagnostic
|
1390
|
+
* reports for the current process. Additional documentation is available in the `report documentation`.
|
1391
|
+
* @since v11.8.0
|
1392
|
+
*/
|
1393
|
+
report?: ProcessReport | undefined;
|
1394
|
+
/**
|
1395
|
+
* ```js
|
1396
|
+
* import { resourceUsage } from 'node:process';
|
1397
|
+
*
|
1398
|
+
* console.log(resourceUsage());
|
1399
|
+
* /*
|
1400
|
+
* Will output:
|
1401
|
+
* {
|
1402
|
+
* userCPUTime: 82872,
|
1403
|
+
* systemCPUTime: 4143,
|
1404
|
+
* maxRSS: 33164,
|
1405
|
+
* sharedMemorySize: 0,
|
1406
|
+
* unsharedDataSize: 0,
|
1407
|
+
* unsharedStackSize: 0,
|
1408
|
+
* minorPageFault: 2469,
|
1409
|
+
* majorPageFault: 0,
|
1410
|
+
* swappedOut: 0,
|
1411
|
+
* fsRead: 0,
|
1412
|
+
* fsWrite: 8,
|
1413
|
+
* ipcSent: 0,
|
1414
|
+
* ipcReceived: 0,
|
1415
|
+
* signalsCount: 0,
|
1416
|
+
* voluntaryContextSwitches: 79,
|
1417
|
+
* involuntaryContextSwitches: 1
|
1418
|
+
* }
|
1419
|
+
*
|
1420
|
+
* ```
|
1421
|
+
* @since v12.6.0
|
1422
|
+
* @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].
|
1423
|
+
*/
|
1424
|
+
resourceUsage(): ResourceUsage;
|
1425
|
+
/**
|
1426
|
+
* The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
|
1427
|
+
* documentation for the `'warning' event` and the `emitWarning() method` for more information about this
|
1428
|
+
* flag's behavior.
|
1429
|
+
* @since v0.8.0
|
1430
|
+
*/
|
1431
|
+
traceDeprecation: boolean;
|
1432
|
+
/* EventEmitter */
|
1433
|
+
addListener(event: "beforeExit", listener: BeforeExitListener): this;
|
1434
|
+
addListener(event: "disconnect", listener: DisconnectListener): this;
|
1435
|
+
addListener(event: "exit", listener: ExitListener): this;
|
1436
|
+
addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
1437
|
+
addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
1438
|
+
addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
1439
|
+
addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
1440
|
+
addListener(event: "warning", listener: WarningListener): this;
|
1441
|
+
addListener(event: "message", listener: MessageListener): this;
|
1442
|
+
addListener(event: Signals, listener: SignalsListener): this;
|
1443
|
+
addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
1444
|
+
addListener(event: "worker", listener: WorkerListener): this;
|
1445
|
+
emit(event: "beforeExit", code: number): boolean;
|
1446
|
+
emit(event: "disconnect"): boolean;
|
1447
|
+
emit(event: "exit", code: number): boolean;
|
1448
|
+
emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
|
1449
|
+
emit(event: "uncaughtException", error: Error): boolean;
|
1450
|
+
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
1451
|
+
emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
|
1452
|
+
emit(event: "warning", warning: Error): boolean;
|
1453
|
+
emit(event: "message", message: unknown, sendHandle: unknown): this;
|
1454
|
+
emit(event: Signals, signal?: Signals): boolean;
|
1455
|
+
emit(
|
1456
|
+
event: "multipleResolves",
|
1457
|
+
type: MultipleResolveType,
|
1458
|
+
promise: Promise<unknown>,
|
1459
|
+
value: unknown,
|
1460
|
+
): this;
|
1461
|
+
emit(event: "worker", listener: WorkerListener): this;
|
1462
|
+
on(event: "beforeExit", listener: BeforeExitListener): this;
|
1463
|
+
on(event: "disconnect", listener: DisconnectListener): this;
|
1464
|
+
on(event: "exit", listener: ExitListener): this;
|
1465
|
+
on(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
1466
|
+
on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
1467
|
+
on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
1468
|
+
on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
1469
|
+
on(event: "warning", listener: WarningListener): this;
|
1470
|
+
on(event: "message", listener: MessageListener): this;
|
1471
|
+
on(event: Signals, listener: SignalsListener): this;
|
1472
|
+
on(event: "multipleResolves", listener: MultipleResolveListener): this;
|
1473
|
+
on(event: "worker", listener: WorkerListener): this;
|
1474
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
1475
|
+
once(event: "beforeExit", listener: BeforeExitListener): this;
|
1476
|
+
once(event: "disconnect", listener: DisconnectListener): this;
|
1477
|
+
once(event: "exit", listener: ExitListener): this;
|
1478
|
+
once(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
1479
|
+
once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
1480
|
+
once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
1481
|
+
once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
1482
|
+
once(event: "warning", listener: WarningListener): this;
|
1483
|
+
once(event: "message", listener: MessageListener): this;
|
1484
|
+
once(event: Signals, listener: SignalsListener): this;
|
1485
|
+
once(event: "multipleResolves", listener: MultipleResolveListener): this;
|
1486
|
+
once(event: "worker", listener: WorkerListener): this;
|
1487
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
1488
|
+
prependListener(event: "beforeExit", listener: BeforeExitListener): this;
|
1489
|
+
prependListener(event: "disconnect", listener: DisconnectListener): this;
|
1490
|
+
prependListener(event: "exit", listener: ExitListener): this;
|
1491
|
+
prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
1492
|
+
prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
1493
|
+
prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
1494
|
+
prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
1495
|
+
prependListener(event: "warning", listener: WarningListener): this;
|
1496
|
+
prependListener(event: "message", listener: MessageListener): this;
|
1497
|
+
prependListener(event: Signals, listener: SignalsListener): this;
|
1498
|
+
prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
1499
|
+
prependListener(event: "worker", listener: WorkerListener): this;
|
1500
|
+
prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
|
1501
|
+
prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
|
1502
|
+
prependOnceListener(event: "exit", listener: ExitListener): this;
|
1503
|
+
prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
1504
|
+
prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
1505
|
+
prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
1506
|
+
prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
1507
|
+
prependOnceListener(event: "warning", listener: WarningListener): this;
|
1508
|
+
prependOnceListener(event: "message", listener: MessageListener): this;
|
1509
|
+
prependOnceListener(event: Signals, listener: SignalsListener): this;
|
1510
|
+
prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
1511
|
+
prependOnceListener(event: "worker", listener: WorkerListener): this;
|
1512
|
+
listeners(event: "beforeExit"): BeforeExitListener[];
|
1513
|
+
listeners(event: "disconnect"): DisconnectListener[];
|
1514
|
+
listeners(event: "exit"): ExitListener[];
|
1515
|
+
listeners(event: "rejectionHandled"): RejectionHandledListener[];
|
1516
|
+
listeners(event: "uncaughtException"): UncaughtExceptionListener[];
|
1517
|
+
listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
|
1518
|
+
listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
|
1519
|
+
listeners(event: "warning"): WarningListener[];
|
1520
|
+
listeners(event: "message"): MessageListener[];
|
1521
|
+
listeners(event: Signals): SignalsListener[];
|
1522
|
+
listeners(event: "multipleResolves"): MultipleResolveListener[];
|
1523
|
+
listeners(event: "worker"): WorkerListener[];
|
1524
|
+
}
|
1525
|
+
}
|
1526
|
+
}
|
1527
|
+
export = process;
|
1528
|
+
}
|
1529
|
+
declare module "node:process" {
|
1530
|
+
import process = require("process");
|
1531
|
+
export = process;
|
1532
|
+
}
|