@githolon/dsl 0.75.0 → 0.75.1
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 +1 -1
- package/src/codegen_dart_client.ts +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/dsl",
|
|
3
|
-
"version": "0.75.
|
|
3
|
+
"version": "0.75.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -627,7 +627,11 @@ export function generateDartBridgeClient(mod: DomainModule, opts: DartBridgeClie
|
|
|
627
627
|
const targetInThisDomain = aggById.has(targetType) || owner?.name === thisDomainName;
|
|
628
628
|
if (!targetInThisDomain) {
|
|
629
629
|
if (owner === undefined) continue; // target not in this package — unreachable, skip the resolver
|
|
630
|
-
|
|
630
|
+
// LAYERED-packages mode: the sibling domain's TYPES file lives in the TYPES package, not
|
|
631
|
+
// beside this client file — a relative `<name>.dart` import points at a nonexistent path in
|
|
632
|
+
// the client package (the co2 0.75.0 regression). The types-barrel import above already
|
|
633
|
+
// re-exports every generated concrete class, so the extra import is only needed FLAT.
|
|
634
|
+
if (opts.typesImportUri === undefined) addImport(`${owner.name}.dart`, concreteClassName(targetType));
|
|
631
635
|
}
|
|
632
636
|
const targetConcrete = concreteClassName(targetType);
|
|
633
637
|
const member = dartMemberName(fieldName);
|
|
@@ -735,10 +739,11 @@ export function generateDartBridgeClient(mod: DomainModule, opts: DartBridgeClie
|
|
|
735
739
|
// them (the by-id accessors reference them) and re-export them (once per package, Dart de-dups).
|
|
736
740
|
...(opts.typesImportUri === undefined && opts.frameworkImportUri !== undefined ? [`import '${opts.frameworkImportUri}';`] : []),
|
|
737
741
|
// CROSS-DOMAIN REF TRAVERSAL (§2a follow-on): a cross-domain resolver references a SIBLING domain's
|
|
738
|
-
// generated client class + read model (from `<name>.client.dart
|
|
739
|
-
//
|
|
740
|
-
//
|
|
741
|
-
//
|
|
742
|
+
// generated client class + read model (from `<name>.client.dart`, co-located with this file in BOTH
|
|
743
|
+
// modes) or — FLAT MODE ONLY — a foreignRef target's concrete class from the sibling TYPES
|
|
744
|
+
// `<name>.dart` (in layered mode that file lives in the TYPES package and the types-barrel import
|
|
745
|
+
// above already re-exports it; emitting the relative import there was the co2 0.75.0 regression).
|
|
746
|
+
// Empty for a domain with no cross-domain ref (byte-identical to before this existed).
|
|
742
747
|
...[...crossDomainImports.entries()]
|
|
743
748
|
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
744
749
|
.map(([uri, names]) => `import '${uri}' show ${[...names].sort().join(", ")};`),
|