CommandExecutor
Constructors
Signature
declare const ExitCode: Constructor<ExitCode>;makeExecutor
Added in v1.0.0
Source
Signature
declare const makeExecutor: (
start: (command: Command) => Effect<Process, PlatformError, Scope>,
) => CommandExecutor;Signature
declare const ProcessId: Constructor<ProcessId>;Models
CommandExecutor interface
Added in v1.0.0
Source
Signature
interface CommandExecutor {
readonly [TypeId]: typeof TypeId;
readonly exitCode: (command: Command) => Effect<ExitCode, PlatformError>;
readonly lines: (command: Command, encoding?: string) => Effect<Array<string>, PlatformError>;
readonly start: (command: Command) => Effect<Process, PlatformError, Scope>;
readonly stream: (command: Command) => Stream<Uint8Array<ArrayBufferLike>, PlatformError>;
readonly streamLines: (command: Command, encoding?: string) => Stream<string, PlatformError>;
readonly string: (command: Command, encoding?: string) => Effect<string, PlatformError>;
}Signature
type ExitCode = Brand.Branded<number, "ExitCode">;Signature
interface Process extends Inspectable {
readonly [ProcessTypeId]: typeof ProcessTypeId;
readonly exitCode: Effect<ExitCode, PlatformError>;
readonly isRunning: Effect<boolean, PlatformError>;
readonly kill: (signal?: Signal) => Effect<void, PlatformError>;
readonly pid: ProcessId;
readonly stderr: Stream<Uint8Array<ArrayBufferLike>, PlatformError>;
readonly stdin: Sink<void, Uint8Array<ArrayBufferLike>, never, PlatformError>;
readonly stdout: Stream<Uint8Array<ArrayBufferLike>, PlatformError>;
}Signature
type ProcessId = Brand.Branded<number, "ProcessId">;Signature
type Signal =
| "SIGABRT"
| "SIGALRM"
| "SIGBUS"
| "SIGCHLD"
| "SIGCONT"
| "SIGFPE"
| "SIGHUP"
| "SIGILL"
| "SIGINT"
| "SIGIO"
| "SIGIOT"
| "SIGKILL"
| "SIGPIPE"
| "SIGPOLL"
| "SIGPROF"
| "SIGPWR"
| "SIGQUIT"
| "SIGSEGV"
| "SIGSTKFLT"
| "SIGSTOP"
| "SIGSYS"
| "SIGTERM"
| "SIGTRAP"
| "SIGTSTP"
| "SIGTTIN"
| "SIGTTOU"
| "SIGUNUSED"
| "SIGURG"
| "SIGUSR1"
| "SIGUSR2"
| "SIGVTALRM"
| "SIGWINCH"
| "SIGXCPU"
| "SIGXFSZ"
| "SIGBREAK"
| "SIGLOST"
| "SIGINFO";Other
Symbols
ProcessTypeId
Added in v1.0.0
Source
Signature
declare const ProcessTypeId: unique symbol;ProcessTypeId type
Added in v1.0.0
Source
Signature
type ProcessTypeId = typeof ProcessTypeId;