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()
|
@Injectable()
|
||||||
export class DocsGenerationService {
|
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(
|
constructor(
|
||||||
@Inject(forwardRef(() => ApisService))
|
@Inject(forwardRef(() => ApisService))
|
||||||
@@ -51,7 +51,7 @@ export class DocsGenerationService {
|
|||||||
'--no-interactive',
|
'--no-interactive',
|
||||||
'--install',
|
'--install',
|
||||||
'--force-write',
|
'--force-write',
|
||||||
]);
|
], { shell: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
private async generateOpenApi(yamlPath: string, outputDir: string): Promise<void> {
|
private async generateOpenApi(yamlPath: string, outputDir: string): Promise<void> {
|
||||||
@@ -59,6 +59,6 @@ export class DocsGenerationService {
|
|||||||
'build-docs',
|
'build-docs',
|
||||||
yamlPath,
|
yamlPath,
|
||||||
'--output', path.join(outputDir, 'index.html'),
|
'--output', path.join(outputDir, 'index.html'),
|
||||||
]);
|
], { shell: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,15 @@
|
|||||||
"name": "datacat",
|
"name": "datacat",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"pnpm": {
|
||||||
|
"onlyBuiltDependencies": [
|
||||||
|
"@nestjs/core",
|
||||||
|
"@parcel/watcher",
|
||||||
|
"esbuild",
|
||||||
|
"lmdb",
|
||||||
|
"msgpackr-extract"
|
||||||
|
]
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker compose -f infra/docker-compose.yml up",
|
"dev": "docker compose -f infra/docker-compose.yml up",
|
||||||
"dev:build": "docker compose -f infra/docker-compose.yml up --build",
|
"dev:build": "docker compose -f infra/docker-compose.yml up --build",
|
||||||
|
|||||||
Reference in New Issue
Block a user