@volter/tabnode 0.2.14-volter.88 → 0.3.1
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 +12 -5
- package/dist/assets/{runtime-worker-4MKaHFVb.js → runtime-worker-CUO9SNFs.js} +587 -233
- package/dist/code-transforms.d.ts +0 -1
- package/dist/config/cdn.d.ts +0 -1
- package/dist/create-runtime.d.ts +0 -1
- package/dist/host-globals.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +51 -21
- package/dist/node-internals.d.ts +0 -1
- package/dist/node-lib/binding/blob.d.ts +0 -1
- package/dist/node-lib/binding/buffer.d.ts +0 -1
- package/dist/node-lib/binding/cares_wrap.d.ts +0 -1
- package/dist/node-lib/binding/fds.d.ts +0 -1
- package/dist/node-lib/binding/fs.d.ts +2 -3
- package/dist/node-lib/binding/handles.d.ts +0 -1
- package/dist/node-lib/binding/http_parser.d.ts +0 -1
- package/dist/node-lib/binding/index.d.ts +0 -1
- package/dist/node-lib/binding/llhttp-wasm.d.ts +0 -1
- package/dist/node-lib/binding/misc.d.ts +0 -1
- package/dist/node-lib/binding/pipe_wrap.d.ts +0 -1
- package/dist/node-lib/binding/process_wrap.d.ts +0 -1
- package/dist/node-lib/binding/spawn_sync.d.ts +0 -1
- package/dist/node-lib/binding/stream_wrap.d.ts +0 -1
- package/dist/node-lib/binding/stubs.d.ts +0 -1
- package/dist/node-lib/binding/tcp_wrap.d.ts +0 -1
- package/dist/node-lib/binding/tty_wrap.d.ts +0 -1
- package/dist/node-lib/binding/util.d.ts +0 -1
- package/dist/node-lib/binding/uv.d.ts +0 -1
- package/dist/node-lib/binding/zlib-pako.d.ts +0 -1
- package/dist/node-lib/binding/zlib.d.ts +0 -1
- package/dist/node-lib/buffer-module.d.ts +0 -1
- package/dist/node-lib/child-process-module.d.ts +0 -1
- package/dist/node-lib/events-module.d.ts +0 -1
- package/dist/node-lib/fs-module.d.ts +0 -1
- package/dist/node-lib/http-bridge.d.ts +0 -1
- package/dist/node-lib/http-module.d.ts +0 -1
- package/dist/node-lib/internals/addresses.d.ts +0 -1
- package/dist/node-lib/internals/buffer-and-streams.d.ts +0 -1
- package/dist/node-lib/internals/child-process.d.ts +0 -1
- package/dist/node-lib/internals/events-util.d.ts +0 -1
- package/dist/node-lib/internals/index.d.ts +0 -1
- package/dist/node-lib/internals/modules.d.ts +0 -1
- package/dist/node-lib/internals/readline-access.d.ts +0 -1
- package/dist/node-lib/internals/runtime.d.ts +0 -1
- package/dist/node-lib/internals/util.d.ts +0 -1
- package/dist/node-lib/lazy.d.ts +0 -1
- package/dist/node-lib/load.d.ts +0 -1
- package/dist/node-lib/module-hooks.d.ts +0 -1
- package/dist/node-lib/net-module.d.ts +0 -1
- package/dist/node-lib/node-versions.d.ts +0 -1
- package/dist/node-lib/public-modules.d.ts +0 -1
- package/dist/node-lib/require-hook.d.ts +0 -1
- package/dist/node-lib/small-modules.d.ts +0 -1
- package/dist/node-lib/sources.d.ts +1 -2
- package/dist/node-lib/stream-module.d.ts +0 -1
- package/dist/node-lib/timers.d.ts +0 -1
- package/dist/node-lib/util-module.d.ts +0 -1
- package/dist/node-resolution.d.ts +0 -1
- package/dist/node-resolver.d.ts +0 -1
- package/dist/npm/index.d.ts +0 -1
- package/dist/npm/registry.d.ts +0 -1
- package/dist/npm/resolver.d.ts +0 -1
- package/dist/npm/tarball.d.ts +0 -1
- package/dist/process-tokens.d.ts +0 -1
- package/dist/punycode-source.d.ts +0 -1
- package/dist/runtime-interface.d.ts +0 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/server-bridge.d.ts +0 -1
- package/dist/shims/async_hooks.d.ts +0 -1
- package/dist/shims/child_process.d.ts +0 -1
- package/dist/shims/cluster.d.ts +0 -1
- package/dist/shims/command-line.d.ts +0 -1
- package/dist/shims/constants.d.ts +0 -1
- package/dist/shims/crypto-constants.d.ts +0 -1
- package/dist/shims/crypto.d.ts +0 -1
- package/dist/shims/dgram.d.ts +0 -1
- package/dist/shims/dns.d.ts +0 -1
- package/dist/shims/domain.d.ts +0 -1
- package/dist/shims/esbuild.d.ts +0 -1
- package/dist/shims/fs.d.ts +0 -1
- package/dist/shims/http2.d.ts +0 -1
- package/dist/shims/inspector.d.ts +0 -1
- package/dist/shims/module.d.ts +0 -1
- package/dist/shims/os.d.ts +0 -1
- package/dist/shims/path.d.ts +0 -1
- package/dist/shims/perf_hooks.d.ts +0 -1
- package/dist/shims/process.d.ts +0 -1
- package/dist/shims/rollup.d.ts +0 -1
- package/dist/shims/string_decoder.d.ts +0 -1
- package/dist/shims/sync-child.d.ts +0 -1
- package/dist/shims/tls.d.ts +0 -1
- package/dist/shims/url.d.ts +0 -1
- package/dist/shims/v8.d.ts +0 -1
- package/dist/shims/vfs-adapter.d.ts +0 -1
- package/dist/shims/vm.d.ts +0 -1
- package/dist/shims/wasi.d.ts +0 -1
- package/dist/shims/worker_threads.d.ts +0 -1
- package/dist/shims/zlib-constants.d.ts +0 -1
- package/dist/shims/zlib.d.ts +0 -1
- package/dist/transform.d.ts +0 -1
- package/dist/types/package-json.d.ts +0 -1
- package/dist/utils/binary-encoding.d.ts +0 -1
- package/dist/utils/glob.d.ts +0 -1
- package/dist/utils/hash.d.ts +0 -1
- package/dist/virtual-fs.d.ts +0 -1
- package/dist/vite-plugin.d.ts +0 -1
- package/dist/vite-plugin.mjs +0 -1
- package/dist/worker/runtime-worker.d.ts +0 -1
- package/dist/worker-runtime.d.ts +0 -1
- package/package.json +11 -24
- package/src/node-lib/binding/fs.ts +25 -13
- package/src/node-lib/binding/zlib.ts +1 -1
- package/src/node-lib/sources.ts +1 -1
- package/src/virtual-fs.ts +13 -2
- package/dist/assets/runtime-worker-4MKaHFVb.js.map +0 -1
- package/dist/code-transforms.d.ts.map +0 -1
- package/dist/config/cdn.d.ts.map +0 -1
- package/dist/create-runtime.d.ts.map +0 -1
- package/dist/host-globals.d.ts.map +0 -1
- package/dist/index.cjs +0 -36021
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/node-internals.d.ts.map +0 -1
- package/dist/node-lib/binding/blob.d.ts.map +0 -1
- package/dist/node-lib/binding/buffer.d.ts.map +0 -1
- package/dist/node-lib/binding/cares_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/fds.d.ts.map +0 -1
- package/dist/node-lib/binding/fs.d.ts.map +0 -1
- package/dist/node-lib/binding/handles.d.ts.map +0 -1
- package/dist/node-lib/binding/http_parser.d.ts.map +0 -1
- package/dist/node-lib/binding/index.d.ts.map +0 -1
- package/dist/node-lib/binding/llhttp-wasm.d.ts.map +0 -1
- package/dist/node-lib/binding/misc.d.ts.map +0 -1
- package/dist/node-lib/binding/pipe_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/process_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/spawn_sync.d.ts.map +0 -1
- package/dist/node-lib/binding/stream_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/stubs.d.ts.map +0 -1
- package/dist/node-lib/binding/tcp_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/tty_wrap.d.ts.map +0 -1
- package/dist/node-lib/binding/util.d.ts.map +0 -1
- package/dist/node-lib/binding/uv.d.ts.map +0 -1
- package/dist/node-lib/binding/zlib-pako.d.ts.map +0 -1
- package/dist/node-lib/binding/zlib.d.ts.map +0 -1
- package/dist/node-lib/buffer-module.d.ts.map +0 -1
- package/dist/node-lib/child-process-module.d.ts.map +0 -1
- package/dist/node-lib/events-module.d.ts.map +0 -1
- package/dist/node-lib/fs-module.d.ts.map +0 -1
- package/dist/node-lib/http-bridge.d.ts.map +0 -1
- package/dist/node-lib/http-module.d.ts.map +0 -1
- package/dist/node-lib/internals/addresses.d.ts.map +0 -1
- package/dist/node-lib/internals/buffer-and-streams.d.ts.map +0 -1
- package/dist/node-lib/internals/child-process.d.ts.map +0 -1
- package/dist/node-lib/internals/events-util.d.ts.map +0 -1
- package/dist/node-lib/internals/index.d.ts.map +0 -1
- package/dist/node-lib/internals/modules.d.ts.map +0 -1
- package/dist/node-lib/internals/readline-access.d.ts.map +0 -1
- package/dist/node-lib/internals/runtime.d.ts.map +0 -1
- package/dist/node-lib/internals/util.d.ts.map +0 -1
- package/dist/node-lib/lazy.d.ts.map +0 -1
- package/dist/node-lib/load.d.ts.map +0 -1
- package/dist/node-lib/module-hooks.d.ts.map +0 -1
- package/dist/node-lib/net-module.d.ts.map +0 -1
- package/dist/node-lib/node-versions.d.ts.map +0 -1
- package/dist/node-lib/public-modules.d.ts.map +0 -1
- package/dist/node-lib/require-hook.d.ts.map +0 -1
- package/dist/node-lib/small-modules.d.ts.map +0 -1
- package/dist/node-lib/sources.d.ts.map +0 -1
- package/dist/node-lib/stream-module.d.ts.map +0 -1
- package/dist/node-lib/timers.d.ts.map +0 -1
- package/dist/node-lib/util-module.d.ts.map +0 -1
- package/dist/node-resolution.d.ts.map +0 -1
- package/dist/node-resolver.d.ts.map +0 -1
- package/dist/npm/index.d.ts.map +0 -1
- package/dist/npm/registry.d.ts.map +0 -1
- package/dist/npm/resolver.d.ts.map +0 -1
- package/dist/npm/tarball.d.ts.map +0 -1
- package/dist/process-tokens.d.ts.map +0 -1
- package/dist/punycode-source.d.ts.map +0 -1
- package/dist/runtime-interface.d.ts.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/server-bridge.d.ts.map +0 -1
- package/dist/shims/async_hooks.d.ts.map +0 -1
- package/dist/shims/child_process.d.ts.map +0 -1
- package/dist/shims/cluster.d.ts.map +0 -1
- package/dist/shims/command-line.d.ts.map +0 -1
- package/dist/shims/constants.d.ts.map +0 -1
- package/dist/shims/crypto-constants.d.ts.map +0 -1
- package/dist/shims/crypto.d.ts.map +0 -1
- package/dist/shims/dgram.d.ts.map +0 -1
- package/dist/shims/dns.d.ts.map +0 -1
- package/dist/shims/domain.d.ts.map +0 -1
- package/dist/shims/esbuild.d.ts.map +0 -1
- package/dist/shims/fs.d.ts.map +0 -1
- package/dist/shims/http2.d.ts.map +0 -1
- package/dist/shims/inspector.d.ts.map +0 -1
- package/dist/shims/module.d.ts.map +0 -1
- package/dist/shims/os.d.ts.map +0 -1
- package/dist/shims/path.d.ts.map +0 -1
- package/dist/shims/perf_hooks.d.ts.map +0 -1
- package/dist/shims/process.d.ts.map +0 -1
- package/dist/shims/rollup.d.ts.map +0 -1
- package/dist/shims/string_decoder.d.ts.map +0 -1
- package/dist/shims/sync-child.d.ts.map +0 -1
- package/dist/shims/tls.d.ts.map +0 -1
- package/dist/shims/url.d.ts.map +0 -1
- package/dist/shims/v8.d.ts.map +0 -1
- package/dist/shims/vfs-adapter.d.ts.map +0 -1
- package/dist/shims/vm.d.ts.map +0 -1
- package/dist/shims/wasi.d.ts.map +0 -1
- package/dist/shims/worker_threads.d.ts.map +0 -1
- package/dist/shims/zlib-constants.d.ts.map +0 -1
- package/dist/shims/zlib.d.ts.map +0 -1
- package/dist/transform.d.ts.map +0 -1
- package/dist/types/package-json.d.ts.map +0 -1
- package/dist/utils/binary-encoding.d.ts.map +0 -1
- package/dist/utils/glob.d.ts.map +0 -1
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/virtual-fs.d.ts.map +0 -1
- package/dist/vite-plugin.cjs +0 -50
- package/dist/vite-plugin.cjs.map +0 -1
- package/dist/vite-plugin.d.ts.map +0 -1
- package/dist/vite-plugin.mjs.map +0 -1
- package/dist/worker/runtime-worker.d.ts.map +0 -1
- package/dist/worker-runtime.d.ts.map +0 -1
package/dist/config/cdn.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export declare const ESBUILD_WASM_ESM_CDN = "https://esm.sh/esbuild-wasm@0.20.0"
|
|
|
9
9
|
export declare const ESBUILD_WASM_BINARY_CDN = "https://unpkg.com/esbuild-wasm@0.20.0/esbuild.wasm";
|
|
10
10
|
export declare const ESBUILD_WASM_BROWSER_CDN = "https://unpkg.com/esbuild-wasm@0.20.0/esm/browser.min.js";
|
|
11
11
|
export declare const ROLLUP_BROWSER_CDN = "https://esm.sh/@rollup/browser@4.63.1";
|
|
12
|
-
//# sourceMappingURL=cdn.d.ts.map
|
package/dist/create-runtime.d.ts
CHANGED
|
@@ -19,4 +19,3 @@ export declare function createRuntime(vfs: VirtualFS, options?: CreateRuntimeOpt
|
|
|
19
19
|
export { Runtime } from './runtime';
|
|
20
20
|
export { WorkerRuntime } from './worker-runtime';
|
|
21
21
|
export type { IRuntime, IExecuteResult, IRuntimeOptions, CreateRuntimeOptions, VFSSnapshot, } from './runtime-interface';
|
|
22
|
-
//# sourceMappingURL=create-runtime.d.ts.map
|
package/dist/host-globals.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -124,4 +124,3 @@ export declare function createContainer(options?: ContainerOptions): {
|
|
|
124
124
|
export default createContainer;
|
|
125
125
|
export { createNodeResolver } from './node-resolution';
|
|
126
126
|
export type { ResolutionFs, ExportsResolver, NodeResolverOptions, NodeResolver } from './node-resolution';
|
|
127
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.mjs
CHANGED
|
@@ -7626,11 +7626,11 @@ function answerFilesystem(method, args) {
|
|
|
7626
7626
|
return answer2.apply(hostVfs, plain) ?? null;
|
|
7627
7627
|
}
|
|
7628
7628
|
const inodes = /* @__PURE__ */ new Map();
|
|
7629
|
-
let nextInode = 1;
|
|
7629
|
+
let nextInode$1 = 1;
|
|
7630
7630
|
function inodeOf(path2) {
|
|
7631
7631
|
let inode = inodes.get(path2);
|
|
7632
7632
|
if (inode === void 0) {
|
|
7633
|
-
inode = nextInode++;
|
|
7633
|
+
inode = nextInode$1++;
|
|
7634
7634
|
inodes.set(path2, inode);
|
|
7635
7635
|
}
|
|
7636
7636
|
return inode;
|
|
@@ -9144,6 +9144,8 @@ const fsBinding = {
|
|
|
9144
9144
|
if ((flags & bits.excl) !== 0 && (flags & bits.create) !== 0 && exists) throw createNodeError$1("EEXIST", "open", name);
|
|
9145
9145
|
if (!exists) {
|
|
9146
9146
|
if ((flags & bits.create) === 0) throw createNodeError$1("ENOENT", "open", name);
|
|
9147
|
+
const parent = name.slice(0, name.lastIndexOf("/")) || "/";
|
|
9148
|
+
if (!tree2.statSync(parent).isDirectory()) throw createNodeError$1("ENOTDIR", "open", name);
|
|
9147
9149
|
tree2.writeFileSync(name, "");
|
|
9148
9150
|
} else if ((flags & bits.truncate) !== 0) {
|
|
9149
9151
|
tree2.writeFileSync(name, "");
|
|
@@ -9156,6 +9158,7 @@ const fsBinding = {
|
|
|
9156
9158
|
},
|
|
9157
9159
|
close(fd, req) {
|
|
9158
9160
|
return answer(req, () => {
|
|
9161
|
+
fileFor(fd);
|
|
9159
9162
|
openFiles.delete(fd);
|
|
9160
9163
|
return void 0;
|
|
9161
9164
|
});
|
|
@@ -9164,6 +9167,7 @@ const fsBinding = {
|
|
|
9164
9167
|
read(fd, buffer2, offset2, length, position, req) {
|
|
9165
9168
|
return answer(req, () => {
|
|
9166
9169
|
const file = fileFor(fd);
|
|
9170
|
+
if ((file.flags & 3) === 1) throw createNodeError$1("EBADF", "read", file.path);
|
|
9167
9171
|
if (file.cached === void 0) file.cached = file.tree.readFileSync(file.path);
|
|
9168
9172
|
const bytes2 = file.cached;
|
|
9169
9173
|
const from = position === null || position === void 0 || position < 0 ? file.position : position;
|
|
@@ -9186,17 +9190,27 @@ const fsBinding = {
|
|
|
9186
9190
|
});
|
|
9187
9191
|
},
|
|
9188
9192
|
/** Node's fast path for `readFile` with an encoding it can decode itself. */
|
|
9189
|
-
readFileUtf8(path2,
|
|
9190
|
-
|
|
9193
|
+
readFileUtf8(path2, flags) {
|
|
9194
|
+
const owned = typeof path2 !== "number";
|
|
9195
|
+
const fd = owned ? fsBinding.open(path2, flags, 438) : path2;
|
|
9196
|
+
try {
|
|
9197
|
+
const file = fileFor(fd);
|
|
9198
|
+
const bytes2 = new Uint8Array(file.tree.statSync(file.path).size);
|
|
9199
|
+
const length = fsBinding.read(fd, bytes2, 0, bytes2.length, -1);
|
|
9200
|
+
return new TextDecoder().decode(bytes2.subarray(0, length));
|
|
9201
|
+
} finally {
|
|
9202
|
+
if (owned) fsBinding.close(fd);
|
|
9203
|
+
}
|
|
9191
9204
|
},
|
|
9192
9205
|
// ---- writing ------------------------------------------------------------
|
|
9193
9206
|
writeBuffer(fd, buffer2, offset2, length, position, req) {
|
|
9194
9207
|
return answer(req, () => {
|
|
9195
9208
|
const file = fileFor(fd);
|
|
9209
|
+
if ((file.flags & 3) === 0) throw createNodeError$1("EBADF", "write", file.path);
|
|
9196
9210
|
const tree2 = file.tree;
|
|
9197
9211
|
const slice = buffer2.subarray(offset2, offset2 + length);
|
|
9198
9212
|
const existing = file.cached ?? (tree2.existsSync(file.path) ? tree2.readFileSync(file.path) : new Uint8Array(0));
|
|
9199
|
-
const at2 = position === null || position === void 0 || position < 0 ? file.position : position;
|
|
9213
|
+
const at2 = (file.flags & flagBits().append) !== 0 ? existing.length : position === null || position === void 0 || position < 0 ? file.position : position;
|
|
9200
9214
|
const size = Math.max(existing.length, at2 + slice.length);
|
|
9201
9215
|
const next = new Uint8Array(size);
|
|
9202
9216
|
next.set(existing, 0);
|
|
@@ -9226,15 +9240,14 @@ const fsBinding = {
|
|
|
9226
9240
|
const bytes2 = encoding === "utf8" || encoding === void 0 || encoding === "utf-8" ? new TextEncoder().encode(value) : Uint8Array.from(value, (character) => character.charCodeAt(0) & 255);
|
|
9227
9241
|
return fsBinding.writeBuffer(fd, bytes2, 0, bytes2.length, position ?? null, req);
|
|
9228
9242
|
},
|
|
9229
|
-
writeFileUtf8(path2, data2, flags,
|
|
9230
|
-
const
|
|
9231
|
-
const
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9243
|
+
writeFileUtf8(path2, data2, flags, mode) {
|
|
9244
|
+
const owned = typeof path2 !== "number";
|
|
9245
|
+
const fd = owned ? fsBinding.open(path2, flags, mode) : path2;
|
|
9246
|
+
try {
|
|
9247
|
+
fsBinding.writeString(fd, data2, null, "utf8");
|
|
9248
|
+
} finally {
|
|
9249
|
+
if (owned) fsBinding.close(fd);
|
|
9236
9250
|
}
|
|
9237
|
-
tree2.writeFileSync(name, data2);
|
|
9238
9251
|
return void 0;
|
|
9239
9252
|
},
|
|
9240
9253
|
// ---- metadata -----------------------------------------------------------
|
|
@@ -9515,6 +9528,7 @@ const fsBinding = {
|
|
|
9515
9528
|
ftruncate(fd, length, req) {
|
|
9516
9529
|
return answer(req, () => {
|
|
9517
9530
|
const file = fileFor(fd);
|
|
9531
|
+
if ((file.flags & 3) === 0) throw createNodeError$1("EBADF", "ftruncate", file.path);
|
|
9518
9532
|
const tree2 = file.tree;
|
|
9519
9533
|
const bytes2 = file.cached ?? tree2.readFileSync(file.path);
|
|
9520
9534
|
const next = new Uint8Array(length);
|
|
@@ -16648,10 +16662,17 @@ var implementation$1 = function bind2(that) {
|
|
|
16648
16662
|
var implementation = implementation$1;
|
|
16649
16663
|
var functionBind = Function.prototype.bind || implementation;
|
|
16650
16664
|
var functionCall = Function.prototype.call;
|
|
16651
|
-
var functionApply
|
|
16665
|
+
var functionApply;
|
|
16666
|
+
var hasRequiredFunctionApply;
|
|
16667
|
+
function requireFunctionApply() {
|
|
16668
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
16669
|
+
hasRequiredFunctionApply = 1;
|
|
16670
|
+
functionApply = Function.prototype.apply;
|
|
16671
|
+
return functionApply;
|
|
16672
|
+
}
|
|
16652
16673
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
16653
16674
|
var bind$2 = functionBind;
|
|
16654
|
-
var $apply$1 =
|
|
16675
|
+
var $apply$1 = requireFunctionApply();
|
|
16655
16676
|
var $call$2 = functionCall;
|
|
16656
16677
|
var $reflectApply = reflectApply;
|
|
16657
16678
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
@@ -16771,7 +16792,7 @@ var hasSymbols = requireHasSymbols()();
|
|
|
16771
16792
|
var getProto = requireGetProto();
|
|
16772
16793
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
16773
16794
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
16774
|
-
var $apply =
|
|
16795
|
+
var $apply = requireFunctionApply();
|
|
16775
16796
|
var $call = functionCall;
|
|
16776
16797
|
var needsEval = {};
|
|
16777
16798
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
@@ -17412,7 +17433,7 @@ function requireApplyBind() {
|
|
|
17412
17433
|
if (hasRequiredApplyBind) return applyBind;
|
|
17413
17434
|
hasRequiredApplyBind = 1;
|
|
17414
17435
|
var bind3 = functionBind;
|
|
17415
|
-
var $apply2 =
|
|
17436
|
+
var $apply2 = requireFunctionApply();
|
|
17416
17437
|
var actualApply$1 = actualApply;
|
|
17417
17438
|
applyBind = function applyBind2() {
|
|
17418
17439
|
return actualApply$1(bind3, $apply2, arguments);
|
|
@@ -25824,6 +25845,16 @@ lazyExport("stream", "pipeline");
|
|
|
25824
25845
|
lazyExport("stream", "finished");
|
|
25825
25846
|
lazyModule("stream/promises");
|
|
25826
25847
|
const streamPromisesModule = lazyModule("stream/promises");
|
|
25848
|
+
const nodeInodes = /* @__PURE__ */ new WeakMap();
|
|
25849
|
+
let nextInode = 1;
|
|
25850
|
+
function inodeFor(node) {
|
|
25851
|
+
let inode = nodeInodes.get(node);
|
|
25852
|
+
if (inode === void 0) {
|
|
25853
|
+
inode = nextInode++;
|
|
25854
|
+
nodeInodes.set(node, inode);
|
|
25855
|
+
}
|
|
25856
|
+
return inode;
|
|
25857
|
+
}
|
|
25827
25858
|
function createNodeError(code2, syscall, path2, message) {
|
|
25828
25859
|
const errno = {
|
|
25829
25860
|
ENOENT: -2,
|
|
@@ -26140,7 +26171,7 @@ class VirtualFS {
|
|
|
26140
26171
|
uid: 1e3,
|
|
26141
26172
|
gid: 1e3,
|
|
26142
26173
|
dev: 0,
|
|
26143
|
-
ino:
|
|
26174
|
+
ino: inodeFor(node),
|
|
26144
26175
|
rdev: 0,
|
|
26145
26176
|
blksize: 4096,
|
|
26146
26177
|
blocks: Math.ceil(size / 512)
|
|
@@ -26179,7 +26210,7 @@ class VirtualFS {
|
|
|
26179
26210
|
uid: 1e3,
|
|
26180
26211
|
gid: 1e3,
|
|
26181
26212
|
dev: 0,
|
|
26182
|
-
ino:
|
|
26213
|
+
ino: inodeFor(node),
|
|
26183
26214
|
rdev: 0,
|
|
26184
26215
|
blksize: 4096,
|
|
26185
26216
|
blocks: 0
|
|
@@ -33779,7 +33810,7 @@ class WorkerRuntime {
|
|
|
33779
33810
|
this.worker = new Worker(
|
|
33780
33811
|
new URL(
|
|
33781
33812
|
/* @vite-ignore */
|
|
33782
|
-
"/assets/runtime-worker-
|
|
33813
|
+
"/assets/runtime-worker-CUO9SNFs.js",
|
|
33783
33814
|
import.meta.url
|
|
33784
33815
|
),
|
|
33785
33816
|
{ type: "module" }
|
|
@@ -36017,4 +36048,3 @@ export {
|
|
|
36017
36048
|
utilModule as util,
|
|
36018
36049
|
workerThreadsShim as worker_threads
|
|
36019
36050
|
};
|
|
36020
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/node-internals.d.ts
CHANGED
|
@@ -65,4 +65,3 @@ export declare class ERR_STRING_TOO_LONG extends RangeError {
|
|
|
65
65
|
export declare function validateNumber(value: unknown, name: string): void;
|
|
66
66
|
export declare function validateUndefined(value: unknown, name: string): void;
|
|
67
67
|
export declare function validateInt32(value: unknown, name: string, min?: number, max?: number): void;
|
|
68
|
-
//# sourceMappingURL=node-internals.d.ts.map
|
|
@@ -95,11 +95,11 @@ export declare const fsBinding: {
|
|
|
95
95
|
read(fd: number, buffer: Uint8Array, offset: number, length: number, position: number, req?: FSReq): number | undefined;
|
|
96
96
|
readBuffers(fd: number, buffers: Uint8Array[], position: number, req?: FSReq): number | undefined;
|
|
97
97
|
/** Node's fast path for `readFile` with an encoding it can decode itself. */
|
|
98
|
-
readFileUtf8(path: unknown,
|
|
98
|
+
readFileUtf8(path: unknown, flags: number): string;
|
|
99
99
|
writeBuffer(fd: number, buffer: Uint8Array, offset: number, length: number, position: number | null, req?: FSReq): number | undefined;
|
|
100
100
|
writeBuffers(fd: number, buffers: Uint8Array[], position: number | null, req?: FSReq): number | undefined;
|
|
101
101
|
writeString(fd: number, value: string, position: number | null, encoding: string | undefined, req?: FSReq): number | undefined;
|
|
102
|
-
writeFileUtf8(path: unknown, data: string, flags: number,
|
|
102
|
+
writeFileUtf8(path: unknown, data: string, flags: number, mode: number): undefined;
|
|
103
103
|
stat(path: unknown, bigint: boolean, req?: FSReq, throwIfNoEntry?: boolean): Float64Array | BigInt64Array | undefined;
|
|
104
104
|
lstat(path: unknown, bigint: boolean, req?: FSReq, throwIfNoEntry?: boolean): Float64Array | BigInt64Array | undefined;
|
|
105
105
|
fstat(fd: number, bigint: boolean, req?: FSReq): Float64Array | BigInt64Array | undefined;
|
|
@@ -154,4 +154,3 @@ export declare const fsBinding: {
|
|
|
154
154
|
ftruncate(fd: number, length: number, req?: FSReq): undefined;
|
|
155
155
|
};
|
|
156
156
|
export default fsBinding;
|
|
157
|
-
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -78,4 +78,3 @@ export declare function __releaseOwnedHandles(token: ProcessToken): void;
|
|
|
78
78
|
* through the move, as Node's does.
|
|
79
79
|
*/
|
|
80
80
|
export declare function __adoptHandle(handle: OwnedHandle | null | undefined, token: ProcessToken | null): void;
|
|
81
|
-
//# sourceMappingURL=handles.d.ts.map
|
|
@@ -40,4 +40,3 @@ export interface UpgradeResult {
|
|
|
40
40
|
* onto this end, because they are the first frame.
|
|
41
41
|
*/
|
|
42
42
|
export declare function __upgradeOverLoopback(port: number, method: string, url: string, headers: Record<string, string>): Promise<UpgradeResult>;
|
|
43
|
-
//# sourceMappingURL=http-bridge.d.ts.map
|
|
@@ -32,4 +32,3 @@ export declare const httpServerModule: Record<string, unknown>;
|
|
|
32
32
|
export declare const httpClientModule: Record<string, unknown>;
|
|
33
33
|
export declare const httpAgentModule: Record<string, unknown>;
|
|
34
34
|
export default httpModule;
|
|
35
|
-
//# sourceMappingURL=http-module.d.ts.map
|
package/dist/node-lib/lazy.d.ts
CHANGED
package/dist/node-lib/load.d.ts
CHANGED
|
@@ -12,4 +12,3 @@ export type LibRequire = (specifier: string) => unknown;
|
|
|
12
12
|
export declare function setLibRequire(lib: LibRequire): void;
|
|
13
13
|
/** A vendored Node file, by the name Node's own `require` calls it. */
|
|
14
14
|
export declare function libRequire(specifier: string): unknown;
|
|
15
|
-
//# sourceMappingURL=require-hook.d.ts.map
|
|
@@ -13,4 +13,3 @@ export declare const readlineModule: Record<string, unknown>;
|
|
|
13
13
|
export declare const readlinePromisesModule: Record<string, unknown>;
|
|
14
14
|
/** `zlib`, on zlib's own inflate and deflate. */
|
|
15
15
|
export declare const zlibModule: Record<string, unknown>;
|
|
16
|
-
//# sourceMappingURL=small-modules.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** The Node the vendored files come from, reported in `
|
|
1
|
+
/** The Node the vendored files come from, reported in `BUILTINS.md`. */
|
|
2
2
|
export declare const NODE_LIB_VERSION = "v22.18.0";
|
|
3
3
|
export declare const NODE_LIB_SOURCES: Record<string, string>;
|
|
4
|
-
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -74,4 +74,3 @@ export declare const promises: Record<string, unknown>;
|
|
|
74
74
|
export declare const streamPromisesModule: Record<string, unknown>;
|
|
75
75
|
/** Node's `stream` module object IS the `Stream` class, as `stream.js` exports it. */
|
|
76
76
|
export default streamModule;
|
|
77
|
-
//# sourceMappingURL=stream-module.d.ts.map
|
package/dist/node-resolver.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ import { type NodeResolver, type ResolutionFs } from './node-resolution';
|
|
|
4
4
|
* does, module and import entries first and TypeScript sources.
|
|
5
5
|
*/
|
|
6
6
|
export declare function __nodeResolverFor(fs: ResolutionFs, profile: 'runtime' | 'bundler', extensions?: readonly string[]): NodeResolver;
|
|
7
|
-
//# sourceMappingURL=node-resolver.d.ts.map
|
package/dist/npm/index.d.ts
CHANGED
|
@@ -70,4 +70,3 @@ export type { RegistryOptions, PackageVersion, PackageManifest } from './registr
|
|
|
70
70
|
export type { ResolvedPackage, ResolveOptions } from './resolver';
|
|
71
71
|
export type { ExtractOptions } from './tarball';
|
|
72
72
|
export { parsePackageSpec };
|
|
73
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/npm/registry.d.ts
CHANGED
package/dist/npm/resolver.d.ts
CHANGED
|
@@ -76,4 +76,3 @@ export declare function resolveFromPackageJson(packageJson: {
|
|
|
76
76
|
devDependencies?: Record<string, string>;
|
|
77
77
|
}, options?: ResolveOptions): Promise<Map<string, ResolvedPackage>>;
|
|
78
78
|
export { parseVersion, compareVersions, satisfies, findBestVersion };
|
|
79
|
-
//# sourceMappingURL=resolver.d.ts.map
|
package/dist/npm/tarball.d.ts
CHANGED
package/dist/process-tokens.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export declare const PUNYCODE_VERSION = "2.3.1";
|
|
2
2
|
export declare const PUNYCODE_SOURCE = "'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nmodule.exports = punycode;\n";
|
|
3
|
-
//# sourceMappingURL=punycode-source.d.ts.map
|