feat(format): Enhance format module with rollback, diff reporting, and improved parallel execution
This commit is contained in:
45
ts/mod_format/interfaces.format.ts
Normal file
45
ts/mod_format/interfaces.format.ts
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user