e2e интеграционные тесты

This commit is contained in:
2025-10-28 10:51:14 +03:00
parent 6bffe6a9e1
commit 4e2d0f03de
9 changed files with 191 additions and 85 deletions

View File

@@ -15,6 +15,7 @@ program
.requiredOption('-i, --input <path>', 'Path to OpenAPI specification file (JSON or YAML)')
.requiredOption('-o, --output <path>', 'Output directory for generated files')
.option('-n, --name <name>', 'Name of generated file (without extension)')
.option('--swr', 'Generate SWR hooks for React')
.action(async (options) => {
try {
// Создание конфигурации
@@ -22,6 +23,7 @@ program
inputPath: options.input,
outputPath: options.output,
fileName: options.name,
useSwr: options.swr || false,
};
// Валидация конфигурации
@@ -38,7 +40,7 @@ program
// Генерация API
await generate(config as GeneratorConfig);
console.log(chalk.green('\n✨ Done!\n'));
console.log(chalk.green('\n✨ API client generated successfully!\n'));
} catch (error) {
console.error(chalk.red('\n❌ Error:'), error instanceof Error ? error.message : error);
console.error();