Skip to content

egon-orm-workspace / @egon-orm/cli / CliIo

Interface: CliIo ​

Defined in: cli/src/cli.ts:40

What the CLI talks to: its output streams, its environment and its clock. The binary passes the process's; tests pass their own.

Example ​

ts
const io: CliIo = {
  stdout: (text) => process.stdout.write(text),
  stderr: (text) => process.stderr.write(text),
  cwd: process.cwd(),
  env: process.env,
  now: () => new Date(),
};

Properties ​

cwd ​

ts
readonly cwd: string;

Defined in: cli/src/cli.ts:43


env ​

ts
readonly env: Readonly<Record<string, string | undefined>>;

Defined in: cli/src/cli.ts:44


now ​

ts
readonly now: () => Date;

Defined in: cli/src/cli.ts:45

Returns ​

Date


stderr ​

ts
readonly stderr: (text) => void;

Defined in: cli/src/cli.ts:42

Parameters ​

text ​

string

Returns ​

void


stdout ​

ts
readonly stdout: (text) => void;

Defined in: cli/src/cli.ts:41

Parameters ​

text ​

string

Returns ​

void