@dosu/cli 0.23.0 → 0.24.0

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.
Files changed (2) hide show
  1. package/bin/dosu.js +32 -7
  2. package/package.json +2 -2
package/bin/dosu.js CHANGED
@@ -4577,7 +4577,7 @@ var init_dist4 = __esm(() => {
4577
4577
  function getVersionString() {
4578
4578
  return `v${VERSION}`;
4579
4579
  }
4580
- var VERSION = "0.23.0", INSTALL_CHANNEL = "npm";
4580
+ var VERSION = "0.24.0", INSTALL_CHANNEL = "npm";
4581
4581
 
4582
4582
  // src/debug/logger.ts
4583
4583
  import {
@@ -15253,6 +15253,7 @@ ${import_picocolors17.default.dim(`Current: ${cfg.org_id}`)}`);
15253
15253
  }
15254
15254
 
15255
15255
  // src/commands/review.ts
15256
+ init_dist();
15256
15257
  init_commander();
15257
15258
  init_trpc();
15258
15259
  var import_picocolors18 = __toESM(require_picocolors(), 1);
@@ -15300,14 +15301,38 @@ function reviewCommand() {
15300
15301
  console.log(import_picocolors18.default.dim("No pending review items."));
15301
15302
  return;
15302
15303
  }
15303
- printTable(["Version ID", "Title", "Source", "Status", "Created"], items.map((i2) => [
15304
- i2.pageVersionId.slice(0, 8),
15304
+ printTable(["ID", "Kind", "Title", "Source", "Status", "Created"], items.map((i2) => [
15305
+ i2.id.slice(0, 8),
15306
+ i2.kind,
15305
15307
  truncate(i2.title ?? "(untitled)", 40),
15306
15308
  humanizeSource(i2.origin, i2.version),
15307
15309
  i2.pendingStatus,
15308
15310
  formatDate(i2.createdAt)
15309
15311
  ]), { rawData: items });
15310
15312
  });
15313
+ cmd.command("diff").description("Show the server-rendered diff for a pending document version").argument("<page-version-id>", "Page version ID (from `dosu review list`)").option("--json", "Output as JSON").action(async (id, opts) => {
15314
+ const cfg = requireConfig9();
15315
+ const client = createTypedClient(cfg);
15316
+ let change;
15317
+ try {
15318
+ change = await client.review.getChange.query({ id });
15319
+ } catch (err) {
15320
+ if (isTRPCClientError(err) && err.data?.code === "NOT_FOUND") {
15321
+ console.error(import_picocolors18.default.red(`No review item found for '${id}'. Run 'dosu review list' to see pending items.`));
15322
+ process.exit(1);
15323
+ }
15324
+ throw err;
15325
+ }
15326
+ if (opts.json) {
15327
+ printResult(change, opts);
15328
+ return;
15329
+ }
15330
+ const versions = change.publishedVersion != null ? `v${change.publishedVersion} → v${change.version}` : `v${change.version}`;
15331
+ console.log(import_picocolors18.default.bold(change.title));
15332
+ console.log(import_picocolors18.default.dim(`${change.source} · ${versions}`));
15333
+ console.log("");
15334
+ console.log(change.diff);
15335
+ });
15311
15336
  cmd.command("context").description("Get review context for a thread").argument("<thread-id>", "Thread ID").option("--json", "Output as JSON").action(async (threadId, opts) => {
15312
15337
  const cfg = requireConfig9();
15313
15338
  const client = createTypedClient(cfg);
@@ -15339,18 +15364,18 @@ function reviewCommand() {
15339
15364
  }
15340
15365
  ];
15341
15366
  for (const { name, action, description } of actions) {
15342
- cmd.command(name).description(description).argument("<page-version-id>", "Page version ID").option("--json", "Output as JSON").action(async (pageVersionId, opts) => {
15367
+ cmd.command(name).description(description).argument("<id>", "Review item ID (from `dosu review list`)").option("--json", "Output as JSON").action(async (id, opts) => {
15343
15368
  const cfg = requireConfig9();
15344
15369
  const client = createTypedClient(cfg);
15345
15370
  await client.page.updatePublicationStatus.mutate({
15346
- page_version_id: pageVersionId,
15371
+ page_version_id: id,
15347
15372
  action
15348
15373
  });
15349
15374
  if (opts.json) {
15350
- printResult({ success: true, page_version_id: pageVersionId, action }, opts);
15375
+ printResult({ success: true, id, action }, opts);
15351
15376
  return;
15352
15377
  }
15353
- console.log(import_picocolors18.default.green(`Review ${name}: ${pageVersionId.slice(0, 8)}`));
15378
+ console.log(import_picocolors18.default.green(`Review ${name}: ${id.slice(0, 8)}`));
15354
15379
  });
15355
15380
  }
15356
15381
  return cmd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "description": "Dosu CLI - Manage MCP servers for AI tools",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@biomejs/biome": "^2.5.0",
39
39
  "@clack/prompts": "^1.6.0",
40
- "@dosu/api-types": "0.0.24",
40
+ "@dosu/api-types": "0.0.33",
41
41
  "@semantic-release/changelog": "^6.0.3",
42
42
  "@semantic-release/exec": "^7.1.0",
43
43
  "@semantic-release/git": "^10.0.1",