@coderook/cli 0.46.10 → 0.46.11

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.46.10",
5
+ "version": "0.46.11",
6
6
  "author": {
7
7
  "name": "ACCA Gaming Productions",
8
8
  "url": "https://coderook.com"
@@ -3546,7 +3546,7 @@ const SPECS = [
3546
3546
  name: "mods",
3547
3547
  group: "Mods and bundles",
3548
3548
  summary: "mod repositories for games: set one up, publish to one",
3549
- usage: "mods <create|repos|info|settings|builds|list|publish|remove|block|reports|delete> …",
3549
+ usage: "mods <create|repos|info|settings|builds|list|publish|remove|recheck|block|reports|delete> …",
3550
3550
  brief: "mods <action> …",
3551
3551
  detail: "A mod repository is where a game's players get mods from. Its owner\n" +
3552
3552
  "sets the rules — which file types a mod may hold, archives opened and\n" +
@@ -3564,6 +3564,8 @@ const SPECS = [
3564
3564
  " publish <folder|zip> --repo <repo> upload a mod; waits for its checks\n" +
3565
3565
  " list <repo> [--all] your mods and how their checks went\n" +
3566
3566
  " remove <mod> --repo <repo> take a mod down\n" +
3567
+ " recheck <mod> --repo <repo> check again: a part in error (an upload the scanner never\n" +
3568
+ " got to), or a live part with --part\n" +
3567
3569
  " block <username> --repo <repo> stop an uploader (owner)\n" +
3568
3570
  " reports <repo> what players reported (owner)\n" +
3569
3571
  " delete <repo> delete a repository and everything in it",
@@ -448,6 +448,49 @@ async function remove(parsed) {
448
448
  console.log((0, colour_js_1.green)(`Removed ${id}.`));
449
449
  return 0;
450
450
  }
451
+ /*
452
+ Check a part again: what is live, or an upload the scanner never managed to
453
+ look at ("The upload is retained; …check it again"). Nothing could do the
454
+ second until 2026-11-11, so four uploads sat in "error". Without --part,
455
+ every part of the mod that is in error.
456
+ */
457
+ async function recheck(parsed) {
458
+ const id = parsed.positional[1];
459
+ const slug = flag(parsed, "repo");
460
+ if (!id || !slug) {
461
+ console.error((0, colour_js_1.red)("Usage: cbx mods recheck <mod> --repo <repo> [--part <id>] [--as-owner]"));
462
+ return 1;
463
+ }
464
+ const scope = has(parsed, "as-owner") ? "admin" : "my";
465
+ const base = `${ROOT}/${encodeURIComponent(slug)}/${scope}/mods/${encodeURIComponent(id)}`;
466
+ let parts;
467
+ const named = flag(parsed, "part");
468
+ if (named)
469
+ parts = [named];
470
+ else {
471
+ const view = await call(base);
472
+ if (view.status !== 200)
473
+ return fail(view, `Reading ${id}`);
474
+ parts = view.body.parts.filter((part) => part.check.state === "error").map((part) => part.part);
475
+ if (!parts.length) {
476
+ console.log((0, colour_js_1.dim)(`No part of ${id} is in error. Name one with --part to check a live part again.`));
477
+ return 0;
478
+ }
479
+ }
480
+ let failed = 0;
481
+ for (const part of parts) {
482
+ const answer = await call(`${base}/parts/${encodeURIComponent(part)}/recheck`, "POST", {});
483
+ if (answer.status !== 200 && answer.status !== 202) {
484
+ failed += 1;
485
+ fail(answer, `Checking ${id}/${part} again`);
486
+ continue;
487
+ }
488
+ console.log(`${(0, colour_js_1.accent)(part)} ${(0, colour_js_1.dim)(answer.body.check === "checking" ? "being checked" : answer.body.check === "queued" ? "queued for the scanner" : answer.body.check)}`);
489
+ }
490
+ if (parts.length > failed)
491
+ console.log((0, colour_js_1.dim)(`\nFollow it with cbx mods list ${slug}.`));
492
+ return failed ? 1 : 0;
493
+ }
451
494
  async function block(parsed) {
452
495
  const account = parsed.positional[1];
453
496
  const slug = flag(parsed, "repo");
@@ -508,6 +551,7 @@ async function commandMods(parsed) {
508
551
  case "list": return mine(parsed);
509
552
  case "publish": return publish(parsed);
510
553
  case "remove": return remove(parsed);
554
+ case "recheck": return recheck(parsed);
511
555
  case "block": return block(parsed);
512
556
  case "reports": return reports(parsed);
513
557
  case "delete": return deleteRepo(parsed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderook/cli",
3
- "version": "0.46.10",
3
+ "version": "0.46.11",
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",