UNPKG

no-migration

Version:

CLI tool to manage migration changes and user changes separately for React Native miniapp projects

69 lines 1.81 kB
import { FileChange, GitStatus } from '../types'; export declare class GitHelper { private workingDir; private git; constructor(workingDir?: string); /** * Get current git status */ getStatus(): Promise<GitStatus>; /** * Get diff for a specific file */ getFileDiff(filePath: string, cached?: boolean): Promise<string>; /** * Get current content of a file */ getFileContent(filePath: string): string | null; /** * Get file content from git at a specific state */ getFileContentFromGit(filePath: string, ref?: string): Promise<string | null>; /** * Stage a file */ stageFile(filePath: string): Promise<void>; /** * Stage files */ stageFiles(filePaths: string[]): Promise<void>; /** * Unstage a file */ unstageFile(filePath: string): Promise<void>; /** * Unstage files */ unstageFiles(filePaths: string[]): Promise<void>; /** * Get all changed files (staged and unstaged) */ getAllChangedFiles(): Promise<{ file: string; status: string; }[]>; /** * Create a snapshot of current changes */ createChangesSnapshot(filePaths: string[]): Promise<Record<string, FileChange>>; /** * Write file content */ writeFileContent(filePath: string, content: string): void; /** * Restore file to a specific content */ restoreFileContent(filePath: string, content: string): Promise<void>; /** * Commit with message */ commit(message: string, options?: { amend?: boolean; noEdit?: boolean; }): Promise<void>; /** * Check if working directory is clean */ isClean(): Promise<boolean>; } //# sourceMappingURL=gitHelper.d.ts.map