@nu-art/commando
Version:
22 lines (21 loc) • 713 B
TypeScript
import { ExecOptions } from 'child_process';
import { Logger } from '@nu-art/ts-common';
export type CliOptions = ExecOptions & {
encoding: BufferEncoding | string | null;
};
export declare class SimpleShell extends Logger {
private _debug;
private cliOptions;
/**
* Executes the accumulated commands in the command list.
* @returns {Promise<string>} A promise that resolves with the standard output of the executed command.
*/
execute: (command: string) => Promise<{
stdout: string;
stderr: string;
}>;
debug(debug?: boolean): this;
setShell(shell: string): void;
setOptions(options: Partial<CliOptions>): void;
setUID(uid: string): this;
}