@decocms/parity 0.33.20 → 0.33.22

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/cli.js +157 -21
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -39527,6 +39527,9 @@ var REPORT_CSS = `
39527
39527
  .dash-hero-info .verdict-text.pass { color: var(--state-good); }
39528
39528
  .dash-hero-info .verdict-text.warn { color: var(--state-warn); }
39529
39529
  .dash-hero-info .verdict-text.fail { color: var(--state-bad); }
39530
+ /* Muted on purpose: an inconclusive run has no result, so it should not compete for attention
39531
+ with a real pass/fail the way a red or green headline would. */
39532
+ .dash-hero-info .verdict-text.inconclusive { color: var(--text-muted); }
39530
39533
  .dash-hero-info .verdict-sub { color: var(--text-secondary); font-size: 14px; }
39531
39534
  .dash-hero-info .verdict-meta { color: var(--text-muted); font-size: 12px; margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
39532
39535
  .dash-hero-info .verdict-meta span strong { color: var(--text-primary); font-weight: 600; }
@@ -39621,6 +39624,7 @@ var REPORT_CSS = `
39621
39624
  .status-warn { background: rgba(245, 166, 35, 0.15); color: var(--state-warn); }
39622
39625
  .status-fail { background: rgba(229, 72, 77, 0.15); color: var(--state-bad); }
39623
39626
  .status-skipped { background: rgba(138, 147, 166, 0.15); color: var(--text-muted); }
39627
+ .status-inconclusive { background: rgba(138, 147, 166, 0.15); color: var(--text-muted); }
39624
39628
 
39625
39629
  /* Issue card v2 */
