@psnext/slingcli 3.3.20260911-1 → 3.3.20260914-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-VDBOM5UG.js → chunk-BRL3MDQL.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +79 -32
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert/strict.d.ts +13 -56
- package/node_modules/@types/node/assert.d.ts +189 -190
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +12 -13
- package/node_modules/@types/node/buffer.d.ts +103 -237
- package/node_modules/@types/node/child_process.d.ts +39 -154
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +1000 -1593
- package/node_modules/@types/node/dgram.d.ts +133 -81
- package/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
- package/node_modules/@types/node/dns/promises.d.ts +9 -15
- package/node_modules/@types/node/dns.d.ts +136 -183
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +256 -85
- package/node_modules/@types/node/fs.d.ts +865 -525
- package/node_modules/@types/node/globals.d.ts +12 -34
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +433 -312
- package/node_modules/@types/node/http2.d.ts +545 -891
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +25 -7
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +70 -58
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +54 -219
- package/node_modules/@types/node/net.d.ts +208 -222
- package/node_modules/@types/node/os.d.ts +41 -49
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +339 -690
- package/node_modules/@types/node/process.d.ts +389 -205
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +2153 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +66 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +1 -116
- package/node_modules/@types/node/sqlite.d.ts +486 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +452 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +197 -454
- package/node_modules/@types/node/stream.d.ts +603 -491
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +513 -292
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +166 -257
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +26 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +118 -0
- package/node_modules/@types/node/tty.d.ts +61 -43
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +170 -1099
- package/node_modules/@types/node/v8.d.ts +175 -36
- package/node_modules/@types/node/vfs.d.ts +211 -0
- package/node_modules/@types/node/vm.d.ts +292 -209
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +97 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +257 -407
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +24 -165
- package/node_modules/undici-types/agent.d.ts +12 -13
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +63 -37
- package/node_modules/undici-types/connector.d.ts +5 -2
- package/node_modules/undici-types/cookies.d.ts +3 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +136 -139
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +92 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +51 -25
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +10 -9
- package/node_modules/undici-types/header.d.ts +162 -1
- package/node_modules/undici-types/index.d.ts +69 -47
- package/node_modules/undici-types/interceptors.d.ts +72 -9
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +26 -21
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -14
- package/node_modules/undici-types/proxy-agent.d.ts +14 -6
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -30
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +14 -30
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +1 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +2 -11
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -4
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +53 -137
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +70 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +87 -35
- package/node_modules/zod/src/v4/core/api.ts +21 -29
- package/node_modules/zod/src/v4/core/checks.ts +61 -1
- package/node_modules/zod/src/v4/core/compile.ts +35 -24
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +9 -63
- package/node_modules/zod/src/v4/core/memoizer.ts +2 -5
- package/node_modules/zod/src/v4/core/regexes.ts +4 -0
- package/node_modules/zod/src/v4/core/schemas.ts +36 -109
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +177 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +1 -1
- package/node_modules/zod/src/v4/core/util.ts +0 -4
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/src/v4/core/visit.ts +0 -11
- package/node_modules/zod/src/v4/locales/ar.ts +1 -0
- package/node_modules/zod/src/v4/locales/az.ts +1 -0
- package/node_modules/zod/src/v4/locales/be.ts +1 -0
- package/node_modules/zod/src/v4/locales/bg.ts +1 -0
- package/node_modules/zod/src/v4/locales/bn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ca.ts +1 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
- package/node_modules/zod/src/v4/locales/cs.ts +1 -0
- package/node_modules/zod/src/v4/locales/da.ts +1 -0
- package/node_modules/zod/src/v4/locales/de.ts +1 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +1 -0
- package/node_modules/zod/src/v4/locales/eo.ts +1 -0
- package/node_modules/zod/src/v4/locales/es.ts +1 -0
- package/node_modules/zod/src/v4/locales/fa.ts +1 -0
- package/node_modules/zod/src/v4/locales/fi.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr.ts +1 -0
- package/node_modules/zod/src/v4/locales/gu.ts +1 -0
- package/node_modules/zod/src/v4/locales/he.ts +1 -0
- package/node_modules/zod/src/v4/locales/hi.ts +1 -0
- package/node_modules/zod/src/v4/locales/hr.ts +1 -0
- package/node_modules/zod/src/v4/locales/hu.ts +1 -0
- package/node_modules/zod/src/v4/locales/hy.ts +1 -0
- package/node_modules/zod/src/v4/locales/id.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +1 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -0
- package/node_modules/zod/src/v4/locales/ja.ts +1 -0
- package/node_modules/zod/src/v4/locales/ka.ts +1 -0
- package/node_modules/zod/src/v4/locales/km.ts +1 -0
- package/node_modules/zod/src/v4/locales/kn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ko.ts +1 -0
- package/node_modules/zod/src/v4/locales/lt.ts +1 -0
- package/node_modules/zod/src/v4/locales/mk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ms.ts +1 -0
- package/node_modules/zod/src/v4/locales/ne.ts +1 -0
- package/node_modules/zod/src/v4/locales/nl.ts +1 -0
- package/node_modules/zod/src/v4/locales/nn.ts +1 -0
- package/node_modules/zod/src/v4/locales/no.ts +1 -0
- package/node_modules/zod/src/v4/locales/ota.ts +1 -0
- package/node_modules/zod/src/v4/locales/pl.ts +1 -0
- package/node_modules/zod/src/v4/locales/ps.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt.ts +1 -0
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +1 -0
- package/node_modules/zod/src/v4/locales/sk.ts +1 -0
- package/node_modules/zod/src/v4/locales/sl.ts +1 -0
- package/node_modules/zod/src/v4/locales/sv.ts +1 -0
- package/node_modules/zod/src/v4/locales/ta.ts +1 -0
- package/node_modules/zod/src/v4/locales/tg.ts +1 -0
- package/node_modules/zod/src/v4/locales/th.ts +1 -0
- package/node_modules/zod/src/v4/locales/tk.ts +1 -0
- package/node_modules/zod/src/v4/locales/tr.ts +1 -0
- package/node_modules/zod/src/v4/locales/uk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ur.ts +1 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +1 -0
- package/node_modules/zod/src/v4/locales/yo.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +12 -23
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +56 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +7 -0
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/schemas.cjs +11 -15
- package/node_modules/zod/v4/classic/schemas.d.cts +4 -6
- package/node_modules/zod/v4/classic/schemas.d.ts +4 -6
- package/node_modules/zod/v4/classic/schemas.js +9 -13
- package/node_modules/zod/v4/core/api.cjs +11 -23
- package/node_modules/zod/v4/core/api.d.cts +8 -4
- package/node_modules/zod/v4/core/api.d.ts +8 -4
- package/node_modules/zod/v4/core/api.js +11 -23
- package/node_modules/zod/v4/core/checks.cjs +32 -1
- package/node_modules/zod/v4/core/checks.d.cts +16 -0
- package/node_modules/zod/v4/core/checks.d.ts +16 -0
- package/node_modules/zod/v4/core/checks.js +31 -0
- package/node_modules/zod/v4/core/compile.cjs +12 -17
- package/node_modules/zod/v4/core/compile.js +13 -18
- package/node_modules/zod/v4/core/core.cjs +1 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/json-schema-processors.cjs +8 -44
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -1
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -1
- package/node_modules/zod/v4/core/json-schema-processors.js +8 -43
- package/node_modules/zod/v4/core/memoizer.cjs +2 -5
- package/node_modules/zod/v4/core/memoizer.js +2 -5
- package/node_modules/zod/v4/core/regexes.cjs +4 -2
- package/node_modules/zod/v4/core/regexes.d.cts +1 -0
- package/node_modules/zod/v4/core/regexes.d.ts +1 -0
- package/node_modules/zod/v4/core/regexes.js +2 -0
- package/node_modules/zod/v4/core/schemas.cjs +33 -73
- package/node_modules/zod/v4/core/schemas.d.cts +7 -22
- package/node_modules/zod/v4/core/schemas.d.ts +7 -22
- package/node_modules/zod/v4/core/schemas.js +30 -72
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -1
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -3
- package/node_modules/zod/v4/core/to-json-schema.js +1 -1
- package/node_modules/zod/v4/core/util.cjs +0 -4
- package/node_modules/zod/v4/core/util.js +0 -4
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/node_modules/zod/v4/core/visit.cjs +0 -12
- package/node_modules/zod/v4/core/visit.js +0 -12
- package/node_modules/zod/v4/locales/ar.cjs +1 -0
- package/node_modules/zod/v4/locales/ar.js +1 -0
- package/node_modules/zod/v4/locales/az.cjs +1 -0
- package/node_modules/zod/v4/locales/az.js +1 -0
- package/node_modules/zod/v4/locales/be.cjs +1 -0
- package/node_modules/zod/v4/locales/be.js +1 -0
- package/node_modules/zod/v4/locales/bg.cjs +1 -0
- package/node_modules/zod/v4/locales/bg.js +1 -0
- package/node_modules/zod/v4/locales/bn.cjs +1 -0
- package/node_modules/zod/v4/locales/bn.js +1 -0
- package/node_modules/zod/v4/locales/ca.cjs +1 -0
- package/node_modules/zod/v4/locales/ca.js +1 -0
- package/node_modules/zod/v4/locales/ckb.cjs +1 -0
- package/node_modules/zod/v4/locales/ckb.js +1 -0
- package/node_modules/zod/v4/locales/cs.cjs +1 -0
- package/node_modules/zod/v4/locales/cs.js +1 -0
- package/node_modules/zod/v4/locales/da.cjs +1 -0
- package/node_modules/zod/v4/locales/da.js +1 -0
- package/node_modules/zod/v4/locales/de.cjs +1 -0
- package/node_modules/zod/v4/locales/de.js +1 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +1 -0
- package/node_modules/zod/v4/locales/en.js +1 -0
- package/node_modules/zod/v4/locales/eo.cjs +1 -0
- package/node_modules/zod/v4/locales/eo.js +1 -0
- package/node_modules/zod/v4/locales/es.cjs +1 -0
- package/node_modules/zod/v4/locales/es.js +1 -0
- package/node_modules/zod/v4/locales/fa.cjs +1 -0
- package/node_modules/zod/v4/locales/fa.js +1 -0
- package/node_modules/zod/v4/locales/fi.cjs +1 -0
- package/node_modules/zod/v4/locales/fi.js +1 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
- package/node_modules/zod/v4/locales/fr-CA.js +1 -0
- package/node_modules/zod/v4/locales/fr.cjs +1 -0
- package/node_modules/zod/v4/locales/fr.js +1 -0
- package/node_modules/zod/v4/locales/gu.cjs +1 -0
- package/node_modules/zod/v4/locales/gu.js +1 -0
- package/node_modules/zod/v4/locales/he.cjs +1 -0
- package/node_modules/zod/v4/locales/he.js +1 -0
- package/node_modules/zod/v4/locales/hi.cjs +1 -0
- package/node_modules/zod/v4/locales/hi.js +1 -0
- package/node_modules/zod/v4/locales/hr.cjs +1 -0
- package/node_modules/zod/v4/locales/hr.js +1 -0
- package/node_modules/zod/v4/locales/hu.cjs +1 -0
- package/node_modules/zod/v4/locales/hu.js +1 -0
- package/node_modules/zod/v4/locales/hy.cjs +1 -0
- package/node_modules/zod/v4/locales/hy.js +1 -0
- package/node_modules/zod/v4/locales/id.cjs +1 -0
- package/node_modules/zod/v4/locales/id.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +1 -0
- package/node_modules/zod/v4/locales/is.js +1 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -0
- package/node_modules/zod/v4/locales/it.js +1 -0
- package/node_modules/zod/v4/locales/ja.cjs +1 -0
- package/node_modules/zod/v4/locales/ja.js +1 -0
- package/node_modules/zod/v4/locales/ka.cjs +1 -0
- package/node_modules/zod/v4/locales/ka.js +1 -0
- package/node_modules/zod/v4/locales/km.cjs +1 -0
- package/node_modules/zod/v4/locales/km.js +1 -0
- package/node_modules/zod/v4/locales/kn.cjs +1 -0
- package/node_modules/zod/v4/locales/kn.js +1 -0
- package/node_modules/zod/v4/locales/ko.cjs +1 -0
- package/node_modules/zod/v4/locales/ko.js +1 -0
- package/node_modules/zod/v4/locales/lt.cjs +1 -0
- package/node_modules/zod/v4/locales/lt.js +1 -0
- package/node_modules/zod/v4/locales/mk.cjs +1 -0
- package/node_modules/zod/v4/locales/mk.js +1 -0
- package/node_modules/zod/v4/locales/ms.cjs +1 -0
- package/node_modules/zod/v4/locales/ms.js +1 -0
- package/node_modules/zod/v4/locales/ne.cjs +1 -0
- package/node_modules/zod/v4/locales/ne.js +1 -0
- package/node_modules/zod/v4/locales/nl.cjs +1 -0
- package/node_modules/zod/v4/locales/nl.js +1 -0
- package/node_modules/zod/v4/locales/nn.cjs +1 -0
- package/node_modules/zod/v4/locales/nn.js +1 -0
- package/node_modules/zod/v4/locales/no.cjs +1 -0
- package/node_modules/zod/v4/locales/no.js +1 -0
- package/node_modules/zod/v4/locales/ota.cjs +1 -0
- package/node_modules/zod/v4/locales/ota.js +1 -0
- package/node_modules/zod/v4/locales/pl.cjs +1 -0
- package/node_modules/zod/v4/locales/pl.js +1 -0
- package/node_modules/zod/v4/locales/ps.cjs +1 -0
- package/node_modules/zod/v4/locales/ps.js +1 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
- package/node_modules/zod/v4/locales/pt-BR.js +1 -0
- package/node_modules/zod/v4/locales/pt.cjs +1 -0
- package/node_modules/zod/v4/locales/pt.js +1 -0
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +1 -0
- package/node_modules/zod/v4/locales/ru.js +1 -0
- package/node_modules/zod/v4/locales/sk.cjs +1 -0
- package/node_modules/zod/v4/locales/sk.js +1 -0
- package/node_modules/zod/v4/locales/sl.cjs +1 -0
- package/node_modules/zod/v4/locales/sl.js +1 -0
- package/node_modules/zod/v4/locales/sv.cjs +1 -0
- package/node_modules/zod/v4/locales/sv.js +1 -0
- package/node_modules/zod/v4/locales/ta.cjs +1 -0
- package/node_modules/zod/v4/locales/ta.js +1 -0
- package/node_modules/zod/v4/locales/tg.cjs +1 -0
- package/node_modules/zod/v4/locales/tg.js +1 -0
- package/node_modules/zod/v4/locales/th.cjs +1 -0
- package/node_modules/zod/v4/locales/th.js +1 -0
- package/node_modules/zod/v4/locales/tk.cjs +1 -0
- package/node_modules/zod/v4/locales/tk.js +1 -0
- package/node_modules/zod/v4/locales/tr.cjs +1 -0
- package/node_modules/zod/v4/locales/tr.js +1 -0
- package/node_modules/zod/v4/locales/uk.cjs +1 -0
- package/node_modules/zod/v4/locales/uk.js +1 -0
- package/node_modules/zod/v4/locales/ur.cjs +1 -0
- package/node_modules/zod/v4/locales/ur.js +1 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +1 -0
- package/node_modules/zod/v4/locales/vi.js +1 -0
- package/node_modules/zod/v4/locales/yo.cjs +1 -0
- package/node_modules/zod/v4/locales/yo.js +1 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-CN.js +1 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-TW.js +1 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +11 -13
- package/node_modules/zod/v4/mini/schemas.d.cts +1 -4
- package/node_modules/zod/v4/mini/schemas.d.ts +1 -4
- package/node_modules/zod/v4/mini/schemas.js +9 -11
- package/package.json +2 -2
- package/slingshot/index.js +183 -182
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,139 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* The cluster module allows easy creation of child processes that all share
|
|
8
|
-
* server ports.
|
|
9
|
-
*
|
|
10
|
-
* ```js
|
|
11
|
-
* import cluster from 'node:cluster';
|
|
12
|
-
* import http from 'node:http';
|
|
13
|
-
* import { availableParallelism } from 'node:os';
|
|
14
|
-
* import process from 'node:process';
|
|
15
|
-
*
|
|
16
|
-
* const numCPUs = availableParallelism();
|
|
17
|
-
*
|
|
18
|
-
* if (cluster.isPrimary) {
|
|
19
|
-
* console.log(`Primary ${process.pid} is running`);
|
|
20
|
-
*
|
|
21
|
-
* // Fork workers.
|
|
22
|
-
* for (let i = 0; i < numCPUs; i++) {
|
|
23
|
-
* cluster.fork();
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* cluster.on('exit', (worker, code, signal) => {
|
|
27
|
-
* console.log(`worker ${worker.process.pid} died`);
|
|
28
|
-
* });
|
|
29
|
-
* } else {
|
|
30
|
-
* // Workers can share any TCP connection
|
|
31
|
-
* // In this case it is an HTTP server
|
|
32
|
-
* http.createServer((req, res) => {
|
|
33
|
-
* res.writeHead(200);
|
|
34
|
-
* res.end('hello world\n');
|
|
35
|
-
* }).listen(8000);
|
|
36
|
-
*
|
|
37
|
-
* console.log(`Worker ${process.pid} started`);
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* Running Node.js will now share port 8000 between the workers:
|
|
42
|
-
*
|
|
43
|
-
* ```console
|
|
44
|
-
* $ node server.js
|
|
45
|
-
* Primary 3596 is running
|
|
46
|
-
* Worker 4324 started
|
|
47
|
-
* Worker 4520 started
|
|
48
|
-
* Worker 6056 started
|
|
49
|
-
* Worker 5644 started
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/cluster.js)
|
|
54
|
-
*/
|
|
55
|
-
declare module "cluster" {
|
|
56
|
-
import * as child from "node:child_process";
|
|
57
|
-
import EventEmitter = require("node:events");
|
|
58
|
-
import * as net from "node:net";
|
|
59
|
-
type SerializationType = "json" | "advanced";
|
|
60
|
-
export interface ClusterSettings {
|
|
61
|
-
/**
|
|
62
|
-
* List of string arguments passed to the Node.js executable.
|
|
63
|
-
* @default process.execArgv
|
|
64
|
-
*/
|
|
65
|
-
execArgv?: string[] | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* File path to worker file.
|
|
68
|
-
* @default process.argv[1]
|
|
69
|
-
*/
|
|
70
|
-
exec?: string | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* String arguments passed to worker.
|
|
73
|
-
* @default process.argv.slice(2)
|
|
74
|
-
*/
|
|
75
|
-
args?: readonly string[] | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Whether or not to send output to parent's stdio.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
silent?: boolean | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
|
|
83
|
-
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processspawncommand-args-options)'s
|
|
84
|
-
* [`stdio`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#optionsstdio).
|
|
85
|
-
*/
|
|
86
|
-
stdio?: any[] | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
|
|
89
|
-
*/
|
|
90
|
-
uid?: number | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
|
|
93
|
-
*/
|
|
94
|
-
gid?: number | undefined;
|
|
95
|
-
/**
|
|
96
|
-
* Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
|
|
97
|
-
* By default each worker gets its own port, incremented from the primary's `process.debugPort`.
|
|
98
|
-
*/
|
|
99
|
-
inspectPort?: number | (() => number) | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
|
|
102
|
-
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#advanced-serialization) for more details.
|
|
103
|
-
* @default false
|
|
104
|
-
*/
|
|
105
|
-
serialization?: SerializationType | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Current working directory of the worker process.
|
|
108
|
-
* @default undefined (inherits from parent process)
|
|
109
|
-
*/
|
|
110
|
-
cwd?: string | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* Hide the forked processes console window that would normally be created on Windows systems.
|
|
113
|
-
* @default false
|
|
114
|
-
*/
|
|
115
|
-
windowsHide?: boolean | undefined;
|
|
116
|
-
}
|
|
117
|
-
export interface Address {
|
|
118
|
-
address: string;
|
|
119
|
-
port: number;
|
|
120
|
-
/**
|
|
121
|
-
* The `addressType` is one of:
|
|
122
|
-
*
|
|
123
|
-
* * `4` (TCPv4)
|
|
124
|
-
* * `6` (TCPv6)
|
|
125
|
-
* * `-1` (Unix domain socket)
|
|
126
|
-
* * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
|
|
127
|
-
*/
|
|
128
|
-
addressType: 4 | 6 | -1 | "udp4" | "udp6";
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* A `Worker` object contains all public information and method about a worker.
|
|
132
|
-
* In the primary it can be obtained using `cluster.workers`. In a worker
|
|
133
|
-
* it can be obtained using `cluster.worker`.
|
|
134
|
-
* @since v0.7.0
|
|
135
|
-
*/
|
|
136
|
-
export class Worker extends EventEmitter {
|
|
1
|
+
declare module "node:cluster" {
|
|
2
|
+
import * as child_process from "node:child_process";
|
|
3
|
+
import { EventEmitter, InternalEventEmitter } from "node:events";
|
|
4
|
+
class Worker implements EventEmitter {
|
|
5
|
+
constructor(options?: cluster.WorkerOptions);
|
|
137
6
|
/**
|
|
138
7
|
* Each new worker is given its own unique id, this id is stored in the `id`.
|
|
139
8
|
*
|
|
@@ -142,21 +11,21 @@ declare module "cluster" {
|
|
|
142
11
|
*/
|
|
143
12
|
id: number;
|
|
144
13
|
/**
|
|
145
|
-
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-
|
|
14
|
+
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
|
|
146
15
|
* from this function is stored as `.process`. In a worker, the global `process` is stored.
|
|
147
16
|
*
|
|
148
|
-
* See: [Child Process module](https://nodejs.org/docs/latest-
|
|
17
|
+
* See: [Child Process module](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options).
|
|
149
18
|
*
|
|
150
19
|
* Workers will call `process.exit(0)` if the `'disconnect'` event occurs
|
|
151
20
|
* on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
|
|
152
21
|
* accidental disconnection.
|
|
153
22
|
* @since v0.7.0
|
|
154
23
|
*/
|
|
155
|
-
process:
|
|
24
|
+
process: child_process.ChildProcess;
|
|
156
25
|
/**
|
|
157
26
|
* Send a message to a worker or primary, optionally with a handle.
|
|
158
27
|
*
|
|
159
|
-
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-
|
|
28
|
+
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
|
|
160
29
|
*
|
|
161
30
|
* In a worker, this sends a message to the primary. It is identical to `process.send()`.
|
|
162
31
|
*
|
|
@@ -176,16 +45,16 @@ declare module "cluster" {
|
|
|
176
45
|
* @since v0.7.0
|
|
177
46
|
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
|
|
178
47
|
*/
|
|
179
|
-
send(message:
|
|
48
|
+
send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean;
|
|
180
49
|
send(
|
|
181
|
-
message:
|
|
182
|
-
sendHandle:
|
|
50
|
+
message: child_process.Serializable,
|
|
51
|
+
sendHandle: child_process.SendHandle,
|
|
183
52
|
callback?: (error: Error | null) => void,
|
|
184
53
|
): boolean;
|
|
185
54
|
send(
|
|
186
|
-
message:
|
|
187
|
-
sendHandle:
|
|
188
|
-
options?:
|
|
55
|
+
message: child_process.Serializable,
|
|
56
|
+
sendHandle: child_process.SendHandle,
|
|
57
|
+
options?: child_process.MessageOptions,
|
|
189
58
|
callback?: (error: Error | null) => void,
|
|
190
59
|
): boolean;
|
|
191
60
|
/**
|
|
@@ -198,7 +67,7 @@ declare module "cluster" {
|
|
|
198
67
|
* This method is aliased as `worker.destroy()` for backwards compatibility.
|
|
199
68
|
*
|
|
200
69
|
* In a worker, `process.kill()` exists, but it is not this function;
|
|
201
|
-
* it is [`kill()`](https://nodejs.org/docs/latest-
|
|
70
|
+
* it is [`kill()`](https://nodejs.org/docs/latest-v26.x/api/process.html#processkillpid-signal).
|
|
202
71
|
* @since v0.9.12
|
|
203
72
|
* @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
|
|
204
73
|
*/
|
|
@@ -335,244 +204,229 @@ declare module "cluster" {
|
|
|
335
204
|
* @since v6.0.0
|
|
336
205
|
*/
|
|
337
206
|
exitedAfterDisconnect: boolean;
|
|
338
|
-
/**
|
|
339
|
-
* events.EventEmitter
|
|
340
|
-
* 1. disconnect
|
|
341
|
-
* 2. error
|
|
342
|
-
* 3. exit
|
|
343
|
-
* 4. listening
|
|
344
|
-
* 5. message
|
|
345
|
-
* 6. online
|
|
346
|
-
*/
|
|
347
|
-
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
348
|
-
addListener(event: "disconnect", listener: () => void): this;
|
|
349
|
-
addListener(event: "error", listener: (error: Error) => void): this;
|
|
350
|
-
addListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
351
|
-
addListener(event: "listening", listener: (address: Address) => void): this;
|
|
352
|
-
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
|
353
|
-
addListener(event: "online", listener: () => void): this;
|
|
354
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
|
355
|
-
emit(event: "disconnect"): boolean;
|
|
356
|
-
emit(event: "error", error: Error): boolean;
|
|
357
|
-
emit(event: "exit", code: number, signal: string): boolean;
|
|
358
|
-
emit(event: "listening", address: Address): boolean;
|
|
359
|
-
emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
|
|
360
|
-
emit(event: "online"): boolean;
|
|
361
|
-
on(event: string, listener: (...args: any[]) => void): this;
|
|
362
|
-
on(event: "disconnect", listener: () => void): this;
|
|
363
|
-
on(event: "error", listener: (error: Error) => void): this;
|
|
364
|
-
on(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
365
|
-
on(event: "listening", listener: (address: Address) => void): this;
|
|
366
|
-
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
|
367
|
-
on(event: "online", listener: () => void): this;
|
|
368
|
-
once(event: string, listener: (...args: any[]) => void): this;
|
|
369
|
-
once(event: "disconnect", listener: () => void): this;
|
|
370
|
-
once(event: "error", listener: (error: Error) => void): this;
|
|
371
|
-
once(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
372
|
-
once(event: "listening", listener: (address: Address) => void): this;
|
|
373
|
-
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
|
374
|
-
once(event: "online", listener: () => void): this;
|
|
375
|
-
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
376
|
-
prependListener(event: "disconnect", listener: () => void): this;
|
|
377
|
-
prependListener(event: "error", listener: (error: Error) => void): this;
|
|
378
|
-
prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
379
|
-
prependListener(event: "listening", listener: (address: Address) => void): this;
|
|
380
|
-
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
|
381
|
-
prependListener(event: "online", listener: () => void): this;
|
|
382
|
-
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
383
|
-
prependOnceListener(event: "disconnect", listener: () => void): this;
|
|
384
|
-
prependOnceListener(event: "error", listener: (error: Error) => void): this;
|
|
385
|
-
prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
386
|
-
prependOnceListener(event: "listening", listener: (address: Address) => void): this;
|
|
387
|
-
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
|
|
388
|
-
prependOnceListener(event: "online", listener: () => void): this;
|
|
389
207
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
208
|
+
interface Worker extends InternalEventEmitter<cluster.WorkerEventMap> {}
|
|
209
|
+
type _Worker = Worker;
|
|
210
|
+
namespace cluster {
|
|
211
|
+
interface Worker extends _Worker {}
|
|
212
|
+
interface WorkerOptions {
|
|
213
|
+
id?: number | undefined;
|
|
214
|
+
process?: child_process.ChildProcess | undefined;
|
|
215
|
+
state?: string | undefined;
|
|
216
|
+
}
|
|
217
|
+
interface WorkerEventMap {
|
|
218
|
+
"disconnect": [];
|
|
219
|
+
"error": [error: Error];
|
|
220
|
+
"exit": [code: number, signal: string];
|
|
221
|
+
"listening": [address: Address];
|
|
222
|
+
"message": [message: any, handle: child_process.SendHandle];
|
|
223
|
+
"online": [];
|
|
224
|
+
}
|
|
225
|
+
interface ClusterSettings {
|
|
226
|
+
/**
|
|
227
|
+
* List of string arguments passed to the Node.js executable.
|
|
228
|
+
* @default process.execArgv
|
|
229
|
+
*/
|
|
230
|
+
execArgv?: string[] | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* File path to worker file.
|
|
233
|
+
* @default process.argv[1]
|
|
234
|
+
*/
|
|
235
|
+
exec?: string | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* String arguments passed to worker.
|
|
238
|
+
* @default process.argv.slice(2)
|
|
239
|
+
*/
|
|
240
|
+
args?: readonly string[] | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Whether or not to send output to parent's stdio.
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
silent?: boolean | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
|
|
248
|
+
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processspawncommand-args-options)'s
|
|
249
|
+
* [`stdio`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#optionsstdio).
|
|
250
|
+
*/
|
|
251
|
+
stdio?: any[] | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
|
|
254
|
+
*/
|
|
255
|
+
uid?: number | undefined;
|
|
256
|
+
/**
|
|
257
|
+
* Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
|
|
258
|
+
*/
|
|
259
|
+
gid?: number | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
|
|
262
|
+
* By default each worker gets its own port, incremented from the primary's `process.debugPort`.
|
|
263
|
+
*/
|
|
264
|
+
inspectPort?: number | (() => number) | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
|
|
267
|
+
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#advanced-serialization) for more details.
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
270
|
+
serialization?: "json" | "advanced" | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Current working directory of the worker process.
|
|
273
|
+
* @default undefined (inherits from parent process)
|
|
274
|
+
*/
|
|
275
|
+
cwd?: string | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Hide the forked processes console window that would normally be created on Windows systems.
|
|
278
|
+
* @default false
|
|
279
|
+
*/
|
|
280
|
+
windowsHide?: boolean | undefined;
|
|
281
|
+
}
|
|
282
|
+
interface Address {
|
|
283
|
+
address: string;
|
|
284
|
+
port: number;
|
|
285
|
+
/**
|
|
286
|
+
* The `addressType` is one of:
|
|
287
|
+
*
|
|
288
|
+
* * `4` (TCPv4)
|
|
289
|
+
* * `6` (TCPv6)
|
|
290
|
+
* * `-1` (Unix domain socket)
|
|
291
|
+
* * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
|
|
292
|
+
*/
|
|
293
|
+
addressType: 4 | 6 | -1 | "udp4" | "udp6";
|
|
294
|
+
}
|
|
295
|
+
interface ClusterEventMap {
|
|
296
|
+
"disconnect": [worker: Worker];
|
|
297
|
+
"exit": [worker: Worker, code: number, signal: string];
|
|
298
|
+
"fork": [worker: Worker];
|
|
299
|
+
"listening": [worker: Worker, address: Address];
|
|
300
|
+
"message": [worker: Worker, message: any, handle: child_process.SendHandle];
|
|
301
|
+
"online": [worker: Worker];
|
|
302
|
+
"setup": [settings: ClusterSettings];
|
|
303
|
+
}
|
|
304
|
+
interface Cluster extends InternalEventEmitter<ClusterEventMap> {
|
|
305
|
+
/**
|
|
306
|
+
* A `Worker` object contains all public information and method about a worker.
|
|
307
|
+
* In the primary it can be obtained using `cluster.workers`. In a worker
|
|
308
|
+
* it can be obtained using `cluster.worker`.
|
|
309
|
+
* @since v0.7.0
|
|
310
|
+
*/
|
|
311
|
+
Worker: typeof Worker;
|
|
312
|
+
disconnect(callback?: () => void): void;
|
|
313
|
+
/**
|
|
314
|
+
* Spawn a new worker process.
|
|
315
|
+
*
|
|
316
|
+
* This can only be called from the primary process.
|
|
317
|
+
* @param env Key/value pairs to add to worker process environment.
|
|
318
|
+
* @since v0.6.0
|
|
319
|
+
*/
|
|
320
|
+
fork(env?: any): Worker;
|
|
321
|
+
/** @deprecated since v16.0.0 - use isPrimary. */
|
|
322
|
+
readonly isMaster: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
|
|
325
|
+
* is undefined, then `isPrimary` is `true`.
|
|
326
|
+
* @since v16.0.0
|
|
327
|
+
*/
|
|
328
|
+
readonly isPrimary: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* True if the process is not a primary (it is the negation of `cluster.isPrimary`).
|
|
331
|
+
* @since v0.6.0
|
|
332
|
+
*/
|
|
333
|
+
readonly isWorker: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
|
|
336
|
+
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings)
|
|
337
|
+
* is called, whichever comes first.
|
|
338
|
+
*
|
|
339
|
+
* `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
|
|
340
|
+
* IOCP handles without incurring a large performance hit.
|
|
341
|
+
*
|
|
342
|
+
* `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
|
|
343
|
+
* @since v0.11.2
|
|
344
|
+
*/
|
|
345
|
+
schedulingPolicy: number;
|
|
346
|
+
/**
|
|
347
|
+
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings)
|
|
348
|
+
* (or [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv)) this settings object will contain
|
|
349
|
+
* the settings, including the default values.
|
|
350
|
+
*
|
|
351
|
+
* This object is not intended to be changed or set manually.
|
|
352
|
+
* @since v0.7.1
|
|
353
|
+
*/
|
|
354
|
+
readonly settings: ClusterSettings;
|
|
355
|
+
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) instead. */
|
|
356
|
+
setupMaster(settings?: ClusterSettings): void;
|
|
357
|
+
/**
|
|
358
|
+
* `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
|
|
359
|
+
*
|
|
360
|
+
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv)
|
|
361
|
+
* and have no effect on workers that are already running.
|
|
362
|
+
*
|
|
363
|
+
* The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
|
|
364
|
+
* [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv).
|
|
365
|
+
*
|
|
366
|
+
* The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
|
|
367
|
+
* `cluster.setupPrimary()` is called.
|
|
368
|
+
*
|
|
369
|
+
* ```js
|
|
370
|
+
* import cluster from 'node:cluster';
|
|
371
|
+
*
|
|
372
|
+
* cluster.setupPrimary({
|
|
373
|
+
* exec: 'worker.js',
|
|
374
|
+
* args: ['--use', 'https'],
|
|
375
|
+
* silent: true,
|
|
376
|
+
* });
|
|
377
|
+
* cluster.fork(); // https worker
|
|
378
|
+
* cluster.setupPrimary({
|
|
379
|
+
* exec: 'worker.js',
|
|
380
|
+
* args: ['--use', 'http'],
|
|
381
|
+
* });
|
|
382
|
+
* cluster.fork(); // http worker
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* This can only be called from the primary process.
|
|
386
|
+
* @since v16.0.0
|
|
387
|
+
*/
|
|
388
|
+
setupPrimary(settings?: ClusterSettings): void;
|
|
389
|
+
/**
|
|
390
|
+
* A reference to the current worker object. Not available in the primary process.
|
|
391
|
+
*
|
|
392
|
+
* ```js
|
|
393
|
+
* import cluster from 'node:cluster';
|
|
394
|
+
*
|
|
395
|
+
* if (cluster.isPrimary) {
|
|
396
|
+
* console.log('I am primary');
|
|
397
|
+
* cluster.fork();
|
|
398
|
+
* cluster.fork();
|
|
399
|
+
* } else if (cluster.isWorker) {
|
|
400
|
+
* console.log(`I am worker #${cluster.worker.id}`);
|
|
401
|
+
* }
|
|
402
|
+
* ```
|
|
403
|
+
* @since v0.7.0
|
|
404
|
+
*/
|
|
405
|
+
readonly worker?: Worker;
|
|
406
|
+
/**
|
|
407
|
+
* A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
|
|
408
|
+
*
|
|
409
|
+
* A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
|
|
410
|
+
* is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
|
|
411
|
+
*
|
|
412
|
+
* ```js
|
|
413
|
+
* import cluster from 'node:cluster';
|
|
414
|
+
*
|
|
415
|
+
* for (const worker of Object.values(cluster.workers)) {
|
|
416
|
+
* worker.send('big announcement to all workers');
|
|
417
|
+
* }
|
|
418
|
+
* ```
|
|
419
|
+
* @since v0.7.0
|
|
420
|
+
*/
|
|
421
|
+
readonly workers?: NodeJS.Dict<Worker>;
|
|
422
|
+
readonly SCHED_NONE: number;
|
|
423
|
+
readonly SCHED_RR: number;
|
|
424
|
+
}
|
|
571
425
|
}
|
|
572
|
-
|
|
573
|
-
export
|
|
426
|
+
var cluster: cluster.Cluster;
|
|
427
|
+
export = cluster;
|
|
574
428
|
}
|
|
575
|
-
declare module "
|
|
576
|
-
|
|
577
|
-
export
|
|
429
|
+
declare module "cluster" {
|
|
430
|
+
import cluster = require("node:cluster");
|
|
431
|
+
export = cluster;
|
|
578
432
|
}
|