visaljs 0.0.6 → 0.0.8
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/README.md +63 -2
- package/THIRD_PARTY_LICENSES +1216 -0
- package/cli.js +4414 -325
- package/node/include/js_node.h +57 -1
- package/node/include/js_uv.h +8 -1
- package/node/prelude/_stream_duplex.js +4 -0
- package/node/prelude/_stream_passthrough.js +4 -0
- package/node/prelude/_stream_readable.js +4 -0
- package/node/prelude/_stream_transform.js +4 -0
- package/node/prelude/_stream_writable.js +4 -0
- package/node/prelude/assert.js +1334 -0
- package/node/prelude/assert_strict.js +12 -0
- package/node/prelude/async_hooks.js +1 -1
- package/node/prelude/buffer.js +43 -3
- package/node/prelude/child_process.js +1098 -0
- package/node/prelude/cluster.js +52 -0
- package/node/prelude/console.js +328 -0
- package/node/prelude/constants.js +10 -0
- package/node/prelude/crypto.js +1 -1
- package/node/prelude/diagnostics_channel.js +1 -1
- package/node/prelude/dns.js +1 -1
- package/node/prelude/domain.js +115 -0
- package/node/prelude/events.js +144 -16
- package/node/prelude/fs.js +1138 -151
- package/node/prelude/fs_promises.js +117 -11
- package/node/prelude/http.js +104 -27
- package/node/prelude/http2.js +1 -1
- package/node/prelude/https.js +148 -0
- package/node/prelude/inspector.js +27 -0
- package/node/prelude/inspector_promises.js +4 -0
- package/node/prelude/internal/async_context.js +1 -1
- package/node/prelude/internal/buffer_transcode.js +44 -0
- package/node/prelude/internal/comparisons.js +916 -0
- package/node/prelude/internal/compression_streams.js +153 -0
- package/node/prelude/internal/crypto/asym.js +27 -14
- package/node/prelude/internal/crypto/cipher.js +16 -5
- package/node/prelude/internal/crypto/diffiehellman.js +3 -2
- package/node/prelude/internal/crypto/hash.js +2 -1
- package/node/prelude/internal/crypto/kdf.js +14 -9
- package/node/prelude/internal/crypto/keys.js +63 -50
- package/node/prelude/internal/crypto/random.js +2 -1
- package/node/prelude/internal/crypto/util.js +4 -4
- package/node/prelude/internal/dotenv.js +98 -0
- package/node/prelude/internal/errors.js +21 -5
- package/node/prelude/internal/events_extras.js +116 -0
- package/node/prelude/internal/events_on.js +100 -0
- package/node/prelude/internal/features.js +55 -0
- package/node/prelude/internal/fetch.js +364 -0
- package/node/prelude/internal/form_data.js +376 -0
- package/node/prelude/internal/fs_bigint_stats.js +41 -0
- package/node/prelude/internal/fs_blob.js +19 -0
- package/node/prelude/internal/fs_cp.js +709 -0
- package/node/prelude/internal/fs_dir.js +166 -0
- package/node/prelude/internal/fs_filehandle.js +287 -0
- package/node/prelude/internal/fs_glob.js +296 -0
- package/node/prelude/internal/fs_statfs.js +42 -0
- package/node/prelude/internal/fs_stats.js +89 -0
- package/node/prelude/internal/fs_streams.js +541 -0
- package/node/prelude/internal/fs_utils.js +286 -0
- package/node/prelude/internal/fs_watch.js +580 -0
- package/node/prelude/internal/http_agent.js +26 -0
- package/node/prelude/internal/mime.js +249 -0
- package/node/prelude/internal/net.js +1 -0
- package/node/prelude/internal/parse_args.js +288 -0
- package/node/prelude/internal/perf_histogram.js +435 -0
- package/node/prelude/internal/perf_observe.js +119 -0
- package/node/prelude/internal/performance_global.js +19 -0
- package/node/prelude/internal/process_events.js +49 -1
- package/node/prelude/internal/process_memory.js +14 -0
- package/node/prelude/internal/process_more.js +414 -0
- package/node/prelude/internal/process_signals.js +2 -1
- package/node/prelude/internal/process_stdin.js +52 -0
- package/node/prelude/internal/process_stdio.js +36 -0
- package/node/prelude/internal/querystring.js +0 -0
- package/node/prelude/internal/readline.js +338 -0
- package/node/prelude/internal/socketaddress.js +8 -4
- package/node/prelude/internal/source_map.js +122 -0
- package/node/prelude/internal/stream_compose.js +74 -0
- package/node/prelude/internal/stream_from.js +6 -0
- package/node/prelude/internal/stream_operators.js +23 -0
- package/node/prelude/internal/stream_pipeline.js +7 -0
- package/node/prelude/internal/stream_transform.js +10 -0
- package/node/prelude/internal/stream_web_adapters.js +143 -0
- package/node/prelude/internal/streams/add_abort_signal.js +58 -0
- package/node/prelude/internal/streams/compose.js +244 -0
- package/node/prelude/internal/streams/destroy.js +358 -0
- package/node/prelude/internal/streams/duplex.js +199 -0
- package/node/prelude/internal/streams/duplexify.js +378 -0
- package/node/prelude/internal/streams/end_of_stream.js +387 -0
- package/node/prelude/internal/streams/errors.js +216 -0
- package/node/prelude/internal/streams/from.js +211 -0
- package/node/prelude/internal/streams/legacy.js +120 -0
- package/node/prelude/internal/streams/operators.js +375 -0
- package/node/prelude/internal/streams/passthrough.js +45 -0
- package/node/prelude/internal/streams/pipeline.js +468 -0
- package/node/prelude/internal/streams/readable.js +1835 -0
- package/node/prelude/internal/streams/state.js +48 -0
- package/node/prelude/internal/streams/transform.js +203 -0
- package/node/prelude/internal/streams/utils.js +355 -0
- package/node/prelude/internal/streams/validators.js +108 -0
- package/node/prelude/internal/streams/writable.js +1160 -0
- package/node/prelude/internal/structured_clone.js +238 -0
- package/node/prelude/internal/system_errors.js +37 -0
- package/node/prelude/internal/test_runner/mock.js +431 -0
- package/node/prelude/internal/test_runner/reporters.js +404 -0
- package/node/prelude/internal/test_runner/test.js +1571 -0
- package/node/prelude/internal/timers.js +38 -7
- package/node/prelude/internal/timers_global.js +1 -1
- package/node/prelude/internal/tls/common.js +8 -2
- package/node/prelude/internal/tls/wrap.js +3 -15
- package/node/prelude/internal/tls/x509.js +1 -1
- package/node/prelude/internal/tty_read_stream.js +39 -0
- package/node/prelude/internal/tty_streams.js +3 -0
- package/node/prelude/internal/util_debuglog.js +68 -0
- package/node/prelude/internal/util_diff.js +63 -0
- package/node/prelude/internal/util_more.js +111 -0
- package/node/prelude/internal/util_styles.js +76 -0
- package/node/prelude/internal/zlib_engines.js +1 -1
- package/node/prelude/module.js +194 -7
- package/node/prelude/net.js +2 -1
- package/node/prelude/os.js +88 -11
- package/node/prelude/path.js +11 -7
- package/node/prelude/path_posix.js +1 -1
- package/node/prelude/path_win32.js +1 -1
- package/node/prelude/perf_hooks.js +147 -0
- package/node/prelude/process.js +36 -1
- package/node/prelude/punycode.js +188 -0
- package/node/prelude/querystring.js +1 -1
- package/node/prelude/readline.js +8 -0
- package/node/prelude/readline_promises.js +88 -0
- package/node/prelude/repl.js +38 -0
- package/node/prelude/sea.js +23 -0
- package/node/prelude/stream.js +70 -1332
- package/node/prelude/stream_consumers.js +34 -0
- package/node/prelude/stream_promises.js +1 -1
- package/node/prelude/stream_web.js +15 -2
- package/node/prelude/string_decoder.js +1 -1
- package/node/prelude/sys.js +7 -0
- package/node/prelude/test.js +56 -0
- package/node/prelude/test_reporters.js +269 -0
- package/node/prelude/timers.js +7 -84
- package/node/prelude/timers_promises.js +1 -1
- package/node/prelude/tls.js +2 -1
- package/node/prelude/trace_events.js +52 -0
- package/node/prelude/tty.js +10 -4
- package/node/prelude/url.js +88 -27
- package/node/prelude/util.js +121 -5
- package/node/prelude/util_types.js +4 -3
- package/node/prelude/v8.js +814 -0
- package/node/prelude/vm.js +86 -0
- package/node/prelude/wasi.js +10 -0
- package/node/prelude/worker_threads.js +56 -0
- package/node/prelude/zlib.js +58 -25
- package/node/src/host_brotli.c +59 -11
- package/node/src/host_fs.c +342 -11
- package/node/src/host_fswatch.c +170 -0
- package/node/src/host_http.c +143 -20
- package/node/src/host_loop.c +25 -2
- package/node/src/host_net.c +55 -7
- package/node/src/host_os.c +55 -1
- package/node/src/host_proc.c +291 -0
- package/node/src/host_process.c +488 -0
- package/node/src/host_sys.c +64 -2
- package/node/src/host_zlib.c +27 -7
- package/node/src/host_zstd.c +41 -6
- package/node/third_party/hdrhistogram/LICENSE +42 -0
- package/node/third_party/hdrhistogram/README.md +5 -0
- package/node/third_party/libuv/LICENSE +0 -0
- package/node/third_party/libuv/LICENSE-extra +36 -0
- package/node/third_party/libuv/include/uv/aix.h +0 -0
- package/node/third_party/libuv/include/uv/bsd.h +0 -0
- package/node/third_party/libuv/include/uv/darwin.h +0 -0
- package/node/third_party/libuv/include/uv/errno.h +0 -0
- package/node/third_party/libuv/include/uv/linux.h +0 -0
- package/node/third_party/libuv/include/uv/os390.h +0 -0
- package/node/third_party/libuv/include/uv/posix.h +0 -0
- package/node/third_party/libuv/include/uv/sunos.h +0 -0
- package/node/third_party/libuv/include/uv/threadpool.h +0 -0
- package/node/third_party/libuv/include/uv/tree.h +0 -0
- package/node/third_party/libuv/include/uv/unix.h +0 -0
- package/node/third_party/libuv/include/uv/version.h +0 -0
- package/node/third_party/libuv/include/uv/win.h +0 -0
- package/node/third_party/libuv/include/uv.h +0 -0
- package/node/third_party/libuv/src/fs-poll.c +0 -0
- package/node/third_party/libuv/src/heap-inl.h +0 -0
- package/node/third_party/libuv/src/idna.c +0 -0
- package/node/third_party/libuv/src/idna.h +0 -0
- package/node/third_party/libuv/src/inet.c +0 -0
- package/node/third_party/libuv/src/queue.h +0 -0
- package/node/third_party/libuv/src/random.c +0 -0
- package/node/third_party/libuv/src/strscpy.c +0 -0
- package/node/third_party/libuv/src/strscpy.h +0 -0
- package/node/third_party/libuv/src/strtok.c +0 -0
- package/node/third_party/libuv/src/strtok.h +0 -0
- package/node/third_party/libuv/src/thread-common.c +0 -0
- package/node/third_party/libuv/src/threadpool.c +0 -0
- package/node/third_party/libuv/src/timer.c +0 -0
- package/node/third_party/libuv/src/unix/async.c +0 -0
- package/node/third_party/libuv/src/unix/bsd-ifaddrs.c +0 -0
- package/node/third_party/libuv/src/unix/core.c +0 -0
- package/node/third_party/libuv/src/unix/darwin-proctitle.c +0 -0
- package/node/third_party/libuv/src/unix/darwin-stub.h +0 -0
- package/node/third_party/libuv/src/unix/darwin-syscalls.h +0 -0
- package/node/third_party/libuv/src/unix/darwin.c +0 -0
- package/node/third_party/libuv/src/unix/dl.c +0 -0
- package/node/third_party/libuv/src/unix/fs.c +0 -0
- package/node/third_party/libuv/src/unix/fsevents.c +0 -0
- package/node/third_party/libuv/src/unix/getaddrinfo.c +0 -0
- package/node/third_party/libuv/src/unix/getnameinfo.c +0 -0
- package/node/third_party/libuv/src/unix/internal.h +0 -0
- package/node/third_party/libuv/src/unix/kqueue.c +0 -0
- package/node/third_party/libuv/src/unix/linux.c +0 -0
- package/node/third_party/libuv/src/unix/loop-watcher.c +0 -0
- package/node/third_party/libuv/src/unix/loop.c +0 -0
- package/node/third_party/libuv/src/unix/pipe.c +0 -0
- package/node/third_party/libuv/src/unix/poll.c +0 -0
- package/node/third_party/libuv/src/unix/process.c +0 -0
- package/node/third_party/libuv/src/unix/procfs-exepath.c +0 -0
- package/node/third_party/libuv/src/unix/proctitle.c +0 -0
- package/node/third_party/libuv/src/unix/random-devurandom.c +0 -0
- package/node/third_party/libuv/src/unix/random-getentropy.c +0 -0
- package/node/third_party/libuv/src/unix/random-getrandom.c +0 -0
- package/node/third_party/libuv/src/unix/random-sysctl-linux.c +0 -0
- package/node/third_party/libuv/src/unix/signal.c +0 -0
- package/node/third_party/libuv/src/unix/stream.c +0 -0
- package/node/third_party/libuv/src/unix/tcp.c +0 -0
- package/node/third_party/libuv/src/unix/thread.c +0 -0
- package/node/third_party/libuv/src/unix/tty.c +0 -0
- package/node/third_party/libuv/src/unix/udp.c +0 -0
- package/node/third_party/libuv/src/uv-common.c +0 -0
- package/node/third_party/libuv/src/uv-common.h +0 -0
- package/node/third_party/libuv/src/uv-data-getter-setters.c +0 -0
- package/node/third_party/libuv/src/version.c +0 -0
- package/node/third_party/llhttp/LICENSE +0 -0
- package/node/third_party/llhttp/api.c +0 -0
- package/node/third_party/llhttp/http.c +0 -0
- package/node/third_party/llhttp/llhttp.c +0 -0
- package/node/third_party/llhttp/llhttp.h +0 -0
- package/node/third_party/nodejs/LICENSE +47 -0
- package/node/third_party/nodejs/README.md +5 -0
- package/node/third_party/parseargs/LICENSE +21 -0
- package/node/third_party/parseargs/README.md +5 -0
- package/node/third_party/punycode/LICENSE +20 -0
- package/node/third_party/punycode/README.md +5 -0
- package/node/third_party/zlib/LICENSE.chromium +27 -0
- package/package.json +1 -5
- package/prebuilt/darwin-arm64/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/darwin-arm64/brotli-7995bbdacc52e51c.a +0 -0
- package/prebuilt/darwin-arm64/uv-72ab666eae197cd8.a +0 -0
- package/prebuilt/darwin-arm64/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/darwin-arm64/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/darwin-x64/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/darwin-x64/brotli-7995bbdacc52e51c.a +0 -0
- package/prebuilt/darwin-x64/uv-72ab666eae197cd8.a +0 -0
- package/prebuilt/darwin-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/darwin-x64/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/linux-arm64/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/linux-arm64/brotli-65481ff838ce9def.a +0 -0
- package/prebuilt/linux-arm64/uv-f1353f50ff983f3c.a +0 -0
- package/prebuilt/linux-arm64/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/linux-arm64/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/linux-arm64-musl/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/linux-arm64-musl/brotli-65481ff838ce9def.a +0 -0
- package/prebuilt/linux-arm64-musl/uv-f1353f50ff983f3c.a +0 -0
- package/prebuilt/linux-arm64-musl/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/linux-arm64-musl/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/linux-x64/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/linux-x64/brotli-65481ff838ce9def.a +0 -0
- package/prebuilt/linux-x64/uv-f1353f50ff983f3c.a +0 -0
- package/prebuilt/linux-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/linux-x64/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/linux-x64-musl/boringssl-4a47438eaf7e73ba.a +0 -0
- package/prebuilt/linux-x64-musl/brotli-65481ff838ce9def.a +0 -0
- package/prebuilt/linux-x64-musl/uv-f1353f50ff983f3c.a +0 -0
- package/prebuilt/linux-x64-musl/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/linux-x64-musl/zstd-015315ac7c784c73.a +0 -0
- package/prebuilt/win32-x64/boringssl-ce573858472b7fc9.a +0 -0
- package/prebuilt/win32-x64/brotli-20d86a61f30baeb3.a +0 -0
- package/prebuilt/win32-x64/uv-b11bae65d7fced82.a +0 -0
- package/prebuilt/win32-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
- package/prebuilt/win32-x64/zstd-015315ac7c784c73.a +0 -0
- package/runtime/include/js_atoms.gen.h +0 -0
- package/runtime/include/js_atoms.h +1 -1
- package/runtime/include/js_bigint.h +1 -1
- package/runtime/include/js_buffer.h +4 -4
- package/runtime/include/js_builtins.h +41 -3
- package/runtime/include/js_console.h +9 -4
- package/runtime/include/js_convert.h +1 -1
- package/runtime/include/js_core.def +5 -4
- package/runtime/include/js_crypto.h +1 -1
- package/runtime/include/js_error.h +1 -1
- package/runtime/include/js_exception.h +21 -1
- package/runtime/include/js_function.h +33 -9
- package/runtime/include/js_gc.h +172 -30
- package/runtime/include/js_generator.h +2 -2
- package/runtime/include/js_host.h +19 -1
- package/runtime/include/js_jobs.h +5 -5
- package/runtime/include/js_module.h +1 -1
- package/runtime/include/js_object.h +142 -15
- package/runtime/include/js_ops.h +107 -5
- package/runtime/include/js_promise.h +3 -3
- package/runtime/include/js_regexp.h +1 -1
- package/runtime/include/js_runtime.h +0 -0
- package/runtime/include/js_symbol.h +1 -1
- package/runtime/include/js_web.h +2 -1
- package/runtime/include/jscell.h +22 -15
- package/runtime/include/jscontext.h +74 -39
- package/runtime/include/jsnum.h +1 -1
- package/runtime/include/jsstring.h +19 -6
- package/runtime/include/jsvalue.h +7 -3
- package/runtime/src/arguments.c +2 -2
- package/runtime/src/array.c +4 -1
- package/runtime/src/arraybuffer.c +19 -7
- package/runtime/src/async_iter.c +4 -3
- package/runtime/src/atoms.c +1 -1
- package/runtime/src/base64.c +2 -2
- package/runtime/src/bigint.c +1 -1
- package/runtime/src/blob.c +22 -9
- package/runtime/src/boringssl_support.cc +1 -1
- package/runtime/src/buffer.c +299 -91
- package/runtime/src/builtin_table.c +1 -1
- package/runtime/src/builtins.c +30 -4
- package/runtime/src/builtins_util.h +0 -0
- package/runtime/src/collections.c +18 -3
- package/runtime/src/components.c +1 -1
- package/runtime/src/console.c +14 -7
- package/runtime/src/convert.c +0 -0
- package/runtime/src/core_all.c +1 -1
- package/runtime/src/crypto.c +1 -1
- package/runtime/src/crypto_asym.c +1 -1
- package/runtime/src/crypto_bn.c +1 -1
- package/runtime/src/crypto_cipher.c +10 -3
- package/runtime/src/crypto_hash.c +1 -1
- package/runtime/src/crypto_host.c +1 -1
- package/runtime/src/crypto_internal.h +1 -1
- package/runtime/src/crypto_kdf.c +1 -1
- package/runtime/src/crypto_key.c +14 -1
- package/runtime/src/crypto_pkey.c +1 -1
- package/runtime/src/crypto_subtle.c +142 -58
- package/runtime/src/crypto_tls.c +1 -1
- package/runtime/src/date.c +5 -2
- package/runtime/src/domexception.c +2 -2
- package/runtime/src/elements.c +56 -17
- package/runtime/src/elements.h +7 -2
- package/runtime/src/encoding.c +1 -1
- package/runtime/src/error.c +4 -4
- package/runtime/src/events.c +23 -14
- package/runtime/src/exception.c +1 -1
- package/runtime/src/fetch.c +241 -17
- package/runtime/src/function.c +31 -19
- package/runtime/src/gc.c +1716 -207
- package/runtime/src/gc_visit.h +87 -0
- package/runtime/src/generator.c +5 -3
- package/runtime/src/global.c +14 -6
- package/runtime/src/headers.c +10 -10
- package/runtime/src/inspect.c +76 -17
- package/runtime/src/internal.h +5 -2
- package/runtime/src/iterate.c +94 -2
- package/runtime/src/iterator.c +1 -1
- package/runtime/src/jobs.c +11 -5
- package/runtime/src/jsnum.c +2 -2
- package/runtime/src/json.c +1 -1
- package/runtime/src/math.c +9 -1
- package/runtime/src/module.c +3 -3
- package/runtime/src/number.c +0 -0
- package/runtime/src/object.c +107 -74
- package/runtime/src/ops.c +21 -3
- package/runtime/src/os.c +192 -1
- package/runtime/src/os.h +33 -2
- package/runtime/src/process.c +73 -8
- package/runtime/src/promise.c +4 -4
- package/runtime/src/proxy.c +1 -1
- package/runtime/src/reflect.c +1 -1
- package/runtime/src/regexp.c +134 -2
- package/runtime/src/regexp_anchor.h +1 -1
- package/runtime/src/regexp_message.h +1 -1
- package/runtime/src/shape.c +10 -19
- package/runtime/src/shape.h +0 -0
- package/runtime/src/streams.c +22 -8
- package/runtime/src/streams.h +0 -0
- package/runtime/src/string.c +64 -25
- package/runtime/src/string_builtins.c +7 -7
- package/runtime/src/symbol.c +2 -7
- package/runtime/src/test_host.c +3 -3
- package/runtime/src/tls_roots.gen.h +102 -620
- package/runtime/src/typedarray.c +8 -3
- package/runtime/src/tznames.gen.h +2 -1
- package/runtime/src/uri.c +1 -1
- package/runtime/src/url.c +42 -39
- package/runtime/src/weak.c +15 -12
- package/runtime/src/web.c +21 -3
- package/runtime/src/wrapper.c +0 -0
- package/runtime/src/writable.c +7 -6
- package/runtime/third_party/ada-idna/LICENSE-MIT +0 -0
- package/runtime/third_party/ada-idna/README.md +7 -7
- package/runtime/third_party/ada-idna/convert.mjs +89 -27
- package/runtime/third_party/ada-idna/idna.c +30 -31
- package/runtime/third_party/ada-idna/idna.h +0 -0
- package/runtime/third_party/ada-idna/idna_tables.h +2272 -1952
- package/runtime/third_party/boringssl/third_party/fiat/LICENSE +15 -0
- package/runtime/third_party/mozilla-ca/LICENSE +373 -0
- package/runtime/third_party/mozilla-ca/README.md +9 -0
- package/runtime/third_party/nodejs/LICENSE +47 -0
- package/runtime/third_party/nodejs/README.md +7 -0
- package/runtime/third_party/quickjs-dtoa/LICENSE +0 -0
- package/runtime/third_party/quickjs-dtoa/README.md +1 -1
- package/runtime/third_party/quickjs-dtoa/dtoa.c +0 -0
- package/runtime/third_party/quickjs-dtoa/dtoa.h +0 -0
- package/runtime/third_party/quickjs-dtoa/dtoa_compat.h +0 -0
- package/runtime/third_party/quickjs-regexp/LICENSE +0 -0
- package/runtime/third_party/quickjs-regexp/README.md +2 -2
- package/runtime/third_party/quickjs-regexp/cutils.c +0 -0
- package/runtime/third_party/quickjs-regexp/cutils.h +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp-opcode.h +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp.c +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp.h +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode-table.h +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode.c +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode.h +0 -0
- package/runtime/third_party/unicode/LICENSE +39 -0
- package/runtime/third_party/unicode/README.md +9 -0
- package/runtime/third_party/v8-ieee754/LICENSE +0 -0
- package/runtime/third_party/v8-ieee754/LICENSE.fdlibm +10 -0
- package/runtime/third_party/v8-ieee754/README.md +3 -2
- package/runtime/third_party/v8-ieee754/convert.py +0 -0
- package/runtime/third_party/v8-ieee754/ieee754.c +0 -0
- package/runtime/third_party/v8-ieee754/ieee754.h +0 -0
- package/runtime/tools/regexp_compile.c +2 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// node:punycode: Punycode (RFC 3492) and IDNA's toASCII / toUnicode for domain names, as the
|
|
2
|
+
// punycode.js 2.1.0 Node bundles (deprecated in Node, still required by older packages).
|
|
3
|
+
// Ported from punycode.js 2.1.0 (Copyright Mathias Bynens, MIT): node/third_party/punycode/LICENSE.
|
|
4
|
+
|
|
5
|
+
const maxInt = 2147483647;
|
|
6
|
+
const base = 36;
|
|
7
|
+
const tMin = 1;
|
|
8
|
+
const tMax = 26;
|
|
9
|
+
const skew = 38;
|
|
10
|
+
const damp = 700;
|
|
11
|
+
const initialBias = 72;
|
|
12
|
+
const initialN = 128;
|
|
13
|
+
const delimiter = "-";
|
|
14
|
+
|
|
15
|
+
const regexPunycode = /^xn--/;
|
|
16
|
+
const regexNonASCII = /[^\0-\x7F]/;
|
|
17
|
+
const regexSeparators = /[\x2E。.。]/g; /* RFC 3490 separators */
|
|
18
|
+
|
|
19
|
+
const errors = {
|
|
20
|
+
overflow: "Overflow: input needs wider integers to process",
|
|
21
|
+
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
22
|
+
"invalid-input": "Invalid input",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function error(type) {
|
|
26
|
+
throw new RangeError(errors[type]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* a domain name's labels mapped, an email address's local part kept */
|
|
30
|
+
function mapDomain(domain, fn) {
|
|
31
|
+
const parts = domain.split("@");
|
|
32
|
+
let result = "";
|
|
33
|
+
if (parts.length > 1) {
|
|
34
|
+
result = parts[0] + "@";
|
|
35
|
+
domain = parts[1];
|
|
36
|
+
}
|
|
37
|
+
domain = domain.replace(regexSeparators, "\x2E");
|
|
38
|
+
const encoded = domain.split(".").map(fn).join(".");
|
|
39
|
+
return result + encoded;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** A string's code points: surrogate pairs joined, lone surrogates kept. */
|
|
43
|
+
function ucs2decode(string) {
|
|
44
|
+
const output = [];
|
|
45
|
+
let counter = 0;
|
|
46
|
+
const length = string.length;
|
|
47
|
+
while (counter < length) {
|
|
48
|
+
const value = string.charCodeAt(counter++);
|
|
49
|
+
if (value >= 0xd800 && value <= 0xdbff && counter < length) {
|
|
50
|
+
const extra = string.charCodeAt(counter++);
|
|
51
|
+
if ((extra & 0xfc00) === 0xdc00) output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
|
52
|
+
else {
|
|
53
|
+
output.push(value);
|
|
54
|
+
counter--;
|
|
55
|
+
}
|
|
56
|
+
} else output.push(value);
|
|
57
|
+
}
|
|
58
|
+
return output;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Code points as a string. */
|
|
62
|
+
const ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);
|
|
63
|
+
|
|
64
|
+
/* a basic code point's digit value, or base for anything else */
|
|
65
|
+
function basicToDigit(codePoint) {
|
|
66
|
+
if (codePoint >= 0x30 && codePoint < 0x3a) return 26 + (codePoint - 0x30);
|
|
67
|
+
if (codePoint >= 0x41 && codePoint < 0x5b) return codePoint - 0x41;
|
|
68
|
+
if (codePoint >= 0x61 && codePoint < 0x7b) return codePoint - 0x61;
|
|
69
|
+
return base;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* a digit's code point, lowercase (0..25 a..z, 26..35 0..9) */
|
|
73
|
+
const digitToBasic = (digit) => digit + 22 + 75 * (digit < 26);
|
|
74
|
+
|
|
75
|
+
/* RFC 3492 3.4 */
|
|
76
|
+
function adapt(delta, numPoints, firstTime) {
|
|
77
|
+
let k = 0;
|
|
78
|
+
delta = firstTime ? Math.floor(delta / damp) : delta >> 1;
|
|
79
|
+
delta += Math.floor(delta / numPoints);
|
|
80
|
+
for (; delta > ((base - tMin) * tMax) >> 1; k += base) delta = Math.floor(delta / (base - tMin));
|
|
81
|
+
return Math.floor(k + ((base - tMin + 1) * delta) / (delta + skew));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Punycode (ASCII only) to the Unicode string it encodes. */
|
|
85
|
+
export function decode(input) {
|
|
86
|
+
const output = [];
|
|
87
|
+
const inputLength = input.length;
|
|
88
|
+
let i = 0;
|
|
89
|
+
let n = initialN;
|
|
90
|
+
let bias = initialBias;
|
|
91
|
+
|
|
92
|
+
/* the basic code points: everything before the last delimiter */
|
|
93
|
+
let basic = input.lastIndexOf(delimiter);
|
|
94
|
+
if (basic < 0) basic = 0;
|
|
95
|
+
for (let j = 0; j < basic; ++j) {
|
|
96
|
+
if (input.charCodeAt(j) >= 0x80) error("not-basic");
|
|
97
|
+
output.push(input.charCodeAt(j));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* the deltas, each inserting a code point */
|
|
101
|
+
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
|
|
102
|
+
const oldi = i;
|
|
103
|
+
for (let w = 1, k = base; ; k += base) {
|
|
104
|
+
if (index >= inputLength) error("invalid-input");
|
|
105
|
+
const digit = basicToDigit(input.charCodeAt(index++));
|
|
106
|
+
if (digit >= base) error("invalid-input");
|
|
107
|
+
if (digit > Math.floor((maxInt - i) / w)) error("overflow");
|
|
108
|
+
i += digit * w;
|
|
109
|
+
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
110
|
+
if (digit < t) break;
|
|
111
|
+
const baseMinusT = base - t;
|
|
112
|
+
if (w > Math.floor(maxInt / baseMinusT)) error("overflow");
|
|
113
|
+
w *= baseMinusT;
|
|
114
|
+
}
|
|
115
|
+
const out = output.length + 1;
|
|
116
|
+
bias = adapt(i - oldi, out, oldi === 0);
|
|
117
|
+
if (Math.floor(i / out) > maxInt - n) error("overflow");
|
|
118
|
+
n += Math.floor(i / out);
|
|
119
|
+
i %= out;
|
|
120
|
+
output.splice(i++, 0, n);
|
|
121
|
+
}
|
|
122
|
+
return String.fromCodePoint(...output);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** A Unicode string as Punycode (ASCII only). */
|
|
126
|
+
export function encode(input) {
|
|
127
|
+
const output = [];
|
|
128
|
+
input = ucs2decode(input);
|
|
129
|
+
const inputLength = input.length;
|
|
130
|
+
let n = initialN;
|
|
131
|
+
let delta = 0;
|
|
132
|
+
let bias = initialBias;
|
|
133
|
+
|
|
134
|
+
for (const currentValue of input) {
|
|
135
|
+
if (currentValue < 0x80) output.push(String.fromCharCode(currentValue));
|
|
136
|
+
}
|
|
137
|
+
const basicLength = output.length;
|
|
138
|
+
let handledCPCount = basicLength;
|
|
139
|
+
if (basicLength) output.push(delimiter);
|
|
140
|
+
|
|
141
|
+
while (handledCPCount < inputLength) {
|
|
142
|
+
/* the next code point to insert: the smallest not yet handled */
|
|
143
|
+
let m = maxInt;
|
|
144
|
+
for (const currentValue of input) {
|
|
145
|
+
if (currentValue >= n && currentValue < m) m = currentValue;
|
|
146
|
+
}
|
|
147
|
+
const handledCPCountPlusOne = handledCPCount + 1;
|
|
148
|
+
if (m - n > Math.floor((maxInt - delta) / handledCPCountPlusOne)) error("overflow");
|
|
149
|
+
delta += (m - n) * handledCPCountPlusOne;
|
|
150
|
+
n = m;
|
|
151
|
+
for (const currentValue of input) {
|
|
152
|
+
if (currentValue < n && ++delta > maxInt) error("overflow");
|
|
153
|
+
if (currentValue === n) {
|
|
154
|
+
let q = delta;
|
|
155
|
+
for (let k = base; ; k += base) {
|
|
156
|
+
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
157
|
+
if (q < t) break;
|
|
158
|
+
const qMinusT = q - t;
|
|
159
|
+
const baseMinusT = base - t;
|
|
160
|
+
output.push(String.fromCharCode(digitToBasic(t + (qMinusT % baseMinusT))));
|
|
161
|
+
q = Math.floor(qMinusT / baseMinusT);
|
|
162
|
+
}
|
|
163
|
+
output.push(String.fromCharCode(digitToBasic(q)));
|
|
164
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
|
|
165
|
+
delta = 0;
|
|
166
|
+
++handledCPCount;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
++delta;
|
|
170
|
+
++n;
|
|
171
|
+
}
|
|
172
|
+
return output.join("");
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** A domain name (or email address) with its Punycode labels (xn--…) as Unicode. */
|
|
176
|
+
export function toUnicode(input) {
|
|
177
|
+
return mapDomain(input, (string) => (regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** A domain name (or email address) with its non-ASCII labels as Punycode (xn--…). */
|
|
181
|
+
export function toASCII(input) {
|
|
182
|
+
return mapDomain(input, (string) => (regexNonASCII.test(string) ? "xn--" + encode(string) : string));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export const version = "2.1.0";
|
|
186
|
+
export const ucs2 = { decode: ucs2decode, encode: ucs2encode };
|
|
187
|
+
|
|
188
|
+
export default { version, ucs2, decode, encode, toASCII, toUnicode };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node:querystring
|
|
1
|
+
// node:querystring: Node's lib/querystring.js (v22.22.2), ported to the host
|
|
2
2
|
// prelude: primordials as plain calls, its requires as imports. Node's notice:
|
|
3
3
|
//
|
|
4
4
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// node:readline (internal/readline.js): Interface, createInterface, the cursor's escapes, and
|
|
2
|
+
// node:readline/promises as promises.
|
|
3
|
+
import promises from "./readline_promises.js";
|
|
4
|
+
import { Interface, clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, moveCursor } from "./internal/readline.js";
|
|
5
|
+
|
|
6
|
+
export { Interface, clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, moveCursor, promises };
|
|
7
|
+
|
|
8
|
+
export default { Interface, clearLine, clearScreenDown, createInterface, cursorTo, emitKeypressEvents, moveCursor, promises };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// node:readline/promises: node:readline's Interface with question() as a promise, and Readline,
|
|
2
|
+
// cursor moves queued and written by commit().
|
|
3
|
+
import { codeError } from "./internal/errors.js";
|
|
4
|
+
import {
|
|
5
|
+
Interface as BaseInterface, abortError, clearLineEscape, cursorToEscape, kQuestion, kQuestionCancel, moveCursorEscape,
|
|
6
|
+
} from "./internal/readline.js";
|
|
7
|
+
|
|
8
|
+
export class Interface extends BaseInterface {
|
|
9
|
+
/** The next line, or an AbortError when the signal aborts first. */
|
|
10
|
+
question(query, options = {}) {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
let cb = resolve;
|
|
13
|
+
const signal = options?.signal;
|
|
14
|
+
if (signal) {
|
|
15
|
+
if (signal === null || typeof signal !== "object" || !("aborted" in signal)) {
|
|
16
|
+
throw codeError(TypeError, "ERR_INVALID_ARG_TYPE", 'The "options.signal" property must be an instance of AbortSignal.');
|
|
17
|
+
}
|
|
18
|
+
if (signal.aborted) return reject(abortError(signal));
|
|
19
|
+
const onAbort = () => {
|
|
20
|
+
this[kQuestionCancel]();
|
|
21
|
+
reject(abortError(signal));
|
|
22
|
+
};
|
|
23
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
24
|
+
cb = (answer) => {
|
|
25
|
+
signal.removeEventListener("abort", onAbort);
|
|
26
|
+
resolve(answer);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
this[kQuestion](query, cb);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function createInterface(input, output, completer, terminal) {
|
|
35
|
+
return new Interface(input, output, completer, terminal);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Cursor moves on a stream, queued until commit() (or written at once with autoCommit). */
|
|
39
|
+
export class Readline {
|
|
40
|
+
#stream;
|
|
41
|
+
#todo = [];
|
|
42
|
+
#autoCommit;
|
|
43
|
+
|
|
44
|
+
constructor(stream, options = undefined) {
|
|
45
|
+
if (stream === null || typeof stream !== "object" || typeof stream.write !== "function") {
|
|
46
|
+
throw codeError(TypeError, "ERR_INVALID_ARG_TYPE", 'The "stream" argument must be an instance of Writable.');
|
|
47
|
+
}
|
|
48
|
+
this.#stream = stream;
|
|
49
|
+
this.#autoCommit = Boolean(options?.autoCommit);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#add(data) {
|
|
53
|
+
if (this.#autoCommit) process.nextTick(() => this.#stream.write(data));
|
|
54
|
+
else this.#todo.push(data);
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
cursorTo(x, y = undefined) {
|
|
59
|
+
return this.#add(cursorToEscape(x, y));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
moveCursor(dx, dy) {
|
|
63
|
+
if (!dx && !dy) return this;
|
|
64
|
+
return this.#add(moveCursorEscape(dx, dy));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
clearLine(dir) {
|
|
68
|
+
return this.#add(clearLineEscape(dir));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
clearScreenDown() {
|
|
72
|
+
return this.#add("\x1b[0J");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Writes what's queued: resolved once written. */
|
|
76
|
+
commit() {
|
|
77
|
+
const data = this.#todo.join("");
|
|
78
|
+
this.#todo = [];
|
|
79
|
+
return new Promise((resolve) => this.#stream.write(data, resolve));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
rollback() {
|
|
83
|
+
this.#todo = [];
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default { Interface, Readline, createInterface };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// node:repl: a REPL evaluates what's typed, which needs a JavaScript engine a compiled program
|
|
2
|
+
// doesn't have: start() and REPLServer throw ERR_VISALJS_UNSUPPORTED. The constants, writer and
|
|
3
|
+
// Recoverable are Node's.
|
|
4
|
+
import { notSupported } from "./internal/errors.js";
|
|
5
|
+
import { inspect } from "./util.js";
|
|
6
|
+
|
|
7
|
+
export const REPL_MODE_SLOPPY = Symbol("repl-sloppy");
|
|
8
|
+
export const REPL_MODE_STRICT = Symbol("repl-strict");
|
|
9
|
+
|
|
10
|
+
/** How the REPL shows a result: util.inspect, with its options. */
|
|
11
|
+
export function writer(obj) {
|
|
12
|
+
return inspect(obj, writer.options);
|
|
13
|
+
}
|
|
14
|
+
writer.options = { ...inspect.defaultOptions, showProxy: true };
|
|
15
|
+
|
|
16
|
+
/** An error that more input could resolve. */
|
|
17
|
+
export class Recoverable extends SyntaxError {
|
|
18
|
+
constructor(err) {
|
|
19
|
+
super();
|
|
20
|
+
this.err = err;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function start() {
|
|
25
|
+
throw notSupported("repl.start (evaluating input)");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class REPLServer {
|
|
29
|
+
constructor() {
|
|
30
|
+
throw notSupported("repl.REPLServer (evaluating input)");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function isValidSyntax() {
|
|
35
|
+
throw notSupported("repl.isValidSyntax (parsing source text)");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default { REPL_MODE_SLOPPY, REPL_MODE_STRICT, REPLServer, Recoverable, isValidSyntax, start, writer };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// node:sea: a visaljs binary isn't one of Node's single executable applications: isSea() is false,
|
|
2
|
+
// and the asset calls throw ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION, as Node's do outside one.
|
|
3
|
+
import { codeError } from "./internal/errors.js";
|
|
4
|
+
|
|
5
|
+
const notInSea = () =>
|
|
6
|
+
codeError(Error, "ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION", "Operation cannot be invoked when not in a single-executable application");
|
|
7
|
+
|
|
8
|
+
export const isSea = () => false;
|
|
9
|
+
|
|
10
|
+
export function getAsset() {
|
|
11
|
+
throw notInSea();
|
|
12
|
+
}
|
|
13
|
+
export function getAssetAsBlob() {
|
|
14
|
+
throw notInSea();
|
|
15
|
+
}
|
|
16
|
+
export function getRawAsset() {
|
|
17
|
+
throw notInSea();
|
|
18
|
+
}
|
|
19
|
+
export function getAssetKeys() {
|
|
20
|
+
throw notInSea();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default { isSea, getAsset, getAssetAsBlob, getRawAsset, getAssetKeys };
|