@atomic-ehr/codegen 0.0.1-canary.20251007094146.5297616 → 0.0.1-canary.20251007123452.75482df
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/dist/cli/index.js +39 -26
- package/dist/index.d.ts +27 -4
- package/dist/index.js +563 -115
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,23 +2,45 @@ import { CanonicalManager } from '@atomic-ehr/fhir-canonical-manager';
|
|
|
2
2
|
import * as FS from '@atomic-ehr/fhirschema';
|
|
3
3
|
import { FHIRSchema, StructureDefinition } from '@atomic-ehr/fhirschema';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Structured Logging System for Atomic Codegen
|
|
7
|
+
*
|
|
8
|
+
* Provides configurable logging with levels, structured output, and context
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Log levels in order of severity
|
|
12
|
+
*/
|
|
13
|
+
declare enum LogLevel {
|
|
14
|
+
DEBUG = 0,
|
|
15
|
+
INFO = 1,
|
|
16
|
+
WARN = 2,
|
|
17
|
+
ERROR = 3,
|
|
18
|
+
SILENT = 4
|
|
19
|
+
}
|
|
20
|
+
|
|
5
21
|
/**
|
|
6
22
|
* CodeGen Logger
|
|
7
23
|
*
|
|
8
24
|
* Clean, colorful logging designed for code generation tools
|
|
9
25
|
*/
|
|
26
|
+
|
|
10
27
|
interface LogOptions {
|
|
11
28
|
prefix?: string;
|
|
12
29
|
timestamp?: boolean;
|
|
13
30
|
verbose?: boolean;
|
|
31
|
+
suppressLoggingLevel?: LogLevel[] | "all";
|
|
14
32
|
}
|
|
15
33
|
/**
|
|
16
34
|
* Simple code generation logger with pretty colors and clean formatting
|
|
17
35
|
*/
|
|
18
36
|
declare class CodegenLogger {
|
|
19
37
|
private options;
|
|
38
|
+
private dryWarnSet;
|
|
20
39
|
constructor(options?: LogOptions);
|
|
40
|
+
private static consoleLevelsMap;
|
|
21
41
|
private formatMessage;
|
|
42
|
+
private isSuppressed;
|
|
43
|
+
private tryWriteToConsole;
|
|
22
44
|
/**
|
|
23
45
|
* Success message with checkmark
|
|
24
46
|
*/
|
|
@@ -31,6 +53,7 @@ declare class CodegenLogger {
|
|
|
31
53
|
* Warning message with warning sign
|
|
32
54
|
*/
|
|
33
55
|
warn(message: string): void;
|
|
56
|
+
dry_warn(message: string): void;
|
|
34
57
|
/**
|
|
35
58
|
* Info message with info icon
|
|
36
59
|
*/
|
|
@@ -619,13 +642,13 @@ declare class TypeSchemaGenerator {
|
|
|
619
642
|
private options;
|
|
620
643
|
private cacheConfig?;
|
|
621
644
|
private cache?;
|
|
622
|
-
private logger
|
|
645
|
+
private logger?;
|
|
623
646
|
constructor(options?: TypeschemaGeneratorOptions, cacheConfig?: TypeSchemaConfig);
|
|
624
647
|
private initializeCache;
|
|
625
648
|
registerFromPackageMetas(packageMetas: PackageMeta[]): Promise<Register>;
|
|
626
649
|
generateFhirSchemas(structureDefinitions: StructureDefinition[]): FHIRSchema[];
|
|
627
|
-
generateValueSetSchemas(valueSets: RichValueSet[]): Promise<TypeSchema[]>;
|
|
628
|
-
generateFromPackage(packageName: string, packageVersion?:
|
|
650
|
+
generateValueSetSchemas(valueSets: RichValueSet[], logger?: CodegenLogger): Promise<TypeSchema[]>;
|
|
651
|
+
generateFromPackage(packageName: string, packageVersion: string | undefined, logger?: CodegenLogger): Promise<TypeSchema[]>;
|
|
629
652
|
/**
|
|
630
653
|
* Apply treeshaking to StructureDefinitions before FHIR schema transformation
|
|
631
654
|
* This is more efficient and includes smart reference handling
|
|
@@ -1660,7 +1683,7 @@ interface ErrorHandlerOptions {
|
|
|
1660
1683
|
logger: CodegenLogger;
|
|
1661
1684
|
verbose?: boolean;
|
|
1662
1685
|
beginnerMode?: boolean;
|
|
1663
|
-
outputFormat?: "
|
|
1686
|
+
outputFormat?: "this.options.logger" | "json" | "structured";
|
|
1664
1687
|
}
|
|
1665
1688
|
/**
|
|
1666
1689
|
* Centralized error handler with smart reporting
|