/** * Migration Service * * Handles migration of data from old file structures to new ones. * Detects legacy data locations and migrates them to ~/.pluginator/ */ import { LEGACY_PATHS } from '../../config/paths.js'; /** * Migration result for a single item */ export interface MigrationItemResult { source: string; destination: string; success: boolean; error?: string; skipped?: boolean; reason?: string; } /** * Overall migration result */ export interface MigrationResult { performed: boolean; items: MigrationItemResult[]; warnings: string[]; timestamp: string; } /** * Migration options */ export interface MigrationOptions { /** Perform a dry run without actually migrating */ dryRun?: boolean; /** Force migration even if destination exists */ force?: boolean; /** Show deprecation warnings */ showWarnings?: boolean; /** Callback for progress updates */ onProgress?: (message: string) => void; } /** * Migration Service class */ export declare class MigrationService { private migrationLog; /** * Log a migration message */ private log; /** * Check if migration is needed */ needsMigration(): boolean; /** * Get list of legacy items that would be migrated */ getLegacyItems(): Array<{ source: string; destination: string; exists: boolean; }>; /** * Perform migration from legacy structure to new structure */ migrate(options?: MigrationOptions): Promise; /** * Migrate a single item */ private migrateItem; /** * Convert legacy sources.json to user overrides format */ private convertLegacySources; /** * Generate deprecation warnings */ private generateDeprecationWarnings; /** * Save migration log to user directory */ private saveMigrationLog; /** * Check if a specific legacy path exists */ hasLegacyPath(key: keyof typeof LEGACY_PATHS): boolean; /** * Get migration log */ getMigrationLog(): string[]; } /** * Get the singleton migration service */ export declare function getMigrationService(): MigrationService; /** * Create a new migration service (for testing) */ export declare function createMigrationService(): MigrationService; /** * Reset the singleton instance (for testing) */ export declare function resetMigrationService(): void; //# sourceMappingURL=migration-service.d.ts.map