@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,79 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
* cluster shim - Clustering is not available in browser
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { EventEmitter } from '../node-lib/events-module';
|
|
7
|
+
|
|
8
|
+
export const isMaster = true;
|
|
9
|
+
export const isPrimary = true;
|
|
10
|
+
export const isWorker = false;
|
|
11
|
+
|
|
12
|
+
export class Worker extends EventEmitter {
|
|
13
|
+
id = 0;
|
|
14
|
+
process = null;
|
|
15
|
+
send(_message: unknown, _callback?: (error: Error | null) => void): boolean {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
kill(_signal?: string): void {}
|
|
19
|
+
disconnect(): void {}
|
|
20
|
+
isDead(): boolean { return false; }
|
|
21
|
+
isConnected(): boolean { return false; }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const worker: Worker | null = null;
|
|
25
|
+
export const workers: Record<number, Worker> = {};
|
|
26
|
+
|
|
27
|
+
export function fork(_env?: object): Worker {
|
|
28
|
+
return new Worker();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function disconnect(_callback?: () => void): void {
|
|
32
|
+
if (_callback) setTimeout(_callback, 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const settings = {};
|
|
36
|
+
export const SCHED_NONE = 1;
|
|
37
|
+
export const SCHED_RR = 2;
|
|
38
|
+
export let schedulingPolicy = SCHED_RR;
|
|
39
|
+
|
|
40
|
+
export function setupMaster(_settings?: object): void {}
|
|
41
|
+
export function setupPrimary(_settings?: object): void {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The emitter a `cluster` is, built on the first listener rather than when
|
|
45
|
+
* this file is evaluated. `EventEmitter` is a name that stands for Node's own
|
|
46
|
+
* class until the loader can build it, and constructing one at module scope
|
|
47
|
+
* forces that load while the module graph is still being evaluated -- which
|
|
48
|
+
* is a cycle the loader is inside of, and there is no first member of it.
|
|
49
|
+
*/
|
|
50
|
+
// eslint-disable-next-line no-var, vars-on-top
|
|
51
|
+
var clusterEmitterCache: EventEmitter | undefined;
|
|
52
|
+
function clusterEmitter(): EventEmitter {
|
|
53
|
+
return clusterEmitterCache ??= new EventEmitter();
|
|
54
|
+
}
|
|
55
|
+
export const on = (event: string, listener: (...args: any[]) => void): unknown => clusterEmitter().on(event, listener);
|
|
56
|
+
export const once = (event: string, listener: (...args: any[]) => void): unknown => clusterEmitter().once(event, listener);
|
|
57
|
+
export const emit = (event: string, ...args: unknown[]): boolean => clusterEmitter().emit(event, ...args);
|
|
58
|
+
export const removeListener = (event: string, listener: (...args: any[]) => void): unknown => clusterEmitter().removeListener(event, listener);
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
isMaster,
|
|
62
|
+
isPrimary,
|
|
63
|
+
isWorker,
|
|
64
|
+
Worker,
|
|
65
|
+
worker,
|
|
66
|
+
workers,
|
|
67
|
+
fork,
|
|
68
|
+
disconnect,
|
|
69
|
+
settings,
|
|
70
|
+
SCHED_NONE,
|
|
71
|
+
SCHED_RR,
|
|
72
|
+
schedulingPolicy,
|
|
73
|
+
setupMaster,
|
|
74
|
+
setupPrimary,
|
|
75
|
+
on,
|
|
76
|
+
once,
|
|
77
|
+
emit,
|
|
78
|
+
removeListener,
|
|
79
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A program and its exact words, as the one line the engine's shell reads.
|
|
3
|
+
*
|
|
4
|
+
* The engine has no `execve`: every child is a command line handed to
|
|
5
|
+
* just-bash, whether it came from `spawn(file, args)` or from `exec(line)`.
|
|
6
|
+
* Turning the first into the second is this file, and it is the engine's
|
|
7
|
+
* process model, not Node's: `child_process.js` never sees it.
|
|
8
|
+
*
|
|
9
|
+
* A spawned child's arguments are exact words, not a command line the shell
|
|
10
|
+
* reads again: quoting an argument only when it held a space let an argument
|
|
11
|
+
* carrying a pipe, a semicolon, an ampersand, a redirection or a quote come
|
|
12
|
+
* apart into shell syntax, and a program handed `--spec a|b|c` received
|
|
13
|
+
* `--spec a` and two commands it never asked for.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Where the engine's node is, the path `process.execPath` reports. */
|
|
17
|
+
export const __substrateExecPath = '/usr/local/bin/node';
|
|
18
|
+
|
|
19
|
+
/** One word, quoted where the shell would otherwise read it as syntax. */
|
|
20
|
+
export function __substrateShellWord(word: string): string {
|
|
21
|
+
return /^[A-Za-z0-9_./:@%+=,-]+$/u.test(word) ? word : "'" + word.replaceAll("'", "'\\''") + "'";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The program a caller named, as the engine's shell knows it. Node's own tests
|
|
26
|
+
* and every tool that re-runs itself spawn `process.execPath`, and the engine's
|
|
27
|
+
* shell has no file there: `spawnSync(process.execPath, ...)` answered
|
|
28
|
+
* "No such file or directory". The one node this runtime has is its own, and
|
|
29
|
+
* that is what a path naming a node binary means here.
|
|
30
|
+
*/
|
|
31
|
+
export function __substrateProgramName(file: string): string {
|
|
32
|
+
const execPath = typeof process !== 'undefined' && process !== null && typeof (process as { execPath?: string }).execPath === 'string'
|
|
33
|
+
? (process as { execPath: string }).execPath
|
|
34
|
+
: __substrateExecPath;
|
|
35
|
+
if (file === execPath || file === __substrateExecPath) return 'node';
|
|
36
|
+
if (file.includes('/') && file.slice(file.lastIndexOf('/') + 1) === 'node') return 'node';
|
|
37
|
+
return file;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The line the engine's shell reads for a program and its words. */
|
|
41
|
+
export function __substrateCommandLine(file: string, args: string[]): string {
|
|
42
|
+
const program = __substrateShellWord(__substrateProgramName(file));
|
|
43
|
+
return args.length > 0 ? `${program} ${args.map((arg) => __substrateShellWord(String(arg))).join(' ')}` : program;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Node's `normalizeSpawnArguments` with a truthy `shell` answers
|
|
48
|
+
* `file: '/bin/sh'`, `args: ['/bin/sh', '-c', line]`, and the line is already
|
|
49
|
+
* shell syntax: `exec`, `execSync` and every `{ shell: true }` spawn arrive
|
|
50
|
+
* that way. Quoting it a second time would hand the shell its own quotes.
|
|
51
|
+
*/
|
|
52
|
+
export function __substrateShellLine(file: string, argv: string[]): string | null {
|
|
53
|
+
const program = file.includes('/') ? file.slice(file.lastIndexOf('/') + 1) : file;
|
|
54
|
+
if (program !== 'sh' && program !== 'bash' && program !== 'dash' && program !== 'zsh') return null;
|
|
55
|
+
const dashC = argv.indexOf('-c');
|
|
56
|
+
if (dashC < 1 || typeof argv[dashC + 1] !== 'string') return null;
|
|
57
|
+
return argv[dashC + 1] as string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* How a path a caller named becomes the program the engine will run. The
|
|
62
|
+
* engine's process model installs it when it knows the filesystem; until then
|
|
63
|
+
* a path is itself.
|
|
64
|
+
*/
|
|
65
|
+
let resolveProgram: (file: string, cwd?: string) => string = (file) => file;
|
|
66
|
+
export function setProgramResolver(resolve: (file: string, cwd?: string) => string): void {
|
|
67
|
+
resolveProgram = resolve;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The line a run of `file` with `argv` is, where argv[0] is the file as Node
|
|
72
|
+
* builds it. A shell invocation is its own `-c` line; anything else is the
|
|
73
|
+
* program and its words, each quoted.
|
|
74
|
+
*/
|
|
75
|
+
export function __substrateLineFor(file: string, argv: string[], cwd?: string): string {
|
|
76
|
+
const shell = __substrateShellLine(file, argv);
|
|
77
|
+
if (shell !== null) return shell;
|
|
78
|
+
return __substrateCommandLine(resolveProgram(file, cwd), argv.slice(1));
|
|
79
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine's constant tables, in the two shapes Node serves them in.
|
|
3
|
+
*
|
|
4
|
+
* Node keeps one table, `internalBinding('constants')`, grouped by subsystem
|
|
5
|
+
* (`os`, `fs`, `crypto`, `zlib`, `trace`); `lib/constants.js` is that table
|
|
6
|
+
* spread flat, and `process.binding('constants')` hands out the groups. The
|
|
7
|
+
* engine had only the flat form, written out here, and no `process.binding`
|
|
8
|
+
* at all, so a bundle that feature-detects through it -- the Prisma CLI asks
|
|
9
|
+
* for `constants`, `buffer` and `tty_wrap` -- called `undefined` and died
|
|
10
|
+
* with a TypeError where Node answers. The groups below are that same flat
|
|
11
|
+
* table read back apart by name, so there is one set of numbers in the
|
|
12
|
+
* engine and the binding cannot drift from `require("constants")`.
|
|
13
|
+
*
|
|
14
|
+
* `crypto` and `zlib` groups are object literals built inside
|
|
15
|
+
* `constantsBinding`, not imported tables. A getter over an imported
|
|
16
|
+
* `const` is a live binding: a consumer's bundler inlined it to
|
|
17
|
+
* `zlib: constants$N` and called this function while that const was still
|
|
18
|
+
* in its temporal dead zone. Literals have no binding to access.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
// Node's old `constants` module, the flat table of fs, os, and signal constants,
|
|
22
|
+
// which graceful-fs still requires on its way into every React Router build; the
|
|
23
|
+
// engine's table had no entry, and the require was read as a file named
|
|
24
|
+
// `constants`. The table is Node's own for this flavour, measured against it:
|
|
25
|
+
// every errno, signal, libuv dirent and copy flag, scheduling priority and
|
|
26
|
+
// dlopen mode Node names. OpenSSL's cipher, padding, curve and engine numbers
|
|
27
|
+
// stay out — the engine has no OpenSSL, and a number that names an option of a
|
|
28
|
+
// subsystem a tab does not have is a surface that answers and then cannot act.
|
|
29
|
+
export const nodeConstants = { O_RDONLY: 0, O_WRONLY: 1, O_RDWR: 2, O_CREAT: 512, O_EXCL: 2048, O_NOCTTY: 131072, O_TRUNC: 1024, O_APPEND: 8, O_DIRECTORY: 1048576, O_NOFOLLOW: 256, O_SYNC: 128, O_SYMLINK: 2097152, O_NONBLOCK: 4, S_IFMT: 61440, S_IFREG: 32768, S_IFDIR: 16384, S_IFCHR: 8192, S_IFBLK: 24576, S_IFIFO: 4096, S_IFLNK: 40960, S_IFSOCK: 49152, S_IRWXU: 448, S_IRUSR: 256, S_IWUSR: 128, S_IXUSR: 64, S_IRWXG: 56, S_IRGRP: 32, S_IWGRP: 16, S_IXGRP: 8, S_IRWXO: 7, S_IROTH: 4, S_IWOTH: 2, S_IXOTH: 1, F_OK: 0, R_OK: 4, W_OK: 2, X_OK: 1, UV_FS_COPYFILE_EXCL: 1, COPYFILE_EXCL: 1, SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGILL: 4, SIGTRAP: 5, SIGABRT: 6, SIGBUS: 10, SIGFPE: 8, SIGKILL: 9, SIGUSR1: 30, SIGSEGV: 11, SIGUSR2: 31, SIGPIPE: 13, SIGALRM: 14, SIGTERM: 15, SIGCHLD: 20, SIGCONT: 19, SIGSTOP: 17, SIGTSTP: 18, SIGWINCH: 28, E2BIG: 7, EACCES: 13, EADDRINUSE: 48, EAGAIN: 35, EBADF: 9, EBUSY: 16, ECONNREFUSED: 61, ECONNRESET: 54, EEXIST: 17, EINVAL: 22, EIO: 5, EISDIR: 21, EMFILE: 24, ENOENT: 2, ENOSPC: 28, ENOTDIR: 20, ENOTEMPTY: 66, EPERM: 1, EPIPE: 32, ETIMEDOUT: 60, EADDRNOTAVAIL: 49, EAFNOSUPPORT: 47, EALREADY: 37, EBADMSG: 94, ECANCELED: 89, ECHILD: 10, ECONNABORTED: 53, EDEADLK: 11, EDESTADDRREQ: 39, EDOM: 33, EDQUOT: 69, EFAULT: 14, EFBIG: 27, EHOSTUNREACH: 65, EIDRM: 90, EILSEQ: 92, EINPROGRESS: 36, EINTR: 4, EISCONN: 56, ELOOP: 62, EMLINK: 31, EMSGSIZE: 40, EMULTIHOP: 95, ENAMETOOLONG: 63, ENETDOWN: 50, ENETRESET: 52, ENETUNREACH: 51, ENFILE: 23, ENOBUFS: 55, ENODATA: 96, ENODEV: 19, ENOEXEC: 8, ENOLCK: 77, ENOLINK: 97, ENOMEM: 12, ENOMSG: 91, ENOPROTOOPT: 42, ENOSR: 98, ENOSTR: 99, ENOSYS: 78, ENOTCONN: 57, ENOTSOCK: 38, ENOTSUP: 45, ENOTTY: 25, ENXIO: 6, EOPNOTSUPP: 102, EOVERFLOW: 84, EPROTO: 100, EPROTONOSUPPORT: 43, EPROTOTYPE: 41, ERANGE: 34, EROFS: 30, ESPIPE: 29, ESRCH: 3, ESTALE: 70, ETIME: 101, ETXTBSY: 26, EWOULDBLOCK: 35, EXDEV: 18, SIGINFO: 29, SIGIO: 23, SIGIOT: 6, SIGPROF: 27, SIGSYS: 12, SIGTTIN: 21, SIGTTOU: 22, SIGURG: 16, SIGVTALRM: 26, SIGXCPU: 24, SIGXFSZ: 25, PRIORITY_LOW: 19, PRIORITY_BELOW_NORMAL: 10, PRIORITY_NORMAL: 0, PRIORITY_ABOVE_NORMAL: -7, PRIORITY_HIGH: -14, PRIORITY_HIGHEST: -20, RTLD_LAZY: 1, RTLD_NOW: 2, RTLD_LOCAL: 4, RTLD_GLOBAL: 8, O_DSYNC: 4194304, COPYFILE_FICLONE: 2, COPYFILE_FICLONE_FORCE: 4, UV_FS_COPYFILE_FICLONE: 2, UV_FS_COPYFILE_FICLONE_FORCE: 4, UV_DIRENT_UNKNOWN: 0, UV_DIRENT_FILE: 1, UV_DIRENT_DIR: 2, UV_DIRENT_LINK: 3, UV_DIRENT_FIFO: 4, UV_DIRENT_SOCKET: 5, UV_DIRENT_CHAR: 6, UV_DIRENT_BLOCK: 7, UV_FS_SYMLINK_DIR: 1, UV_FS_SYMLINK_JUNCTION: 2, UV_FS_O_FILEMAP: 0, UV_FS_O_RANDOM: 0, UV_FS_O_SEQUENTIAL: 0, UV_FS_O_SHORT_LIVED: 0, UV_FS_O_TEMPORARY: 0, EXTENSIONLESS_FORMAT_JAVASCRIPT: 0, EXTENSIONLESS_FORMAT_WASM: 1 };
|
|
30
|
+
|
|
31
|
+
/** Which group of Node's binding a flat name belongs to. */
|
|
32
|
+
function groupOf(name: string): 'errno' | 'signals' | 'priority' | 'dlopen' | 'fs' {
|
|
33
|
+
if (/^E[A-Z0-9]+$/.test(name)) return 'errno';
|
|
34
|
+
if (name.startsWith('SIG')) return 'signals';
|
|
35
|
+
if (name.startsWith('PRIORITY_')) return 'priority';
|
|
36
|
+
if (name.startsWith('RTLD_')) return 'dlopen';
|
|
37
|
+
return 'fs';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type ConstantsBinding = {
|
|
41
|
+
os: { UV_UDP_REUSEADDR: number; dlopen: Record<string, number>; errno: Record<string, number>; signals: Record<string, number>; priority: Record<string, number> };
|
|
42
|
+
fs: Record<string, number>;
|
|
43
|
+
crypto: Record<string, unknown>;
|
|
44
|
+
zlib: Record<string, unknown>;
|
|
45
|
+
trace: Record<string, number>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
let binding: ConstantsBinding | null = null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* `process.binding('constants')`, built on the first ask and kept, as Node
|
|
52
|
+
* hands out the same object every time.
|
|
53
|
+
*/
|
|
54
|
+
export function constantsBinding(): ConstantsBinding {
|
|
55
|
+
if (binding) return binding;
|
|
56
|
+
const groups: Record<string, Record<string, number>> = { errno: {}, signals: {}, priority: {}, dlopen: {}, fs: {} };
|
|
57
|
+
for (const [name, value] of Object.entries(nodeConstants)) groups[groupOf(name)][name] = value as number;
|
|
58
|
+
binding = {
|
|
59
|
+
// libuv's own flag, which Node's binding carries beside the os groups and
|
|
60
|
+
// the flat table has never held.
|
|
61
|
+
os: { UV_UDP_REUSEADDR: 4, dlopen: groups.dlopen, errno: groups.errno, signals: groups.signals, priority: groups.priority },
|
|
62
|
+
fs: groups.fs,
|
|
63
|
+
crypto: { SSL_OP_ALL: 0, RSA_PKCS1_PADDING: 1, RSA_PKCS1_OAEP_PADDING: 4, RSA_PKCS1_PSS_PADDING: 6 },
|
|
64
|
+
zlib: { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, ZLIB_VERNUM: 4784, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: Infinity, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_DECODE: 0, BROTLI_ENCODE: 1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_PARAM_MODE: 0, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_PARAM_QUALITY: 1, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_PARAM_LGWIN: 2, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_DEFAULT_WINDOW: 22, BROTLI_PARAM_LGBLOCK: 3, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24 },
|
|
65
|
+
trace: { TRACE_EVENT_PHASE_BEGIN: 66, TRACE_EVENT_PHASE_END: 69, TRACE_EVENT_PHASE_COMPLETE: 88, TRACE_EVENT_PHASE_INSTANT: 73, TRACE_EVENT_PHASE_ASYNC_BEGIN: 83, TRACE_EVENT_PHASE_ASYNC_STEP_INTO: 84, TRACE_EVENT_PHASE_ASYNC_STEP_PAST: 112, TRACE_EVENT_PHASE_ASYNC_END: 70, TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN: 98, TRACE_EVENT_PHASE_NESTABLE_ASYNC_END: 101, TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT: 110, TRACE_EVENT_PHASE_FLOW_BEGIN: 115, TRACE_EVENT_PHASE_FLOW_STEP: 116, TRACE_EVENT_PHASE_FLOW_END: 102, TRACE_EVENT_PHASE_METADATA: 77, TRACE_EVENT_PHASE_COUNTER: 67, TRACE_EVENT_PHASE_SAMPLE: 80, TRACE_EVENT_PHASE_CREATE_OBJECT: 78, TRACE_EVENT_PHASE_SNAPSHOT_OBJECT: 79, TRACE_EVENT_PHASE_DELETE_OBJECT: 68, TRACE_EVENT_PHASE_MEMORY_DUMP: 118, TRACE_EVENT_PHASE_MARK: 82, TRACE_EVENT_PHASE_CLOCK_SYNC: 99 },
|
|
66
|
+
};
|
|
67
|
+
return binding;
|
|
68
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenSSL numbers the engine actually answers. A leaf: no imports, so the
|
|
3
|
+
* constants table can read them without entering the crypto shim, which is
|
|
4
|
+
* an EventEmitter and sits in a load cycle with this table.
|
|
5
|
+
*/
|
|
6
|
+
export const cryptoConstants = {
|
|
7
|
+
SSL_OP_ALL: 0,
|
|
8
|
+
RSA_PKCS1_PADDING: 1,
|
|
9
|
+
RSA_PKCS1_OAEP_PADDING: 4,
|
|
10
|
+
RSA_PKCS1_PSS_PADDING: 6,
|
|
11
|
+
};
|