< Summary - Envilder CLI

Information
Class: src/envilder/core/domain/ports/IProcessRunner.ts
Assembly: Default
File(s): src/envilder/core/domain/ports/IProcessRunner.ts
Tag: 561_41292037308
Line coverage
N/A
Covered lines: 0
Uncovered lines: 0
Coverable lines: 0
Total lines: 28
Line coverage: N/A
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

src/envilder/core/domain/ports/IProcessRunner.ts

#LineLine coverage
 1/**
 2 * A request to start a child process.
 3 *
 4 * `env` is the complete environment of the child: adapters must pass it
 5 * exclusively and never merge it with the parent environment on their own.
 6 */
 7export type ProcessRequest = {
 8  command: string;
 9  args: string[];
 10  env: Record<string, string>;
 11};
 12
 13/**
 14 * How a child process ended: an exit code, or the signal that killed it.
 15 */
 16export type ProcessExit = {
 17  code: number | null;
 18  signal: NodeJS.Signals | null;
 19};
 20
 21export interface IProcessRunner {
 22  /**
 23   * Starts the command, waits for it to exit and reports how it ended.
 24   * Rejects with `CommandNotFoundError` or `CommandNotExecutableError` when
 25   * the command cannot be started.
 26   */
 27  run(request: ProcessRequest): Promise<ProcessExit>;
 28}

Methods/Properties