archunit
Version:
ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app
68 lines (67 loc) • 2.1 kB
TypeScript
/**
* ANSI color codes for terminal output formatting
* Inspired by popular testing frameworks like Jest, Mocha, and Vitest
*/
export declare class ColorUtils {
private static readonly RESET;
private static readonly BOLD;
private static readonly DIM;
private static readonly RED;
private static readonly GREEN;
private static readonly YELLOW;
private static readonly BLUE;
private static readonly MAGENTA;
private static readonly CYAN;
private static readonly WHITE;
private static readonly GRAY;
private static readonly BG_RED;
private static readonly BG_GREEN;
/**
* Check if colors should be disabled (CI environments, non-TTY, etc.)
*/
private static get shouldUseColors();
/**
* Apply color formatting if colors are supported
*/
private static colorize;
static red(text: string): string;
static green(text: string): string;
static yellow(text: string): string;
static blue(text: string): string;
static magenta(text: string): string;
static cyan(text: string): string;
static gray(text: string): string;
static dim(text: string): string;
static bold(text: string): string;
static redBold(text: string): string;
static greenBold(text: string): string;
/**
* Format a clickable file path with colors
* File path in blue, line:column numbers in gray/dim
*/
static formatFilePath(filePath: string): string;
/**
* Format a violation number (e.g., "1.", "2.")
*/
static formatViolationNumber(number: string): string;
/**
* Format a violation type/category
*/
static formatViolationType(type: string): string;
/**
* Format rule descriptions
*/
static formatRule(rule: string): string;
/**
* Format metric values
*/
static formatMetricValue(value: string): string;
/**
* Format success messages
*/
static formatSuccess(message: string): string;
/**
* Format error summary headers
*/
static formatErrorSummary(message: string): string;
}