@erdoai/cli 0.57.0 → 0.58.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/dist/index.js +19 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1385,6 +1385,18 @@ function timedOutMessage(threadID) {
1385
1385
  function print(value) {
1386
1386
  console.log(JSON.stringify(value, null, 2));
1387
1387
  }
1388
+ function printPageReview(review) {
1389
+ if (!review) return;
1390
+ if (!review.reviewed) {
1391
+ console.error(`review: not run${review.reason ? ` (${review.reason})` : ""}`);
1392
+ return;
1393
+ }
1394
+ console.error(`review: ${review.summary || `${review.issues?.length ?? 0} issue(s)`}`);
1395
+ for (const issue of review.issues || []) {
1396
+ console.error(` [${issue.severity}/${issue.category}] ${issue.description}`);
1397
+ if (issue.suggestion) console.error(` fix: ${issue.suggestion}`);
1398
+ }
1399
+ }
1388
1400
  function printAlignedTable(columns, rows) {
1389
1401
  const cell = (v) => v === null || v === void 0 ? "" : typeof v === "object" ? JSON.stringify(v) : String(v);
1390
1402
  const widths = columns.map((c, i) => Math.max(c.length, ...rows.map((r) => cell(r[i]).length), 0));
@@ -3397,7 +3409,10 @@ pagesCmd.command("update <id>").description(
3397
3409
  ).option("--title <title>", "new title").option("--html <htmlOr@file>", "HTML (or @path to a file)").option("--js <jsOr@file>", "JS/JSX (or @path)").option("--css <cssOr@file>", "CSS (or @path)").option(
3398
3410
  "--meta-title <title>",
3399
3411
  'new public SEO title (omit to keep current; pass "" to clear back to the default)'
3400
- ).option("--meta-description <description>", 'new public SEO description (omit to keep current; pass "" to clear)').option("--datasets <csv>", 'replacement read-dataset slugs ("[]" clears)').option("--writable-datasets <csv>", 'replacement writable-dataset slugs ("[]" clears)').option("--kv <csv>", 'replacement read KV-store slugs ("[]" clears)').option("--writable-kv <csv>", 'replacement writable KV-store slugs ("[]" clears)').option("--public", "make the page publicly viewable").option("--private", "make the page private").action(
3412
+ ).option("--meta-description <description>", 'new public SEO description (omit to keep current; pass "" to clear)').option("--datasets <csv>", 'replacement read-dataset slugs ("[]" clears)').option("--writable-datasets <csv>", 'replacement writable-dataset slugs ("[]" clears)').option("--kv <csv>", 'replacement read KV-store slugs ("[]" clears)').option("--writable-kv <csv>", 'replacement writable KV-store slugs ("[]" clears)').option("--public", "make the page publicly viewable").option("--private", "make the page private").option(
3413
+ "--request-review",
3414
+ "ask the judge lenses to review the page after this update and report findings -- for material edits to a LIVE page (layout, forms/CTA, legal/compliance copy, restructured sections), not cosmetic tweaks. First builds and full rewrites are already reviewed automatically"
3415
+ ).action(
3401
3416
  async (id, opts) => {
3402
3417
  try {
3403
3418
  const res = await new ErdoClient().updatePage(id, {
@@ -3411,10 +3426,12 @@ pagesCmd.command("update <id>").description(
3411
3426
  writable_dataset_slugs: grantList(opts.writableDatasets),
3412
3427
  kv_slugs: grantList(opts.kv),
3413
3428
  writable_kv_slugs: grantList(opts.writableKv),
3414
- public: opts.public ? true : opts.private ? false : void 0
3429
+ public: opts.public ? true : opts.private ? false : void 0,
3430
+ request_review: !!opts.requestReview
3415
3431
  });
3416
3432
  console.log(`${res.id} ${res.public_url || res.url}`);
3417
3433
  if (res.warning) console.error(`warning: ${res.warning}`);
3434
+ printPageReview(res.review);
3418
3435
  } catch (e) {
3419
3436
  fail(e);
3420
3437
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {