NodeProcess
Minimal subset of the Node.js process object needed by the adapter.
We avoid importing @types/node to keep the core runtime-agnostic at the type level. This interface declares only what createNodeAdapter actually reads from the global.
- Import:
@kjanat/dreamcli/runtime - Export kind: interface
- Declared in:
src/runtime/node.ts - Source link:
src/runtime/node.ts:44
Signatures
ts
interface NodeProcess {}Members
Properties
argv
Raw process arguments ([binary, script, ...userArgs]).
ts
argv: readonly string[];env
Environment variables (values are undefined for unset keys).
ts
env: Readonly<Record<string, string | undefined>>;versions
Runtime version strings — used for version-guard checks.
ts
versions?: { node?: string; bun?: string; };platform
Platform identifier (e.g. 'linux', 'darwin', 'win32').
ts
platform: string;stdin
Standard input stream with TTY detection and async iteration.
ts
stdin: { isTTY?: boolean; isRaw?: boolean; setRawMode(mode: boolean): unknown; "[Symbol.asyncIterator]"(): AsyncIterator<Uint8Array>; };stdout
Standard output stream with TTY detection and write.
ts
stdout: { isTTY?: boolean; columns?: number; rows?: number; getWindowSize(): readonly [number, number]; on(event: "resize", listener: { (): void; }): unknown;
on(event: "error", listener: { (error: Error): void; }): unknown; off(event: "resize", listener: { (): void; }): unknown; removeListener(event: "resize", listener: { (): void; }): unknown; write(data: string, callback?: { (error?: Error | null): void; }): unknown; };stderr
Standard error stream with write.
ts
stderr: { on(event: "error", listener: { (error: Error): void; }): unknown; write(data: string, callback?: { (error?: Error | null): void; }): unknown; };Methods
cwd
Return the current working directory.
ts
cwd(): string;exit
Terminate the process with the given exit code.
ts
exit(code: number): never;