create-nx-workspace
Version:
62 lines • 1.98 kB
TypeScript
import * as chalk from 'chalk';
export interface CLIErrorMessageConfig {
title: string;
bodyLines?: string[];
}
export interface CLIWarnMessageConfig {
title: string;
bodyLines?: string[];
}
export interface CLINoteMessageConfig {
title: string;
bodyLines?: string[];
}
export interface CLISuccessMessageConfig {
title: string;
bodyLines?: string[];
}
export declare class CLIOutput {
private real;
private outstream;
constructor(real?: boolean);
/**
* Longer dash character which forms more of a continuous line when place side to side
* with itself, unlike the standard dash character
*/
private get VERTICAL_SEPARATOR();
/**
* Expose some color and other utility functions so that other parts of the codebase that need
* more fine-grained control of message bodies are still using a centralized
* implementation.
*/
colors: {
gray: chalk.Chalk;
green: chalk.Chalk;
red: chalk.Chalk;
cyan: chalk.Chalk;
white: chalk.Chalk;
};
bold: chalk.Chalk;
underline: chalk.Chalk;
dim: chalk.Chalk;
private writeToStdOut;
private writeOutputTitle;
private writeOptionalOutputBody;
private cliName;
setCliName(name: string): void;
applyCLIPrefix(color: string, text: string): string;
addNewline(): void;
addVerticalSeparator(color?: string): void;
addVerticalSeparatorWithoutNewLines(color?: string): void;
error({ title, bodyLines }: CLIErrorMessageConfig): void;
warn({ title, bodyLines }: CLIWarnMessageConfig): void;
note({ title, bodyLines }: CLINoteMessageConfig): void;
success({ title, bodyLines }: CLISuccessMessageConfig): void;
logSingleLine(message: string): void;
log({ title, bodyLines, color }: CLIWarnMessageConfig & {
color?: string;
}): void;
getOutput(): string;
}
export declare const output: CLIOutput;
//# sourceMappingURL=output.d.ts.map