1 |
|
2 | import * as execa from 'execa';
|
3 | import { Writable } from 'stream';
|
4 | export { execa };
|
5 | export declare function exec(command: string, options?: execa.Options): execa.ExecaChildProcess;
|
6 | export declare function exec(commands: string[], options?: execa.Options): Promise<execa.ExecaReturns[]>;
|
7 | export declare const spawn: execa.ExecaStatic;
|
8 | export declare class ShellContext {
|
9 | private _cwd;
|
10 | private _env;
|
11 | logCommand: boolean;
|
12 | sleep: (ms: number) => Promise<void>;
|
13 | redirectLog?: boolean | string | Writable;
|
14 | cwd(cwd?: string): string;
|
15 | cd(path: string): this;
|
16 | exec(command: string, options?: execa.Options): execa.ExecaChildProcess;
|
17 | exec(commands: string[], options?: execa.Options): Promise<execa.ExecaReturns[]>;
|
18 | spawn(file: string, args?: string[], options?: execa.Options): execa.ExecaChildProcess;
|
19 | env(key: string): string | undefined;
|
20 | env(key: string, val: string | undefined): this;
|
21 | private _getRedirectLogFile;
|
22 | }
|
23 | export declare function shell(callback: (ctx: ShellContext) => Promise<any>): Promise<any>;
|