@psnext/slingcli 3.1.20260904-1 → 3.3.20260911-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/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-PBNSMEG7.js → chunk-VDBOM5UG.js} +9 -9
- 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/node_modules/undici/docs/docs/api/Client.md +25 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +33 -43
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +76 -30
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +155 -32
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +65 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +217 -27
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +43 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
- package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
- package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/errors.d.ts +5 -0
- package/node_modules/@smithy/core/errors.js +5 -0
- package/node_modules/@smithy/core/package.json +11 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +56 -13
- package/node_modules/@types/node/assert.d.ts +190 -189
- package/node_modules/@types/node/async_hooks.d.ts +43 -151
- package/node_modules/@types/node/buffer.buffer.d.ts +13 -12
- package/node_modules/@types/node/buffer.d.ts +237 -102
- package/node_modules/@types/node/child_process.d.ts +154 -39
- package/node_modules/@types/node/cluster.d.ts +384 -238
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +404 -45
- package/node_modules/@types/node/constants.d.ts +10 -3
- package/node_modules/@types/node/crypto.d.ts +1600 -1007
- package/node_modules/@types/node/dgram.d.ts +81 -133
- package/node_modules/@types/node/diagnostics_channel.d.ts +59 -277
- package/node_modules/@types/node/dns/promises.d.ts +15 -9
- package/node_modules/@types/node/dns.d.ts +183 -136
- package/node_modules/@types/node/domain.d.ts +32 -12
- package/node_modules/@types/node/events.d.ts +696 -728
- package/node_modules/@types/node/fs/promises.d.ts +85 -256
- package/node_modules/@types/node/fs.d.ts +525 -865
- package/node_modules/@types/node/globals.d.ts +34 -12
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +311 -432
- package/node_modules/@types/node/http2.d.ts +891 -545
- package/node_modules/@types/node/https.d.ts +243 -64
- package/node_modules/@types/node/index.d.ts +7 -25
- package/node_modules/@types/node/inspector.d.ts +58 -70
- package/node_modules/@types/node/inspector.generated.d.ts +411 -765
- package/node_modules/@types/node/module.d.ts +219 -54
- package/node_modules/@types/node/net.d.ts +222 -208
- package/node_modules/@types/node/os.d.ts +49 -41
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +141 -119
- package/node_modules/@types/node/perf_hooks.d.ts +673 -310
- package/node_modules/@types/node/process.d.ts +205 -389
- package/node_modules/@types/node/punycode.d.ts +31 -3
- package/node_modules/@types/node/querystring.d.ts +16 -3
- package/node_modules/@types/node/readline/promises.d.ts +6 -3
- package/node_modules/@types/node/readline.d.ts +152 -66
- package/node_modules/@types/node/repl.d.ts +109 -101
- package/node_modules/@types/node/sea.d.ts +116 -1
- package/node_modules/@types/node/sqlite.d.ts +68 -486
- package/node_modules/@types/node/stream/consumers.d.ts +15 -91
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +456 -179
- package/node_modules/@types/node/stream.d.ts +491 -603
- package/node_modules/@types/node/string_decoder.d.ts +43 -3
- package/node_modules/@types/node/test.d.ts +292 -513
- package/node_modules/@types/node/timers/promises.d.ts +18 -3
- package/node_modules/@types/node/timers.d.ts +141 -3
- package/node_modules/@types/node/tls.d.ts +242 -140
- package/node_modules/@types/node/trace_events.d.ts +97 -3
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +8 -7
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +43 -61
- package/node_modules/@types/node/url.d.ts +584 -156
- package/node_modules/@types/node/util.d.ts +1110 -181
- package/node_modules/@types/node/v8.d.ts +36 -175
- package/node_modules/@types/node/vm.d.ts +209 -292
- package/node_modules/@types/node/wasi.d.ts +74 -24
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/domexception.d.ts +0 -15
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -93
- package/node_modules/@types/node/worker_threads.d.ts +407 -257
- package/node_modules/@types/node/zlib.d.ts +165 -7
- package/node_modules/hono/dist/cjs/client/client.js +4 -4
- package/node_modules/hono/dist/cjs/hono-base.js +7 -6
- package/node_modules/hono/dist/cjs/jsx/base.js +18 -1
- package/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +2 -2
- package/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/hono/dist/client/client.js +4 -4
- package/node_modules/hono/dist/hono-base.js +7 -6
- package/node_modules/hono/dist/jsx/base.js +15 -1
- package/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/hono/dist/types/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/base.d.ts +3 -0
- package/node_modules/hono/package.json +2 -2
- package/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
- package/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
- package/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
- package/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
- package/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
- package/node_modules/jose/dist/types/key/export.d.ts +6 -6
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
- package/node_modules/jose/dist/types/key/import.d.ts +19 -18
- package/node_modules/jose/dist/types/types.d.ts +152 -247
- package/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
- package/node_modules/jose/dist/types/util/errors.d.ts +29 -40
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
- package/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
- package/node_modules/jose/dist/webapi/jwks/local.js +16 -10
- package/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
- package/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
- package/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
- package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
- package/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/jose/dist/webapi/key/export.js +12 -16
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
- package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
- package/node_modules/jose/dist/webapi/key/import.js +5 -9
- package/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
- package/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/jose/dist/webapi/lib/key.js +119 -59
- package/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
- package/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
- package/node_modules/jose/dist/webapi/util/base64url.js +5 -19
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/undici/lib/handler/retry-handler.js +42 -7
- package/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/undici/lib/interceptor/decompress.js +146 -14
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +34 -55
- package/node_modules/undici-types/connector.d.ts +2 -4
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +137 -134
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -82
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +24 -46
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- 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/handlers.d.ts +9 -8
- package/node_modules/undici-types/header.d.ts +1 -162
- package/node_modules/undici-types/index.d.ts +47 -69
- package/node_modules/undici-types/interceptors.d.ts +9 -72
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- 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 +6 -7
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +30 -148
- package/node_modules/undici-types/websocket.d.ts +10 -48
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/checks.ts +0 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +255 -164
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +59 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +274 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +18 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +225 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +25 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +147 -3
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +30 -6
- package/node_modules/zod/src/v4/core/checks.ts +1 -101
- package/node_modules/zod/src/v4/core/compile.ts +202 -88
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +226 -68
- package/node_modules/zod/src/v4/core/memoizer.ts +78 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +10 -4
- package/node_modules/zod/src/v4/core/schemas.ts +359 -122
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +222 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -8
- package/node_modules/zod/src/v4/core/util.ts +222 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +11 -0
- 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/index.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 +134 -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 +0 -1
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +39 -3
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +16 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +20 -2
- 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/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -31
- package/node_modules/zod/v4/classic/schemas.d.cts +17 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +17 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -29
- package/node_modules/zod/v4/core/api.cjs +37 -2
- package/node_modules/zod/v4/core/api.d.cts +6 -4
- package/node_modules/zod/v4/core/api.d.ts +6 -4
- package/node_modules/zod/v4/core/api.js +17 -2
- package/node_modules/zod/v4/core/checks.cjs +19 -96
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/node_modules/zod/v4/core/checks.js +0 -96
- package/node_modules/zod/v4/core/compile.cjs +172 -72
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +153 -73
- package/node_modules/zod/v4/core/core.cjs +19 -0
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +215 -63
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +195 -64
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +114 -23
- package/node_modules/zod/v4/core/memoizer.js +72 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +29 -6
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +8 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +331 -103
- package/node_modules/zod/v4/core/schemas.d.cts +43 -8
- package/node_modules/zod/v4/core/schemas.d.ts +43 -8
- package/node_modules/zod/v4/core/schemas.js +310 -102
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +29 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.js +8 -7
- package/node_modules/zod/v4/core/util.cjs +181 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +160 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +31 -0
- package/node_modules/zod/v4/core/visit.js +12 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- 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/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.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 +143 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +116 -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 +20 -2
- 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/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +42 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +9 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +9 -1
- package/node_modules/zod/v4/mini/schemas.js +19 -2
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +2 -2
- package/slingshot/index.js +151 -149
- package/node_modules/@types/node/ffi.d.ts +0 -486
- package/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -2151
- package/node_modules/@types/node/stream/iter.d.ts +0 -452
- package/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -118
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/vfs.d.ts +0 -210
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/jose/dist/webapi/lib/base64.js +0 -20
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
- package/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
- package/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
- package/node_modules/jose/dist/webapi/lib/signing.js +0 -22
- package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -179
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -39
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -113
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -1,29 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A stream is an abstract interface for working with streaming data in Node.js.
|
|
3
|
+
* The `node:stream` module provides an API for implementing the stream interface.
|
|
4
|
+
*
|
|
5
|
+
* There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage)
|
|
6
|
+
* and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances.
|
|
7
|
+
*
|
|
8
|
+
* Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter).
|
|
9
|
+
*
|
|
10
|
+
* To access the `node:stream` module:
|
|
11
|
+
*
|
|
12
|
+
* ```js
|
|
13
|
+
* import stream from 'node:stream';
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The `node:stream` module is useful for creating new types of stream instances.
|
|
17
|
+
* It is usually not necessary to use the `node:stream` module to consume streams.
|
|
18
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js)
|
|
19
|
+
*/
|
|
20
|
+
declare module "stream" {
|
|
3
21
|
import { Abortable, EventEmitter } from "node:events";
|
|
4
|
-
import {
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
22
|
+
import { Blob as NodeBlob } from "node:buffer";
|
|
23
|
+
import * as streamPromises from "node:stream/promises";
|
|
24
|
+
import * as streamWeb from "node:stream/web";
|
|
25
|
+
|
|
26
|
+
type ComposeFnParam = (source: any) => void;
|
|
27
|
+
|
|
7
28
|
class Stream extends EventEmitter {
|
|
8
|
-
/**
|
|
9
|
-
* @since v0.9.4
|
|
10
|
-
*/
|
|
11
29
|
pipe<T extends NodeJS.WritableStream>(
|
|
12
30
|
destination: T,
|
|
13
|
-
options?:
|
|
31
|
+
options?: {
|
|
32
|
+
end?: boolean | undefined;
|
|
33
|
+
},
|
|
34
|
+
): T;
|
|
35
|
+
compose<T extends NodeJS.ReadableStream>(
|
|
36
|
+
stream: T | ComposeFnParam | Iterable<T> | AsyncIterable<T>,
|
|
37
|
+
options?: { signal: AbortSignal },
|
|
14
38
|
): T;
|
|
15
39
|
}
|
|
16
40
|
namespace Stream {
|
|
17
|
-
export {
|
|
41
|
+
export { Stream, streamPromises as promises };
|
|
18
42
|
}
|
|
19
43
|
namespace Stream {
|
|
20
|
-
interface PipeOptions {
|
|
21
|
-
/**
|
|
22
|
-
* End the writer when the reader ends.
|
|
23
|
-
* @default true
|
|
24
|
-
*/
|
|
25
|
-
end?: boolean | undefined;
|
|
26
|
-
}
|
|
27
44
|
interface StreamOptions<T extends Stream> extends Abortable {
|
|
28
45
|
emitClose?: boolean | undefined;
|
|
29
46
|
highWaterMark?: number | undefined;
|
|
@@ -36,49 +53,19 @@ declare module "node:stream" {
|
|
|
36
53
|
encoding?: BufferEncoding | undefined;
|
|
37
54
|
read?: ((this: T, size: number) => void) | undefined;
|
|
38
55
|
}
|
|
39
|
-
interface
|
|
40
|
-
/**
|
|
41
|
-
* When set to `false`, calling `return` on the async iterator,
|
|
42
|
-
* or exiting a `for await...of` iteration using a `break`,
|
|
43
|
-
* `return`, or `throw` will not destroy the stream.
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
destroyOnReturn?: boolean | undefined;
|
|
47
|
-
}
|
|
48
|
-
interface ReadableOperatorOptions extends Abortable {
|
|
56
|
+
interface ArrayOptions {
|
|
49
57
|
/**
|
|
50
|
-
* The maximum concurrent invocations of `fn` to call
|
|
51
|
-
* on the stream at once.
|
|
58
|
+
* The maximum concurrent invocations of `fn` to call on the stream at once.
|
|
52
59
|
* @default 1
|
|
53
60
|
*/
|
|
54
61
|
concurrency?: number | undefined;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
* of the output.
|
|
58
|
-
* @default concurrency * 2 - 1
|
|
59
|
-
*/
|
|
60
|
-
highWaterMark?: number | undefined;
|
|
61
|
-
}
|
|
62
|
-
/** @deprecated Use `ReadableOperatorOptions` instead. */
|
|
63
|
-
interface ArrayOptions extends ReadableOperatorOptions {}
|
|
64
|
-
interface ReadableToWebOptions {
|
|
65
|
-
strategy?: web.QueuingStrategy | undefined;
|
|
66
|
-
type?: web.ReadableStreamType | undefined;
|
|
67
|
-
}
|
|
68
|
-
interface ReadableEventMap {
|
|
69
|
-
"close": [];
|
|
70
|
-
"data": [chunk: any];
|
|
71
|
-
"end": [];
|
|
72
|
-
"error": [err: Error];
|
|
73
|
-
"pause": [];
|
|
74
|
-
"readable": [];
|
|
75
|
-
"resume": [];
|
|
62
|
+
/** Allows destroying the stream if the signal is aborted. */
|
|
63
|
+
signal?: AbortSignal | undefined;
|
|
76
64
|
}
|
|
77
65
|
/**
|
|
78
66
|
* @since v0.9.4
|
|
79
67
|
*/
|
|
80
68
|
class Readable extends Stream implements NodeJS.ReadableStream {
|
|
81
|
-
constructor(options?: ReadableOptions);
|
|
82
69
|
/**
|
|
83
70
|
* A utility method for creating Readable Streams out of iterators.
|
|
84
71
|
* @since v12.3.0, v10.17.0
|
|
@@ -91,7 +78,7 @@ declare module "node:stream" {
|
|
|
91
78
|
* @since v17.0.0
|
|
92
79
|
*/
|
|
93
80
|
static fromWeb(
|
|
94
|
-
readableStream:
|
|
81
|
+
readableStream: streamWeb.ReadableStream,
|
|
95
82
|
options?: Pick<ReadableOptions, "encoding" | "highWaterMark" | "objectMode" | "signal">,
|
|
96
83
|
): Readable;
|
|
97
84
|
/**
|
|
@@ -99,14 +86,16 @@ declare module "node:stream" {
|
|
|
99
86
|
* @since v17.0.0
|
|
100
87
|
*/
|
|
101
88
|
static toWeb(
|
|
102
|
-
streamReadable:
|
|
103
|
-
options?:
|
|
104
|
-
|
|
89
|
+
streamReadable: Readable,
|
|
90
|
+
options?: {
|
|
91
|
+
strategy?: streamWeb.QueuingStrategy | undefined;
|
|
92
|
+
},
|
|
93
|
+
): streamWeb.ReadableStream;
|
|
105
94
|
/**
|
|
106
95
|
* Returns whether the stream has been read from or cancelled.
|
|
107
96
|
* @since v16.8.0
|
|
108
97
|
*/
|
|
109
|
-
static isDisturbed(stream:
|
|
98
|
+
static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
|
|
110
99
|
/**
|
|
111
100
|
* Returns whether the stream was destroyed or errored before emitting `'end'`.
|
|
112
101
|
* @since v16.8.0
|
|
@@ -129,16 +118,16 @@ declare module "node:stream" {
|
|
|
129
118
|
*/
|
|
130
119
|
readonly readableEncoding: BufferEncoding | null;
|
|
131
120
|
/**
|
|
132
|
-
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-
|
|
121
|
+
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.
|
|
133
122
|
* @since v12.9.0
|
|
134
123
|
*/
|
|
135
124
|
readonly readableEnded: boolean;
|
|
136
125
|
/**
|
|
137
126
|
* This property reflects the current state of a `Readable` stream as described
|
|
138
|
-
* in the [Three states](https://nodejs.org/docs/latest-
|
|
127
|
+
* in the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.
|
|
139
128
|
* @since v9.4.0
|
|
140
129
|
*/
|
|
141
|
-
readableFlowing: boolean | null;
|
|
130
|
+
readonly readableFlowing: boolean | null;
|
|
142
131
|
/**
|
|
143
132
|
* Returns the value of `highWaterMark` passed when creating this `Readable`.
|
|
144
133
|
* @since v9.3.0
|
|
@@ -171,6 +160,7 @@ declare module "node:stream" {
|
|
|
171
160
|
* @since v18.0.0
|
|
172
161
|
*/
|
|
173
162
|
readonly errored: Error | null;
|
|
163
|
+
constructor(opts?: ReadableOptions);
|
|
174
164
|
_construct?(callback: (error?: Error | null) => void): void;
|
|
175
165
|
_read(size: number): void;
|
|
176
166
|
/**
|
|
@@ -454,46 +444,16 @@ declare module "node:stream" {
|
|
|
454
444
|
*/
|
|
455
445
|
wrap(stream: NodeJS.ReadableStream): this;
|
|
456
446
|
push(chunk: any, encoding?: BufferEncoding): boolean;
|
|
457
|
-
/**
|
|
458
|
-
* ```js
|
|
459
|
-
* import { Readable } from 'node:stream';
|
|
460
|
-
*
|
|
461
|
-
* async function* splitToWords(source) {
|
|
462
|
-
* for await (const chunk of source) {
|
|
463
|
-
* const words = String(chunk).split(' ');
|
|
464
|
-
*
|
|
465
|
-
* for (const word of words) {
|
|
466
|
-
* yield word;
|
|
467
|
-
* }
|
|
468
|
-
* }
|
|
469
|
-
* }
|
|
470
|
-
*
|
|
471
|
-
* const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
|
|
472
|
-
* const words = await wordsStream.toArray();
|
|
473
|
-
*
|
|
474
|
-
* console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']
|
|
475
|
-
* ```
|
|
476
|
-
*
|
|
477
|
-
* `readable.compose(s)` is equivalent to `stream.compose(readable, s)`.
|
|
478
|
-
*
|
|
479
|
-
* This method also allows for an `AbortSignal` to be provided, which will destroy
|
|
480
|
-
* the composed stream when aborted.
|
|
481
|
-
*
|
|
482
|
-
* See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamcomposestreams) for more information.
|
|
483
|
-
* @since v19.1.0, v18.13.0
|
|
484
|
-
* @returns a stream composed with the stream `stream`.
|
|
485
|
-
*/
|
|
486
|
-
compose(
|
|
487
|
-
stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void),
|
|
488
|
-
options?: Abortable,
|
|
489
|
-
): Duplex;
|
|
490
447
|
/**
|
|
491
448
|
* The iterator created by this method gives users the option to cancel the destruction
|
|
492
449
|
* of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
|
|
493
450
|
* or if the iterator should destroy the stream if the stream emitted an error during iteration.
|
|
494
451
|
* @since v16.3.0
|
|
452
|
+
* @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
|
|
453
|
+
* or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
|
|
454
|
+
* **Default: `true`**.
|
|
495
455
|
*/
|
|
496
|
-
iterator(options?:
|
|
456
|
+
iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator<any>;
|
|
497
457
|
/**
|
|
498
458
|
* This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
|
|
499
459
|
* If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
|
|
@@ -501,7 +461,7 @@ declare module "node:stream" {
|
|
|
501
461
|
* @param fn a function to map over every chunk in the stream. Async or not.
|
|
502
462
|
* @returns a stream mapped with the function *fn*.
|
|
503
463
|
*/
|
|
504
|
-
map(fn: (data: any, options?:
|
|
464
|
+
map(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
|
|
505
465
|
/**
|
|
506
466
|
* This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
|
|
507
467
|
* and if it returns a truthy value, the chunk will be passed to the result stream.
|
|
@@ -511,8 +471,8 @@ declare module "node:stream" {
|
|
|
511
471
|
* @returns a stream filtered with the predicate *fn*.
|
|
512
472
|
*/
|
|
513
473
|
filter(
|
|
514
|
-
fn: (data: any, options?:
|
|
515
|
-
options?:
|
|
474
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
475
|
+
options?: ArrayOptions,
|
|
516
476
|
): Readable;
|
|
517
477
|
/**
|
|
518
478
|
* This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
|
|
@@ -530,8 +490,8 @@ declare module "node:stream" {
|
|
|
530
490
|
* @returns a promise for when the stream has finished.
|
|
531
491
|
*/
|
|
532
492
|
forEach(
|
|
533
|
-
fn: (data: any, options?:
|
|
534
|
-
options?:
|
|
493
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>,
|
|
494
|
+
options?: ArrayOptions,
|
|
535
495
|
): Promise<void>;
|
|
536
496
|
/**
|
|
537
497
|
* This method allows easily obtaining the contents of a stream.
|
|
@@ -541,7 +501,7 @@ declare module "node:stream" {
|
|
|
541
501
|
* @since v17.5.0
|
|
542
502
|
* @returns a promise containing an array with the contents of the stream.
|
|
543
503
|
*/
|
|
544
|
-
toArray(options?:
|
|
504
|
+
toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
|
|
545
505
|
/**
|
|
546
506
|
* This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
|
|
547
507
|
* until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
|
|
@@ -552,8 +512,8 @@ declare module "node:stream" {
|
|
|
552
512
|
* @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
|
|
553
513
|
*/
|
|
554
514
|
some(
|
|
555
|
-
fn: (data: any, options?:
|
|
556
|
-
options?:
|
|
515
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
516
|
+
options?: ArrayOptions,
|
|
557
517
|
): Promise<boolean>;
|
|
558
518
|
/**
|
|
559
519
|
* This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
|
|
@@ -566,12 +526,12 @@ declare module "node:stream" {
|
|
|
566
526
|
* or `undefined` if no element was found.
|
|
567
527
|
*/
|
|
568
528
|
find<T>(
|
|
569
|
-
fn: (data: any, options?:
|
|
570
|
-
options?:
|
|
529
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => data is T,
|
|
530
|
+
options?: ArrayOptions,
|
|
571
531
|
): Promise<T | undefined>;
|
|
572
532
|
find(
|
|
573
|
-
fn: (data: any, options?:
|
|
574
|
-
options?:
|
|
533
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
534
|
+
options?: ArrayOptions,
|
|
575
535
|
): Promise<any>;
|
|
576
536
|
/**
|
|
577
537
|
* This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
|
|
@@ -583,8 +543,8 @@ declare module "node:stream" {
|
|
|
583
543
|
* @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
|
|
584
544
|
*/
|
|
585
545
|
every(
|
|
586
|
-
fn: (data: any, options?:
|
|
587
|
-
options?:
|
|
546
|
+
fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
|
|
547
|
+
options?: ArrayOptions,
|
|
588
548
|
): Promise<boolean>;
|
|
589
549
|
/**
|
|
590
550
|
* This method returns a new stream by applying the given callback to each chunk of the stream
|
|
@@ -596,24 +556,28 @@ declare module "node:stream" {
|
|
|
596
556
|
* @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
|
|
597
557
|
* @returns a stream flat-mapped with the function *fn*.
|
|
598
558
|
*/
|
|
599
|
-
flatMap(
|
|
600
|
-
fn: (data: any, options?: Abortable) => any,
|
|
601
|
-
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
602
|
-
): Readable;
|
|
559
|
+
flatMap(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
|
|
603
560
|
/**
|
|
604
561
|
* This method returns a new stream with the first *limit* chunks dropped from the start.
|
|
605
562
|
* @since v17.5.0
|
|
606
563
|
* @param limit the number of chunks to drop from the readable.
|
|
607
564
|
* @returns a stream with *limit* chunks dropped from the start.
|
|
608
565
|
*/
|
|
609
|
-
drop(limit: number, options?:
|
|
566
|
+
drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
|
|
610
567
|
/**
|
|
611
568
|
* This method returns a new stream with the first *limit* chunks.
|
|
612
569
|
* @since v17.5.0
|
|
613
570
|
* @param limit the number of chunks to take from the readable.
|
|
614
571
|
* @returns a stream with *limit* chunks taken.
|
|
615
572
|
*/
|
|
616
|
-
take(limit: number, options?:
|
|
573
|
+
take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
|
|
574
|
+
/**
|
|
575
|
+
* This method returns a new stream with chunks of the underlying stream paired with a counter
|
|
576
|
+
* in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.
|
|
577
|
+
* @since v17.5.0
|
|
578
|
+
* @returns a stream of indexed pairs.
|
|
579
|
+
*/
|
|
580
|
+
asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
|
|
617
581
|
/**
|
|
618
582
|
* This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
|
|
619
583
|
* on the previous element. It returns a promise for the final value of the reduction.
|
|
@@ -628,11 +592,15 @@ declare module "node:stream" {
|
|
|
628
592
|
* @param initial the initial value to use in the reduction.
|
|
629
593
|
* @returns a promise for the final value of the reduction.
|
|
630
594
|
*/
|
|
631
|
-
reduce<T
|
|
632
|
-
|
|
633
|
-
|
|
595
|
+
reduce<T = any>(
|
|
596
|
+
fn: (previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T,
|
|
597
|
+
initial?: undefined,
|
|
598
|
+
options?: Pick<ArrayOptions, "signal">,
|
|
599
|
+
): Promise<T>;
|
|
600
|
+
reduce<T = any>(
|
|
601
|
+
fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T,
|
|
634
602
|
initial: T,
|
|
635
|
-
options?:
|
|
603
|
+
options?: Pick<ArrayOptions, "signal">,
|
|
636
604
|
): Promise<T>;
|
|
637
605
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
638
606
|
/**
|
|
@@ -648,92 +616,78 @@ declare module "node:stream" {
|
|
|
648
616
|
*/
|
|
649
617
|
destroy(error?: Error): this;
|
|
650
618
|
/**
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
|
|
619
|
+
* Event emitter
|
|
620
|
+
* The defined events on documents including:
|
|
621
|
+
* 1. close
|
|
622
|
+
* 2. data
|
|
623
|
+
* 3. end
|
|
624
|
+
* 4. error
|
|
625
|
+
* 5. pause
|
|
626
|
+
* 6. readable
|
|
627
|
+
* 7. resume
|
|
628
|
+
*/
|
|
629
|
+
addListener(event: "close", listener: () => void): this;
|
|
630
|
+
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
631
|
+
addListener(event: "end", listener: () => void): this;
|
|
632
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
633
|
+
addListener(event: "pause", listener: () => void): this;
|
|
634
|
+
addListener(event: "readable", listener: () => void): this;
|
|
635
|
+
addListener(event: "resume", listener: () => void): this;
|
|
636
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
637
|
+
emit(event: "close"): boolean;
|
|
638
|
+
emit(event: "data", chunk: any): boolean;
|
|
639
|
+
emit(event: "end"): boolean;
|
|
640
|
+
emit(event: "error", err: Error): boolean;
|
|
641
|
+
emit(event: "pause"): boolean;
|
|
642
|
+
emit(event: "readable"): boolean;
|
|
643
|
+
emit(event: "resume"): boolean;
|
|
644
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
645
|
+
on(event: "close", listener: () => void): this;
|
|
646
|
+
on(event: "data", listener: (chunk: any) => void): this;
|
|
647
|
+
on(event: "end", listener: () => void): this;
|
|
648
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
649
|
+
on(event: "pause", listener: () => void): this;
|
|
650
|
+
on(event: "readable", listener: () => void): this;
|
|
651
|
+
on(event: "resume", listener: () => void): this;
|
|
652
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
653
|
+
once(event: "close", listener: () => void): this;
|
|
654
|
+
once(event: "data", listener: (chunk: any) => void): this;
|
|
655
|
+
once(event: "end", listener: () => void): this;
|
|
656
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
657
|
+
once(event: "pause", listener: () => void): this;
|
|
658
|
+
once(event: "readable", listener: () => void): this;
|
|
659
|
+
once(event: "resume", listener: () => void): this;
|
|
660
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
661
|
+
prependListener(event: "close", listener: () => void): this;
|
|
662
|
+
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
663
|
+
prependListener(event: "end", listener: () => void): this;
|
|
664
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
665
|
+
prependListener(event: "pause", listener: () => void): this;
|
|
666
|
+
prependListener(event: "readable", listener: () => void): this;
|
|
667
|
+
prependListener(event: "resume", listener: () => void): this;
|
|
668
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
669
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
670
|
+
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
671
|
+
prependOnceListener(event: "end", listener: () => void): this;
|
|
672
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
673
|
+
prependOnceListener(event: "pause", listener: () => void): this;
|
|
674
|
+
prependOnceListener(event: "readable", listener: () => void): this;
|
|
675
|
+
prependOnceListener(event: "resume", listener: () => void): this;
|
|
676
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
677
|
+
removeListener(event: "close", listener: () => void): this;
|
|
678
|
+
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
679
|
+
removeListener(event: "end", listener: () => void): this;
|
|
680
|
+
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
681
|
+
removeListener(event: "pause", listener: () => void): this;
|
|
682
|
+
removeListener(event: "readable", listener: () => void): this;
|
|
683
|
+
removeListener(event: "resume", listener: () => void): this;
|
|
684
|
+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
654
685
|
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
|
655
686
|
/**
|
|
656
|
-
*
|
|
657
|
-
* implement the `Stream.toAsyncStreamable` protocol, enabling efficient
|
|
658
|
-
* consumption by the `stream/iter` API.
|
|
659
|
-
*
|
|
660
|
-
* This provides a batched async iterator that drains the stream's internal
|
|
661
|
-
* buffer into `Uint8Array[]` batches, amortizing the per-chunk Promise overhead
|
|
662
|
-
* of the standard `Symbol.asyncIterator` path. For byte-mode streams, chunks
|
|
663
|
-
* are yielded directly as `Buffer` instances (which are `Uint8Array` subclasses).
|
|
664
|
-
* For object-mode or encoded streams, each chunk is normalized to `Uint8Array`
|
|
665
|
-
* before batching.
|
|
666
|
-
*
|
|
667
|
-
* The returned iterator is tagged as a validated source, so `from()`
|
|
668
|
-
* passes it through without additional normalization.
|
|
669
|
-
*
|
|
670
|
-
* ```js
|
|
671
|
-
* import { Readable } from 'node:stream';
|
|
672
|
-
* import { text, from } from 'node:stream/iter';
|
|
673
|
-
*
|
|
674
|
-
* const readable = new Readable({
|
|
675
|
-
* read() { this.push('hello'); this.push(null); },
|
|
676
|
-
* });
|
|
677
|
-
*
|
|
678
|
-
* // Readable is automatically consumed via toAsyncStreamable
|
|
679
|
-
* console.log(await text(from(readable))); // 'hello'
|
|
680
|
-
* ```
|
|
681
|
-
*
|
|
682
|
-
* Without the `--experimental-stream-iter` flag, calling this method throws
|
|
683
|
-
* `ERR_STREAM_ITER_MISSING_FLAG`.
|
|
684
|
-
*/
|
|
685
|
-
[toAsyncStreamable](): ByteReadableStream;
|
|
686
|
-
/**
|
|
687
|
-
* Calls `readable.destroy()` with an `AbortError` and returns
|
|
688
|
-
* a promise that fulfills when the stream is finished.
|
|
687
|
+
* Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
|
|
689
688
|
* @since v20.4.0
|
|
690
689
|
*/
|
|
691
690
|
[Symbol.asyncDispose](): Promise<void>;
|
|
692
|
-
// #region InternalEventEmitter
|
|
693
|
-
addListener<E extends keyof ReadableEventMap>(
|
|
694
|
-
eventName: E,
|
|
695
|
-
listener: (...args: ReadableEventMap[E]) => void,
|
|
696
|
-
): this;
|
|
697
|
-
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
698
|
-
emit<E extends keyof ReadableEventMap>(eventName: E, ...args: ReadableEventMap[E]): boolean;
|
|
699
|
-
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
700
|
-
listenerCount<E extends keyof ReadableEventMap>(
|
|
701
|
-
eventName: E,
|
|
702
|
-
listener?: (...args: ReadableEventMap[E]) => void,
|
|
703
|
-
): number;
|
|
704
|
-
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
705
|
-
listeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
|
|
706
|
-
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
707
|
-
off<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
|
|
708
|
-
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
709
|
-
on<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
|
|
710
|
-
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
711
|
-
once<E extends keyof ReadableEventMap>(
|
|
712
|
-
eventName: E,
|
|
713
|
-
listener: (...args: ReadableEventMap[E]) => void,
|
|
714
|
-
): this;
|
|
715
|
-
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
716
|
-
prependListener<E extends keyof ReadableEventMap>(
|
|
717
|
-
eventName: E,
|
|
718
|
-
listener: (...args: ReadableEventMap[E]) => void,
|
|
719
|
-
): this;
|
|
720
|
-
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
721
|
-
prependOnceListener<E extends keyof ReadableEventMap>(
|
|
722
|
-
eventName: E,
|
|
723
|
-
listener: (...args: ReadableEventMap[E]) => void,
|
|
724
|
-
): this;
|
|
725
|
-
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
726
|
-
rawListeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
|
|
727
|
-
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
728
|
-
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
729
|
-
removeAllListeners<E extends keyof ReadableEventMap>(eventName?: E): this;
|
|
730
|
-
removeAllListeners(eventName?: string | symbol): this;
|
|
731
|
-
removeListener<E extends keyof ReadableEventMap>(
|
|
732
|
-
eventName: E,
|
|
733
|
-
listener: (...args: ReadableEventMap[E]) => void,
|
|
734
|
-
): this;
|
|
735
|
-
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
736
|
-
// #endregion
|
|
737
691
|
}
|
|
738
692
|
interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
|
|
739
693
|
decodeStrings?: boolean | undefined;
|
|
@@ -749,47 +703,38 @@ declare module "node:stream" {
|
|
|
749
703
|
writev?:
|
|
750
704
|
| ((
|
|
751
705
|
this: T,
|
|
752
|
-
chunks: {
|
|
706
|
+
chunks: Array<{
|
|
753
707
|
chunk: any;
|
|
754
708
|
encoding: BufferEncoding;
|
|
755
|
-
}
|
|
709
|
+
}>,
|
|
756
710
|
callback: (error?: Error | null) => void,
|
|
757
711
|
) => void)
|
|
758
712
|
| undefined;
|
|
759
713
|
final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
760
714
|
}
|
|
761
|
-
interface WritableEventMap {
|
|
762
|
-
"close": [];
|
|
763
|
-
"drain": [];
|
|
764
|
-
"error": [err: Error];
|
|
765
|
-
"finish": [];
|
|
766
|
-
"pipe": [src: Readable];
|
|
767
|
-
"unpipe": [src: Readable];
|
|
768
|
-
}
|
|
769
715
|
/**
|
|
770
716
|
* @since v0.9.4
|
|
771
717
|
*/
|
|
772
718
|
class Writable extends Stream implements NodeJS.WritableStream {
|
|
773
|
-
constructor(options?: WritableOptions);
|
|
774
719
|
/**
|
|
775
720
|
* A utility method for creating a `Writable` from a web `WritableStream`.
|
|
776
721
|
* @since v17.0.0
|
|
777
722
|
*/
|
|
778
723
|
static fromWeb(
|
|
779
|
-
writableStream:
|
|
724
|
+
writableStream: streamWeb.WritableStream,
|
|
780
725
|
options?: Pick<WritableOptions, "decodeStrings" | "highWaterMark" | "objectMode" | "signal">,
|
|
781
726
|
): Writable;
|
|
782
727
|
/**
|
|
783
728
|
* A utility method for creating a web `WritableStream` from a `Writable`.
|
|
784
729
|
* @since v17.0.0
|
|
785
730
|
*/
|
|
786
|
-
static toWeb(streamWritable:
|
|
731
|
+
static toWeb(streamWritable: Writable): streamWeb.WritableStream;
|
|
787
732
|
/**
|
|
788
733
|
* Is `true` if it is safe to call `writable.write()`, which means
|
|
789
734
|
* the stream has not been destroyed, errored, or ended.
|
|
790
735
|
* @since v11.4.0
|
|
791
736
|
*/
|
|
792
|
-
writable: boolean;
|
|
737
|
+
readonly writable: boolean;
|
|
793
738
|
/**
|
|
794
739
|
* Returns whether the stream was destroyed or errored before emitting `'finish'`.
|
|
795
740
|
* @since v18.0.0, v16.17.0
|
|
@@ -849,12 +794,13 @@ declare module "node:stream" {
|
|
|
849
794
|
* @since v15.2.0, v14.17.0
|
|
850
795
|
*/
|
|
851
796
|
readonly writableNeedDrain: boolean;
|
|
797
|
+
constructor(opts?: WritableOptions);
|
|
852
798
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
853
799
|
_writev?(
|
|
854
|
-
chunks: {
|
|
800
|
+
chunks: Array<{
|
|
855
801
|
chunk: any;
|
|
856
802
|
encoding: BufferEncoding;
|
|
857
|
-
}
|
|
803
|
+
}>,
|
|
858
804
|
callback: (error?: Error | null) => void,
|
|
859
805
|
): void;
|
|
860
806
|
_construct?(callback: (error?: Error | null) => void): void;
|
|
@@ -1039,56 +985,64 @@ declare module "node:stream" {
|
|
|
1039
985
|
*/
|
|
1040
986
|
destroy(error?: Error): this;
|
|
1041
987
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
): this;
|
|
1052
|
-
addListener(
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
):
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
on(
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
): this;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
): this;
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
): this;
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
): this;
|
|
1090
|
-
|
|
1091
|
-
|
|
988
|
+
* Event emitter
|
|
989
|
+
* The defined events on documents including:
|
|
990
|
+
* 1. close
|
|
991
|
+
* 2. drain
|
|
992
|
+
* 3. error
|
|
993
|
+
* 4. finish
|
|
994
|
+
* 5. pipe
|
|
995
|
+
* 6. unpipe
|
|
996
|
+
*/
|
|
997
|
+
addListener(event: "close", listener: () => void): this;
|
|
998
|
+
addListener(event: "drain", listener: () => void): this;
|
|
999
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
1000
|
+
addListener(event: "finish", listener: () => void): this;
|
|
1001
|
+
addListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1002
|
+
addListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1003
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1004
|
+
emit(event: "close"): boolean;
|
|
1005
|
+
emit(event: "drain"): boolean;
|
|
1006
|
+
emit(event: "error", err: Error): boolean;
|
|
1007
|
+
emit(event: "finish"): boolean;
|
|
1008
|
+
emit(event: "pipe", src: Readable): boolean;
|
|
1009
|
+
emit(event: "unpipe", src: Readable): boolean;
|
|
1010
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
1011
|
+
on(event: "close", listener: () => void): this;
|
|
1012
|
+
on(event: "drain", listener: () => void): this;
|
|
1013
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
1014
|
+
on(event: "finish", listener: () => void): this;
|
|
1015
|
+
on(event: "pipe", listener: (src: Readable) => void): this;
|
|
1016
|
+
on(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1017
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1018
|
+
once(event: "close", listener: () => void): this;
|
|
1019
|
+
once(event: "drain", listener: () => void): this;
|
|
1020
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
1021
|
+
once(event: "finish", listener: () => void): this;
|
|
1022
|
+
once(event: "pipe", listener: (src: Readable) => void): this;
|
|
1023
|
+
once(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1024
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1025
|
+
prependListener(event: "close", listener: () => void): this;
|
|
1026
|
+
prependListener(event: "drain", listener: () => void): this;
|
|
1027
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
1028
|
+
prependListener(event: "finish", listener: () => void): this;
|
|
1029
|
+
prependListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1030
|
+
prependListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1031
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1032
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
1033
|
+
prependOnceListener(event: "drain", listener: () => void): this;
|
|
1034
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
1035
|
+
prependOnceListener(event: "finish", listener: () => void): this;
|
|
1036
|
+
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1037
|
+
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1038
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1039
|
+
removeListener(event: "close", listener: () => void): this;
|
|
1040
|
+
removeListener(event: "drain", listener: () => void): this;
|
|
1041
|
+
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
1042
|
+
removeListener(event: "finish", listener: () => void): this;
|
|
1043
|
+
removeListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1044
|
+
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1045
|
+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1092
1046
|
}
|
|
1093
1047
|
interface DuplexOptions<T extends Duplex = Duplex> extends ReadableOptions<T>, WritableOptions<T> {
|
|
1094
1048
|
allowHalfOpen?: boolean | undefined;
|
|
@@ -1098,10 +1052,6 @@ declare module "node:stream" {
|
|
|
1098
1052
|
writableHighWaterMark?: number | undefined;
|
|
1099
1053
|
writableCorked?: number | undefined;
|
|
1100
1054
|
}
|
|
1101
|
-
interface DuplexToWebOptions {
|
|
1102
|
-
readableType?: web.ReadableStreamType | undefined;
|
|
1103
|
-
}
|
|
1104
|
-
interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
|
|
1105
1055
|
/**
|
|
1106
1056
|
* Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
|
|
1107
1057
|
*
|
|
@@ -1113,7 +1063,17 @@ declare module "node:stream" {
|
|
|
1113
1063
|
* @since v0.9.4
|
|
1114
1064
|
*/
|
|
1115
1065
|
class Duplex extends Stream implements NodeJS.ReadWriteStream {
|
|
1116
|
-
|
|
1066
|
+
/**
|
|
1067
|
+
* If `false` then the stream will automatically end the writable side when the
|
|
1068
|
+
* readable side ends. Set initially by the `allowHalfOpen` constructor option,
|
|
1069
|
+
* which defaults to `true`.
|
|
1070
|
+
*
|
|
1071
|
+
* This can be changed manually to change the half-open behavior of an existing
|
|
1072
|
+
* `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
|
|
1073
|
+
* @since v0.9.4
|
|
1074
|
+
*/
|
|
1075
|
+
allowHalfOpen: boolean;
|
|
1076
|
+
constructor(opts?: DuplexOptions);
|
|
1117
1077
|
/**
|
|
1118
1078
|
* A utility method for creating duplex streams.
|
|
1119
1079
|
*
|
|
@@ -1137,87 +1097,137 @@ declare module "node:stream" {
|
|
|
1137
1097
|
*/
|
|
1138
1098
|
static from(
|
|
1139
1099
|
src:
|
|
1140
|
-
|
|
|
1141
|
-
|
|
|
1142
|
-
|
|
|
1100
|
+
| Stream
|
|
1101
|
+
| NodeBlob
|
|
1102
|
+
| ArrayBuffer
|
|
1143
1103
|
| string
|
|
1144
1104
|
| Iterable<any>
|
|
1145
1105
|
| AsyncIterable<any>
|
|
1146
|
-
|
|
|
1147
|
-
| ((source: AsyncIterable<any>) => Promise<void>)
|
|
1106
|
+
| AsyncGeneratorFunction
|
|
1148
1107
|
| Promise<any>
|
|
1149
|
-
|
|
|
1150
|
-
| web.ReadableStream
|
|
1151
|
-
| web.WritableStream,
|
|
1108
|
+
| Object,
|
|
1152
1109
|
): Duplex;
|
|
1153
1110
|
/**
|
|
1154
1111
|
* A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
|
|
1155
1112
|
* @since v17.0.0
|
|
1156
1113
|
*/
|
|
1157
|
-
static toWeb(streamDuplex:
|
|
1114
|
+
static toWeb(streamDuplex: Duplex): {
|
|
1115
|
+
readable: streamWeb.ReadableStream;
|
|
1116
|
+
writable: streamWeb.WritableStream;
|
|
1117
|
+
};
|
|
1158
1118
|
/**
|
|
1159
1119
|
* A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
|
|
1160
1120
|
* @since v17.0.0
|
|
1161
1121
|
*/
|
|
1162
1122
|
static fromWeb(
|
|
1163
|
-
duplexStream:
|
|
1123
|
+
duplexStream: {
|
|
1124
|
+
readable: streamWeb.ReadableStream;
|
|
1125
|
+
writable: streamWeb.WritableStream;
|
|
1126
|
+
},
|
|
1164
1127
|
options?: Pick<
|
|
1165
1128
|
DuplexOptions,
|
|
1166
1129
|
"allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal"
|
|
1167
1130
|
>,
|
|
1168
1131
|
): Duplex;
|
|
1169
1132
|
/**
|
|
1170
|
-
*
|
|
1171
|
-
*
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
addListener(
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
):
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
):
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
): this;
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
): this;
|
|
1219
|
-
|
|
1220
|
-
|
|
1133
|
+
* Event emitter
|
|
1134
|
+
* The defined events on documents including:
|
|
1135
|
+
* 1. close
|
|
1136
|
+
* 2. data
|
|
1137
|
+
* 3. drain
|
|
1138
|
+
* 4. end
|
|
1139
|
+
* 5. error
|
|
1140
|
+
* 6. finish
|
|
1141
|
+
* 7. pause
|
|
1142
|
+
* 8. pipe
|
|
1143
|
+
* 9. readable
|
|
1144
|
+
* 10. resume
|
|
1145
|
+
* 11. unpipe
|
|
1146
|
+
*/
|
|
1147
|
+
addListener(event: "close", listener: () => void): this;
|
|
1148
|
+
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
1149
|
+
addListener(event: "drain", listener: () => void): this;
|
|
1150
|
+
addListener(event: "end", listener: () => void): this;
|
|
1151
|
+
addListener(event: "error", listener: (err: Error) => void): this;
|
|
1152
|
+
addListener(event: "finish", listener: () => void): this;
|
|
1153
|
+
addListener(event: "pause", listener: () => void): this;
|
|
1154
|
+
addListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1155
|
+
addListener(event: "readable", listener: () => void): this;
|
|
1156
|
+
addListener(event: "resume", listener: () => void): this;
|
|
1157
|
+
addListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1158
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1159
|
+
emit(event: "close"): boolean;
|
|
1160
|
+
emit(event: "data", chunk: any): boolean;
|
|
1161
|
+
emit(event: "drain"): boolean;
|
|
1162
|
+
emit(event: "end"): boolean;
|
|
1163
|
+
emit(event: "error", err: Error): boolean;
|
|
1164
|
+
emit(event: "finish"): boolean;
|
|
1165
|
+
emit(event: "pause"): boolean;
|
|
1166
|
+
emit(event: "pipe", src: Readable): boolean;
|
|
1167
|
+
emit(event: "readable"): boolean;
|
|
1168
|
+
emit(event: "resume"): boolean;
|
|
1169
|
+
emit(event: "unpipe", src: Readable): boolean;
|
|
1170
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
1171
|
+
on(event: "close", listener: () => void): this;
|
|
1172
|
+
on(event: "data", listener: (chunk: any) => void): this;
|
|
1173
|
+
on(event: "drain", listener: () => void): this;
|
|
1174
|
+
on(event: "end", listener: () => void): this;
|
|
1175
|
+
on(event: "error", listener: (err: Error) => void): this;
|
|
1176
|
+
on(event: "finish", listener: () => void): this;
|
|
1177
|
+
on(event: "pause", listener: () => void): this;
|
|
1178
|
+
on(event: "pipe", listener: (src: Readable) => void): this;
|
|
1179
|
+
on(event: "readable", listener: () => void): this;
|
|
1180
|
+
on(event: "resume", listener: () => void): this;
|
|
1181
|
+
on(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1182
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1183
|
+
once(event: "close", listener: () => void): this;
|
|
1184
|
+
once(event: "data", listener: (chunk: any) => void): this;
|
|
1185
|
+
once(event: "drain", listener: () => void): this;
|
|
1186
|
+
once(event: "end", listener: () => void): this;
|
|
1187
|
+
once(event: "error", listener: (err: Error) => void): this;
|
|
1188
|
+
once(event: "finish", listener: () => void): this;
|
|
1189
|
+
once(event: "pause", listener: () => void): this;
|
|
1190
|
+
once(event: "pipe", listener: (src: Readable) => void): this;
|
|
1191
|
+
once(event: "readable", listener: () => void): this;
|
|
1192
|
+
once(event: "resume", listener: () => void): this;
|
|
1193
|
+
once(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1194
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1195
|
+
prependListener(event: "close", listener: () => void): this;
|
|
1196
|
+
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
1197
|
+
prependListener(event: "drain", listener: () => void): this;
|
|
1198
|
+
prependListener(event: "end", listener: () => void): this;
|
|
1199
|
+
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
1200
|
+
prependListener(event: "finish", listener: () => void): this;
|
|
1201
|
+
prependListener(event: "pause", listener: () => void): this;
|
|
1202
|
+
prependListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1203
|
+
prependListener(event: "readable", listener: () => void): this;
|
|
1204
|
+
prependListener(event: "resume", listener: () => void): this;
|
|
1205
|
+
prependListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1206
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1207
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
1208
|
+
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
1209
|
+
prependOnceListener(event: "drain", listener: () => void): this;
|
|
1210
|
+
prependOnceListener(event: "end", listener: () => void): this;
|
|
1211
|
+
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
1212
|
+
prependOnceListener(event: "finish", listener: () => void): this;
|
|
1213
|
+
prependOnceListener(event: "pause", listener: () => void): this;
|
|
1214
|
+
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1215
|
+
prependOnceListener(event: "readable", listener: () => void): this;
|
|
1216
|
+
prependOnceListener(event: "resume", listener: () => void): this;
|
|
1217
|
+
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1218
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1219
|
+
removeListener(event: "close", listener: () => void): this;
|
|
1220
|
+
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
1221
|
+
removeListener(event: "drain", listener: () => void): this;
|
|
1222
|
+
removeListener(event: "end", listener: () => void): this;
|
|
1223
|
+
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
1224
|
+
removeListener(event: "finish", listener: () => void): this;
|
|
1225
|
+
removeListener(event: "pause", listener: () => void): this;
|
|
1226
|
+
removeListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1227
|
+
removeListener(event: "readable", listener: () => void): this;
|
|
1228
|
+
removeListener(event: "resume", listener: () => void): this;
|
|
1229
|
+
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1230
|
+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1221
1231
|
}
|
|
1222
1232
|
interface Duplex extends Readable, Writable {}
|
|
1223
1233
|
/**
|
|
@@ -1258,7 +1268,7 @@ declare module "node:stream" {
|
|
|
1258
1268
|
* @since v0.9.4
|
|
1259
1269
|
*/
|
|
1260
1270
|
class Transform extends Duplex {
|
|
1261
|
-
constructor(
|
|
1271
|
+
constructor(opts?: TransformOptions);
|
|
1262
1272
|
_transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
1263
1273
|
_flush(callback: TransformCallback): void;
|
|
1264
1274
|
}
|
|
@@ -1346,9 +1356,7 @@ declare module "node:stream" {
|
|
|
1346
1356
|
* @param signal A signal representing possible cancellation
|
|
1347
1357
|
* @param stream A stream to attach a signal to.
|
|
1348
1358
|
*/
|
|
1349
|
-
function addAbortSignal<
|
|
1350
|
-
T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1351
|
-
>(signal: AbortSignal, stream: T): T;
|
|
1359
|
+
function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
|
|
1352
1360
|
/**
|
|
1353
1361
|
* Returns the default highWaterMark used by streams.
|
|
1354
1362
|
* Defaults to `65536` (64 KiB), or `16` for `objectMode`.
|
|
@@ -1392,7 +1400,7 @@ declare module "node:stream" {
|
|
|
1392
1400
|
* Especially useful in error handling scenarios where a stream is destroyed
|
|
1393
1401
|
* prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
|
|
1394
1402
|
*
|
|
1395
|
-
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-
|
|
1403
|
+
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamfinishedstream-options).
|
|
1396
1404
|
*
|
|
1397
1405
|
* `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
|
|
1398
1406
|
* invoked. The reason for this is so that unexpected `'error'` events (due to
|
|
@@ -1412,57 +1420,46 @@ declare module "node:stream" {
|
|
|
1412
1420
|
* @returns A cleanup function which removes all registered listeners.
|
|
1413
1421
|
*/
|
|
1414
1422
|
function finished(
|
|
1415
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream |
|
|
1423
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
|
1416
1424
|
options: FinishedOptions,
|
|
1417
1425
|
callback: (err?: NodeJS.ErrnoException | null) => void,
|
|
1418
1426
|
): () => void;
|
|
1419
1427
|
function finished(
|
|
1420
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream |
|
|
1428
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
|
1421
1429
|
callback: (err?: NodeJS.ErrnoException | null) => void,
|
|
1422
1430
|
): () => void;
|
|
1423
1431
|
namespace finished {
|
|
1424
|
-
|
|
1425
|
-
|
|
1432
|
+
function __promisify__(
|
|
1433
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
|
1434
|
+
options?: FinishedOptions,
|
|
1435
|
+
): Promise<void>;
|
|
1426
1436
|
}
|
|
1427
|
-
type PipelineSourceFunction<
|
|
1428
|
-
type PipelineSource<
|
|
1429
|
-
|
|
1430
|
-
| web.ReadableStream<O>
|
|
1431
|
-
| web.TransformStream<any, O>
|
|
1432
|
-
| Iterable<O>
|
|
1433
|
-
| AsyncIterable<O>
|
|
1434
|
-
| PipelineSourceFunction<O>;
|
|
1435
|
-
type PipelineSourceArgument<T> = (T extends (...args: any[]) => infer R ? R : T) extends infer S
|
|
1436
|
-
? S extends web.TransformStream<any, infer O> ? web.ReadableStream<O> : S
|
|
1437
|
-
: never;
|
|
1438
|
-
type PipelineTransformGenerator<S extends PipelineTransformSource<any>, O> = (
|
|
1439
|
-
source: PipelineSourceArgument<S>,
|
|
1440
|
-
options?: Abortable,
|
|
1441
|
-
) => AsyncIterable<O>;
|
|
1442
|
-
type PipelineTransformStreams<I, O> =
|
|
1437
|
+
type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
|
|
1438
|
+
type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
|
|
1439
|
+
type PipelineTransform<S extends PipelineTransformSource<any>, U> =
|
|
1443
1440
|
| NodeJS.ReadWriteStream
|
|
1444
|
-
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
type
|
|
1450
|
-
type
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
) => R;
|
|
1454
|
-
type PipelineDestination<S extends PipelineTransformSource<any>, R> = S extends
|
|
1455
|
-
PipelineSource<infer I> | PipelineTransform<any, infer I> ?
|
|
1441
|
+
| ((
|
|
1442
|
+
source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST>
|
|
1443
|
+
: S,
|
|
1444
|
+
) => AsyncIterable<U>);
|
|
1445
|
+
type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
|
|
1446
|
+
type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
|
|
1447
|
+
type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
|
|
1448
|
+
type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends
|
|
1449
|
+
PipelineTransformSource<infer ST> ?
|
|
1456
1450
|
| NodeJS.WritableStream
|
|
1457
|
-
|
|
|
1458
|
-
|
|
|
1459
|
-
| PipelineDestinationFunction<S, R>
|
|
1451
|
+
| PipelineDestinationIterableFunction<ST>
|
|
1452
|
+
| PipelineDestinationPromiseFunction<ST, P>
|
|
1460
1453
|
: never;
|
|
1461
|
-
type PipelineCallback<S extends PipelineDestination<any, any>> =
|
|
1462
|
-
err: NodeJS.ErrnoException | null,
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1454
|
+
type PipelineCallback<S extends PipelineDestination<any, any>> = S extends
|
|
1455
|
+
PipelineDestinationPromiseFunction<any, infer P> ? (err: NodeJS.ErrnoException | null, value: P) => void
|
|
1456
|
+
: (err: NodeJS.ErrnoException | null) => void;
|
|
1457
|
+
type PipelinePromise<S extends PipelineDestination<any, any>> = S extends
|
|
1458
|
+
PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
|
|
1459
|
+
interface PipelineOptions {
|
|
1460
|
+
signal?: AbortSignal | undefined;
|
|
1461
|
+
end?: boolean | undefined;
|
|
1462
|
+
}
|
|
1466
1463
|
/**
|
|
1467
1464
|
* A module method to pipe between streams and generators forwarding errors and
|
|
1468
1465
|
* properly cleaning up and provide a callback when the pipeline is complete.
|
|
@@ -1491,7 +1488,7 @@ declare module "node:stream" {
|
|
|
1491
1488
|
* );
|
|
1492
1489
|
* ```
|
|
1493
1490
|
*
|
|
1494
|
-
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-
|
|
1491
|
+
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streampipelinesource-transforms-destination-options).
|
|
1495
1492
|
*
|
|
1496
1493
|
* `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
|
|
1497
1494
|
*
|
|
@@ -1528,279 +1525,170 @@ declare module "node:stream" {
|
|
|
1528
1525
|
* @since v10.0.0
|
|
1529
1526
|
* @param callback Called when the pipeline is fully done.
|
|
1530
1527
|
*/
|
|
1531
|
-
function pipeline<
|
|
1532
|
-
source:
|
|
1533
|
-
destination:
|
|
1534
|
-
callback: PipelineCallback<
|
|
1535
|
-
):
|
|
1528
|
+
function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
|
|
1529
|
+
source: A,
|
|
1530
|
+
destination: B,
|
|
1531
|
+
callback: PipelineCallback<B>,
|
|
1532
|
+
): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
|
|
1536
1533
|
function pipeline<
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1534
|
+
A extends PipelineSource<any>,
|
|
1535
|
+
T1 extends PipelineTransform<A, any>,
|
|
1536
|
+
B extends PipelineDestination<T1, any>,
|
|
1540
1537
|
>(
|
|
1541
|
-
source:
|
|
1542
|
-
|
|
1543
|
-
destination:
|
|
1544
|
-
callback: PipelineCallback<
|
|
1545
|
-
):
|
|
1538
|
+
source: A,
|
|
1539
|
+
transform1: T1,
|
|
1540
|
+
destination: B,
|
|
1541
|
+
callback: PipelineCallback<B>,
|
|
1542
|
+
): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
|
|
1546
1543
|
function pipeline<
|
|
1547
|
-
|
|
1548
|
-
T1 extends PipelineTransform<
|
|
1544
|
+
A extends PipelineSource<any>,
|
|
1545
|
+
T1 extends PipelineTransform<A, any>,
|
|
1549
1546
|
T2 extends PipelineTransform<T1, any>,
|
|
1550
|
-
|
|
1547
|
+
B extends PipelineDestination<T2, any>,
|
|
1551
1548
|
>(
|
|
1552
|
-
source:
|
|
1549
|
+
source: A,
|
|
1553
1550
|
transform1: T1,
|
|
1554
1551
|
transform2: T2,
|
|
1555
|
-
destination:
|
|
1556
|
-
callback: PipelineCallback<
|
|
1557
|
-
):
|
|
1552
|
+
destination: B,
|
|
1553
|
+
callback: PipelineCallback<B>,
|
|
1554
|
+
): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
|
|
1558
1555
|
function pipeline<
|
|
1559
|
-
|
|
1560
|
-
T1 extends PipelineTransform<
|
|
1556
|
+
A extends PipelineSource<any>,
|
|
1557
|
+
T1 extends PipelineTransform<A, any>,
|
|
1561
1558
|
T2 extends PipelineTransform<T1, any>,
|
|
1562
1559
|
T3 extends PipelineTransform<T2, any>,
|
|
1563
|
-
|
|
1560
|
+
B extends PipelineDestination<T3, any>,
|
|
1564
1561
|
>(
|
|
1565
|
-
source:
|
|
1562
|
+
source: A,
|
|
1566
1563
|
transform1: T1,
|
|
1567
1564
|
transform2: T2,
|
|
1568
1565
|
transform3: T3,
|
|
1569
|
-
destination:
|
|
1570
|
-
callback: PipelineCallback<
|
|
1571
|
-
):
|
|
1566
|
+
destination: B,
|
|
1567
|
+
callback: PipelineCallback<B>,
|
|
1568
|
+
): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
|
|
1572
1569
|
function pipeline<
|
|
1573
|
-
|
|
1574
|
-
T1 extends PipelineTransform<
|
|
1570
|
+
A extends PipelineSource<any>,
|
|
1571
|
+
T1 extends PipelineTransform<A, any>,
|
|
1575
1572
|
T2 extends PipelineTransform<T1, any>,
|
|
1576
1573
|
T3 extends PipelineTransform<T2, any>,
|
|
1577
1574
|
T4 extends PipelineTransform<T3, any>,
|
|
1578
|
-
|
|
1575
|
+
B extends PipelineDestination<T4, any>,
|
|
1579
1576
|
>(
|
|
1580
|
-
source:
|
|
1577
|
+
source: A,
|
|
1581
1578
|
transform1: T1,
|
|
1582
1579
|
transform2: T2,
|
|
1583
1580
|
transform3: T3,
|
|
1584
1581
|
transform4: T4,
|
|
1585
|
-
destination:
|
|
1586
|
-
callback: PipelineCallback<
|
|
1587
|
-
):
|
|
1582
|
+
destination: B,
|
|
1583
|
+
callback: PipelineCallback<B>,
|
|
1584
|
+
): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
|
|
1588
1585
|
function pipeline(
|
|
1589
|
-
streams: ReadonlyArray<
|
|
1586
|
+
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
|
1590
1587
|
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1591
1588
|
): NodeJS.WritableStream;
|
|
1592
1589
|
function pipeline(
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1590
|
+
stream1: NodeJS.ReadableStream,
|
|
1591
|
+
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
1592
|
+
...streams: Array<
|
|
1593
|
+
NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)
|
|
1594
|
+
>
|
|
1597
1595
|
): NodeJS.WritableStream;
|
|
1598
1596
|
namespace pipeline {
|
|
1599
|
-
|
|
1600
|
-
|
|
1597
|
+
function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
|
|
1598
|
+
source: A,
|
|
1599
|
+
destination: B,
|
|
1600
|
+
options?: PipelineOptions,
|
|
1601
|
+
): PipelinePromise<B>;
|
|
1602
|
+
function __promisify__<
|
|
1603
|
+
A extends PipelineSource<any>,
|
|
1604
|
+
T1 extends PipelineTransform<A, any>,
|
|
1605
|
+
B extends PipelineDestination<T1, any>,
|
|
1606
|
+
>(
|
|
1607
|
+
source: A,
|
|
1608
|
+
transform1: T1,
|
|
1609
|
+
destination: B,
|
|
1610
|
+
options?: PipelineOptions,
|
|
1611
|
+
): PipelinePromise<B>;
|
|
1612
|
+
function __promisify__<
|
|
1613
|
+
A extends PipelineSource<any>,
|
|
1614
|
+
T1 extends PipelineTransform<A, any>,
|
|
1615
|
+
T2 extends PipelineTransform<T1, any>,
|
|
1616
|
+
B extends PipelineDestination<T2, any>,
|
|
1617
|
+
>(
|
|
1618
|
+
source: A,
|
|
1619
|
+
transform1: T1,
|
|
1620
|
+
transform2: T2,
|
|
1621
|
+
destination: B,
|
|
1622
|
+
options?: PipelineOptions,
|
|
1623
|
+
): PipelinePromise<B>;
|
|
1624
|
+
function __promisify__<
|
|
1625
|
+
A extends PipelineSource<any>,
|
|
1626
|
+
T1 extends PipelineTransform<A, any>,
|
|
1627
|
+
T2 extends PipelineTransform<T1, any>,
|
|
1628
|
+
T3 extends PipelineTransform<T2, any>,
|
|
1629
|
+
B extends PipelineDestination<T3, any>,
|
|
1630
|
+
>(
|
|
1631
|
+
source: A,
|
|
1632
|
+
transform1: T1,
|
|
1633
|
+
transform2: T2,
|
|
1634
|
+
transform3: T3,
|
|
1635
|
+
destination: B,
|
|
1636
|
+
options?: PipelineOptions,
|
|
1637
|
+
): PipelinePromise<B>;
|
|
1638
|
+
function __promisify__<
|
|
1639
|
+
A extends PipelineSource<any>,
|
|
1640
|
+
T1 extends PipelineTransform<A, any>,
|
|
1641
|
+
T2 extends PipelineTransform<T1, any>,
|
|
1642
|
+
T3 extends PipelineTransform<T2, any>,
|
|
1643
|
+
T4 extends PipelineTransform<T3, any>,
|
|
1644
|
+
B extends PipelineDestination<T4, any>,
|
|
1645
|
+
>(
|
|
1646
|
+
source: A,
|
|
1647
|
+
transform1: T1,
|
|
1648
|
+
transform2: T2,
|
|
1649
|
+
transform3: T3,
|
|
1650
|
+
transform4: T4,
|
|
1651
|
+
destination: B,
|
|
1652
|
+
options?: PipelineOptions,
|
|
1653
|
+
): PipelinePromise<B>;
|
|
1654
|
+
function __promisify__(
|
|
1655
|
+
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
|
1656
|
+
options?: PipelineOptions,
|
|
1657
|
+
): Promise<void>;
|
|
1658
|
+
function __promisify__(
|
|
1659
|
+
stream1: NodeJS.ReadableStream,
|
|
1660
|
+
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
1661
|
+
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
|
|
1662
|
+
): Promise<void>;
|
|
1663
|
+
}
|
|
1664
|
+
// TODO: this interface never existed; remove in next major
|
|
1665
|
+
interface Pipe {
|
|
1666
|
+
close(): void;
|
|
1667
|
+
hasRef(): boolean;
|
|
1668
|
+
ref(): void;
|
|
1669
|
+
unref(): void;
|
|
1601
1670
|
}
|
|
1602
|
-
type ComposeSource<O> =
|
|
1603
|
-
| NodeJS.ReadableStream
|
|
1604
|
-
| web.ReadableStream<O>
|
|
1605
|
-
| Iterable<O>
|
|
1606
|
-
| AsyncIterable<O>
|
|
1607
|
-
| (() => AsyncIterable<O>);
|
|
1608
|
-
type ComposeTransformStreams<I, O> = NodeJS.ReadWriteStream | web.TransformStream<I, O>;
|
|
1609
|
-
type ComposeTransformGenerator<I, O> = (source: AsyncIterable<I>) => AsyncIterable<O>;
|
|
1610
|
-
type ComposeTransform<S extends ComposeTransformSource<any>, O> = S extends
|
|
1611
|
-
ComposeSource<infer I> | ComposeTransformStreams<any, infer I> | ComposeTransformGenerator<any, infer I>
|
|
1612
|
-
? ComposeTransformStreams<I, O> | ComposeTransformGenerator<I, O>
|
|
1613
|
-
: never;
|
|
1614
|
-
type ComposeTransformSource<O> = ComposeSource<O> | ComposeTransform<any, O>;
|
|
1615
|
-
type ComposeDestination<S extends ComposeTransformSource<any>> = S extends ComposeTransformSource<infer I> ?
|
|
1616
|
-
| NodeJS.WritableStream
|
|
1617
|
-
| web.WritableStream<I>
|
|
1618
|
-
| web.TransformStream<I, any>
|
|
1619
|
-
| ((source: AsyncIterable<I>) => void)
|
|
1620
|
-
: never;
|
|
1621
|
-
/**
|
|
1622
|
-
* Combines two or more streams into a `Duplex` stream that writes to the
|
|
1623
|
-
* first stream and reads from the last. Each provided stream is piped into
|
|
1624
|
-
* the next, using `stream.pipeline`. If any of the streams error then all
|
|
1625
|
-
* are destroyed, including the outer `Duplex` stream.
|
|
1626
|
-
*
|
|
1627
|
-
* Because `stream.compose` returns a new stream that in turn can (and
|
|
1628
|
-
* should) be piped into other streams, it enables composition. In contrast,
|
|
1629
|
-
* when passing streams to `stream.pipeline`, typically the first stream is
|
|
1630
|
-
* a readable stream and the last a writable stream, forming a closed
|
|
1631
|
-
* circuit.
|
|
1632
|
-
*
|
|
1633
|
-
* If passed a `Function` it must be a factory method taking a `source`
|
|
1634
|
-
* `Iterable`.
|
|
1635
|
-
*
|
|
1636
|
-
* ```js
|
|
1637
|
-
* import { compose, Transform } from 'node:stream';
|
|
1638
|
-
*
|
|
1639
|
-
* const removeSpaces = new Transform({
|
|
1640
|
-
* transform(chunk, encoding, callback) {
|
|
1641
|
-
* callback(null, String(chunk).replace(' ', ''));
|
|
1642
|
-
* },
|
|
1643
|
-
* });
|
|
1644
|
-
*
|
|
1645
|
-
* async function* toUpper(source) {
|
|
1646
|
-
* for await (const chunk of source) {
|
|
1647
|
-
* yield String(chunk).toUpperCase();
|
|
1648
|
-
* }
|
|
1649
|
-
* }
|
|
1650
|
-
*
|
|
1651
|
-
* let res = '';
|
|
1652
|
-
* for await (const buf of compose(removeSpaces, toUpper).end('hello world')) {
|
|
1653
|
-
* res += buf;
|
|
1654
|
-
* }
|
|
1655
|
-
*
|
|
1656
|
-
* console.log(res); // prints 'HELLOWORLD'
|
|
1657
|
-
* ```
|
|
1658
|
-
*
|
|
1659
|
-
* `stream.compose` can be used to convert async iterables, generators and
|
|
1660
|
-
* functions into streams.
|
|
1661
|
-
*
|
|
1662
|
-
* * `AsyncIterable` converts into a readable `Duplex`. Cannot yield
|
|
1663
|
-
* `null`.
|
|
1664
|
-
* * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`.
|
|
1665
|
-
* Must take a source `AsyncIterable` as first parameter. Cannot yield
|
|
1666
|
-
* `null`.
|
|
1667
|
-
* * `AsyncFunction` converts into a writable `Duplex`. Must return
|
|
1668
|
-
* either `null` or `undefined`.
|
|
1669
|
-
*
|
|
1670
|
-
* ```js
|
|
1671
|
-
* import { compose } from 'node:stream';
|
|
1672
|
-
* import { finished } from 'node:stream/promises';
|
|
1673
|
-
*
|
|
1674
|
-
* // Convert AsyncIterable into readable Duplex.
|
|
1675
|
-
* const s1 = compose(async function*() {
|
|
1676
|
-
* yield 'Hello';
|
|
1677
|
-
* yield 'World';
|
|
1678
|
-
* }());
|
|
1679
|
-
*
|
|
1680
|
-
* // Convert AsyncGenerator into transform Duplex.
|
|
1681
|
-
* const s2 = compose(async function*(source) {
|
|
1682
|
-
* for await (const chunk of source) {
|
|
1683
|
-
* yield String(chunk).toUpperCase();
|
|
1684
|
-
* }
|
|
1685
|
-
* });
|
|
1686
|
-
*
|
|
1687
|
-
* let res = '';
|
|
1688
|
-
*
|
|
1689
|
-
* // Convert AsyncFunction into writable Duplex.
|
|
1690
|
-
* const s3 = compose(async function(source) {
|
|
1691
|
-
* for await (const chunk of source) {
|
|
1692
|
-
* res += chunk;
|
|
1693
|
-
* }
|
|
1694
|
-
* });
|
|
1695
|
-
*
|
|
1696
|
-
* await finished(compose(s1, s2, s3));
|
|
1697
|
-
*
|
|
1698
|
-
* console.log(res); // prints 'HELLOWORLD'
|
|
1699
|
-
* ```
|
|
1700
|
-
*
|
|
1701
|
-
* For convenience, the `readable.compose(stream)` method is available on
|
|
1702
|
-
* `Readable` and `Duplex` streams as a wrapper for this function.
|
|
1703
|
-
* @since v16.9.0
|
|
1704
|
-
* @experimental
|
|
1705
|
-
*/
|
|
1706
|
-
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
1707
|
-
function compose(stream: ComposeSource<any> | ComposeDestination<any>): Duplex;
|
|
1708
|
-
function compose<
|
|
1709
|
-
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1710
|
-
D extends ComposeTransform<S, any> | ComposeDestination<S>,
|
|
1711
|
-
>(
|
|
1712
|
-
source: S,
|
|
1713
|
-
destination: D,
|
|
1714
|
-
): Duplex;
|
|
1715
|
-
function compose<
|
|
1716
|
-
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1717
|
-
T extends ComposeTransform<S, any>,
|
|
1718
|
-
D extends ComposeTransform<T, any> | ComposeDestination<T>,
|
|
1719
|
-
>(source: S, transform: T, destination: D): Duplex;
|
|
1720
|
-
function compose<
|
|
1721
|
-
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1722
|
-
T1 extends ComposeTransform<S, any>,
|
|
1723
|
-
T2 extends ComposeTransform<T1, any>,
|
|
1724
|
-
D extends ComposeTransform<T2, any> | ComposeDestination<T2>,
|
|
1725
|
-
>(source: S, transform1: T1, transform2: T2, destination: D): Duplex;
|
|
1726
|
-
function compose<
|
|
1727
|
-
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1728
|
-
T1 extends ComposeTransform<S, any>,
|
|
1729
|
-
T2 extends ComposeTransform<T1, any>,
|
|
1730
|
-
T3 extends ComposeTransform<T2, any>,
|
|
1731
|
-
D extends ComposeTransform<T3, any> | ComposeDestination<T3>,
|
|
1732
|
-
>(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex;
|
|
1733
|
-
function compose<
|
|
1734
|
-
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1735
|
-
T1 extends ComposeTransform<S, any>,
|
|
1736
|
-
T2 extends ComposeTransform<T1, any>,
|
|
1737
|
-
T3 extends ComposeTransform<T2, any>,
|
|
1738
|
-
T4 extends ComposeTransform<T3, any>,
|
|
1739
|
-
D extends ComposeTransform<T4, any> | ComposeDestination<T4>,
|
|
1740
|
-
>(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex;
|
|
1741
|
-
function compose(
|
|
1742
|
-
...streams: [
|
|
1743
|
-
ComposeSource<any>,
|
|
1744
|
-
...ComposeTransform<any, any>[],
|
|
1745
|
-
ComposeDestination<any>,
|
|
1746
|
-
]
|
|
1747
|
-
): Duplex;
|
|
1748
|
-
/* eslint-enable @definitelytyped/no-unnecessary-generics */
|
|
1749
1671
|
/**
|
|
1750
1672
|
* Returns whether the stream has encountered an error.
|
|
1751
1673
|
* @since v17.3.0, v16.14.0
|
|
1752
1674
|
*/
|
|
1753
|
-
function isErrored(
|
|
1754
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1755
|
-
): boolean;
|
|
1675
|
+
function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
|
|
1756
1676
|
/**
|
|
1757
1677
|
* Returns whether the stream is readable.
|
|
1758
1678
|
* @since v17.4.0, v16.14.0
|
|
1759
1679
|
* @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
|
|
1760
1680
|
*/
|
|
1761
|
-
function isReadable(stream:
|
|
1681
|
+
function isReadable(stream: Readable | NodeJS.ReadableStream): boolean | null;
|
|
1762
1682
|
/**
|
|
1763
1683
|
* Returns whether the stream is writable.
|
|
1764
1684
|
* @since v20.0.0
|
|
1765
1685
|
* @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
|
|
1766
1686
|
*/
|
|
1767
|
-
function isWritable(stream:
|
|
1768
|
-
}
|
|
1769
|
-
global {
|
|
1770
|
-
namespace NodeJS {
|
|
1771
|
-
// These interfaces are vestigial, and correspond roughly to the "streams2" interfaces
|
|
1772
|
-
// from early versions of Node.js, but they are still used widely across the ecosystem.
|
|
1773
|
-
// Accordingly, they are commonly used as "in-types" for @types/node APIs, so that
|
|
1774
|
-
// eg. streams returned from older libraries will still be considered valid input to
|
|
1775
|
-
// functions which accept stream arguments.
|
|
1776
|
-
// It's not possible to change or remove these without astronomical levels of breakage.
|
|
1777
|
-
interface ReadableStream extends EventEmitter {
|
|
1778
|
-
readable: boolean;
|
|
1779
|
-
read(size?: number): string | Buffer;
|
|
1780
|
-
setEncoding(encoding: BufferEncoding): this;
|
|
1781
|
-
pause(): this;
|
|
1782
|
-
resume(): this;
|
|
1783
|
-
isPaused(): boolean;
|
|
1784
|
-
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
|
1785
|
-
unpipe(destination?: WritableStream): this;
|
|
1786
|
-
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
1787
|
-
wrap(oldStream: ReadableStream): this;
|
|
1788
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
|
|
1789
|
-
}
|
|
1790
|
-
interface WritableStream extends EventEmitter {
|
|
1791
|
-
writable: boolean;
|
|
1792
|
-
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
1793
|
-
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
1794
|
-
end(cb?: () => void): this;
|
|
1795
|
-
end(data: string | Uint8Array, cb?: () => void): this;
|
|
1796
|
-
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
1797
|
-
}
|
|
1798
|
-
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
|
1799
|
-
}
|
|
1687
|
+
function isWritable(stream: Writable | NodeJS.WritableStream): boolean | null;
|
|
1800
1688
|
}
|
|
1801
1689
|
export = Stream;
|
|
1802
1690
|
}
|
|
1803
|
-
declare module "stream" {
|
|
1804
|
-
import stream = require("
|
|
1691
|
+
declare module "node:stream" {
|
|
1692
|
+
import stream = require("stream");
|
|
1805
1693
|
export = stream;
|
|
1806
1694
|
}
|