@atomic-ehr/codegen 0.0.2-canary.20251114125643.cb2d5e2 → 0.0.2-canary.20251114133113.0a35a8a
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 +16 -16
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5808,17 +5808,22 @@ var TypeScript = class extends Writer {
|
|
|
5808
5808
|
}
|
|
5809
5809
|
generateFhirPackageIndexFile(schemas) {
|
|
5810
5810
|
this.cat("index.ts", () => {
|
|
5811
|
-
let exports = schemas.
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5811
|
+
let exports = schemas.flatMap((schema) => [
|
|
5812
|
+
{
|
|
5813
|
+
identifier: schema.identifier,
|
|
5814
|
+
tsPackageName: tsModuleName(schema.identifier),
|
|
5815
|
+
resourceName: tsResourceName(schema.identifier),
|
|
5816
|
+
nestedTypes: isResourceTypeSchema(schema) && schema.nested ? schema.nested.map((n) => tsResourceName(n.identifier)) : []
|
|
5817
|
+
}
|
|
5818
|
+
]).sort((a, b) => a.resourceName.localeCompare(b.resourceName));
|
|
5816
5819
|
exports = Array.from(new Map(exports.map((exp) => [exp.resourceName.toLowerCase(), exp])).values()).sort(
|
|
5817
5820
|
(a, b) => a.resourceName.localeCompare(b.resourceName)
|
|
5818
5821
|
);
|
|
5819
5822
|
for (const exp of exports) {
|
|
5820
5823
|
this.debugComment(exp.identifier);
|
|
5821
|
-
this.lineSM(
|
|
5824
|
+
this.lineSM(
|
|
5825
|
+
`export type { ${[exp.resourceName, ...exp.nestedTypes].join(", ")} } from "./${exp.tsPackageName}"`
|
|
5826
|
+
);
|
|
5822
5827
|
}
|
|
5823
5828
|
});
|
|
5824
5829
|
}
|