@tokenoftrust/cli 7.6.5 → 7.6.6

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.6.5",
3
+ "version": "7.6.6",
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",
@@ -10,6 +10,7 @@ import { extname, join, relative } from "node:path";
10
10
  import { workspacePathForTenantRelative } from "./tot-repo-mappings.mjs";
11
11
 
12
12
  const ERROR = "error";
13
+ const BULK_QUOTE_UNITS = ["each", "case", "gallon", "pail", "drum", "tote", "pound", "kilogram", "liter", "custom"];
13
14
  // Public routes implemented by the renderer. Authentication and cart URLs are
14
15
  // deliberately absent: they are flow-specific, not portable parity targets.
15
16
  const PLATFORM_ROUTES = ["/collections", "/collections/", "/products/", "/search", "/saved", "/account", "/account/", "/blog", "/blog/"];
@@ -256,8 +257,9 @@ function pageShape(value, file) {
256
257
  case "callout": if (!rich(section.body) || !["info", "warning", "legal", "success"].includes(section.tone) || section.title !== undefined && !string(section.title)) findings.push(finding("parity-section-shape", at, "callout requires supported tone, RichText body, and optional string title", "supply a valid callout")); break;
257
258
  case "contact": if (section.heading !== undefined && !string(section.heading) || section.email !== undefined && !string(section.email) || section.phone !== undefined && !string(section.phone) || section.address !== undefined && (!Array.isArray(section.address) || section.address.some((line) => !string(line))) || !string(section.email) && !string(section.phone) && !(Array.isArray(section.address) && section.address.length)) findings.push(finding("parity-section-shape", at, "contact requires string members and email, phone, or address", "supply valid contact details")); break;
258
259
  case "contact_form": if (["heading", "messageLabel", "submitLabel", "successMessage"].some((key) => section[key] !== undefined && !string(section[key])) || section.fields !== undefined && (!Array.isArray(section.fields) || section.fields.some((field) => field !== "name" && field !== "phone"))) findings.push(finding("parity-section-shape", at, "contact_form requires optional string copy and fields limited to name or phone", "supply a valid contact_form section")); break;
260
+ case "bulk_quote_form": if (["heading", "intro", "submitLabel", "successMessage"].some((key) => section[key] !== undefined && !string(section[key])) || section.units !== undefined && (!Array.isArray(section.units) || section.units.some((unit) => !BULK_QUOTE_UNITS.includes(unit)))) findings.push(finding("parity-section-shape", at, "bulk_quote_form requires optional string copy and units limited to the supported quote units", "supply a valid bulk_quote_form section")); break;
259
261
  case "needs_review": if (!string(section.reason) || section.severity !== undefined && !["blocker", "note"].includes(section.severity) || section.owner !== undefined && !string(section.owner) || section.href !== undefined && !string(section.href)) findings.push(finding("parity-section-shape", at, "needs_review requires reason and valid optional severity/owner/href", "supply a valid needs_review section")); break;
260
- default: findings.push(finding("parity-section-kind", `${at}/kind`, "section kind is not supported by the renderer", "use heading, paragraph, list, definitions, callout, contact, contact_form, or needs_review"));
262
+ default: findings.push(finding("parity-section-kind", `${at}/kind`, "section kind is not supported by the renderer", "use heading, paragraph, list, definitions, callout, contact, contact_form, bulk_quote_form, or needs_review"));
261
263
  }
262
264
  });
263
265
  const bodyHtml = typeof value.body_html === "string" && value.body_html.trim() !== "";