@azure/static-web-apps-cli
Version:
Azure Static Web Apps CLI
49 lines • 2.34 kB
TypeScript
import chalk from "chalk";
import type http from "http";
export declare const logger: {
_print(prefix: string | null, data: string): void;
_traverseObjectProperties(o: any, fn: (_prop: string, _value: any, _indent: string) => void, indent?: string): void;
/**
* Print information data.
* @param data Either a string or an object to be printed.
* @param prefix (optional) A prefix to prepend to the printed message.
*/
info(data: string | object, prefix?: string | null): void;
/**
* Print log data.
* @param data Either a string or an object to be printed.
* @param prefix (optional) A prefix to prepend to the printed message.
*/
log(data: string | object, prefix?: string | null): void;
/**
* Print information data.
* @param data Either a string or an object to be printed.
* @param prefix (optional) A prefix to prepend to the printed message.
*/
warn(data: string | object, prefix?: string | null): void;
/**
* Print error data and optionally exit the CLI instance.
* @param data Either a string or an object to be printed.
* @param exit If set to True, the CLI instance will be terminated after printing the error message (code -1).
*/
error(data: string | object, exit?: boolean): void;
/**
* Print logs with verbose filter enabled.
* @param data Either a string or an object to be printed.
* @param prefix (optional) A prefix to prepend to the printed message.
* @param debugFilter (optional) A valid debug filter of type DebugFilterLevel.
* @param color (optional) A valid Chalk color to be used when printing logs.
*/
silly(data: string | object, prefix?: string | null, debugFilter?: DebugFilterLevel, color?: chalk.Chalk): void;
};
/**
* Print logs related to an HTTP request.
* @example `GET https://localhost:1234/path 200`
* @param req Node.js HTTP request object.
* @param target (optional) A remote target.
* @param statusCode (optional) An HTTP status code.
* @param prefix (optional) A prefix to prepend to the printed message.
*/
export declare function logRequest(req: http.IncomingMessage, target?: string, statusCode?: number | null, prefix?: string): void;
export declare function logGitHubIssueMessageAndExit(): void;
//# sourceMappingURL=logger.d.ts.map