@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,122 @@
|
|
|
1
|
+
/** The callback slots Node hangs off a parser, by the index its C++ uses. */
|
|
2
|
+
declare const kOnMessageBegin = 0;
|
|
3
|
+
declare const kOnHeaders = 1;
|
|
4
|
+
declare const kOnHeadersComplete = 2;
|
|
5
|
+
declare const kOnBody = 3;
|
|
6
|
+
declare const kOnMessageComplete = 4;
|
|
7
|
+
declare const kOnExecute = 5;
|
|
8
|
+
declare const kOnTimeout = 6;
|
|
9
|
+
type ParserCallback = ((...args: never[]) => unknown) | null;
|
|
10
|
+
export declare class HTTPParser {
|
|
11
|
+
#private;
|
|
12
|
+
static readonly REQUEST = 1;
|
|
13
|
+
static readonly RESPONSE = 2;
|
|
14
|
+
static readonly kOnMessageBegin = 0;
|
|
15
|
+
static readonly kOnHeaders = 1;
|
|
16
|
+
static readonly kOnHeadersComplete = 2;
|
|
17
|
+
static readonly kOnBody = 3;
|
|
18
|
+
static readonly kOnMessageComplete = 4;
|
|
19
|
+
static readonly kOnExecute = 5;
|
|
20
|
+
static readonly kOnTimeout = 6;
|
|
21
|
+
/** Node's lenient flags. Each one llhttp itself can be told about is passed on. */
|
|
22
|
+
static readonly kLenientNone = 0;
|
|
23
|
+
static readonly kLenientHeaders = 1;
|
|
24
|
+
static readonly kLenientChunkedLength = 2;
|
|
25
|
+
static readonly kLenientKeepAlive = 4;
|
|
26
|
+
static readonly kLenientTransferEncoding = 8;
|
|
27
|
+
static readonly kLenientVersion = 16;
|
|
28
|
+
static readonly kLenientDataAfterClose = 32;
|
|
29
|
+
static readonly kLenientOptionalLFAfterCR = 64;
|
|
30
|
+
static readonly kLenientOptionalCRLFAfterChunk = 128;
|
|
31
|
+
static readonly kLenientOptionalCRBeforeLF = 256;
|
|
32
|
+
static readonly kLenientSpacesAfterChunkSize = 512;
|
|
33
|
+
static readonly kLenientAll = 1023;
|
|
34
|
+
[kOnMessageBegin]: ParserCallback;
|
|
35
|
+
[kOnHeaders]: ParserCallback;
|
|
36
|
+
[kOnHeadersComplete]: ParserCallback;
|
|
37
|
+
[kOnBody]: ParserCallback;
|
|
38
|
+
[kOnMessageComplete]: ParserCallback;
|
|
39
|
+
[kOnExecute]: ParserCallback;
|
|
40
|
+
[kOnTimeout]: ParserCallback;
|
|
41
|
+
/** The socket `_http_server.js` hangs on a parser, and reads off one here. */
|
|
42
|
+
socket?: {
|
|
43
|
+
destroy(): void;
|
|
44
|
+
} | null;
|
|
45
|
+
/** When this connection's current head and current message began, in ms. */
|
|
46
|
+
headersStart: number;
|
|
47
|
+
messageStart: number;
|
|
48
|
+
/** Whether a message is in flight, which is what `idle()` is the absence of. */
|
|
49
|
+
active: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* `parser.initialize(type, resource, maxHeaderSize, lenient, headersTimeout)`,
|
|
52
|
+
* which Node calls for every parser it takes off its free list.
|
|
53
|
+
*/
|
|
54
|
+
initialize(type: number, _resource?: unknown, maxHeaderSize?: number, lenient?: number, connections?: ConnectionsList): void;
|
|
55
|
+
/** Node's `parser.free()`: back on the free list, holding no llhttp state. */
|
|
56
|
+
free(): void;
|
|
57
|
+
/** Node's `parser.remove()`, which only matters for a consumed stream. */
|
|
58
|
+
remove(): void;
|
|
59
|
+
close(): void;
|
|
60
|
+
pause(): void;
|
|
61
|
+
resume(): void;
|
|
62
|
+
/** The engine's handles are not stream bases, so Node never consumes one. */
|
|
63
|
+
consume(): void;
|
|
64
|
+
unconsume(): void;
|
|
65
|
+
getCurrentBuffer(): Uint8Array;
|
|
66
|
+
/**
|
|
67
|
+
* `parser.execute(buffer)`: the bytes through llhttp, answering how many it
|
|
68
|
+
* took, or an `Error` carrying `bytesParsed`, the llhttp code and llhttp's
|
|
69
|
+
* own reason -- which is the shape `_http_server.js` reads to decide
|
|
70
|
+
* between a 400 and a destroyed socket.
|
|
71
|
+
*/
|
|
72
|
+
execute(buffer: Uint8Array): number | Error;
|
|
73
|
+
/** `parser.finish()`: the stream ended; llhttp says whether that was legal. */
|
|
74
|
+
finish(): number | Error | undefined;
|
|
75
|
+
onMessageBegin(): number;
|
|
76
|
+
onUrl(at: number, length: number): number;
|
|
77
|
+
onStatus(at: number, length: number): number;
|
|
78
|
+
onHeaderField(at: number, length: number): number;
|
|
79
|
+
onHeaderValue(at: number, length: number): number;
|
|
80
|
+
onHeadersComplete(statusCode: number, upgrade: boolean, shouldKeepAlive: boolean): number;
|
|
81
|
+
onBody(at: number, length: number): number;
|
|
82
|
+
onMessageComplete(): number;
|
|
83
|
+
/** Off the list it was initialized onto; `free` is where Node lets one go. */
|
|
84
|
+
detach(): void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* `internalBinding('http_parser')`'s `ConnectionsList`: the parsers a server
|
|
88
|
+
* has open, which is how `_http_server.js` closes its connections and
|
|
89
|
+
* enforces `headersTimeout` and `requestTimeout`. Node keeps the list in C++
|
|
90
|
+
* beside the parsers themselves; here it is a set of the same parsers, and
|
|
91
|
+
* each answers from the timestamps llhttp's own callbacks set on it.
|
|
92
|
+
*/
|
|
93
|
+
export declare class ConnectionsList {
|
|
94
|
+
#private;
|
|
95
|
+
add(parser: HTTPParser): void;
|
|
96
|
+
remove(parser: HTTPParser): void;
|
|
97
|
+
all(): HTTPParser[];
|
|
98
|
+
/** A connection with no message in flight. */
|
|
99
|
+
idle(): HTTPParser[];
|
|
100
|
+
/** A connection with one. */
|
|
101
|
+
active(): HTTPParser[];
|
|
102
|
+
/**
|
|
103
|
+
* The connections that have taken too long: one whose head is still
|
|
104
|
+
* arriving after `headersTimeout`, or whose message has been in flight past
|
|
105
|
+
* `requestTimeout`. A timeout of 0 is off, as it is in Node.
|
|
106
|
+
*/
|
|
107
|
+
expired(headersTimeout: number, requestTimeout: number): HTTPParser[];
|
|
108
|
+
}
|
|
109
|
+
/** The binding object, built on the first ask. */
|
|
110
|
+
export declare const httpParserBinding: {
|
|
111
|
+
HTTPParser: typeof HTTPParser;
|
|
112
|
+
ConnectionsList: typeof ConnectionsList;
|
|
113
|
+
/**
|
|
114
|
+
* `http.METHODS`: the HTTP methods, which are the ones llhttp lists before
|
|
115
|
+
* `PRI` -- that is where its RTSP block begins, and RTSP's verbs are not
|
|
116
|
+
* HTTP's. Read off the same table as `allMethods`, so the two cannot drift.
|
|
117
|
+
*/
|
|
118
|
+
readonly methods: string[];
|
|
119
|
+
readonly allMethods: string[];
|
|
120
|
+
};
|
|
121
|
+
export default httpParserBinding;
|
|
122
|
+
//# sourceMappingURL=http_parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http_parser.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/http_parser.ts"],"names":[],"mappings":"AAuCA,6EAA6E;AAC7E,QAAA,MAAM,eAAe,IAAI,CAAC;AAC1B,QAAA,MAAM,UAAU,IAAI,CAAC;AACrB,QAAA,MAAM,kBAAkB,IAAI,CAAC;AAC7B,QAAA,MAAM,OAAO,IAAI,CAAC;AAClB,QAAA,MAAM,kBAAkB,IAAI,CAAC;AAC7B,QAAA,MAAM,UAAU,IAAI,CAAC;AACrB,QAAA,MAAM,UAAU,IAAI,CAAC;AA4HrB,KAAK,cAAc,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC,GAAG,IAAI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AG,MAAM;IAwBzF,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAS1C,iBAAiB,IAAI,MAAM;IAoB3B,8EAA8E;IAC9E,MAAM,IAAI,IAAI;CACf;AAED;;;;;;GAMG;AACH,qBAAa,eAAe;;IAG1B,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAC7B,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAEhC,GAAG,IAAI,UAAU,EAAE;IAEnB,8CAA8C;IAC9C,IAAI,IAAI,UAAU,EAAE;IAEpB,6BAA6B;IAC7B,MAAM,IAAI,UAAU,EAAE;IAEtB;;;;OAIG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,UAAU,EAAE;CAQtE;AAED,kDAAkD;AAClD,eAAO,MAAM,iBAAiB;;;IAG5B;;;;OAIG;sBACY,MAAM,EAAE;yBAKL,MAAM,EAAE;CAC3B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/index.ts"],"names":[],"mappings":"AAwCA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAgCxE;AAED,OAAO,EACL,kBAAkB,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,GACvE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* llhttp, compiled to WebAssembly.
|
|
3
|
+
*
|
|
4
|
+
* VENDORED ARTIFACT, UNMODIFIED. This is the build undici ships -- llhttp is
|
|
5
|
+
* the parser Node itself links, and undici is the one project that already
|
|
6
|
+
* compiles it for a runtime with no C in it, which is what a tab is.
|
|
7
|
+
*
|
|
8
|
+
* source: undici 6.28.0, lib/llhttp/llhttp-wasm.js
|
|
9
|
+
* bytes: 48615
|
|
10
|
+
* sha256: b96063c7ce14045f91f17489d8b30a2bf5129308bd801d7dde715579d16d0e21
|
|
11
|
+
* license: MIT (llhttp, nodejs/llhttp; undici, nodejs/undici)
|
|
12
|
+
*
|
|
13
|
+
* The base64 below is that file's own payload, byte for byte; nothing here is
|
|
14
|
+
* edited. `./http_parser.ts` instantiates it and gives Node's own
|
|
15
|
+
* `_http_common.js` the `HTTPParser` it expects on top.
|
|
16
|
+
*
|
|
17
|
+
* The non-SIMD build is the one taken: a tab's WebAssembly does not promise
|
|
18
|
+
* SIMD, and llhttp's SIMD path buys throughput this engine is nowhere near
|
|
19
|
+
* needing.
|
|
20
|
+
*/
|
|
21
|
+
export declare const LLHTTP_WASM_BASE64: string;
|
|
22
|
+
//# sourceMappingURL=llhttp-wasm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llhttp-wasm.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/llhttp-wasm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,QAyoBP,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export declare const constantsBinding: Record<string, unknown>;
|
|
2
|
+
export declare const osBinding: {
|
|
3
|
+
/** Node's `os.type()`, `release()` and `version()`, in that order. */
|
|
4
|
+
getOSInformation: () => string[];
|
|
5
|
+
getHostname: () => string;
|
|
6
|
+
getHomeDirectory: () => string;
|
|
7
|
+
getUptime: () => number;
|
|
8
|
+
getTotalMem: () => number;
|
|
9
|
+
getFreeMem: () => number;
|
|
10
|
+
getLoadAvg: (array: Float64Array) => void;
|
|
11
|
+
getAvailableParallelism: () => number;
|
|
12
|
+
isBigEndian: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Node reads its CPU list as a flat array: a model and a speed, then the
|
|
15
|
+
* five time counters, for each core.
|
|
16
|
+
*/
|
|
17
|
+
getCPUs: () => Array<string | number>;
|
|
18
|
+
/**
|
|
19
|
+
* The same shape for interfaces: name, address, netmask, family, mac,
|
|
20
|
+
* scope id, then the CIDR, per address.
|
|
21
|
+
*/
|
|
22
|
+
getInterfaceAddresses: () => Array<string | number | boolean>;
|
|
23
|
+
getUserInfo: () => Record<string, unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* A process's niceness. A tab has no scheduler to hand it to, but the pair
|
|
26
|
+
* still has to agree: a program that sets a priority and reads it back must
|
|
27
|
+
* see what it set, which is what `test-os.js` checks. The value is this
|
|
28
|
+
* engine's, per pid, and changes nothing about how anything runs.
|
|
29
|
+
*/
|
|
30
|
+
getPriority: (pid: number) => number;
|
|
31
|
+
setPriority: (pid: number, priority: number) => number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* `internalBinding('credentials')`: the one name `os.js` takes from it. A tab
|
|
35
|
+
* has no environment of its own to read `TMPDIR` from, so the answer is the
|
|
36
|
+
* directory the engine's `os` calls its temporary one.
|
|
37
|
+
*/
|
|
38
|
+
export declare const credentialsBinding: {
|
|
39
|
+
/**
|
|
40
|
+
* Where a temporary file goes. Node reads `TMPDIR`, then `TMP`, then
|
|
41
|
+
* `TEMP` from the environment and falls back to the platform's directory,
|
|
42
|
+
* dropping a trailing slash; a program that sets `TMPDIR` expects to be
|
|
43
|
+
* obeyed, which is what `test-os.js` checks.
|
|
44
|
+
*/
|
|
45
|
+
getTempDir: () => string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* `internalBinding('encoding_binding')`: the punycode conversion `url.js`
|
|
49
|
+
* makes for a host name, out of the engine's own `punycode`.
|
|
50
|
+
*/
|
|
51
|
+
export declare const encodingBinding: {
|
|
52
|
+
toASCII: (value: string) => string;
|
|
53
|
+
toUnicode: (value: string) => string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* `internalBinding('config')`: the build switches Node's own files read. The
|
|
57
|
+
* engine has no ICU, so `buffer.transcode` is not defined -- which is what
|
|
58
|
+
* Node without ICU does, and is the one thing `buffer.js` loses here.
|
|
59
|
+
*/
|
|
60
|
+
export declare const configBinding: {
|
|
61
|
+
hasIntl: boolean;
|
|
62
|
+
hasSmallICU: boolean;
|
|
63
|
+
hasNodeOptions: boolean;
|
|
64
|
+
hasInspector: boolean;
|
|
65
|
+
noBrowserGlobals: boolean;
|
|
66
|
+
bits: number;
|
|
67
|
+
hasOpenSSL: boolean;
|
|
68
|
+
fipsMode: boolean;
|
|
69
|
+
hasDtrace: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* `internalBinding('fs')`: `internal/net.js`'s `makeSyncWrite` writes a
|
|
73
|
+
* descriptor synchronously, which Node does only for Windows' stdout and
|
|
74
|
+
* stderr. The engine's platform is `linux` and nothing reaches it.
|
|
75
|
+
*/
|
|
76
|
+
export declare const fsBinding: {
|
|
77
|
+
writeBuffer: (_fd: number, _buffer: Uint8Array, _offset: number, _length: number, _position: unknown, _req: unknown, ctx: {
|
|
78
|
+
errno?: number;
|
|
79
|
+
syscall?: string;
|
|
80
|
+
}) => number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* `internalBinding('types')`: V8's own type tests. The engine answers them
|
|
84
|
+
* out of the realm's built-ins, and `internal/util/types` is the same object
|
|
85
|
+
* -- Node's own `util.types` is that binding with a doc comment on it.
|
|
86
|
+
*/
|
|
87
|
+
export { internalUtilTypes as typesBinding } from '../internals/util';
|
|
88
|
+
/**
|
|
89
|
+
* `internalBinding('string_decoder')`: `internal/util.js` reads the table of
|
|
90
|
+
* encoding names out of it to normalize one.
|
|
91
|
+
*/
|
|
92
|
+
export declare const stringDecoderBinding: {
|
|
93
|
+
encodings: string[];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* `internalBinding('trace_events')`: the tracing category buffer
|
|
97
|
+
* `internal/util/debuglog.js` reads to decide whether a section is traced.
|
|
98
|
+
* Nothing in a tab is traced, so every category reads 0 -- which is what
|
|
99
|
+
* `debuglog` checks before it formats anything.
|
|
100
|
+
*/
|
|
101
|
+
export declare const traceEventsBinding: {
|
|
102
|
+
getCategoryEnabledBuffer: () => Uint8Array;
|
|
103
|
+
trace: () => void;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* `internalBinding('messaging')`: `internal/util.js` reaches for
|
|
107
|
+
* `DOMException` through it, which the realm already has.
|
|
108
|
+
*/
|
|
109
|
+
export declare const messagingBinding: {
|
|
110
|
+
readonly DOMException: unknown;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* `internalBinding('errors')`: the one call `diagnostics_channel.js` makes
|
|
114
|
+
* into it. A subscriber that throws must not be swallowed and must not take
|
|
115
|
+
* the publisher with it, so Node hands the error to the process as an
|
|
116
|
+
* uncaught exception. The engine has that door already -- it is how a run
|
|
117
|
+
* reports a throw nobody caught -- and this reaches it through the realm's
|
|
118
|
+
* own process, which is the run's.
|
|
119
|
+
*/
|
|
120
|
+
export declare const errorsBinding: {
|
|
121
|
+
triggerUncaughtException: (error: unknown, fromPromise?: boolean) => void;
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=misc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/misc.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,gBAAgB,yBAc3B,CAAC;AAUH,eAAO,MAAM,SAAS;IACpB,sEAAsE;4BAChD,MAAM,EAAE;uBACb,MAAM;4BACD,MAAM;qBACb,MAAM;uBACJ,MAAM;sBACP,MAAM;wBACF,YAAY,KAAG,IAAI;mCAIV,MAAM;;IAEnC;;;OAGG;mBACU,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAOnC;;;OAGG;iCACwB,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;uBAU1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxC;;;;;OAKG;uBACgB,MAAM,KAAG,MAAM;uBACf,MAAM,YAAY,MAAM,KAAG,MAAM;CAKrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;;;;OAKG;sBACa,MAAM;CAMvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;qBACT,MAAM,KAAG,MAAM;uBACb,MAAM,KAAG,MAAM;CACnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;CAUzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS;uBACD,MAAM,WAAW,UAAU,WAAW,MAAM,WAAW,MAAM,aACnE,OAAO,QAAQ,OAAO,OAAO;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAG,MAAM;CAKxF,CAAC;AAGF;;;;GAIG;AACH,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;oCACC,UAAU;iBAC7B,IAAI;CAChB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAGF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;sCACU,OAAO,4BAAwB,IAAI;CAatE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `internalBinding('pipe_wrap')`: the same loopback, named by a path.
|
|
3
|
+
*
|
|
4
|
+
* VS Code's extension host is started by its parent and connects back to it
|
|
5
|
+
* over a unix-domain socket path: the parent runs `server.listen(path)` and
|
|
6
|
+
* the child `net.connect(path)`. A path is a name in one registry here, as a
|
|
7
|
+
* port is a number in the other; nothing on the path is `ENOENT`, which is
|
|
8
|
+
* what Node answers, and a path a live server already holds is `EADDRINUSE`.
|
|
9
|
+
*
|
|
10
|
+
* The IPC flavour is the same stream with one extra: a write may carry a
|
|
11
|
+
* handle, which is set on the peer before the peer's read, and that is how
|
|
12
|
+
* `setupChannel` in `internal/child_process.js` receives a sent socket.
|
|
13
|
+
*/
|
|
14
|
+
import { LibuvStreamWrap, type WriteWrap } from './stream_wrap';
|
|
15
|
+
/** libuv's `uv_pipe_t` flavours, and the two chmod bits `listen` reads. */
|
|
16
|
+
export declare const constants: {
|
|
17
|
+
SOCKET: number;
|
|
18
|
+
SERVER: number;
|
|
19
|
+
IPC: number;
|
|
20
|
+
UV_READABLE: number;
|
|
21
|
+
UV_WRITABLE: number;
|
|
22
|
+
};
|
|
23
|
+
/** Node's `PipeConnectWrap`: the request a pipe connect is answered through. */
|
|
24
|
+
export declare class PipeConnectWrap {
|
|
25
|
+
oncomplete: ((status: number, handle: unknown, req: unknown, readable: boolean, writable: boolean) => void) | null;
|
|
26
|
+
address: string;
|
|
27
|
+
}
|
|
28
|
+
/** The listening pipe a connect to this path reaches, if any. */
|
|
29
|
+
export declare function listenerOnPath(path: string): Pipe | undefined;
|
|
30
|
+
export declare class Pipe extends LibuvStreamWrap {
|
|
31
|
+
readonly type: number;
|
|
32
|
+
listening: boolean;
|
|
33
|
+
onconnection: ((status: number, clientHandle: Pipe) => void) | null;
|
|
34
|
+
private path;
|
|
35
|
+
private ownFd;
|
|
36
|
+
constructor(type?: number);
|
|
37
|
+
bind(path: string): number;
|
|
38
|
+
listen(_backlog: number): number;
|
|
39
|
+
connect(req: PipeConnectWrap, path: string): number;
|
|
40
|
+
/**
|
|
41
|
+
* The descriptor of a handle the engine itself opened — a forked child's IPC
|
|
42
|
+
* channel among them. There is nothing else to open: the engine has no
|
|
43
|
+
* descriptors of its own beyond the ones it hands out. Opening one takes
|
|
44
|
+
* over that end of its pairing, with whatever arrived on it before anyone
|
|
45
|
+
* opened it, because a child's channel is written to before the child runs.
|
|
46
|
+
*/
|
|
47
|
+
open(fd: number): number;
|
|
48
|
+
/** The descriptor this handle can be reached at, for a child's stdio table. */
|
|
49
|
+
toFd(): number;
|
|
50
|
+
/** libuv's `dup()`: the same pairing, under the same flavour. */
|
|
51
|
+
duplicate(): Pipe;
|
|
52
|
+
/** There is no filesystem entry behind an engine pipe to change the mode of. */
|
|
53
|
+
fchmod(_mode: number): number;
|
|
54
|
+
/** Windows asks for more pipe instances; the engine has one realm and one. */
|
|
55
|
+
setPendingInstances(_count: number): number;
|
|
56
|
+
/**
|
|
57
|
+
* An IPC write may carry a handle. The peer is given it before the bytes, so
|
|
58
|
+
* `setupChannel`'s reader sees `channel.pendingHandle` when the message it
|
|
59
|
+
* belongs to arrives, which is the order Node delivers them in.
|
|
60
|
+
*
|
|
61
|
+
* The handle becomes the receiving run's. Node's `send(message, socket)`
|
|
62
|
+
* duplicates the sender's descriptor into the other process, and from then
|
|
63
|
+
* on the socket is an active handle of that process's loop; here parent and
|
|
64
|
+
* child are one realm and there is nothing to duplicate, so the move is the
|
|
65
|
+
* run ownership the engine counts. Without it, openvscode-server's extension
|
|
66
|
+
* host -- a program whose only handle is the socket its parent sent it --
|
|
67
|
+
* read as idle and was settled with exit 0.
|
|
68
|
+
*/
|
|
69
|
+
writeUtf8String(req: WriteWrap, text: string, handle?: unknown): number;
|
|
70
|
+
protected onCloseHandle(): void;
|
|
71
|
+
}
|
|
72
|
+
declare const _default: {
|
|
73
|
+
Pipe: typeof Pipe;
|
|
74
|
+
PipeConnectWrap: typeof PipeConnectWrap;
|
|
75
|
+
constants: {
|
|
76
|
+
SOCKET: number;
|
|
77
|
+
SERVER: number;
|
|
78
|
+
IPC: number;
|
|
79
|
+
UV_READABLE: number;
|
|
80
|
+
UV_WRITABLE: number;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default _default;
|
|
84
|
+
//# sourceMappingURL=pipe_wrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe_wrap.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/pipe_wrap.ts"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AG,MAAM;IAI3C;;;;;;;;;;;;OAYG;IACM,eAAe,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM;cAgB7D,aAAa,IAAI,IAAI;CAMzC;;;;;;;;;;;;AAED,wBAAoD"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `internalBinding('process_wrap')`: one run of the engine, seen as libuv sees
|
|
3
|
+
* a child process.
|
|
4
|
+
*
|
|
5
|
+
* libuv's `uv_spawn` starts a program with its descriptors already wired and
|
|
6
|
+
* answers through `onexit` when it ends; `uv_process_kill` ends it. That is
|
|
7
|
+
* the whole of what `internal/child_process.js` asks of a process, and it is
|
|
8
|
+
* the whole of this file. Nothing here knows about `ChildProcess`, `stdio`
|
|
9
|
+
* streams, `exec`'s buffering, `fork`'s IPC protocol or what a signal means:
|
|
10
|
+
* those are Node's own and are vendored.
|
|
11
|
+
*
|
|
12
|
+
* What the engine already did for a spawned command stays and becomes this
|
|
13
|
+
* file's implementation, through the one door the engine's process model
|
|
14
|
+
* installs below: the routing of a command to the engine's `node`, to a
|
|
15
|
+
* program the page registered, to a WALI pack, or to the shell. A `pipe`
|
|
16
|
+
* stdio entry is paired with an end of its own here, so the child's writes to
|
|
17
|
+
* fd 1 are reads on the parent's handle and the parent's writes to the stdin
|
|
18
|
+
* handle are the child's fd 0 -- which is what a `uv_stdio_container_t` with
|
|
19
|
+
* `UV_CREATE_PIPE` is.
|
|
20
|
+
*/
|
|
21
|
+
import { LibuvStreamWrap } from './stream_wrap';
|
|
22
|
+
import { Pipe } from './pipe_wrap';
|
|
23
|
+
import { type OwnedHandle } from './handles';
|
|
24
|
+
import type { ProcessToken } from '../../process-tokens';
|
|
25
|
+
/** One entry of Node's `options.stdio`, as `getValidStdio` builds it. */
|
|
26
|
+
export interface StdioEntry {
|
|
27
|
+
type: 'pipe' | 'overlapped' | 'ignore' | 'inherit' | 'fd' | 'wrap';
|
|
28
|
+
handle?: LibuvStreamWrap;
|
|
29
|
+
fd?: number;
|
|
30
|
+
ipc?: boolean;
|
|
31
|
+
readable?: boolean;
|
|
32
|
+
writable?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** What `ChildProcess.prototype.spawn` hands `Process.spawn`. */
|
|
35
|
+
export interface ProcessSpawnOptions {
|
|
36
|
+
file: string;
|
|
37
|
+
args?: string[];
|
|
38
|
+
cwd?: string;
|
|
39
|
+
envPairs?: string[];
|
|
40
|
+
stdio: StdioEntry[];
|
|
41
|
+
detached?: boolean;
|
|
42
|
+
windowsHide?: boolean;
|
|
43
|
+
uid?: number;
|
|
44
|
+
gid?: number;
|
|
45
|
+
}
|
|
46
|
+
/** The channel a forked child is started with, at the descriptor it is told. */
|
|
47
|
+
export interface RunChannel {
|
|
48
|
+
/** The number the child's `NODE_CHANNEL_FD` names. */
|
|
49
|
+
fd: number;
|
|
50
|
+
/** The child's end of the channel, which its own `Pipe.open(fd)` finds. */
|
|
51
|
+
pipe: Pipe;
|
|
52
|
+
/** `json` or `advanced`, as `NODE_CHANNEL_SERIALIZATION_MODE` says. */
|
|
53
|
+
serialization: string;
|
|
54
|
+
}
|
|
55
|
+
/** What the binding asks the engine's process model to run. */
|
|
56
|
+
export interface RunRequest {
|
|
57
|
+
/** The program, as the caller named it: a path, a name, or the shell. */
|
|
58
|
+
file: string;
|
|
59
|
+
/** argv, the file first, as Node builds it. */
|
|
60
|
+
args: string[];
|
|
61
|
+
cwd?: string;
|
|
62
|
+
env: Record<string, string>;
|
|
63
|
+
detached: boolean;
|
|
64
|
+
/** Where the child's fd 1 goes; null where nothing reads it. */
|
|
65
|
+
stdout: ((text: string) => void) | null;
|
|
66
|
+
/** Where the child's fd 2 goes; null where nothing reads it. */
|
|
67
|
+
stderr: ((text: string) => void) | null;
|
|
68
|
+
/**
|
|
69
|
+
* True when fd 2 is a pipe the parent holds. A run that ends uncaught or
|
|
70
|
+
* with a nonzero `process.exit` on that pipe writes one receipt to the
|
|
71
|
+
* host realm's console, because the parent may never read the pipe — the
|
|
72
|
+
* tab's extension host dies this way, its stderr going into `@vscode/spdlog`
|
|
73
|
+
* which does not load. Inherit and the host's own stdio are false.
|
|
74
|
+
*/
|
|
75
|
+
stderrIsPipe: boolean;
|
|
76
|
+
/** True when the child's fd 0 is a pipe whose writer has not closed. */
|
|
77
|
+
stdinIsPipe: boolean;
|
|
78
|
+
/** The IPC channel the child is started with, where it has one. */
|
|
79
|
+
channel?: RunChannel;
|
|
80
|
+
/** Called once, when the run has ended. */
|
|
81
|
+
exit(code: number, signal: string | null): void;
|
|
82
|
+
}
|
|
83
|
+
/** One run in flight, as the engine's process model hands it back. */
|
|
84
|
+
export interface StartedRun {
|
|
85
|
+
/** The run's own name, so a handle it holds is counted as its own. */
|
|
86
|
+
token: ProcessToken | null;
|
|
87
|
+
/** The run's process number, which is what its own `process.pid` reports. */
|
|
88
|
+
pid?: number;
|
|
89
|
+
/** libuv's `uv_process_kill`: 0, or `UV_ESRCH` for a run already over. */
|
|
90
|
+
kill(signal: string): number;
|
|
91
|
+
/** Bytes the parent wrote to the child's fd 0. */
|
|
92
|
+
writeStdin(bytes: Uint8Array): void;
|
|
93
|
+
/** The parent closed the child's fd 0. */
|
|
94
|
+
endStdin(): void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The engine's process model, installed by `initChildProcess`. Until it is
|
|
98
|
+
* there is no engine to run anything, and a spawn answers `ENOENT`, which is
|
|
99
|
+
* what a machine carrying no such program answers.
|
|
100
|
+
*/
|
|
101
|
+
export interface ProcessRunner {
|
|
102
|
+
/** Whether the engine has a program under this name at all. */
|
|
103
|
+
resolves(request: RunRequest): boolean;
|
|
104
|
+
start(request: RunRequest): StartedRun;
|
|
105
|
+
}
|
|
106
|
+
/** The engine's process model takes this door once, when the VFS is known. */
|
|
107
|
+
export declare function setProcessRunner(next: ProcessRunner): void;
|
|
108
|
+
/**
|
|
109
|
+
* libuv's `uv_process_t`.
|
|
110
|
+
*
|
|
111
|
+
* The handle registers with the run that made it, as every handle here does,
|
|
112
|
+
* so a parent waiting on a child is not idle: Node's loop holds a process
|
|
113
|
+
* handle exactly that way, and `unref()` is how a program gives it up.
|
|
114
|
+
*/
|
|
115
|
+
export declare class Process implements OwnedHandle {
|
|
116
|
+
/** Set by `internal/child_process.js`; the only way an end is reported. */
|
|
117
|
+
onexit: ((exitCode: number, signalCode: string | null) => void) | null;
|
|
118
|
+
/**
|
|
119
|
+
* A process that never started has no pid, and `ChildProcess` copies this
|
|
120
|
+
* one straight onto itself: a child whose `spawn` answered `ENOENT` reports
|
|
121
|
+
* `pid === undefined`, as Node's does, rather than a number naming nothing.
|
|
122
|
+
*/
|
|
123
|
+
pid: number | undefined;
|
|
124
|
+
private run;
|
|
125
|
+
private ended;
|
|
126
|
+
private closed;
|
|
127
|
+
/** The stdio entries this run was started with, and their far ends. */
|
|
128
|
+
private stdio;
|
|
129
|
+
private readonly asyncId;
|
|
130
|
+
constructor();
|
|
131
|
+
getAsyncId(): number;
|
|
132
|
+
ref(): void;
|
|
133
|
+
unref(): void;
|
|
134
|
+
hasRef(): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* libuv's `uv_spawn`. Answers 0 for a run that started and a `UV_*` code for
|
|
137
|
+
* one that could not, which is what `ChildProcess.prototype.spawn` turns
|
|
138
|
+
* into an `error` event or a throw.
|
|
139
|
+
*/
|
|
140
|
+
spawn(options: ProcessSpawnOptions): number;
|
|
141
|
+
/**
|
|
142
|
+
* libuv's `uv_process_kill`: the run ends, or it was over already. Signal 0
|
|
143
|
+
* is the question "is it still there?", which kills nothing and answers 0
|
|
144
|
+
* for a run in flight and `ESRCH` for one that has ended.
|
|
145
|
+
*/
|
|
146
|
+
kill(signal: number | string): number;
|
|
147
|
+
close(callback?: () => void): void;
|
|
148
|
+
/**
|
|
149
|
+
* The other half of a `pipe` entry: the end the child holds. It belongs to
|
|
150
|
+
* no run -- the parent holds the handle Node gave it and the child holds the
|
|
151
|
+
* one it opens; this is the wire between them.
|
|
152
|
+
*/
|
|
153
|
+
private pairFarEnd;
|
|
154
|
+
/** The far end of fd `index`, whoever holds it now. */
|
|
155
|
+
private farEndAt;
|
|
156
|
+
private closeFarEnds;
|
|
157
|
+
/** The child wrote to fd `index`; the parent's handle reads it. */
|
|
158
|
+
private toPipe;
|
|
159
|
+
/** Bytes the parent writes reach the child's fd 0; the parent's EOF ends it. */
|
|
160
|
+
private readStdinFrom;
|
|
161
|
+
/**
|
|
162
|
+
* The run has ended. The child's ends of the pairings close, so the parent's
|
|
163
|
+
* streams read EOF as they do when a real child's descriptors go, and
|
|
164
|
+
* `onexit` fires once, after them: Node's `flushStdio` runs on the tick
|
|
165
|
+
* after `onexit` and must find the bytes already delivered.
|
|
166
|
+
*/
|
|
167
|
+
private reportExit;
|
|
168
|
+
}
|
|
169
|
+
declare const _default: {
|
|
170
|
+
Process: typeof Process;
|
|
171
|
+
};
|
|
172
|
+
export default _default;
|
|
173
|
+
//# sourceMappingURL=process_wrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process_wrap.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/process_wrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAA8B,MAAM,aAAa,CAAC;AAE/D,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;IACnE,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,OAA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O;IAIjB;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM;IAmE3C;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAMrC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAQlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IASlB,uDAAuD;IACvD,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,YAAY;IAQpB,mEAAmE;IACnE,OAAO,CAAC,MAAM;IAMd,gFAAgF;IAChF,OAAO,CAAC,aAAa;IASrB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;CAQnB;;;;AAED,wBAA2B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** One entry of Node's `options.stdio`, as `getValidStdio(stdio, true)` builds it. */
|
|
2
|
+
interface SyncStdioEntry {
|
|
3
|
+
type: 'pipe' | 'overlapped' | 'ignore' | 'inherit' | 'fd' | 'wrap';
|
|
4
|
+
fd?: number;
|
|
5
|
+
input?: Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
/** What `child_process.js`'s `spawnSync` hands the binding. */
|
|
8
|
+
interface SyncSpawnOptions {
|
|
9
|
+
file: string;
|
|
10
|
+
args?: string[];
|
|
11
|
+
cwd?: string;
|
|
12
|
+
envPairs?: string[];
|
|
13
|
+
stdio?: SyncStdioEntry[];
|
|
14
|
+
maxBuffer?: number;
|
|
15
|
+
killSignal?: number;
|
|
16
|
+
}
|
|
17
|
+
/** What libuv answers for one synchronous child. */
|
|
18
|
+
interface SyncSpawnResult {
|
|
19
|
+
pid: number;
|
|
20
|
+
output: Array<Uint8Array | null> | null;
|
|
21
|
+
status: number | null;
|
|
22
|
+
signal: string | null;
|
|
23
|
+
error?: number;
|
|
24
|
+
}
|
|
25
|
+
declare function spawn(options: SyncSpawnOptions): SyncSpawnResult;
|
|
26
|
+
declare const _default: {
|
|
27
|
+
spawn: typeof spawn;
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=spawn_sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn_sync.d.ts","sourceRoot":"","sources":["../../../src/node-lib/binding/spawn_sync.ts"],"names":[],"mappings":"AAiBA,sFAAsF;AACtF,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;IACnE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,+DAA+D;AAC/D,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oDAAoD;AACpD,UAAU,eAAe;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACxC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqCD,iBAAS,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CA2DzD;;;;AAED,wBAAyB"}
|