@nodii/dev 0.6.56 → 0.6.57

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/core.js CHANGED
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
4
4
  import { homedir, platform } from "node:os";
5
5
  import { dirname, join } from "node:path";
6
6
 
7
- export const VERSION = "0.6.56";
7
+ export const VERSION = "0.6.57";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");
package/dist/lanes.js CHANGED
@@ -565,12 +565,13 @@ export async function laneCommand(action, args, flags, deps = {}) {
565
565
  if (action === "check") {
566
566
  const context = await gitContext();
567
567
  const lane = (await request("GET", `/api/v1/lanes/${encode(id)}`)).data;
568
+ // Any worktree the lane records or its current Freeze names (boundaries.repos).
569
+ const freeze = (await request("GET", `/api/v1/lanes/${encode(id)}/freeze`)).data?.freeze ?? null;
568
570
  const real = (path) => realpath(path).catch(() => path);
569
571
  const here = await real(context.worktree);
570
- const worktrees = [...(lane.repositories ?? []), ...(lane.freeze?.boundaries?.repos ?? []), { worktree: lane.worktree }].map((x) => x?.worktree).filter(Boolean);
572
+ const worktrees = [...new Set([...(lane.repositories ?? []), ...(freeze?.boundaries?.repos ?? []), ...(lane.freeze?.boundaries?.repos ?? []), { worktree: lane.worktree }].map((x) => x?.worktree).filter(Boolean))];
571
573
  if (!(await Promise.all(worktrees.map(real))).includes(here))
572
- throw new CliError("LANE_WORKTREE_REQUIRED", `Run lane check from ${ref}'s worktree (${worktrees.join(", ") || "none recorded"}); this is ${context.worktree}.`, 2);
573
- const freeze = (await request("GET", `/api/v1/lanes/${encode(id)}/freeze`)).data?.freeze ?? null;
574
+ throw new CliError("LANE_WORKTREE_REQUIRED", `Run lane check from one of ${ref}'s worktrees (${worktrees.join(", ") || "none recorded"}: registered, or named in its Freeze boundaries.repos); this is ${context.worktree}.`, 2);
574
575
  const current = { ...(await reviewContext()), branch: context.branch };
575
576
  const store = checkDeps.store ?? privateStore(context.worktree);
576
577
  const run = await runLaneCheck(ref, flags, {
package/dist/review.js CHANGED
@@ -435,11 +435,14 @@ export async function runLaneCheck(ref, flags, { request, lane, freeze, current,
435
435
  // Figma (DEV-REV-9): only a lane with a frontend side.
436
436
  let figma;
437
437
  if (!["frontend", "both"].includes(lane.side)) figma = { check: "figma", outcome: "NOT_APPLICABLE", iterationCount: 0, reviewerErrors: [], inputs: { side: lane.side ?? null }, findings: [] };
438
- else {
439
- const boundary = freeze?.boundaries?.figma;
438
+ else if (!Array.isArray(freeze?.boundaries?.figma) || !freeze.boundaries.figma.length) {
439
+ // Nothing to compare, so the leg is skipped, not crashed. Dev requires a
440
+ // frontend lane's figma check to run (NOT_APPLICABLE is refused there), so
441
+ // the skip records as unavailable and the run stays NOT CLEAN until it is set.
442
+ figma = errorCheck("figma", new ReviewerError(UNAVAILABLE, `skipped: ${ref} is a ${lane.side} lane, but its Freeze names no Figma boundary (boundaries.figma), so there is no frame to check and no design check ran. Dev requires a ${lane.side} lane's figma check to run, so this run is NOT CLEAN until the boundary is set: nodii-dev lane freeze swap ${ref} --section boundaries.`), firstRound("figma"), { side: lane.side, frames: [], frameComparison: "not_built", boundary: null });
443
+ } else {
444
+ const boundary = freeze.boundaries.figma;
440
445
  try {
441
- if (!Array.isArray(boundary) || !boundary.length)
442
- throw new ReviewerError("CRASH", `${ref} is a ${lane.side} lane, but its Freeze names no Figma boundary (boundaries.figma), so there is no frame to check. Set it with nodii-dev lane freeze swap ${ref} --section boundaries.`);
443
446
  let checked;
444
447
  try { checked = await figmaFindings(boundary, { catalog, check: designCheck }); }
445
448
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.6.56",
3
+ "version": "0.6.57",
4
4
  "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {