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,228 @@
|
|
|
1
|
+
import { isUint8Array } from "./support.js";
|
|
2
|
+
const encoder = new TextEncoder();
|
|
3
|
+
const utf8 = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
4
|
+
const strictUtf8 = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
5
|
+
const typedArray = Object.getPrototypeOf(Uint8Array.prototype);
|
|
6
|
+
const getBuffer = Object.getOwnPropertyDescriptor(typedArray, "buffer").get;
|
|
7
|
+
const getOffset = Object.getOwnPropertyDescriptor(typedArray, "byteOffset").get;
|
|
8
|
+
const getLength = Object.getOwnPropertyDescriptor(typedArray, "byteLength").get;
|
|
9
|
+
function view(value) {
|
|
10
|
+
if (!isUint8Array(value))
|
|
11
|
+
throw new TypeError("Expected Uint8Array");
|
|
12
|
+
return new Uint8Array(getBuffer.call(value), getOffset.call(value), getLength.call(value));
|
|
13
|
+
}
|
|
14
|
+
function units(bytes, width, mask = 255) {
|
|
15
|
+
let result = "";
|
|
16
|
+
for (let i = 0; i + width <= bytes.length; i += width)
|
|
17
|
+
result += String.fromCharCode(width === 2 ? bytes[i] | (bytes[i + 1] << 8) : bytes[i] & mask);
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
function decodeString(text, encoding, strict = false) {
|
|
21
|
+
if (encoding === "utf8")
|
|
22
|
+
return encoder.encode(text);
|
|
23
|
+
if (encoding === "utf16le") {
|
|
24
|
+
const bytes = new Uint8Array(text.length * 2);
|
|
25
|
+
for (let i = 0; i < text.length; i++) {
|
|
26
|
+
bytes[i * 2] = text.charCodeAt(i);
|
|
27
|
+
bytes[i * 2 + 1] = text.charCodeAt(i) >>> 8;
|
|
28
|
+
}
|
|
29
|
+
return bytes;
|
|
30
|
+
}
|
|
31
|
+
// The native binding converts strings to one-byte code units before parsing.
|
|
32
|
+
const latin = Uint8Array.from({ length: text.length }, (_, i) => text.charCodeAt(i));
|
|
33
|
+
if (encoding === "ascii" || encoding === "latin1")
|
|
34
|
+
return latin;
|
|
35
|
+
text = units(latin, 1);
|
|
36
|
+
if (encoding === "hex") {
|
|
37
|
+
if (strict && (text.length % 2 || /[^0-9a-f]/i.test(text)))
|
|
38
|
+
throw new TypeError("The text is not valid hex");
|
|
39
|
+
const pairs = text.match(/^(?:[0-9a-f]{2})*/i)[0];
|
|
40
|
+
return Uint8Array.from({ length: pairs.length / 2 }, (_, i) => parseInt(pairs.slice(i * 2, i * 2 + 2), 16));
|
|
41
|
+
}
|
|
42
|
+
text = text
|
|
43
|
+
.split("=")[0]
|
|
44
|
+
.replace(/[^a-zA-Z0-9+/_-]/g, "")
|
|
45
|
+
.replace(/-/g, "+")
|
|
46
|
+
.replace(/_/g, "/");
|
|
47
|
+
if (text.length % 4 === 1)
|
|
48
|
+
text = text.slice(0, -1);
|
|
49
|
+
return Uint8Array.from(atob(text), (c) => c.charCodeAt(0));
|
|
50
|
+
}
|
|
51
|
+
function toString(bytes, start, end, encoding) {
|
|
52
|
+
bytes = view(bytes);
|
|
53
|
+
bytes = new Uint8Array(bytes.buffer, bytes.byteOffset + start, Math.max(0, Math.min(bytes.length, end) - start));
|
|
54
|
+
if (encoding === "utf8")
|
|
55
|
+
return utf8.decode(bytes);
|
|
56
|
+
if (encoding === "utf16le")
|
|
57
|
+
return units(bytes, 2);
|
|
58
|
+
if (encoding === "ascii")
|
|
59
|
+
return units(bytes, 1, 127);
|
|
60
|
+
if (encoding === "latin1")
|
|
61
|
+
return units(bytes, 1);
|
|
62
|
+
if (encoding === "hex")
|
|
63
|
+
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
64
|
+
const encoded = btoa(units(bytes, 1));
|
|
65
|
+
return encoding === "base64url"
|
|
66
|
+
? encoded.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")
|
|
67
|
+
: encoded;
|
|
68
|
+
}
|
|
69
|
+
function write(bytes, text, offset, length, encoding) {
|
|
70
|
+
bytes = view(bytes);
|
|
71
|
+
const target = new Uint8Array(bytes.buffer, bytes.byteOffset + offset, Math.min(length, bytes.length - offset));
|
|
72
|
+
if (encoding === "utf8")
|
|
73
|
+
return encoder.encodeInto(text, target).written;
|
|
74
|
+
// Native write parses base64 from UTF-8 bytes; from() first truncates
|
|
75
|
+
// UTF-16 code units to Latin1. These paths differ for non-ASCII input.
|
|
76
|
+
const decoded = decodeString(encoding === "base64" || encoding === "base64url"
|
|
77
|
+
? units(encoder.encode(text), 1)
|
|
78
|
+
: text, encoding);
|
|
79
|
+
let count = Math.min(target.length, decoded.length);
|
|
80
|
+
if (encoding === "utf16le")
|
|
81
|
+
count &= ~1;
|
|
82
|
+
target.set(decoded.subarray(0, count));
|
|
83
|
+
return count;
|
|
84
|
+
}
|
|
85
|
+
function indexOf(bytes, value, offset, encoding, forward) {
|
|
86
|
+
bytes = view(bytes);
|
|
87
|
+
const needle = typeof value === "string" ? decodeString(value, encoding) : view(value);
|
|
88
|
+
const wide = encoding === "utf16le";
|
|
89
|
+
const size = wide ? bytes.length & ~1 : bytes.length;
|
|
90
|
+
if (offset < 0)
|
|
91
|
+
offset =
|
|
92
|
+
offset + size >= 0 ? offset + size : forward || !needle.length ? 0 : -1;
|
|
93
|
+
else if (offset + needle.length > size)
|
|
94
|
+
offset = !needle.length ? size : forward ? -1 : size - 1;
|
|
95
|
+
if (!needle.length)
|
|
96
|
+
return offset;
|
|
97
|
+
if (offset < 0 ||
|
|
98
|
+
needle.length > size ||
|
|
99
|
+
(forward && offset + needle.length > size))
|
|
100
|
+
return -1;
|
|
101
|
+
if (wide && (size < 2 || needle.length < 2))
|
|
102
|
+
return -1;
|
|
103
|
+
const width = wide ? 2 : 1, count = wide ? needle.length & ~1 : needle.length;
|
|
104
|
+
if (wide)
|
|
105
|
+
offset = Math.floor(offset / 2) * 2;
|
|
106
|
+
for (let i = offset; i >= 0 && i < size; i += forward ? width : -width) {
|
|
107
|
+
if (i + count > size)
|
|
108
|
+
continue;
|
|
109
|
+
let matched = true;
|
|
110
|
+
for (let j = 0; j < count; j++)
|
|
111
|
+
if (bytes[i + j] !== needle[j]) {
|
|
112
|
+
matched = false;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
if (matched)
|
|
116
|
+
return i;
|
|
117
|
+
}
|
|
118
|
+
return -1;
|
|
119
|
+
}
|
|
120
|
+
function transcode(source, from, to) {
|
|
121
|
+
if (!["utf8", "utf16le", "ascii", "latin1"].includes(from) ||
|
|
122
|
+
!["utf8", "utf16le", "ascii", "latin1"].includes(to))
|
|
123
|
+
throw new Error("Unable to transcode buffer due to unsupported encoding");
|
|
124
|
+
const bytes = view(source);
|
|
125
|
+
let text;
|
|
126
|
+
if (from === "utf8") {
|
|
127
|
+
if (to === "utf16le") {
|
|
128
|
+
try {
|
|
129
|
+
text = strictUtf8.decode(bytes);
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
throw new Error("Unable to transcode buffer");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else
|
|
136
|
+
text = utf8.decode(bytes);
|
|
137
|
+
if (to === "latin1" || to === "ascii")
|
|
138
|
+
text = text.replace(/\uFEFF/g, "");
|
|
139
|
+
}
|
|
140
|
+
else if (from === "utf16le") {
|
|
141
|
+
if (bytes.length % 2 && to !== "utf16le")
|
|
142
|
+
throw new Error("UTF-16le input size should be multiple of 2");
|
|
143
|
+
text = units(bytes, 2);
|
|
144
|
+
if (to === "utf8" &&
|
|
145
|
+
/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(text))
|
|
146
|
+
throw new Error("Expected UTF8 length mismatch");
|
|
147
|
+
if (bytes.length % 2)
|
|
148
|
+
text += "\ufffd";
|
|
149
|
+
if (to === "utf16le")
|
|
150
|
+
text = utf8.decode(encoder.encode(text));
|
|
151
|
+
}
|
|
152
|
+
else
|
|
153
|
+
text = units(bytes, 1);
|
|
154
|
+
if (to === "utf8" || to === "utf16le")
|
|
155
|
+
return decodeString(text, to);
|
|
156
|
+
text = text.replace(/\uFEFF/g, "");
|
|
157
|
+
const limit = 255; // Pinned workerd converter maps ASCII through its Latin1 codec.
|
|
158
|
+
return Uint8Array.from(Array.from(text).filter((char) => char.codePointAt(0) <= limit ||
|
|
159
|
+
!/\p{Default_Ignorable_Code_Point}/u.test(char)), (char) => (char.codePointAt(0) <= limit ? char.charCodeAt(0) : 63));
|
|
160
|
+
}
|
|
161
|
+
export default {
|
|
162
|
+
UTF8: "utf8",
|
|
163
|
+
UTF16LE: "utf16le",
|
|
164
|
+
ASCII: "ascii",
|
|
165
|
+
LATIN1: "latin1",
|
|
166
|
+
HEX: "hex",
|
|
167
|
+
BASE64: "base64",
|
|
168
|
+
BASE64URL: "base64url",
|
|
169
|
+
decodeString,
|
|
170
|
+
toString,
|
|
171
|
+
write,
|
|
172
|
+
indexOf,
|
|
173
|
+
transcode,
|
|
174
|
+
byteLength: (text) => encoder.encode(text).length,
|
|
175
|
+
compare(a, b, options = {}) {
|
|
176
|
+
a = view(a);
|
|
177
|
+
b = view(b);
|
|
178
|
+
a = Uint8Array.prototype.subarray.call(a, options.aStart, options.aEnd);
|
|
179
|
+
b = Uint8Array.prototype.subarray.call(b, options.bStart, options.bEnd);
|
|
180
|
+
for (let i = 0; i < Math.min(a.length, b.length); i++)
|
|
181
|
+
if (a[i] !== b[i])
|
|
182
|
+
return a[i] > b[i] ? 1 : -1;
|
|
183
|
+
return Math.sign(a.length - b.length);
|
|
184
|
+
},
|
|
185
|
+
concat(list, length) {
|
|
186
|
+
const values = [];
|
|
187
|
+
for (let i = 0; i < list.length; i++)
|
|
188
|
+
values.push(view(list[i]));
|
|
189
|
+
list = values;
|
|
190
|
+
const bytes = new Uint8Array(length);
|
|
191
|
+
let offset = 0;
|
|
192
|
+
for (const item of list) {
|
|
193
|
+
const count = Math.min(item.length, length - offset);
|
|
194
|
+
bytes.set(item.subarray(0, count), offset);
|
|
195
|
+
offset += count;
|
|
196
|
+
}
|
|
197
|
+
return bytes;
|
|
198
|
+
},
|
|
199
|
+
swap(bytes, bits) {
|
|
200
|
+
bytes = view(bytes);
|
|
201
|
+
const width = bits / 8;
|
|
202
|
+
for (let i = 0; i < bytes.length; i += width)
|
|
203
|
+
for (let j = 0; j < width / 2; j++)
|
|
204
|
+
[bytes[i + j], bytes[i + width - j - 1]] = [
|
|
205
|
+
bytes[i + width - j - 1],
|
|
206
|
+
bytes[i + j],
|
|
207
|
+
];
|
|
208
|
+
},
|
|
209
|
+
fillImpl(bytes, value, start, end, encoding = "utf8") {
|
|
210
|
+
bytes = view(bytes);
|
|
211
|
+
const pattern = typeof value === "string"
|
|
212
|
+
? decodeString(value, encoding, true)
|
|
213
|
+
: view(value).slice();
|
|
214
|
+
for (let i = start; i < end; i++)
|
|
215
|
+
bytes[i] = pattern.length ? pattern[(i - start) % pattern.length] : 0;
|
|
216
|
+
},
|
|
217
|
+
isAscii: (value) => view(value).every((byte) => byte < 128),
|
|
218
|
+
isUtf8(value) {
|
|
219
|
+
const bytes = view(value);
|
|
220
|
+
try {
|
|
221
|
+
strictUtf8.decode(bytes);
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare class NodeErrorAbstraction extends Error {
|
|
2
|
+
code: string;
|
|
3
|
+
constructor(name: string, code: string, message: string);
|
|
4
|
+
toString(): string;
|
|
5
|
+
}
|
|
6
|
+
export declare class NodeError extends NodeErrorAbstraction {
|
|
7
|
+
constructor(code: string, message: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class NodeRangeError extends NodeErrorAbstraction {
|
|
10
|
+
constructor(code: string, message: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class NodeTypeError extends NodeErrorAbstraction implements TypeError {
|
|
13
|
+
constructor(code: string, message: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class ERR_INVALID_ARG_TYPE_RANGE extends NodeRangeError {
|
|
16
|
+
constructor(name: string, expected: string | string[], actual: unknown);
|
|
17
|
+
}
|
|
18
|
+
export declare class ERR_INVALID_ARG_TYPE extends NodeTypeError {
|
|
19
|
+
constructor(name: string, expected: string | string[], actual: unknown);
|
|
20
|
+
static RangeError: typeof ERR_INVALID_ARG_TYPE_RANGE;
|
|
21
|
+
}
|
|
22
|
+
export declare class ERR_INVALID_ARG_VALUE_RANGE extends NodeRangeError {
|
|
23
|
+
constructor(name: string, value: unknown, reason?: string);
|
|
24
|
+
}
|
|
25
|
+
export declare class ERR_INVALID_ARG_VALUE extends NodeTypeError {
|
|
26
|
+
constructor(name: string, value: unknown, reason?: string);
|
|
27
|
+
static RangeError: typeof ERR_INVALID_ARG_VALUE_RANGE;
|
|
28
|
+
}
|
|
29
|
+
export declare class ERR_OUT_OF_RANGE extends RangeError {
|
|
30
|
+
code: string;
|
|
31
|
+
constructor(str: string, range: string, input: unknown, replaceDefaultBoolean?: boolean);
|
|
32
|
+
}
|
|
33
|
+
export declare class ERR_BUFFER_OUT_OF_BOUNDS extends NodeRangeError {
|
|
34
|
+
constructor(name?: string);
|
|
35
|
+
}
|
|
36
|
+
export declare class ERR_INVALID_BUFFER_SIZE extends NodeRangeError {
|
|
37
|
+
constructor(size: number);
|
|
38
|
+
}
|
|
39
|
+
export declare class ERR_UNKNOWN_ENCODING extends NodeTypeError {
|
|
40
|
+
constructor(x: string);
|
|
41
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Copyright (c) 2017-2022 Cloudflare, Inc.
|
|
2
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
3
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
// Adapted from Deno and Node.js:
|
|
6
|
+
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
|
7
|
+
//
|
|
8
|
+
// Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors.
|
|
9
|
+
//
|
|
10
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
11
|
+
// copy of this software and associated documentation files (the
|
|
12
|
+
// "Software"), to deal in the Software without restriction, including
|
|
13
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
14
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
15
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
16
|
+
// following conditions:
|
|
17
|
+
//
|
|
18
|
+
// The above copyright notice and this permission notice shall be included
|
|
19
|
+
// in all copies or substantial portions of the Software.
|
|
20
|
+
//
|
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
22
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
23
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
24
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
25
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
26
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
27
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
+
import { inspect } from "node:util";
|
|
29
|
+
const classRegExp = /^([A-Z][a-z0-9]*)+$/;
|
|
30
|
+
const kTypes = [
|
|
31
|
+
"string",
|
|
32
|
+
"function",
|
|
33
|
+
"number",
|
|
34
|
+
"object",
|
|
35
|
+
"Function",
|
|
36
|
+
"Object",
|
|
37
|
+
"boolean",
|
|
38
|
+
"bigint",
|
|
39
|
+
"symbol",
|
|
40
|
+
];
|
|
41
|
+
export class NodeErrorAbstraction extends Error {
|
|
42
|
+
code;
|
|
43
|
+
constructor(name, code, message) {
|
|
44
|
+
super(message);
|
|
45
|
+
this.code = code;
|
|
46
|
+
this.name = name;
|
|
47
|
+
}
|
|
48
|
+
toString() {
|
|
49
|
+
return `${this.name} [${this.code}]: ${this.message}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class NodeError extends NodeErrorAbstraction {
|
|
53
|
+
constructor(code, message) {
|
|
54
|
+
super(Error.prototype.name, code, message);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class NodeRangeError extends NodeErrorAbstraction {
|
|
58
|
+
constructor(code, message) {
|
|
59
|
+
super(RangeError.prototype.name, code, message);
|
|
60
|
+
Object.setPrototypeOf(this, RangeError.prototype);
|
|
61
|
+
this.toString = function () {
|
|
62
|
+
return `${this.name} [${this.code}]: ${this.message}`;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export class NodeTypeError extends NodeErrorAbstraction {
|
|
67
|
+
constructor(code, message) {
|
|
68
|
+
super(TypeError.prototype.name, code, message);
|
|
69
|
+
Object.setPrototypeOf(this, TypeError.prototype);
|
|
70
|
+
this.toString = function () {
|
|
71
|
+
return `${this.name} [${this.code}]: ${this.message}`;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function createInvalidArgType(name, expected) {
|
|
76
|
+
// https://github.com/nodejs/node/blob/f3eb224/lib/internal/errors.js#L1037-L1087
|
|
77
|
+
expected = Array.isArray(expected) ? expected : [expected];
|
|
78
|
+
let msg = "The ";
|
|
79
|
+
if (name.endsWith(" argument")) {
|
|
80
|
+
// For cases like 'first argument'
|
|
81
|
+
msg += `${name} `;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
85
|
+
msg += `"${name}" ${type} `;
|
|
86
|
+
}
|
|
87
|
+
msg += "must be ";
|
|
88
|
+
const types = [];
|
|
89
|
+
const instances = [];
|
|
90
|
+
const other = [];
|
|
91
|
+
for (const value of expected) {
|
|
92
|
+
if (kTypes.includes(value)) {
|
|
93
|
+
types.push(value.toLocaleLowerCase());
|
|
94
|
+
}
|
|
95
|
+
else if (classRegExp.test(value)) {
|
|
96
|
+
instances.push(value);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
other.push(value);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Special handle `object` in case other instances are allowed to outline
|
|
103
|
+
// the differences between each other.
|
|
104
|
+
if (instances.length > 0) {
|
|
105
|
+
const pos = types.indexOf("object");
|
|
106
|
+
if (pos !== -1) {
|
|
107
|
+
types.splice(pos, 1);
|
|
108
|
+
instances.push("Object");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (types.length > 0) {
|
|
112
|
+
if (types.length > 2) {
|
|
113
|
+
const last = types.pop();
|
|
114
|
+
msg += `one of type ${types.join(", ")}, or ${last}`;
|
|
115
|
+
}
|
|
116
|
+
else if (types.length === 2) {
|
|
117
|
+
msg += `one of type ${types[0]} or ${types[1]}`;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
msg += `of type ${types[0]}`;
|
|
121
|
+
}
|
|
122
|
+
if (instances.length > 0 || other.length > 0) {
|
|
123
|
+
msg += " or ";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (instances.length > 0) {
|
|
127
|
+
if (instances.length > 2) {
|
|
128
|
+
const last = instances.pop();
|
|
129
|
+
msg += `an instance of ${instances.join(", ")}, or ${last}`;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
msg += `an instance of ${instances[0]}`;
|
|
133
|
+
if (instances.length === 2) {
|
|
134
|
+
msg += ` or ${instances[1]}`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (other.length > 0) {
|
|
138
|
+
msg += " or ";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (other.length > 0) {
|
|
142
|
+
if (other.length > 2) {
|
|
143
|
+
const last = other.pop();
|
|
144
|
+
msg += `one of ${other.join(", ")}, or ${last}`;
|
|
145
|
+
}
|
|
146
|
+
else if (other.length === 2) {
|
|
147
|
+
msg += `one of ${other[0]} or ${other[1]}`;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
if (other[0]?.toLowerCase() !== other[0]) {
|
|
151
|
+
msg += "an ";
|
|
152
|
+
}
|
|
153
|
+
msg += `${other[0]}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return msg;
|
|
157
|
+
}
|
|
158
|
+
function invalidArgTypeHelper(input) {
|
|
159
|
+
if (input == null) {
|
|
160
|
+
return ` Received ${input}`;
|
|
161
|
+
}
|
|
162
|
+
if (typeof input === "function" && input.name) {
|
|
163
|
+
return ` Received function ${input.name}`;
|
|
164
|
+
}
|
|
165
|
+
if (typeof input === "object") {
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
167
|
+
if (input.constructor?.name) {
|
|
168
|
+
return ` Received an instance of ${input.constructor.name}`;
|
|
169
|
+
}
|
|
170
|
+
return ` Received ${inspect(input, { depth: -1 })}`;
|
|
171
|
+
}
|
|
172
|
+
let inspected = inspect(input, { colors: false });
|
|
173
|
+
if (inspected.length > 25) {
|
|
174
|
+
inspected = `${inspected.slice(0, 25)}...`;
|
|
175
|
+
}
|
|
176
|
+
return ` Received type ${typeof input} (${inspected})`;
|
|
177
|
+
}
|
|
178
|
+
function addNumericalSeparator(val) {
|
|
179
|
+
let res = "";
|
|
180
|
+
let i = val.length;
|
|
181
|
+
const start = val[0] === "-" ? 1 : 0;
|
|
182
|
+
for (; i >= start + 4; i -= 3) {
|
|
183
|
+
res = `_${val.slice(i - 3, i)}${res}`;
|
|
184
|
+
}
|
|
185
|
+
return `${val.slice(0, i)}${res}`;
|
|
186
|
+
}
|
|
187
|
+
export class ERR_INVALID_ARG_TYPE_RANGE extends NodeRangeError {
|
|
188
|
+
constructor(name, expected, actual) {
|
|
189
|
+
const msg = createInvalidArgType(name, expected);
|
|
190
|
+
super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export class ERR_INVALID_ARG_TYPE extends NodeTypeError {
|
|
194
|
+
constructor(name, expected, actual) {
|
|
195
|
+
const msg = createInvalidArgType(name, expected);
|
|
196
|
+
super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`);
|
|
197
|
+
}
|
|
198
|
+
static RangeError = ERR_INVALID_ARG_TYPE_RANGE;
|
|
199
|
+
}
|
|
200
|
+
export class ERR_INVALID_ARG_VALUE_RANGE extends NodeRangeError {
|
|
201
|
+
constructor(name, value, reason = "is invalid") {
|
|
202
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
203
|
+
const inspected = inspect(value);
|
|
204
|
+
super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
export class ERR_INVALID_ARG_VALUE extends NodeTypeError {
|
|
208
|
+
constructor(name, value, reason = "is invalid") {
|
|
209
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
210
|
+
const inspected = inspect(value);
|
|
211
|
+
super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`);
|
|
212
|
+
}
|
|
213
|
+
static RangeError = ERR_INVALID_ARG_VALUE_RANGE;
|
|
214
|
+
}
|
|
215
|
+
export class ERR_OUT_OF_RANGE extends RangeError {
|
|
216
|
+
code = "ERR_OUT_OF_RANGE";
|
|
217
|
+
constructor(str, range, input, replaceDefaultBoolean = false) {
|
|
218
|
+
// TODO(later): Implement internal assert?
|
|
219
|
+
// assert(range, 'Missing "range" argument');
|
|
220
|
+
let msg = replaceDefaultBoolean
|
|
221
|
+
? str
|
|
222
|
+
: `The value of "${str}" is out of range.`;
|
|
223
|
+
let received;
|
|
224
|
+
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
225
|
+
received = addNumericalSeparator(String(input));
|
|
226
|
+
}
|
|
227
|
+
else if (typeof input === "bigint") {
|
|
228
|
+
received = String(input);
|
|
229
|
+
if (input > 2n ** 32n || input < -(2n ** 32n)) {
|
|
230
|
+
received = addNumericalSeparator(received);
|
|
231
|
+
}
|
|
232
|
+
received += "n";
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
received = inspect(input);
|
|
236
|
+
}
|
|
237
|
+
msg += ` It must be ${range}. Received ${received}`;
|
|
238
|
+
super(msg);
|
|
239
|
+
const { name } = this;
|
|
240
|
+
// Add the error code to the name to include it in the stack trace.
|
|
241
|
+
this.name = `${name} [${this.code}]`;
|
|
242
|
+
// Access the stack to generate the error message including the error code from the name.
|
|
243
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
244
|
+
this.stack;
|
|
245
|
+
// Reset the name to the actual name.
|
|
246
|
+
this.name = name;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
export class ERR_BUFFER_OUT_OF_BOUNDS extends NodeRangeError {
|
|
250
|
+
constructor(name) {
|
|
251
|
+
super("ERR_BUFFER_OUT_OF_BOUNDS", name
|
|
252
|
+
? `"${name}" is outside of buffer bounds`
|
|
253
|
+
: "Attempt to access memory outside buffer bounds");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
export class ERR_INVALID_BUFFER_SIZE extends NodeRangeError {
|
|
257
|
+
constructor(size) {
|
|
258
|
+
super("ERR_INVALID_BUFFER_SIZE", `Buffer size must be a multiple of ${size}-bits`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export class ERR_UNKNOWN_ENCODING extends NodeTypeError {
|
|
262
|
+
constructor(x) {
|
|
263
|
+
super("ERR_UNKNOWN_ENCODING", `Unknown encoding: ${x}`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { constants, kMaxLength, kStringMaxLength, Buffer, SlowBuffer, isAscii, isUtf8, transcode, INSPECT_MAX_BYTES, resolveObjectURL } from "./internal-buffer.js";
|
|
2
|
+
declare const atob: typeof globalThis.atob;
|
|
3
|
+
declare const btoa: typeof globalThis.btoa;
|
|
4
|
+
import { Blob, File } from "./blob.js";
|
|
5
|
+
export { atob, btoa, constants, kMaxLength, kStringMaxLength, Blob, Buffer, File, SlowBuffer, isAscii, isUtf8, transcode, INSPECT_MAX_BYTES, resolveObjectURL, };
|
|
6
|
+
declare const _default: {
|
|
7
|
+
atob: typeof globalThis.atob;
|
|
8
|
+
btoa: typeof globalThis.btoa;
|
|
9
|
+
constants: {
|
|
10
|
+
MAX_LENGTH: number;
|
|
11
|
+
MAX_STRING_LENGTH: number;
|
|
12
|
+
};
|
|
13
|
+
kMaxLength: number;
|
|
14
|
+
kStringMaxLength: number;
|
|
15
|
+
Blob: typeof Blob;
|
|
16
|
+
Buffer: typeof Buffer;
|
|
17
|
+
File: typeof File;
|
|
18
|
+
SlowBuffer: typeof SlowBuffer;
|
|
19
|
+
isAscii: typeof isAscii;
|
|
20
|
+
isUtf8: typeof isUtf8;
|
|
21
|
+
transcode: typeof transcode;
|
|
22
|
+
INSPECT_MAX_BYTES: number;
|
|
23
|
+
resolveObjectURL: typeof resolveObjectURL;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) 2017-2022 Cloudflare, Inc.
|
|
2
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
3
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4
|
+
import { constants, kMaxLength, kStringMaxLength, Buffer, SlowBuffer, isAscii, isUtf8, transcode, INSPECT_MAX_BYTES, resolveObjectURL, } from "./internal-buffer.js";
|
|
5
|
+
const atob = globalThis.atob.bind(globalThis);
|
|
6
|
+
const btoa = globalThis.btoa.bind(globalThis);
|
|
7
|
+
import { Blob, File } from "./blob.js";
|
|
8
|
+
export { atob, btoa, constants, kMaxLength, kStringMaxLength, Blob, Buffer, File, SlowBuffer, isAscii, isUtf8, transcode, INSPECT_MAX_BYTES, resolveObjectURL, };
|
|
9
|
+
export default {
|
|
10
|
+
atob,
|
|
11
|
+
btoa,
|
|
12
|
+
constants,
|
|
13
|
+
kMaxLength,
|
|
14
|
+
kStringMaxLength,
|
|
15
|
+
Blob,
|
|
16
|
+
Buffer,
|
|
17
|
+
File,
|
|
18
|
+
SlowBuffer,
|
|
19
|
+
isAscii,
|
|
20
|
+
isUtf8,
|
|
21
|
+
transcode,
|
|
22
|
+
INSPECT_MAX_BYTES,
|
|
23
|
+
resolveObjectURL,
|
|
24
|
+
};
|