@scelar/nodepod 1.0.5 → 1.0.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.
@@ -1,44 +1,44 @@
1
- import { MemoryVolume } from "../memory-volume";
2
- import { RegistryConfig } from "./registry-client";
3
- import { ResolvedDependency } from "./version-resolver";
4
- import type { IDBSnapshotCache } from "../persistence/idb-cache";
5
- export interface InstallFlags {
6
- registry?: string;
7
- persist?: boolean;
8
- persistDev?: boolean;
9
- withDevDeps?: boolean;
10
- withOptionalDeps?: boolean;
11
- onProgress?: (message: string) => void;
12
- transformModules?: boolean;
13
- }
14
- export interface InstallOutcome {
15
- resolved: Map<string, ResolvedDependency>;
16
- newPackages: string[];
17
- }
18
- declare function splitSpecifier(spec: string): {
19
- name: string;
20
- version?: string;
21
- };
22
- export declare class DependencyInstaller {
23
- private vol;
24
- private registryClient;
25
- private workingDir;
26
- private _snapshotCache;
27
- constructor(vol: MemoryVolume, opts?: {
28
- cwd?: string;
29
- snapshotCache?: IDBSnapshotCache | null;
30
- } & RegistryConfig);
31
- install(packageName: string, version?: string, flags?: InstallFlags): Promise<InstallOutcome>;
32
- installFromManifest(manifestPath?: string, flags?: InstallFlags): Promise<InstallOutcome>;
33
- listInstalled(): Record<string, string>;
34
- private materializePackages;
35
- private createBinStubs;
36
- private writeLockFile;
37
- private patchManifest;
38
- }
39
- export declare function install(specifier: string, vol: MemoryVolume, flags?: InstallFlags): Promise<InstallOutcome>;
40
- export { RegistryClient } from "./registry-client";
41
- export type { RegistryConfig, VersionDetail, PackageMetadata, } from "./registry-client";
42
- export type { ResolvedDependency, ResolutionConfig } from "./version-resolver";
43
- export type { ExtractionOptions } from "./archive-extractor";
44
- export { splitSpecifier };
1
+ import { MemoryVolume } from "../memory-volume";
2
+ import { RegistryConfig } from "./registry-client";
3
+ import { ResolvedDependency } from "./version-resolver";
4
+ import type { IDBSnapshotCache } from "../persistence/idb-cache";
5
+ export interface InstallFlags {
6
+ registry?: string;
7
+ persist?: boolean;
8
+ persistDev?: boolean;
9
+ withDevDeps?: boolean;
10
+ withOptionalDeps?: boolean;
11
+ onProgress?: (message: string) => void;
12
+ transformModules?: boolean;
13
+ }
14
+ export interface InstallOutcome {
15
+ resolved: Map<string, ResolvedDependency>;
16
+ newPackages: string[];
17
+ }
18
+ declare function splitSpecifier(spec: string): {
19
+ name: string;
20
+ version?: string;
21
+ };
22
+ export declare class DependencyInstaller {
23
+ private vol;
24
+ private registryClient;
25
+ private workingDir;
26
+ private _snapshotCache;
27
+ constructor(vol: MemoryVolume, opts?: {
28
+ cwd?: string;
29
+ snapshotCache?: IDBSnapshotCache | null;
30
+ } & RegistryConfig);
31
+ install(packageName: string, version?: string, flags?: InstallFlags): Promise<InstallOutcome>;
32
+ installFromManifest(manifestPath?: string, flags?: InstallFlags): Promise<InstallOutcome>;
33
+ listInstalled(): Record<string, string>;
34
+ private materializePackages;
35
+ private createBinStubs;
36
+ private writeLockFile;
37
+ private patchManifest;
38
+ }
39
+ export declare function install(specifier: string, vol: MemoryVolume, flags?: InstallFlags): Promise<InstallOutcome>;
40
+ export { RegistryClient } from "./registry-client";
41
+ export type { RegistryConfig, VersionDetail, PackageMetadata, } from "./registry-client";
42
+ export type { ResolvedDependency, ResolutionConfig } from "./version-resolver";
43
+ export type { ExtractionOptions } from "./archive-extractor";
44
+ export { splitSpecifier };
@@ -1,7 +1,7 @@
1
- import type { VolumeSnapshot } from '../engine-types';
2
- export interface IDBSnapshotCache {
3
- get(packageJsonHash: string): Promise<VolumeSnapshot | null>;
4
- set(packageJsonHash: string, snapshot: VolumeSnapshot): Promise<void>;
5
- close(): void;
6
- }
7
- export declare function openSnapshotCache(): Promise<IDBSnapshotCache | null>;
1
+ import type { VolumeSnapshot } from '../engine-types';
2
+ export interface IDBSnapshotCache {
3
+ get(packageJsonHash: string): Promise<VolumeSnapshot | null>;
4
+ set(packageJsonHash: string, snapshot: VolumeSnapshot): Promise<void>;
5
+ close(): void;
6
+ }
7
+ export declare function openSnapshotCache(): Promise<IDBSnapshotCache | null>;
@@ -1,87 +1,108 @@
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;
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
+ history?: string[];
12
+ removeHistoryDuplicates?: boolean;
13
+ completer?: (line: string) => [string[], string] | void;
14
+ crlfDelay?: number;
15
+ escapeCodeTimeout?: number;
16
+ tabSize?: number;
17
+ signal?: AbortSignal;
18
+ }
19
+ export declare function emitKeypressEvents(stream: unknown, _iface?: Interface): void;
20
+ export interface Interface extends EventEmitter {
21
+ _promptStr: string;
22
+ input: unknown;
23
+ output: unknown;
24
+ closed: boolean;
25
+ _lineBuffer: string;
26
+ _pendingQuestions: Array<{
27
+ query: string;
28
+ handler: (answer: string) => void;
29
+ signal?: AbortSignal;
30
+ abortListener?: () => void;
31
+ }>;
32
+ terminal: boolean;
33
+ line: string;
34
+ cursor: number;
35
+ history: string[];
36
+ _historyIndex: number;
37
+ _historySize: number;
38
+ _removeHistoryDuplicates: boolean;
39
+ _savedLine: string;
40
+ _killRing: string[];
41
+ _refreshLine(): void;
42
+ _onKeypress(char: string | undefined, key: any): void;
43
+ _onData(text: string): void;
44
+ _addToHistory(line: string): void;
45
+ prompt(preserveCursor?: boolean): void;
46
+ setPrompt(text: string): void;
47
+ getPrompt(): string;
48
+ question(query: string, optsOrHandler?: unknown, handler?: (answer: string) => void): void;
49
+ pause(): this;
50
+ resume(): this;
51
+ close(): void;
52
+ write(data: string | null, _key?: {
53
+ ctrl?: boolean;
54
+ name?: string;
55
+ meta?: boolean;
56
+ shift?: boolean;
57
+ sequence?: string;
58
+ }): void;
59
+ clearLine(dir?: number): void;
60
+ getCursorPos(): {
61
+ rows: number;
62
+ cols: number;
63
+ };
64
+ [Symbol.asyncIterator](): AsyncGenerator<string, void, undefined>;
65
+ }
66
+ interface InterfaceConstructor {
67
+ new (cfg?: InterfaceConfig): Interface;
68
+ (this: any, cfg?: InterfaceConfig): void;
69
+ prototype: any;
70
+ }
71
+ export declare const Interface: InterfaceConstructor;
72
+ export declare function createInterface(cfgOrInput?: InterfaceConfig | unknown, output?: unknown): Interface;
73
+ export declare function clearLine(stream: unknown, dir: number, done?: () => void): boolean;
74
+ export declare function clearScreenDown(stream: unknown, done?: () => void): boolean;
75
+ export declare function cursorTo(stream: unknown, x: number, yOrDone?: number | (() => void), done?: () => void): boolean;
76
+ export declare function moveCursor(stream: unknown, dx: number, dy: number, done?: () => void): boolean;
77
+ declare class ReadlineWriter {
78
+ private _stream;
79
+ private _buffer;
80
+ private _autoCommit;
81
+ constructor(stream: any, opts?: {
82
+ autoCommit?: boolean;
83
+ });
84
+ clearLine(dir: -1 | 0 | 1): this;
85
+ clearScreenDown(): this;
86
+ cursorTo(x: number, y?: number): this;
87
+ moveCursor(dx: number, dy: number): this;
88
+ commit(): Promise<void>;
89
+ rollback(): this;
90
+ }
91
+ export declare const promises: {
92
+ createInterface(cfg?: InterfaceConfig): any;
93
+ Readline: typeof ReadlineWriter;
94
+ };
95
+ declare const _default: {
96
+ Interface: InterfaceConstructor;
97
+ createInterface: typeof createInterface;
98
+ clearLine: typeof clearLine;
99
+ clearScreenDown: typeof clearScreenDown;
100
+ cursorTo: typeof cursorTo;
101
+ moveCursor: typeof moveCursor;
102
+ emitKeypressEvents: typeof emitKeypressEvents;
103
+ promises: {
104
+ createInterface(cfg?: InterfaceConfig): any;
105
+ Readline: typeof ReadlineWriter;
106
+ };
107
+ };
108
+ export default _default;
@@ -1,84 +1,84 @@
1
- import { MemoryVolume } from "./memory-volume";
2
- import type { ExecutionOutcome } from "./engine-types";
3
- import { ProcessObject } from "./polyfills/process";
4
- export declare function setChildProcessPolyfill(mod: any): void;
5
- export interface ModuleRecord {
6
- id: string;
7
- filename: string;
8
- exports: unknown;
9
- loaded: boolean;
10
- children: ModuleRecord[];
11
- paths: string[];
12
- parent: ModuleRecord | null;
13
- }
14
- export interface EngineOptions {
15
- cwd?: string;
16
- env?: Record<string, string>;
17
- onConsole?: (method: string, args: unknown[]) => void;
18
- onStdout?: (data: string) => void;
19
- onStderr?: (data: string) => void;
20
- workerThreadsOverride?: {
21
- isMainThread: boolean;
22
- parentPort: unknown;
23
- workerData: unknown;
24
- threadId: number;
25
- };
26
- handler?: import('./memory-handler').MemoryHandler;
27
- }
28
- export interface ResolverFn {
29
- (id: string): unknown;
30
- resolve: (id: string, options?: {
31
- paths?: string[];
32
- }) => string;
33
- cache: Record<string, ModuleRecord>;
34
- extensions: Record<string, unknown>;
35
- main: ModuleRecord | null;
36
- _ownerRecord?: ModuleRecord;
37
- }
38
- export declare class ScriptEngine {
39
- private vol;
40
- private fsBridge;
41
- private proc;
42
- private moduleRegistry;
43
- private opts;
44
- private transformCache;
45
- constructor(vol: MemoryVolume, opts?: EngineOptions);
46
- private patchTextDecoder;
47
- private patchStackTraceApi;
48
- execute(code: string, filename?: string): {
49
- exports: unknown;
50
- module: ModuleRecord;
51
- };
52
- executeSync: (code: string, filename?: string) => {
53
- exports: unknown;
54
- module: ModuleRecord;
55
- };
56
- executeAsync(code: string, filename?: string): Promise<ExecutionOutcome>;
57
- runFile(filename: string): {
58
- exports: unknown;
59
- module: ModuleRecord;
60
- };
61
- runFileSync: (filename: string) => {
62
- exports: unknown;
63
- module: ModuleRecord;
64
- };
65
- runFileTLA(filename: string): Promise<{
66
- exports: unknown;
67
- module: ModuleRecord;
68
- }>;
69
- runFileAsync(filename: string): Promise<ExecutionOutcome>;
70
- clearCache(): void;
71
- /** Evict one node_modules entry when module cache exceeds soft limit. */
72
- private _trimModuleCache;
73
- getVolume(): MemoryVolume;
74
- getProcess(): ProcessObject;
75
- createREPL(): {
76
- eval: (code: string) => unknown;
77
- };
78
- }
79
- export declare function executeCode(code: string, vol: MemoryVolume, opts?: EngineOptions): {
80
- exports: unknown;
81
- module: ModuleRecord;
82
- };
83
- export type { IScriptEngine, ExecutionOutcome, EngineConfig, } from "./engine-types";
84
- export default ScriptEngine;
1
+ import { MemoryVolume } from "./memory-volume";
2
+ import type { ExecutionOutcome } from "./engine-types";
3
+ import { ProcessObject } from "./polyfills/process";
4
+ export declare function setChildProcessPolyfill(mod: any): void;
5
+ export interface ModuleRecord {
6
+ id: string;
7
+ filename: string;
8
+ exports: unknown;
9
+ loaded: boolean;
10
+ children: ModuleRecord[];
11
+ paths: string[];
12
+ parent: ModuleRecord | null;
13
+ }
14
+ export interface EngineOptions {
15
+ cwd?: string;
16
+ env?: Record<string, string>;
17
+ onConsole?: (method: string, args: unknown[]) => void;
18
+ onStdout?: (data: string) => void;
19
+ onStderr?: (data: string) => void;
20
+ workerThreadsOverride?: {
21
+ isMainThread: boolean;
22
+ parentPort: unknown;
23
+ workerData: unknown;
24
+ threadId: number;
25
+ };
26
+ handler?: import('./memory-handler').MemoryHandler;
27
+ }
28
+ export interface ResolverFn {
29
+ (id: string): unknown;
30
+ resolve: (id: string, options?: {
31
+ paths?: string[];
32
+ }) => string;
33
+ cache: Record<string, ModuleRecord>;
34
+ extensions: Record<string, unknown>;
35
+ main: ModuleRecord | null;
36
+ _ownerRecord?: ModuleRecord;
37
+ }
38
+ export declare class ScriptEngine {
39
+ private vol;
40
+ private fsBridge;
41
+ private proc;
42
+ private moduleRegistry;
43
+ private opts;
44
+ private transformCache;
45
+ constructor(vol: MemoryVolume, opts?: EngineOptions);
46
+ private patchTextDecoder;
47
+ private patchStackTraceApi;
48
+ execute(code: string, filename?: string): {
49
+ exports: unknown;
50
+ module: ModuleRecord;
51
+ };
52
+ executeSync: (code: string, filename?: string) => {
53
+ exports: unknown;
54
+ module: ModuleRecord;
55
+ };
56
+ executeAsync(code: string, filename?: string): Promise<ExecutionOutcome>;
57
+ runFile(filename: string): {
58
+ exports: unknown;
59
+ module: ModuleRecord;
60
+ };
61
+ runFileSync: (filename: string) => {
62
+ exports: unknown;
63
+ module: ModuleRecord;
64
+ };
65
+ runFileTLA(filename: string): Promise<{
66
+ exports: unknown;
67
+ module: ModuleRecord;
68
+ }>;
69
+ runFileAsync(filename: string): Promise<ExecutionOutcome>;
70
+ clearCache(): void;
71
+ /** Evict one node_modules entry when module cache exceeds soft limit. */
72
+ private _trimModuleCache;
73
+ getVolume(): MemoryVolume;
74
+ getProcess(): ProcessObject;
75
+ createREPL(): {
76
+ eval: (code: string) => unknown;
77
+ };
78
+ }
79
+ export declare function executeCode(code: string, vol: MemoryVolume, opts?: EngineOptions): {
80
+ exports: unknown;
81
+ module: ModuleRecord;
82
+ };
83
+ export type { IScriptEngine, ExecutionOutcome, EngineConfig, } from "./engine-types";
84
+ export default ScriptEngine;
@@ -1,29 +1,29 @@
1
- import { EventEmitter } from "../polyfills/events";
2
- export declare class NodepodProcess extends EventEmitter {
3
- private _abortController;
4
- private _resolve;
5
- private _stdout;
6
- private _stderr;
7
- private _exitCode;
8
- private _sendStdinFn;
9
- private _killFn;
10
- private _maxOutputBytes;
11
- readonly completion: Promise<{
12
- stdout: string;
13
- stderr: string;
14
- exitCode: number;
15
- }>;
16
- constructor(maxOutputBytes?: number);
17
- _setSendStdin(fn: (data: string) => void): void;
18
- _setKillFn(fn: () => void): void;
19
- _pushStdout(chunk: string): void;
20
- _pushStderr(chunk: string): void;
21
- _finish(exitCode: number): void;
22
- get signal(): AbortSignal;
23
- get exited(): boolean;
24
- write(data: string): void;
25
- kill(): void;
26
- on(event: "output", handler: (chunk: string) => void): this;
27
- on(event: "error", handler: (chunk: string) => void): this;
28
- on(event: "exit", handler: (code: number) => void): this;
29
- }
1
+ import { EventEmitter } from "../polyfills/events";
2
+ export declare class NodepodProcess extends EventEmitter {
3
+ private _abortController;
4
+ private _resolve;
5
+ private _stdout;
6
+ private _stderr;
7
+ private _exitCode;
8
+ private _sendStdinFn;
9
+ private _killFn;
10
+ private _maxOutputBytes;
11
+ readonly completion: Promise<{
12
+ stdout: string;
13
+ stderr: string;
14
+ exitCode: number;
15
+ }>;
16
+ constructor(maxOutputBytes?: number);
17
+ _setSendStdin(fn: (data: string) => void): void;
18
+ _setKillFn(fn: () => void): void;
19
+ _pushStdout(chunk: string): void;
20
+ _pushStderr(chunk: string): void;
21
+ _finish(exitCode: number): void;
22
+ get signal(): AbortSignal;
23
+ get exited(): boolean;
24
+ write(data: string): void;
25
+ kill(): void;
26
+ on(event: "output", handler: (chunk: string) => void): this;
27
+ on(event: "error", handler: (chunk: string) => void): this;
28
+ on(event: "exit", handler: (code: number) => void): this;
29
+ }
@@ -1,59 +1,59 @@
1
- import { MemoryVolume } from "../memory-volume";
2
- import { ScriptEngine } from "../script-engine";
3
- import { DependencyInstaller } from "../packages/installer";
4
- import { RequestProxy } from "../request-proxy";
5
- import type { NodepodOptions, TerminalOptions, Snapshot, SnapshotOptions, SpawnOptions } from "./types";
6
- import { NodepodFS } from "./nodepod-fs";
7
- import { NodepodProcess } from "./nodepod-process";
8
- import { NodepodTerminal } from "./nodepod-terminal";
9
- import { ProcessManager } from "../threading/process-manager";
10
- export declare class Nodepod {
11
- readonly fs: NodepodFS;
12
- private _volume;
13
- private _engine;
14
- private _packages;
15
- private _proxy;
16
- private _cwd;
17
- private _processManager;
18
- private _vfsBridge;
19
- private _sharedVFS;
20
- private _syncChannel;
21
- private _unwatchVFS;
22
- private _handler;
23
- private constructor();
24
- static boot(opts?: NodepodOptions): Promise<Nodepod>;
25
- spawn(cmd: string, args?: string[], opts?: SpawnOptions): Promise<NodepodProcess>;
26
- private _resolveCommand;
27
- createTerminal(opts: TerminalOptions): NodepodTerminal;
28
- setPreviewScript(script: string): Promise<void>;
29
- clearPreviewScript(): Promise<void>;
30
- port(num: number): string | null;
31
- /** Directory names excluded from snapshots at any depth when shallow=true. */
32
- private static readonly SHALLOW_EXCLUDE_DIRS;
33
- snapshot(opts?: SnapshotOptions): Snapshot;
34
- restore(snapshot: Snapshot, opts?: SnapshotOptions): Promise<void>;
35
- teardown(): void;
36
- memoryStats(): {
37
- vfs: {
38
- fileCount: number;
39
- totalBytes: number;
40
- dirCount: number;
41
- watcherCount: number;
42
- };
43
- engine: {
44
- moduleCacheSize: number;
45
- transformCacheSize: number;
46
- };
47
- heap: {
48
- usedMB: number;
49
- totalMB: number;
50
- limitMB: number;
51
- } | null;
52
- };
53
- get volume(): MemoryVolume;
54
- get engine(): ScriptEngine;
55
- get packages(): DependencyInstaller;
56
- get proxy(): RequestProxy;
57
- get processManager(): ProcessManager;
58
- get cwd(): string;
59
- }
1
+ import { MemoryVolume } from "../memory-volume";
2
+ import { ScriptEngine } from "../script-engine";
3
+ import { DependencyInstaller } from "../packages/installer";
4
+ import { RequestProxy } from "../request-proxy";
5
+ import type { NodepodOptions, TerminalOptions, Snapshot, SnapshotOptions, SpawnOptions } from "./types";
6
+ import { NodepodFS } from "./nodepod-fs";
7
+ import { NodepodProcess } from "./nodepod-process";
8
+ import { NodepodTerminal } from "./nodepod-terminal";
9
+ import { ProcessManager } from "../threading/process-manager";
10
+ export declare class Nodepod {
11
+ readonly fs: NodepodFS;
12
+ private _volume;
13
+ private _engine;
14
+ private _packages;
15
+ private _proxy;
16
+ private _cwd;
17
+ private _processManager;
18
+ private _vfsBridge;
19
+ private _sharedVFS;
20
+ private _syncChannel;
21
+ private _unwatchVFS;
22
+ private _handler;
23
+ private constructor();
24
+ static boot(opts?: NodepodOptions): Promise<Nodepod>;
25
+ spawn(cmd: string, args?: string[], opts?: SpawnOptions): Promise<NodepodProcess>;
26
+ private _resolveCommand;
27
+ createTerminal(opts: TerminalOptions): NodepodTerminal;
28
+ setPreviewScript(script: string): Promise<void>;
29
+ clearPreviewScript(): Promise<void>;
30
+ port(num: number): string | null;
31
+ /** Directory names excluded from snapshots at any depth when shallow=true. */
32
+ private static readonly SHALLOW_EXCLUDE_DIRS;
33
+ snapshot(opts?: SnapshotOptions): Snapshot;
34
+ restore(snapshot: Snapshot, opts?: SnapshotOptions): Promise<void>;
35
+ teardown(): void;
36
+ memoryStats(): {
37
+ vfs: {
38
+ fileCount: number;
39
+ totalBytes: number;
40
+ dirCount: number;
41
+ watcherCount: number;
42
+ };
43
+ engine: {
44
+ moduleCacheSize: number;
45
+ transformCacheSize: number;
46
+ };
47
+ heap: {
48
+ usedMB: number;
49
+ totalMB: number;
50
+ limitMB: number;
51
+ } | null;
52
+ };
53
+ get volume(): MemoryVolume;
54
+ get engine(): ScriptEngine;
55
+ get packages(): DependencyInstaller;
56
+ get proxy(): RequestProxy;
57
+ get processManager(): ProcessManager;
58
+ get cwd(): string;
59
+ }