@nodii/dev 0.6.63 → 0.6.65

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/README.md CHANGED
@@ -1031,6 +1031,12 @@ Change sets, their file locks and the old agent's other claims move too, unless
1031
1031
  that agent has another active lane; then they stay and are listed. Move one
1032
1032
  with `figma transfer CS --to LANE --reason TEXT`.
1033
1033
 
1034
+ A lane that has ended stays ended, so `lane transfer` refuses it
1035
+ (`LANE_ALREADY_TERMINAL`). Its open change sets still move: the holder's machine
1036
+ coordinator or staff runs `figma transfer`, which needs a target that is a live
1037
+ lane's agent (`TRANSFER_TARGET_NOT_LIVE_LANE`) and holds no other lock on that
1038
+ file (`TARGET_HOLDS_FILE_LOCK`).
1039
+
1034
1040
  `coordinator start --machine NAME` registers the machine's one watched
1035
1041
  coordinator run and shows its running lanes, orphaned runs and unclaimed
1036
1042
  results. A live second coordinator is refused; a coordinator whose heartbeat
package/dist/cli.js CHANGED
@@ -46,6 +46,10 @@ import {
46
46
  figmaScopeSet,
47
47
  figmaScopeSetText,
48
48
  figmaSubmit,
49
+ figmaWithdrawItems,
50
+ figmaWithdrawItemsText,
51
+ WITHDRAW_ITEMS_USAGE,
52
+ withdrawItemsFrom,
49
53
  checkSubmitPayload,
50
54
  assertContext,
51
55
  resubmitPayload,
@@ -55,7 +59,7 @@ import {
55
59
  scopesFrom,
56
60
  conformanceLines,
57
61
  } from "./figma.js";
58
- export { figmaLock, submitMode } from "./figma.js";
62
+ export { figmaLock, figmaWithdrawItems, figmaWithdrawItemsText, submitMode, withdrawItemsFrom } from "./figma.js";
59
63
  import { tuneCommand } from "./tune.js";
60
64
  import { PICKER_MODEL, TUNING_MODELS, measurePickerLatency, pickTimingStats, pickTimingText, pickTimingsPath, readPickTimings } from "./gather.js";
61
65
  import { docsCommand, rulebookCommand, rulesCommand } from "./upload.js";
@@ -162,7 +166,17 @@ Usage: nodii-dev <command> [options] [--json]
162
166
  # submit, resubmit and design check --change-set run as a job in Dev
163
167
  # and poll it (a large set outlasts the edge's timeout); --sync waits
164
168
  # on one request instead. A 502/504 is checked against the set, never resent
169
+ figma transfer CHANGE_SET --to LANE --reason TEXT
170
+ # coordinator or staff: move an open set, with its lock and scopes, to a live
171
+ # lane's agent, even from a stopped lane. The target can hold no other lock on
172
+ # the file (TARGET_HOLDS_FILE_LOCK)
165
173
  figma withdraw CHANGE_SET # holder takes back a submit: in_review -> editing (or a re-submit -> applying)
174
+ figma withdraw CHANGE_SET --items ID[,ID] --reason TEXT
175
+ # holder, coordinator or operator: take rejected items (item or node ids)
176
+ # out of an applying set so apply takes the approved ones. Each item's nodes
177
+ # must be back at the set's base version first (CHANGE_ITEM_NOT_AT_BASE lists
178
+ # the ones that differ); a withdrawn item never publishes, and the scopes only
179
+ # it sat in are released
166
180
  figma resubmit CHANGE_SET PAYLOAD.json [--sync] [--dry-run]
167
181
  # holder re-submits every rejected item: applying -> in_review, round + 1;
168
182
  # each item needs context, each variant name and context; writeUp optional
@@ -1185,8 +1199,14 @@ export async function main(argv = process.argv.slice(2)) {
1185
1199
  `${rest[0]}: moved to lane ${to}'s agent ${toAgentId}.`,
1186
1200
  );
1187
1201
  }
1188
- if (action === "withdraw")
1202
+ if (action === "withdraw") {
1203
+ if (rest.length > 1) throw new CliError("USAGE", `figma withdraw CHANGE_SET | ${WITHDRAW_ITEMS_USAGE}`, 2);
1204
+ if (f.items !== undefined)
1205
+ return emit(await figmaWithdrawItems(rest[0], withdrawItemsFrom(f), f.reason === true ? "" : f.reason), json, (p) => figmaWithdrawItemsText(rest[0], p.data));
1206
+ if (f.reason !== undefined)
1207
+ throw new CliError("USAGE", `--reason goes with --items: ${WITHDRAW_ITEMS_USAGE} (a whole submit is withdrawn with: figma withdraw CHANGE_SET)`, 2);
1189
1208
  return emit(await figmaWithdraw(rest[0]), json, (p) => `Withdrew ${rest[0]}; it is back in ${p.data?.state ?? "editing"}.`);
1209
+ }
1190
1210
  if (action === "resubmit")
1191
1211
  return emit(await figmaResubmit(rest[0], rest[1], { sync: submitMode(f) }), json, (p) =>
1192
1212
  [`Re-submitted ${rest[0]}; it is ${p.data.state}.`, figmaChangeSetText(p.data), ...conformanceLines({ warnings: p.warnings })].join("\n"));
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.63";
7
+ export const VERSION = "0.6.65";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");