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