e2e интеграционные тесты
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user