54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
export type IFormatPlan = {
|
|
summary: {
|
|
totalFiles: number;
|
|
filesAdded: number;
|
|
filesModified: number;
|
|
filesRemoved: number;
|
|
};
|
|
changes: Array<{
|
|
type: 'create' | 'modify' | 'delete';
|
|
path: string;
|
|
module: string;
|
|
description: string;
|
|
}>;
|
|
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; // New content for create/modify operations
|
|
};
|
|
|
|
export interface ICheckResult {
|
|
hasDiff: boolean;
|
|
diffs: Array<{
|
|
path: string;
|
|
type: 'create' | 'modify' | 'delete';
|
|
before?: string;
|
|
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] || '📁';
|
|
}
|