39626
39630
  .issue {
@@ -41515,7 +41519,7 @@ var SeoSummary = z.object({
41515
41519
  pagesWithIssues: z.number()
41516
41520
  });
41517
41521
  var Verdict = z.object({
41518
- status: z.enum(["pass", "warn", "fail"]),
41522
+ status: z.enum(["pass", "warn", "fail", "inconclusive"]),
41519
41523
  score: z.number().min(0).max(100),
41520
41524
  scoreVersion: z.number().optional(),
41521
41525
  pagesAnalyzed: z.number().optional(),
@@ -54316,6 +54320,9 @@ function derivePagesAnalyzed(checks, issues) {
54316
54320
  const distinctPages = new Set(issues.filter((i) => i.page).map((i) => i.page));
54317
54321
  return Math.max(1, distinctPages.size);
54318
54322
  }
54323
+ function measuredNothing(checks) {
54324
+ return checks.length === 0;
54325
+ }
54319
54326
  function computeVerdict(checks, issues, opts) {
54320
54327
  const counts = { critical: 0, high: 0, medium: 0, low: 0 };
54321
54328
  for (const i of issues)
@@ -54326,9 +54333,11 @@ function computeVerdict(checks, issues, opts) {
54326
54333
  const checksWarn = checks.filter((c) => c.status === "warn").length;
54327
54334
  const pagesAnalyzed = opts?.pagesAnalyzed ?? derivePagesAnalyzed(checks, issues);
54328
54335
  let { score } = computeScore(issues, { pagesAnalyzed });
54329
- const status = counts.critical > 0 || checksFailed > 0 ? "fail" : counts.high > 0 || checksWarn > 0 ? "warn" : "pass";
54336
+ const status = measuredNothing(checks) ? "inconclusive" : counts.critical > 0 || checksFailed > 0 ? "fail" : counts.high > 0 || checksWarn > 0 ? "warn" : "pass";
54330
54337
  if (status === "fail")
54331
54338
  score = Math.min(score, FAIL_SCORE_CAP);
54339
+ if (status === "inconclusive")
54340
+ score = 0;
54332
54341
  return {
54333
54342
  status,
54334
54343
  score,
@@ -54408,8 +54417,9 @@ function computeCompositeVerdict(moduleVerdicts, checks, issues) {
54408
54417
  weightSum += weight;
54409
54418
  totalPagesAnalyzed = Math.max(totalPagesAnalyzed, mv.pagesAnalyzed);
54410
54419
  }
54411
- let score = weightSum > 0 ? Math.round(weightedScoreSum / weightSum) : 100;
54412
- const status = counts.critical > 0 || checksFailed > 0 || moduleVerdicts.some((mv) => mv.status === "fail") ? "fail" : counts.high > 0 || checksWarn > 0 || moduleVerdicts.some((mv) => mv.status === "warn") ? "warn" : "pass";
54420
+ const nothingMeasured = weightSum === 0 || measuredNothing(checks);
54421
+ let score = nothingMeasured ? 0 : Math.round(weightedScoreSum / weightSum);
54422
+ const status = nothingMeasured ? "inconclusive" : counts.critical > 0 || checksFailed > 0 || moduleVerdicts.some((mv) => mv.status === "fail") ? "fail" : counts.high > 0 || checksWarn > 0 || moduleVerdicts.some((mv) => mv.status === "warn") ? "warn" : "pass";
54413
54423
  if (status === "fail")
54414
54424
  score = Math.min(score, FAIL_SCORE_CAP);
54415
54425
  return {
@@ -54824,9 +54834,10 @@ function tabHelp(text) {
54824
54834
  }
54825
54835
  function renderDashboard2(run) {
54826
54836
  const v = run.verdict;
54827
- const statusLabel = v.status === "pass" ? "Excellent" : v.status === "warn" ? "Warnings" : "Critical";
54828
- const ringColor = v.status === "pass" ? "var(--state-good)" : v.status === "warn" ? "var(--state-warn)" : "var(--state-bad)";
54829
- const ringDeg = `${Math.round(v.score / 100 * 360)}deg`;
54837
+ const inconclusive = v.status === "inconclusive";
54838
+ const statusLabel = inconclusive ? "Inconclusive" : v.status === "pass" ? "Excellent" : v.status === "warn" ? "Warnings" : "Critical";
54839
+ const ringColor = inconclusive ? "var(--text-dim, #888)" : v.status === "pass" ? "var(--state-good)" : v.status === "warn" ? "var(--state-warn)" : "var(--state-bad)";
54840
+ const ringDeg = inconclusive ? "0deg" : `${Math.round(v.score / 100 * 360)}deg`;
54830
54841
  const prev = run.previousRun;
54831
54842
  const deltaChip = prev ? (() => {
54832
54843
  const up = prev.scoreDelta > 0;
@@ -54839,13 +54850,13 @@ function renderDashboard2(run) {
54839
54850
  return `
54840
54851
  <div class="dash-hero">
54841
54852
  <div class="health-score" style="--ring-color:${ringColor};--ring-deg:${ringDeg}">
54842
- <div class="score-num">${v.score}<small>/100</small></div>
54853
+ <div class="score-num">${inconclusive ? "—" : `${v.score}<small>/100</small>`}</div>
54843
54854
  <div class="score-label">Health</div>
54844
54855
  </div>
54845
54856
  <div class="dash-hero-info">
54846
54857
  <div class="verdict-text ${v.status}">${statusLabel}</div>
54847
- ${deltaChip}
54848
- <div class="verdict-sub">${v.critical + v.high} blocking issue${v.critical + v.high !== 1 ? "s" : ""} ${v.critical > 0 ? `(${v.critical} critical)` : ""}</div>
54858
+ ${inconclusive ? "" : deltaChip}
54859
+ <div class="verdict-sub">${inconclusive ? "Nothing was measured — 0 checks ran, so this run says nothing about parity." : `${v.critical + v.high} blocking issue${v.critical + v.high !== 1 ? "s" : ""} ${v.critical > 0 ? `(${v.critical} critical)` : ""}`}</div>
54849
54860
  <div class="verdict-meta">
54850
54861
  <span><strong>${v.checksPassed}</strong> checks pass</span>
54851
54862
  <span><strong>${v.checksFailed}</strong> fail</span>
@@ -57602,6 +57613,41 @@ async function getContentTypes(cfg, call = callCms) {
57602
57613
  async function getSchemaMeta(cfg, call = callCms) {
57603
57614
  return call(cfg, { path: `${SCHEMAS}/${cfg.account}.${cfg.store}` });
57604
57615
  }
57616
+ var REGISTRY_BASE = "https://api.vtexcommercestable.com.br/api/content-platform/schemas";
57617
+ var callRegistry = async (cfg, path, init = {}) => {
57618
+ const method = init.method ?? "GET";
57619
+ const res = await fetch(`${REGISTRY_BASE}/${path}`, {
57620
+ method,
57621
+ headers: {
57622
+ authorization: `Bearer ${cfg.token}`,
57623
+ accept: "application/json",
57624
+ ...init.body === undefined ? {} : { "content-type": "application/json" }
57625
+ },
57626
+ ...init.body === undefined ? {} : { body: JSON.stringify(init.body) }
57627
+ });
57628
+ const text = await res.text().catch(() => "");
57629
+ if (!res.ok) {
57630
+ throw new Error(`${method} ${path}: HTTP ${res.status} ${text.slice(0, 300)}`);
57631
+ }
57632
+ return text ? JSON.parse(text) : {};
57633
+ };
57634
+ async function listSchemaVersions(cfg, call = callRegistry) {
57635
+ try {
57636
+ const rows = await call(cfg, `${cfg.account}.${cfg.store}/versions`);
57637
+ return Array.isArray(rows) ? rows : [];
57638
+ } catch (err) {
57639
+ if (err instanceof Error && /HTTP 404/.test(err.message))
57640
+ return [];
57641
+ throw err;
57642
+ }
57643
+ }
57644
+ async function publishSchema(cfg, schema, call = callRegistry) {
57645
+ const id = typeof schema.$id === "string" ? schema.$id : "";
57646
+ if (!id.includes("@")) {
57647
+ throw new Error("publishSchema: schema.$id must include an explicit version (account.store@1.0.0).");
57648
+ }
57649
+ await call(cfg, id, { method: "PUT", body: schema });
57650
+ }
57605
57651
 
57606
57652
  // src/cms/authoring.ts
57607
57653
  function unwrapValue(node) {
@@ -57881,6 +57927,22 @@ function propertyDrift(published, repoDir) {
57881
57927
  }
57882
57928
  return drift;
57883
57929
  }
57930
+ var SEMVER = /^(\d+)\.(\d+)\.(\d+)$/;
57931
+ function suggestNextSchemaVersion(versions) {
57932
+ let best = null;
57933
+ for (const row of versions) {
57934
+ const parsed = typeof row.version === "string" ? SEMVER.exec(row.version.split("-")[0] ?? "") : null;
57935
+ const tuple = parsed ? { major: Number(parsed[1]), minor: Number(parsed[2]), patch: Number(parsed[3]) } : row.major !== undefined && row.minor !== undefined && row.patch !== undefined ? { major: row.major, minor: row.minor, patch: row.patch } : null;
57936
+ if (!tuple)
57937
+ continue;
57938
+ if (!best || tuple.major > best.major || tuple.major === best.major && tuple.minor > best.minor || tuple.major === best.major && tuple.minor === best.minor && tuple.patch > best.patch) {
57939
+ best = tuple;
57940
+ }
57941
+ }
57942
+ if (!best)
57943
+ return "1.0.0";
57944
+ return `${best.major}.${best.minor + 1}.0`;
57945
+ }
57884
57946
 
57885
57947
  // src/commands/cms.ts
57886
57948
  var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -58013,6 +58075,57 @@ async function cmsDoctorCommand(opts, call = callCms) {
58013
58075
  return fail(err);
58014
58076
  }
58015
58077
  }
58078
+ async function cmsSchemaPushCommand(opts, call = callCms, registryCall = callRegistry) {
58079
+ const cfg = config();
58080
+ if (!cfg)
58081
+ return 1;
58082
+ const schemaPath = join19(opts.repo, "cms", "faststore", "schema.json");
58083
+ if (!existsSync14(schemaPath)) {
58084
+ return fail(new Error(`No such file: ${schemaPath}. Generate it first (\`vtex content generate-schema\`).`));
58085
+ }
58086
+ let schema;
58087
+ try {
58088
+ schema = parseJsonc(readFileSync17(schemaPath, "utf8"));
58089
+ } catch (err) {
58090
+ return fail(new Error(`${schemaPath} is not valid JSON: ${err instanceof Error ? err.message : err}`));
58091
+ }
58092
+ try {
58093
+ const baseSchemaId = `${cfg.account}.${cfg.store}`;
58094
+ const [types, versions] = await Promise.all([
58095
+ getContentTypes(cfg, call),
58096
+ listSchemaVersions(cfg, registryCall)
58097
+ ]);
58098
+ const drift = schemaDrift(types, opts.repo);
58099
+ const propDrift = propertyDrift(types, opts.repo);
58100
+ const version = opts.version ?? suggestNextSchemaVersion(versions);
58101
+ const targetId = `${baseSchemaId}@${version}`;
58102
+ if (opts.json) {
58103
+ console.log(JSON.stringify({ targetId, drift, propDrift }, null, 2));
58104
+ } else {
58105
+ console.log(chalk7.dim(` target: ${targetId}`));
58106
+ for (const d of drift.filter((x) => x.missingOnAccount.length > 0)) {
58107
+ console.log(` + ${d.contentType}: ${d.missingOnAccount.join(", ")}`);
58108
+ }
58109
+ for (const d of propDrift) {
58110
+ if (d.missingProps.length > 0)
58111
+ console.log(` + ${d.contentType}: ${d.componentKey} — ${d.missingProps.join(", ")}`);
58112
+ }
58113
+ if (drift.every((x) => x.missingOnAccount.length === 0) && propDrift.length === 0) {
58114
+ console.log(chalk7.dim(" no drift found by doctor's own check — uploading anyway publishes this exact schema as a new version"));
58115
+ }
58116
+ }
58117
+ if (!opts.yes) {
58118
+ console.log(chalk7.yellow("dry run — nothing uploaded. Pass --yes to publish."));
58119
+ return 0;
58120
+ }
58121
+ schema.$id = targetId;
58122
+ await publishSchema(cfg, schema, registryCall);
58123
+ console.log(`${chalk7.green("✓")} published ${targetId}`);
58124
+ return 0;
58125
+ } catch (err) {
58126
+ return fail(err);
58127
+ }
58128
+ }
58016
58129
  async function cmsLsCommand(opts, call = callCms) {
58017
58130
  const cfg = config();
58018
58131
  if (!cfg)
@@ -63965,8 +64078,9 @@ function listCommand(output) {
63965
64078
  try {
63966
64079
  const run = loadRun(output, r.id);
63967
64080
  const v = run.verdict;
63968
- const status = v.status === "pass" ? chalk18.green(v.status) : v.status === "warn" ? chalk18.yellow(v.status) : chalk18.red(v.status);
63969
- console.log(` ${chalk18.bold(r.id)} ${status} score=${v.score} critical=${v.critical} high=${v.high} ${chalk18.dim(r.timestamp)}`);
64081
+ const status = v.status === "inconclusive" ? chalk18.dim(v.status) : v.status === "pass" ? chalk18.green(v.status) : v.status === "warn" ? chalk18.yellow(v.status) : chalk18.red(v.status);
64082
+ const score = v.status === "inconclusive" ? "—" : v.score;
64083
+ console.log(` ${chalk18.bold(r.id)} ${status} score=${score} critical=${v.critical} high=${v.high} ${chalk18.dim(r.timestamp)}`);
63970
64084
  } catch {
63971
64085
  console.log(` ${chalk18.bold(r.id)} ${chalk18.dim("(report.json ausente)")}`);
63972
64086
  }
@@ -68386,7 +68500,14 @@ function applyLlmOptions(opts) {
68386
68500
  }
68387
68501
  return null;
68388
68502
  }
68389
- function evaluateFailOnGate(allIssues, failOn) {
68503
+ function evaluateFailOnGate(allIssues, failOn, verdictStatus) {
68504
+ if (verdictStatus === "inconclusive") {
68505
+ return {
68506
+ exitCode: 1,
68507
+ message: `
68508
+ ✖ run inconclusivo — nenhum check executou, não há resultado para aprovar — exit 1`
68509
+ };
68510
+ }
68390
68511
  const blocking = allIssues.filter((i) => failOn.includes(i.severity));
68391
68512
  if (blocking.length === 0)
68392
68513
  return { exitCode: 0 };
@@ -69156,7 +69277,7 @@ ${formatTimingsSummary(partialTimings, buildFlowBreakdown(allFlowCaptures))}
69156
69277
  printSummary7(run, paths.reportHtml, { promotedCount, deprecatedCount, platform });
69157
69278
  console.log(`
69158
69279
  ${formatTimingsSummary(runTimings, buildFlowBreakdown(allFlowCaptures))}`);
69159
- const failOnGate = evaluateFailOnGate(allIssues, failOn);
69280
+ const failOnGate = evaluateFailOnGate(allIssues, failOn, verdict.status);
69160
69281
  if (failOnGate.exitCode === 1) {
69161
69282
  console.log(chalk22.red(failOnGate.message));
69162
69283
  return 1;
@@ -69382,12 +69503,17 @@ function hostOf3(url) {
69382
69503
  }
69383
69504
  function printSummary7(run, htmlPath, meta) {
69384
69505
  const { verdict } = run;
69385
- const emoji = verdict.status === "pass" ? chalk22.green("✔") : verdict.status === "warn" ? chalk22.yellow("⚠") : chalk22.red("✖");
69386
- const score = verdict.status === "pass" ? chalk22.green(verdict.score) : verdict.status === "warn" ? chalk22.yellow(verdict.score) : chalk22.red(verdict.score);
69506
+ const inconclusive = verdict.status === "inconclusive";
69507
+ const emoji = inconclusive ? chalk22.dim("○") : verdict.status === "pass" ? chalk22.green("✔") : verdict.status === "warn" ? chalk22.yellow("⚠") : chalk22.red("✖");
69508
+ const score = inconclusive ? chalk22.dim("—") : verdict.status === "pass" ? chalk22.green(verdict.score) : verdict.status === "warn" ? chalk22.yellow(verdict.score) : chalk22.red(verdict.score);
69387
69509
  const prev = run.previousRun;
69388
69510
  const scoreDelta = !prev ? chalk22.dim(" (sem run anterior comparável)") : prev.scoreDelta > 0 ? chalk22.green(` (+${prev.scoreDelta} vs run anterior: ${prev.score})`) : prev.scoreDelta < 0 ? chalk22.red(` (${prev.scoreDelta} vs run anterior: ${prev.score})`) : chalk22.dim(` (= run anterior: ${prev.score})`);
69389
69511
  console.log("");
69390
- console.log(` ${emoji} parity ${verdict.status.toUpperCase()} · score ${score}/100${scoreDelta}`);
69512
+ if (inconclusive) {
69513
+ console.log(` ${emoji} parity INCONCLUSIVE · nothing was measured (0 checks ran)`);
69514
+ } else {
69515
+ console.log(` ${emoji} parity ${verdict.status.toUpperCase()} · score ${score}/100${scoreDelta}`);
69516
+ }
69391
69517
  console.log(` checks: ${chalk22.green(verdict.checksPassed)} pass · ${chalk22.red(verdict.checksFailed)} fail · ${chalk22.dim(`${verdict.checksSkipped} skipped`)}`);
69392
69518
  console.log(` issues: ${chalk22.red(verdict.critical)} critical · ${chalk22.yellow(verdict.high)} high · ${verdict.medium} medium · ${chalk22.dim(`${verdict.low} low`)}`);
69393
69519
  for (const c of run.caveats ?? []) {
@@ -69484,10 +69610,11 @@ ${markdown}
69484
69610
  function buildPrComment(run, opts) {
69485
69611
  const lines = [];
69486
69612
  const v = run.verdict;
69487
- const status = v.status === "pass" ? "✅ **PASS**" : v.status === "warn" ? "⚠ **WARN**" : "❌ **FAIL**";
69613
+ const inconclusive = v.status === "inconclusive";
69614
+ const status = inconclusive ? "◻ **INCONCLUSIVE**" : v.status === "pass" ? "✅ **PASS**" : v.status === "warn" ? "⚠ **WARN**" : "❌ **FAIL**";
69488
69615
  const prev = run.previousRun;
69489
69616
  const delta = prev ? prev.scoreDelta > 0 ? ` (\uD83D\uDCC8 +${prev.scoreDelta} vs previous run)` : prev.scoreDelta < 0 ? ` (\uD83D\uDCC9 ${prev.scoreDelta} vs previous run)` : " (= previous run)" : "";
69490
- lines.push(`## Parity report — ${status} · score ${v.score}/100${delta}`);
69617
+ lines.push(inconclusive ? `## Parity report — ${status} · nothing was measured (0 checks ran)` : `## Parity report — ${status} · score ${v.score}/100${delta}`);
69491
69618
  lines.push("");
69492
69619
  lines.push(`- **prod:** ${opts.prod}`);
69493
69620
  lines.push(`- **preview:** ${opts.preview}`);
@@ -69862,7 +69989,7 @@ function renderDeckHtml(model, lang = "en") {
69862
69989
  const rows = model.caveats.map((c) => `<tr><td><span class="pill ${c.level === "warn" ? "pill-warn" : "pill-good"}">${esc3(c.level)}</span></td><td><b>${esc3(c.summary)}</b></td><td>${esc3(c.detail)}</td></tr>`).join("");
69863
69990
  pages.push(page(L2("Contexto", "Context", lang), L2("Como ler este run", "How to read this run", lang), `<table class="grid"><tbody>${rows}</tbody></table>`, L2("O que o número <b>não</b> mede. Vem de <code>report.json.caveats</code>.", "What the number does <b>not</b> measure. From <code>report.json.caveats</code>.", lang)));
69864
69991
  }
69865
- const moduleRows = model.modules.map((m) => `<tr><td>${esc3(m.module)}</td><td><b class="num">${m.score}</b></td><td><span class="pill pill-${m.tone === "good" ? "good" : m.tone === "warn" ? "warn" : "bad"}">${esc3(m.status)}</span></td></tr>`).join("");
69992
+ const moduleRows = model.modules.map((m) => `<tr><td>${esc3(m.module)}</td><td><b class="num">${m.score}</b></td><td><span class="pill pill-${m.tone === "good" ? "good" : m.tone === "warn" ? "warn" : m.tone === "neutral" ? "neutral" : "bad"}">${esc3(m.status)}</span></td></tr>`).join("");
69866
69993
  pages.push(page(L2("Sumário executivo", "Executive summary", lang), L2("Onde a migração está", "Where the migration stands", lang), tiles(model.headline, lang) + (moduleRows ? `<h3 class="sub">${L2("Score por módulo", "Score per module", lang)}</h3>` + `<table class="grid"><tbody>${moduleRows}</tbody></table>` : "")));
69867
69994
  pages.push(page(L2("Achados", "Findings", lang), L2("O que a validação encontrou", "What the validation found", lang), findingsTable(model.findings, model.findingsOmitted, lang)));
69868
69995
  if (model.visual) {
@@ -69923,6 +70050,8 @@ function toneForStatus(status) {
69923
70050
  return "good";
69924
70051
  if (status === "warn")
69925
70052
  return "warn";
70053
+ if (status === "inconclusive")
70054
+ return "neutral";
69926
70055
  return "bad";
69927
70056
  }
69928
70057
  function buildDeckModel(run) {
@@ -70872,7 +71001,14 @@ program.command("plan").description("Inspect/update the migration-plan.json comp
70872
71001
  }));
70873
71002
  program.command("cms").description("Read and write VTEX Content Platform entries — the CMS behind FastStore v4. Every write is a commit on a branch carrying the baseHash it was read at, so a concurrent edit fails the commit instead of silently winning. Needs PARITY_CMS_ACCOUNT + PARITY_CMS_STORE and a `vtex login` session (or PARITY_CMS_TOKEN).").addCommand(new Command("doctor").description("Compare the sections the repo declares against the ones published on the account. A section that exists in code but was never uploaded commits fine and renders nothing — this is the check that catches it.").option("--repo <path>", "Repo holding cms/faststore/pages/", ".").option("--json", "Emit structured JSON instead of human-readable text", false).action(async (opts) => {
70874
71003
  process.exit(await cmsDoctorCommand({ repo: opts.repo, json: Boolean(opts.json) }));
70875
- })).addCommand(new Command("ls").description("List entries, or branches with --branches. Branch ids are what every write needs.").option("--content-type <name>", "Filter by content type (home, landingPage, plp, ...)").option("--branches", "List branches instead of entries", false).option("--json", "Emit structured JSON instead of human-readable text", false).action(async (opts) => {
71004
+ })).addCommand(new Command("schema").description("Manage the published schema registry.").addCommand(new Command("push").description("Upload cms/faststore/schema.json to the registry as a new version. Dry run unless --yes; never deletes the local file.").option("--repo <path>", "Repo holding cms/faststore/schema.json", ".").option("--version <semver>", "Version to publish (default: next minor bump)").option("--yes", "Actually publish. Without it, this is a dry run.", false).option("--json", "Emit structured JSON instead of human-readable text", false).action(async (opts) => {
71005
+ process.exit(await cmsSchemaPushCommand({
71006
+ repo: opts.repo,
71007
+ version: opts.version,
71008
+ yes: Boolean(opts.yes),
71009
+ json: Boolean(opts.json)
71010
+ }));
71011
+ }))).addCommand(new Command("ls").description("List entries, or branches with --branches. Branch ids are what every write needs.").option("--content-type <name>", "Filter by content type (home, landingPage, plp, ...)").option("--branches", "List branches instead of entries", false).option("--json", "Emit structured JSON instead of human-readable text", false).action(async (opts) => {
70876
71012
  process.exit(await cmsLsCommand({
70877
71013
  contentType: opts.contentType,
70878
71014
  branches: Boolean(opts.branches),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/parity",
3
- "version": "0.33.20",
3
+ "version": "0.33.22",
4
4
  "description": "E2E parity validator for site migrations. Compares prod vs cand and reports UI, functional, SEO, visual, and Web Vitals deltas with an LLM-ranked HTML report.",
5
5
  "type": "module",
6
6
  "license": "MIT",