/** * Table - Table formatting for output * * Provides formatted table output for CLI results. * * @requirements 29.1 */ import Table from 'cli-table3'; import type { Severity } from 'driftdetect-core'; /** * Table style presets */ export type TableStyle = 'default' | 'compact' | 'borderless' | 'minimal'; /** * Table configuration options */ export interface TableOptions { /** Table headers */ head?: string[]; /** Column widths */ colWidths?: number[]; /** Column alignments */ colAligns?: Array<'left' | 'center' | 'right'>; /** Table style preset */ style?: TableStyle; /** Word wrap long content */ wordWrap?: boolean; } /** * Create a formatted table */ export declare function createTable(options?: TableOptions): Table.Table; /** * Format a severity value with color */ export declare function formatSeverity(severity: Severity): string; /** * Format a confidence score with color */ export declare function formatConfidence(confidence: number): string; /** * Format a count with color based on value */ export declare function formatCount(count: number, threshold?: number): string; /** * Format a file path (truncate if too long) */ export declare function formatPath(path: string, maxLength?: number): string; /** * Pattern table row data */ export interface PatternRow { id: string; name: string; category: string; confidence: number; locations: number; outliers: number; } /** * Create a patterns table */ export declare function createPatternsTable(patterns: PatternRow[]): string; /** * Violation table row data */ export interface ViolationRow { severity: Severity; file: string; line: number; message: string; pattern: string; } /** * Create a violations table */ export declare function createViolationsTable(violations: ViolationRow[]): string; /** * Summary table row data */ export interface SummaryRow { label: string; value: string | number; } /** * Create a summary table */ export declare function createSummaryTable(rows: SummaryRow[]): string; /** * Status summary data */ export interface StatusSummary { totalPatterns: number; approvedPatterns: number; discoveredPatterns: number; ignoredPatterns: number; totalViolations: number; errors: number; warnings: number; } /** * Create a status summary table */ export declare function createStatusTable(summary: StatusSummary): string; /** * Category breakdown data */ export interface CategoryBreakdown { category: string; patterns: number; violations: number; coverage: number; } /** * Create a category breakdown table */ export declare function createCategoryTable(categories: CategoryBreakdown[]): string; //# sourceMappingURL=table.d.ts.map