@tokenoftrust/cli 7.2.2 → 7.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/cli",
3
- "version": "7.2.2",
3
+ "version": "7.3.1",
4
4
  "description": "Token of Trust developer CLI — clone a tenant store, run it locally with save→reload, and submit it for preview. Installs the `tot` command.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Token of Trust",
@@ -268,6 +268,7 @@ export function normalizeShipPlan(data) {
268
268
  receiptId: typeof o.receiptId === "string" ? o.receiptId : null,
269
269
  rollbackTarget: o.rollbackTarget && typeof o.rollbackTarget === "object" ? o.rollbackTarget : null,
270
270
  warning: normalizeLiveDrift(o.warning),
271
+ tours: o.tours && typeof o.tours.tourSetDigest === "string" ? o.tours : null,
271
272
  paywall:
272
273
  o.paywall && typeof o.paywall === "object"
273
274
  ? {
@@ -586,6 +587,15 @@ export async function runShip(
586
587
  })
587
588
  : [` whole-site aggregate: not in this release — ${plan.message}`];
588
589
  planLines.push(...spaceReleaseLines(spaces));
590
+ if (plan.ok && plan.tours) {
591
+ for (const tour of plan.tours.changes ?? []) planLines.push(` tour ${tour.kind}: ${tour.title}`);
592
+ for (const finding of plan.tours.findings ?? []) planLines.push(` tour target: ${finding.code} on ${finding.page}${finding.band ? ` (${finding.band})` : ""}`);
593
+ if (plan.tours.findings?.length && !acceptQualityReason) {
594
+ for (const line of planLines) console.log(line);
595
+ console.error(fail("Tour targets need acknowledgement.", 'Review the findings, then use --accept-quality-findings "<reason>".'));
596
+ return 1;
597
+ }
598
+ }
589
599
  if (acceptQualityReason) {
590
600
  planLines.push(" quality findings: accept this exact revision and continue");
591
601
  planLines.push(` acceptance reason: ${acceptQualityReason.trim() || "(missing)"}`);
@@ -613,7 +623,7 @@ export async function runShip(
613
623
  // This is the same revision-bound acceptance as the Publish dialog, not a raw validator bypass.
614
624
  // The server refuses it unless the current durable problem is quality-only and the reason is
615
625
  // substantive. Only after that accountable record exists do we re-dispatch the release.
616
- if (acceptQualityReason !== null) {
626
+ if (acceptQualityReason !== null && !(plan.ok && plan.tours?.findings?.length)) {
617
627
  const postAccept = (extra = {}) => fetchImpl(`${base}/api/changes/accept-issue`, {
618
628
  method: "POST",
619
629
  headers: { "content-type": "application/json", ...authHeaders },
@@ -695,6 +705,8 @@ export async function runShip(
695
705
  confirmGoLive: true,
696
706
  ...(plan.pinnedSha ? { expectedAggregateSha: plan.pinnedSha } : {}),
697
707
  ...(plan.artifactDigest ? { expectedArtifactDigest: plan.artifactDigest } : {}),
708
+ ...(plan.tours ? { tourSetDigest: plan.tours.tourSetDigest,
709
+ ...(acceptQualityReason && plan.tours.findings?.length ? { tourFindingsDigest: plan.tours.findingsDigest } : {}) } : {}),
698
710
  }),
699
711
  });
700
712
  } catch (e) {