@flowscripter/dynamic-cli-framework-api
    Preparing search index...

    Interface PrinterService

    Service allowing a Command to output user messages to stdout and/or stderr.

    Output to stdout is via print whilst output to stderr is via a filtered logging mechanism using debug, info, warn and error.

    interface PrinterService {
        colorEnabled: boolean;
        darkMode: boolean;
        hyperlinksEnabled: boolean;
        stderrWritable: WritableStream;
        stdoutWritable: WritableStream;
        backgroundBlue(message: string): string;
        backgroundColor(message: string, hexFormattedColor: string): string;
        backgroundCyan(message: string): string;
        backgroundEmphasised(message: string): string;
        backgroundGreen(message: string): string;
        backgroundMagenta(message: string): string;
        backgroundOrange(message: string): string;
        backgroundPrimary(message: string): string;
        backgroundRed(message: string): string;
        backgroundSecondary(message: string): string;
        backgroundSelected(message: string): string;
        backgroundViolet(message: string): string;
        backgroundYellow(message: string): string;
        blue(message: string): string;
        clearMarked(minimumDisplayTimeMs?: number): Promise<void>;
        color(message: string, hexFormattedColor: string): string;
        cyan(message: string): string;
        debug(message: string, icon?: Icon): Promise<void>;
        discardMark(): void;
        emphasised(message: string): string;
        endMark(): void;
        endQuote(): void;
        error(message: string, icon?: Icon): Promise<void>;
        getLevel(): Level;
        green(message: string): string;
        hideAllProgressBars(): Promise<void>;
        hideProgressBar(handle: number): Promise<void>;
        hideSpinner(): Promise<void>;
        hyperlink(text: string, url: string): string;
        info(message: string, icon?: Icon): Promise<void>;
        italic(message: string): string;
        magenta(message: string): string;
        orange(message: string): string;
        primary(message: string): string;
        print(message: string, icon?: Icon): Promise<void>;
        red(message: string): string;
        secondary(message: string): string;
        selected(message: string): string;
        setLevel(level: Level): void;
        showProgressBar(options?: ProgressBarOptions): Promise<number>;
        showSpinner(message: string, style?: SpinnerStyle): Promise<void>;
        startMark(): void;
        startQuote(hexFormattedColor?: string): void;
        stderrColumns(): number;
        stdoutColumns(): number;
        updateProgressBar(handle: number, current: number, message?: string): void;
        violet(message: string): string;
        warn(message: string, icon?: Icon): Promise<void>;
        yellow(message: string): string;
    }
    Index
    colorEnabled: boolean

    Disable or enable color output for messages.

    darkMode: boolean

    Enable or disable dark mode. Default is disabled i.e. false.

    hyperlinksEnabled: boolean

    Disable or enable hyperlink output for messages.

    stderrWritable: WritableStream

    The WritableStream used for stderr. Can be accessed directly for output of binary data etc.

    stdoutWritable: WritableStream

    The WritableStream used for stdout. Can be accessed directly for output of binary data etc.

    • Update a specific progress bar.

      Parameters

      • handle: number

        the handle referring to the progress bar to be updated.

      • current: number

        the current value to set on the progress bar.

      • Optionalmessage: string

        an optional message to set on the progress bar, if not specified the initially specified message will be displayed.

      Returns void