@volter/tabnode 0.2.14-volter.88
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 +22 -0
- package/README.md +78 -0
- package/THIRD-PARTY-NOTICES.md +12 -0
- package/dist/__sw__.js +526 -0
- package/dist/assets/runtime-worker-4MKaHFVb.js +75221 -0
- package/dist/assets/runtime-worker-4MKaHFVb.js.map +1 -0
- package/dist/code-transforms.d.ts +21 -0
- package/dist/code-transforms.d.ts.map +1 -0
- package/dist/config/cdn.d.ts +12 -0
- package/dist/config/cdn.d.ts.map +1 -0
- package/dist/create-runtime.d.ts +22 -0
- package/dist/create-runtime.d.ts.map +1 -0
- package/dist/host-globals.d.ts +62 -0
- package/dist/host-globals.d.ts.map +1 -0
- package/dist/index.cjs +36021 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +127 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +36020 -0
- package/dist/index.mjs.map +1 -0
- package/dist/node-internals.d.ts +68 -0
- package/dist/node-internals.d.ts.map +1 -0
- package/dist/node-lib/binding/blob.d.ts +12 -0
- package/dist/node-lib/binding/blob.d.ts.map +1 -0
- package/dist/node-lib/binding/buffer.d.ts +144 -0
- package/dist/node-lib/binding/buffer.d.ts.map +1 -0
- package/dist/node-lib/binding/cares_wrap.d.ts +14 -0
- package/dist/node-lib/binding/cares_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/fds.d.ts +30 -0
- package/dist/node-lib/binding/fds.d.ts.map +1 -0
- package/dist/node-lib/binding/fs.d.ts +157 -0
- package/dist/node-lib/binding/fs.d.ts.map +1 -0
- package/dist/node-lib/binding/handles.d.ts +81 -0
- package/dist/node-lib/binding/handles.d.ts.map +1 -0
- package/dist/node-lib/binding/http_parser.d.ts +122 -0
- package/dist/node-lib/binding/http_parser.d.ts.map +1 -0
- package/dist/node-lib/binding/index.d.ts +3 -0
- package/dist/node-lib/binding/index.d.ts.map +1 -0
- package/dist/node-lib/binding/llhttp-wasm.d.ts +22 -0
- package/dist/node-lib/binding/llhttp-wasm.d.ts.map +1 -0
- package/dist/node-lib/binding/misc.d.ts +123 -0
- package/dist/node-lib/binding/misc.d.ts.map +1 -0
- package/dist/node-lib/binding/pipe_wrap.d.ts +84 -0
- package/dist/node-lib/binding/pipe_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/process_wrap.d.ts +173 -0
- package/dist/node-lib/binding/process_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/spawn_sync.d.ts +30 -0
- package/dist/node-lib/binding/spawn_sync.d.ts.map +1 -0
- package/dist/node-lib/binding/stream_wrap.d.ts +191 -0
- package/dist/node-lib/binding/stream_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/stubs.d.ts +23 -0
- package/dist/node-lib/binding/stubs.d.ts.map +1 -0
- package/dist/node-lib/binding/tcp_wrap.d.ts +98 -0
- package/dist/node-lib/binding/tcp_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/tty_wrap.d.ts +36 -0
- package/dist/node-lib/binding/tty_wrap.d.ts.map +1 -0
- package/dist/node-lib/binding/util.d.ts +126 -0
- package/dist/node-lib/binding/util.d.ts.map +1 -0
- package/dist/node-lib/binding/uv.d.ts +32 -0
- package/dist/node-lib/binding/uv.d.ts.map +1 -0
- package/dist/node-lib/binding/zlib-pako.d.ts +22 -0
- package/dist/node-lib/binding/zlib-pako.d.ts.map +1 -0
- package/dist/node-lib/binding/zlib.d.ts +38 -0
- package/dist/node-lib/binding/zlib.d.ts.map +1 -0
- package/dist/node-lib/buffer-module.d.ts +51 -0
- package/dist/node-lib/buffer-module.d.ts.map +1 -0
- package/dist/node-lib/child-process-module.d.ts +26 -0
- package/dist/node-lib/child-process-module.d.ts.map +1 -0
- package/dist/node-lib/events-module.d.ts +58 -0
- package/dist/node-lib/events-module.d.ts.map +1 -0
- package/dist/node-lib/fs-module.d.ts +5 -0
- package/dist/node-lib/fs-module.d.ts.map +1 -0
- package/dist/node-lib/http-bridge.d.ts +43 -0
- package/dist/node-lib/http-bridge.d.ts.map +1 -0
- package/dist/node-lib/http-module.d.ts +35 -0
- package/dist/node-lib/http-module.d.ts.map +1 -0
- package/dist/node-lib/internals/addresses.d.ts +40 -0
- package/dist/node-lib/internals/addresses.d.ts.map +1 -0
- package/dist/node-lib/internals/buffer-and-streams.d.ts +96 -0
- package/dist/node-lib/internals/buffer-and-streams.d.ts.map +1 -0
- package/dist/node-lib/internals/child-process.d.ts +27 -0
- package/dist/node-lib/internals/child-process.d.ts.map +1 -0
- package/dist/node-lib/internals/events-util.d.ts +83 -0
- package/dist/node-lib/internals/events-util.d.ts.map +1 -0
- package/dist/node-lib/internals/index.d.ts +2 -0
- package/dist/node-lib/internals/index.d.ts.map +1 -0
- package/dist/node-lib/internals/modules.d.ts +67 -0
- package/dist/node-lib/internals/modules.d.ts.map +1 -0
- package/dist/node-lib/internals/readline-access.d.ts +2 -0
- package/dist/node-lib/internals/readline-access.d.ts.map +1 -0
- package/dist/node-lib/internals/runtime.d.ts +150 -0
- package/dist/node-lib/internals/runtime.d.ts.map +1 -0
- package/dist/node-lib/internals/util.d.ts +33 -0
- package/dist/node-lib/internals/util.d.ts.map +1 -0
- package/dist/node-lib/lazy.d.ts +31 -0
- package/dist/node-lib/lazy.d.ts.map +1 -0
- package/dist/node-lib/load.d.ts +27 -0
- package/dist/node-lib/load.d.ts.map +1 -0
- package/dist/node-lib/module-hooks.d.ts +89 -0
- package/dist/node-lib/module-hooks.d.ts.map +1 -0
- package/dist/node-lib/net-module.d.ts +181 -0
- package/dist/node-lib/net-module.d.ts.map +1 -0
- package/dist/node-lib/node-versions.d.ts +27 -0
- package/dist/node-lib/node-versions.d.ts.map +1 -0
- package/dist/node-lib/public-modules.d.ts +2 -0
- package/dist/node-lib/public-modules.d.ts.map +1 -0
- package/dist/node-lib/require-hook.d.ts +15 -0
- package/dist/node-lib/require-hook.d.ts.map +1 -0
- package/dist/node-lib/small-modules.d.ts +16 -0
- package/dist/node-lib/small-modules.d.ts.map +1 -0
- package/dist/node-lib/sources.d.ts +4 -0
- package/dist/node-lib/sources.d.ts.map +1 -0
- package/dist/node-lib/stream-module.d.ts +77 -0
- package/dist/node-lib/stream-module.d.ts.map +1 -0
- package/dist/node-lib/timers.d.ts +19 -0
- package/dist/node-lib/timers.d.ts.map +1 -0
- package/dist/node-lib/util-module.d.ts +76 -0
- package/dist/node-lib/util-module.d.ts.map +1 -0
- package/dist/node-resolution.d.ts +50 -0
- package/dist/node-resolution.d.ts.map +1 -0
- package/dist/node-resolver.d.ts +7 -0
- package/dist/node-resolver.d.ts.map +1 -0
- package/dist/npm/index.d.ts +73 -0
- package/dist/npm/index.d.ts.map +1 -0
- package/dist/npm/registry.d.ts +111 -0
- package/dist/npm/registry.d.ts.map +1 -0
- package/dist/npm/resolver.d.ts +79 -0
- package/dist/npm/resolver.d.ts.map +1 -0
- package/dist/npm/tarball.d.ts +28 -0
- package/dist/npm/tarball.d.ts.map +1 -0
- package/dist/process-tokens.d.ts +77 -0
- package/dist/process-tokens.d.ts.map +1 -0
- package/dist/punycode-source.d.ts +3 -0
- package/dist/punycode-source.d.ts.map +1 -0
- package/dist/runtime-interface.d.ts +74 -0
- package/dist/runtime-interface.d.ts.map +1 -0
- package/dist/runtime.d.ts +144 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/server-bridge.d.ts +147 -0
- package/dist/server-bridge.d.ts.map +1 -0
- package/dist/shims/async_hooks.d.ts +50 -0
- package/dist/shims/async_hooks.d.ts.map +1 -0
- package/dist/shims/child_process.d.ts +104 -0
- package/dist/shims/child_process.d.ts.map +1 -0
- package/dist/shims/cluster.d.ts +52 -0
- package/dist/shims/cluster.d.ts.map +1 -0
- package/dist/shims/command-line.d.ts +43 -0
- package/dist/shims/command-line.d.ts.map +1 -0
- package/dist/shims/constants.d.ts +222 -0
- package/dist/shims/constants.d.ts.map +1 -0
- package/dist/shims/crypto-constants.d.ts +12 -0
- package/dist/shims/crypto-constants.d.ts.map +1 -0
- package/dist/shims/crypto.d.ts +144 -0
- package/dist/shims/crypto.d.ts.map +1 -0
- package/dist/shims/dgram.d.ts +34 -0
- package/dist/shims/dgram.d.ts.map +1 -0
- package/dist/shims/dns.d.ts +91 -0
- package/dist/shims/dns.d.ts.map +1 -0
- package/dist/shims/domain.d.ts +25 -0
- package/dist/shims/domain.d.ts.map +1 -0
- package/dist/shims/esbuild.d.ts +205 -0
- package/dist/shims/esbuild.d.ts.map +1 -0
- package/dist/shims/fs.d.ts +25 -0
- package/dist/shims/fs.d.ts.map +1 -0
- package/dist/shims/http2.d.ts +81 -0
- package/dist/shims/http2.d.ts.map +1 -0
- package/dist/shims/inspector.d.ts +25 -0
- package/dist/shims/inspector.d.ts.map +1 -0
- package/dist/shims/module.d.ts +22 -0
- package/dist/shims/module.d.ts.map +1 -0
- package/dist/shims/os.d.ts +159 -0
- package/dist/shims/os.d.ts.map +1 -0
- package/dist/shims/path.d.ts +52 -0
- package/dist/shims/path.d.ts.map +1 -0
- package/dist/shims/perf_hooks.d.ts +50 -0
- package/dist/shims/perf_hooks.d.ts.map +1 -0
- package/dist/shims/process.d.ts +226 -0
- package/dist/shims/process.d.ts.map +1 -0
- package/dist/shims/rollup.d.ts +71 -0
- package/dist/shims/rollup.d.ts.map +1 -0
- package/dist/shims/string_decoder.d.ts +41 -0
- package/dist/shims/string_decoder.d.ts.map +1 -0
- package/dist/shims/sync-child.d.ts +64 -0
- package/dist/shims/sync-child.d.ts.map +1 -0
- package/dist/shims/tls.d.ts +53 -0
- package/dist/shims/tls.d.ts.map +1 -0
- package/dist/shims/url.d.ts +84 -0
- package/dist/shims/url.d.ts.map +1 -0
- package/dist/shims/v8.d.ts +73 -0
- package/dist/shims/v8.d.ts.map +1 -0
- package/dist/shims/vfs-adapter.d.ts +126 -0
- package/dist/shims/vfs-adapter.d.ts.map +1 -0
- package/dist/shims/vm.d.ts +52 -0
- package/dist/shims/vm.d.ts.map +1 -0
- package/dist/shims/wasi.d.ts +78 -0
- package/dist/shims/wasi.d.ts.map +1 -0
- package/dist/shims/worker_threads.d.ts +66 -0
- package/dist/shims/worker_threads.d.ts.map +1 -0
- package/dist/shims/zlib-constants.d.ts +66 -0
- package/dist/shims/zlib-constants.d.ts.map +1 -0
- package/dist/shims/zlib.d.ts +102 -0
- package/dist/shims/zlib.d.ts.map +1 -0
- package/dist/transform.d.ts +24 -0
- package/dist/transform.d.ts.map +1 -0
- package/dist/types/package-json.d.ts +18 -0
- package/dist/types/package-json.d.ts.map +1 -0
- package/dist/utils/binary-encoding.d.ts +13 -0
- package/dist/utils/binary-encoding.d.ts.map +1 -0
- package/dist/utils/glob.d.ts +19 -0
- package/dist/utils/glob.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +6 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/virtual-fs.d.ts +259 -0
- package/dist/virtual-fs.d.ts.map +1 -0
- package/dist/vite-plugin.cjs +50 -0
- package/dist/vite-plugin.cjs.map +1 -0
- package/dist/vite-plugin.d.ts +36 -0
- package/dist/vite-plugin.d.ts.map +1 -0
- package/dist/vite-plugin.mjs +31 -0
- package/dist/vite-plugin.mjs.map +1 -0
- package/dist/worker/runtime-worker.d.ts +8 -0
- package/dist/worker/runtime-worker.d.ts.map +1 -0
- package/dist/worker-runtime.d.ts +50 -0
- package/dist/worker-runtime.d.ts.map +1 -0
- package/package.json +88 -0
- package/src/code-transforms.ts +560 -0
- package/src/config/cdn.ts +13 -0
- package/src/create-runtime.ts +89 -0
- package/src/host-globals.ts +121 -0
- package/src/index.ts +235 -0
- package/src/node-internals.ts +283 -0
- package/src/node-lib/LICENSE +47 -0
- package/src/node-lib/_http_agent.js +547 -0
- package/src/node-lib/_http_client.js +996 -0
- package/src/node-lib/_http_common.js +269 -0
- package/src/node-lib/_http_incoming.js +453 -0
- package/src/node-lib/_http_outgoing.js +1262 -0
- package/src/node-lib/_http_server.js +1230 -0
- package/src/node-lib/assert/strict.js +3 -0
- package/src/node-lib/assert.js +844 -0
- package/src/node-lib/binding/blob.ts +35 -0
- package/src/node-lib/binding/buffer.ts +465 -0
- package/src/node-lib/binding/cares_wrap.ts +57 -0
- package/src/node-lib/binding/fds.ts +80 -0
- package/src/node-lib/binding/fs.ts +857 -0
- package/src/node-lib/binding/handles.ts +187 -0
- package/src/node-lib/binding/http_parser.ts +536 -0
- package/src/node-lib/binding/index.ts +77 -0
- package/src/node-lib/binding/llhttp-wasm.ts +670 -0
- package/src/node-lib/binding/misc.ts +252 -0
- package/src/node-lib/binding/pipe_wrap.ts +166 -0
- package/src/node-lib/binding/process_wrap.ts +371 -0
- package/src/node-lib/binding/spawn_sync.ts +141 -0
- package/src/node-lib/binding/stream_wrap.ts +413 -0
- package/src/node-lib/binding/stubs.ts +19 -0
- package/src/node-lib/binding/tcp_wrap.ts +254 -0
- package/src/node-lib/binding/tty_wrap.ts +56 -0
- package/src/node-lib/binding/util.ts +274 -0
- package/src/node-lib/binding/uv.ts +102 -0
- package/src/node-lib/binding/zlib-pako.ts +50 -0
- package/src/node-lib/binding/zlib.ts +259 -0
- package/src/node-lib/buffer-module.ts +70 -0
- package/src/node-lib/buffer.js +1373 -0
- package/src/node-lib/child-process-module.ts +58 -0
- package/src/node-lib/child_process.js +1046 -0
- package/src/node-lib/constants.js +41 -0
- package/src/node-lib/diagnostics_channel.js +438 -0
- package/src/node-lib/events-module.ts +80 -0
- package/src/node-lib/events.js +1223 -0
- package/src/node-lib/fs-module.ts +43 -0
- package/src/node-lib/fs.js +3377 -0
- package/src/node-lib/http-bridge.ts +299 -0
- package/src/node-lib/http-module.ts +53 -0
- package/src/node-lib/http.js +198 -0
- package/src/node-lib/https.js +429 -0
- package/src/node-lib/internal/assert/assertion_error.js +417 -0
- package/src/node-lib/internal/assert/calltracker.js +153 -0
- package/src/node-lib/internal/assert/myers_diff.js +177 -0
- package/src/node-lib/internal/assert/utils.js +278 -0
- package/src/node-lib/internal/buffer.js +1120 -0
- package/src/node-lib/internal/child_process/serialization.js +169 -0
- package/src/node-lib/internal/child_process.js +1135 -0
- package/src/node-lib/internal/constants.js +56 -0
- package/src/node-lib/internal/deps/minimatch/index.js +1628 -0
- package/src/node-lib/internal/errors.js +1912 -0
- package/src/node-lib/internal/events/abort_listener.js +54 -0
- package/src/node-lib/internal/events/symbols.js +11 -0
- package/src/node-lib/internal/fixed_queue.js +119 -0
- package/src/node-lib/internal/freelist.js +30 -0
- package/src/node-lib/internal/fs/cp/cp-sync.js +242 -0
- package/src/node-lib/internal/fs/cp/cp.js +382 -0
- package/src/node-lib/internal/fs/dir.js +369 -0
- package/src/node-lib/internal/fs/glob.js +763 -0
- package/src/node-lib/internal/fs/promises.js +1312 -0
- package/src/node-lib/internal/fs/read/context.js +129 -0
- package/src/node-lib/internal/fs/recursive_watch.js +275 -0
- package/src/node-lib/internal/fs/rimraf.js +311 -0
- package/src/node-lib/internal/fs/streams.js +571 -0
- package/src/node-lib/internal/fs/sync_write_stream.js +49 -0
- package/src/node-lib/internal/fs/utils.js +987 -0
- package/src/node-lib/internal/fs/watchers.js +418 -0
- package/src/node-lib/internal/http.js +62 -0
- package/src/node-lib/internal/mime.js +389 -0
- package/src/node-lib/internal/modules/customization_hooks.js +406 -0
- package/src/node-lib/internal/net.js +95 -0
- package/src/node-lib/internal/querystring.js +119 -0
- package/src/node-lib/internal/readline/callbacks.js +132 -0
- package/src/node-lib/internal/readline/emitKeypressEvents.js +99 -0
- package/src/node-lib/internal/readline/interface.js +1418 -0
- package/src/node-lib/internal/readline/promises.js +144 -0
- package/src/node-lib/internal/readline/utils.js +405 -0
- package/src/node-lib/internal/socket_list.js +108 -0
- package/src/node-lib/internal/stream_base_commons.js +280 -0
- package/src/node-lib/internal/streams/add-abort-signal.js +60 -0
- package/src/node-lib/internal/streams/compose.js +257 -0
- package/src/node-lib/internal/streams/destroy.js +361 -0
- package/src/node-lib/internal/streams/duplex.js +203 -0
- package/src/node-lib/internal/streams/duplexify.js +379 -0
- package/src/node-lib/internal/streams/duplexpair.js +62 -0
- package/src/node-lib/internal/streams/end-of-stream.js +331 -0
- package/src/node-lib/internal/streams/from.js +208 -0
- package/src/node-lib/internal/streams/lazy_transform.js +57 -0
- package/src/node-lib/internal/streams/legacy.js +125 -0
- package/src/node-lib/internal/streams/operators.js +436 -0
- package/src/node-lib/internal/streams/passthrough.js +47 -0
- package/src/node-lib/internal/streams/pipeline.js +465 -0
- package/src/node-lib/internal/streams/readable.js +1762 -0
- package/src/node-lib/internal/streams/state.js +51 -0
- package/src/node-lib/internal/streams/transform.js +204 -0
- package/src/node-lib/internal/streams/utils.js +363 -0
- package/src/node-lib/internal/streams/writable.js +1163 -0
- package/src/node-lib/internal/tty.js +260 -0
- package/src/node-lib/internal/util/colors.js +40 -0
- package/src/node-lib/internal/util/comparisons.js +1028 -0
- package/src/node-lib/internal/util/debuglog.js +524 -0
- package/src/node-lib/internal/util/inspect.js +2535 -0
- package/src/node-lib/internal/util/parse_args/parse_args.js +412 -0
- package/src/node-lib/internal/util/parse_args/utils.js +197 -0
- package/src/node-lib/internal/util.js +1003 -0
- package/src/node-lib/internal/validators.js +654 -0
- package/src/node-lib/internals/addresses.ts +159 -0
- package/src/node-lib/internals/buffer-and-streams.ts +224 -0
- package/src/node-lib/internals/child-process.ts +64 -0
- package/src/node-lib/internals/events-util.ts +105 -0
- package/src/node-lib/internals/index.ts +66 -0
- package/src/node-lib/internals/modules.ts +117 -0
- package/src/node-lib/internals/readline-access.ts +16 -0
- package/src/node-lib/internals/runtime.ts +277 -0
- package/src/node-lib/internals/util.ts +98 -0
- package/src/node-lib/lazy.ts +158 -0
- package/src/node-lib/load.ts +390 -0
- package/src/node-lib/module-hooks.ts +281 -0
- package/src/node-lib/net-module.ts +248 -0
- package/src/node-lib/net.js +2540 -0
- package/src/node-lib/node-versions.ts +34 -0
- package/src/node-lib/os.js +356 -0
- package/src/node-lib/path.js +1694 -0
- package/src/node-lib/primordials.js +743 -0
- package/src/node-lib/public-modules.ts +109 -0
- package/src/node-lib/punycode.js +455 -0
- package/src/node-lib/querystring.js +484 -0
- package/src/node-lib/readline/promises.js +73 -0
- package/src/node-lib/readline.js +523 -0
- package/src/node-lib/require-hook.ts +27 -0
- package/src/node-lib/small-modules.ts +35 -0
- package/src/node-lib/sources.ts +200 -0
- package/src/node-lib/stream/promises.js +44 -0
- package/src/node-lib/stream-module.ts +101 -0
- package/src/node-lib/stream.js +152 -0
- package/src/node-lib/timers.ts +33 -0
- package/src/node-lib/tty.js +168 -0
- package/src/node-lib/util-module.ts +104 -0
- package/src/node-lib/util.js +689 -0
- package/src/node-lib/wasi.js +179 -0
- package/src/node-lib/zlib.js +1036 -0
- package/src/node-resolution.ts +241 -0
- package/src/node-resolver.ts +33 -0
- package/src/npm/index.ts +425 -0
- package/src/npm/registry.ts +235 -0
- package/src/npm/resolver.ts +589 -0
- package/src/npm/tarball.ts +246 -0
- package/src/process-tokens.ts +156 -0
- package/src/punycode-source.ts +6 -0
- package/src/runtime-interface.ts +85 -0
- package/src/runtime.ts +3073 -0
- package/src/server-bridge.ts +971 -0
- package/src/shims/async_hooks.ts +181 -0
- package/src/shims/child_process.ts +1591 -0
- package/src/shims/cluster.ts +79 -0
- package/src/shims/command-line.ts +79 -0
- package/src/shims/constants.ts +68 -0
- package/src/shims/crypto-constants.ts +11 -0
- package/src/shims/crypto.ts +1061 -0
- package/src/shims/dgram.ts +47 -0
- package/src/shims/dns.ts +185 -0
- package/src/shims/domain.ts +58 -0
- package/src/shims/esbuild.ts +1638 -0
- package/src/shims/fs.ts +82 -0
- package/src/shims/http2.ts +96 -0
- package/src/shims/inspector.ts +30 -0
- package/src/shims/module.ts +86 -0
- package/src/shims/os.ts +195 -0
- package/src/shims/path.ts +246 -0
- package/src/shims/perf_hooks.ts +92 -0
- package/src/shims/process.ts +804 -0
- package/src/shims/rollup.ts +149 -0
- package/src/shims/string_decoder.ts +396 -0
- package/src/shims/sync-child.ts +469 -0
- package/src/shims/tls.ts +94 -0
- package/src/shims/url.ts +217 -0
- package/src/shims/v8.ts +113 -0
- package/src/shims/vfs-adapter.ts +408 -0
- package/src/shims/vm.ts +132 -0
- package/src/shims/wasi.ts +1440 -0
- package/src/shims/worker_threads.ts +114 -0
- package/src/shims/zlib-constants.ts +65 -0
- package/src/shims/zlib.ts +228 -0
- package/src/transform.ts +324 -0
- package/src/types/external.d.ts +55 -0
- package/src/types/package-json.ts +17 -0
- package/src/types/pako-zlib.d.ts +30 -0
- package/src/types/sha.js.d.ts +14 -0
- package/src/utils/binary-encoding.ts +43 -0
- package/src/utils/glob.ts +54 -0
- package/src/utils/hash.ts +12 -0
- package/src/virtual-fs.ts +1048 -0
- package/src/vite-plugin.ts +76 -0
- package/src/worker/runtime-worker.ts +128 -0
- package/src/worker-runtime.ts +145 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
// copy of this software and associated documentation files (the
|
|
5
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
// following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included
|
|
12
|
+
// in all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
'use strict';
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
NumberIsInteger,
|
|
26
|
+
ObjectSetPrototypeOf,
|
|
27
|
+
} = primordials;
|
|
28
|
+
|
|
29
|
+
const net = require('net');
|
|
30
|
+
const { TTY, isTTY } = internalBinding('tty_wrap');
|
|
31
|
+
const {
|
|
32
|
+
ErrnoException,
|
|
33
|
+
codes: {
|
|
34
|
+
ERR_INVALID_FD,
|
|
35
|
+
ERR_TTY_INIT_FAILED,
|
|
36
|
+
},
|
|
37
|
+
} = require('internal/errors');
|
|
38
|
+
const {
|
|
39
|
+
getColorDepth,
|
|
40
|
+
hasColors,
|
|
41
|
+
} = require('internal/tty');
|
|
42
|
+
|
|
43
|
+
// Lazy loaded for startup performance.
|
|
44
|
+
let readline;
|
|
45
|
+
|
|
46
|
+
function isatty(fd) {
|
|
47
|
+
return NumberIsInteger(fd) && fd >= 0 && fd <= 2147483647 &&
|
|
48
|
+
isTTY(fd);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function ReadStream(fd, options) {
|
|
52
|
+
if (!(this instanceof ReadStream))
|
|
53
|
+
return new ReadStream(fd, options);
|
|
54
|
+
if (fd >> 0 !== fd || fd < 0)
|
|
55
|
+
throw new ERR_INVALID_FD(fd);
|
|
56
|
+
|
|
57
|
+
const ctx = {};
|
|
58
|
+
const tty = new TTY(fd, ctx);
|
|
59
|
+
if (ctx.code !== undefined) {
|
|
60
|
+
throw new ERR_TTY_INIT_FAILED(ctx);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
net.Socket.call(this, {
|
|
64
|
+
readableHighWaterMark: 0,
|
|
65
|
+
handle: tty,
|
|
66
|
+
manualStart: true,
|
|
67
|
+
...options,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this.isRaw = false;
|
|
71
|
+
this.isTTY = true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
ObjectSetPrototypeOf(ReadStream.prototype, net.Socket.prototype);
|
|
75
|
+
ObjectSetPrototypeOf(ReadStream, net.Socket);
|
|
76
|
+
|
|
77
|
+
ReadStream.prototype.setRawMode = function(flag) {
|
|
78
|
+
flag = !!flag;
|
|
79
|
+
const err = this._handle?.setRawMode(flag);
|
|
80
|
+
if (err) {
|
|
81
|
+
this.emit('error', new ErrnoException(err, 'setRawMode'));
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
this.isRaw = flag;
|
|
85
|
+
return this;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
function WriteStream(fd) {
|
|
89
|
+
if (!(this instanceof WriteStream))
|
|
90
|
+
return new WriteStream(fd);
|
|
91
|
+
if (fd >> 0 !== fd || fd < 0)
|
|
92
|
+
throw new ERR_INVALID_FD(fd);
|
|
93
|
+
|
|
94
|
+
const ctx = {};
|
|
95
|
+
const tty = new TTY(fd, ctx);
|
|
96
|
+
if (ctx.code !== undefined) {
|
|
97
|
+
throw new ERR_TTY_INIT_FAILED(ctx);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
net.Socket.call(this, {
|
|
101
|
+
readableHighWaterMark: 0,
|
|
102
|
+
handle: tty,
|
|
103
|
+
manualStart: true,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Prevents interleaved or dropped stdout/stderr output for terminals.
|
|
107
|
+
// As noted in the following reference, local TTYs tend to be quite fast and
|
|
108
|
+
// this behavior has become expected due historical functionality on OS X,
|
|
109
|
+
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
|
|
110
|
+
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
|
|
111
|
+
this._handle.setBlocking(true);
|
|
112
|
+
|
|
113
|
+
const winSize = [0, 0];
|
|
114
|
+
const err = this._handle.getWindowSize(winSize);
|
|
115
|
+
if (!err) {
|
|
116
|
+
this.columns = winSize[0];
|
|
117
|
+
this.rows = winSize[1];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
ObjectSetPrototypeOf(WriteStream.prototype, net.Socket.prototype);
|
|
122
|
+
ObjectSetPrototypeOf(WriteStream, net.Socket);
|
|
123
|
+
|
|
124
|
+
WriteStream.prototype.isTTY = true;
|
|
125
|
+
|
|
126
|
+
WriteStream.prototype.getColorDepth = getColorDepth;
|
|
127
|
+
|
|
128
|
+
WriteStream.prototype.hasColors = hasColors;
|
|
129
|
+
|
|
130
|
+
WriteStream.prototype._refreshSize = function() {
|
|
131
|
+
const oldCols = this.columns;
|
|
132
|
+
const oldRows = this.rows;
|
|
133
|
+
const winSize = [0, 0];
|
|
134
|
+
const err = this._handle.getWindowSize(winSize);
|
|
135
|
+
if (err) {
|
|
136
|
+
this.emit('error', new ErrnoException(err, 'getWindowSize'));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const { 0: newCols, 1: newRows } = winSize;
|
|
140
|
+
if (oldCols !== newCols || oldRows !== newRows) {
|
|
141
|
+
this.columns = newCols;
|
|
142
|
+
this.rows = newRows;
|
|
143
|
+
this.emit('resize');
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// Backwards-compat
|
|
148
|
+
WriteStream.prototype.cursorTo = function(x, y, callback) {
|
|
149
|
+
if (readline === undefined) readline = require('readline');
|
|
150
|
+
return readline.cursorTo(this, x, y, callback);
|
|
151
|
+
};
|
|
152
|
+
WriteStream.prototype.moveCursor = function(dx, dy, callback) {
|
|
153
|
+
if (readline === undefined) readline = require('readline');
|
|
154
|
+
return readline.moveCursor(this, dx, dy, callback);
|
|
155
|
+
};
|
|
156
|
+
WriteStream.prototype.clearLine = function(dir, callback) {
|
|
157
|
+
if (readline === undefined) readline = require('readline');
|
|
158
|
+
return readline.clearLine(this, dir, callback);
|
|
159
|
+
};
|
|
160
|
+
WriteStream.prototype.clearScreenDown = function(callback) {
|
|
161
|
+
if (readline === undefined) readline = require('readline');
|
|
162
|
+
return readline.clearScreenDown(this, callback);
|
|
163
|
+
};
|
|
164
|
+
WriteStream.prototype.getWindowSize = function() {
|
|
165
|
+
return [this.columns, this.rows];
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
module.exports = { isatty, ReadStream, WriteStream };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `util`, as Node's own `lib/util.js`.
|
|
3
|
+
*
|
|
4
|
+
* What died: the engine's `util` was hand-written, 632 lines, and its
|
|
5
|
+
* `inspect` was a recursive `JSON`-ish printer. Node's own `test-util-*`: 3
|
|
6
|
+
* of 27 passed. `inspect` is not a convenience -- it is what `console.log`
|
|
7
|
+
* prints, what an `AssertionError` shows, what a thrown object reads as in a
|
|
8
|
+
* stack, and what every one of Node's own tests compares against. A
|
|
9
|
+
* hand-written one disagrees with Node in the exact places a person is
|
|
10
|
+
* reading output to find out what went wrong.
|
|
11
|
+
*
|
|
12
|
+
* What this is: Node's `lib/util.js` and `lib/internal/util/inspect.js`
|
|
13
|
+
* v22.18.0, vendored unmodified, with `internal/util`, `internal/util/
|
|
14
|
+
* comparisons`, `internal/util/debuglog` and `internal/util/colors` beside
|
|
15
|
+
* them. `format`, `inspect`, `promisify`, `callbackify`, `deprecate`,
|
|
16
|
+
* `isDeepStrictEqual`, `parseArgs`, `styleText` and the rest are Node's own
|
|
17
|
+
* code.
|
|
18
|
+
*
|
|
19
|
+
* THE ONE NAMED LOSS: `internalBinding('util')`'s `getProxyDetails` and
|
|
20
|
+
* `getPromiseDetails` are V8 introspection, and no JavaScript in a tab can
|
|
21
|
+
* answer them -- a `Proxy` is invisible to the code it wraps by design, and a
|
|
22
|
+
* promise's state cannot be read without awaiting it. So `inspect` prints a
|
|
23
|
+
* proxy as the object it stands for (which is what Node prints without
|
|
24
|
+
* `--show-proxy`) and a promise as `Promise { <pending> }` whatever it has
|
|
25
|
+
* settled to. Everything else the binding is asked for -- an object's
|
|
26
|
+
* non-index properties, a constructor's name, a Map's or a Set's entries --
|
|
27
|
+
* the engine answers for real.
|
|
28
|
+
*
|
|
29
|
+
* The rule for this file: it binds, it does not implement.
|
|
30
|
+
*/
|
|
31
|
+
import { lazyModule, lazyExport } from './lazy';
|
|
32
|
+
|
|
33
|
+
/** What `util.inspect` takes. */
|
|
34
|
+
export interface InspectOptions {
|
|
35
|
+
depth?: number | null;
|
|
36
|
+
colors?: boolean;
|
|
37
|
+
showHidden?: boolean;
|
|
38
|
+
customInspect?: boolean;
|
|
39
|
+
showProxy?: boolean;
|
|
40
|
+
maxArrayLength?: number | null;
|
|
41
|
+
maxStringLength?: number | null;
|
|
42
|
+
breakLength?: number;
|
|
43
|
+
compact?: boolean | number;
|
|
44
|
+
sorted?: boolean | ((a: string, b: string) => number);
|
|
45
|
+
getters?: boolean | 'get' | 'set';
|
|
46
|
+
numericSeparator?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The whole of Node's `util` module object. */
|
|
50
|
+
export interface UtilModule {
|
|
51
|
+
format(...args: unknown[]): string;
|
|
52
|
+
formatWithOptions(options: InspectOptions, ...args: unknown[]): string;
|
|
53
|
+
inspect: ((value: unknown, options?: InspectOptions) => string) & {
|
|
54
|
+
custom: symbol;
|
|
55
|
+
colors: Record<string, [number, number]>;
|
|
56
|
+
styles: Record<string, string>;
|
|
57
|
+
defaultOptions: InspectOptions;
|
|
58
|
+
};
|
|
59
|
+
promisify: ((fn: (...args: never[]) => void) => (...args: never[]) => Promise<unknown>) & { custom: symbol };
|
|
60
|
+
callbackify(fn: (...args: never[]) => Promise<unknown>): (...args: never[]) => void;
|
|
61
|
+
deprecate<T>(fn: T, message: string, code?: string): T;
|
|
62
|
+
debuglog(section: string, callback?: (fn: (...args: unknown[]) => void) => void): (...args: unknown[]) => void;
|
|
63
|
+
debug: UtilModule['debuglog'];
|
|
64
|
+
isDeepStrictEqual(a: unknown, b: unknown): boolean;
|
|
65
|
+
parseArgs(config?: unknown): unknown;
|
|
66
|
+
parseEnv(content: string): Record<string, string>;
|
|
67
|
+
stripVTControlCharacters(value: string): string;
|
|
68
|
+
styleText(format: string | string[], text: string, options?: unknown): string;
|
|
69
|
+
toUSVString(value: string): string;
|
|
70
|
+
transferableAbortController(): AbortController;
|
|
71
|
+
transferableAbortSignal(signal: AbortSignal): AbortSignal;
|
|
72
|
+
aborted(signal: AbortSignal, resource: object): Promise<void>;
|
|
73
|
+
getSystemErrorName(errno: number): string;
|
|
74
|
+
getSystemErrorMap(): Map<number, [string, string]>;
|
|
75
|
+
getCallSites?: (frames?: number) => unknown[];
|
|
76
|
+
types: Record<string, (value: unknown) => boolean>;
|
|
77
|
+
TextEncoder: typeof TextEncoder;
|
|
78
|
+
TextDecoder: typeof TextDecoder;
|
|
79
|
+
MIMEType: unknown;
|
|
80
|
+
MIMEParams: unknown;
|
|
81
|
+
/** Node's deprecated type tests, still exported and still read by old packages. */
|
|
82
|
+
isArray(value: unknown): boolean;
|
|
83
|
+
isDate(value: unknown): boolean;
|
|
84
|
+
isError(value: unknown): boolean;
|
|
85
|
+
isFunction(value: unknown): boolean;
|
|
86
|
+
isNullOrUndefined(value: unknown): boolean;
|
|
87
|
+
isNumber(value: unknown): boolean;
|
|
88
|
+
isObject(value: unknown): boolean;
|
|
89
|
+
isPrimitive(value: unknown): boolean;
|
|
90
|
+
isRegExp(value: unknown): boolean;
|
|
91
|
+
isString(value: unknown): boolean;
|
|
92
|
+
isUndefined(value: unknown): boolean;
|
|
93
|
+
_extend(target: object, source: object): object;
|
|
94
|
+
inherits(constructor: unknown, superConstructor: unknown): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Node's own `util.js`, built by the loader on the first property read. */
|
|
98
|
+
export const utilModule = lazyModule<UtilModule>('util');
|
|
99
|
+
|
|
100
|
+
/** The two names the engine's own parts reach for directly. */
|
|
101
|
+
export const inspect = lazyExport<UtilModule['inspect']>('util', 'inspect');
|
|
102
|
+
export const format = lazyExport<UtilModule['format']>('util', 'format');
|
|
103
|
+
|
|
104
|
+
export default utilModule;
|