feat(format): Enhance format module with rollback, diff reporting, and improved parallel execution

This commit is contained in:
2025-05-19 13:34:23 +00:00
parent 7b2ae01112
commit 949f273317
32 changed files with 2265 additions and 40 deletions

View File

@@ -0,0 +1,45 @@
export type IFormatOperation = {
id: string;
timestamp: number;
files: Array<{
path: string;
originalContent: string;
checksum: string;
permissions: string;
}>;
status: 'pending' | 'in-progress' | 'completed' | 'failed' | 'rolled-back';
error?: Error;
}
export type IFormatPlan = {
summary: {
totalFiles: number;
filesAdded: number;
filesModified: number;
filesRemoved: number;
estimatedTime: number;
};
changes: Array<{
type: 'create' | 'modify' | 'delete';
path: string;
module: string;
description: string;
diff?: string;
size?: number;
}>;
warnings: Array<{
level: 'info' | 'warning' | 'error';
message: string;
module: string;
}>;
}
export type IPlannedChange = {
type: 'create' | 'modify' | 'delete';
path: string;
module: string;
description: string;
content?: string; // For create/modify operations
diff?: string;
size?: number;
}