@wairon/cli 5.0.2-dev.15 → 5.0.2-dev.17

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/index.js CHANGED
@@ -7365,11 +7365,15 @@ function projectSubsystemSurface(subsystemId) {
7365
7365
  const interfaces = loadInterfaceSpecs();
7366
7366
  const types = loadTypeSpecs();
7367
7367
  const entries = [];
7368
+ const unprojectable = [];
7368
7369
  for (const pub of target.publicInterfaces ?? []) {
7369
7370
  if (!pub.component) continue;
7370
7371
  const comp = components.find((c) => c.id === pub.component || c.id === `${subsystemId}::${pub.component}`);
7371
7372
  if (!comp) continue;
7372
- if (comp.componentType !== "Portal") continue;
7373
+ if (!CROSS_BOUNDARY_TARGETS.has(comp.componentType)) {
7374
+ unprojectable.push({ component: pub.component, componentType: comp.componentType });
7375
+ continue;
7376
+ }
7373
7377
  const compInterfaces = interfaces.filter((i) => i.component === comp.id && (!pub.interface || i.id === pub.interface || i.id === `${subsystemId}::${pub.interface}`));
7374
7378
  const methods = compInterfaces.flatMap((i) => i.methods);
7375
7379
  entries.push({
@@ -7383,13 +7387,18 @@ function projectSubsystemSurface(subsystemId) {
7383
7387
  component: localName(comp.id),
7384
7388
  methods,
7385
7389
  ...comp.dispatch && comp.dispatch.length ? { dispatch: comp.dispatch } : {},
7386
- // Project the backing Portal's auth + basePath so the codec can emit
7390
+ // Project the backing component's auth + basePath so the codec can emit
7387
7391
  // OpenAPI security + per-portal servers self-contained from the snapshot.
7388
7392
  ...comp.auth && comp.auth.scheme !== "none" ? { auth: comp.auth } : {},
7389
7393
  ...comp.basePath ? { basePath: comp.basePath } : {},
7390
7394
  details: pub.details ?? ""
7391
7395
  });
7392
7396
  }
7397
+ for (const skipped of unprojectable) {
7398
+ console.error(
7399
+ `[surfaces] skipped "${subsystemId}::${skipped.component}": a published ${skipped.componentType} can never serve a cross-boundary caller, so it stays out of every chained child's sibling surface \u2014 publish this surface through a Portal, a Gateway, or an Observer (for events).`
7400
+ );
7401
+ }
7393
7402
  return SurfaceSnapshotSchema.parse({
7394
7403
  projectName: `${system.name}::${subsystemId}`,
7395
7404
  origin: "generated",
@@ -7590,7 +7599,7 @@ function checkChildSurfaceFreshness(rootDir = getProjectRoot()) {
7590
7599
  }
7591
7600
  return issues;
7592
7601
  }
7593
- var fs4, path5, SURFACES_DIRNAME;
7602
+ var fs4, path5, SURFACES_DIRNAME, CROSS_BOUNDARY_TARGETS;
7594
7603
  var init_surfaces = __esm({
7595
7604
  "src/core/surfaces.ts"() {
7596
7605
  "use strict";
@@ -7605,6 +7614,7 @@ var init_surfaces = __esm({
7605
7614
  init_type_analysis();
7606
7615
  init_openapi();
7607
7616
  SURFACES_DIRNAME = "surfaces";
7617
+ CROSS_BOUNDARY_TARGETS = /* @__PURE__ */ new Set(["Portal", "Gateway", "Observer"]);
7608
7618
  }
7609
7619
  });
7610
7620
 
@@ -16533,7 +16543,7 @@ function defaultTargetConfig(type) {
16533
16543
  enabled: true
16534
16544
  };
16535
16545
  }
16536
- var WAIRON_VERSION = "5.0.2-dev.15";
16546
+ var WAIRON_VERSION = "5.0.2-dev.17";
16537
16547
  var GITHUB_REPO = "SYW-Apps/Waffle-AIron";
16538
16548
  var ARCHITECT_AGENT_ID = "agent-architect";
16539
16549
  var ARCHITECT_TEMPLATE_ID = "architect";