@dosu/cli 0.23.1 → 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.
- package/bin/dosu.js +25 -1
- package/package.json +1 -1
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.
|
|
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);
|
|
@@ -15309,6 +15310,29 @@ function reviewCommand() {
|
|
|
15309
15310
|
formatDate(i2.createdAt)
|
|
15310
15311
|
]), { rawData: items });
|
|
15311
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
|
+
});
|
|
15312
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) => {
|
|
15313
15337
|
const cfg = requireConfig9();
|
|
15314
15338
|
const client = createTypedClient(cfg);
|