git-spark
Version:
Git repository analytics and reporting tool for analyzing commit patterns and contributor activity
91 lines • 2.65 kB
TypeScript
/**
* git-spark: Enterprise-grade Git repository analytics and reporting tool
* Main entry point for the library
*/
export * from './types';
export * from './core/analyzer';
export * from './core/collector';
export * from './utils/git';
export * from './utils/logger';
export * from './utils/validation';
import { GitSparkOptions, AnalysisReport, GitSparkConfig, OutputFormat, ProgressCallback } from './types';
/**
* Main GitSpark class for enterprise-grade Git repository analysis
*
* Provides a high-level interface for analyzing Git repositories and generating
* comprehensive reports. Handles the complete analysis pipeline from data
* collection through export in multiple formats.
*
* Key features:
* - Comprehensive commit and author analysis
* - Risk assessment and governance scoring
* - Multiple export formats (HTML, JSON, Markdown, CSV, Console)
* - Progress tracking for long-running operations
* - Extensive configuration options and validation
* - Enterprise-grade error handling and logging
*
* @example
* ```typescript
* // Basic analysis
* const gitSpark = new GitSpark({
* repoPath: '/path/to/repo',
* since: '2024-01-01'
* });
*
* const report = await gitSpark.analyze();
* await gitSpark.export('html', './reports');
*
* // With progress tracking
* const gitSpark = new GitSpark({
* repoPath: '/path/to/repo'
* }, (progress) => {
* console.log(`${progress.stage}: ${progress.percentage}%`);
* });
* ```
*/
export declare class GitSpark {
private analyzer;
private options;
constructor(options: GitSparkOptions, progressCallback?: ProgressCallback);
/**
* Perform complete repository analysis
*/
analyze(): Promise<AnalysisReport>;
/**
* Export analysis report in specified format
*/
export(format: OutputFormat, outputPath: string): Promise<void>;
/**
* Export as HTML report
*/
private exportHTML;
/**
* Export as JSON
*/
private exportJSON;
/**
* Export as Markdown
*/
private exportMarkdown;
/**
* Export as CSV
*/
private exportCSV;
/**
* Export to console
*/
private exportConsole;
/**
* Get default configuration
*/
static getDefaultConfig(): GitSparkConfig;
}
/**
* Quick analysis function for simple use cases
*/
export declare function analyze(repoPath?: string, options?: Partial<GitSparkOptions>): Promise<AnalysisReport>;
/**
* Quick export function
*/
export declare function exportReport(report: AnalysisReport, format: OutputFormat, outputPath: string): Promise<void>;
//# sourceMappingURL=index.d.ts.map