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:
z3n
2026-05-22 15:22:07 +00:00
parent 1bbb0c1125
commit 235e8053d1
2 changed files with 12 additions and 3 deletions

View File

@@ -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 });
}
}

View File

@@ -2,6 +2,15 @@
"name": "datacat",
"version": "0.1.0",
"private": true,
"pnpm": {
"onlyBuiltDependencies": [
"@nestjs/core",
"@parcel/watcher",
"esbuild",
"lmdb",
"msgpackr-extract"
]
},
"scripts": {
"dev": "docker compose -f infra/docker-compose.yml up",
"dev:build": "docker compose -f infra/docker-compose.yml up --build",