perf-audit-cli
Version:
CLI tool for continuous performance monitoring and analysis
98 lines • 2.32 kB
TypeScript
import type { AuditResult, BundleInfo } from './config.ts';
export interface AnalyzeOptions {
format: 'json' | 'html' | 'console';
compare?: string;
details?: boolean;
}
export interface BudgetOptions {
format: 'json' | 'console';
}
export interface CleanOptions {
force?: boolean;
days?: number;
all?: boolean;
}
export interface DashboardOptions {
port: number;
host: string;
open?: boolean;
}
export interface HistoryOptions {
days: number;
format: 'console' | 'json';
}
export interface CommandLighthouseOptions {
device: 'mobile' | 'desktop';
throttling: boolean;
format: 'json' | 'console';
}
export interface AnalysisContext {
config: unknown;
}
export interface BundleAnalysisContext {
outputPath: string;
}
export interface AfterBundleAnalysisContext {
bundles: BundleInfo[];
}
export interface AfterAnalysisContext {
result: AuditResult;
}
export interface BeforeReportContext {
result: AuditResult;
format: string;
}
export interface AfterReportContext {
result: AuditResult;
outputPath: string;
}
export interface ErrorContext {
error: Error;
context: string;
}
export interface Build {
id: number;
timestamp: string;
bundles: BundleInfo[];
}
export interface TrendQuery {
days: number;
startDate?: string;
endDate?: string;
}
export interface TrendData {
labels: string[];
datasets: Array<{
label: string;
data: number[];
borderColor: string;
backgroundColor: string;
fill: boolean;
borderDash?: number[];
}>;
}
export interface BundleStats {
totalSize: number;
averageSize: number;
bundleCount: number;
formattedTotalSize?: string;
formattedAverageSize?: string;
}
export interface DashboardStats {
totalBuilds: number;
averageSize: number;
lastBuildStatus: 'ok' | 'warning' | 'error';
trendsCount: number;
formattedAverageSize?: string;
clientStats: BundleStats;
serverStats: BundleStats;
}
export type BudgetStatus = 'ok' | 'warning' | 'error';
export type BundleType = 'client' | 'server' | 'both';
export interface BudgetJsonOutput {
passed: boolean;
status: BudgetStatus;
violations: BundleInfo[];
timestamp: string;
}
//# sourceMappingURL=commands.d.ts.map