@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,38 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @since v16.7.0
|
|
5
|
-
*/
|
|
6
|
-
declare module "stream/consumers" {
|
|
7
|
-
import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
|
|
8
|
-
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
|
1
|
+
declare module "node:stream/consumers" {
|
|
2
|
+
import { Blob, NonSharedBuffer } from "node:buffer";
|
|
3
|
+
import { ReadableStream } from "node:stream/web";
|
|
9
4
|
/**
|
|
5
|
+
* ```js
|
|
6
|
+
* import { arrayBuffer } from 'node:stream/consumers';
|
|
7
|
+
* import { Readable } from 'node:stream';
|
|
8
|
+
* import { TextEncoder } from 'node:util';
|
|
9
|
+
*
|
|
10
|
+
* const encoder = new TextEncoder();
|
|
11
|
+
* const dataArray = encoder.encode('hello world from consumers!');
|
|
12
|
+
*
|
|
13
|
+
* const readable = Readable.from(dataArray);
|
|
14
|
+
* const data = await arrayBuffer(readable);
|
|
15
|
+
* console.log(`from readable: ${data.byteLength}`);
|
|
16
|
+
* // Prints: from readable: 76
|
|
17
|
+
* ```
|
|
10
18
|
* @since v16.7.0
|
|
11
19
|
* @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
|
|
12
20
|
*/
|
|
13
|
-
function arrayBuffer(stream:
|
|
21
|
+
function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
|
|
14
22
|
/**
|
|
23
|
+
* ```js
|
|
24
|
+
* import { blob } from 'node:stream/consumers';
|
|
25
|
+
*
|
|
26
|
+
* const dataBlob = new Blob(['hello world from consumers!']);
|
|
27
|
+
*
|
|
28
|
+
* const readable = dataBlob.stream();
|
|
29
|
+
* const data = await blob(readable);
|
|
30
|
+
* console.log(`from readable: ${data.size}`);
|
|
31
|
+
* // Prints: from readable: 27
|
|
32
|
+
* ```
|
|
15
33
|
* @since v16.7.0
|
|
16
34
|
* @returns Fulfills with a `Blob` containing the full contents of the stream.
|
|
17
35
|
*/
|
|
18
|
-
function blob(stream:
|
|
36
|
+
function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Blob>;
|
|
19
37
|
/**
|
|
38
|
+
* ```js
|
|
39
|
+
* import { buffer } from 'node:stream/consumers';
|
|
40
|
+
* import { Readable } from 'node:stream';
|
|
41
|
+
* import { Buffer } from 'node:buffer';
|
|
42
|
+
*
|
|
43
|
+
* const dataBuffer = Buffer.from('hello world from consumers!');
|
|
44
|
+
*
|
|
45
|
+
* const readable = Readable.from(dataBuffer);
|
|
46
|
+
* const data = await buffer(readable);
|
|
47
|
+
* console.log(`from readable: ${data.length}`);
|
|
48
|
+
* // Prints: from readable: 27
|
|
49
|
+
* ```
|
|
20
50
|
* @since v16.7.0
|
|
21
51
|
* @returns Fulfills with a `Buffer` containing the full contents of the stream.
|
|
22
52
|
*/
|
|
23
|
-
function buffer(stream:
|
|
53
|
+
function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
|
|
54
|
+
/**
|
|
55
|
+
* ```js
|
|
56
|
+
* import { bytes } from 'node:stream/consumers';
|
|
57
|
+
* import { Readable } from 'node:stream';
|
|
58
|
+
* import { Buffer } from 'node:buffer';
|
|
59
|
+
*
|
|
60
|
+
* const dataBuffer = Buffer.from('hello world from consumers!');
|
|
61
|
+
*
|
|
62
|
+
* const readable = Readable.from(dataBuffer);
|
|
63
|
+
* const data = await bytes(readable);
|
|
64
|
+
* console.log(`from readable: ${data.length}`);
|
|
65
|
+
* // Prints: from readable: 27
|
|
66
|
+
* ```
|
|
67
|
+
* @since v25.6.0
|
|
68
|
+
* @returns Fulfills with a `Uint8Array` containing the full contents of the stream.
|
|
69
|
+
*/
|
|
70
|
+
function bytes(
|
|
71
|
+
stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>,
|
|
72
|
+
): Promise<NodeJS.NonSharedUint8Array>;
|
|
24
73
|
/**
|
|
74
|
+
* ```js
|
|
75
|
+
* import { json } from 'node:stream/consumers';
|
|
76
|
+
* import { Readable } from 'node:stream';
|
|
77
|
+
*
|
|
78
|
+
* const items = Array.from(
|
|
79
|
+
* {
|
|
80
|
+
* length: 100,
|
|
81
|
+
* },
|
|
82
|
+
* () => ({
|
|
83
|
+
* message: 'hello world from consumers!',
|
|
84
|
+
* }),
|
|
85
|
+
* );
|
|
86
|
+
*
|
|
87
|
+
* const readable = Readable.from(JSON.stringify(items));
|
|
88
|
+
* const data = await json(readable);
|
|
89
|
+
* console.log(`from readable: ${data.length}`);
|
|
90
|
+
* // Prints: from readable: 100
|
|
91
|
+
* ```
|
|
25
92
|
* @since v16.7.0
|
|
26
93
|
* @returns Fulfills with the contents of the stream parsed as a
|
|
27
94
|
* UTF-8 encoded string that is then passed through `JSON.parse()`.
|
|
28
95
|
*/
|
|
29
|
-
function json(stream:
|
|
96
|
+
function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
|
|
30
97
|
/**
|
|
98
|
+
* ```js
|
|
99
|
+
* import { text } from 'node:stream/consumers';
|
|
100
|
+
* import { Readable } from 'node:stream';
|
|
101
|
+
*
|
|
102
|
+
* const readable = Readable.from('Hello world from consumers!');
|
|
103
|
+
* const data = await text(readable);
|
|
104
|
+
* console.log(`from readable: ${data.length}`);
|
|
105
|
+
* // Prints: from readable: 27
|
|
106
|
+
* ```
|
|
31
107
|
* @since v16.7.0
|
|
32
108
|
* @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
|
|
33
109
|
*/
|
|
34
|
-
function text(stream:
|
|
110
|
+
function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
|
|
35
111
|
}
|
|
36
|
-
declare module "
|
|
37
|
-
export * from "stream/consumers";
|
|
112
|
+
declare module "stream/consumers" {
|
|
113
|
+
export * from "node:stream/consumers";
|
|
38
114
|
}
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
declare module "node:stream/iter" {
|
|
2
|
+
import { Abortable } from "node:events";
|
|
3
|
+
import { Readable, Writable } from "node:stream";
|
|
4
|
+
// Symbols and custom typedefs
|
|
5
|
+
const broadcastProtocol: unique symbol;
|
|
6
|
+
const drainableProtocol: unique symbol;
|
|
7
|
+
const shareProtocol: unique symbol;
|
|
8
|
+
const shareSyncProtocol: unique symbol;
|
|
9
|
+
const toAsyncStreamable: unique symbol;
|
|
10
|
+
const toStreamable: unique symbol;
|
|
11
|
+
type Source =
|
|
12
|
+
| string
|
|
13
|
+
| ArrayBufferLike
|
|
14
|
+
| ArrayBufferView
|
|
15
|
+
| Iterable<SyncSource>
|
|
16
|
+
| AsyncIterable<Source>
|
|
17
|
+
| Streamable
|
|
18
|
+
| AsyncStreamable;
|
|
19
|
+
type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncSource> | Streamable;
|
|
20
|
+
type Transform = StatelessTransformFn | StatefulTransform;
|
|
21
|
+
type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform;
|
|
22
|
+
type TransformResult =
|
|
23
|
+
| string
|
|
24
|
+
| ArrayBufferLike
|
|
25
|
+
| ArrayBufferView
|
|
26
|
+
| Iterable<SyncTransformResult>
|
|
27
|
+
| AsyncIterable<TransformResult>;
|
|
28
|
+
type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncTransformResult>;
|
|
29
|
+
interface AsyncStreamable {
|
|
30
|
+
[toAsyncStreamable](): Source;
|
|
31
|
+
}
|
|
32
|
+
interface Broadcastable {
|
|
33
|
+
[broadcastProtocol](options: BroadcastOptions): Broadcast;
|
|
34
|
+
}
|
|
35
|
+
interface Drainable {
|
|
36
|
+
[drainableProtocol](): Promise<boolean> | null;
|
|
37
|
+
}
|
|
38
|
+
interface Shareable {
|
|
39
|
+
[shareProtocol](options: ShareOptions): Share;
|
|
40
|
+
}
|
|
41
|
+
interface Streamable {
|
|
42
|
+
[toStreamable](): SyncSource;
|
|
43
|
+
}
|
|
44
|
+
interface SyncShareable {
|
|
45
|
+
[shareSyncProtocol](options: ShareSyncOptions): SyncShare;
|
|
46
|
+
}
|
|
47
|
+
// IDL dictionaries, enums, typedefs
|
|
48
|
+
type BackpressurePolicy = "strict" | "block" | "drop-oldest" | "drop-newest";
|
|
49
|
+
type ByteReadableStream = AsyncIterable<Uint8Array[]>;
|
|
50
|
+
type SyncByteReadableStream = Iterable<Uint8Array[]>;
|
|
51
|
+
interface WriteOptions {
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
}
|
|
54
|
+
interface PushStreamOptions {
|
|
55
|
+
highWaterMark?: number;
|
|
56
|
+
backpressure?: BackpressurePolicy;
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
interface PullOptions {
|
|
60
|
+
signal?: AbortSignal;
|
|
61
|
+
}
|
|
62
|
+
interface PipeToOptions {
|
|
63
|
+
signal?: AbortSignal;
|
|
64
|
+
preventClose?: boolean;
|
|
65
|
+
preventFail?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface PipeToSyncOptions {
|
|
68
|
+
preventClose?: boolean;
|
|
69
|
+
preventFail?: boolean;
|
|
70
|
+
}
|
|
71
|
+
interface ConsumeOptions {
|
|
72
|
+
signal?: AbortSignal;
|
|
73
|
+
limit?: number;
|
|
74
|
+
}
|
|
75
|
+
interface ConsumeSyncOptions {
|
|
76
|
+
limit?: number;
|
|
77
|
+
}
|
|
78
|
+
interface TextConsumeOptions extends ConsumeOptions {
|
|
79
|
+
encoding?: string;
|
|
80
|
+
}
|
|
81
|
+
interface TextConsumeSyncOptions extends ConsumeSyncOptions {
|
|
82
|
+
encoding?: string;
|
|
83
|
+
}
|
|
84
|
+
interface MergeOptions {
|
|
85
|
+
signal?: AbortSignal;
|
|
86
|
+
}
|
|
87
|
+
interface BroadcastOptions {
|
|
88
|
+
highWaterMark?: number;
|
|
89
|
+
backpressure?: BackpressurePolicy;
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
}
|
|
92
|
+
interface ShareOptions {
|
|
93
|
+
highWaterMark?: number;
|
|
94
|
+
backpressure?: BackpressurePolicy;
|
|
95
|
+
signal?: AbortSignal;
|
|
96
|
+
}
|
|
97
|
+
interface ShareSyncOptions {
|
|
98
|
+
highWaterMark?: number;
|
|
99
|
+
backpressure?: BackpressurePolicy;
|
|
100
|
+
}
|
|
101
|
+
interface DuplexDirectionOptions {
|
|
102
|
+
highWaterMark?: number;
|
|
103
|
+
backpressure?: BackpressurePolicy;
|
|
104
|
+
}
|
|
105
|
+
interface DuplexOptions {
|
|
106
|
+
highWaterMark?: number;
|
|
107
|
+
backpressure?: BackpressurePolicy;
|
|
108
|
+
a?: DuplexDirectionOptions;
|
|
109
|
+
b?: DuplexDirectionOptions;
|
|
110
|
+
signal?: AbortSignal;
|
|
111
|
+
}
|
|
112
|
+
interface TransformCallbackOptions {
|
|
113
|
+
signal: AbortSignal;
|
|
114
|
+
}
|
|
115
|
+
interface StatelessTransformFn {
|
|
116
|
+
(
|
|
117
|
+
chunks: Uint8Array[] | null,
|
|
118
|
+
options: TransformCallbackOptions,
|
|
119
|
+
): Promise<TransformResult | null> | TransformResult | null;
|
|
120
|
+
}
|
|
121
|
+
interface SyncStatelessTransformFn {
|
|
122
|
+
(chunks: Uint8Array[] | null): SyncTransformResult | null;
|
|
123
|
+
}
|
|
124
|
+
interface StatefulTransform {
|
|
125
|
+
transform(
|
|
126
|
+
source: AsyncIterable<Uint8Array[] | null>,
|
|
127
|
+
options: TransformCallbackOptions,
|
|
128
|
+
): AsyncIterable<TransformResult>;
|
|
129
|
+
}
|
|
130
|
+
interface SyncStatefulTransform {
|
|
131
|
+
transform(source: Iterable<Uint8Array[] | null>): Iterable<SyncTransformResult>;
|
|
132
|
+
}
|
|
133
|
+
// IDL interfaces
|
|
134
|
+
interface PushWriter extends Writer, Drainable {}
|
|
135
|
+
interface PushStreamResult {
|
|
136
|
+
writer: PushWriter;
|
|
137
|
+
readable: ByteReadableStream;
|
|
138
|
+
}
|
|
139
|
+
interface BroadcastWriter extends Writer, Drainable {}
|
|
140
|
+
interface BroadcastResult {
|
|
141
|
+
writer: BroadcastWriter;
|
|
142
|
+
broadcast: Broadcast;
|
|
143
|
+
}
|
|
144
|
+
interface Writer extends Disposable, AsyncDisposable {
|
|
145
|
+
readonly desiredSize: number | null;
|
|
146
|
+
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
|
|
147
|
+
writev(chunks: Array<Uint8Array | string>, options?: WriteOptions): Promise<void>;
|
|
148
|
+
writeSync(chunk: Uint8Array | string): boolean;
|
|
149
|
+
writevSync(chunks: Array<Uint8Array | string>): boolean;
|
|
150
|
+
end(options?: WriteOptions): Promise<number>;
|
|
151
|
+
endSync(): number;
|
|
152
|
+
fail(reason?: any): void;
|
|
153
|
+
}
|
|
154
|
+
interface PartialWriter extends Partial<Writer> {
|
|
155
|
+
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
|
|
156
|
+
}
|
|
157
|
+
interface SyncWriter extends Disposable {
|
|
158
|
+
readonly desiredSize: number | null;
|
|
159
|
+
writeSync(chunk: Uint8Array | string): number;
|
|
160
|
+
writevSync(chunks: Array<Uint8Array | string>): number;
|
|
161
|
+
endSync(): number;
|
|
162
|
+
fail(reason?: any): void;
|
|
163
|
+
}
|
|
164
|
+
interface PartialSyncWriter extends Partial<SyncWriter> {
|
|
165
|
+
writeSync(chunk: Uint8Array | string): number;
|
|
166
|
+
}
|
|
167
|
+
interface Broadcast extends Disposable {
|
|
168
|
+
readonly consumerCount: number;
|
|
169
|
+
readonly bufferSize: number;
|
|
170
|
+
push(...args: any[]): ByteReadableStream;
|
|
171
|
+
cancel(reason?: any): void;
|
|
172
|
+
}
|
|
173
|
+
interface Share extends Disposable {
|
|
174
|
+
readonly consumerCount: number;
|
|
175
|
+
readonly bufferSize: number;
|
|
176
|
+
pull(...args: any[]): ByteReadableStream;
|
|
177
|
+
cancel(reason?: any): void;
|
|
178
|
+
}
|
|
179
|
+
interface SyncShare extends Disposable {
|
|
180
|
+
readonly consumerCount: number;
|
|
181
|
+
readonly bufferSize: number;
|
|
182
|
+
pull(...args: any): SyncByteReadableStream;
|
|
183
|
+
cancel(reason?: any): void;
|
|
184
|
+
}
|
|
185
|
+
interface DuplexChannel extends AsyncDisposable {
|
|
186
|
+
readonly writer: Writer;
|
|
187
|
+
readonly readable: ByteReadableStream;
|
|
188
|
+
close(): Promise<void>;
|
|
189
|
+
}
|
|
190
|
+
// Push stream creation
|
|
191
|
+
function push(...transforms: Transform[]): PushStreamResult;
|
|
192
|
+
function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult;
|
|
193
|
+
// Stream factories
|
|
194
|
+
function from(input: Source): ByteReadableStream;
|
|
195
|
+
function fromSync(input: SyncSource): SyncByteReadableStream;
|
|
196
|
+
// Pull pipelines
|
|
197
|
+
function pull(source: Source, ...transforms: Transform[]): ByteReadableStream;
|
|
198
|
+
function pull(
|
|
199
|
+
source: Source,
|
|
200
|
+
...args: [...transforms: Transform[], options: PullOptions]
|
|
201
|
+
): ByteReadableStream;
|
|
202
|
+
function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream;
|
|
203
|
+
// Pipe operations
|
|
204
|
+
function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise<number>;
|
|
205
|
+
function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise<number>;
|
|
206
|
+
function pipeTo(
|
|
207
|
+
source: Source,
|
|
208
|
+
...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions]
|
|
209
|
+
): Promise<number>;
|
|
210
|
+
function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number;
|
|
211
|
+
function pipeToSync(
|
|
212
|
+
source: SyncSource,
|
|
213
|
+
...args: [...transforms: SyncTransform[], writer: PartialSyncWriter]
|
|
214
|
+
): number;
|
|
215
|
+
function pipeToSync(
|
|
216
|
+
source: SyncSource,
|
|
217
|
+
...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions]
|
|
218
|
+
): number;
|
|
219
|
+
// Consumers
|
|
220
|
+
function bytes(source: Source, options?: ConsumeOptions): Promise<Uint8Array>;
|
|
221
|
+
function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array;
|
|
222
|
+
function text(source: Source, options?: TextConsumeOptions): Promise<string>;
|
|
223
|
+
function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string;
|
|
224
|
+
function arrayBuffer(source: Source, options?: ConsumeOptions): Promise<ArrayBuffer>;
|
|
225
|
+
function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer;
|
|
226
|
+
function array(source: Source, options?: ConsumeOptions): Promise<Uint8Array[]>;
|
|
227
|
+
function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[];
|
|
228
|
+
// Utilities
|
|
229
|
+
function tap(callback: StatelessTransformFn): StatelessTransformFn;
|
|
230
|
+
function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn;
|
|
231
|
+
function merge(...sources: Source[]): ByteReadableStream;
|
|
232
|
+
function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream;
|
|
233
|
+
function ondrain(drainable: any): Promise<boolean> | null;
|
|
234
|
+
// Multi-consumer
|
|
235
|
+
function broadcast(options?: BroadcastOptions): BroadcastResult;
|
|
236
|
+
function share(source: Source, options?: ShareOptions): Share;
|
|
237
|
+
function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare;
|
|
238
|
+
// Duplex
|
|
239
|
+
function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel];
|
|
240
|
+
// Node.js-specific extensions
|
|
241
|
+
namespace Broadcast {
|
|
242
|
+
/**
|
|
243
|
+
* Create a `Broadcast` from an existing source. The source is consumed
|
|
244
|
+
* automatically and pushed to all subscribers.
|
|
245
|
+
* @since v25.9.0
|
|
246
|
+
* @param options Same as `broadcast()`.
|
|
247
|
+
*/
|
|
248
|
+
function from(
|
|
249
|
+
input: ByteReadableStream | SyncByteReadableStream | Broadcastable,
|
|
250
|
+
options?: BroadcastOptions,
|
|
251
|
+
): BroadcastResult;
|
|
252
|
+
}
|
|
253
|
+
namespace Share {
|
|
254
|
+
/**
|
|
255
|
+
* Create a `Share` from an existing source.
|
|
256
|
+
* @since v25.9.0
|
|
257
|
+
* @param options Same as `share()`.
|
|
258
|
+
*/
|
|
259
|
+
function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share;
|
|
260
|
+
}
|
|
261
|
+
namespace SyncShare {
|
|
262
|
+
/**
|
|
263
|
+
* @since v25.9.0
|
|
264
|
+
*/
|
|
265
|
+
function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Converts a classic Readable stream (or duck-typed equivalent) into a
|
|
269
|
+
* stream/iter async iterable source that can be passed to `from()`,
|
|
270
|
+
* `pull()`, `text()`, etc.
|
|
271
|
+
*
|
|
272
|
+
* If the object implements the `toAsyncStreamable` protocol (as
|
|
273
|
+
* `stream.Readable` does), that protocol is used. Otherwise, the function
|
|
274
|
+
* duck-types on `read()`, `on()`, and `off()` (EventEmitter) and wraps the
|
|
275
|
+
* stream with a batched async iterator.
|
|
276
|
+
*
|
|
277
|
+
* The result is cached per instance -- calling `fromReadable()` twice with the
|
|
278
|
+
* same stream returns the same iterable.
|
|
279
|
+
*
|
|
280
|
+
* For object-mode or encoded Readable streams, chunks are automatically
|
|
281
|
+
* normalized to `Uint8Array`.
|
|
282
|
+
*
|
|
283
|
+
* ```js
|
|
284
|
+
* import { Readable } from 'node:stream';
|
|
285
|
+
* import { fromReadable, text } from 'node:stream/iter';
|
|
286
|
+
*
|
|
287
|
+
* const readable = new Readable({
|
|
288
|
+
* read() { this.push('hello world'); this.push(null); },
|
|
289
|
+
* });
|
|
290
|
+
*
|
|
291
|
+
* const result = await text(fromReadable(readable));
|
|
292
|
+
* console.log(result); // 'hello world'
|
|
293
|
+
* ```
|
|
294
|
+
* @since v26.1.0
|
|
295
|
+
* @experimental
|
|
296
|
+
* @param readable A classic Readable stream or any object
|
|
297
|
+
* with `read()`, `on()` and `off()` methods.
|
|
298
|
+
* @returns A stream/iter async iterable source.
|
|
299
|
+
*/
|
|
300
|
+
function fromReadable(readable: NodeJS.ReadableStream): ByteReadableStream;
|
|
301
|
+
interface FromWritableOptions {
|
|
302
|
+
backpressure?: BackpressurePolicy | undefined;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Creates a stream/iter Writer adapter from a classic Writable stream (or
|
|
306
|
+
* duck-typed equivalent). The adapter can be passed to `pipeTo()` as a
|
|
307
|
+
* destination.
|
|
308
|
+
*
|
|
309
|
+
* Since all writes on a classic Writable are fundamentally asynchronous,
|
|
310
|
+
* the synchronous Writer methods (`writeSync`, `writevSync`, `endSync`) always
|
|
311
|
+
* return `false` or `-1`, deferring to the async path. The per-write
|
|
312
|
+
* `options.signal` parameter from the Writer interface is also ignored.
|
|
313
|
+
*
|
|
314
|
+
* The result is cached per instance and backpressure policy -- calling
|
|
315
|
+
* `fromWritable()` twice with the same stream and `backpressure` option returns
|
|
316
|
+
* the same Writer.
|
|
317
|
+
*
|
|
318
|
+
* For duck-typed streams that do not expose `writableHighWaterMark`,
|
|
319
|
+
* `writableLength`, or similar properties, sensible defaults are used.
|
|
320
|
+
* Object-mode writables (if detectable) are rejected since the Writer
|
|
321
|
+
* interface is bytes-only.
|
|
322
|
+
*
|
|
323
|
+
* ```js
|
|
324
|
+
* import { Writable } from 'node:stream';
|
|
325
|
+
* import { from, fromWritable, pipeTo } from 'node:stream/iter';
|
|
326
|
+
*
|
|
327
|
+
* const writable = new Writable({
|
|
328
|
+
* write(chunk, encoding, cb) { console.log(chunk.toString()); cb(); },
|
|
329
|
+
* });
|
|
330
|
+
*
|
|
331
|
+
* await pipeTo(from('hello world'),
|
|
332
|
+
* fromWritable(writable, { backpressure: 'block' }));
|
|
333
|
+
* ```
|
|
334
|
+
* @since v26.1.0
|
|
335
|
+
* @experimental
|
|
336
|
+
* @param writable A classic Writable stream or any object
|
|
337
|
+
* with `write()` and `on()` methods.
|
|
338
|
+
* @returns A stream/iter Writer adapter.
|
|
339
|
+
*/
|
|
340
|
+
function fromWritable(writable: NodeJS.WritableStream, options?: FromWritableOptions): Writer;
|
|
341
|
+
interface ToReadableOptions extends Abortable {
|
|
342
|
+
highWaterMark?: number | undefined;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Creates a byte-mode `stream.Readable` from an `AsyncIterable<Uint8Array[]>`
|
|
346
|
+
* (the native batch format used by the stream/iter API). Each `Uint8Array` in a
|
|
347
|
+
* yielded batch is pushed as a separate chunk into the Readable.
|
|
348
|
+
*
|
|
349
|
+
* ```js
|
|
350
|
+
* import { createWriteStream } from 'node:fs';
|
|
351
|
+
* import { from, pull, toReadable } from 'node:stream/iter';
|
|
352
|
+
* import { compressGzip } from 'node:zlib/iter';
|
|
353
|
+
*
|
|
354
|
+
* const source = pull(from('hello world'), compressGzip());
|
|
355
|
+
* const readable = toReadable(source);
|
|
356
|
+
*
|
|
357
|
+
* readable.pipe(createWriteStream('output.gz'));
|
|
358
|
+
* ```
|
|
359
|
+
* @since v26.1.0
|
|
360
|
+
* @experimental
|
|
361
|
+
* @param source An `AsyncIterable<Uint8Array[]>` source, such as
|
|
362
|
+
* the return value of `pull()` or `from()`.
|
|
363
|
+
*/
|
|
364
|
+
function toReadable(source: Source, options?: ToReadableOptions): Readable;
|
|
365
|
+
interface ToReadableSyncOptions {
|
|
366
|
+
highWaterMark?: number | undefined;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Creates a byte-mode `stream.Readable` from a synchronous
|
|
370
|
+
* `Iterable<Uint8Array[]>`. The `_read()` method pulls from the iterator
|
|
371
|
+
* synchronously, so data is available immediately via `readable.read()`.
|
|
372
|
+
*
|
|
373
|
+
* ```js
|
|
374
|
+
* import { fromSync, toReadableSync } from 'node:stream/iter';
|
|
375
|
+
*
|
|
376
|
+
* const source = fromSync('hello world');
|
|
377
|
+
* const readable = toReadableSync(source);
|
|
378
|
+
*
|
|
379
|
+
* console.log(readable.read().toString()); // 'hello world'
|
|
380
|
+
* ```
|
|
381
|
+
* @since v26.1.0
|
|
382
|
+
* @experimental
|
|
383
|
+
* @param source An `Iterable<Uint8Array[]>` source, such as the
|
|
384
|
+
* return value of `pullSync()` or `fromSync()`.
|
|
385
|
+
*/
|
|
386
|
+
function toReadableSync(source: SyncSource, options?: ToReadableSyncOptions): Readable;
|
|
387
|
+
/**
|
|
388
|
+
* Creates a classic `stream.Writable` backed by a stream/iter Writer.
|
|
389
|
+
*
|
|
390
|
+
* Each `_write()` / `_writev()` call attempts the Writer's synchronous method
|
|
391
|
+
* first (`writeSync` / `writevSync`), falling back to the async method if the
|
|
392
|
+
* sync path returns `false`. Similarly, `_final()` tries `endSync()`
|
|
393
|
+
* before `end()`. When the sync path succeeds, the callback is deferred via
|
|
394
|
+
* `queueMicrotask` to preserve the async resolution contract.
|
|
395
|
+
*
|
|
396
|
+
* The Writable's `highWaterMark` is set to `Number.MAX_SAFE_INTEGER` to
|
|
397
|
+
* effectively disable its internal buffering, allowing the underlying Writer
|
|
398
|
+
* to manage backpressure directly.
|
|
399
|
+
*
|
|
400
|
+
* ```js
|
|
401
|
+
* import { push, toWritable } from 'node:stream/iter';
|
|
402
|
+
*
|
|
403
|
+
* const { writer, readable } = push();
|
|
404
|
+
* const writable = toWritable(writer);
|
|
405
|
+
*
|
|
406
|
+
* writable.write('hello');
|
|
407
|
+
* writable.end();
|
|
408
|
+
* ```
|
|
409
|
+
* @since v26.1.0
|
|
410
|
+
* @experimental
|
|
411
|
+
* @param writer A stream/iter Writer. Only the `write()` method is
|
|
412
|
+
* required; `end()`, `fail()`, `writeSync()`, `writevSync()`, `endSync()`,
|
|
413
|
+
* and `writev()` are optional.
|
|
414
|
+
*/
|
|
415
|
+
function toWritable(writer: PartialWriter): Writable;
|
|
416
|
+
namespace Stream {
|
|
417
|
+
export {
|
|
418
|
+
array,
|
|
419
|
+
arrayBuffer,
|
|
420
|
+
arrayBufferSync,
|
|
421
|
+
arraySync,
|
|
422
|
+
broadcast,
|
|
423
|
+
broadcastProtocol,
|
|
424
|
+
bytes,
|
|
425
|
+
bytesSync,
|
|
426
|
+
drainableProtocol,
|
|
427
|
+
duplex,
|
|
428
|
+
from,
|
|
429
|
+
fromSync,
|
|
430
|
+
merge,
|
|
431
|
+
ondrain,
|
|
432
|
+
pipeTo,
|
|
433
|
+
pipeToSync,
|
|
434
|
+
pull,
|
|
435
|
+
pullSync,
|
|
436
|
+
push,
|
|
437
|
+
share,
|
|
438
|
+
shareProtocol,
|
|
439
|
+
shareSync,
|
|
440
|
+
shareSyncProtocol,
|
|
441
|
+
tap,
|
|
442
|
+
tapSync,
|
|
443
|
+
text,
|
|
444
|
+
textSync,
|
|
445
|
+
toAsyncStreamable,
|
|
446
|
+
toStreamable,
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
declare module "stream/iter" {
|
|
451
|
+
export * from "node:stream/iter";
|
|
452
|
+
}
|