cf-workers-native 0.0.0-stage → 0.1.2-beta.local.sha2f5e4e6956f4
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/LICENSE +21 -0
- package/Package.swift +25 -0
- package/README.md +92 -2
- package/dist/android.d.ts +2 -0
- package/dist/android.js +1 -0
- package/dist/browser/abort/index.d.ts +13 -0
- package/dist/browser/abort/index.js +66 -0
- package/dist/browser/body/index.d.ts +24 -0
- package/dist/browser/body/index.js +116 -0
- package/dist/browser/body/stream-body.d.ts +13 -0
- package/dist/browser/body/stream-body.js +84 -0
- package/dist/browser/documents/body.d.ts +3 -0
- package/dist/browser/documents/body.js +48 -0
- package/dist/browser/documents/form-body.d.ts +1 -0
- package/dist/browser/documents/form-body.js +54 -0
- package/dist/browser/documents/host.d.ts +11 -0
- package/dist/browser/documents/host.js +256 -0
- package/dist/browser/documents/links-source.d.ts +1 -0
- package/dist/browser/documents/links-source.js +1 -0
- package/dist/browser/documents/links.d.ts +1 -0
- package/dist/browser/documents/links.js +33 -0
- package/dist/browser/documents/page-config.d.ts +5 -0
- package/dist/browser/documents/page-config.js +5 -0
- package/dist/browser/documents/page-source.d.ts +1 -0
- package/dist/browser/documents/page-source.js +1 -0
- package/dist/browser/documents/page.d.ts +2 -0
- package/dist/browser/documents/page.js +153 -0
- package/dist/browser/documents/registration.d.ts +5 -0
- package/dist/browser/documents/registration.js +75 -0
- package/dist/browser/documents/runtime.d.ts +7 -0
- package/dist/browser/documents/runtime.js +161 -0
- package/dist/browser/documents/service-worker.js +285 -0
- package/dist/browser/encoding/index.d.ts +7 -0
- package/dist/browser/encoding/index.js +3 -0
- package/dist/browser/fetch/LICENSE-3RD-PARTY.md +9 -0
- package/dist/browser/fetch/LICENSE-APACHE +177 -0
- package/dist/browser/fetch/host-call.d.ts +3 -0
- package/dist/browser/fetch/host-call.js +67 -0
- package/dist/browser/fetch/index.d.ts +5 -0
- package/dist/browser/fetch/index.js +96 -0
- package/dist/browser/fetch/interop.d.ts +6 -0
- package/dist/browser/fetch/interop.js +48 -0
- package/dist/browser/fetch/native-network.d.ts +20 -0
- package/dist/browser/fetch/native-network.js +233 -0
- package/dist/browser/fetch/outbound.d.ts +2 -0
- package/dist/browser/fetch/outbound.js +11 -0
- package/dist/browser/fetch/relay.d.ts +7 -0
- package/dist/browser/fetch/relay.js +100 -0
- package/dist/browser/fetch/scope.d.ts +8 -0
- package/dist/browser/fetch/scope.js +108 -0
- package/dist/browser/fetch/transport.d.ts +39 -0
- package/dist/browser/fetch/transport.js +136 -0
- package/dist/browser/headers/LICENSE-3RD-PARTY.md +9 -0
- package/dist/browser/headers/LICENSE-APACHE +177 -0
- package/dist/browser/headers/index.d.ts +20 -0
- package/dist/browser/headers/index.js +194 -0
- package/dist/browser/isolated/bridge.d.ts +8 -0
- package/dist/browser/isolated/bridge.js +267 -0
- package/dist/browser/isolated/protocol.d.ts +40 -0
- package/dist/browser/isolated/protocol.js +1 -0
- package/dist/browser/isolated/transport.d.ts +2 -0
- package/dist/browser/isolated/transport.js +157 -0
- package/dist/browser/request/LICENSE-3RD-PARTY.md +10 -0
- package/dist/browser/request/LICENSE-APACHE +177 -0
- package/dist/browser/request/index.d.ts +48 -0
- package/dist/browser/request/index.js +182 -0
- package/dist/browser/response/LICENSE-3RD-PARTY.md +10 -0
- package/dist/browser/response/LICENSE-APACHE +177 -0
- package/dist/browser/response/index.d.ts +43 -0
- package/dist/browser/response/index.js +192 -0
- package/dist/browser/response/status.d.ts +1 -0
- package/dist/browser/response/status.js +75 -0
- package/dist/browser/structured-clone/index.d.ts +1 -0
- package/dist/browser/structured-clone/index.js +479 -0
- package/dist/cloudflare/apis/cloudflare-node/index.d.ts +18 -0
- package/dist/cloudflare/apis/cloudflare-node/index.js +150 -0
- package/dist/cloudflare/apis/cloudflare-workers/index.d.ts +8 -0
- package/dist/cloudflare/apis/cloudflare-workers/index.js +37 -0
- package/dist/cloudflare/apis/types.d.ts +7 -0
- package/dist/cloudflare/apis/types.js +1 -0
- package/dist/cloudflare/bindings/config.d.ts +42 -0
- package/dist/cloudflare/bindings/config.js +280 -0
- package/dist/cloudflare/bindings/kv/contract.d.ts +6 -0
- package/dist/cloudflare/bindings/kv/contract.js +181 -0
- package/dist/cloudflare/bindings/kv/index.d.ts +18 -0
- package/dist/cloudflare/bindings/kv/index.js +61 -0
- package/dist/cloudflare/bindings/kv/storage.d.ts +25 -0
- package/dist/cloudflare/bindings/kv/storage.js +320 -0
- package/dist/cloudflare/bindings/kv/types.d.ts +50 -0
- package/dist/cloudflare/bindings/kv/types.js +1 -0
- package/dist/cloudflare/bindings/remote.d.ts +8 -0
- package/dist/cloudflare/bindings/remote.js +261 -0
- package/dist/cloudflare/workers/contract.d.ts +8 -0
- package/dist/cloudflare/workers/contract.js +65 -0
- package/dist/cloudflare/workers/feature.d.ts +10 -0
- package/dist/cloudflare/workers/feature.js +28 -0
- package/dist/cloudflare/workers/runtime.d.ts +23 -0
- package/dist/cloudflare/workers/runtime.js +121 -0
- package/dist/cloudflare/workers/types.d.ts +49 -0
- package/dist/cloudflare/workers/types.js +1 -0
- package/dist/cloudflare/workers/worker-runtime.d.ts +44 -0
- package/dist/cloudflare/workers/worker-runtime.js +267 -0
- package/dist/compat/assert/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/assert/LICENSE-APACHE +177 -0
- package/dist/compat/assert/assertion-error.d.ts +26 -0
- package/dist/compat/assert/assertion-error.js +468 -0
- package/dist/compat/assert/diff.d.ts +26 -0
- package/dist/compat/assert/diff.js +329 -0
- package/dist/compat/assert/errors.d.ts +11 -0
- package/dist/compat/assert/errors.js +55 -0
- package/dist/compat/assert/index.cjs +24 -0
- package/dist/compat/assert/index.d.cts +43 -0
- package/dist/compat/assert/index.d.ts +50 -0
- package/dist/compat/assert/index.js +858 -0
- package/dist/compat/async-hooks/LICENSE-APACHE +177 -0
- package/dist/compat/async-hooks/NOTICE.md +8 -0
- package/dist/compat/async-hooks/callbacks.d.ts +7 -0
- package/dist/compat/async-hooks/callbacks.js +18 -0
- package/dist/compat/async-hooks/hooks.d.ts +10 -0
- package/dist/compat/async-hooks/hooks.js +111 -0
- package/dist/compat/async-hooks/index.d.ts +41 -0
- package/dist/compat/async-hooks/index.js +298 -0
- package/dist/compat/buffer/LICENSE-3RD-PARTY.md +15 -0
- package/dist/compat/buffer/LICENSE-APACHE +177 -0
- package/dist/compat/buffer/blob.d.ts +22 -0
- package/dist/compat/buffer/blob.js +210 -0
- package/dist/compat/buffer/bytes.d.ts +34 -0
- package/dist/compat/buffer/bytes.js +228 -0
- package/dist/compat/buffer/errors.d.ts +41 -0
- package/dist/compat/buffer/errors.js +265 -0
- package/dist/compat/buffer/index.d.ts +25 -0
- package/dist/compat/buffer/index.js +24 -0
- package/dist/compat/buffer/internal-buffer.d.ts +148 -0
- package/dist/compat/buffer/internal-buffer.js +1809 -0
- package/dist/compat/buffer/support.d.ts +13 -0
- package/dist/compat/buffer/support.js +65 -0
- package/dist/compat/child-process/LICENSE-3RD-PARTY.md +8 -0
- package/dist/compat/child-process/LICENSE-APACHE +177 -0
- package/dist/compat/child-process/errors.d.ts +4 -0
- package/dist/compat/child-process/errors.js +6 -0
- package/dist/compat/child-process/index.d.ts +49 -0
- package/dist/compat/child-process/index.js +96 -0
- package/dist/compat/cluster/LICENSE-3RD-PARTY.md +40 -0
- package/dist/compat/cluster/LICENSE-APACHE +177 -0
- package/dist/compat/cluster/errors.d.ts +4 -0
- package/dist/compat/cluster/errors.js +6 -0
- package/dist/compat/cluster/index.d.ts +47 -0
- package/dist/compat/cluster/index.js +88 -0
- package/dist/compat/constants/LICENSE-3RD-PARTY.md +6 -0
- package/dist/compat/constants/LICENSE-APACHE +177 -0
- package/dist/compat/constants/index.d.ts +481 -0
- package/dist/compat/constants/index.js +488 -0
- package/dist/compat/dgram/LICENSE-3RD-PARTY.md +8 -0
- package/dist/compat/dgram/LICENSE-APACHE +177 -0
- package/dist/compat/dgram/index.d.ts +10 -0
- package/dist/compat/dgram/index.js +132 -0
- package/dist/compat/diagnostics-channel/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/diagnostics-channel/LICENSE-APACHE +177 -0
- package/dist/compat/diagnostics-channel/index.d.ts +73 -0
- package/dist/compat/diagnostics-channel/index.js +261 -0
- package/dist/compat/diagnostics-channel/native.d.ts +26 -0
- package/dist/compat/diagnostics-channel/native.js +154 -0
- package/dist/compat/dns/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/dns/LICENSE-APACHE +177 -0
- package/dist/compat/dns/client.d.ts +72 -0
- package/dist/compat/dns/client.js +161 -0
- package/dist/compat/dns/constants.d.ts +27 -0
- package/dist/compat/dns/constants.js +31 -0
- package/dist/compat/dns/errors.d.ts +8 -0
- package/dist/compat/dns/errors.js +12 -0
- package/dist/compat/dns/index.d.ts +97 -0
- package/dist/compat/dns/index.js +127 -0
- package/dist/compat/dns/parser.d.ts +18 -0
- package/dist/compat/dns/parser.js +144 -0
- package/dist/compat/dns/promise-resolver.d.ts +82 -0
- package/dist/compat/dns/promise-resolver.js +113 -0
- package/dist/compat/dns/promises.d.ts +50 -0
- package/dist/compat/dns/promises.js +53 -0
- package/dist/compat/dns/resolver.d.ts +34 -0
- package/dist/compat/dns/resolver.js +415 -0
- package/dist/compat/domain/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/domain/LICENSE-APACHE +177 -0
- package/dist/compat/domain/index.d.ts +22 -0
- package/dist/compat/domain/index.js +79 -0
- package/dist/compat/fs/index.d.ts +85 -0
- package/dist/compat/fs/index.js +255 -0
- package/dist/compat/fs/promises/index.d.ts +3 -0
- package/dist/compat/fs/promises/index.js +3 -0
- package/dist/compat/http/index.d.ts +322 -0
- package/dist/compat/http/index.js +1356 -0
- package/dist/compat/http/registry.d.ts +19 -0
- package/dist/compat/http/registry.js +13 -0
- package/dist/compat/http-agent/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/http-agent/LICENSE-APACHE +177 -0
- package/dist/compat/http-agent/index.d.ts +7 -0
- package/dist/compat/http-agent/index.js +10 -0
- package/dist/compat/http-client/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/http-client/LICENSE-APACHE +177 -0
- package/dist/compat/http-client/index.d.ts +6 -0
- package/dist/compat/http-client/index.js +7 -0
- package/dist/compat/http-incoming/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/http-incoming/LICENSE-APACHE +177 -0
- package/dist/compat/http-incoming/index.d.ts +6 -0
- package/dist/compat/http-incoming/index.js +9 -0
- package/dist/compat/http2/LICENSE-3RD-PARTY.md +29 -0
- package/dist/compat/http2/LICENSE-APACHE +177 -0
- package/dist/compat/http2/constants.d.ts +255 -0
- package/dist/compat/http2/constants.js +515 -0
- package/dist/compat/http2/errors.d.ts +4 -0
- package/dist/compat/http2/errors.js +6 -0
- package/dist/compat/http2/index.d.ts +283 -0
- package/dist/compat/http2/index.js +68 -0
- package/dist/compat/https/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/https/LICENSE-APACHE +177 -0
- package/dist/compat/https/agent.d.ts +10 -0
- package/dist/compat/https/agent.js +99 -0
- package/dist/compat/https/errors.d.ts +4 -0
- package/dist/compat/https/errors.js +6 -0
- package/dist/compat/https/index.d.ts +20 -0
- package/dist/compat/https/index.js +50 -0
- package/dist/compat/https/server.d.ts +8 -0
- package/dist/compat/https/server.js +27 -0
- package/dist/compat/immediate/index.d.ts +11 -0
- package/dist/compat/immediate/index.js +58 -0
- package/dist/compat/inspector/LICENSE-3RD-PARTY.md +34 -0
- package/dist/compat/inspector/LICENSE-APACHE +177 -0
- package/dist/compat/inspector/errors.d.ts +4 -0
- package/dist/compat/inspector/errors.js +6 -0
- package/dist/compat/inspector/index.d.ts +18 -0
- package/dist/compat/inspector/index.js +117 -0
- package/dist/compat/inspector/promises.d.ts +18 -0
- package/dist/compat/inspector/promises.js +114 -0
- package/dist/compat/module/index.cjs +2 -0
- package/dist/compat/module/index.d.cts +2 -0
- package/dist/compat/module/index.d.ts +11 -0
- package/dist/compat/module/index.js +44 -0
- package/dist/compat/module/resolve-unavailable.d.ts +1 -0
- package/dist/compat/module/resolve-unavailable.js +3 -0
- package/dist/compat/net/LICENSE-3RD-PARTY.md +15 -0
- package/dist/compat/net/LICENSE-APACHE +177 -0
- package/dist/compat/net/error-base.d.ts +14 -0
- package/dist/compat/net/error-base.js +62 -0
- package/dist/compat/net/errors.d.ts +76 -0
- package/dist/compat/net/errors.js +333 -0
- package/dist/compat/net/index.d.ts +23 -0
- package/dist/compat/net/index.js +46 -0
- package/dist/compat/net/internal-net.d.ts +236 -0
- package/dist/compat/net/internal-net.js +2292 -0
- package/dist/compat/net/ports.d.ts +32 -0
- package/dist/compat/net/ports.js +149 -0
- package/dist/compat/net/reader.d.ts +8 -0
- package/dist/compat/net/reader.js +36 -0
- package/dist/compat/net/sockets.d.ts +20 -0
- package/dist/compat/net/sockets.js +195 -0
- package/dist/compat/net/validators.d.ts +18 -0
- package/dist/compat/net/validators.js +154 -0
- package/dist/compat/os/LICENSE-3RD-PARTY.md +8 -0
- package/dist/compat/os/LICENSE-APACHE +177 -0
- package/dist/compat/os/index.d.ts +329 -0
- package/dist/compat/os/index.js +278 -0
- package/dist/compat/path/LICENSE-3RD-PARTY.md +35 -0
- package/dist/compat/path/LICENSE-APACHE +177 -0
- package/dist/compat/path/index.d.ts +4 -0
- package/dist/compat/path/index.js +11 -0
- package/dist/compat/path/internal-path.d.ts +95 -0
- package/dist/compat/path/internal-path.js +1542 -0
- package/dist/compat/path/posix/index.d.ts +4 -0
- package/dist/compat/path/posix/index.js +5 -0
- package/dist/compat/path/win32/index.d.ts +4 -0
- package/dist/compat/path/win32/index.js +5 -0
- package/dist/compat/perf-hooks/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/perf-hooks/LICENSE-APACHE +177 -0
- package/dist/compat/perf-hooks/index.d.ts +85 -0
- package/dist/compat/perf-hooks/index.js +79 -0
- package/dist/compat/perf-hooks/performance.d.ts +96 -0
- package/dist/compat/perf-hooks/performance.js +445 -0
- package/dist/compat/punycode/LICENSE-3RD-PARTY.md +7 -0
- package/dist/compat/punycode/LICENSE-APACHE +177 -0
- package/dist/compat/punycode/index.d.ts +93 -0
- package/dist/compat/punycode/index.js +410 -0
- package/dist/compat/querystring/LICENSE-3RD-PARTY.md +35 -0
- package/dist/compat/querystring/LICENSE-APACHE +177 -0
- package/dist/compat/querystring/index.d.ts +14 -0
- package/dist/compat/querystring/index.js +18 -0
- package/dist/compat/querystring/internal-querystring.d.ts +22 -0
- package/dist/compat/querystring/internal-querystring.js +498 -0
- package/dist/compat/readline/LICENSE-3RD-PARTY.md +37 -0
- package/dist/compat/readline/LICENSE-APACHE +177 -0
- package/dist/compat/readline/index.d.ts +21 -0
- package/dist/compat/readline/index.js +56 -0
- package/dist/compat/readline/interface.d.ts +22 -0
- package/dist/compat/readline/interface.js +85 -0
- package/dist/compat/readline/internal-promises.d.ts +32 -0
- package/dist/compat/readline/internal-promises.js +104 -0
- package/dist/compat/readline/promises.d.ts +8 -0
- package/dist/compat/readline/promises.js +32 -0
- package/dist/compat/repl/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/repl/LICENSE-APACHE +177 -0
- package/dist/compat/repl/builtin-modules.d.ts +1 -0
- package/dist/compat/repl/builtin-modules.js +101 -0
- package/dist/compat/repl/errors.d.ts +4 -0
- package/dist/compat/repl/errors.js +6 -0
- package/dist/compat/repl/index.d.ts +53 -0
- package/dist/compat/repl/index.js +106 -0
- package/dist/compat/sqlite/LICENSE-3RD-PARTY.md +6 -0
- package/dist/compat/sqlite/LICENSE-APACHE +177 -0
- package/dist/compat/sqlite/index.d.ts +12 -0
- package/dist/compat/sqlite/index.js +101 -0
- package/dist/compat/sqlite/native.d.ts +16 -0
- package/dist/compat/sqlite/native.js +33 -0
- package/dist/compat/stream/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream/LICENSE-APACHE +177 -0
- package/dist/compat/stream/add-abort-signal.d.ts +4 -0
- package/dist/compat/stream/add-abort-signal.js +73 -0
- package/dist/compat/stream/compose.d.ts +1 -0
- package/dist/compat/stream/compose.js +313 -0
- package/dist/compat/stream/destroy.d.ts +5 -0
- package/dist/compat/stream/destroy.js +315 -0
- package/dist/compat/stream/duplex.d.ts +48 -0
- package/dist/compat/stream/duplex.js +789 -0
- package/dist/compat/stream/end-of-stream.d.ts +16 -0
- package/dist/compat/stream/end-of-stream.js +269 -0
- package/dist/compat/stream/errors.d.ts +40 -0
- package/dist/compat/stream/errors.js +86 -0
- package/dist/compat/stream/events.d.ts +6 -0
- package/dist/compat/stream/events.js +28 -0
- package/dist/compat/stream/index.cjs +27 -0
- package/dist/compat/stream/index.d.cts +25 -0
- package/dist/compat/stream/index.d.ts +20 -0
- package/dist/compat/stream/index.js +55 -0
- package/dist/compat/stream/legacy.d.ts +8 -0
- package/dist/compat/stream/legacy.js +105 -0
- package/dist/compat/stream/once.d.ts +7 -0
- package/dist/compat/stream/once.js +13 -0
- package/dist/compat/stream/pipeline.d.ts +5 -0
- package/dist/compat/stream/pipeline.js +567 -0
- package/dist/compat/stream/process.d.ts +1 -0
- package/dist/compat/stream/process.js +4 -0
- package/dist/compat/stream/promises.d.ts +7 -0
- package/dist/compat/stream/promises.js +60 -0
- package/dist/compat/stream/readable.d.ts +29 -0
- package/dist/compat/stream/readable.js +2267 -0
- package/dist/compat/stream/state.d.ts +8 -0
- package/dist/compat/stream/state.js +63 -0
- package/dist/compat/stream/transform.d.ts +2 -0
- package/dist/compat/stream/transform.js +202 -0
- package/dist/compat/stream/util.d.ts +55 -0
- package/dist/compat/stream/util.js +345 -0
- package/dist/compat/stream/validators.d.ts +2 -0
- package/dist/compat/stream/validators.js +14 -0
- package/dist/compat/stream/writable.d.ts +21 -0
- package/dist/compat/stream/writable.js +1325 -0
- package/dist/compat/stream-consumers/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/stream-consumers/LICENSE-APACHE +177 -0
- package/dist/compat/stream-consumers/index.d.ts +14 -0
- package/dist/compat/stream-consumers/index.js +62 -0
- package/dist/compat/stream-consumers/iterable.d.ts +1 -0
- package/dist/compat/stream-consumers/iterable.js +34 -0
- package/dist/compat/stream-duplex/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-duplex/LICENSE-APACHE +177 -0
- package/dist/compat/stream-duplex/index.cjs +3 -0
- package/dist/compat/stream-duplex/index.d.cts +2 -0
- package/dist/compat/stream-duplex/index.d.ts +3 -0
- package/dist/compat/stream-duplex/index.js +8 -0
- package/dist/compat/stream-passthrough/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-passthrough/LICENSE-APACHE +177 -0
- package/dist/compat/stream-passthrough/index.cjs +3 -0
- package/dist/compat/stream-passthrough/index.d.cts +2 -0
- package/dist/compat/stream-passthrough/index.d.ts +3 -0
- package/dist/compat/stream-passthrough/index.js +8 -0
- package/dist/compat/stream-promises/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-promises/LICENSE-APACHE +177 -0
- package/dist/compat/stream-promises/index.d.ts +1 -0
- package/dist/compat/stream-promises/index.js +1 -0
- package/dist/compat/stream-readable/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-readable/LICENSE-APACHE +177 -0
- package/dist/compat/stream-readable/index.cjs +3 -0
- package/dist/compat/stream-readable/index.d.cts +2 -0
- package/dist/compat/stream-readable/index.d.ts +3 -0
- package/dist/compat/stream-readable/index.js +8 -0
- package/dist/compat/stream-transform/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-transform/LICENSE-APACHE +177 -0
- package/dist/compat/stream-transform/index.cjs +3 -0
- package/dist/compat/stream-transform/index.d.cts +2 -0
- package/dist/compat/stream-transform/index.d.ts +3 -0
- package/dist/compat/stream-transform/index.js +8 -0
- package/dist/compat/stream-web/LICENSE-MIT +22 -0
- package/dist/compat/stream-web/NOTICE.md +3 -0
- package/dist/compat/stream-web/context.d.ts +2 -0
- package/dist/compat/stream-web/context.js +35 -0
- package/dist/compat/stream-web/index.d.ts +80 -0
- package/dist/compat/stream-web/index.js +129 -0
- package/dist/compat/stream-web/interop.d.ts +6 -0
- package/dist/compat/stream-web/interop.js +72 -0
- package/dist/compat/stream-web/ponyfill.d.ts +1 -0
- package/dist/compat/stream-web/ponyfill.js +2093 -0
- package/dist/compat/stream-web/runtime.d.ts +16 -0
- package/dist/compat/stream-web/runtime.js +51 -0
- package/dist/compat/stream-writable/LICENSE-3RD-PARTY.md +13 -0
- package/dist/compat/stream-writable/LICENSE-APACHE +177 -0
- package/dist/compat/stream-writable/index.cjs +3 -0
- package/dist/compat/stream-writable/index.d.cts +2 -0
- package/dist/compat/stream-writable/index.d.ts +3 -0
- package/dist/compat/stream-writable/index.js +8 -0
- package/dist/compat/string-decoder/LICENSE-3RD-PARTY.md +38 -0
- package/dist/compat/string-decoder/LICENSE-APACHE +177 -0
- package/dist/compat/string-decoder/index.d.ts +33 -0
- package/dist/compat/string-decoder/index.js +518 -0
- package/dist/compat/test/LICENSE-3RD-PARTY.md +37 -0
- package/dist/compat/test/LICENSE-APACHE +177 -0
- package/dist/compat/test/index.d.ts +9 -0
- package/dist/compat/test/index.js +11 -0
- package/dist/compat/test/mock.d.ts +103 -0
- package/dist/compat/test/mock.js +397 -0
- package/dist/compat/test/validators.d.ts +2 -0
- package/dist/compat/test/validators.js +14 -0
- package/dist/compat/timers/LICENSE-3RD-PARTY.md +7 -0
- package/dist/compat/timers/LICENSE-APACHE +177 -0
- package/dist/compat/timers/errors.d.ts +28 -0
- package/dist/compat/timers/errors.js +206 -0
- package/dist/compat/timers/host.d.ts +11 -0
- package/dist/compat/timers/host.js +60 -0
- package/dist/compat/timers/index.cjs +3 -0
- package/dist/compat/timers/index.d.cts +23 -0
- package/dist/compat/timers/index.d.ts +36 -0
- package/dist/compat/timers/index.js +20 -0
- package/dist/compat/timers/installation.d.ts +4 -0
- package/dist/compat/timers/installation.js +61 -0
- package/dist/compat/timers/internal-promises.d.ts +19 -0
- package/dist/compat/timers/internal-promises.js +173 -0
- package/dist/compat/timers/promises.cjs +2 -0
- package/dist/compat/timers/promises.d.cts +12 -0
- package/dist/compat/timers/promises.d.ts +14 -0
- package/dist/compat/timers/promises.js +3 -0
- package/dist/compat/timers/timers.d.ts +32 -0
- package/dist/compat/timers/timers.js +147 -0
- package/dist/compat/timers/validation.d.ts +5 -0
- package/dist/compat/timers/validation.js +22 -0
- package/dist/compat/timers/wait.d.ts +4 -0
- package/dist/compat/timers/wait.js +91 -0
- package/dist/compat/tls-common/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/tls-common/LICENSE-APACHE +177 -0
- package/dist/compat/tls-common/index.d.ts +14 -0
- package/dist/compat/tls-common/index.js +88 -0
- package/dist/compat/trace-events/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/trace-events/LICENSE-APACHE +177 -0
- package/dist/compat/trace-events/index.d.ts +18 -0
- package/dist/compat/trace-events/index.js +88 -0
- package/dist/compat/tty/LICENSE-3RD-PARTY.md +8 -0
- package/dist/compat/tty/LICENSE-APACHE +177 -0
- package/dist/compat/tty/index.d.ts +17 -0
- package/dist/compat/tty/index.js +101 -0
- package/dist/compat/url/LICENSE-3RD-PARTY.md +63 -0
- package/dist/compat/url/LICENSE-ADA +18 -0
- package/dist/compat/url/LICENSE-APACHE +177 -0
- package/dist/compat/url/LICENSE-UNICODE +39 -0
- package/dist/compat/url/LICENSE-WHATWG-URL +21 -0
- package/dist/compat/url/brand.d.ts +4 -0
- package/dist/compat/url/brand.js +10 -0
- package/dist/compat/url/constants.d.ts +27 -0
- package/dist/compat/url/constants.js +28 -0
- package/dist/compat/url/errors.d.ts +44 -0
- package/dist/compat/url/errors.js +248 -0
- package/dist/compat/url/idna-data.d.ts +3958 -0
- package/dist/compat/url/idna-data.js +22 -0
- package/dist/compat/url/idna.d.ts +9 -0
- package/dist/compat/url/idna.js +47 -0
- package/dist/compat/url/index.d.ts +48 -0
- package/dist/compat/url/index.js +39 -0
- package/dist/compat/url/installation.d.ts +4 -0
- package/dist/compat/url/installation.js +61 -0
- package/dist/compat/url/internal-url.d.ts +34 -0
- package/dist/compat/url/internal-url.js +264 -0
- package/dist/compat/url/legacy-url.d.ts +28 -0
- package/dist/compat/url/legacy-url.js +870 -0
- package/dist/compat/url/parser-platform.d.ts +3 -0
- package/dist/compat/url/parser-platform.js +26 -0
- package/dist/compat/url/standard-url.d.ts +2 -0
- package/dist/compat/url/standard-url.js +3189 -0
- package/dist/compat/url/unicode.d.ts +2 -0
- package/dist/compat/url/unicode.js +119 -0
- package/dist/compat/url/validation.d.ts +2 -0
- package/dist/compat/url/validation.js +9 -0
- package/dist/compat/url/web-url.d.ts +27 -0
- package/dist/compat/url/web-url.js +119 -0
- package/dist/compat/util/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/util/LICENSE-APACHE +177 -0
- package/dist/compat/util/additional.d.ts +11 -0
- package/dist/compat/util/additional.js +121 -0
- package/dist/compat/util/comparison-types.d.ts +16 -0
- package/dist/compat/util/comparison-types.js +50 -0
- package/dist/compat/util/comparisons.d.ts +1 -0
- package/dist/compat/util/comparisons.js +527 -0
- package/dist/compat/util/core.d.ts +18 -0
- package/dist/compat/util/core.js +265 -0
- package/dist/compat/util/debuglog.d.ts +1 -0
- package/dist/compat/util/debuglog.js +78 -0
- package/dist/compat/util/index.d.ts +35 -0
- package/dist/compat/util/index.js +77 -0
- package/dist/compat/util/inspect-binding.d.ts +13 -0
- package/dist/compat/util/inspect-binding.js +39 -0
- package/dist/compat/util/inspect-types.d.ts +13 -0
- package/dist/compat/util/inspect-types.js +30 -0
- package/dist/compat/util/inspect.d.ts +152 -0
- package/dist/compat/util/inspect.js +2503 -0
- package/dist/compat/util/mime.d.ts +24 -0
- package/dist/compat/util/mime.js +284 -0
- package/dist/compat/util/properties.d.ts +9 -0
- package/dist/compat/util/properties.js +76 -0
- package/dist/compat/v8/LICENSE-3RD-PARTY.md +6 -0
- package/dist/compat/v8/LICENSE-APACHE +177 -0
- package/dist/compat/v8/errors.d.ts +5 -0
- package/dist/compat/v8/errors.js +7 -0
- package/dist/compat/v8/index.d.ts +106 -0
- package/dist/compat/v8/index.js +280 -0
- package/dist/compat/vm/LICENSE-3RD-PARTY.md +39 -0
- package/dist/compat/vm/LICENSE-APACHE +177 -0
- package/dist/compat/vm/errors.d.ts +5 -0
- package/dist/compat/vm/errors.js +7 -0
- package/dist/compat/vm/index.d.ts +47 -0
- package/dist/compat/vm/index.js +231 -0
- package/dist/compat/vm/validation.d.ts +3 -0
- package/dist/compat/vm/validation.js +14 -0
- package/dist/compat/wasi/LICENSE-3RD-PARTY.md +8 -0
- package/dist/compat/wasi/LICENSE-APACHE +177 -0
- package/dist/compat/wasi/errors.d.ts +4 -0
- package/dist/compat/wasi/errors.js +6 -0
- package/dist/compat/wasi/index.d.ts +15 -0
- package/dist/compat/wasi/index.js +44 -0
- package/dist/compat/worker-threads/LICENSE-3RD-PARTY.md +5 -0
- package/dist/compat/worker-threads/LICENSE-APACHE +177 -0
- package/dist/compat/worker-threads/errors.d.ts +4 -0
- package/dist/compat/worker-threads/errors.js +6 -0
- package/dist/compat/worker-threads/index.d.ts +71 -0
- package/dist/compat/worker-threads/index.js +138 -0
- package/dist/compat/worker-threads/message-channel.d.ts +18 -0
- package/dist/compat/worker-threads/message-channel.js +157 -0
- package/dist/configured.d.ts +3 -0
- package/dist/configured.js +4 -0
- package/dist/environment.d.ts +4 -0
- package/dist/environment.js +18 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +107 -0
- package/dist/ios.d.ts +2 -0
- package/dist/ios.js +1 -0
- package/dist/native-entry.d.ts +8 -0
- package/dist/native-entry.js +67 -0
- package/dist/shared/brotli/LICENSE-APACHE +201 -0
- package/dist/shared/brotli/LICENSE-MIT +9 -0
- package/dist/shared/brotli/NOTICE +3 -0
- package/dist/shared/brotli/index.d.ts +2 -0
- package/dist/shared/brotli/index.js +288 -0
- package/dist/shared/contracts/index.d.ts +42 -0
- package/dist/shared/contracts/index.js +88 -0
- package/dist/shared/contracts/testing.d.ts +22 -0
- package/dist/shared/contracts/testing.js +57 -0
- package/dist/shared/globals/index.d.ts +3 -0
- package/dist/shared/globals/index.js +87 -0
- package/dist/shared/globals/inject.d.ts +2 -0
- package/dist/shared/globals/inject.js +3 -0
- package/dist/shared/globals/install.d.ts +1 -0
- package/dist/shared/globals/install.js +15 -0
- package/dist/shared/globals/node-install.d.ts +1 -0
- package/dist/shared/globals/node-install.js +4 -0
- package/dist/shared/globals/platform.d.ts +104 -0
- package/dist/shared/globals/platform.js +37 -0
- package/dist/shared/globals/runtime.d.ts +6 -0
- package/dist/shared/globals/runtime.js +8 -0
- package/dist/shared/globals/symbols.d.ts +4 -0
- package/dist/shared/globals/symbols.js +35 -0
- package/dist/shared/globals/web.d.ts +4 -0
- package/dist/shared/globals/web.js +108 -0
- package/dist/shared/http-wire/LICENSE.llhttp +22 -0
- package/dist/shared/http-wire/LICENSE.undici +21 -0
- package/dist/shared/http-wire/NOTICE.md +14 -0
- package/dist/shared/http-wire/index.d.ts +27 -0
- package/dist/shared/http-wire/index.js +132 -0
- package/dist/shared/http-wire/wasm.d.ts +2 -0
- package/dist/shared/http-wire/wasm.js +2 -0
- package/dist/tooling/async.d.ts +7 -0
- package/dist/tooling/async.js +99 -0
- package/dist/tooling/build-isolation.d.ts +4 -0
- package/dist/tooling/build-isolation.js +34 -0
- package/dist/tooling/documents.d.ts +7 -0
- package/dist/tooling/documents.js +26 -0
- package/dist/tooling/esbuild.d.ts +15 -0
- package/dist/tooling/esbuild.js +193 -0
- package/dist/tooling/files.d.ts +2 -0
- package/dist/tooling/files.js +18 -0
- package/dist/tooling/opennext/build.d.ts +1 -0
- package/dist/tooling/opennext/build.js +121 -0
- package/dist/tooling/opennext/index.d.ts +3 -0
- package/dist/tooling/opennext/index.js +213 -0
- package/dist/tooling/opennext/plan.d.ts +9 -0
- package/dist/tooling/opennext/plan.js +36 -0
- package/dist/tooling/opennext/safety.d.ts +4 -0
- package/dist/tooling/opennext/safety.js +36 -0
- package/dist/tooling/route-permissions.d.ts +3 -0
- package/dist/tooling/route-permissions.js +15 -0
- package/dist/tooling/server-modules.d.ts +30 -0
- package/dist/tooling/server-modules.js +98 -0
- package/dist/tooling/server-only-html.d.ts +1 -0
- package/dist/tooling/server-only-html.js +66 -0
- package/dist/tooling/server-only.d.ts +6 -0
- package/dist/tooling/server-only.js +53 -0
- package/dist/tooling/server.d.ts +25 -0
- package/dist/tooling/server.js +981 -0
- package/dist/tooling/shared.d.ts +13 -0
- package/dist/tooling/shared.js +130 -0
- package/dist/tooling/vite.d.ts +18 -0
- package/dist/tooling/vite.js +448 -0
- package/dist/tooling/void/index.d.ts +3 -0
- package/dist/tooling/void/index.js +205 -0
- package/dist/tooling/void/plan.d.ts +17 -0
- package/dist/tooling/void/plan.js +288 -0
- package/native/android/build.gradle +68 -0
- package/native/android/consumer-rules.pro +2 -0
- package/native/android/src/main/AndroidManifest.xml +6 -0
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkerSockets.java +202 -0
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersCapacitorPlugin.java +256 -0
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersNative.java +22 -0
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersNativeActivity.java +178 -0
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersNativeBridge.java +45 -0
- package/native/ios/DocumentBridge.swift +330 -0
- package/native/ios/NetworkBridge.swift +51 -0
- package/native/ios/SocketBridge.swift +180 -0
- package/native/ios/WorkersCapacitorPlugin.swift +152 -0
- package/native/ios-host/WorkersView.swift +194 -0
- package/package.json +154 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const nop: () => void;
|
|
2
|
+
type EOSOptions = {
|
|
3
|
+
cleanup?: boolean;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
readable?: boolean;
|
|
6
|
+
writable?: boolean;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
};
|
|
9
|
+
type Callback = (...args: unknown[]) => void;
|
|
10
|
+
export declare function eos(stream: Readable | Writable | Transform, options: EOSOptions, callback: Callback): Callback;
|
|
11
|
+
export declare namespace eos {
|
|
12
|
+
export { finished };
|
|
13
|
+
}
|
|
14
|
+
export declare function eos(options: EOSOptions, callback: Callback): Callback;
|
|
15
|
+
export declare function finished(stream: Readable | Writable, opts?: EOSOptions): Promise<void>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { dispose } from "../../shared/globals/symbols.js";
|
|
3
|
+
import { nextTick } from "./process.js";
|
|
4
|
+
import { AbortError, ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE, ERR_WEB_STREAM_INTEROP_UNSUPPORTED, } from "./errors.js";
|
|
5
|
+
import { once } from "./once.js";
|
|
6
|
+
import { validateAbortSignal, validateFunction, validateObject, validateBoolean, } from "./validators.js";
|
|
7
|
+
import { isClosed, isReadable, isReadableNodeStream, isReadableStream, isReadableFinished, isReadableErrored, isWritable, isWritableNodeStream, isWritableStream, isWritableFinished, isWritableErrored, isNodeStream, willEmitClose as _willEmitClose, kIsClosedPromise, isOutgoingMessage, } from "./util.js";
|
|
8
|
+
import { addAbortListener } from "./events.js";
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
10
|
+
function isRequest(stream) {
|
|
11
|
+
return "setHeader" in stream && typeof stream.abort === "function";
|
|
12
|
+
}
|
|
13
|
+
export const nop = () => { };
|
|
14
|
+
export function eos(stream, options, callback) {
|
|
15
|
+
if (arguments.length === 2) {
|
|
16
|
+
// @ts-expect-error TS2322 Supports overloads
|
|
17
|
+
callback = options;
|
|
18
|
+
options = {};
|
|
19
|
+
}
|
|
20
|
+
else if (options == null) {
|
|
21
|
+
options = {};
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
validateObject(options, "options");
|
|
25
|
+
}
|
|
26
|
+
validateFunction(callback, "callback");
|
|
27
|
+
validateAbortSignal(options.signal, "options.signal");
|
|
28
|
+
// Avoid AsyncResource.bind() because it calls Object.defineProperties which
|
|
29
|
+
// is a bottleneck here.
|
|
30
|
+
callback = once(callback);
|
|
31
|
+
if (isReadableStream(stream) || isWritableStream(stream)) {
|
|
32
|
+
return eosWeb(stream, options, callback);
|
|
33
|
+
}
|
|
34
|
+
if (!isNodeStream(stream)) {
|
|
35
|
+
throw new ERR_INVALID_ARG_TYPE("stream", ["ReadableStream", "WritableStream", "Stream"], stream);
|
|
36
|
+
}
|
|
37
|
+
// An http OutgoingMessage (a ClientRequest, a ServerResponse) counts as
|
|
38
|
+
// readable as well as writable, as Node's does — Node's is a legacy
|
|
39
|
+
// Stream without a _writableState: 'finish' alone does not finish it,
|
|
40
|
+
// its 'close' (the end of the exchange) does — so finished() on a request
|
|
41
|
+
// reports the response's end, and addAbortSignal() stays armed for the
|
|
42
|
+
// whole exchange. Ours is a Writable, told apart by its own state fields,
|
|
43
|
+
// not by shape: a plain Writable carrying a setHeader() is a writable.
|
|
44
|
+
const readable = options.readable ??
|
|
45
|
+
(isOutgoingMessage(stream) || isReadableNodeStream(stream));
|
|
46
|
+
const writable = options.writable ?? isWritableNodeStream(stream);
|
|
47
|
+
const wState = stream._writableState;
|
|
48
|
+
const rState = stream._readableState;
|
|
49
|
+
// Extract req as EventEmitter to avoid union type incompatibility with on/removeListener
|
|
50
|
+
const req = stream.req;
|
|
51
|
+
const onlegacyfinish = () => {
|
|
52
|
+
if (!stream.writable) {
|
|
53
|
+
onfinish();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
// TODO (ronag): Improve soft detection to include core modules and
|
|
57
|
+
// common ecosystem modules that do properly emit 'close' but fail
|
|
58
|
+
// this generic check.
|
|
59
|
+
let willEmitClose = _willEmitClose(stream) &&
|
|
60
|
+
isReadableNodeStream(stream) === readable &&
|
|
61
|
+
isWritableNodeStream(stream) === writable;
|
|
62
|
+
let writableFinished = isWritableFinished(stream, false);
|
|
63
|
+
const onfinish = () => {
|
|
64
|
+
writableFinished = true;
|
|
65
|
+
// Stream should not be destroyed here. If it is that
|
|
66
|
+
// means that user space is doing something differently and
|
|
67
|
+
// we cannot trust willEmitClose.
|
|
68
|
+
if (stream.destroyed) {
|
|
69
|
+
willEmitClose = false;
|
|
70
|
+
}
|
|
71
|
+
if (willEmitClose && (!stream.readable || readable)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!readable || readableFinished) {
|
|
75
|
+
callback?.call(stream);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
let readableFinished = isReadableFinished(stream, false);
|
|
79
|
+
const onend = () => {
|
|
80
|
+
readableFinished = true;
|
|
81
|
+
// Stream should not be destroyed here. If it is that
|
|
82
|
+
// means that user space is doing something differently and
|
|
83
|
+
// we cannot trust willEmitClose.
|
|
84
|
+
if (stream.destroyed) {
|
|
85
|
+
willEmitClose = false;
|
|
86
|
+
}
|
|
87
|
+
if (willEmitClose && (!stream.writable || writable)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!writable || writableFinished) {
|
|
91
|
+
callback?.call(stream);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const onerror = (err) => {
|
|
95
|
+
callback?.call(stream, err);
|
|
96
|
+
};
|
|
97
|
+
let closed = isClosed(stream);
|
|
98
|
+
const onclose = () => {
|
|
99
|
+
closed = true;
|
|
100
|
+
const errored = isWritableErrored(stream) || isReadableErrored(stream);
|
|
101
|
+
if (errored && typeof errored !== "boolean") {
|
|
102
|
+
return callback?.call(stream, errored);
|
|
103
|
+
}
|
|
104
|
+
if (readable && !readableFinished && isReadableNodeStream(stream, true)) {
|
|
105
|
+
if (!isReadableFinished(stream, false))
|
|
106
|
+
return callback?.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
|
107
|
+
}
|
|
108
|
+
if (writable && !writableFinished) {
|
|
109
|
+
if (!isWritableFinished(stream, false))
|
|
110
|
+
return callback?.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
|
111
|
+
}
|
|
112
|
+
callback?.call(stream);
|
|
113
|
+
};
|
|
114
|
+
const onclosed = () => {
|
|
115
|
+
closed = true;
|
|
116
|
+
const errored = isWritableErrored(stream) || isReadableErrored(stream);
|
|
117
|
+
if (errored && typeof errored !== "boolean") {
|
|
118
|
+
callback?.call(stream, errored);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
callback?.call(stream);
|
|
122
|
+
};
|
|
123
|
+
const onrequest = () => {
|
|
124
|
+
req?.on("finish", onfinish);
|
|
125
|
+
};
|
|
126
|
+
if (isRequest(stream)) {
|
|
127
|
+
stream.on("complete", onfinish);
|
|
128
|
+
if (!willEmitClose) {
|
|
129
|
+
stream.on("abort", onclose);
|
|
130
|
+
}
|
|
131
|
+
if (stream.req) {
|
|
132
|
+
onrequest();
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
stream.on("request", onrequest);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else if (writable && !wState) {
|
|
139
|
+
// legacy streams
|
|
140
|
+
stream.on("end", onlegacyfinish);
|
|
141
|
+
stream.on("close", onlegacyfinish);
|
|
142
|
+
}
|
|
143
|
+
// Not all streams will emit 'close' after 'aborted'.
|
|
144
|
+
if (!willEmitClose &&
|
|
145
|
+
"aborted" in stream &&
|
|
146
|
+
typeof stream.aborted === "boolean") {
|
|
147
|
+
stream.on("aborted", onclose);
|
|
148
|
+
}
|
|
149
|
+
stream.on("end", onend);
|
|
150
|
+
stream.on("finish", onfinish);
|
|
151
|
+
if (options.error !== false) {
|
|
152
|
+
stream.on("error", onerror);
|
|
153
|
+
}
|
|
154
|
+
stream.on("close", onclose);
|
|
155
|
+
if (closed) {
|
|
156
|
+
nextTick(onclose);
|
|
157
|
+
}
|
|
158
|
+
else if (wState?.errorEmitted || rState?.errorEmitted) {
|
|
159
|
+
if (!willEmitClose) {
|
|
160
|
+
nextTick(onclosed);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (!readable &&
|
|
164
|
+
(!willEmitClose || isReadable(stream)) &&
|
|
165
|
+
(writableFinished || isWritable(stream) === false) &&
|
|
166
|
+
(wState == null || wState.pendingcb === undefined || wState.pendingcb === 0)) {
|
|
167
|
+
nextTick(onclosed);
|
|
168
|
+
}
|
|
169
|
+
else if (!writable &&
|
|
170
|
+
(!willEmitClose || isWritable(stream)) &&
|
|
171
|
+
(readableFinished || isReadable(stream) === false)) {
|
|
172
|
+
nextTick(onclosed);
|
|
173
|
+
}
|
|
174
|
+
else if (rState && stream.req && stream.aborted) {
|
|
175
|
+
nextTick(onclosed);
|
|
176
|
+
}
|
|
177
|
+
const cleanup = () => {
|
|
178
|
+
callback = nop;
|
|
179
|
+
stream.removeListener("aborted", onclose);
|
|
180
|
+
stream.removeListener("complete", onfinish);
|
|
181
|
+
stream.removeListener("abort", onclose);
|
|
182
|
+
stream.removeListener("request", onrequest);
|
|
183
|
+
req?.removeListener("finish", onfinish);
|
|
184
|
+
stream.removeListener("end", onlegacyfinish);
|
|
185
|
+
stream.removeListener("close", onlegacyfinish);
|
|
186
|
+
stream.removeListener("finish", onfinish);
|
|
187
|
+
stream.removeListener("end", onend);
|
|
188
|
+
stream.removeListener("error", onerror);
|
|
189
|
+
stream.removeListener("close", onclose);
|
|
190
|
+
};
|
|
191
|
+
if (options.signal && !closed) {
|
|
192
|
+
const abort = () => {
|
|
193
|
+
// Keep it because cleanup removes it.
|
|
194
|
+
const endCallback = callback;
|
|
195
|
+
cleanup();
|
|
196
|
+
endCallback?.call(stream, new AbortError(undefined, {
|
|
197
|
+
cause: options.signal?.reason,
|
|
198
|
+
}));
|
|
199
|
+
};
|
|
200
|
+
if (options.signal?.aborted) {
|
|
201
|
+
nextTick(abort);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const disposable = addAbortListener(options.signal, abort);
|
|
205
|
+
const originalCallback = callback;
|
|
206
|
+
callback = once((...args) => {
|
|
207
|
+
disposable[dispose]();
|
|
208
|
+
originalCallback.apply(stream, args);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return cleanup;
|
|
213
|
+
}
|
|
214
|
+
function eosWeb(stream, options, callback) {
|
|
215
|
+
const closed = stream[kIsClosedPromise];
|
|
216
|
+
if (closed === undefined) {
|
|
217
|
+
throw new ERR_WEB_STREAM_INTEROP_UNSUPPORTED("finished()");
|
|
218
|
+
}
|
|
219
|
+
let isAborted = false;
|
|
220
|
+
let abort = nop;
|
|
221
|
+
if (options.signal) {
|
|
222
|
+
abort = () => {
|
|
223
|
+
isAborted = true;
|
|
224
|
+
callback.call(stream, new AbortError(undefined, { cause: options.signal?.reason }));
|
|
225
|
+
};
|
|
226
|
+
if (options.signal.aborted) {
|
|
227
|
+
nextTick(abort);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
const disposable = addAbortListener(options.signal, abort);
|
|
231
|
+
const originalCallback = callback;
|
|
232
|
+
callback = once((...args) => {
|
|
233
|
+
disposable[dispose]();
|
|
234
|
+
originalCallback.apply(stream, args);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const resolverFn = (...args) => {
|
|
239
|
+
if (!isAborted) {
|
|
240
|
+
nextTick(() => {
|
|
241
|
+
callback.apply(stream, args);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
closed.promise.then(resolverFn, resolverFn);
|
|
246
|
+
return nop;
|
|
247
|
+
}
|
|
248
|
+
export function finished(stream, opts = {}) {
|
|
249
|
+
let autoCleanup = false;
|
|
250
|
+
if (opts.cleanup) {
|
|
251
|
+
validateBoolean(opts.cleanup, "cleanup");
|
|
252
|
+
autoCleanup = opts.cleanup;
|
|
253
|
+
}
|
|
254
|
+
return new Promise((resolve, reject) => {
|
|
255
|
+
const cleanup = eos(stream, opts, (err) => {
|
|
256
|
+
if (autoCleanup) {
|
|
257
|
+
cleanup();
|
|
258
|
+
}
|
|
259
|
+
if (err) {
|
|
260
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
261
|
+
reject(err);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
resolve();
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
eos.finished = finished;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NodeError, NodeTypeError } from "../net/errors.js";
|
|
2
|
+
export { AbortError, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE, } from "../net/errors.js";
|
|
3
|
+
export { ERR_INVALID_RETURN_VALUE } from "../assert/errors.js";
|
|
4
|
+
export declare class ERR_METHOD_NOT_IMPLEMENTED extends NodeError {
|
|
5
|
+
constructor(name: string | symbol);
|
|
6
|
+
}
|
|
7
|
+
export declare class ERR_MULTIPLE_CALLBACK extends NodeError {
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
export declare class ERR_STREAM_ALREADY_FINISHED extends NodeError {
|
|
11
|
+
constructor(name: string | symbol);
|
|
12
|
+
}
|
|
13
|
+
export declare class ERR_STREAM_CANNOT_PIPE extends NodeError {
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare class ERR_STREAM_DESTROYED extends NodeError {
|
|
17
|
+
constructor(name: string | symbol);
|
|
18
|
+
}
|
|
19
|
+
export declare class ERR_STREAM_NULL_VALUES extends NodeTypeError {
|
|
20
|
+
constructor();
|
|
21
|
+
}
|
|
22
|
+
export declare class ERR_STREAM_PREMATURE_CLOSE extends NodeTypeError {
|
|
23
|
+
constructor();
|
|
24
|
+
}
|
|
25
|
+
export declare class ERR_STREAM_PUSH_AFTER_EOF extends NodeError {
|
|
26
|
+
constructor();
|
|
27
|
+
}
|
|
28
|
+
export declare class ERR_STREAM_UNSHIFT_AFTER_END_EVENT extends NodeError {
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
|
31
|
+
export declare class ERR_STREAM_WRITE_AFTER_END extends NodeError {
|
|
32
|
+
constructor();
|
|
33
|
+
}
|
|
34
|
+
export declare class ERR_UNKNOWN_ENCODING extends NodeTypeError {
|
|
35
|
+
constructor(x: string);
|
|
36
|
+
}
|
|
37
|
+
export declare class ERR_WEB_STREAM_INTEROP_UNSUPPORTED extends NodeTypeError {
|
|
38
|
+
constructor(api: string);
|
|
39
|
+
}
|
|
40
|
+
export declare function aggregateTwoErrors(innerError: unknown, outerError: Error | null | undefined): AggregateError;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { NodeError, NodeTypeError } from "../net/errors.js";
|
|
3
|
+
export { AbortError, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE, } from "../net/errors.js";
|
|
4
|
+
export { ERR_INVALID_RETURN_VALUE } from "../assert/errors.js";
|
|
5
|
+
export class ERR_METHOD_NOT_IMPLEMENTED extends NodeError {
|
|
6
|
+
constructor(name) {
|
|
7
|
+
if (typeof name === "symbol") {
|
|
8
|
+
name = name.description;
|
|
9
|
+
}
|
|
10
|
+
super("ERR_METHOD_NOT_IMPLEMENTED", `The ${name} method is not implemented`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class ERR_MULTIPLE_CALLBACK extends NodeError {
|
|
14
|
+
constructor() {
|
|
15
|
+
super("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export class ERR_STREAM_ALREADY_FINISHED extends NodeError {
|
|
19
|
+
constructor(name) {
|
|
20
|
+
if (typeof name === "symbol") {
|
|
21
|
+
name = name.description;
|
|
22
|
+
}
|
|
23
|
+
super("ERR_STREAM_ALREADY_FINISHED", `Cannot call ${name} after a stream was finished`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class ERR_STREAM_CANNOT_PIPE extends NodeError {
|
|
27
|
+
constructor() {
|
|
28
|
+
super("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export class ERR_STREAM_DESTROYED extends NodeError {
|
|
32
|
+
constructor(name) {
|
|
33
|
+
if (typeof name === "symbol") {
|
|
34
|
+
name = name.description;
|
|
35
|
+
}
|
|
36
|
+
super("ERR_STREAM_DESTROYED", `Cannot call ${name} after a stream was destroyed`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class ERR_STREAM_NULL_VALUES extends NodeTypeError {
|
|
40
|
+
constructor() {
|
|
41
|
+
super("ERR_STREAM_NULL_VALUES", "May not write null values to stream");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class ERR_STREAM_PREMATURE_CLOSE extends NodeTypeError {
|
|
45
|
+
constructor() {
|
|
46
|
+
super("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class ERR_STREAM_PUSH_AFTER_EOF extends NodeError {
|
|
50
|
+
constructor() {
|
|
51
|
+
super("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class ERR_STREAM_UNSHIFT_AFTER_END_EVENT extends NodeError {
|
|
55
|
+
constructor() {
|
|
56
|
+
super("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export class ERR_STREAM_WRITE_AFTER_END extends NodeError {
|
|
60
|
+
constructor() {
|
|
61
|
+
super("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class ERR_UNKNOWN_ENCODING extends NodeTypeError {
|
|
65
|
+
constructor(x) {
|
|
66
|
+
super("ERR_UNKNOWN_ENCODING", `Unknown encoding: ${x}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export class ERR_WEB_STREAM_INTEROP_UNSUPPORTED extends NodeTypeError {
|
|
70
|
+
constructor(api) {
|
|
71
|
+
super("ERR_WEB_STREAM_INTEROP_UNSUPPORTED", `${api} is not supported for web streams by the streams implementation in use`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export function aggregateTwoErrors(innerError, outerError) {
|
|
75
|
+
if (innerError && outerError && innerError !== outerError) {
|
|
76
|
+
if ("errors" in outerError && Array.isArray(outerError.errors)) {
|
|
77
|
+
// If `outerError` is already an `AggregateError`.
|
|
78
|
+
outerError.errors.push(innerError);
|
|
79
|
+
return outerError;
|
|
80
|
+
}
|
|
81
|
+
const err = new AggregateError([outerError, innerError], outerError.message);
|
|
82
|
+
err.code = outerError.code;
|
|
83
|
+
return err;
|
|
84
|
+
}
|
|
85
|
+
return (innerError || outerError);
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
export { EventEmitter } from "node:events";
|
|
3
|
+
import { dispose } from "../../shared/globals/symbols.js";
|
|
4
|
+
import { ERR_INVALID_ARG_TYPE } from "../net/errors.js";
|
|
5
|
+
import { validateAbortSignal, validateFunction } from "../net/validators.js";
|
|
6
|
+
export function addAbortListener(signal, listener) {
|
|
7
|
+
if (signal === undefined) {
|
|
8
|
+
throw new ERR_INVALID_ARG_TYPE("signal", "AbortSignal", signal);
|
|
9
|
+
}
|
|
10
|
+
validateAbortSignal(signal, "signal");
|
|
11
|
+
validateFunction(listener, "listener");
|
|
12
|
+
let removeEventListener;
|
|
13
|
+
if (signal.aborted) {
|
|
14
|
+
queueMicrotask(() => listener());
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
signal.addEventListener("abort", listener, { once: true });
|
|
18
|
+
removeEventListener = () => {
|
|
19
|
+
signal.removeEventListener("abort", listener);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
__proto__: null,
|
|
24
|
+
[dispose]() {
|
|
25
|
+
removeEventListener?.();
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Preserve the callable CommonJS Stream export.
|
|
3
|
+
const api = require("./index.js").default;
|
|
4
|
+
module.exports = api;
|
|
5
|
+
module.exports.addAbortSignal = api.addAbortSignal;
|
|
6
|
+
module.exports.compose = api.compose;
|
|
7
|
+
module.exports.destroy = api.destroy;
|
|
8
|
+
module.exports.finished = api.finished;
|
|
9
|
+
module.exports.isReadable = api.isReadable;
|
|
10
|
+
module.exports.isWritable = api.isWritable;
|
|
11
|
+
module.exports.isErrored = api.isErrored;
|
|
12
|
+
module.exports.isDisturbed = api.isDisturbed;
|
|
13
|
+
module.exports.pipeline = api.pipeline;
|
|
14
|
+
module.exports.Stream = api.Stream;
|
|
15
|
+
module.exports.Writable = api.Writable;
|
|
16
|
+
module.exports.Readable = api.Readable;
|
|
17
|
+
module.exports.Duplex = api.Duplex;
|
|
18
|
+
module.exports.Transform = api.Transform;
|
|
19
|
+
module.exports.PassThrough = api.PassThrough;
|
|
20
|
+
module.exports.promises = api.promises;
|
|
21
|
+
module.exports.getDefaultHighWaterMark = api.getDefaultHighWaterMark;
|
|
22
|
+
module.exports.setDefaultHighWaterMark = api.setDefaultHighWaterMark;
|
|
23
|
+
module.exports.isDestroyed = api.isDestroyed;
|
|
24
|
+
module.exports.duplexPair = api.duplexPair;
|
|
25
|
+
module.exports._isArrayBufferView = api._isArrayBufferView;
|
|
26
|
+
module.exports._isUint8Array = api._isUint8Array;
|
|
27
|
+
module.exports._uint8ArrayToBuffer = api._uint8ArrayToBuffer;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export = api;
|
|
2
|
+
export declare var addAbortSignal: any;
|
|
3
|
+
export declare var compose: any;
|
|
4
|
+
export declare var destroy: any;
|
|
5
|
+
export declare var finished: any;
|
|
6
|
+
export declare var isReadable: any;
|
|
7
|
+
export declare var isWritable: any;
|
|
8
|
+
export declare var isErrored: any;
|
|
9
|
+
export declare var isDisturbed: any;
|
|
10
|
+
export declare var pipeline: any;
|
|
11
|
+
export declare var Stream: typeof import("./legacy.js").Stream;
|
|
12
|
+
export declare var Writable: any;
|
|
13
|
+
export declare var Readable: any;
|
|
14
|
+
export declare var Duplex: any;
|
|
15
|
+
export declare var Transform: any;
|
|
16
|
+
export declare var PassThrough: any;
|
|
17
|
+
export declare var promises: any;
|
|
18
|
+
export declare var getDefaultHighWaterMark: any;
|
|
19
|
+
export declare var setDefaultHighWaterMark: any;
|
|
20
|
+
export declare var isDestroyed: any;
|
|
21
|
+
export declare var duplexPair: any;
|
|
22
|
+
export declare var _isArrayBufferView: (value: any) => value is ArrayBufferView<ArrayBufferLike>;
|
|
23
|
+
export declare var _isUint8Array: (value: any) => value is Uint8Array<ArrayBufferLike>;
|
|
24
|
+
export declare var _uint8ArrayToBuffer: (chunk: any) => Buffer<any>;
|
|
25
|
+
declare const api: typeof import("./legacy.js").Stream;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { pipeline } from "./pipeline.js";
|
|
2
|
+
import { addAbortSignal } from "./add-abort-signal.js";
|
|
3
|
+
import { eos } from "./end-of-stream.js";
|
|
4
|
+
import { isErrored, isDisturbed, isDestroyed, isReadable, isWritable } from "./util.js";
|
|
5
|
+
import { destroyer } from "./destroy.js";
|
|
6
|
+
import { getDefaultHighWaterMark, setDefaultHighWaterMark } from "./state.js";
|
|
7
|
+
import { compose } from "./compose.js";
|
|
8
|
+
import { Stream } from "./legacy.js";
|
|
9
|
+
import { Writable } from "./writable.js";
|
|
10
|
+
import { Readable } from "./readable.js";
|
|
11
|
+
import { Duplex, duplexPair } from "./duplex.js";
|
|
12
|
+
import { Transform, PassThrough } from "./transform.js";
|
|
13
|
+
import { promises } from "./promises.js";
|
|
14
|
+
export declare const _isArrayBufferView: (value: any) => value is ArrayBufferView<ArrayBufferLike>;
|
|
15
|
+
export declare const _isUint8Array: (value: any) => value is Uint8Array<ArrayBufferLike>;
|
|
16
|
+
export declare const _uint8ArrayToBuffer: (chunk: any) => Buffer<any>;
|
|
17
|
+
declare const destroy: typeof destroyer;
|
|
18
|
+
declare const finished: typeof eos;
|
|
19
|
+
export { addAbortSignal, compose, destroy, finished, isErrored, isDisturbed, isReadable, pipeline, Stream, Writable, Readable, Duplex, Transform, PassThrough, promises, getDefaultHighWaterMark, setDefaultHighWaterMark, isDestroyed, isWritable, duplexPair, };
|
|
20
|
+
export default Stream;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// Copyright (c) 2017-2022 Cloudflare, Inc.
|
|
3
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
5
|
+
//
|
|
6
|
+
import { pipeline } from "./pipeline.js";
|
|
7
|
+
import { addAbortSignal } from "./add-abort-signal.js";
|
|
8
|
+
import { eos } from "./end-of-stream.js";
|
|
9
|
+
import { isErrored, isDisturbed, isDestroyed, isReadable, isWritable, } from "./util.js";
|
|
10
|
+
import { destroyer } from "./destroy.js";
|
|
11
|
+
import { getDefaultHighWaterMark, setDefaultHighWaterMark } from "./state.js";
|
|
12
|
+
import { compose } from "./compose.js";
|
|
13
|
+
import { Stream } from "./legacy.js";
|
|
14
|
+
import { Writable } from "./writable.js";
|
|
15
|
+
import { Readable } from "./readable.js";
|
|
16
|
+
import { Duplex, duplexPair } from "./duplex.js";
|
|
17
|
+
import { Transform, PassThrough } from "./transform.js";
|
|
18
|
+
import { promises } from "./promises.js";
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
20
|
+
export const _isArrayBufferView = Stream._isArrayBufferView;
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
22
|
+
export const _isUint8Array = Stream._isUint8Array;
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
24
|
+
export const _uint8ArrayToBuffer = Stream._uint8ArrayToBuffer;
|
|
25
|
+
const destroy = destroyer;
|
|
26
|
+
const finished = eos;
|
|
27
|
+
export { addAbortSignal, compose, destroy, finished, isErrored, isDisturbed, isReadable, pipeline, Stream, Writable, Readable, Duplex, Transform, PassThrough, promises, getDefaultHighWaterMark, setDefaultHighWaterMark, isDestroyed, isWritable, duplexPair, };
|
|
28
|
+
// @ts-expect-error TS2322 Type incompatibility between internal and Node.js stream types
|
|
29
|
+
Stream.addAbortSignal = addAbortSignal;
|
|
30
|
+
Stream.compose = compose;
|
|
31
|
+
Stream.destroy = destroy;
|
|
32
|
+
// @ts-expect-error TS2741 __promisify__ is missing.
|
|
33
|
+
Stream.finished = finished;
|
|
34
|
+
Stream.isReadable = isReadable;
|
|
35
|
+
// @ts-expect-error TS2322 Type incompatibility between internal and Node.js stream types
|
|
36
|
+
Stream.isWritable = isWritable;
|
|
37
|
+
Stream.isErrored = isErrored;
|
|
38
|
+
Stream.isDisturbed = isDisturbed;
|
|
39
|
+
Stream.pipeline = pipeline;
|
|
40
|
+
Stream.Stream = Stream;
|
|
41
|
+
// @ts-expect-error TS2419 Type incompatibility due to exactOptionalPropertyTypes
|
|
42
|
+
Stream.Writable = Writable;
|
|
43
|
+
// @ts-expect-error TS2419 Type incompatibility due to exactOptionalPropertyTypes
|
|
44
|
+
Stream.Readable = Readable;
|
|
45
|
+
Stream.Duplex = Duplex;
|
|
46
|
+
// @ts-expect-error TS2419 Type incompatibility due to exactOptionalPropertyTypes
|
|
47
|
+
Stream.Transform = Transform;
|
|
48
|
+
Stream.PassThrough = PassThrough;
|
|
49
|
+
// @ts-expect-error TS2322 Type incompatibility due to exactOptionalPropertyTypes
|
|
50
|
+
Stream.promises = promises;
|
|
51
|
+
Stream.getDefaultHighWaterMark = getDefaultHighWaterMark;
|
|
52
|
+
Stream.setDefaultHighWaterMark = setDefaultHighWaterMark;
|
|
53
|
+
Stream.isDestroyed = isDestroyed;
|
|
54
|
+
Stream.duplexPair = duplexPair;
|
|
55
|
+
export default Stream;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
export declare function Stream(opts: any): void;
|
|
3
|
+
export declare namespace Stream {
|
|
4
|
+
export { Stream };
|
|
5
|
+
export var _isUint8Array: (value: any) => value is Uint8Array<ArrayBufferLike>;
|
|
6
|
+
export var _isArrayBufferView: (value: any) => value is ArrayBufferView<ArrayBufferLike>;
|
|
7
|
+
export var _uint8ArrayToBuffer: (chunk: any) => Buffer<any>;
|
|
8
|
+
}
|