-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Describe the bug
I'm trying to generate CCDA types, and I get this error
bun run src/cli/index.ts generate --debug --verbose
8:34:07 PM 🚀 Starting generation from config
i [Generate] Config file: /Users/arutrika/git/codegen/atomic-codegen.config.ts
i [Generate] Output directory: ./hl7-cda-uv-core
i [Generate] Packages: 1
i [Generate] Files: 0
i [Generate] TypeScript generation: enabled
i [Generate] Loading packages from config: hl7.cda.uv.core@2.0.1-sd
8:34:07 PM X Generation failed with unexpected error
Not Implemented
Error: Not Implemented
at <anonymous> (/Users/arutrika/git/codegen/src/cli/commands/generate.ts:115:27)
at processTicksAndRejections (native:7:39)
error: script "cli" exited with code 1
Isolating it based on message got me to
codegen/src/cli/commands/generate.ts
Line 114 in 79237e8
| if (config.typescript) { |
config.typescript and throw when it's there. But a couple of lines below it, there's a line that checks for absence of config.typescript and throws too! So no matter the value of config.typescript, it seems to error anyway.
Commenting out the mentioned line fixes the problem and generates something at least.
To Reproduce
Steps to reproduce the behavior:
- Codegen version: 79237e8
- How do you run the codegen (generator, cli, configuration, ...)
bun run cli generate --debug --verbosewith this config:
// generate.ts
import { defineConfig } from '@atomic-ehr/codegen';
export default defineConfig({
packages: [/* 'hl7.cda.us.ccda@5.0.0-ballot' */ 'hl7.cda.uv.core@2.0.1-sd'],
typescript: {
generateIndex: true
},
outputDir: "./hl7-cda-uv-core"
});Expected result
No error when generating.
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels