@wairon/cli 5.1.1-dev.67 → 5.1.1-dev.68

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 CHANGED
@@ -65,7 +65,7 @@ var init_defaults = __esm({
65
65
  copilot: ".github/prompts",
66
66
  codex: ".codex/agents"
67
67
  };
68
- WAIRON_VERSION = "5.1.1-dev.67";
68
+ WAIRON_VERSION = "5.1.1-dev.68";
69
69
  GITHUB_REPO = "SYW-Apps/Waffle-AIron";
70
70
  SUPPORTED_ALIASES = ["wai"];
71
71
  SCAN_EXCLUDE_DIRS = /* @__PURE__ */ new Set([
@@ -14394,19 +14394,34 @@ var init_export_conformance = __esm({
14394
14394
  }
14395
14395
  }
14396
14396
  const takenFrom = /* @__PURE__ */ new Map();
14397
+ const take = (consumer, writtenIn, specifier, names) => {
14398
+ const target = resolveImport(writtenIn, specifier, code.paths);
14399
+ if (!target) return;
14400
+ let byName = takenFrom.get(target);
14401
+ if (!byName) takenFrom.set(target, byName = /* @__PURE__ */ new Map());
14402
+ for (const name of names) {
14403
+ if (!name) continue;
14404
+ let takers = byName.get(name);
14405
+ if (!takers) byName.set(name, takers = /* @__PURE__ */ new Set());
14406
+ takers.add(consumer);
14407
+ }
14408
+ };
14397
14409
  for (const consumer of realization.paths) {
14398
14410
  if (!code.exactPaths.has(consumer)) continue;
14399
- for (const [local, binding] of Object.entries(code.factsAt(consumer)?.importBindings ?? {})) {
14411
+ const facts = code.factsAt(consumer);
14412
+ if (!facts) continue;
14413
+ for (const [local, binding] of Object.entries(facts.importBindings ?? {})) {
14400
14414
  if (binding.namespace) continue;
14401
- const target = resolveImport(consumer, binding.from, code.paths);
14402
- if (!target) continue;
14403
- let names = takenFrom.get(target);
14404
- if (!names) takenFrom.set(target, names = /* @__PURE__ */ new Map());
14405
- for (const name of [local, binding.imported]) {
14406
- if (!name) continue;
14407
- let takers = names.get(name);
14408
- if (!takers) names.set(name, takers = /* @__PURE__ */ new Set());
14409
- takers.add(consumer);
14415
+ take(consumer, consumer, binding.from, [local, binding.imported]);
14416
+ }
14417
+ for (const sites of Object.values(facts.functionCallSites ?? {})) {
14418
+ for (const site of sites) {
14419
+ if (!site.member || !site.via) continue;
14420
+ const writtenIn = site.from ? pathKey(site.from) : consumer;
14421
+ const scope = site.from ? code.factsAt(writtenIn) : facts;
14422
+ if (!scope) continue;
14423
+ const binding = importBindingOf(scope, site.via);
14424
+ if (binding?.namespace) take(consumer, writtenIn, binding.from, [site.name]);
14410
14425
  }
14411
14426
  }
14412
14427
  }