@atomic-ehr/codegen 0.0.1-canary.20250812081907.f886676 → 0.0.1-canary.20250819094151.a48e310

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.
Files changed (40) hide show
  1. package/dist/api/builder.d.ts.map +1 -1
  2. package/dist/api/generators/base/BaseGenerator.d.ts +186 -0
  3. package/dist/api/generators/base/BaseGenerator.d.ts.map +1 -0
  4. package/dist/api/generators/base/FileManager.d.ts +90 -0
  5. package/dist/api/generators/base/FileManager.d.ts.map +1 -0
  6. package/dist/api/generators/base/HandlebarsTemplateEngine.d.ts +60 -0
  7. package/dist/api/generators/base/HandlebarsTemplateEngine.d.ts.map +1 -0
  8. package/dist/api/generators/base/PythonTypeMapper.d.ts +17 -0
  9. package/dist/api/generators/base/PythonTypeMapper.d.ts.map +1 -0
  10. package/dist/api/generators/base/TemplateEngine.d.ts +127 -0
  11. package/dist/api/generators/base/TemplateEngine.d.ts.map +1 -0
  12. package/dist/api/generators/base/TypeMapper.d.ts +130 -0
  13. package/dist/api/generators/base/TypeMapper.d.ts.map +1 -0
  14. package/dist/api/generators/base/TypeScriptTypeMapper.d.ts +52 -0
  15. package/dist/api/generators/base/TypeScriptTypeMapper.d.ts.map +1 -0
  16. package/dist/api/generators/base/builders/DirectoryBuilder.d.ts +100 -0
  17. package/dist/api/generators/base/builders/DirectoryBuilder.d.ts.map +1 -0
  18. package/dist/api/generators/base/builders/FileBuilder.d.ts +161 -0
  19. package/dist/api/generators/base/builders/FileBuilder.d.ts.map +1 -0
  20. package/dist/api/generators/base/builders/IndexBuilder.d.ts +127 -0
  21. package/dist/api/generators/base/builders/IndexBuilder.d.ts.map +1 -0
  22. package/dist/api/generators/base/enhanced-errors.d.ts +85 -0
  23. package/dist/api/generators/base/enhanced-errors.d.ts.map +1 -0
  24. package/dist/api/generators/base/error-handler.d.ts +90 -0
  25. package/dist/api/generators/base/error-handler.d.ts.map +1 -0
  26. package/dist/api/generators/base/errors.d.ts +252 -0
  27. package/dist/api/generators/base/errors.d.ts.map +1 -0
  28. package/dist/api/generators/base/index.d.ts +104 -0
  29. package/dist/api/generators/base/index.d.ts.map +1 -0
  30. package/dist/api/generators/base/types.d.ts +434 -0
  31. package/dist/api/generators/base/types.d.ts.map +1 -0
  32. package/dist/api/generators/typescript.d.ts +80 -179
  33. package/dist/api/generators/typescript.d.ts.map +1 -1
  34. package/dist/api/index.d.ts +3 -2
  35. package/dist/api/index.d.ts.map +1 -1
  36. package/dist/cli/index.js +1 -1
  37. package/dist/index-vysn9shw.js +14370 -0
  38. package/dist/index.js +3 -3
  39. package/package.json +13 -4
  40. package/dist/index-4p27vhn8.js +0 -6991
@@ -1,33 +1,38 @@
1
1
  /**
2
- * High-Level TypeScript Generator
2
+ * Modern TypeScript Generator built on BaseGenerator
3
3
  *
4
- * Provides a high-level API for generating TypeScript interfaces from TypeSchema documents.
5
- * This wraps the core TypeSchema transformer with additional convenience features.
4
+ * This is the new, clean implementation that replaces the monolithic typescript.ts generator.
5
+ * Built using the BaseGenerator architecture with TypeMapper, TemplateEngine, and FileManager.
6
6
  */
7
- import { type TypeSchema } from "../../typeschema";
8
- import type { CodegenLogger } from "../../utils/codegen-logger";
7
+ import type { TypeSchema } from "../../typeschema";
8
+ import { BaseGenerator } from "./base/BaseGenerator";
9
+ import { type HandlebarsTemplateEngineOptions } from "./base/HandlebarsTemplateEngine";
10
+ import { type TypeScriptTypeMapperOptions } from "./base/TypeScriptTypeMapper";
11
+ import type { BaseGeneratorOptions, GeneratedFile, TemplateContext, TemplateEngine, TypeMapper } from "./base/types";
9
12
  /**
10
- * Options for the TypeScript API generator
13
+ * TypeScript-specific generator options
11
14
  */
12
- export interface TypeScriptAPIOptions {
13
- outputDir: string;
15
+ export interface TypeScriptGeneratorOptions extends BaseGeneratorOptions {
16
+ /** Module format for imports/exports */
14
17
  moduleFormat?: "esm" | "cjs";
18
+ /** Whether to generate index files */
15
19
  generateIndex?: boolean;
20
+ /** Include JSDoc documentation */
16
21
  includeDocuments?: boolean;
22
+ /** Naming convention for types */
17
23
  namingConvention?: "PascalCase" | "camelCase";
24
+ /** Include FHIR extensions */
18
25
  includeExtensions?: boolean;
26
+ /** Include FHIR profiles */
19
27
  includeProfiles?: boolean;
20
- logger?: CodegenLogger;
28
+ /** Type mapper options */
29
+ typeMapperOptions?: TypeScriptTypeMapperOptions;
30
+ /** Template engine options */
31
+ templateOptions?: Partial<HandlebarsTemplateEngineOptions>;
21
32
  }
22
33
  /**
23
- * Generated file result
34
+ * Result of generating a single TypeScript file
24
35
  */
25
- export interface GeneratedFile {
26
- path: string;
27
- filename: string;
28
- content: string;
29
- exports: string[];
30
- }
31
36
  export interface GeneratedTypeScript {
32
37
  content: string;
33
38
  imports: Map<string, string>;
@@ -35,201 +40,97 @@ export interface GeneratedTypeScript {
35
40
  filename: string;
36
41
  }
37
42
  /**
38
- * High-Level TypeScript Generator
43
+ * Modern TypeScript Generator
39
44
  *
40
- * Generates TypeScript interfaces from TypeSchema documents with additional
41
- * features like index generation, documentation, and flexible output options.
45
+ * Generates clean, type-safe TypeScript interfaces from FHIR TypeSchema documents.
46
+ * Uses the new BaseGenerator architecture for maintainability and extensibility.
42
47
  */
43
- export declare class TypeScriptAPIGenerator {
44
- private options;
45
- private imports;
46
- private exports;
47
- private resourceTypes;
48
- private currentSchemaName?;
49
- private profileTypes;
50
- private profilesByPackage;
51
- private packageNameMap;
52
- private enumTypes;
53
- private globalEnumTypes;
54
- private fieldEnumMap;
55
- private logger;
56
- constructor(options: TypeScriptAPIOptions);
57
- /**
58
- * Transform a single TypeSchema to TypeScript
59
- */
60
- transformSchema(schema: TypeSchema): Promise<GeneratedTypeScript | undefined>;
61
- /**
62
- * Generate TypeScript for a single schema
63
- */
64
- private generateTypeScriptForSchema;
65
- /**
66
- * Generate TypeScript for nested type
67
- */
68
- private generateNested;
69
- /**
70
- * Generate TypeScript for a field
71
- */
72
- private generateField;
73
- /**
74
- * Generate TypeScript for polymorphic instance
75
- */
76
- private generatePolymorphicInstance;
77
- /**
78
- * Generate TypeScript for a regular field
79
- */
80
- private generateRegularField;
81
- private buildReferenceType;
82
- /**
83
- * Transform multiple schemas
48
+ export declare class TypeScriptGenerator extends BaseGenerator<TypeScriptGeneratorOptions, GeneratedFile[]> {
49
+ private readonly enumTypes;
50
+ private readonly profilesByPackage;
51
+ private readonly resourceTypes;
52
+ constructor(options: TypeScriptGeneratorOptions);
53
+ private get tsOptions();
54
+ protected getLanguageName(): string;
55
+ protected getFileExtension(): string;
56
+ protected createTypeMapper(): TypeMapper;
57
+ protected createTemplateEngine(): TemplateEngine;
58
+ protected generateSchemaContent(schema: TypeSchema, context: TemplateContext): Promise<string>;
59
+ protected filterAndSortSchemas(schemas: TypeSchema[]): TypeSchema[];
60
+ protected validateContent(content: string, context: TemplateContext): Promise<void>;
61
+ /**
62
+ * Transform multiple schemas into TypeScript
84
63
  */
85
64
  transformSchemas(schemas: TypeSchema[]): Promise<GeneratedTypeScript[]>;
86
65
  /**
87
- * Generate TypeScript files from TypeSchema documents
88
- */
89
- generate(schemas: TypeSchema[]): Promise<GeneratedFile[]>;
90
- private generateImportStatements;
91
- /**
92
- * Generate and return results without writing to files
93
- */
94
- build(schemas: TypeSchema[]): Promise<GeneratedFile[]>;
95
- /**
96
- * Set output directory
97
- */
98
- setOutputDir(directory: string): void;
99
- /**
100
- * Update generator options
101
- */
102
- setOptions(options: Partial<TypeScriptAPIOptions>): void;
103
- /**
104
- * Get current options
105
- */
106
- getOptions(): TypeScriptAPIOptions;
107
- private generateIndexFile;
108
- private ensureDirectoryExists;
109
- /**
110
- * Clean the output directory by removing all existing files and subdirectories
111
- */
112
- private cleanOutputDirectory;
113
- /**
114
- * Filter schemas based on includeExtensions option
66
+ * Transform a single schema into TypeScript
115
67
  */
68
+ transformSchema(schema: TypeSchema): Promise<GeneratedTypeScript | undefined>;
69
+ private shouldSkipSchema;
70
+ private getTemplateForSchema;
116
71
  private filterSchemas;
117
- /**
118
- * Generate index files for subfolders
119
- */
120
- private generateSubfolderIndexFiles;
121
- /**
122
- * Generate profile index files with package-based organization
123
- */
72
+ private getFilenameForSchema;
73
+ private buildTemplateContext;
74
+ private processSchemaFields;
75
+ private processField;
76
+ private calculateImportsForSchema;
77
+ private extractImportsFromContent;
78
+ private extractExportsFromContent;
79
+ private generateIndexFiles;
80
+ private generateMainIndexFile;
124
81
  private generateProfileIndexFiles;
125
- /**
126
- * Generate index file for a specific package
127
- */
128
- private generatePackageIndex;
129
- /**
130
- * Generate main profiles index with namespace exports
131
- */
132
- private generateMainProfilesIndex;
133
- /**
134
- * Generate index content for a subfolder
135
- */
136
- private generateSubfolderIndex;
137
- /**
138
- * Format type name according to naming convention
139
- */
140
- private formatTypeName;
141
- /**
142
- * Get TypeScript type for a TypeSchema identifier
143
- */
144
- private getType;
145
- /**
146
- * Check if a profile identifier represents an extension
147
- */
148
- private isExtensionProfile;
149
- /**
150
- * Check if a schema extends Extension by looking at its base type
151
- */
152
- private isExtensionSchema;
153
- /**
154
- * Generate extension name from URL
155
- * e.g., http://hl7.org/fhir/StructureDefinition/contactpoint-area -> ExtensionContactpointArea
156
- */
157
- private generateExtensionName;
158
- /**
159
- * Get base interface for schema
160
- */
161
- private getBaseInterface;
162
- /**
163
- * Get filename for schema
164
- */
165
- private getFilename;
166
- /**
167
- * Sanitize package name for use as directory name
168
- */
82
+ private hasEnumFields;
83
+ private formatDescription;
84
+ private groupExportsByCategory;
85
+ private isResourceType;
169
86
  private sanitizePackageName;
170
87
  /**
171
- * Generate namespace name from original package name by capitalizing each dot-separated segment
172
- */
173
- private generateNamespaceName;
174
- /**
175
- * Calculate the correct import path from current profile to base type
176
- */
177
- private calculateImportPath;
178
- /**
179
- * Track actual interface names for profile index generation
180
- */
181
- private trackProfileInterfaceName;
182
- /**
183
- * Generate TypeScript for a profile schema
184
- */
185
- private generateProfile;
186
- /**
187
- * Generate TypeScript for a profile schema
88
+ * Generate special Reference interface with generics
188
89
  */
189
- private generateTypeScriptForProfile;
90
+ private generateReferenceInterface;
190
91
  /**
191
- * Generate TypeScript for a profile field with constraints
92
+ * Generate TypeScript interface directly without templates
192
93
  */
193
- private generateProfileField;
94
+ private generateTypeScriptInterface;
194
95
  /**
195
- * Get list of field names that have constraints in a profile
96
+ * Collect import dependencies from a field
196
97
  */
197
- private getConstrainedFields;
98
+ private collectFieldImports;
198
99
  /**
199
- * Check if a field has significant constraints that warrant generation
100
+ * Extract resource types from reference field constraints
200
101
  */
201
- private hasSignificantConstraints;
102
+ private extractReferenceTypes;
202
103
  /**
203
- * Check if a constraint is significant enough to warrant field generation
104
+ * Extract resource type name from FHIR URL
204
105
  */
205
- private isSignificantConstraint;
106
+ private extractResourceTypeFromUrl;
206
107
  /**
207
- * Generate a constrained field for a profile with proper typing
108
+ * Generate a single field line
208
109
  */
209
- private generateConstrainedProfileField;
110
+ private generateFieldLine;
210
111
  /**
211
- * Generate a choice instance field (e.g., effectiveDateTime, effectivePeriod)
112
+ * Extract exported symbols from TypeScript content
212
113
  */
213
- private generateChoiceInstanceField;
114
+ protected extractExports(content: string): string[];
214
115
  /**
215
- * Generate field from constraint-only definition
116
+ * Set output directory for compatibility with API builder
216
117
  */
217
- private generateFieldFromConstraint;
118
+ setOutputDir(directory: string): void;
218
119
  /**
219
- * Collect imports needed for a constrained field
120
+ * Update generator options for compatibility with API builder
220
121
  */
221
- private collectImportsForField;
122
+ setOptions(options: Partial<TypeScriptGeneratorOptions>): void;
222
123
  /**
223
- * Generate an enum type for a field with enumerated values
124
+ * Get current options for compatibility with API builder
224
125
  */
225
- private generateEnumType;
126
+ getOptions(): TypeScriptGeneratorOptions;
226
127
  /**
227
- * Generate all enum type definitions
128
+ * Run post-generation hooks - generate utility files
228
129
  */
229
- private generateEnumTypes;
130
+ protected runPostGenerationHooks(): Promise<void>;
230
131
  /**
231
- * Convert string to PascalCase
132
+ * Generate utilities.ts file with ResourceType union
232
133
  */
233
- private toPascalCase;
134
+ private generateUtilitiesFile;
234
135
  }
235
136
  //# sourceMappingURL=typescript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/api/generators/typescript.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAMN,KAAK,UAAU,EAIf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAOhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IAC9C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAmCD;;;;;GAKG;AACH,qBAAa,sBAAsB;IAClC,OAAO,CAAC,OAAO,CAEb;IACF,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,iBA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AAO,CAAC,iBAAiB;IAyCzB;;OAEG;cACgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IA0C5D;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,IAAI;IAK9D;;OAEG;IACH,UAAU,IAAI,0BAA0B;IAQxC;;OAEG;cACsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhE;;OAEG;YACW,qBAAqB;CA2DnC"}
@@ -10,10 +10,11 @@ export { TypeSchemaCache, TypeSchemaGenerator, TypeSchemaParser, } from "../type
10
10
  export type { PackageInfo, TypeSchemaField, TypeSchemaIdentifier, } from "../typeschema/types";
11
11
  export type { APIBuilderOptions, GenerationResult, ProgressCallback, } from "./builder";
12
12
  export { APIBuilder, createAPI, createAPIFromConfig, generateTypesFromFiles, generateTypesFromPackage, } from "./builder";
13
+ export type { GeneratedFile } from "./generators/base";
13
14
  export type { GeneratedRestClient, RestClientOptions, } from "./generators/rest-client";
14
15
  export { RestClientGenerator } from "./generators/rest-client";
15
- export type { GeneratedFile, TypeScriptAPIOptions, } from "./generators/typescript";
16
- export { TypeScriptAPIGenerator } from "./generators/typescript";
16
+ export type { TypeScriptGeneratorOptions } from "./generators/typescript";
17
+ export { TypeScriptGenerator } from "./generators/typescript";
17
18
  /**
18
19
  * Quick start examples:
19
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACN,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACX,WAAW,EACX,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACN,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,GACxB,MAAM,WAAW,CAAC;AACnB,YAAY,EACX,mBAAmB,EACnB,iBAAiB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EACX,aAAa,EACb,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACN,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACX,WAAW,EACX,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACN,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,GACxB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EACX,mBAAmB,EACnB,iBAAiB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG"}
package/dist/cli/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  step,
18
18
  success,
19
19
  warn
20
- } from "../index-4p27vhn8.js";
20
+ } from "../index-vysn9shw.js";
21
21
 
22
22
  // node_modules/emoji-regex/index.js
23
23
  var require_emoji_regex = __commonJS((exports, module) => {