@nodii/dev 0.6.123 → 0.6.124

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.123";
7
+ export const VERSION = "0.6.124";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");
package/dist/review.js CHANGED
@@ -525,14 +525,16 @@ export async function boundaryFrames(figma, { catalog, lookupSet = designCatalog
525
525
  /**
526
526
  * MW2-38.3: the nodes of the change sets a lane's agent holds in each
527
527
  * boundary file Dev registers as the design system. Returns
528
- * { fileKey: { changeSets: [id], nodes: [nodeId] } } for files with at least
529
- * one node. Dev's holderAgentId filter is checked again here, because a Dev
528
+ * { fileKey: { changeSets: [id], nodes: [nodeId] } } for every such file.
529
+ * hub-364: a DS file the change touches no unit of is still listed, with no
530
+ * nodes, so it is never checked whole for CLEAN: all of it is file debt
531
+ * (MW2-38.3: a whole-file DS check is never required). Dev's holderAgentId filter is checked again here, because a Dev
530
532
  * without it ignores the parameter and lists every set on the file. Items the
531
533
  * lane withdrew are left out; rejected items stay in until withdrawn. A
532
534
  * removed item's node is gone from Figma, so there is nothing to check.
533
535
  */
534
536
  export async function laneChangeSetNodes(request, agentId, fileKeys, templates = []) {
535
- if (!fileKeys.length || (!agentId && !templates.length)) return {};
537
+ if (!fileKeys.length) return {};
536
538
  const files = (await request("GET", "/api/v1/design/files")).data ?? [];
537
539
  const ds = new Set(files.filter((file) => file.kind === "design-system").map((file) => file.fileKey));
538
540
  const scoped = {};
@@ -558,7 +560,7 @@ export async function laneChangeSetNodes(request, agentId, fileKeys, templates =
558
560
  if (!nodes.has(unit.nodeId)) items.push({ nodeId: unit.nodeId, template: unit.template });
559
561
  nodes.add(unit.nodeId);
560
562
  }
561
- if (nodes.size) scoped[fileKey] = { changeSets, nodes: [...nodes], items, templates: [...new Set(touched.map((unit) => unit.template))] };
563
+ scoped[fileKey] = { changeSets, nodes: [...nodes], items, templates: [...new Set(touched.map((unit) => unit.template))] };
562
564
  }
563
565
  return scoped;
564
566
  }
@@ -662,9 +664,9 @@ export async function swapFor(swaps, { fileKey, nodeId }, readSet) {
662
664
 
663
665
  /**
664
666
  * DEV-REV-9, design-check part: designCheck on every boundary frame; per-state
665
- * frame comparison is Q-162. A boundary file with held change-set nodes
666
- * (MW2-38.3, from laneChangeSetNodes) is checked on those nodes only, never
667
- * as the whole file. A change-set node Figma no longer has, which a Swap in
667
+ * frame comparison is Q-162. A DS boundary file (MW2-38.3, from
668
+ * laneChangeSetNodes) is checked on the units the change touches only, never
669
+ * as the whole file for CLEAN; with no unit touched, nothing in it counts. A change-set node Figma no longer has, which a Swap in
668
670
  * Dev removes (MW8-5), is not a frame: like an item recorded as removed
669
671
  * (laneChangeSetNodes), there is nothing in Figma to check. It is left out of
670
672
  * the frames and listed in inputs.removed with its Swap (NODII-DEV-CLI-67).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.6.123",
3
+ "version": "0.6.124",
4
4
  "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {