@coderook/cli 0.34.1 → 0.34.2

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.
@@ -2,7 +2,7 @@
2
2
  "name": "coderook",
3
3
  "displayName": "CodeRook",
4
4
  "description": "Save, browse and restore whole-snapshot versions of a project on CodeRook, with cbx or plain git, from Claude Code.",
5
- "version": "0.34.1",
5
+ "version": "0.34.2",
6
6
  "author": {
7
7
  "name": "ACCA Gaming Productions",
8
8
  "url": "https://coderook.com"
@@ -258,7 +258,19 @@ async function reconcile(folder, options = {}) {
258
258
  return { link: link ?? null, baseline: null, behind: null, member };
259
259
  }
260
260
  const downloader = new download_js_1.Downloader(config_js_1.credentials);
261
- const latest = (await downloader.versions(project.id))[0];
261
+ const all = await downloader.versions(project.id);
262
+ /*
263
+ The head of this folder's line, not the newest version in the project.
264
+
265
+ They differ after `cbx undo`: the line goes back to v41 and v42 stays in
266
+ the history, passed over. Taking the newest here linked a folder "at v42",
267
+ and its first save — sent after uploading everything — was refused because
268
+ v42 is not on the line it was saving to. fetchInto learned the same thing.
269
+ */
270
+ const lineName = link?.track ?? project.defaultBranch ?? "main";
271
+ const line = (await new tracks_js_1.Tracks(config_js_1.credentials).list(project.id)).find((candidate) => candidate.kind === "line" && candidate.name === lineName);
272
+ const latest = (line?.headVersionId && all.find((version) => version.id === line.headVersionId)) ||
273
+ all[0];
262
274
  if (!latest)
263
275
  return { link: link ?? null, baseline: null, behind: null, member };
264
276
  /*
@@ -1142,7 +1154,7 @@ Pass ${accent("--allow-secrets")} if these are not real keys.`);
1142
1154
  console.log(`${accent("Upload plan")} ${bytes(plan.sourceBytes)} selected → ` +
1143
1155
  `${bytes(plan.compactedBytes)} compacted; ${bytes(plan.chargeableBytes)} new storage.`);
1144
1156
  console.log(plan.allowance.exempt
1145
- ? dim("Annual plan: the monthly staged upload allowance does not apply.")
1157
+ ? dim("No monthly upload steps on this plan; the storage limit is the only one.")
1146
1158
  : dim(`Monthly stage ${plan.allowance.stage}: ${plan.allowance.unlockedPercent}% unlocked, ` +
1147
1159
  `${bytes(plan.allowance.remainingBytes)} remains after this reservation.`));
1148
1160
  if (dryRun) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderook/cli",
3
- "version": "0.34.1",
3
+ "version": "0.34.2",
4
4
  "description": "The command line for CodeRook (coderook.com): version control and project hosting for projects of any size. Every save is a compressed snapshot, private or public, never used to train AI.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://coderook.com",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: coderook
3
- description: Save, browse and restore versions of a project on CodeRook — a version host where every version is a complete snapshot, reached with the cbx command or with plain git. Use when asked to save, submit or push work to CodeRook, check what has changed, look at a project's versions or files, fetch a project, start or switch a line of work, or resolve a save that landed at the same time as somebody else's.
3
+ description: Save, browse and restore versions of a project on CodeRook — a version host where every version is a complete snapshot, reached with the cbx command or with plain git. Use when asked to save, submit or push work to CodeRook, check what has changed, look at a project's versions or files, fetch a project, start or switch a line of work, resolve a save that landed at the same time as somebody else's, or build a project's executables for Windows, Linux and macOS from one machine (cbx build).
4
4
  allowed-tools: Bash Read
5
5
  ---
6
6