UNPKG

turbodepot-node

Version:

General purpose multi storage library (ORM, Logs, Users, Files, Objects)

89 lines (88 loc) 3.26 kB
/** * TurboDepot is a general purpose multi storage library (ORM, Logs, Users, Files, Objects) * * Website : -> https://turboframework.org/en/libs/turbodepot * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License. * License Url : -> http://www.apache.org/licenses/LICENSE-2.0 * CopyRight : -> Copyright 2019 Edertone Advanded Solutions (08211 Castellar del Vallès, Barcelona). http://www.edertone.com */ /** * ConsoleManager class * * @see constructor() */ export declare class ConsoleManager { /** * Defines the color to be used on the title styled console texts */ colorTitle: string; /** * Defines the color to be used on the success styled console texts */ colorSuccess: string; /** * Defines the color to be used on the warning styled console texts */ colorWarning: string; /** * Defines the color to be used on the error styled console texts */ colorError: string; /** * An improved console class that implements useful methods for the console output * * @return A ConsoleManager instance */ constructor(); /** * Show a standard message to the user with the default console raw text style */ text(message: string): void; /** * Show a title message to the user */ title(message: string): void; /** * Show a success to the user * If quit parameter is true, the application will also exit with success code 0 (which means exit without error) */ success(message: string, quit?: boolean): void; /** * Show a warning to the user * If quit parameter is true, the application will also exit with error code 1 (which means exit with error) */ warning(message: string, quit?: boolean): void; /** * Show a multiple list of warnings to the user, one after the other on a new line. * * @param messages The list of texts to show as warnings * @param quit False by default, the application will die with error code 1 (which means exit with error) after the last warning is displayed * * @return void */ warnings(messages: string[], quit?: boolean): void; /** * Show an error to the user * * @param message The text to show as an error * @param quit True by default, the application will die when the error message is shown with error code 1 (which means exit with error) * * @return void */ error(message: string, quit?: boolean): void; /** * Show a multiple list of errors to the user, one after the other on a new line. * * @param messages The list of texts to show as errors * @param quit True by default, the application will die with error code 1 (which means exit with error) after the last error is displayed * * @return void */ errors(messages: string[], quit?: boolean): void; /** * Show a message to wait for the user to press a key. All node process will be stopped till the user presses the key. * * @return void */ waitForKeyPress(): void; }