@zubenelakrab/gitstats
Version:
Powerful Git repository analyzer with comprehensive statistics and insights
61 lines • 1.59 kB
TypeScript
import type { Commit, Author, Branch, Tag, Repository, GitParser, AnalysisConfig } from '../types/index.js';
export declare class GitParserImpl implements GitParser {
private repoPath;
constructor(repoPath: string);
/**
* Validate that the path is a git repository
*/
validate(): Promise<void>;
/**
* Get all commits with optional filtering
*/
getCommits(options?: Partial<AnalysisConfig>): Promise<Commit[]>;
/**
* Parse raw git log output into Commit objects
*/
private parseCommits;
/**
* Parse a single commit from raw output
*/
private parseCommit;
/**
* Parse numstat output into FileChange objects
*/
private parseFileChanges;
/**
* Get all branches
*/
getBranches(): Promise<Branch[]>;
/**
* Get all tags
*/
getTags(): Promise<Tag[]>;
/**
* Get repository information
*/
getRepositoryInfo(): Promise<Repository>;
/**
* Parse remotes output
*/
private parseRemotes;
/**
* Get commit history for a specific file
*/
getFileHistory(filePath: string): Promise<Commit[]>;
/**
* Get the list of all files in the repository
*/
getFiles(): Promise<string[]>;
/**
* Get blame information for a file
*/
getBlame(filePath: string): Promise<Map<number, {
author: Author;
commit: string;
}>>;
}
/**
* Create a new GitParser instance
*/
export declare function createGitParser(repoPath: string): GitParser;
//# sourceMappingURL=git-parser.d.ts.map