@znode/execa
Version:
Node.js Exec Sub Shell
35 lines (34 loc) • 2.13 kB
TypeScript
import * as chalk from 'chalk';
export declare const color: chalk.Chalk & chalk.ChalkFunction & {
supportsColor: false | chalk.ColorSupport;
Level: chalk.Level;
Color: ("black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright") | ("bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright");
ForegroundColor: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
BackgroundColor: "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright";
Modifiers: "reset" | "bold" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible";
stderr: chalk.Chalk & {
supportsColor: false | chalk.ColorSupport;
};
};
export declare function colorize(cmd: string): string;
export declare function substitute(arg: ProcessOutput | string): string;
export declare class ProcessOutput {
code: number;
stdout: string;
stderr: string;
combined: string;
__from: string;
constructor({ code, stdout, stderr, combined, __from }: {
code: any;
stdout: any;
stderr: any;
combined: any;
__from: any;
});
toString(): string;
}
export declare function quote(arg: string): string;
export interface CreateGetCommandOptions {
strict?: boolean;
}
export declare function createGetCommand(option?: CreateGetCommandOptions): (pieces: string[] | TemplateStringsArray, ...args: any[]) => string;