update to smartconfig

This commit is contained in:
2026-03-24 16:10:51 +00:00
parent eda67395fe
commit d0d922e53b
41 changed files with 425 additions and 2091 deletions

View File

@@ -1,31 +1,15 @@
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';
@@ -40,9 +24,6 @@ export type IPlannedChange = {
module: string;
description: string;
content?: string; // New content for create/modify operations
originalContent?: string; // Original content for comparison
diff?: string;
size?: number;
};
export interface ICheckResult {
@@ -54,3 +35,19 @@ export interface ICheckResult {
after?: string;
}>;
}
export function getModuleIcon(module: string): string {
const icons: Record<string, string> = {
packagejson: '📦',
license: '📝',
tsconfig: '🔧',
cleanup: '🚮',
gitignore: '🔒',
prettier: '✨',
readme: '📖',
templates: '📄',
smartconfig: '⚙️',
copy: '📋',
};
return icons[module] || '📁';
}