@deepseek-ai/dsh-experimental-webworker-runtime 0.1.6-alpha.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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +75 -0
- package/README.zh.md +75 -0
- package/lib/client.js +854 -0
- package/lib/index.js +3506 -0
- package/lib/types/client/apply-injections.d.ts +15 -0
- package/lib/types/client/client.d.ts +102 -0
- package/lib/types/client/index.d.ts +66 -0
- package/lib/types/client/source-chooser.d.ts +8 -0
- package/lib/types/compile/transform.d.ts +39 -0
- package/lib/types/fixture-manifest.d.ts +26 -0
- package/lib/types/image-layout.d.ts +43 -0
- package/lib/types/index.d.ts +23 -0
- package/lib/types/module-proxies.d.ts +25 -0
- package/lib/types/module-system/module-loader.d.ts +177 -0
- package/lib/types/module-system/posix-path.d.ts +98 -0
- package/lib/types/node/builtin_modules/implemented/abort-error.d.ts +11 -0
- package/lib/types/node/builtin_modules/implemented/async_hooks.d.ts +174 -0
- package/lib/types/node/builtin_modules/implemented/buffer.d.ts +28 -0
- package/lib/types/node/builtin_modules/implemented/child_process.d.ts +178 -0
- package/lib/types/node/builtin_modules/implemented/crypto.d.ts +53 -0
- package/lib/types/node/builtin_modules/implemented/events.d.ts +84 -0
- package/lib/types/node/builtin_modules/implemented/fs/promises.d.ts +39 -0
- package/lib/types/node/builtin_modules/implemented/fs-watch.d.ts +119 -0
- package/lib/types/node/builtin_modules/implemented/fs.d.ts +502 -0
- package/lib/types/node/builtin_modules/implemented/http.d.ts +113 -0
- package/lib/types/node/builtin_modules/implemented/module.d.ts +50 -0
- package/lib/types/node/builtin_modules/implemented/os.d.ts +115 -0
- package/lib/types/node/builtin_modules/implemented/path.d.ts +138 -0
- package/lib/types/node/builtin_modules/implemented/perf_hooks.d.ts +13 -0
- package/lib/types/node/builtin_modules/implemented/stream.d.ts +22 -0
- package/lib/types/node/builtin_modules/implemented/timers/promises.d.ts +36 -0
- package/lib/types/node/builtin_modules/implemented/tty.d.ts +18 -0
- package/lib/types/node/builtin_modules/implemented/url.d.ts +61 -0
- package/lib/types/node/builtin_modules/implemented/util/types.d.ts +12 -0
- package/lib/types/node/builtin_modules/implemented/util.d.ts +95 -0
- package/lib/types/node/builtin_modules/implemented/zlib.d.ts +65 -0
- package/lib/types/node/builtin_modules/mock/dns/promises.d.ts +10 -0
- package/lib/types/node/builtin_modules/mock/net.d.ts +61 -0
- package/lib/types/node/builtin_modules/mock/sqlite.d.ts +19 -0
- package/lib/types/node/builtin_modules/mock/vm.d.ts +25 -0
- package/lib/types/node/builtin_modules/mock/worker_threads.d.ts +34 -0
- package/lib/types/node/builtins.d.ts +13 -0
- package/lib/types/node/external_packages/koffi.d.ts +63 -0
- package/lib/types/node/external_packages/node-addon-system-flock.d.ts +19 -0
- package/lib/types/node/external_packages/node-pty.d.ts +13 -0
- package/lib/types/node/external_packages/pi-ai.d.ts +51 -0
- package/lib/types/node/external_packages/replaced-externals.d.ts +9 -0
- package/lib/types/node/external_packages/ripgrep.d.ts +16 -0
- package/lib/types/node/external_packages/sharp.d.ts +6 -0
- package/lib/types/node/external_packages/ws.d.ts +38 -0
- package/lib/types/node/globals/crypto.d.ts +3 -0
- package/lib/types/node/globals/process.d.ts +78 -0
- package/lib/types/node/globals/timers.d.ts +10 -0
- package/lib/types/node/notImplementedFail.d.ts +34 -0
- package/lib/types/node/process-table.d.ts +50 -0
- package/lib/types/polyfill/async-context/als-runtime.d.ts +45 -0
- package/lib/types/polyfill/async-context/async-context-hooks.d.ts +6 -0
- package/lib/types/shell/ast.d.ts +23 -0
- package/lib/types/shell/expand.d.ts +65 -0
- package/lib/types/shell/fs-access.d.ts +43 -0
- package/lib/types/shell/interpret.d.ts +54 -0
- package/lib/types/shell/process/child.d.ts +26 -0
- package/lib/types/shell/process/host.d.ts +58 -0
- package/lib/types/shell/process/landlock.d.ts +33 -0
- package/lib/types/shell/process/protocol.d.ts +74 -0
- package/lib/types/shell/process/virtual-executables.d.ts +49 -0
- package/lib/types/shell/programs/builtins.d.ts +9 -0
- package/lib/types/shell/programs/files.d.ts +11 -0
- package/lib/types/shell/programs/index.d.ts +14 -0
- package/lib/types/shell/programs/options.d.ts +40 -0
- package/lib/types/shell/programs/text.d.ts +9 -0
- package/lib/types/shell/types.d.ts +138 -0
- package/lib/types/storage/active.d.ts +18 -0
- package/lib/types/storage/image-gzip.d.ts +39 -0
- package/lib/types/storage/memory.d.ts +308 -0
- package/lib/types/storage/paths.d.ts +18 -0
- package/lib/types/storage/tar.d.ts +41 -0
- package/lib/types/storage/types.d.ts +279 -0
- package/lib/types/transport/frames.d.ts +108 -0
- package/lib/types/transport/synthetic-http.d.ts +50 -0
- package/lib/types/transport/tunnel.d.ts +132 -0
- package/lib/types/worker-host.d.ts +165 -0
- package/lib/types/worker.d.ts +2 -0
- package/lib/worker.js +21879 -0
- package/package.json +73 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { CpuInfo, NetworkInterfaceInfo } from 'node:os';
|
|
2
|
+
/** Line ending of the virtual platform. */
|
|
3
|
+
export declare const EOL = "\n";
|
|
4
|
+
/**
|
|
5
|
+
* Temporary directory.
|
|
6
|
+
* @returns the VFS temp path.
|
|
7
|
+
*/
|
|
8
|
+
export declare function tmpdir(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Home directory.
|
|
11
|
+
* @returns `$DSH_HOME` inside the VFS.
|
|
12
|
+
*/
|
|
13
|
+
export declare function homedir(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Platform identity.
|
|
16
|
+
* @returns always 'linux'.
|
|
17
|
+
*/
|
|
18
|
+
export declare function platform(): NodeJS.Platform;
|
|
19
|
+
/**
|
|
20
|
+
* Operating-system type.
|
|
21
|
+
* @returns always 'Linux'.
|
|
22
|
+
*/
|
|
23
|
+
export declare function type(): string;
|
|
24
|
+
/**
|
|
25
|
+
* CPU architecture.
|
|
26
|
+
* @returns always 'x64'.
|
|
27
|
+
*/
|
|
28
|
+
export declare function arch(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Kernel release.
|
|
31
|
+
* @returns a synthetic release string.
|
|
32
|
+
*/
|
|
33
|
+
export declare function release(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Host name.
|
|
36
|
+
* @returns a synthetic name.
|
|
37
|
+
*/
|
|
38
|
+
export declare function hostname(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Usable parallelism.
|
|
41
|
+
* @returns the browser's hardware concurrency, at least 1.
|
|
42
|
+
*/
|
|
43
|
+
export declare function availableParallelism(): number;
|
|
44
|
+
/**
|
|
45
|
+
* CPU inventory.
|
|
46
|
+
* @returns an empty list (no per-core facts inside a worker).
|
|
47
|
+
*/
|
|
48
|
+
export declare function cpus(): CpuInfo[];
|
|
49
|
+
/**
|
|
50
|
+
* Network interfaces.
|
|
51
|
+
* @returns an empty record — the worker webserver binds the loopback literal, so
|
|
52
|
+
* no LAN address is ever derived.
|
|
53
|
+
*/
|
|
54
|
+
export declare function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
|
|
55
|
+
/** OS constants: only the signal table is read (terminal signal name mapping). */
|
|
56
|
+
export declare const constants: {
|
|
57
|
+
signals: {
|
|
58
|
+
SIGHUP: number;
|
|
59
|
+
SIGINT: number;
|
|
60
|
+
SIGQUIT: number;
|
|
61
|
+
SIGILL: number;
|
|
62
|
+
SIGTRAP: number;
|
|
63
|
+
SIGABRT: number;
|
|
64
|
+
SIGBUS: number;
|
|
65
|
+
SIGFPE: number;
|
|
66
|
+
SIGKILL: number;
|
|
67
|
+
SIGUSR1: number;
|
|
68
|
+
SIGSEGV: number;
|
|
69
|
+
SIGUSR2: number;
|
|
70
|
+
SIGPIPE: number;
|
|
71
|
+
SIGALRM: number;
|
|
72
|
+
SIGTERM: number;
|
|
73
|
+
};
|
|
74
|
+
errno: {};
|
|
75
|
+
priority: {};
|
|
76
|
+
};
|
|
77
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
78
|
+
export declare const __esModule = true;
|
|
79
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
80
|
+
declare const _default: {
|
|
81
|
+
EOL: string;
|
|
82
|
+
tmpdir: typeof tmpdir;
|
|
83
|
+
homedir: typeof homedir;
|
|
84
|
+
platform: typeof platform;
|
|
85
|
+
type: typeof type;
|
|
86
|
+
arch: typeof arch;
|
|
87
|
+
release: typeof release;
|
|
88
|
+
hostname: typeof hostname;
|
|
89
|
+
availableParallelism: typeof availableParallelism;
|
|
90
|
+
cpus: typeof cpus;
|
|
91
|
+
networkInterfaces: typeof networkInterfaces;
|
|
92
|
+
constants: {
|
|
93
|
+
signals: {
|
|
94
|
+
SIGHUP: number;
|
|
95
|
+
SIGINT: number;
|
|
96
|
+
SIGQUIT: number;
|
|
97
|
+
SIGILL: number;
|
|
98
|
+
SIGTRAP: number;
|
|
99
|
+
SIGABRT: number;
|
|
100
|
+
SIGBUS: number;
|
|
101
|
+
SIGFPE: number;
|
|
102
|
+
SIGKILL: number;
|
|
103
|
+
SIGUSR1: number;
|
|
104
|
+
SIGSEGV: number;
|
|
105
|
+
SIGUSR2: number;
|
|
106
|
+
SIGPIPE: number;
|
|
107
|
+
SIGALRM: number;
|
|
108
|
+
SIGTERM: number;
|
|
109
|
+
};
|
|
110
|
+
errno: {};
|
|
111
|
+
priority: {};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export default _default;
|
|
115
|
+
//# sourceMappingURL=os.d.ts.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/** Parsed path object returned by {@link parse}. */
|
|
2
|
+
export interface ParsedPath {
|
|
3
|
+
root: string;
|
|
4
|
+
dir: string;
|
|
5
|
+
base: string;
|
|
6
|
+
ext: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a sequence of paths into an absolute path.
|
|
11
|
+
* @param paths - path segments, right to left until an absolute one is found.
|
|
12
|
+
* @returns the absolute, normalized path.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolve(...paths: string[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Normalize a path, resolving `.`, `..`, and duplicate separators.
|
|
17
|
+
* @param path - the path.
|
|
18
|
+
* @returns the normalized path.
|
|
19
|
+
*/
|
|
20
|
+
export declare function normalize(path: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the path is absolute.
|
|
23
|
+
* @param path - the path.
|
|
24
|
+
* @returns true when it starts at the root.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isAbsolute(path: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Join path segments with the separator, then normalize.
|
|
29
|
+
* @param paths - the segments.
|
|
30
|
+
* @returns the joined path.
|
|
31
|
+
*/
|
|
32
|
+
export declare function join(...paths: string[]): string;
|
|
33
|
+
/**
|
|
34
|
+
* Relative path from one location to another.
|
|
35
|
+
* @param from - source path.
|
|
36
|
+
* @param to - target path.
|
|
37
|
+
* @returns the relative path, or '' when both resolve identically.
|
|
38
|
+
*/
|
|
39
|
+
export declare function relative(from: string, to: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Directory portion of a path (lexical, as Node defines it: no normalization).
|
|
42
|
+
* @param path - the path.
|
|
43
|
+
* @returns the parent directory.
|
|
44
|
+
*/
|
|
45
|
+
export declare function dirname(path: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Last portion of a path, optionally without a suffix (lexical, as in Node).
|
|
48
|
+
* @param path - the path.
|
|
49
|
+
* @param suffix - extension to strip when the base ends with it.
|
|
50
|
+
* @returns the base name.
|
|
51
|
+
*/
|
|
52
|
+
export declare function basename(path: string, suffix?: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Extension of the last path segment, including the leading dot.
|
|
55
|
+
* @param path - the path.
|
|
56
|
+
* @returns the extension, or '' when there is none.
|
|
57
|
+
*/
|
|
58
|
+
export declare function extname(path: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Build a path from its parsed parts.
|
|
61
|
+
* @param pathObject - dir/root/base/name/ext parts.
|
|
62
|
+
* @returns the assembled path.
|
|
63
|
+
*/
|
|
64
|
+
export declare function format(pathObject: Partial<ParsedPath>): string;
|
|
65
|
+
/**
|
|
66
|
+
* Split a path into root/dir/base/ext/name (lexical, as in Node).
|
|
67
|
+
* @param path - the path.
|
|
68
|
+
* @returns the parsed parts.
|
|
69
|
+
*/
|
|
70
|
+
export declare function parse(path: string): ParsedPath;
|
|
71
|
+
/** POSIX path separator. */
|
|
72
|
+
export declare const sep: "/";
|
|
73
|
+
/** POSIX path-list delimiter. */
|
|
74
|
+
export declare const delimiter: ":";
|
|
75
|
+
/**
|
|
76
|
+
* Windows namespace prefixes do not exist here.
|
|
77
|
+
* @param path - the path.
|
|
78
|
+
* @returns the path unchanged.
|
|
79
|
+
*/
|
|
80
|
+
export declare function toNamespacedPath(path: string): string;
|
|
81
|
+
declare const posixFace: {
|
|
82
|
+
resolve: typeof resolve;
|
|
83
|
+
normalize: typeof normalize;
|
|
84
|
+
isAbsolute: typeof isAbsolute;
|
|
85
|
+
join: typeof join;
|
|
86
|
+
relative: typeof relative;
|
|
87
|
+
dirname: typeof dirname;
|
|
88
|
+
basename: typeof basename;
|
|
89
|
+
extname: typeof extname;
|
|
90
|
+
format: typeof format;
|
|
91
|
+
parse: typeof parse;
|
|
92
|
+
sep: "/";
|
|
93
|
+
delimiter: ":";
|
|
94
|
+
toNamespacedPath: typeof toNamespacedPath;
|
|
95
|
+
};
|
|
96
|
+
/** POSIX member set: the module face, plus Node's self-referential namespaces. */
|
|
97
|
+
export declare const posix: typeof posixFace & {
|
|
98
|
+
readonly posix: unknown;
|
|
99
|
+
readonly win32: unknown;
|
|
100
|
+
};
|
|
101
|
+
/** Windows member set: reaching it means a platform branch went the wrong way. */
|
|
102
|
+
export declare const win32: {
|
|
103
|
+
resolve: () => never;
|
|
104
|
+
normalize: () => never;
|
|
105
|
+
isAbsolute: () => never;
|
|
106
|
+
join: () => never;
|
|
107
|
+
relative: () => never;
|
|
108
|
+
dirname: () => never;
|
|
109
|
+
basename: () => never;
|
|
110
|
+
extname: () => never;
|
|
111
|
+
format: () => never;
|
|
112
|
+
parse: () => never;
|
|
113
|
+
toNamespacedPath: () => never;
|
|
114
|
+
sep: string;
|
|
115
|
+
delimiter: string;
|
|
116
|
+
};
|
|
117
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
118
|
+
export declare const __esModule = true;
|
|
119
|
+
declare const _default: {
|
|
120
|
+
resolve: typeof resolve;
|
|
121
|
+
normalize: typeof normalize;
|
|
122
|
+
isAbsolute: typeof isAbsolute;
|
|
123
|
+
join: typeof join;
|
|
124
|
+
relative: typeof relative;
|
|
125
|
+
dirname: typeof dirname;
|
|
126
|
+
basename: typeof basename;
|
|
127
|
+
extname: typeof extname;
|
|
128
|
+
format: typeof format;
|
|
129
|
+
parse: typeof parse;
|
|
130
|
+
sep: "/";
|
|
131
|
+
delimiter: ":";
|
|
132
|
+
toNamespacedPath: typeof toNamespacedPath;
|
|
133
|
+
} & {
|
|
134
|
+
readonly posix: unknown;
|
|
135
|
+
readonly win32: unknown;
|
|
136
|
+
};
|
|
137
|
+
export default _default;
|
|
138
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Same clock object the worker global exposes. */
|
|
2
|
+
export declare const performance: Performance;
|
|
3
|
+
/** Observation of performance entries has no consumer here. */
|
|
4
|
+
export declare const PerformanceObserver: typeof import('node:perf_hooks').PerformanceObserver;
|
|
5
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
6
|
+
export declare const __esModule = true;
|
|
7
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
8
|
+
declare const _default: {
|
|
9
|
+
performance: Performance;
|
|
10
|
+
PerformanceObserver: typeof import("perf_hooks").PerformanceObserver;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=perf_hooks.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const Duplex: typeof import("stream").Duplex, PassThrough: typeof import("stream").PassThrough, Readable: typeof import("stream").Readable, StreamBase: typeof import("stream"), Transform: typeof import("stream").Transform, Writable: typeof import("stream").Writable, addAbortSignal: typeof import("stream").addAbortSignal, compose: (...streams: unknown[]) => unknown, destroy: (stream: unknown, error?: Error) => void, finished: typeof import("stream").finished, isDisturbed: (stream: unknown) => boolean, isErrored: typeof import("stream").isErrored, isReadable: typeof import("stream").isReadable, pipeline: typeof import("stream").pipeline, promises: typeof import("node:stream/promises");
|
|
2
|
+
declare const getDefaultHighWaterMark: typeof import("stream").getDefaultHighWaterMark & ((objectMode: boolean) => number), isDestroyed: (stream: unknown) => boolean | null, isWritable: typeof import("stream").isWritable & ((stream: unknown) => boolean | null), setDefaultHighWaterMark: typeof import("stream").setDefaultHighWaterMark & ((objectMode: boolean, value: number) => void);
|
|
3
|
+
/**
|
|
4
|
+
* Test whether a value is an ArrayBuffer view.
|
|
5
|
+
* @param value - Candidate value.
|
|
6
|
+
* @returns Whether the value is a typed-array or DataView instance.
|
|
7
|
+
*/
|
|
8
|
+
declare const _isArrayBufferView: (value: unknown) => value is ArrayBufferView;
|
|
9
|
+
/** Default-import namespace carrying Node's stream class and static helpers. */
|
|
10
|
+
declare const streamDefault: typeof import("stream") & {
|
|
11
|
+
_isArrayBufferView: (value: unknown) => value is ArrayBufferView;
|
|
12
|
+
getDefaultHighWaterMark: typeof import("stream").getDefaultHighWaterMark & ((objectMode: boolean) => number);
|
|
13
|
+
isDestroyed: (stream: unknown) => boolean | null;
|
|
14
|
+
isWritable: typeof import("stream").isWritable & ((stream: unknown) => boolean | null);
|
|
15
|
+
setDefaultHighWaterMark: typeof import("stream").setDefaultHighWaterMark & ((objectMode: boolean, value: number) => void);
|
|
16
|
+
};
|
|
17
|
+
export { Duplex, PassThrough, Readable, StreamBase as Stream, Transform, Writable, addAbortSignal, compose, destroy, finished, getDefaultHighWaterMark, _isArrayBufferView, isDestroyed, isDisturbed, isErrored, isReadable, isWritable, pipeline, promises, setDefaultHighWaterMark, };
|
|
18
|
+
/** CommonJS interop marker consumed by the worker module loader. */
|
|
19
|
+
export declare const __esModule = true;
|
|
20
|
+
/** CommonJS-compatible namespace for default imports. */
|
|
21
|
+
export default streamDefault;
|
|
22
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:timers/promises`: real implementations over the worker's timer globals.
|
|
3
|
+
*/
|
|
4
|
+
import type { TimerOptions } from 'node:timers';
|
|
5
|
+
/**
|
|
6
|
+
* Resolve after a delay.
|
|
7
|
+
* @param delayMs - milliseconds to wait.
|
|
8
|
+
* @param value - value to resolve with; Node resolves undefined when none is handed in.
|
|
9
|
+
* @param options - abort support, as Node provides.
|
|
10
|
+
* @returns the value after the delay, or a rejection when the signal aborts.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setTimeout<T = void>(delayMs?: number, value?: T, options?: TimerOptions): Promise<T>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve on the next macrotask.
|
|
15
|
+
* @param value - resolution value handed back after the timer.
|
|
16
|
+
* @returns a promise resolved after a zero-delay timer.
|
|
17
|
+
*/
|
|
18
|
+
export declare function setImmediate<T = void>(value?: T): Promise<T>;
|
|
19
|
+
/** Cooperative scheduling helpers Node exposes on this module. */
|
|
20
|
+
export declare const scheduler: {
|
|
21
|
+
wait: (delayMs?: number, options?: TimerOptions) => Promise<void>;
|
|
22
|
+
yield: () => Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
25
|
+
export declare const __esModule = true;
|
|
26
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
27
|
+
declare const _default: {
|
|
28
|
+
setTimeout: typeof setTimeout;
|
|
29
|
+
setImmediate: typeof setImmediate;
|
|
30
|
+
scheduler: {
|
|
31
|
+
wait: (delayMs?: number, options?: TimerOptions) => Promise<void>;
|
|
32
|
+
yield: () => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=promises.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:tty` for the browser worker. The host has no terminal-backed file
|
|
3
|
+
* descriptors, so terminal detection is always false.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Test whether a numeric file descriptor refers to a terminal.
|
|
7
|
+
* @param _fd - File descriptor to inspect.
|
|
8
|
+
* @returns Always false in the browser worker.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isatty(_fd: number): boolean;
|
|
11
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ../../builtins.ts). */
|
|
12
|
+
export declare const __esModule = true;
|
|
13
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
14
|
+
declare const _default: {
|
|
15
|
+
isatty: typeof isatty;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=tty.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:url` for the worker: the two conversions the host tree uses, plus the
|
|
3
|
+
* WHATWG classes the browser already provides. VFS paths are POSIX, so the
|
|
4
|
+
* file-URL mapping is the simple percent-encoding pair.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Filesystem path of a `file:` URL.
|
|
8
|
+
* @param url - file URL or its string form.
|
|
9
|
+
* @returns the decoded POSIX path.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fileURLToPath(url: string | URL): string;
|
|
12
|
+
/**
|
|
13
|
+
* `file:` URL of a filesystem path.
|
|
14
|
+
* @param path - absolute or relative POSIX path.
|
|
15
|
+
* @returns the URL.
|
|
16
|
+
*/
|
|
17
|
+
export declare function pathToFileURL(path: string): URL;
|
|
18
|
+
/**
|
|
19
|
+
* Absolute URL from a specifier and its base.
|
|
20
|
+
* @param specifier - relative or absolute specifier.
|
|
21
|
+
* @param base - base URL.
|
|
22
|
+
* @returns the resolved URL string.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolve(specifier: string, base: string): string;
|
|
25
|
+
/** WHATWG URL class, as `node:url` re-exports it. */
|
|
26
|
+
declare const UrlClass: {
|
|
27
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
28
|
+
prototype: URL;
|
|
29
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
30
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
31
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
32
|
+
revokeObjectURL(url: string): void;
|
|
33
|
+
};
|
|
34
|
+
/** WHATWG URLSearchParams class, as `node:url` re-exports it. */
|
|
35
|
+
declare const UrlSearchParamsClass: {
|
|
36
|
+
new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
|
|
37
|
+
prototype: URLSearchParams;
|
|
38
|
+
};
|
|
39
|
+
export { UrlClass as URL, UrlSearchParamsClass as URLSearchParams };
|
|
40
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
41
|
+
export declare const __esModule = true;
|
|
42
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
43
|
+
declare const _default: {
|
|
44
|
+
fileURLToPath: typeof fileURLToPath;
|
|
45
|
+
pathToFileURL: typeof pathToFileURL;
|
|
46
|
+
resolve: typeof resolve;
|
|
47
|
+
URL: {
|
|
48
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
49
|
+
prototype: URL;
|
|
50
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
51
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
52
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
53
|
+
revokeObjectURL(url: string): void;
|
|
54
|
+
};
|
|
55
|
+
URLSearchParams: {
|
|
56
|
+
new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
|
|
57
|
+
prototype: URLSearchParams;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
61
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:util/types` face: the predicate subset, re-exported from the util shim so
|
|
3
|
+
* both specifiers share one implementation. The predicates are checked against
|
|
4
|
+
* Node where they are built, on `types` in `../util.ts`.
|
|
5
|
+
*/
|
|
6
|
+
import { types } from '../util.ts';
|
|
7
|
+
/** The `node:util/types` predicates the harness reads, shared with the util shim. */
|
|
8
|
+
export declare const isPromise: (value: unknown) => value is Promise<unknown>, isDate: (value: unknown) => value is Date, isRegExp: (value: unknown) => value is RegExp, isTypedArray: (value: unknown) => value is NodeJS.TypedArray;
|
|
9
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
10
|
+
export declare const __esModule = true;
|
|
11
|
+
export default types;
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:util` for the worker: the members harness code actually imports. Node's
|
|
3
|
+
* inspect output is only used in diagnostics, so a JSON-shaped rendering is
|
|
4
|
+
* enough; `promisify` follows Node's error-first callback convention exactly
|
|
5
|
+
* because zlib-style APIs are wrapped with it at module scope.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Wrap an error-first callback function as a promise-returning one.
|
|
9
|
+
* @param fn - callback-style function.
|
|
10
|
+
* @returns the promise-returning wrapper.
|
|
11
|
+
*/
|
|
12
|
+
export declare function promisify<A extends unknown[], R>(fn: (...args: [...A, (error: unknown, value: R) => void]) => void): (...args: A) => Promise<R>;
|
|
13
|
+
/**
|
|
14
|
+
* Wrap a promise-returning function as an error-first callback one.
|
|
15
|
+
* @param fn - promise-returning function.
|
|
16
|
+
* @returns the callback-style wrapper.
|
|
17
|
+
*/
|
|
18
|
+
export declare function callbackify<A extends unknown[], R>(fn: (...args: A) => Promise<R>): (...args: [...A, (error: unknown, value?: R) => void]) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Diagnostic rendering of a value.
|
|
21
|
+
* @param value - the value.
|
|
22
|
+
* @returns a readable one-line rendering.
|
|
23
|
+
*/
|
|
24
|
+
export declare function inspect(value: unknown): string;
|
|
25
|
+
/**
|
|
26
|
+
* printf-style formatting for the `%s`/`%d`/`%j`/`%o` placeholders Node supports.
|
|
27
|
+
* @param template - format string, or any value when used without placeholders.
|
|
28
|
+
* @param args - substitution values.
|
|
29
|
+
* @returns the formatted string.
|
|
30
|
+
*/
|
|
31
|
+
export declare function format(template: unknown, ...args: unknown[]): string;
|
|
32
|
+
/**
|
|
33
|
+
* Structural deep equality, as `isDeepStrictEqual` defines it for plain data.
|
|
34
|
+
* @param left - first value.
|
|
35
|
+
* @param right - second value.
|
|
36
|
+
* @returns true when both sides are structurally identical.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isDeepStrictEqual(left: unknown, right: unknown): boolean;
|
|
39
|
+
/** Runtime type predicates (`node:util/types`), checked against the Node module of that name. */
|
|
40
|
+
export declare const types: {
|
|
41
|
+
isPromise: (value: unknown) => value is Promise<unknown>;
|
|
42
|
+
isDate: (value: unknown) => value is Date;
|
|
43
|
+
isRegExp: (value: unknown) => value is RegExp;
|
|
44
|
+
isTypedArray: (value: unknown) => value is NodeJS.TypedArray;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* CLI argument parsing has no caller inside the worker host.
|
|
48
|
+
* @returns Never — it throws naming the unavailable member.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseArgs(): never;
|
|
51
|
+
/**
|
|
52
|
+
* Deprecation wrappers pass the function through unchanged.
|
|
53
|
+
* @param fn - the function a caller wanted wrapped.
|
|
54
|
+
* @returns The same function, unwrapped.
|
|
55
|
+
*/
|
|
56
|
+
export declare function deprecate<F>(fn: F): F;
|
|
57
|
+
/** Text decoder class, as `node:util` re-exports it. */
|
|
58
|
+
declare const TextDecoderClass: {
|
|
59
|
+
new (label?: string, options?: TextDecoderOptions): TextDecoder;
|
|
60
|
+
prototype: TextDecoder;
|
|
61
|
+
};
|
|
62
|
+
/** Text encoder class, as `node:util` re-exports it. */
|
|
63
|
+
declare const TextEncoderClass: {
|
|
64
|
+
new (): TextEncoder;
|
|
65
|
+
prototype: TextEncoder;
|
|
66
|
+
};
|
|
67
|
+
export { TextDecoderClass as TextDecoder, TextEncoderClass as TextEncoder };
|
|
68
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
69
|
+
export declare const __esModule = true;
|
|
70
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
71
|
+
declare const _default: {
|
|
72
|
+
promisify: typeof promisify;
|
|
73
|
+
callbackify: typeof callbackify;
|
|
74
|
+
inspect: typeof inspect;
|
|
75
|
+
format: typeof format;
|
|
76
|
+
isDeepStrictEqual: typeof isDeepStrictEqual;
|
|
77
|
+
types: {
|
|
78
|
+
isPromise: (value: unknown) => value is Promise<unknown>;
|
|
79
|
+
isDate: (value: unknown) => value is Date;
|
|
80
|
+
isRegExp: (value: unknown) => value is RegExp;
|
|
81
|
+
isTypedArray: (value: unknown) => value is NodeJS.TypedArray;
|
|
82
|
+
};
|
|
83
|
+
parseArgs: typeof parseArgs;
|
|
84
|
+
deprecate: typeof deprecate;
|
|
85
|
+
TextDecoder: {
|
|
86
|
+
new (label?: string, options?: TextDecoderOptions): TextDecoder;
|
|
87
|
+
prototype: TextDecoder;
|
|
88
|
+
};
|
|
89
|
+
TextEncoder: {
|
|
90
|
+
new (): TextEncoder;
|
|
91
|
+
prototype: TextEncoder;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export default _default;
|
|
95
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** Zstandard parameter/flush constants read at module scope by the JSONL backend. */
|
|
2
|
+
export declare const constants: {
|
|
3
|
+
ZSTD_c_compressionLevel: number;
|
|
4
|
+
ZSTD_c_checksumFlag: number;
|
|
5
|
+
ZSTD_e_continue: number;
|
|
6
|
+
ZSTD_e_flush: number;
|
|
7
|
+
ZSTD_e_end: number;
|
|
8
|
+
ZSTD_CLEVEL_DEFAULT: number;
|
|
9
|
+
Z_NO_FLUSH: number;
|
|
10
|
+
Z_SYNC_FLUSH: number;
|
|
11
|
+
Z_FINISH: number;
|
|
12
|
+
};
|
|
13
|
+
/** One-shot Zstandard compression (unavailable; the composition writes plaintext logs). */
|
|
14
|
+
export declare const zstdCompressSync: typeof import('node:zlib').zstdCompressSync;
|
|
15
|
+
/** One-shot Zstandard decompression (unavailable; the worker never reads compressed logs). */
|
|
16
|
+
export declare const zstdDecompressSync: typeof import('node:zlib').zstdDecompressSync;
|
|
17
|
+
/** Callback form of {@link zstdCompressSync} (`promisify`'d at module scope by the backend). */
|
|
18
|
+
export declare const zstdCompress: typeof import('node:zlib').zstdCompress;
|
|
19
|
+
/** Callback form of {@link zstdDecompressSync}. */
|
|
20
|
+
export declare const zstdDecompress: typeof import('node:zlib').zstdDecompress;
|
|
21
|
+
/**
|
|
22
|
+
* Streaming Zstandard decoder placeholder: the returned object deliberately
|
|
23
|
+
* lacks Node's private `_handle`/`_writeState` members, which is the signal the
|
|
24
|
+
* backend's private-shape probe checks before choosing that path.
|
|
25
|
+
* @returns the incompatible placeholder stream.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createZstdDecompress(): Record<string, unknown>;
|
|
28
|
+
/** Streaming Zstandard encoder (unavailable; the backend only needs one-shot). */
|
|
29
|
+
export declare const createZstdCompress: typeof import('node:zlib').createZstdCompress;
|
|
30
|
+
/** gzip family (unavailable; no consumer in the reachable tree). */
|
|
31
|
+
export declare const gzip: typeof import('node:zlib').gzip;
|
|
32
|
+
/** gzip sync counterpart. */
|
|
33
|
+
export declare const gzipSync: typeof import('node:zlib').gzipSync;
|
|
34
|
+
/** gunzip counterpart. */
|
|
35
|
+
export declare const gunzip: typeof import('node:zlib').gunzip;
|
|
36
|
+
/** gunzip sync counterpart. */
|
|
37
|
+
export declare const gunzipSync: typeof import('node:zlib').gunzipSync;
|
|
38
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
39
|
+
export declare const __esModule = true;
|
|
40
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
41
|
+
declare const _default: {
|
|
42
|
+
constants: {
|
|
43
|
+
ZSTD_c_compressionLevel: number;
|
|
44
|
+
ZSTD_c_checksumFlag: number;
|
|
45
|
+
ZSTD_e_continue: number;
|
|
46
|
+
ZSTD_e_flush: number;
|
|
47
|
+
ZSTD_e_end: number;
|
|
48
|
+
ZSTD_CLEVEL_DEFAULT: number;
|
|
49
|
+
Z_NO_FLUSH: number;
|
|
50
|
+
Z_SYNC_FLUSH: number;
|
|
51
|
+
Z_FINISH: number;
|
|
52
|
+
};
|
|
53
|
+
zstdCompress: typeof import("zlib").zstdCompress;
|
|
54
|
+
zstdCompressSync: typeof import("zlib").zstdCompressSync;
|
|
55
|
+
zstdDecompress: typeof import("zlib").zstdDecompress;
|
|
56
|
+
zstdDecompressSync: typeof import("zlib").zstdDecompressSync;
|
|
57
|
+
createZstdCompress: typeof import("zlib").createZstdCompress;
|
|
58
|
+
createZstdDecompress: typeof createZstdDecompress;
|
|
59
|
+
gzip: typeof import("zlib").gzip;
|
|
60
|
+
gzipSync: typeof import("zlib").gzipSync;
|
|
61
|
+
gunzip: typeof import("zlib").gunzip;
|
|
62
|
+
gunzipSync: typeof import("zlib").gunzipSync;
|
|
63
|
+
};
|
|
64
|
+
export default _default;
|
|
65
|
+
//# sourceMappingURL=zlib.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** DNS lookup (unavailable in the worker host). */
|
|
2
|
+
export declare const lookup: typeof import('node:dns/promises').lookup;
|
|
3
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports. */
|
|
4
|
+
export declare const __esModule = true;
|
|
5
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
6
|
+
declare const _default: {
|
|
7
|
+
lookup: typeof import("dns/promises").lookup;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=promises.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `node:net` for the worker. Nothing accepts or dials a socket here: the fake
|
|
3
|
+
* HTTP server never emits `upgrade`, so only the address predicates and a
|
|
4
|
+
* constructible-but-loud Socket are reachable.
|
|
5
|
+
*/
|
|
6
|
+
/** Constructible placeholder: the WebSocket upgrade path never runs in the worker. */
|
|
7
|
+
export declare class Socket {
|
|
8
|
+
/**
|
|
9
|
+
* Sockets are never written to; reaching this means an upgrade path activated.
|
|
10
|
+
* @returns Never — it throws naming the unavailable member.
|
|
11
|
+
*/
|
|
12
|
+
write(): never;
|
|
13
|
+
/**
|
|
14
|
+
* Counterpart of {@link write}.
|
|
15
|
+
* @returns Never — it throws naming the unavailable member.
|
|
16
|
+
*/
|
|
17
|
+
end(): never;
|
|
18
|
+
/** Teardown is accepted so disposal paths stay quiet. */
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether a string is an IPv4 literal.
|
|
23
|
+
* @param value - candidate.
|
|
24
|
+
* @returns true for dotted-quad literals.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isIPv4(value: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether a string is an IPv6 literal.
|
|
29
|
+
* @param value - candidate.
|
|
30
|
+
* @returns true for colon-hex literals.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isIPv6(value: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* IP family of a literal.
|
|
35
|
+
* @param value - candidate.
|
|
36
|
+
* @returns 4, 6, or 0 when it is not an IP literal.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isIP(value: string): number;
|
|
39
|
+
/**
|
|
40
|
+
* TCP listening is the fake HTTP server's business; a bare net server is unreachable.
|
|
41
|
+
* @returns Never — it throws naming the unavailable member.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createServer(): never;
|
|
44
|
+
/**
|
|
45
|
+
* Outbound connections have no carrier in a worker.
|
|
46
|
+
* @returns Never — it throws naming the unavailable member.
|
|
47
|
+
*/
|
|
48
|
+
export declare function connect(): never;
|
|
49
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
50
|
+
export declare const __esModule = true;
|
|
51
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
52
|
+
declare const _default: {
|
|
53
|
+
Socket: typeof Socket;
|
|
54
|
+
isIP: typeof isIP;
|
|
55
|
+
isIPv4: typeof isIPv4;
|
|
56
|
+
isIPv6: typeof isIPv6;
|
|
57
|
+
createServer: typeof createServer;
|
|
58
|
+
connect: typeof connect;
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
61
|
+
//# sourceMappingURL=net.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Synchronous database handle (unavailable). */
|
|
2
|
+
export declare const DatabaseSync: typeof import('node:sqlite').DatabaseSync;
|
|
3
|
+
/** Prepared statement handle (unavailable). */
|
|
4
|
+
export declare const StatementSync: typeof import('node:sqlite').StatementSync;
|
|
5
|
+
/**
|
|
6
|
+
* Backup helper (unavailable).
|
|
7
|
+
* @returns Never — it throws naming the unavailable member.
|
|
8
|
+
*/
|
|
9
|
+
export declare function backup(): never;
|
|
10
|
+
/** CommonJS interop marker: the worker loader hands `default` to default imports (see ./builtins.ts). */
|
|
11
|
+
export declare const __esModule = true;
|
|
12
|
+
/** CommonJS default export: the members `require()` hands a caller of this module. */
|
|
13
|
+
declare const _default: {
|
|
14
|
+
DatabaseSync: typeof import("node:sqlite").DatabaseSync;
|
|
15
|
+
StatementSync: typeof import("node:sqlite").StatementSync;
|
|
16
|
+
backup: typeof backup;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=sqlite.d.ts.map
|