UNPKG

653 BTypeScriptView Raw
1/// <reference types="node" />
2import { ChildProcess } from 'child_process';
3export interface CommandOptions {
4 args: string[];
5 cwd?: string;
6 exe: string;
7 shell?: string;
8}
9export interface CommandResult {
10 args: string[];
11 code: number;
12 exe: string;
13 messages: string;
14 reason?: string;
15}
16export declare class Command {
17 private readonly log;
18 private readonly options;
19 protected constructor(options: Partial<CommandOptions>);
20 static from(options: Partial<CommandOptions>): Command;
21 exec(collectResult?: boolean): Promise<CommandResult>;
22 spawn(): Promise<ChildProcess>;
23 private createCommand;
24}