pgit-cli
Version:
Private file tracking with dual git repositories
81 lines • 2.17 kB
TypeScript
import { CommandResult, CommandOptions } from '../types/config.types';
import { BaseError } from '../errors/base.error';
/**
* Reset command specific errors
*/
export declare class ResetError extends BaseError {
readonly code = "RESET_ERROR";
readonly recoverable = true;
}
export declare class NotInitializedError extends BaseError {
readonly code = "NOT_INITIALIZED";
readonly recoverable = false;
}
export declare class RestoreError extends BaseError {
readonly code = "RESTORE_ERROR";
readonly recoverable = true;
}
/**
* Reset operation result information
*/
export interface ResetResult {
restoredFiles: number;
removedSymlinks: number;
removedDirectories: string[];
configRemoved: boolean;
gitExcludesCleaned: boolean;
cleanedBackups: number;
warnings: string[];
errors: string[];
}
/**
* Reset command for completely removing pgit setup and restoring files
*/
export declare class ResetCommand {
private readonly workingDir;
private readonly fileSystem;
private readonly configManager;
private readonly symlinkService;
constructor(workingDir?: string);
/**
* Execute the reset command
*/
execute(force?: boolean, options?: CommandOptions): Promise<CommandResult>;
/**
* Validate that the environment has pgit initialized
*/
private validateEnvironment;
/**
* Confirm reset operation with user
*/
private confirmReset;
/**
* Execute dry run to show what would be done
*/
private executeDryRun;
/**
* Restore all tracked files from storage to main repository
*/
private restoreTrackedFiles;
/**
* Clean up git exclude entries for tracked paths
*/
private cleanupGitExcludes;
/**
* Remove pgit directories
*/
private removeDirectories;
/**
* Remove configuration file
*/
private removeConfiguration;
/**
* Clean up any backup files created during the operation
*/
private cleanupBackupFiles;
/**
* Display reset operation results
*/
private displayResetResults;
}
//# sourceMappingURL=reset.command.d.ts.map