@orkestrel/scaffold 0.0.52 → 0.0.54

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/bin/main.js CHANGED
@@ -871,7 +871,7 @@ var CLI = class CLI {
871
871
  const releases = this.#catalogReleases([...writable.runtime, ...writable.development], fetched.entries);
872
872
  const pins = this.#pin(releases, writable);
873
873
  this.#assertFetched(fetched.entries, fetched.mirrors);
874
- const guides = fetched.mirrors.length === 0 ? void 0 : fetched.mirrors.some((mirror) => mirror.lookup === "failed") ? "floor" : "live";
874
+ const guides = fetched.mirrors.length === 0 ? void 0 : fetched.mirrors.some((mirror) => mirror.lookup !== "found") ? "floor" : "live";
875
875
  const materializer = new Materializer({ host: host ?? readHostFloor() });
876
876
  let result;
877
877
  try {
@@ -1197,7 +1197,7 @@ var CLI = class CLI {
1197
1197
  });
1198
1198
  }
1199
1199
  #assertFetched(entries, mirrors) {
1200
- const failed = [...entries.filter((entry) => entry.lookup !== "found").map((entry) => entry.name), ...mirrors.filter((mirror) => mirror.lookup !== "found" && mirror.lookup !== "failed").map((mirror) => mirror.name)];
1200
+ const failed = [...entries.filter((entry) => entry.lookup !== "found").map((entry) => entry.name), ...mirrors.filter((mirror) => mirror.lookup !== "found" && mirror.lookup !== "failed" && mirror.lookup !== "missing").map((mirror) => mirror.name)];
1201
1201
  if (failed.length === 0) return;
1202
1202
  throw new ScaffoldError("FETCH", `Upstream produced no complete catalog answer for ${failed.join(", ")}.`, { names: failed.length });
1203
1203
  }
@@ -1469,10 +1469,15 @@ var CLI = class CLI {
1469
1469
  const ungated = [...expectedLines].filter(([project]) => !reachable.has(project)).sort(([left], [right]) => left.localeCompare(right)).filter(([project]) => isString(scripts[`test:${project}`]));
1470
1470
  if (ungated.length === 0) return void 0;
1471
1471
  const names = ungated.map(([project]) => project);
1472
- const declared = ungated.map(([project]) => `test:${project}`);
1472
+ const disk = parseJSON(text);
1473
+ const written = isRecord(disk) && isRecord(disk.scripts) ? disk.scripts : {};
1474
+ const direct = names.map((project) => `test:${project}`);
1475
+ const declared = direct.filter((script) => isString(written[script]));
1476
+ const undeclared = direct.filter((script) => !isString(written[script]));
1477
+ const remedies = [declared.length === 0 ? "" : `${declared.join(", ")} ${declared.length === 1 ? "is" : "are"} already declared, so the gate is missing rather than the script: invoke ${declared.length === 1 ? "it" : "each of them"} by name from the ${gateNames} chain.`, undeclared.length === 0 ? "" : `${undeclared.join(", ")} ${undeclared.length === 1 ? "is" : "are"} not declared, so the script is missing as well as the gate: declare ${undeclared.length === 1 ? "it" : "each of them"} and invoke ${undeclared.length === 1 ? "it" : "each of them"} by name from the ${gateNames} chain.`];
1473
1478
  return {
1474
1479
  field: "projects",
1475
- message: `${writing ? "The configs group is blocked because " : ""}the manifest at ${target} does not reach ${names.length === 1 ? "a Vitest project" : "Vitest projects"} the planned configuration registers: ${names.join(", ")}. No chain from ${gateNames} invokes ${names.length === 1 ? "it" : "them"}. ${declared.join(", ")} ${declared.length === 1 ? "is" : "are"} already declared, so the gate is missing rather than the script: invoke ${declared.length === 1 ? "it" : "each of them"} by name from the ${gateNames} chain.${writing ? " Exclude configs from --groups to write another group." : ""}`,
1480
+ message: `${writing ? "The configs group is blocked because " : ""}the manifest at ${target} does not reach ${names.length === 1 ? "a Vitest project" : "Vitest projects"} the planned configuration registers: ${names.join(", ")}. No chain from ${gateNames} invokes ${names.length === 1 ? "it" : "them"}. ${remedies.filter((remedy) => remedy !== "").join(" ")}${writing ? " Exclude configs from --groups to write another group." : ""}`,
1476
1481
  blocking: false,
1477
1482
  groups: ["configs"]
1478
1483
  };