@scelar/nodepod 1.0.1 → 1.0.2
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/dist/__tests__/smoke.test.d.ts +1 -0
- package/dist/constants/cdn-urls.d.ts +12 -0
- package/dist/constants/config.d.ts +121 -0
- package/dist/cross-origin.d.ts +5 -0
- package/dist/engine-factory.d.ts +24 -0
- package/dist/engine-types.d.ts +40 -0
- package/dist/helpers/byte-encoding.d.ts +4 -0
- package/dist/helpers/digest.d.ts +1 -0
- package/dist/helpers/event-loop.d.ts +12 -0
- package/dist/helpers/wasm-cache.d.ts +6 -0
- package/dist/iframe-sandbox.d.ts +25 -0
- package/dist/index.d.ts +86 -0
- package/dist/isolation-helpers.d.ts +13 -0
- package/dist/memory-volume.d.ts +147 -0
- package/dist/module-transformer.d.ts +6 -0
- package/dist/packages/archive-extractor.d.ts +28 -0
- package/dist/packages/browser-bundler.d.ts +14 -0
- package/dist/packages/installer.d.ts +41 -0
- package/dist/packages/registry-client.d.ts +46 -0
- package/dist/packages/version-resolver.d.ts +37 -0
- package/dist/polyfills/assert.d.ts +54 -0
- package/dist/polyfills/async_hooks.d.ts +46 -0
- package/dist/polyfills/buffer.d.ts +111 -0
- package/dist/polyfills/child_process.d.ts +141 -0
- package/dist/polyfills/chokidar.d.ts +63 -0
- package/dist/polyfills/cluster.d.ts +55 -0
- package/dist/polyfills/console.d.ts +72 -0
- package/dist/polyfills/constants.d.ts +207 -0
- package/dist/polyfills/crypto.d.ts +189 -0
- package/dist/polyfills/dgram.d.ts +37 -0
- package/dist/polyfills/diagnostics_channel.d.ts +27 -0
- package/dist/polyfills/dns.d.ts +76 -0
- package/dist/polyfills/domain.d.ts +27 -0
- package/dist/polyfills/esbuild.d.ts +106 -0
- package/dist/polyfills/events.d.ts +39 -0
- package/dist/polyfills/fs.d.ts +274 -0
- package/dist/polyfills/fsevents.d.ts +62 -0
- package/dist/polyfills/http.d.ts +215 -0
- package/dist/polyfills/http2.d.ts +119 -0
- package/dist/polyfills/https.d.ts +24 -0
- package/dist/polyfills/inspector.d.ts +29 -0
- package/dist/polyfills/lightningcss.d.ts +70 -0
- package/dist/polyfills/module.d.ts +35 -0
- package/dist/polyfills/net.d.ts +91 -0
- package/dist/polyfills/os.d.ts +240 -0
- package/dist/polyfills/path.d.ts +95 -0
- package/dist/polyfills/perf_hooks.d.ts +48 -0
- package/dist/polyfills/process.d.ts +190 -0
- package/dist/polyfills/punycode.d.ts +21 -0
- package/dist/polyfills/querystring.d.ts +18 -0
- package/dist/polyfills/quic.d.ts +42 -0
- package/dist/polyfills/readdirp.d.ts +48 -0
- package/dist/polyfills/readline.d.ts +87 -0
- package/dist/polyfills/repl.d.ts +45 -0
- package/dist/polyfills/rollup.d.ts +37 -0
- package/dist/polyfills/sea.d.ts +11 -0
- package/dist/polyfills/sqlite.d.ts +30 -0
- package/dist/polyfills/stream.d.ts +160 -0
- package/dist/polyfills/string_decoder.d.ts +16 -0
- package/dist/polyfills/tailwindcss-oxide.d.ts +42 -0
- package/dist/polyfills/test.d.ts +60 -0
- package/dist/polyfills/timers.d.ts +23 -0
- package/dist/polyfills/tls.d.ts +61 -0
- package/dist/polyfills/trace_events.d.ts +22 -0
- package/dist/polyfills/tty.d.ts +38 -0
- package/dist/polyfills/url.d.ts +55 -0
- package/dist/polyfills/util.d.ts +135 -0
- package/dist/polyfills/v8.d.ts +97 -0
- package/dist/polyfills/vm.d.ts +66 -0
- package/dist/polyfills/volume-registry.d.ts +3 -0
- package/dist/polyfills/wasi.d.ts +16 -0
- package/dist/polyfills/worker_threads.d.ts +111 -0
- package/dist/polyfills/ws.d.ts +92 -0
- package/dist/polyfills/zlib.d.ts +278 -0
- package/dist/request-proxy.d.ts +63 -0
- package/dist/script-engine.d.ts +79 -0
- package/dist/sdk/nodepod-fs.d.ts +27 -0
- package/dist/sdk/nodepod-process.d.ts +28 -0
- package/dist/sdk/nodepod-terminal.d.ts +48 -0
- package/dist/sdk/nodepod.d.ts +39 -0
- package/dist/sdk/types.d.ts +53 -0
- package/dist/shell/commands/bun.d.ts +4 -0
- package/dist/shell/commands/directory.d.ts +2 -0
- package/dist/shell/commands/file-ops.d.ts +2 -0
- package/dist/shell/commands/git.d.ts +2 -0
- package/dist/shell/commands/node.d.ts +4 -0
- package/dist/shell/commands/npm.d.ts +3 -0
- package/dist/shell/commands/pm-types.d.ts +25 -0
- package/dist/shell/commands/pnpm.d.ts +3 -0
- package/dist/shell/commands/search.d.ts +2 -0
- package/dist/shell/commands/shell-env.d.ts +3 -0
- package/dist/shell/commands/text-processing.d.ts +2 -0
- package/dist/shell/commands/yarn.d.ts +3 -0
- package/dist/shell/shell-builtins.d.ts +2 -0
- package/dist/shell/shell-helpers.d.ts +28 -0
- package/dist/shell/shell-interpreter.d.ts +48 -0
- package/dist/shell/shell-parser.d.ts +6 -0
- package/dist/shell/shell-types.d.ts +48 -0
- package/dist/syntax-transforms.d.ts +3 -0
- package/dist/threading/engine-worker.d.ts +1 -0
- package/dist/threading/inline-worker.d.ts +2 -0
- package/dist/threading/offload-types.d.ts +87 -0
- package/dist/threading/offload-worker.d.ts +1 -0
- package/dist/threading/offload.d.ts +16 -0
- package/dist/threading/process-context.d.ts +40 -0
- package/dist/threading/process-handle.d.ts +42 -0
- package/dist/threading/process-manager.d.ts +52 -0
- package/dist/threading/process-worker-entry.d.ts +24 -0
- package/dist/threading/shared-vfs.d.ts +36 -0
- package/dist/threading/sync-channel.d.ts +21 -0
- package/dist/threading/task-queue.d.ts +15 -0
- package/dist/threading/vfs-bridge.d.ts +25 -0
- package/dist/threading/worker-pool.d.ts +38 -0
- package/dist/threading/worker-protocol.d.ts +264 -0
- package/dist/threading/worker-vfs.d.ts +34 -0
- package/dist/types/fs-streams.d.ts +122 -0
- package/dist/types/manifest.d.ts +17 -0
- package/dist/worker-sandbox.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const sep = "/";
|
|
2
|
+
export declare const delimiter = ":";
|
|
3
|
+
export declare function normalize(inputPath: string): string;
|
|
4
|
+
export declare function join(...fragments: string[]): string;
|
|
5
|
+
export declare function resolve(...segments: string[]): string;
|
|
6
|
+
export declare function isAbsolute(targetPath: string): boolean;
|
|
7
|
+
export declare function dirname(targetPath: string): string;
|
|
8
|
+
export declare function basename(targetPath: string, suffix?: string): string;
|
|
9
|
+
export declare function extname(targetPath: string): string;
|
|
10
|
+
export declare function relative(fromPath: string, toPath: string): string;
|
|
11
|
+
export declare function parse(targetPath: string): {
|
|
12
|
+
root: string;
|
|
13
|
+
dir: string;
|
|
14
|
+
base: string;
|
|
15
|
+
ext: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function format(components: {
|
|
19
|
+
root?: string;
|
|
20
|
+
dir?: string;
|
|
21
|
+
base?: string;
|
|
22
|
+
ext?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
}): string;
|
|
25
|
+
export declare const posix: {
|
|
26
|
+
sep: string;
|
|
27
|
+
delimiter: string;
|
|
28
|
+
normalize: typeof normalize;
|
|
29
|
+
join: typeof join;
|
|
30
|
+
resolve: typeof resolve;
|
|
31
|
+
isAbsolute: typeof isAbsolute;
|
|
32
|
+
dirname: typeof dirname;
|
|
33
|
+
basename: typeof basename;
|
|
34
|
+
extname: typeof extname;
|
|
35
|
+
relative: typeof relative;
|
|
36
|
+
parse: typeof parse;
|
|
37
|
+
format: typeof format;
|
|
38
|
+
};
|
|
39
|
+
export declare const win32: {
|
|
40
|
+
sep: string;
|
|
41
|
+
delimiter: string;
|
|
42
|
+
normalize: typeof normalize;
|
|
43
|
+
join: typeof join;
|
|
44
|
+
resolve: typeof resolve;
|
|
45
|
+
isAbsolute: typeof isAbsolute;
|
|
46
|
+
dirname: typeof dirname;
|
|
47
|
+
basename: typeof basename;
|
|
48
|
+
extname: typeof extname;
|
|
49
|
+
relative: typeof relative;
|
|
50
|
+
parse: typeof parse;
|
|
51
|
+
format: typeof format;
|
|
52
|
+
};
|
|
53
|
+
declare const _default: {
|
|
54
|
+
sep: string;
|
|
55
|
+
delimiter: string;
|
|
56
|
+
normalize: typeof normalize;
|
|
57
|
+
join: typeof join;
|
|
58
|
+
resolve: typeof resolve;
|
|
59
|
+
isAbsolute: typeof isAbsolute;
|
|
60
|
+
dirname: typeof dirname;
|
|
61
|
+
basename: typeof basename;
|
|
62
|
+
extname: typeof extname;
|
|
63
|
+
relative: typeof relative;
|
|
64
|
+
parse: typeof parse;
|
|
65
|
+
format: typeof format;
|
|
66
|
+
posix: {
|
|
67
|
+
sep: string;
|
|
68
|
+
delimiter: string;
|
|
69
|
+
normalize: typeof normalize;
|
|
70
|
+
join: typeof join;
|
|
71
|
+
resolve: typeof resolve;
|
|
72
|
+
isAbsolute: typeof isAbsolute;
|
|
73
|
+
dirname: typeof dirname;
|
|
74
|
+
basename: typeof basename;
|
|
75
|
+
extname: typeof extname;
|
|
76
|
+
relative: typeof relative;
|
|
77
|
+
parse: typeof parse;
|
|
78
|
+
format: typeof format;
|
|
79
|
+
};
|
|
80
|
+
win32: {
|
|
81
|
+
sep: string;
|
|
82
|
+
delimiter: string;
|
|
83
|
+
normalize: typeof normalize;
|
|
84
|
+
join: typeof join;
|
|
85
|
+
resolve: typeof resolve;
|
|
86
|
+
isAbsolute: typeof isAbsolute;
|
|
87
|
+
dirname: typeof dirname;
|
|
88
|
+
basename: typeof basename;
|
|
89
|
+
extname: typeof extname;
|
|
90
|
+
relative: typeof relative;
|
|
91
|
+
parse: typeof parse;
|
|
92
|
+
format: typeof format;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const performance: Performance;
|
|
2
|
+
export interface TimingEntryList {
|
|
3
|
+
getEntries(): PerformanceEntry[];
|
|
4
|
+
getEntriesByName(name: string, kind?: string): PerformanceEntry[];
|
|
5
|
+
getEntriesByType(kind: string): PerformanceEntry[];
|
|
6
|
+
}
|
|
7
|
+
export interface PerformanceObserver {
|
|
8
|
+
observe(cfg: {
|
|
9
|
+
entryTypes?: string[];
|
|
10
|
+
type?: string;
|
|
11
|
+
}): void;
|
|
12
|
+
disconnect(): void;
|
|
13
|
+
takeRecords(): PerformanceEntry[];
|
|
14
|
+
}
|
|
15
|
+
export declare const PerformanceObserver: {
|
|
16
|
+
new (fn: (list: TimingEntryList) => void): PerformanceObserver;
|
|
17
|
+
prototype: any;
|
|
18
|
+
supportedEntryTypes: string[];
|
|
19
|
+
};
|
|
20
|
+
export interface TimingHistogram {
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
mean: number;
|
|
24
|
+
stddev: number;
|
|
25
|
+
percentiles: Map<number, number>;
|
|
26
|
+
exceeds: number;
|
|
27
|
+
reset(): void;
|
|
28
|
+
percentile(p: number): number;
|
|
29
|
+
}
|
|
30
|
+
export declare const TimingHistogram: {
|
|
31
|
+
new (): TimingHistogram;
|
|
32
|
+
prototype: any;
|
|
33
|
+
};
|
|
34
|
+
export declare function createHistogram(): TimingHistogram;
|
|
35
|
+
export declare function monitorEventLoopDelay(_opts?: {
|
|
36
|
+
resolution?: number;
|
|
37
|
+
}): TimingHistogram;
|
|
38
|
+
declare const _default: {
|
|
39
|
+
performance: Performance;
|
|
40
|
+
PerformanceObserver: {
|
|
41
|
+
new (fn: (list: TimingEntryList) => void): PerformanceObserver;
|
|
42
|
+
prototype: any;
|
|
43
|
+
supportedEntryTypes: string[];
|
|
44
|
+
};
|
|
45
|
+
createHistogram: typeof createHistogram;
|
|
46
|
+
monitorEventLoopDelay: typeof monitorEventLoopDelay;
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { EventHandler } from "./events";
|
|
2
|
+
export interface ProcessEnvVars {
|
|
3
|
+
[key: string]: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
interface OutputStreamBridge {
|
|
6
|
+
isTTY: boolean;
|
|
7
|
+
columns: number;
|
|
8
|
+
rows: number;
|
|
9
|
+
write: (data: string | Buffer, encoding?: string, cb?: () => void) => boolean;
|
|
10
|
+
end?: (data?: string, cb?: () => void) => void;
|
|
11
|
+
on: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
12
|
+
once: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
13
|
+
off: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
14
|
+
emit: (evt: string, ...args: unknown[]) => boolean;
|
|
15
|
+
addListener: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
16
|
+
removeListener: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
17
|
+
removeAllListeners: (evt?: string) => OutputStreamBridge;
|
|
18
|
+
setMaxListeners: (n: number) => OutputStreamBridge;
|
|
19
|
+
getMaxListeners: () => number;
|
|
20
|
+
listenerCount: (evt: string) => number;
|
|
21
|
+
listeners: (evt: string) => EventHandler[];
|
|
22
|
+
rawListeners: (evt: string) => EventHandler[];
|
|
23
|
+
prependListener: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
24
|
+
prependOnceListener: (evt: string, fn: EventHandler) => OutputStreamBridge;
|
|
25
|
+
eventNames: () => string[];
|
|
26
|
+
pause?: () => OutputStreamBridge;
|
|
27
|
+
resume?: () => OutputStreamBridge;
|
|
28
|
+
setEncoding?: (enc: string) => OutputStreamBridge;
|
|
29
|
+
clearLine?: (dir: number, cb?: () => void) => boolean;
|
|
30
|
+
cursorTo?: (x: number, y?: number, cb?: () => void) => boolean;
|
|
31
|
+
moveCursor?: (dx: number, dy: number, cb?: () => void) => boolean;
|
|
32
|
+
getWindowSize?: () => [number, number];
|
|
33
|
+
getColorDepth?: (env?: Record<string, string>) => number;
|
|
34
|
+
hasColors?: (countOrEnv?: number | Record<string, string>, env?: Record<string, string>) => boolean;
|
|
35
|
+
}
|
|
36
|
+
interface InputStreamBridge extends OutputStreamBridge {
|
|
37
|
+
read?: (size?: number) => string | Buffer | null;
|
|
38
|
+
setRawMode?: (flag: boolean) => InputStreamBridge;
|
|
39
|
+
isRaw?: boolean;
|
|
40
|
+
destroy?: () => InputStreamBridge;
|
|
41
|
+
pipe?: (dest: any) => any;
|
|
42
|
+
unpipe?: () => InputStreamBridge;
|
|
43
|
+
unshift?: (...args: unknown[]) => void;
|
|
44
|
+
wrap?: (stream: any) => InputStreamBridge;
|
|
45
|
+
readable?: boolean;
|
|
46
|
+
writable?: boolean;
|
|
47
|
+
destroyed?: boolean;
|
|
48
|
+
[Symbol.asyncIterator]?: () => AsyncIterator<any>;
|
|
49
|
+
}
|
|
50
|
+
export interface ProcessObject {
|
|
51
|
+
env: ProcessEnvVars;
|
|
52
|
+
cwd: () => string;
|
|
53
|
+
chdir: (dir: string) => void;
|
|
54
|
+
_chdirHook?: (dir: string) => void;
|
|
55
|
+
platform: string;
|
|
56
|
+
version: string;
|
|
57
|
+
versions: {
|
|
58
|
+
node: string;
|
|
59
|
+
v8: string;
|
|
60
|
+
uv: string;
|
|
61
|
+
modules: string;
|
|
62
|
+
openssl: string;
|
|
63
|
+
napi: string;
|
|
64
|
+
webcontainer: string;
|
|
65
|
+
};
|
|
66
|
+
argv: string[];
|
|
67
|
+
argv0: string;
|
|
68
|
+
execPath: string;
|
|
69
|
+
execArgv: string[];
|
|
70
|
+
pid: number;
|
|
71
|
+
ppid: number;
|
|
72
|
+
exit: (code?: number) => never;
|
|
73
|
+
nextTick: (fn: (...args: unknown[]) => void, ...args: unknown[]) => void;
|
|
74
|
+
stdout: OutputStreamBridge;
|
|
75
|
+
stderr: OutputStreamBridge;
|
|
76
|
+
stdin: InputStreamBridge;
|
|
77
|
+
arch: string;
|
|
78
|
+
title: string;
|
|
79
|
+
hrtime: {
|
|
80
|
+
(prev?: [number, number]): [number, number];
|
|
81
|
+
bigint: () => bigint;
|
|
82
|
+
};
|
|
83
|
+
memoryUsage: () => {
|
|
84
|
+
rss: number;
|
|
85
|
+
heapTotal: number;
|
|
86
|
+
heapUsed: number;
|
|
87
|
+
external: number;
|
|
88
|
+
arrayBuffers: number;
|
|
89
|
+
};
|
|
90
|
+
uptime: () => number;
|
|
91
|
+
cpuUsage: () => {
|
|
92
|
+
user: number;
|
|
93
|
+
system: number;
|
|
94
|
+
};
|
|
95
|
+
resourceUsage: () => {
|
|
96
|
+
userCPUTime: number;
|
|
97
|
+
systemCPUTime: number;
|
|
98
|
+
maxRSS: number;
|
|
99
|
+
sharedMemorySize: number;
|
|
100
|
+
unsharedDataSize: number;
|
|
101
|
+
unsharedStackSize: number;
|
|
102
|
+
minorPageFault: number;
|
|
103
|
+
majorPageFault: number;
|
|
104
|
+
swappedOut: number;
|
|
105
|
+
fsRead: number;
|
|
106
|
+
fsWrite: number;
|
|
107
|
+
ipcSent: number;
|
|
108
|
+
ipcReceived: number;
|
|
109
|
+
signalsCount: number;
|
|
110
|
+
voluntaryContextSwitches: number;
|
|
111
|
+
involuntaryContextSwitches: number;
|
|
112
|
+
};
|
|
113
|
+
abort: () => never;
|
|
114
|
+
kill: (pid: number, signal?: string | number) => boolean;
|
|
115
|
+
umask: (mask?: number) => number;
|
|
116
|
+
config: {
|
|
117
|
+
variables: Record<string, unknown>;
|
|
118
|
+
target_defaults: Record<string, unknown>;
|
|
119
|
+
};
|
|
120
|
+
release: {
|
|
121
|
+
name: string;
|
|
122
|
+
sourceUrl: string;
|
|
123
|
+
headersUrl: string;
|
|
124
|
+
};
|
|
125
|
+
features: {
|
|
126
|
+
inspector: boolean;
|
|
127
|
+
debug: boolean;
|
|
128
|
+
uv: boolean;
|
|
129
|
+
ipv6: boolean;
|
|
130
|
+
tls_alpn: boolean;
|
|
131
|
+
tls_sni: boolean;
|
|
132
|
+
tls_ocsp: boolean;
|
|
133
|
+
tls: boolean;
|
|
134
|
+
};
|
|
135
|
+
debugPort: number;
|
|
136
|
+
allowedNodeEnvironmentFlags: Set<string>;
|
|
137
|
+
on: (evt: string, fn: EventHandler) => ProcessObject;
|
|
138
|
+
once: (evt: string, fn: EventHandler) => ProcessObject;
|
|
139
|
+
off: (evt: string, fn: EventHandler) => ProcessObject;
|
|
140
|
+
emit: (evt: string, ...args: unknown[]) => boolean;
|
|
141
|
+
addListener: (evt: string, fn: EventHandler) => ProcessObject;
|
|
142
|
+
removeListener: (evt: string, fn: EventHandler) => ProcessObject;
|
|
143
|
+
removeAllListeners: (evt?: string) => ProcessObject;
|
|
144
|
+
listeners: (evt: string) => EventHandler[];
|
|
145
|
+
listenerCount: (evt: string) => number;
|
|
146
|
+
prependListener: (evt: string, fn: EventHandler) => ProcessObject;
|
|
147
|
+
prependOnceListener: (evt: string, fn: EventHandler) => ProcessObject;
|
|
148
|
+
eventNames: () => string[];
|
|
149
|
+
setMaxListeners: (n: number) => ProcessObject;
|
|
150
|
+
getMaxListeners: () => number;
|
|
151
|
+
send?: (msg: unknown, cb?: (err: Error | null) => void) => boolean;
|
|
152
|
+
disconnect?: () => void;
|
|
153
|
+
connected?: boolean;
|
|
154
|
+
_debugCwdCalls?: number;
|
|
155
|
+
mainModule?: unknown;
|
|
156
|
+
channel?: unknown;
|
|
157
|
+
noDeprecation?: boolean;
|
|
158
|
+
throwDeprecation?: boolean;
|
|
159
|
+
traceDeprecation?: boolean;
|
|
160
|
+
traceProcessWarnings?: boolean;
|
|
161
|
+
report?: Record<string, unknown>;
|
|
162
|
+
binding?: (name: string) => Record<string, unknown>;
|
|
163
|
+
_linkedBinding?: (name: string) => Record<string, unknown>;
|
|
164
|
+
dlopen?: (module: unknown, filename: string, flags?: number) => void;
|
|
165
|
+
reallyExit?: (code?: number) => void;
|
|
166
|
+
_getActiveRequests?: () => unknown[];
|
|
167
|
+
_getActiveHandles?: () => unknown[];
|
|
168
|
+
emitWarning?: (warning: string | Error, typeOrOptions?: string | {
|
|
169
|
+
type?: string;
|
|
170
|
+
code?: string;
|
|
171
|
+
detail?: string;
|
|
172
|
+
}, code?: string) => void;
|
|
173
|
+
hasUncaughtExceptionCaptureCallback?: () => boolean;
|
|
174
|
+
setUncaughtExceptionCaptureCallback?: (fn: ((err: Error) => void) | null) => void;
|
|
175
|
+
sourceMapsEnabled?: boolean;
|
|
176
|
+
setSourceMapsEnabled?: (val: boolean) => void;
|
|
177
|
+
constrainedMemory?: () => number;
|
|
178
|
+
availableMemory?: () => number;
|
|
179
|
+
}
|
|
180
|
+
export declare function buildProcessEnv(config?: {
|
|
181
|
+
cwd?: string;
|
|
182
|
+
env?: ProcessEnvVars;
|
|
183
|
+
onExit?: (code: number) => void;
|
|
184
|
+
onStdout?: (text: string) => void;
|
|
185
|
+
onStderr?: (text: string) => void;
|
|
186
|
+
pid?: number;
|
|
187
|
+
ppid?: number;
|
|
188
|
+
}): ProcessObject;
|
|
189
|
+
export declare const process: ProcessObject;
|
|
190
|
+
export default process;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function decode(input: string): string;
|
|
2
|
+
export declare function encode(input: string): string;
|
|
3
|
+
export declare function toUnicode(domain: string): string;
|
|
4
|
+
export declare function toASCII(domain: string): string;
|
|
5
|
+
export declare const ucs2: {
|
|
6
|
+
decode: (str: string) => number[];
|
|
7
|
+
encode: (codePoints: number[]) => string;
|
|
8
|
+
};
|
|
9
|
+
export declare const version = "2.3.1";
|
|
10
|
+
declare const _default: {
|
|
11
|
+
decode: typeof decode;
|
|
12
|
+
encode: typeof encode;
|
|
13
|
+
toUnicode: typeof toUnicode;
|
|
14
|
+
toASCII: typeof toASCII;
|
|
15
|
+
ucs2: {
|
|
16
|
+
decode: (str: string) => number[];
|
|
17
|
+
encode: (codePoints: number[]) => string;
|
|
18
|
+
};
|
|
19
|
+
version: string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ParsedQuery = Record<string, string | string[]>;
|
|
2
|
+
export declare function parse(input: string, pairSep?: string, kvSep?: string, options?: {
|
|
3
|
+
maxKeys?: number;
|
|
4
|
+
}): ParsedQuery;
|
|
5
|
+
export declare function stringify(obj: Record<string, string | string[] | number | boolean | undefined>, pairSep?: string, kvSep?: string): string;
|
|
6
|
+
export declare function escape(text: string): string;
|
|
7
|
+
export declare function unescape(text: string): string;
|
|
8
|
+
export declare const encode: typeof stringify;
|
|
9
|
+
export declare const decode: typeof parse;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
parse: typeof parse;
|
|
12
|
+
stringify: typeof stringify;
|
|
13
|
+
escape: typeof escape;
|
|
14
|
+
unescape: typeof unescape;
|
|
15
|
+
encode: typeof stringify;
|
|
16
|
+
decode: typeof parse;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter } from "./events";
|
|
2
|
+
export interface QuicEndpoint extends EventEmitter {
|
|
3
|
+
close(): void;
|
|
4
|
+
destroy(_err?: Error): void;
|
|
5
|
+
readonly address: {
|
|
6
|
+
address: string;
|
|
7
|
+
family: string;
|
|
8
|
+
port: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface QuicEndpointConstructor {
|
|
12
|
+
new (_opts?: object): QuicEndpoint;
|
|
13
|
+
(this: any, _opts?: object): void;
|
|
14
|
+
prototype: any;
|
|
15
|
+
}
|
|
16
|
+
export declare const QuicEndpoint: QuicEndpointConstructor;
|
|
17
|
+
export interface QuicSession extends EventEmitter {
|
|
18
|
+
close(): void;
|
|
19
|
+
destroy(_err?: Error): void;
|
|
20
|
+
readonly destroyed: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface QuicSessionConstructor {
|
|
23
|
+
new (): QuicSession;
|
|
24
|
+
(this: any): void;
|
|
25
|
+
prototype: any;
|
|
26
|
+
}
|
|
27
|
+
export declare const QuicSession: QuicSessionConstructor;
|
|
28
|
+
export interface QuicStream extends EventEmitter {
|
|
29
|
+
readonly id: number;
|
|
30
|
+
}
|
|
31
|
+
interface QuicStreamConstructor {
|
|
32
|
+
new (): QuicStream;
|
|
33
|
+
(this: any): void;
|
|
34
|
+
prototype: any;
|
|
35
|
+
}
|
|
36
|
+
export declare const QuicStream: QuicStreamConstructor;
|
|
37
|
+
declare const _default: {
|
|
38
|
+
QuicEndpoint: QuicEndpointConstructor;
|
|
39
|
+
QuicSession: QuicSessionConstructor;
|
|
40
|
+
QuicStream: QuicStreamConstructor;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { MemoryVolume, FileStat } from "../memory-volume";
|
|
2
|
+
export declare function setVolume(vol: MemoryVolume): void;
|
|
3
|
+
export interface ScanOptions {
|
|
4
|
+
root?: string;
|
|
5
|
+
fileFilter?: string | string[] | ((entry: ScanEntry) => boolean);
|
|
6
|
+
directoryFilter?: string | string[] | ((entry: ScanEntry) => boolean);
|
|
7
|
+
depth?: number;
|
|
8
|
+
type?: "files" | "directories" | "files_directories" | "all";
|
|
9
|
+
lstat?: boolean;
|
|
10
|
+
alwaysStat?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ScanEntry {
|
|
13
|
+
path: string;
|
|
14
|
+
fullPath: string;
|
|
15
|
+
basename: string;
|
|
16
|
+
stats?: FileStat;
|
|
17
|
+
dirent?: {
|
|
18
|
+
isFile(): boolean;
|
|
19
|
+
isDirectory(): boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
interface DirectoryScanner {
|
|
24
|
+
cfg: ScanOptions;
|
|
25
|
+
rootDir: string;
|
|
26
|
+
results: ScanEntry[];
|
|
27
|
+
scanned: boolean;
|
|
28
|
+
handlerMap: Map<string, Array<(...args: unknown[]) => void>>;
|
|
29
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<ScanEntry>;
|
|
30
|
+
toArray(): Promise<ScanEntry[]>;
|
|
31
|
+
on(event: string, handler: (...args: unknown[]) => void): this;
|
|
32
|
+
once(event: string, handler: (...args: unknown[]) => void): this;
|
|
33
|
+
off(event: string, handler: (...args: unknown[]) => void): this;
|
|
34
|
+
fireEvent(event: string, ...args: unknown[]): void;
|
|
35
|
+
runScan(): void;
|
|
36
|
+
crawl(dir: string, level: number, relative: string): void;
|
|
37
|
+
applyFilter(entry: ScanEntry, filter?: string | string[] | ((e: ScanEntry) => boolean)): boolean;
|
|
38
|
+
globMatch(filename: string, pattern: string): boolean;
|
|
39
|
+
}
|
|
40
|
+
interface DirectoryScannerConstructor {
|
|
41
|
+
new (root: string, cfg?: ScanOptions): DirectoryScanner;
|
|
42
|
+
(this: any, root: string, cfg?: ScanOptions): void;
|
|
43
|
+
prototype: any;
|
|
44
|
+
}
|
|
45
|
+
declare const DirectoryScanner: DirectoryScannerConstructor;
|
|
46
|
+
export default function readdirp(root: string, options?: ScanOptions): DirectoryScanner;
|
|
47
|
+
export declare function readdirpPromise(root: string, options?: ScanOptions): Promise<ScanEntry[]>;
|
|
48
|
+
export { readdirp, DirectoryScanner };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EventEmitter } from "./events";
|
|
2
|
+
export declare function getActiveInterfaceCount(): number;
|
|
3
|
+
export declare function setActiveInterfaceCount(n: number): void;
|
|
4
|
+
export declare function resetActiveInterfaceCount(): void;
|
|
5
|
+
export interface InterfaceConfig {
|
|
6
|
+
input?: unknown;
|
|
7
|
+
output?: unknown;
|
|
8
|
+
terminal?: boolean;
|
|
9
|
+
prompt?: string;
|
|
10
|
+
historySize?: number;
|
|
11
|
+
completer?: (line: string) => [string[], string] | void;
|
|
12
|
+
crlfDelay?: number;
|
|
13
|
+
escapeCodeTimeout?: number;
|
|
14
|
+
tabSize?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function emitKeypressEvents(stream: unknown, _iface?: Interface): void;
|
|
17
|
+
export interface Interface extends EventEmitter {
|
|
18
|
+
_promptStr: string;
|
|
19
|
+
_input: unknown;
|
|
20
|
+
_output: unknown;
|
|
21
|
+
_closed: boolean;
|
|
22
|
+
_lineBuffer: string;
|
|
23
|
+
_pendingQuestions: Array<{
|
|
24
|
+
query: string;
|
|
25
|
+
handler: (answer: string) => void;
|
|
26
|
+
}>;
|
|
27
|
+
terminal: boolean;
|
|
28
|
+
line: string;
|
|
29
|
+
cursor: number;
|
|
30
|
+
_refreshLine(): void;
|
|
31
|
+
_onKeypress(char: string | undefined, key: any): void;
|
|
32
|
+
_onData(text: string): void;
|
|
33
|
+
prompt(preserveCursor?: boolean): void;
|
|
34
|
+
setPrompt(text: string): void;
|
|
35
|
+
getPrompt(): string;
|
|
36
|
+
question(query: string, optsOrHandler?: unknown, handler?: (answer: string) => void): void;
|
|
37
|
+
pause(): this;
|
|
38
|
+
resume(): this;
|
|
39
|
+
close(): void;
|
|
40
|
+
write(data: string | null, _key?: {
|
|
41
|
+
ctrl?: boolean;
|
|
42
|
+
name?: string;
|
|
43
|
+
meta?: boolean;
|
|
44
|
+
shift?: boolean;
|
|
45
|
+
sequence?: string;
|
|
46
|
+
}): void;
|
|
47
|
+
getCursorPos(): {
|
|
48
|
+
rows: number;
|
|
49
|
+
cols: number;
|
|
50
|
+
};
|
|
51
|
+
[Symbol.asyncIterator](): AsyncGenerator<string, void, undefined>;
|
|
52
|
+
}
|
|
53
|
+
interface InterfaceConstructor {
|
|
54
|
+
new (cfg?: InterfaceConfig): Interface;
|
|
55
|
+
(this: any, cfg?: InterfaceConfig): void;
|
|
56
|
+
prototype: any;
|
|
57
|
+
}
|
|
58
|
+
export declare const Interface: InterfaceConstructor;
|
|
59
|
+
export declare function createInterface(cfgOrInput?: InterfaceConfig | unknown, output?: unknown): Interface;
|
|
60
|
+
export declare function clearLine(stream: unknown, dir: number, done?: () => void): boolean;
|
|
61
|
+
export declare function clearScreenDown(stream: unknown, done?: () => void): boolean;
|
|
62
|
+
export declare function cursorTo(stream: unknown, x: number, yOrDone?: number | (() => void), done?: () => void): boolean;
|
|
63
|
+
export declare function moveCursor(stream: unknown, dx: number, dy: number, done?: () => void): boolean;
|
|
64
|
+
export declare const promises: {
|
|
65
|
+
createInterface(cfg?: InterfaceConfig): {
|
|
66
|
+
question(query: string): Promise<string>;
|
|
67
|
+
close(): void;
|
|
68
|
+
[Symbol.asyncIterator](): AsyncGenerator<string, void, undefined>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
declare const _default: {
|
|
72
|
+
Interface: InterfaceConstructor;
|
|
73
|
+
createInterface: typeof createInterface;
|
|
74
|
+
clearLine: typeof clearLine;
|
|
75
|
+
clearScreenDown: typeof clearScreenDown;
|
|
76
|
+
cursorTo: typeof cursorTo;
|
|
77
|
+
moveCursor: typeof moveCursor;
|
|
78
|
+
emitKeypressEvents: typeof emitKeypressEvents;
|
|
79
|
+
promises: {
|
|
80
|
+
createInterface(cfg?: InterfaceConfig): {
|
|
81
|
+
question(query: string): Promise<string>;
|
|
82
|
+
close(): void;
|
|
83
|
+
[Symbol.asyncIterator](): AsyncGenerator<string, void, undefined>;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EventEmitter } from "./events";
|
|
2
|
+
export declare const REPL_MODE_SLOPPY: unique symbol;
|
|
3
|
+
export declare const REPL_MODE_STRICT: unique symbol;
|
|
4
|
+
export interface Recoverable extends SyntaxError {
|
|
5
|
+
err: Error;
|
|
6
|
+
}
|
|
7
|
+
interface RecoverableConstructor {
|
|
8
|
+
new (err: Error): Recoverable;
|
|
9
|
+
(this: any, err: Error): void;
|
|
10
|
+
prototype: any;
|
|
11
|
+
}
|
|
12
|
+
export declare const Recoverable: RecoverableConstructor;
|
|
13
|
+
export interface REPLServer extends EventEmitter {
|
|
14
|
+
context: Record<string, unknown>;
|
|
15
|
+
terminal: boolean;
|
|
16
|
+
_prompt: string;
|
|
17
|
+
_commands: Map<string, {
|
|
18
|
+
help: string;
|
|
19
|
+
action: Function;
|
|
20
|
+
}>;
|
|
21
|
+
setPrompt(prompt: string): void;
|
|
22
|
+
getPrompt(): string;
|
|
23
|
+
displayPrompt(_preserveCursor?: boolean): void;
|
|
24
|
+
defineCommand(keyword: string, cmd: {
|
|
25
|
+
help?: string;
|
|
26
|
+
action: Function;
|
|
27
|
+
} | Function): void;
|
|
28
|
+
close(): void;
|
|
29
|
+
setupHistory(_historyPath: string, cb: (err: Error | null, repl: REPLServer) => void): void;
|
|
30
|
+
}
|
|
31
|
+
interface REPLServerConstructor {
|
|
32
|
+
new (options?: string | Record<string, unknown>): REPLServer;
|
|
33
|
+
(this: any, options?: string | Record<string, unknown>): void;
|
|
34
|
+
prototype: any;
|
|
35
|
+
}
|
|
36
|
+
export declare const REPLServer: REPLServerConstructor;
|
|
37
|
+
export declare function start(options?: string | Record<string, unknown>): REPLServer;
|
|
38
|
+
declare const _default: {
|
|
39
|
+
start: typeof start;
|
|
40
|
+
REPLServer: REPLServerConstructor;
|
|
41
|
+
Recoverable: RecoverableConstructor;
|
|
42
|
+
REPL_MODE_SLOPPY: symbol;
|
|
43
|
+
REPL_MODE_STRICT: symbol;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare function ensureRollup(): Promise<unknown>;
|
|
2
|
+
export declare const VERSION: string;
|
|
3
|
+
export declare function rollup(inputOptions: unknown): Promise<unknown>;
|
|
4
|
+
export declare function watch(watchOptions: unknown): Promise<unknown>;
|
|
5
|
+
export declare function defineConfig<T>(config: T): T;
|
|
6
|
+
export declare function parseAst(source: string, opts?: {
|
|
7
|
+
allowReturnOutsideFunction?: boolean;
|
|
8
|
+
jsx?: boolean;
|
|
9
|
+
}): unknown;
|
|
10
|
+
export declare function parseAstAsync(source: string, opts?: {
|
|
11
|
+
allowReturnOutsideFunction?: boolean;
|
|
12
|
+
jsx?: boolean;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}): Promise<unknown>;
|
|
15
|
+
export declare function getPackageBase(): string;
|
|
16
|
+
export { ensureRollup as loadRollup };
|
|
17
|
+
export interface Plugin {
|
|
18
|
+
name: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface PluginContext {
|
|
22
|
+
meta: {
|
|
23
|
+
rollupVersion: string;
|
|
24
|
+
};
|
|
25
|
+
parse: (code: string) => unknown;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: {
|
|
29
|
+
VERSION: string;
|
|
30
|
+
rollup: typeof rollup;
|
|
31
|
+
watch: typeof watch;
|
|
32
|
+
defineConfig: typeof defineConfig;
|
|
33
|
+
parseAst: typeof parseAst;
|
|
34
|
+
parseAstAsync: typeof parseAstAsync;
|
|
35
|
+
loadRollup: typeof ensureRollup;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function isSea(): boolean;
|
|
2
|
+
export declare function getAsset(_key: string): never;
|
|
3
|
+
export declare function getAssetAsBlob(_key: string): never;
|
|
4
|
+
export declare function getRawAsset(_key: string): never;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
isSea: typeof isSea;
|
|
7
|
+
getAsset: typeof getAsset;
|
|
8
|
+
getAssetAsBlob: typeof getAssetAsBlob;
|
|
9
|
+
getRawAsset: typeof getRawAsset;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface StatementSync {
|
|
2
|
+
run(..._params: unknown[]): object;
|
|
3
|
+
get(..._params: unknown[]): unknown;
|
|
4
|
+
all(..._params: unknown[]): unknown[];
|
|
5
|
+
expandedSQL(): string;
|
|
6
|
+
sourceSQL(): string;
|
|
7
|
+
}
|
|
8
|
+
interface StatementSyncConstructor {
|
|
9
|
+
new (): StatementSync;
|
|
10
|
+
(this: any): void;
|
|
11
|
+
prototype: any;
|
|
12
|
+
}
|
|
13
|
+
export declare const StatementSync: StatementSyncConstructor;
|
|
14
|
+
export interface DatabaseSync {
|
|
15
|
+
close(): void;
|
|
16
|
+
exec(_sql: string): void;
|
|
17
|
+
prepare(_sql: string): StatementSync;
|
|
18
|
+
open(): void;
|
|
19
|
+
}
|
|
20
|
+
interface DatabaseSyncConstructor {
|
|
21
|
+
new (_location: string, _options?: object): DatabaseSync;
|
|
22
|
+
(this: any, _location: string, _options?: object): void;
|
|
23
|
+
prototype: any;
|
|
24
|
+
}
|
|
25
|
+
export declare const DatabaseSync: DatabaseSyncConstructor;
|
|
26
|
+
declare const _default: {
|
|
27
|
+
DatabaseSync: DatabaseSyncConstructor;
|
|
28
|
+
StatementSync: StatementSyncConstructor;
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|