Skip to content

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:43

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>>;

platform

Platform identifier (e.g. 'linux', 'darwin', 'win32').

ts
platform: string;

stderr

Standard error stream with write.

ts
stderr: { write(data: string): unknown; };

stdin

Standard input stream with TTY detection and async iteration.

ts
stdin: { isTTY?: boolean; [asyncIterator](): AsyncIterator<Uint8Array<ArrayBufferLike>>; };

stdout

Standard output stream with TTY detection and write.

ts
stdout: { columns?: number; isTTY?: boolean; rows?: number; getWindowSize(): readonly [number, number]; off(event: "resize", listener: { (): void; }): unknown; on(event: "resize", listener: { (): void; }): unknown; removeListener(event: "resize", listener: { (): void; }): unknown; write(data: string): unknown; };

versions

Runtime version strings — used for version-guard checks.

ts
versions?: { bun?: string; node?: string; };

Methods

cwd

ts
cwd(): string;

exit

ts
exit(code: number): never;

See Also

Released under the MIT License.