@znode/execa
Version:
Node.js Exec Sub Shell
23 lines (22 loc) • 798 B
TypeScript
import { Event as EventEmitter } from '@zodash/event';
export interface ExecOptions {
windowsHide: boolean;
shell?: string;
cwd?: string;
timeout?: number;
env?: any;
verbose?: boolean;
__from?: string;
}
export declare function exec(cmd: string, options: ExecOptions): Promise<string>;
export declare function cd(path: string): void;
export declare function unsafe(pieces: TemplateStringsArray, ...args: any[]): Promise<string>;
export declare function kill(pid: number): Promise<void>;
export declare function spawn(cmd: string): EventEmitter & {
pid: number;
};
export interface RunShellOptions {
cwd?: string;
env?: Record<string, string | number | boolean>;
}
export declare function runShell(command: string, options?: RunShellOptions): Promise<void>;