@atomic-ehr/codegen 0.0.2-canary.20251119121046.dd3a241 → 0.0.2-canary.20251119123135.c6f0d5b
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 +19 -19
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5818,8 +5818,8 @@ var TypeScript = class extends Writer {
|
|
|
5818
5818
|
identifier: schema.identifier,
|
|
5819
5819
|
tsPackageName: tsModuleName(schema.identifier),
|
|
5820
5820
|
resourceName: tsResourceName(schema.identifier),
|
|
5821
|
-
nestedTypes: isResourceTypeSchema(schema) && schema.nested ? schema.nested.map((n) => tsResourceName(n.identifier)) : [],
|
|
5822
|
-
helpers: isResourceTypeSchema(schema) ? [`is${tsResourceName(schema.identifier)}`] : []
|
|
5821
|
+
nestedTypes: isResourceTypeSchema(schema) && schema.nested || isLogicalTypeSchema(schema) && schema.nested ? schema.nested.map((n) => tsResourceName(n.identifier)) : [],
|
|
5822
|
+
helpers: isResourceTypeSchema(schema) || isLogicalTypeSchema(schema) ? [`is${tsResourceName(schema.identifier)}`] : []
|
|
5823
5823
|
}
|
|
5824
5824
|
]).sort((a, b) => a.resourceName.localeCompare(b.resourceName));
|
|
5825
5825
|
exports = Array.from(new Map(exports.map((exp) => [exp.resourceName.toLowerCase(), exp])).values()).sort(
|
|
@@ -5942,7 +5942,7 @@ var TypeScript = class extends Writer {
|
|
|
5942
5942
|
});
|
|
5943
5943
|
}
|
|
5944
5944
|
generateResourceTypePredicate(schema) {
|
|
5945
|
-
if (!isResourceTypeSchema(schema)) return;
|
|
5945
|
+
if (!isResourceTypeSchema(schema) && !isLogicalTypeSchema(schema)) return;
|
|
5946
5946
|
const name = tsResourceName(schema.identifier);
|
|
5947
5947
|
this.curlyBlock(["export", "const", `is${name}`, "=", `(resource: unknown): resource is ${name}`, "=>"], () => {
|
|
5948
5948
|
this.lineSM(
|
|
@@ -6133,7 +6133,6 @@ var TypeScript = class extends Writer {
|
|
|
6133
6133
|
...tsIndex.collectComplexTypes(),
|
|
6134
6134
|
...tsIndex.collectResources(),
|
|
6135
6135
|
...tsIndex.collectLogicalModels(),
|
|
6136
|
-
// ...tsIndex.collectLogicalModels(),
|
|
6137
6136
|
...this.opts.generateProfile ? tsIndex.collectProfiles().filter((p) => tsIndex.isWithMetaField(p)) : []
|
|
6138
6137
|
];
|
|
6139
6138
|
const grouped = groupByPackages(typesToGenerate);
|