cf-workers-native 0.1.4 → 0.1.6
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 +2 -2
- package/dist/browser/documents/page-source.js +1 -1
- package/dist/browser/fetch/host-call.js +6 -1
- package/dist/browser/fetch/native-network.d.ts +1 -1
- package/dist/browser/fetch/relay.js +2 -0
- package/dist/browser/headers/index.d.ts +2 -0
- package/dist/browser/headers/index.js +5 -0
- package/dist/browser/isolated/transport.js +3 -2
- package/dist/browser/request/index.js +3 -2
- package/dist/browser/response/index.d.ts +2 -0
- package/dist/browser/response/index.js +11 -3
- package/dist/browser/structured-clone/index.d.ts +3 -0
- package/dist/browser/structured-clone/index.js +75 -7
- package/dist/browser/websocket/attachment-size.d.ts +3 -0
- package/dist/browser/websocket/attachment-size.js +336 -0
- package/dist/browser/websocket/brand.d.ts +4 -0
- package/dist/browser/websocket/brand.js +16 -0
- package/dist/browser/websocket/close-event.d.ts +7 -0
- package/dist/browser/websocket/close-event.js +30 -0
- package/dist/browser/websocket/compression.d.ts +5 -0
- package/dist/browser/websocket/compression.js +124 -0
- package/dist/browser/websocket/conversion.d.ts +2 -0
- package/dist/browser/websocket/conversion.js +13 -0
- package/dist/browser/websocket/endpoint.d.ts +39 -0
- package/dist/browser/websocket/endpoint.js +379 -0
- package/dist/browser/websocket/frames.d.ts +21 -0
- package/dist/browser/websocket/frames.js +121 -0
- package/dist/browser/websocket/native.d.ts +14 -0
- package/dist/browser/websocket/native.js +226 -0
- package/dist/cloudflare/apis/cloudflare-node/index.js +11 -23
- package/dist/cloudflare/workers/worker-runtime.js +2 -1
- package/dist/compat/console/index.d.ts +35 -0
- package/dist/compat/console/index.js +92 -0
- package/dist/compat/crypto/LICENSE-3RD-PARTY.md +39 -0
- package/dist/compat/crypto/LICENSE-APACHE +177 -0
- package/dist/compat/crypto/LICENSE.boringssl +238 -0
- package/dist/compat/crypto/LICENSE.emscripten +102 -0
- package/dist/compat/crypto/LICENSE.musl +193 -0
- package/dist/compat/crypto/LICENSE.ncrypto +21 -0
- package/dist/compat/crypto/LICENSE.openssl +177 -0
- package/dist/compat/crypto/asymmetric.d.ts +13 -0
- package/dist/compat/crypto/asymmetric.js +312 -0
- package/dist/compat/crypto/brorand.cjs +74 -0
- package/dist/compat/crypto/brorand.d.cts +6 -0
- package/dist/compat/crypto/certificate.d.ts +14 -0
- package/dist/compat/crypto/certificate.js +66 -0
- package/dist/compat/crypto/cipher-handle.d.ts +27 -0
- package/dist/compat/crypto/cipher-handle.js +239 -0
- package/dist/compat/crypto/cipher-info.d.ts +12 -0
- package/dist/compat/crypto/cipher-info.js +324 -0
- package/dist/compat/crypto/constants.d.ts +62 -0
- package/dist/compat/crypto/constants.js +68 -0
- package/dist/compat/crypto/dh-handle.d.ts +17 -0
- package/dist/compat/crypto/dh-handle.js +180 -0
- package/dist/compat/crypto/dh.d.ts +53 -0
- package/dist/compat/crypto/dh.js +138 -0
- package/dist/compat/crypto/digest-stream.d.ts +15 -0
- package/dist/compat/crypto/digest-stream.js +213 -0
- package/dist/compat/crypto/digests.d.ts +3 -0
- package/dist/compat/crypto/digests.js +32 -0
- package/dist/compat/crypto/ecdh.d.ts +25 -0
- package/dist/compat/crypto/ecdh.js +109 -0
- package/dist/compat/crypto/hash-handle.d.ts +23 -0
- package/dist/compat/crypto/hash-handle.js +70 -0
- package/dist/compat/crypto/hash.d.ts +37 -0
- package/dist/compat/crypto/hash.js +218 -0
- package/dist/compat/crypto/hkdf.d.ts +2 -0
- package/dist/compat/crypto/hkdf.js +78 -0
- package/dist/compat/crypto/index.cjs +2 -0
- package/dist/compat/crypto/index.d.cts +169 -0
- package/dist/compat/crypto/index.d.ts +213 -0
- package/dist/compat/crypto/index.js +96 -0
- package/dist/compat/crypto/key-errors.d.ts +10 -0
- package/dist/compat/crypto/key-errors.js +17 -0
- package/dist/compat/crypto/key-export.d.ts +8 -0
- package/dist/compat/crypto/key-export.js +49 -0
- package/dist/compat/crypto/key-formats.d.ts +7 -0
- package/dist/compat/crypto/key-formats.js +251 -0
- package/dist/compat/crypto/key-options.d.ts +1 -0
- package/dist/compat/crypto/key-options.js +74 -0
- package/dist/compat/crypto/key-state.d.ts +10 -0
- package/dist/compat/crypto/key-state.js +4 -0
- package/dist/compat/crypto/keys.d.ts +58 -0
- package/dist/compat/crypto/keys.js +278 -0
- package/dist/compat/crypto/metadata.d.ts +13 -0
- package/dist/compat/crypto/metadata.js +109 -0
- package/dist/compat/crypto/native-cipher.d.ts +17 -0
- package/dist/compat/crypto/native-cipher.js +192 -0
- package/dist/compat/crypto/native-crypto.d.ts +81 -0
- package/dist/compat/crypto/native-crypto.js +681 -0
- package/dist/compat/crypto/pbkdf2-handle.d.ts +4 -0
- package/dist/compat/crypto/pbkdf2-handle.js +26 -0
- package/dist/compat/crypto/pbkdf2.d.ts +5 -0
- package/dist/compat/crypto/pbkdf2.js +60 -0
- package/dist/compat/crypto/prime.d.ts +19 -0
- package/dist/compat/crypto/prime.js +146 -0
- package/dist/compat/crypto/random.d.ts +18 -0
- package/dist/compat/crypto/random.js +203 -0
- package/dist/compat/crypto/rsa.d.ts +21 -0
- package/dist/compat/crypto/rsa.js +177 -0
- package/dist/compat/crypto/scrypt.d.ts +25 -0
- package/dist/compat/crypto/scrypt.js +152 -0
- package/dist/compat/crypto/sign-errors.d.ts +8 -0
- package/dist/compat/crypto/sign-errors.js +13 -0
- package/dist/compat/crypto/sign-handle.d.ts +22 -0
- package/dist/compat/crypto/sign-handle.js +149 -0
- package/dist/compat/crypto/signatures.d.ts +34 -0
- package/dist/compat/crypto/signatures.js +252 -0
- package/dist/compat/crypto/subtle-digest.d.ts +1 -0
- package/dist/compat/crypto/subtle-digest.js +56 -0
- package/dist/compat/crypto/symmetric.d.ts +45 -0
- package/dist/compat/crypto/symmetric.js +239 -0
- package/dist/compat/crypto/validation.d.ts +7 -0
- package/dist/compat/crypto/validation.js +46 -0
- package/dist/compat/crypto/webcrypto.d.ts +13 -0
- package/dist/compat/crypto/webcrypto.js +51 -0
- package/dist/compat/crypto/x509.d.ts +30 -0
- package/dist/compat/crypto/x509.js +407 -0
- package/dist/compat/events/errors.d.ts +8 -0
- package/dist/compat/events/errors.js +39 -0
- package/dist/compat/events/index.cjs +2 -0
- package/dist/compat/events/index.d.cts +2 -0
- package/dist/compat/events/index.d.ts +64 -0
- package/dist/compat/events/index.js +792 -0
- package/dist/compat/events/intrinsics.d.ts +1 -0
- package/dist/compat/events/intrinsics.js +2 -0
- package/dist/compat/fs/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/fs/LICENSE-APACHE +177 -0
- package/dist/compat/fs/directory-backend.d.ts +6 -0
- package/dist/compat/fs/directory-backend.js +51 -0
- package/dist/compat/fs/directory.d.ts +37 -0
- package/dist/compat/fs/directory.js +137 -0
- package/dist/compat/fs/embedded.d.ts +85 -0
- package/dist/compat/fs/embedded.js +260 -0
- package/dist/compat/fs/file-handle.d.ts +75 -0
- package/dist/compat/fs/file-handle.js +226 -0
- package/dist/compat/fs/glob-internal.d.ts +15 -0
- package/dist/compat/fs/glob-internal.js +417 -0
- package/dist/compat/fs/glob.d.ts +10 -0
- package/dist/compat/fs/glob.js +71 -0
- package/dist/compat/fs/index.d.ts +8 -82
- package/dist/compat/fs/index.js +736 -238
- package/dist/compat/fs/io-validation.d.ts +14 -0
- package/dist/compat/fs/io-validation.js +130 -0
- package/dist/compat/fs/io.d.ts +1 -0
- package/dist/compat/fs/io.js +282 -0
- package/dist/compat/fs/mode.d.ts +1 -0
- package/dist/compat/fs/mode.js +13 -0
- package/dist/compat/fs/promises/index.d.ts +3 -1
- package/dist/compat/fs/promises/index.js +1 -1
- package/dist/compat/fs/public-types.d.ts +120 -0
- package/dist/compat/fs/public-types.js +1 -0
- package/dist/compat/fs/stream-errors.d.ts +6 -0
- package/dist/compat/fs/stream-errors.js +8 -0
- package/dist/compat/fs/stream-utils.d.ts +16 -0
- package/dist/compat/fs/stream-utils.js +29 -0
- package/dist/compat/fs/streams.d.ts +104 -0
- package/dist/compat/fs/streams.js +794 -0
- package/dist/compat/fs/writable.d.ts +14 -0
- package/dist/compat/fs/writable.js +532 -0
- package/dist/compat/http/index.d.ts +11 -28
- package/dist/compat/http/index.js +81 -125
- package/dist/compat/http/server-options.d.ts +1 -0
- package/dist/compat/http/server-options.js +87 -0
- package/dist/compat/http/symbols.d.ts +5 -0
- package/dist/compat/http/symbols.js +9 -0
- package/dist/compat/http/unique-headers.d.ts +1 -0
- package/dist/compat/http/unique-headers.js +21 -0
- package/dist/compat/http-common/index.d.ts +37 -0
- package/dist/compat/http-common/index.js +43 -0
- package/dist/compat/http-outgoing/index.d.ts +14 -0
- package/dist/compat/http-outgoing/index.js +17 -0
- package/dist/compat/http-server/index.d.ts +18 -0
- package/dist/compat/http-server/index.js +26 -0
- package/dist/compat/https/index.d.ts +4 -2
- package/dist/compat/module/builtins.d.ts +1 -0
- package/dist/compat/module/builtins.js +101 -0
- package/dist/compat/module/index.d.ts +4 -2
- package/dist/compat/module/index.js +22 -17
- package/dist/compat/module/metadata.d.ts +44 -0
- package/dist/compat/module/metadata.js +127 -0
- package/dist/compat/net/internal-net.js +4 -0
- package/dist/compat/net/sockets.d.ts +5 -0
- package/dist/compat/net/sockets.js +153 -14
- package/dist/compat/net/validators.d.ts +1 -0
- package/dist/compat/net/validators.js +8 -0
- package/dist/compat/process/configuration.d.ts +113 -0
- package/dist/compat/process/configuration.js +115 -0
- package/dist/compat/process/directory.d.ts +4 -0
- package/dist/compat/process/directory.js +28 -0
- package/dist/compat/process/files.d.ts +3 -0
- package/dist/compat/process/files.js +10 -0
- package/dist/compat/process/index.cjs +2 -0
- package/dist/compat/process/index.d.cts +4 -0
- package/dist/compat/process/index.d.ts +20 -0
- package/dist/compat/process/index.js +113 -0
- package/dist/compat/process/metadata.d.ts +135 -0
- package/dist/compat/process/metadata.js +251 -0
- package/dist/compat/process/scheduling.d.ts +2 -0
- package/dist/compat/process/scheduling.js +60 -0
- package/dist/compat/process/state.d.ts +4 -0
- package/dist/compat/process/state.js +5 -0
- package/dist/compat/process/stdio.d.ts +18 -0
- package/dist/compat/process/stdio.js +66 -0
- package/dist/compat/stream/destroy.d.ts +1 -0
- package/dist/compat/stream/destroy.js +21 -1
- package/dist/compat/stream/readable.js +10 -2
- package/dist/compat/stream-web/LICENSE +22 -0
- package/dist/compat/stream-web/ponyfill.d.ts +1 -1
- package/dist/compat/stream-web/ponyfill.js +2369 -1775
- package/dist/compat/stream-web/runtime.d.ts +1 -1
- package/dist/compat/stream-web/runtime.js +3 -2
- package/dist/compat/stream-wrap/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/stream-wrap/LICENSE-APACHE +177 -0
- package/dist/compat/stream-wrap/index.d.ts +1 -0
- package/dist/compat/stream-wrap/index.js +1 -0
- package/dist/compat/tls/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/tls/LICENSE-APACHE +177 -0
- package/dist/compat/tls/constants.d.ts +7 -0
- package/dist/compat/tls/constants.js +14 -0
- package/dist/compat/tls/errors.d.ts +35 -0
- package/dist/compat/tls/errors.js +68 -0
- package/dist/compat/tls/helpers.d.ts +9 -0
- package/dist/compat/tls/helpers.js +207 -0
- package/dist/compat/tls/index.d.ts +26 -0
- package/dist/compat/tls/index.js +50 -0
- package/dist/compat/tls/jsstream.d.ts +19 -0
- package/dist/compat/tls/jsstream.js +196 -0
- package/dist/compat/tls/native-session.d.ts +3 -0
- package/dist/compat/tls/native-session.js +187 -0
- package/dist/compat/tls/wrap.d.ts +65 -0
- package/dist/compat/tls/wrap.js +541 -0
- package/dist/compat/tls-wrap/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/tls-wrap/LICENSE-APACHE +177 -0
- package/dist/compat/tls-wrap/index.d.ts +7 -0
- package/dist/compat/tls-wrap/index.js +3 -0
- package/dist/compat/util/index.js +43 -1
- package/dist/compat/util/inspect.js +5 -1
- package/dist/compat/util/types/index.d.ts +3 -0
- package/dist/compat/util/types/index.js +5 -0
- package/dist/compat/zlib/LICENSE-3RD-PARTY.md +11 -0
- package/dist/compat/zlib/LICENSE-APACHE +177 -0
- package/dist/compat/zlib/LICENSE.brotli +19 -0
- package/dist/compat/zlib/LICENSE.emscripten +102 -0
- package/dist/compat/zlib/LICENSE.musl +193 -0
- package/dist/compat/zlib/LICENSE.zlib +22 -0
- package/dist/compat/zlib/LICENSE.zstd +30 -0
- package/dist/compat/zlib/classic-base.cjs +600 -0
- package/dist/compat/zlib/classic-base.d.cts +39 -0
- package/dist/compat/zlib/classic-binding.d.ts +28 -0
- package/dist/compat/zlib/classic-binding.js +105 -0
- package/dist/compat/zlib/classic.d.ts +44 -0
- package/dist/compat/zlib/classic.js +199 -0
- package/dist/compat/zlib/codec-binding.d.ts +33 -0
- package/dist/compat/zlib/codec-binding.js +141 -0
- package/dist/compat/zlib/compression.d.ts +26 -0
- package/dist/compat/zlib/compression.js +170 -0
- package/dist/compat/zlib/constants.d.ts +172 -0
- package/dist/compat/zlib/constants.js +173 -0
- package/dist/compat/zlib/errors.d.ts +21 -0
- package/dist/compat/zlib/errors.js +32 -0
- package/dist/compat/zlib/index.d.ts +544 -0
- package/dist/compat/zlib/index.js +194 -0
- package/dist/compat/zlib/input.d.ts +16 -0
- package/dist/compat/zlib/input.js +132 -0
- package/dist/compat/zlib/native-codecs.d.ts +24 -0
- package/dist/compat/zlib/native-codecs.js +180 -0
- package/dist/compat/zlib/native-zlib.d.ts +5 -0
- package/dist/compat/zlib/native-zlib.js +52 -0
- package/dist/compat/zlib/public-types.d.ts +48 -0
- package/dist/compat/zlib/public-types.js +1 -0
- package/dist/compat/zlib/validators.d.ts +3 -0
- package/dist/compat/zlib/validators.js +18 -0
- package/dist/shared/buffer-source.d.ts +5 -0
- package/dist/shared/buffer-source.js +70 -0
- package/dist/shared/globals/inject.d.ts +2 -1
- package/dist/shared/globals/inject.js +2 -1
- package/dist/shared/globals/platform.d.ts +8 -0
- package/dist/shared/globals/platform.js +1 -0
- package/dist/shared/globals/runtime.d.ts +1 -2
- package/dist/shared/globals/runtime.js +1 -2
- package/dist/shared/globals/web.js +5 -0
- package/dist/shared/request-context.d.ts +2 -0
- package/dist/shared/request-context.js +11 -0
- package/dist/shared/request-scope.d.ts +4 -0
- package/dist/shared/request-scope.js +14 -0
- package/dist/tooling/async.js +36 -14
- package/dist/tooling/shared.d.ts +1 -0
- package/dist/tooling/shared.js +26 -1
- package/dist/tooling/vite.js +8 -3
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkerSockets.java +92 -13
- package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersCapacitorPlugin.java +4 -2
- package/native/ios/NetworkBridge.swift +11 -1
- package/native/ios/SocketBridge.swift +37 -2
- package/native/ios/WorkersCapacitorPlugin.swift +4 -0
- package/package.json +4 -2
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
// Read-only in-memory filesystem for bundled worker assets. Build
|
|
2
|
+
// integrations register file contents at startup; bundled server code such
|
|
3
|
+
// as OpenNext's traced manifests then reads them through the node:fs
|
|
4
|
+
// surface. Mutating calls and real device filesystem access are not
|
|
5
|
+
// provided.
|
|
6
|
+
import { Buffer } from "node:buffer";
|
|
7
|
+
const encoder = new TextEncoder();
|
|
8
|
+
const files = new Map();
|
|
9
|
+
function normalize(path) {
|
|
10
|
+
if (typeof path !== "string")
|
|
11
|
+
throw new TypeError("path must be a string");
|
|
12
|
+
const raw = path.startsWith("file://") ? new URL(path).pathname : path;
|
|
13
|
+
const parts = [];
|
|
14
|
+
for (const segment of raw.split("/")) {
|
|
15
|
+
if (segment === "" || segment === ".")
|
|
16
|
+
continue;
|
|
17
|
+
if (segment === "..")
|
|
18
|
+
parts.pop();
|
|
19
|
+
else
|
|
20
|
+
parts.push(segment);
|
|
21
|
+
}
|
|
22
|
+
return "/" + parts.join("/");
|
|
23
|
+
}
|
|
24
|
+
/** Called by generated bundle code; consumers do not invoke this directly. */
|
|
25
|
+
export function registerVirtualFiles(entries) {
|
|
26
|
+
for (const [path, contents] of Object.entries(entries)) {
|
|
27
|
+
const key = normalize(path);
|
|
28
|
+
files.set(key, typeof contents === "string"
|
|
29
|
+
? encoder.encode(contents)
|
|
30
|
+
: contents instanceof Uint8Array
|
|
31
|
+
? new Uint8Array(contents)
|
|
32
|
+
: Uint8Array.from(atob(contents.base64), (c) => c.charCodeAt(0)));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Test/reset helper. */
|
|
36
|
+
export function clearVirtualFiles() {
|
|
37
|
+
files.clear();
|
|
38
|
+
}
|
|
39
|
+
function fileEntry(path) {
|
|
40
|
+
const direct = files.get(path);
|
|
41
|
+
if (direct !== undefined)
|
|
42
|
+
return direct;
|
|
43
|
+
// Bundled runtimes resolve relative to an empty dirname; treat relative
|
|
44
|
+
// and absolute lookups uniformly, then fall back to a suffix match so a
|
|
45
|
+
// build-absolute path resolves against a registered relative one.
|
|
46
|
+
for (const [key, contents] of files)
|
|
47
|
+
if (key === path || key.endsWith(path) || path.endsWith(key))
|
|
48
|
+
return contents;
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
function dirEntries(path) {
|
|
52
|
+
const prefix = path.endsWith("/") ? path : path + "/";
|
|
53
|
+
const names = new Set();
|
|
54
|
+
for (const key of files.keys()) {
|
|
55
|
+
if (!key.startsWith(prefix))
|
|
56
|
+
continue;
|
|
57
|
+
const rest = key.slice(prefix.length);
|
|
58
|
+
names.add(rest.split("/")[0]);
|
|
59
|
+
}
|
|
60
|
+
return [...names].sort();
|
|
61
|
+
}
|
|
62
|
+
function exists(path) {
|
|
63
|
+
return fileEntry(path) !== undefined || dirEntries(path).length > 0;
|
|
64
|
+
}
|
|
65
|
+
function enoent(syscall, path) {
|
|
66
|
+
const error = new Error(`ENOENT: no such file or directory, ${syscall} '${path}'`);
|
|
67
|
+
error.code = "ENOENT";
|
|
68
|
+
error.errno = -2;
|
|
69
|
+
error.syscall = syscall;
|
|
70
|
+
error.path = path;
|
|
71
|
+
return error;
|
|
72
|
+
}
|
|
73
|
+
export class Stats {
|
|
74
|
+
#size;
|
|
75
|
+
#directory;
|
|
76
|
+
#mtime;
|
|
77
|
+
constructor(size, directory, mtime) {
|
|
78
|
+
this.#size = size;
|
|
79
|
+
this.#directory = directory;
|
|
80
|
+
this.#mtime = mtime;
|
|
81
|
+
}
|
|
82
|
+
isFile() {
|
|
83
|
+
return !this.#directory;
|
|
84
|
+
}
|
|
85
|
+
isDirectory() {
|
|
86
|
+
return this.#directory;
|
|
87
|
+
}
|
|
88
|
+
isSymbolicLink() {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
isBlockDevice() {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
isCharacterDevice() {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
isFIFO() {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
isSocket() {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
get size() {
|
|
104
|
+
return this.#size;
|
|
105
|
+
}
|
|
106
|
+
get mtime() {
|
|
107
|
+
return this.#mtime;
|
|
108
|
+
}
|
|
109
|
+
get mtimeMs() {
|
|
110
|
+
return this.#mtime.getTime();
|
|
111
|
+
}
|
|
112
|
+
get birthtime() {
|
|
113
|
+
return this.#mtime;
|
|
114
|
+
}
|
|
115
|
+
get birthtimeMs() {
|
|
116
|
+
return this.#mtime.getTime();
|
|
117
|
+
}
|
|
118
|
+
get ctime() {
|
|
119
|
+
return this.#mtime;
|
|
120
|
+
}
|
|
121
|
+
get ctimeMs() {
|
|
122
|
+
return this.#mtime.getTime();
|
|
123
|
+
}
|
|
124
|
+
get atime() {
|
|
125
|
+
return this.#mtime;
|
|
126
|
+
}
|
|
127
|
+
get atimeMs() {
|
|
128
|
+
return this.#mtime.getTime();
|
|
129
|
+
}
|
|
130
|
+
get mode() {
|
|
131
|
+
return this.#directory ? 0o40444 : 0o100444;
|
|
132
|
+
}
|
|
133
|
+
get dev() {
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
get ino() {
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
get nlink() {
|
|
140
|
+
return 1;
|
|
141
|
+
}
|
|
142
|
+
get uid() {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
get gid() {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
get rdev() {
|
|
149
|
+
return 0;
|
|
150
|
+
}
|
|
151
|
+
get blksize() {
|
|
152
|
+
return 4096;
|
|
153
|
+
}
|
|
154
|
+
get blocks() {
|
|
155
|
+
return Math.ceil(this.#size / 512);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function statFor(path, syscall) {
|
|
159
|
+
const data = fileEntry(path);
|
|
160
|
+
if (data !== undefined)
|
|
161
|
+
return new Stats(data.length, false, new Date(0));
|
|
162
|
+
if (dirEntries(path).length > 0 || path === "/")
|
|
163
|
+
return new Stats(0, true, new Date(0));
|
|
164
|
+
throw enoent(syscall, path);
|
|
165
|
+
}
|
|
166
|
+
function toPath(input) {
|
|
167
|
+
if (input instanceof URL)
|
|
168
|
+
return normalize(input.href);
|
|
169
|
+
if (Buffer.isBuffer(input))
|
|
170
|
+
return normalize(input.toString());
|
|
171
|
+
if (typeof input !== "string" && !(input instanceof String))
|
|
172
|
+
throw new TypeError("path must be a string or URL");
|
|
173
|
+
return normalize(String(input));
|
|
174
|
+
}
|
|
175
|
+
function decode(data, encoding) {
|
|
176
|
+
if (encoding === "utf8" || encoding === "utf-8" || encoding == null)
|
|
177
|
+
return new TextDecoder().decode(data);
|
|
178
|
+
throw new Error(`Unsupported encoding '${encoding}'`);
|
|
179
|
+
}
|
|
180
|
+
export function readFileSync(path, options) {
|
|
181
|
+
const p = toPath(path);
|
|
182
|
+
const data = fileEntry(p);
|
|
183
|
+
if (data === undefined)
|
|
184
|
+
throw enoent("open", p);
|
|
185
|
+
const encoding = typeof options === "string"
|
|
186
|
+
? options
|
|
187
|
+
: options?.encoding;
|
|
188
|
+
return encoding
|
|
189
|
+
? Buffer.from(data).toString(encoding)
|
|
190
|
+
: Buffer.from(data);
|
|
191
|
+
}
|
|
192
|
+
export function readFile(path, options, callback) {
|
|
193
|
+
const cb = (typeof options === "function" ? options : callback);
|
|
194
|
+
const promise = Promise.resolve().then(() => readFileSync(path, options));
|
|
195
|
+
if (cb)
|
|
196
|
+
promise.then((data) => cb(null, data), (error) => cb(error));
|
|
197
|
+
}
|
|
198
|
+
export function readdirSync(path) {
|
|
199
|
+
const p = toPath(path);
|
|
200
|
+
const entries = dirEntries(p);
|
|
201
|
+
if (entries.length === 0 && fileEntry(p) === undefined && p !== "/")
|
|
202
|
+
throw enoent("scandir", p);
|
|
203
|
+
return entries;
|
|
204
|
+
}
|
|
205
|
+
export function readdir(path, callback) {
|
|
206
|
+
Promise.resolve()
|
|
207
|
+
.then(() => readdirSync(path))
|
|
208
|
+
.then((entries) => callback(null, entries), (error) => callback(error));
|
|
209
|
+
}
|
|
210
|
+
export function existsSync(path) {
|
|
211
|
+
return exists(toPath(path));
|
|
212
|
+
}
|
|
213
|
+
export function statSync(path) {
|
|
214
|
+
return statFor(toPath(path), "stat");
|
|
215
|
+
}
|
|
216
|
+
export function lstatSync(path) {
|
|
217
|
+
return statSync(path);
|
|
218
|
+
}
|
|
219
|
+
export function stat(path, callback) {
|
|
220
|
+
Promise.resolve()
|
|
221
|
+
.then(() => statSync(path))
|
|
222
|
+
.then((stats) => callback(null, stats), (error) => callback(error));
|
|
223
|
+
}
|
|
224
|
+
export function realpathSync(path) {
|
|
225
|
+
const p = toPath(path);
|
|
226
|
+
if (!exists(p))
|
|
227
|
+
throw enoent("realpath", p);
|
|
228
|
+
return p;
|
|
229
|
+
}
|
|
230
|
+
export const promises = {
|
|
231
|
+
readFile: (path, options) => Promise.resolve().then(() => readFileSync(path, options)),
|
|
232
|
+
readdir: (path) => Promise.resolve().then(() => readdirSync(path)),
|
|
233
|
+
stat: (path) => Promise.resolve().then(() => statSync(path)),
|
|
234
|
+
lstat: (path) => Promise.resolve().then(() => lstatSync(path)),
|
|
235
|
+
realpath: (path) => Promise.resolve().then(() => realpathSync(path)),
|
|
236
|
+
access: (path) => Promise.resolve().then(() => {
|
|
237
|
+
if (!exists(toPath(path)))
|
|
238
|
+
throw enoent("access", toPath(path));
|
|
239
|
+
}),
|
|
240
|
+
};
|
|
241
|
+
export const constants = {
|
|
242
|
+
F_OK: 0,
|
|
243
|
+
R_OK: 4,
|
|
244
|
+
W_OK: 2,
|
|
245
|
+
X_OK: 1,
|
|
246
|
+
};
|
|
247
|
+
export default {
|
|
248
|
+
readFileSync,
|
|
249
|
+
readFile,
|
|
250
|
+
readdirSync,
|
|
251
|
+
readdir,
|
|
252
|
+
existsSync,
|
|
253
|
+
statSync,
|
|
254
|
+
lstatSync,
|
|
255
|
+
stat,
|
|
256
|
+
realpathSync,
|
|
257
|
+
promises,
|
|
258
|
+
constants,
|
|
259
|
+
Stats,
|
|
260
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ReadStreamOptions, WriteStreamOptions } from "./streams.js";
|
|
2
|
+
import type { ReadOptions, ReadResult, WriteResult, ReadFileOptions, WriteFileOptions } from "./public-types.js";
|
|
3
|
+
import type { Stats, BigIntStats, ReadStream, WriteStream } from "node:fs";
|
|
4
|
+
import { Buffer } from "node:buffer";
|
|
5
|
+
import { EventEmitter } from "node:events";
|
|
6
|
+
import { asyncDispose } from "../../shared/globals/symbols.js";
|
|
7
|
+
declare const kFileHandle: unique symbol;
|
|
8
|
+
type Scope = <T>(operation: () => T) => T;
|
|
9
|
+
type Backend = {
|
|
10
|
+
fd: number;
|
|
11
|
+
run: Scope;
|
|
12
|
+
api: Record<string, (...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
export declare class FileHandle extends EventEmitter {
|
|
15
|
+
#private;
|
|
16
|
+
[kFileHandle]: boolean;
|
|
17
|
+
constructor(token: symbol, backend: Backend);
|
|
18
|
+
get fd(): number | undefined;
|
|
19
|
+
appendFile(data: string | ArrayBufferView, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
20
|
+
chmod(mode: string | number): Promise<void>;
|
|
21
|
+
chown(uid: number, gid: number): Promise<void>;
|
|
22
|
+
datasync(): Promise<void>;
|
|
23
|
+
sync(): Promise<void>;
|
|
24
|
+
read(options?: ReadOptions<Buffer>): Promise<ReadResult<Buffer>>;
|
|
25
|
+
read<T extends ArrayBufferView>(options: ReadOptions<T> & {
|
|
26
|
+
buffer: T;
|
|
27
|
+
}): Promise<ReadResult<T>>;
|
|
28
|
+
read<T extends ArrayBufferView>(buffer: T, offsetOrOptions?: number | ReadOptions<T>, length?: number, position?: number | bigint | null): Promise<ReadResult<T>>;
|
|
29
|
+
readv<T extends readonly ArrayBufferView[]>(buffers: T, position?: number | bigint | null): Promise<{
|
|
30
|
+
bytesRead: number;
|
|
31
|
+
buffers: T;
|
|
32
|
+
}>;
|
|
33
|
+
readFile(options: BufferEncoding | (ReadFileOptions & {
|
|
34
|
+
encoding: BufferEncoding;
|
|
35
|
+
})): Promise<string>;
|
|
36
|
+
readFile(options?: (ReadFileOptions & {
|
|
37
|
+
encoding?: "buffer" | null;
|
|
38
|
+
}) | "buffer" | null): Promise<Buffer>;
|
|
39
|
+
readFile(options?: ReadFileOptions | BufferEncoding | "buffer" | null): Promise<string | Buffer>;
|
|
40
|
+
readLines(_options?: unknown): never;
|
|
41
|
+
stat(options: {
|
|
42
|
+
bigint: true;
|
|
43
|
+
}): Promise<BigIntStats>;
|
|
44
|
+
stat(options?: {
|
|
45
|
+
bigint?: false;
|
|
46
|
+
}): Promise<Stats>;
|
|
47
|
+
stat(options?: {
|
|
48
|
+
bigint?: boolean;
|
|
49
|
+
}): Promise<Stats | BigIntStats>;
|
|
50
|
+
truncate(length?: number): Promise<void>;
|
|
51
|
+
utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
52
|
+
write<T extends ArrayBufferView>(buffer: T, offsetPositionOrOptions?: number | {
|
|
53
|
+
offset?: number;
|
|
54
|
+
length?: number;
|
|
55
|
+
position?: number | bigint | null;
|
|
56
|
+
} | null, length?: number, position?: number | bigint | null): Promise<WriteResult<T>>;
|
|
57
|
+
write(buffer: string, position?: number | bigint | null, encoding?: BufferEncoding): Promise<WriteResult<Buffer>>;
|
|
58
|
+
write<T extends string | ArrayBufferView>(buffer: T, position?: number | null): Promise<WriteResult<T extends string ? Buffer : T>>;
|
|
59
|
+
writev<T extends readonly ArrayBufferView[]>(buffers: T, position?: number | bigint | null): Promise<{
|
|
60
|
+
bytesWritten: number;
|
|
61
|
+
buffers: T;
|
|
62
|
+
}>;
|
|
63
|
+
writeFile<T extends ArrayBufferView>(data: T, options?: WriteFileOptions | BufferEncoding): Promise<WriteResult<T>>;
|
|
64
|
+
writeFile(data: string, options?: WriteFileOptions | BufferEncoding): Promise<WriteResult<Buffer>>;
|
|
65
|
+
writeFile<T extends string | ArrayBufferView>(data: T, options?: WriteFileOptions | BufferEncoding): Promise<WriteResult<T extends string ? Buffer : T>>;
|
|
66
|
+
close(): Promise<void>;
|
|
67
|
+
[asyncDispose](): Promise<void>;
|
|
68
|
+
readableWebStream(options?: {
|
|
69
|
+
autoClose?: boolean;
|
|
70
|
+
}): ReadableStream<Uint8Array>;
|
|
71
|
+
createReadStream(options?: Omit<ReadStreamOptions, "fd">): ReadStream;
|
|
72
|
+
createWriteStream(options?: Omit<WriteStreamOptions, "fd">): WriteStream;
|
|
73
|
+
}
|
|
74
|
+
export declare function createFileHandle(backend: Backend): FileHandle;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// FileHandle's public contract follows workerd 5358e3d337336eaf696a48bc1563d808b10feba5.
|
|
2
|
+
// The filesystem backend and its request scope remain private.
|
|
3
|
+
import { Buffer } from "node:buffer";
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import { ReadableStream } from "../stream-web/runtime.js";
|
|
6
|
+
import { asyncDispose, installResourceSymbols, } from "../../shared/globals/symbols.js";
|
|
7
|
+
import { validateObject, validateBoolean, validateUint32, } from "../net/validators.js";
|
|
8
|
+
import { validatePosition } from "./io-validation.js";
|
|
9
|
+
import { createReadStream, createWriteStream } from "./streams.js";
|
|
10
|
+
import { registerFileHandle } from "./stream-utils.js";
|
|
11
|
+
installResourceSymbols(globalThis.Symbol);
|
|
12
|
+
const badge = Symbol("FileHandle constructor");
|
|
13
|
+
const kFileHandle = Symbol("kFileHandle");
|
|
14
|
+
const handleScopes = new WeakMap();
|
|
15
|
+
const released = new FinalizationRegistry((close) => close());
|
|
16
|
+
function badDescriptor() {
|
|
17
|
+
return Object.assign(new Error("Bad file descriptor"), {
|
|
18
|
+
code: "EBADF",
|
|
19
|
+
syscall: "stat",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export class FileHandle extends EventEmitter {
|
|
23
|
+
#fd;
|
|
24
|
+
#backend;
|
|
25
|
+
[kFileHandle] = true;
|
|
26
|
+
constructor(token, backend) {
|
|
27
|
+
if (token !== badge)
|
|
28
|
+
throw new TypeError("Illegal constructor");
|
|
29
|
+
super();
|
|
30
|
+
this.#fd = backend.fd;
|
|
31
|
+
this.#backend = backend;
|
|
32
|
+
released.register(this, () => backend.run(() => backend.api.closeSync(backend.fd)), this);
|
|
33
|
+
registerFileHandle(this);
|
|
34
|
+
handleScopes.set(this, backend.run);
|
|
35
|
+
}
|
|
36
|
+
get fd() {
|
|
37
|
+
return this.#fd;
|
|
38
|
+
}
|
|
39
|
+
#invoke(name, ...args) {
|
|
40
|
+
if (this.#fd === undefined)
|
|
41
|
+
throw badDescriptor();
|
|
42
|
+
const fd = this.#fd;
|
|
43
|
+
const backend = this.#backend;
|
|
44
|
+
return backend.run(() => backend.api[name](fd, ...args));
|
|
45
|
+
}
|
|
46
|
+
async appendFile(data, options = {}) {
|
|
47
|
+
await this.#invoke("appendFileSync", data, options);
|
|
48
|
+
}
|
|
49
|
+
async chmod(mode) {
|
|
50
|
+
await this.#invoke("fchmodSync", mode);
|
|
51
|
+
}
|
|
52
|
+
async chown(uid, gid) {
|
|
53
|
+
await this.#invoke("fchownSync", uid, gid);
|
|
54
|
+
}
|
|
55
|
+
async datasync() {
|
|
56
|
+
await this.#invoke("fdatasyncSync");
|
|
57
|
+
}
|
|
58
|
+
async sync() {
|
|
59
|
+
await this.#invoke("fsyncSync");
|
|
60
|
+
}
|
|
61
|
+
read(bufferOrOptions = {}, offsetOrOptions = {}, length, position = null) {
|
|
62
|
+
try {
|
|
63
|
+
if (this.#fd === undefined)
|
|
64
|
+
throw badDescriptor();
|
|
65
|
+
let options;
|
|
66
|
+
if (ArrayBuffer.isView(bufferOrOptions))
|
|
67
|
+
options =
|
|
68
|
+
typeof offsetOrOptions === "number"
|
|
69
|
+
? {
|
|
70
|
+
buffer: bufferOrOptions,
|
|
71
|
+
offset: offsetOrOptions,
|
|
72
|
+
length: length ?? bufferOrOptions.byteLength - offsetOrOptions,
|
|
73
|
+
position: position ?? null,
|
|
74
|
+
}
|
|
75
|
+
: { buffer: bufferOrOptions, ...offsetOrOptions };
|
|
76
|
+
else
|
|
77
|
+
options = bufferOrOptions;
|
|
78
|
+
const { buffer = Buffer.alloc(16384), offset = 0, length: count = buffer.byteLength - offset, position: at = null, } = options;
|
|
79
|
+
validateUint32(offset, "offset");
|
|
80
|
+
validateUint32(count, "length");
|
|
81
|
+
validatePosition(at, "position");
|
|
82
|
+
const bytesRead = this.#invoke("readSync", buffer, offset, count, at);
|
|
83
|
+
return Promise.resolve({ bytesRead, buffer });
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
return Promise.reject(error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
readv(buffers, position = null) {
|
|
90
|
+
try {
|
|
91
|
+
return Promise.resolve({
|
|
92
|
+
bytesRead: this.#invoke("readvSync", buffers, position),
|
|
93
|
+
buffers,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
return Promise.reject(error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async readFile(options = {}) {
|
|
101
|
+
return await this.#invoke("readFileSync", options);
|
|
102
|
+
}
|
|
103
|
+
readLines(_options = {}) {
|
|
104
|
+
if (this.#fd === undefined)
|
|
105
|
+
throw badDescriptor();
|
|
106
|
+
throw new Error("not implemented");
|
|
107
|
+
}
|
|
108
|
+
async stat(options = {}) {
|
|
109
|
+
return await this.#invoke("fstatSync", options);
|
|
110
|
+
}
|
|
111
|
+
async truncate(length = 0) {
|
|
112
|
+
await this.#invoke("ftruncateSync", length);
|
|
113
|
+
}
|
|
114
|
+
async utimes(atime, mtime) {
|
|
115
|
+
await this.#invoke("futimesSync", atime, mtime);
|
|
116
|
+
}
|
|
117
|
+
write(buffer, offsetPositionOrOptions = null, lengthOrEncoding, position = null) {
|
|
118
|
+
try {
|
|
119
|
+
if (this.#fd === undefined)
|
|
120
|
+
throw badDescriptor();
|
|
121
|
+
if (typeof buffer === "string")
|
|
122
|
+
buffer = Buffer.from(buffer, lengthOrEncoding);
|
|
123
|
+
const bytesWritten = this.#invoke("writeSync", buffer, offsetPositionOrOptions, lengthOrEncoding, position);
|
|
124
|
+
return Promise.resolve({ bytesWritten, buffer });
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
return Promise.reject(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
writev(buffers, position = null) {
|
|
131
|
+
try {
|
|
132
|
+
return Promise.resolve({
|
|
133
|
+
bytesWritten: this.#invoke("writevSync", buffers, position),
|
|
134
|
+
buffers,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
return Promise.reject(error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
writeFile(data, options = {}) {
|
|
142
|
+
try {
|
|
143
|
+
const bytesWritten = this.#invoke("writeFileSync", data, options);
|
|
144
|
+
return Promise.resolve({
|
|
145
|
+
bytesWritten,
|
|
146
|
+
buffer: ArrayBuffer.isView(data) ? data : Buffer.from(data, options),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
return Promise.reject(error);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
close() {
|
|
154
|
+
try {
|
|
155
|
+
if (this.#fd !== undefined)
|
|
156
|
+
this.#invoke("closeSync");
|
|
157
|
+
this.#fd = undefined;
|
|
158
|
+
this.#backend = undefined;
|
|
159
|
+
handleScopes.delete(this);
|
|
160
|
+
released.unregister(this);
|
|
161
|
+
this.emit("close");
|
|
162
|
+
return Promise.resolve();
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
return Promise.reject(error);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async [asyncDispose]() {
|
|
169
|
+
await this.close();
|
|
170
|
+
}
|
|
171
|
+
readableWebStream(options = {}) {
|
|
172
|
+
if (this.#fd === undefined)
|
|
173
|
+
throw badDescriptor();
|
|
174
|
+
validateObject(options, "options");
|
|
175
|
+
const { autoClose = true } = options;
|
|
176
|
+
validateBoolean(autoClose, "options.autoClose");
|
|
177
|
+
const handle = this;
|
|
178
|
+
const read = this.read.bind(this);
|
|
179
|
+
let controller, ended = false;
|
|
180
|
+
const finish = () => {
|
|
181
|
+
if (!ended) {
|
|
182
|
+
ended = true;
|
|
183
|
+
controller.close();
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const stream = new ReadableStream({
|
|
187
|
+
type: "bytes",
|
|
188
|
+
autoAllocateChunkSize: 16384,
|
|
189
|
+
start(c) {
|
|
190
|
+
controller = c;
|
|
191
|
+
},
|
|
192
|
+
async pull(c) {
|
|
193
|
+
const request = c.byobRequest, view = request.view;
|
|
194
|
+
const { bytesRead } = await read(view, view.byteOffset, view.byteLength);
|
|
195
|
+
if (bytesRead === 0) {
|
|
196
|
+
finish();
|
|
197
|
+
if (autoClose)
|
|
198
|
+
await handle.close();
|
|
199
|
+
}
|
|
200
|
+
request.respond(bytesRead);
|
|
201
|
+
},
|
|
202
|
+
async cancel() {
|
|
203
|
+
ended = true;
|
|
204
|
+
if (autoClose)
|
|
205
|
+
await handle.close();
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
this.once("close", finish);
|
|
209
|
+
return stream;
|
|
210
|
+
}
|
|
211
|
+
createReadStream(options = {}) {
|
|
212
|
+
const run = handleScopes.get(this) ?? ((fn) => fn());
|
|
213
|
+
return run(() => createReadStream("", { ...options, fd: this }));
|
|
214
|
+
}
|
|
215
|
+
createWriteStream(options = {}) {
|
|
216
|
+
const run = handleScopes.get(this) ?? ((fn) => fn());
|
|
217
|
+
return run(() => createWriteStream("", { ...options, fd: this }));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
Object.defineProperty(FileHandle, "name", {
|
|
221
|
+
value: "FileHandle",
|
|
222
|
+
configurable: true,
|
|
223
|
+
});
|
|
224
|
+
export function createFileHandle(backend) {
|
|
225
|
+
return new FileHandle(badge, backend);
|
|
226
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DirEntryHandle } from "./directory-backend.js";
|
|
2
|
+
export declare function expandBraces(pattern: string): string[];
|
|
3
|
+
export declare function normalizePattern(pattern: string): string;
|
|
4
|
+
export declare function segmentToRegex(segment: string): RegExp;
|
|
5
|
+
export declare function globToRegex(pattern: string): RegExp;
|
|
6
|
+
export declare function compileExcludePatterns(exclude: readonly string[]): (path: string) => boolean;
|
|
7
|
+
type EntryCache = Map<string, DirEntryHandle[]>;
|
|
8
|
+
export interface GlobResult {
|
|
9
|
+
relativePath: string;
|
|
10
|
+
handle: DirEntryHandle | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function collapseGlobstars(segments: string[]): string[];
|
|
13
|
+
export declare function precompileSegmentRegexes(segments: string[]): (RegExp | null)[];
|
|
14
|
+
export declare function walkGlob(cwd: string, segments: string[], segIdx: number, currentAbsPath: string, relativePath: string, results: Map<string, GlobResult>, cache: EntryCache, segmentRegexes: (RegExp | null)[], visitedGlobstar?: Set<string>, depth?: number): void;
|
|
15
|
+
export {};
|