pgit-cli
Version:
Private file tracking with dual git repositories
93 lines • 2.67 kB
TypeScript
import { PrivateConfig, ConfigSettings, GitExcludeSettings } from '../types/config.types';
import type { ConfigHealth } from '../types/config.types';
import { FileSystemService } from './filesystem.service';
import { BaseError } from '../errors/base.error';
/**
* Configuration management errors
*/
export declare class ConfigError extends BaseError {
readonly code = "CONFIG_ERROR";
readonly recoverable = true;
}
export declare class ConfigValidationError extends BaseError {
readonly code = "CONFIG_VALIDATION_ERROR";
readonly recoverable = true;
}
export declare class ConfigMigrationError extends BaseError {
readonly code = "CONFIG_MIGRATION_ERROR";
readonly recoverable = false;
}
/**
* Configuration manager for private git CLI
*/
export declare class ConfigManager {
private readonly configPath;
private readonly fileSystem;
private cachedConfig?;
constructor(workingDir: string, fileSystem?: FileSystemService);
/**
* Create initial configuration
*/
create(projectPath: string, options?: Partial<ConfigSettings>): Promise<PrivateConfig>;
/**
* Load configuration from file
*/
load(): Promise<PrivateConfig>;
/**
* Save configuration to file
*/
save(config: PrivateConfig): Promise<void>;
/**
* Update git exclude settings
*/
updateGitExcludeSettings(newSettings: Partial<GitExcludeSettings>): Promise<PrivateConfig>;
/**
* Get current git exclude settings
*/
getGitExcludeSettings(): Promise<GitExcludeSettings>;
/**
* Reset git exclude settings to defaults
*/
resetGitExcludeSettings(): Promise<PrivateConfig>;
/**
* Add a tracked path
*/
addTrackedPath(filePath: string): Promise<void>;
/**
* Remove a tracked path
*/
removeTrackedPath(filePath: string): Promise<void>;
/**
* Add multiple tracked paths
*/
addMultipleTrackedPaths(filePaths: string[]): Promise<void>;
/**
* Remove multiple tracked paths
*/
removeMultipleTrackedPaths(filePaths: string[]): Promise<void>;
/**
* Check if configuration exists
*/
exists(): Promise<boolean>;
/**
* Get cached configuration
*/
getCached(): PrivateConfig | undefined;
/**
* Clear configuration cache
*/
clearCache(): void;
/**
* Get configuration file path
*/
getConfigPath(): string;
/**
* Get configuration health status
*/
getHealth(): Promise<ConfigHealth>;
/**
* Transform configuration to JSON format
*/
private transformToJson;
}
//# sourceMappingURL=config.manager.d.ts.map