@tokenoftrust/cli 2.4.11 → 2.4.12
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 +1 -1
- package/src/commands/ship.mjs +11 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
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",
|
package/src/commands/ship.mjs
CHANGED
|
@@ -309,6 +309,8 @@ export function refusalNextStep(reason) {
|
|
|
309
309
|
return "upgrade the storefront subscription to enable go-live";
|
|
310
310
|
case "golive_unconfirmed":
|
|
311
311
|
return "re-run `tot ship` and confirm the plan";
|
|
312
|
+
case "compliance_review":
|
|
313
|
+
return 'approve the warnings with `tot ship --accept-quality-findings "<reason>"`, or fix them in `.tot/config.json` and publish again';
|
|
312
314
|
default:
|
|
313
315
|
return "re-run `tot ship`";
|
|
314
316
|
}
|
|
@@ -580,7 +582,11 @@ export async function runShip(
|
|
|
580
582
|
acceptRes = await fetchImpl(`${base}/api/changes/accept-issue`, {
|
|
581
583
|
method: "POST",
|
|
582
584
|
headers: { "content-type": "application/json", ...authHeaders },
|
|
583
|
-
body: JSON.stringify({
|
|
585
|
+
body: JSON.stringify({
|
|
586
|
+
operation: "publication",
|
|
587
|
+
reason: acceptQualityReason,
|
|
588
|
+
...(plan.ok && plan.artifactDigest ? { revision: plan.artifactDigest } : {}),
|
|
589
|
+
}),
|
|
584
590
|
});
|
|
585
591
|
} catch (e) {
|
|
586
592
|
console.error(
|
|
@@ -598,7 +604,10 @@ export async function runShip(
|
|
|
598
604
|
);
|
|
599
605
|
return 1;
|
|
600
606
|
}
|
|
601
|
-
|
|
607
|
+
const accepted = acceptData.accepted ?? {};
|
|
608
|
+
const count = Array.isArray(accepted.findingIds) ? accepted.findingIds.length : 0;
|
|
609
|
+
const what = accepted.problemCode === "compliance-review" ? "compliance warning(s)" : "quality finding(s)";
|
|
610
|
+
console.log(` ✓ ${count ? `${count} ` : ""}${what} accepted for this revision; continuing the publish.`);
|
|
602
611
|
}
|
|
603
612
|
|
|
604
613
|
// Each approved space goes live through its own reviewed transition, under the confirm above.
|