@atomic-ehr/codegen 0.0.1-canary.20250808231821.ab61009 β†’ 0.0.1-canary.20250808232913.e62fbdc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-ehr/codegen",
3
- "version": "0.0.1-canary.20250808231821.ab61009",
3
+ "version": "0.0.1-canary.20250808232913.e62fbdc",
4
4
  "description": "Code generation tools for FHIR resources and TypeSchema definitions",
5
5
  "keywords": [
6
6
  "fhir",
@@ -10,11 +10,12 @@
10
10
  "ehr",
11
11
  "typeschema"
12
12
  ],
13
- "module": "src/index.ts",
14
- "main": "src/index.ts",
13
+ "module": "./dist/index.js",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
15
16
  "type": "module",
16
17
  "bin": {
17
- "atomic-codegen": "./dist/cli/index.ts"
18
+ "atomic-codegen": "./dist/cli/index.js"
18
19
  },
19
20
  "files": [
20
21
  "dist"
@@ -24,7 +25,7 @@
24
25
  "test:watch": "bun test --watch",
25
26
  "test:coverage": "bun test --coverage",
26
27
  "test:ci": "bun test --coverage --bail",
27
- "build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --splitting --external typescript && bunx tsc --project tsconfig.build.json",
28
+ "build": "rm -rf dist && bun build src/index.ts src/cli/index.ts --outdir dist --target node --format esm --splitting --external typescript && bunx tsc --project tsconfig.build.json && chmod +x dist/cli/index.js",
28
29
  "typecheck": "bunx tsc --noEmit",
29
30
  "cli": "bun run src/cli/index.ts",
30
31
  "codegen": "bun run src/cli/index.ts",
@@ -42,19 +43,19 @@
42
43
  },
43
44
  "homepage": "https://github.com/atomic-ehr/codegen#readme",
44
45
  "devDependencies": {
45
- "@biomejs/biome": "^2.1.3",
46
+ "@biomejs/biome": "^2.1.4",
46
47
  "@types/bun": "latest",
47
- "@types/node": "22",
48
+ "@types/node": "^22.17.1",
48
49
  "@types/yargs": "^17.0.33",
49
- "typescript": "^5.8.3"
50
+ "typescript": "^5.9.2"
50
51
  },
51
52
  "dependencies": {
52
53
  "@atomic-ehr/fhir-canonical-manager": "^0.0.10",
53
54
  "@atomic-ehr/fhirschema": "^0.0.2",
54
- "@inquirer/prompts": "^7.0.0",
55
+ "@inquirer/prompts": "^7.8.1",
55
56
  "ajv": "^8.17.1",
56
- "picocolors": "^1.0.0",
57
- "ora": "^8.1.0",
57
+ "picocolors": "^1.1.1",
58
+ "ora": "^8.2.0",
58
59
  "yargs": "^18.0.0"
59
60
  }
60
61
  }
package/src/index.ts DELETED
@@ -1,86 +0,0 @@
1
- /**
2
- * Main entry point for the @atomic-ehr/codegen library
3
- *
4
- * ## Overview
5
- *
6
- * atomic-codegen is a comprehensive code generation toolkit for FHIR healthcare standards,
7
- * designed with TypeSchema as the intermediate format for maximum flexibility and type safety.
8
- *
9
- * ## Key Features
10
- *
11
- * - **πŸ”₯ FHIR R4/R5 Support**: Complete FHIR resource and profile generation
12
- * - **πŸ‡ΊπŸ‡Έ US Core Profiles**: Built-in support for US healthcare implementation guides
13
- * - **πŸ“‹ TypeSchema Integration**: Uses TypeSchema as universal intermediate format
14
- * - **🎯 Type Safety**: Full TypeScript support with runtime validation
15
- * - **⚑ Performance**: Built with Bun for maximum speed
16
- * - **πŸ—οΈ Extensible**: Plugin architecture for custom generators
17
- *
18
- * ## Quick Start
19
- *
20
- * ```typescript
21
- * import { APIBuilder } from '@atomic-ehr/codegen';
22
- *
23
- * // High-level API for common workflows
24
- * const api = new APIBuilder();
25
- *
26
- * // Generate FHIR types from packages
27
- * await api
28
- * .fromFHIRPackages(['hl7.fhir.r4.core@4.0.1', 'hl7.fhir.us.core@6.1.0'])
29
- * .typescript('./src/types/fhir')
30
- * .withValidation()
31
- * .generate();
32
- * ```
33
- *
34
- * ## Architecture
35
- *
36
- * The library follows a three-stage architecture:
37
- *
38
- * 1. **Input**: FHIR packages, JSON Schema, or custom schemas
39
- * 2. **TypeSchema**: Universal intermediate representation
40
- * 3. **Output**: TypeScript, Python, Go, or custom target languages
41
- *
42
- * ## Examples
43
- *
44
- * ### FHIR Patient with US Core Extensions
45
- *
46
- * ```typescript
47
- * import { USCorePatient, USCoreRaceExtension } from './types/fhir';
48
- *
49
- * const patient: USCorePatient = {
50
- * resourceType: 'Patient',
51
- * identifier: [{ value: 'MRN-123' }],
52
- * name: [{ family: 'Johnson', given: ['Maria'] }],
53
- * gender: 'female',
54
- * extension: [{
55
- * url: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race',
56
- * extension: [{ url: 'text', valueString: 'Hispanic or Latino' }]
57
- * } as USCoreRaceExtension]
58
- * };
59
- * ```
60
- *
61
- * ### Runtime Validation
62
- *
63
- * ```typescript
64
- * import { isUSCorePatient, validateFHIRResource } from './types/fhir/guards';
65
- *
66
- * if (isUSCorePatient(someData)) {
67
- * // TypeScript knows this is a USCorePatient
68
- * const validation = await validateFHIRResource(someData);
69
- * if (validation.valid) {
70
- * console.log('Valid US Core Patient!');
71
- * }
72
- * }
73
- * ```
74
- *
75
- * @packageDocumentation
76
- * @module @atomic-ehr/codegen
77
- * @version 0.0.1
78
- * @author Atomic EHR Team
79
- * @since 0.0.1
80
- */
81
-
82
- // Export new high-level API (primary)
83
- export * from "./api";
84
-
85
- // Export new config system
86
- export * from "./config";