UNPKG

@zubenelakrab/gitstats

Version:

Powerful Git repository analyzer with comprehensive statistics and insights

78 lines 2.1 kB
import type { Commit, AnalysisConfig, Analyzer } from '../types/index.js'; export interface HealthStats { zombieFiles: ZombieFile[]; legacyFiles: LegacyFile[]; abandonedDirs: AbandonedDir[]; activeAreas: ActiveArea[]; ageDistribution: AgeDistribution; healthScore: number; indicators: HealthIndicator[]; testMetrics: TestMetrics; } export interface ZombieFile { path: string; lastModified: Date; daysSinceModified: number; originalAuthor: string; } export interface LegacyFile { path: string; lastModified: Date; daysSinceModified: number; totalCommits: number; authors: string[]; risk: 'low' | 'medium' | 'high'; } export interface AbandonedDir { path: string; fileCount: number; lastActivity: Date; daysSinceActivity: number; lastAuthor: string; } export interface ActiveArea { path: string; recentCommits: number; totalCommits: number; activeAuthors: number; activityLevel: 'hot' | 'warm' | 'cold'; } export interface AgeDistribution { fresh: number; recent: number; aging: number; old: number; ancient: number; } export interface HealthIndicator { name: string; status: 'good' | 'warning' | 'critical'; value: string; description: string; } export interface TestMetrics { testFiles: number; sourceFiles: number; testToCodeRatio: number; testCoverage: string; modulesWithoutTests: ModuleTestInfo[]; testTypes: Record<string, number>; recentTestActivity: number; } export interface ModuleTestInfo { path: string; sourceFiles: number; testFiles: number; hasTests: boolean; } export declare class HealthAnalyzer implements Analyzer<HealthStats> { name: string; description: string; analyze(commits: Commit[], _config: AnalysisConfig): Promise<HealthStats>; private calculateTestMetrics; private calculateIndicators; private calculateHealthScore; private emptyStats; } export declare function createHealthAnalyzer(): HealthAnalyzer; //# sourceMappingURL=health-analyzer.d.ts.map