fix: compatibilité Windows pour la génération de docs
- execFileAsync avec shell:true pour trouver asyncapi.cmd/redocly.cmd sur Windows - DOCS_OUTPUT_DIR par défaut ./docs-output (cross-platform) au lieu de /app/docs-output Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -9,7 +9,7 @@ const execFileAsync = promisify(execFile);
|
||||
|
||||
@Injectable()
|
||||
export class DocsGenerationService {
|
||||
private readonly outputDir = process.env.DOCS_OUTPUT_DIR ?? '/app/docs-output';
|
||||
private readonly outputDir = process.env.DOCS_OUTPUT_DIR ?? './docs-output';
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ApisService))
|
||||
@@ -51,7 +51,7 @@ export class DocsGenerationService {
|
||||
'--no-interactive',
|
||||
'--install',
|
||||
'--force-write',
|
||||
]);
|
||||
], { shell: true });
|
||||
}
|
||||
|
||||
private async generateOpenApi(yamlPath: string, outputDir: string): Promise<void> {
|
||||
@@ -59,6 +59,6 @@ export class DocsGenerationService {
|
||||
'build-docs',
|
||||
yamlPath,
|
||||
'--output', path.join(outputDir, 'index.html'),
|
||||
]);
|
||||
], { shell: true });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user