feat: enhance logging and linting functionality with detailed reports
All checks were successful
Lint / lint (pull_request) Successful in 16s

This commit is contained in:
2026-03-26 13:03:10 +01:00
parent b54a94c6d3
commit 79ea7dfc7e
8 changed files with 133 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
import fs from 'fs-extra';
import path from 'path';
import mustache from 'mustache';
import { logStep, logSuccess, logInfo } from '../utils/logger';
import { logStep, logSuccess, logDetail } from '../utils/logger';
import { mapSwaggerTypeToTs } from '../utils/type-mapper';
import { toCamelCase } from '../utils/name-formatter';
import { resolveMockValue } from '../utils/mock-value-resolver';
@@ -157,7 +157,7 @@ export function generateCleanArchitecture(
const destPath = path.join(outputDir, 'entities/models', `${toCamelCase(baseName)}.model.ts`);
fs.writeFileSync(destPath, output);
generatedCount.models++;
logInfo(` ${toCamelCase(baseName)}.model.ts${path.relative(process.cwd(), destPath)}`);
logDetail('generate', `model-entity${path.relative(process.cwd(), destPath)}`);
}
// Mapper
@@ -514,6 +514,10 @@ function renderTemplate(
const output = mustache.render(template, viewData);
fs.writeFileSync(destPath, output);
counter[key]++;
logDetail(
'generate',
`${templateName.replace('.mustache', '')}${path.relative(process.cwd(), destPath)}`
);
}
}