UNPKG

@iyulab/oops

Version:

Core SDK for Oops - Safe text file editing with automatic backup

59 lines 1.65 kB
/** * Git repository manager for per-file tracking */ import { GitWrapper } from './git'; export declare class GitManager { private _workspaceRoot; private gitInstances; constructor(_workspaceRoot: string); /** * Get or create a Git wrapper for a specific file */ getGitForFile(filePath: string): Promise<GitWrapper>; /** * Initialize a Git repository for a file */ initializeFileRepo(filePath: string): Promise<GitWrapper>; /** * Create initial backup commit for a file */ createInitialCommit(filePath: string, message?: string): Promise<void>; /** * Update backup with current file state */ updateBackup(filePath: string, message?: string): Promise<void>; /** * Restore file from backup */ restoreFromBackup(filePath: string): Promise<void>; /** * Get diff between current file and backup */ getDiff(filePath: string): Promise<string>; /** * Check if file has backup */ hasBackup(filePath: string): Promise<boolean>; /** * Check if file has changes compared to backup */ hasChanges(filePath: string): Promise<boolean>; /** * Clean up Git repository for a file */ cleanupFileRepo(filePath: string): Promise<void>; /** * Get repository health status */ getRepoHealth(filePath: string): Promise<{ exists: boolean; healthy: boolean; commitCount: number; hasBackup: boolean; }>; /** * Hash file path to create unique repository directory */ private hashFilePath; } //# sourceMappingURL=git-manager.d.ts.map