@tokenoftrust/storefront-runner 2.0.1 → 2.0.3
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/apps/storefront/dev-plugins/tenant-hot-reload.mjs +19 -1
- package/apps/storefront/dev-plugins/tenant-validate-on-save.mjs +78 -0
- package/apps/storefront/src/middleware/index.ts +17 -1
- package/package.json +1 -1
- package/scripts/lib/tenant-dirs.mjs +80 -0
- package/scripts/tenant/lint-embeds.mjs +180 -0
- package/scripts/tenant/materialize-tenant-content.mjs +533 -0
- package/scripts/tenant/validate.mjs +837 -0
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +0 -68
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +0 -111
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +0 -2
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +0 -247
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +0 -73
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +0 -79
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +0 -10982
- package/apps/storefront/scripts/import-v84-through-ws2.ts +0 -38
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +0 -2
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +0 -4
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +0 -185
- package/apps/storefront/scripts/prove-clone-isolation.ts +0 -506
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +0 -148
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +0 -35
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +0 -214
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +0 -17
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +0 -15
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +0 -21
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +0 -42
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +0 -145
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +0 -18
- package/apps/storefront/src/components/admin/AdminAIWorkflowsTab.astro +0 -531
- package/apps/storefront/src/components/admin/AdminBlogDetailRail.astro +0 -878
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +0 -1435
- package/apps/storefront/src/components/admin/AdminCheckoutSettingsPanel.astro +0 -226
- package/apps/storefront/src/components/admin/AdminCustomersTab.astro +0 -593
- package/apps/storefront/src/components/admin/AdminFulfillmentTab.astro +0 -465
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +0 -105
- package/apps/storefront/src/components/admin/AdminProductsTab.astro +0 -901
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +0 -2978
- package/apps/storefront/src/components/admin/AdminReportingTab.astro +0 -435
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +0 -782
- package/apps/storefront/src/components/admin/AdminSubscriptionsTab.astro +0 -611
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +0 -1223
- package/apps/storefront/src/lib/dev/cockpitStore.ts +0 -57
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +0 -4625
- package/apps/storefront/src/lib/publish/apex-readiness.ts +0 -360
- package/apps/storefront/src/lib/publish/buildStream.ts +0 -269
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +0 -72
- package/apps/storefront/src/lib/publish/dispatchHealth.ts +0 -267
- package/apps/storefront/src/lib/publish/domainState.ts +0 -360
- package/apps/storefront/src/lib/publish/lifecycleState.ts +0 -369
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +0 -29
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +0 -78
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +0 -62
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +0 -124
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +0 -75
- package/apps/storefront/src/lib/publish/panelPolling.ts +0 -78
- package/apps/storefront/src/lib/publish/publish-guard.ts +0 -88
- package/apps/storefront/src/lib/publish/publishFormat.ts +0 -165
- package/apps/storefront/src/lib/publish/publishHero.ts +0 -177
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +0 -66
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +0 -141
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +0 -41
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +0 -47
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +0 -42
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +0 -59
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +0 -440
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +0 -161
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +0 -325
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +0 -241
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +0 -439
- package/apps/storefront/src/lib/publish/sseRoute.ts +0 -119
- package/apps/storefront/src/lib/publish/stageBundleUpload.ts +0 -215
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +0 -142
- package/apps/storefront/src/lib/publish/versionNumber.ts +0 -52
- package/apps/storefront/src/pages/admin/ops-timeline.astro +0 -420
- package/apps/storefront/src/pages/admin/review-release.astro +0 -265
- package/apps/storefront/src/pages/admin/select.astro +0 -96
- package/apps/storefront/src/pages/admin.astro +0 -568
- package/apps/storefront/src/pages/api/apps/admin/credentials/rotate.ts +0 -86
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +0 -174
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +0 -96
- package/apps/storefront/src/pages/api/apps/admin/health.ts +0 -44
- package/apps/storefront/src/pages/api/apps/admin/install.ts +0 -125
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +0 -118
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +0 -89
- package/apps/storefront/src/pages/api/apps/admin/list.ts +0 -26
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +0 -85
- package/apps/storefront/src/pages/api/apps/admin/resume.ts +0 -79
- package/apps/storefront/src/pages/api/apps/admin/suspend.ts +0 -80
- package/apps/storefront/src/pages/api/apps/admin/uninstall.ts +0 -98
- package/apps/storefront/src/pages/api/apps/admin/update.ts +0 -126
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries/[deliveryId]/replay.ts +0 -70
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries.ts +0 -51
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +0 -255
- package/apps/storefront/src/pages/api/apps/oauth/token.ts +0 -87
- package/apps/storefront/src/pages/api/apps/v1/attribution.ts +0 -162
- package/apps/storefront/src/pages/api/apps/v1/catalog/products/[handle].ts +0 -39
- package/apps/storefront/src/pages/api/apps/v1/catalog/products.ts +0 -49
- package/apps/storefront/src/pages/api/apps/v1/health.ts +0 -32
- package/apps/storefront/src/pages/api/apps/v1/inventory.ts +0 -59
- package/apps/storefront/src/pages/api/apps/v1/orders/[id].ts +0 -48
- package/apps/storefront/src/pages/api/apps/v1/orders.ts +0 -73
- package/apps/storefront/src/pages/api/apps/v1/reports.ts +0 -21
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries/[deliveryId]/replay.ts +0 -74
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries.ts +0 -47
- package/apps/storefront/src/pages/api/cache-purge.ts +0 -55
- package/apps/storefront/src/pages/api/compliance/tamper.ts +0 -88
- package/apps/storefront/src/pages/api/dashboard/enter-vendor.ts +0 -154
- package/apps/storefront/src/pages/api/dashboard/vendor-search.ts +0 -120
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +0 -108
- package/apps/storefront/src/pages/api/publish/stage-bundle.ts +0 -70
- package/apps/storefront/src/pages/api/test/dev-session.ts +0 -133
- package/apps/storefront/src/pages/cockpit.astro +0 -1548
- package/apps/storefront/src/pages/dashboard/[appDomain]/apps/index.astro +0 -119
- package/apps/storefront/src/pages/dashboard/[appDomain]/index.astro +0 -105
- package/apps/storefront/src/pages/dashboard/[appDomain]/team.astro +0 -177
- package/apps/storefront/src/pages/dashboard/index.astro +0 -160
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* <AdminCheckoutSettingsPanel> — the "Cart & Checkout appearance" settings
|
|
4
|
-
* section. Mirrors the managed checkout settings surface (brand colors,
|
|
5
|
-
* per-template URLs, store/feature config); each visual field is
|
|
6
|
-
* prepopulated from the tenant's theme (the style-guide) and can be overridden
|
|
7
|
-
* or reset back to that theme default.
|
|
8
|
-
*
|
|
9
|
-
* Presentational at the current admin altitude: the resolve/override/reset MODEL
|
|
10
|
-
* is real (lib/commerce/checkoutSettings), but SAVE is the commerce-service
|
|
11
|
-
* theme PUT/refresh seam — surfaced, not faked.
|
|
12
|
-
*/
|
|
13
|
-
import { getCheckoutSettingsViewModel } from "@/lib/admin/services/mock";
|
|
14
|
-
import { resolveAdminTargetTenant } from "@/config/adminTargetTenant";
|
|
15
|
-
import type { CheckoutFieldGroup, CheckoutSettingsField } from "@/lib/commerce/checkoutSettings";
|
|
16
|
-
|
|
17
|
-
const { envelope } = Astro.props;
|
|
18
|
-
// Resolve the TARGET tenant's config through the resolver seam (config layer),
|
|
19
|
-
// then build the view model from it — lib never reaches into the static map.
|
|
20
|
-
const targetTenant = await resolveAdminTargetTenant(envelope.targetTenant);
|
|
21
|
-
const vm = getCheckoutSettingsViewModel(envelope, targetTenant);
|
|
22
|
-
|
|
23
|
-
const GROUP_META: Record<CheckoutFieldGroup, { title: string; blurb: string }> = {
|
|
24
|
-
colors: {
|
|
25
|
-
title: "Brand colors",
|
|
26
|
-
blurb: "Hosted checkout colors, prepopulated from this tenant's theme tokens.",
|
|
27
|
-
},
|
|
28
|
-
templates: {
|
|
29
|
-
title: "Templates",
|
|
30
|
-
blurb: "Per-surface hosted template URLs (checkout, cart, cart drawer, receipt, email).",
|
|
31
|
-
},
|
|
32
|
-
store: {
|
|
33
|
-
title: "Store & features",
|
|
34
|
-
blurb: "Store identity and checkout feature toggles. No theme default.",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
const GROUP_ORDER: CheckoutFieldGroup[] = ["colors", "templates", "store"];
|
|
38
|
-
const byGroup = (g: CheckoutFieldGroup) => vm.fields.filter((f) => f.group === g);
|
|
39
|
-
|
|
40
|
-
const isColor = (f: CheckoutSettingsField) => f.kind === "color";
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
<div class="panel" id="settings-cart-appearance">
|
|
44
|
-
<div class="panel-head settings-panel-head">
|
|
45
|
-
<h3><svg><use href="#i-gear"></use></svg>Cart & Checkout Appearance</h3>
|
|
46
|
-
<span class="chip blue">Managed checkout</span>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
{!vm.hasStore ? (
|
|
50
|
-
<div class="panel-body">
|
|
51
|
-
<p class="note">This tenant has no hosted checkout store configured, so there is nothing to theme here.</p>
|
|
52
|
-
</div>
|
|
53
|
-
) : (
|
|
54
|
-
<div class="panel-body grid">
|
|
55
|
-
<div class="checkout-head">
|
|
56
|
-
<p class="note">
|
|
57
|
-
Values are <b>prepopulated from the theme</b> (the style guide). Override any field, or
|
|
58
|
-
reset it back to the theme default. {vm.overrideCount > 0 ? `${vm.overrideCount} field(s) currently overridden.` : "No overrides yet."}
|
|
59
|
-
</p>
|
|
60
|
-
<button class="btn" type="button" disabled={vm.overrideCount === 0}>
|
|
61
|
-
<svg><use href="#i-refresh"></use></svg>Reset all to theme
|
|
62
|
-
</button>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
{GROUP_ORDER.map((g) => (
|
|
66
|
-
<section class="checkout-group">
|
|
67
|
-
<div class="checkout-group-head">
|
|
68
|
-
<h4>{GROUP_META[g].title}</h4>
|
|
69
|
-
<p>{GROUP_META[g].blurb}</p>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="checkout-fields">
|
|
72
|
-
{byGroup(g).map((f) => (
|
|
73
|
-
<div class="checkout-field">
|
|
74
|
-
<div class="checkout-field-label">
|
|
75
|
-
<label>{f.label}</label>
|
|
76
|
-
<span class:list={["chip", f.source === "override" ? "amber" : "green"]}>
|
|
77
|
-
{f.source === "override" ? "Overridden" : "Theme default"}
|
|
78
|
-
</span>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div class="checkout-field-control">
|
|
82
|
-
{isColor(f) ? (
|
|
83
|
-
<span class="checkout-swatch" style={`background:${f.value}`} aria-hidden="true"></span>
|
|
84
|
-
) : null}
|
|
85
|
-
|
|
86
|
-
{f.kind === "boolean" ? (
|
|
87
|
-
<span class:list={["chip", f.value ? "teal" : ""]}>{f.value ? "On" : "Off"}</span>
|
|
88
|
-
) : f.kind === "select" ? (
|
|
89
|
-
<select disabled>
|
|
90
|
-
{(f.options ?? []).map((o) => (
|
|
91
|
-
<option selected={o === f.value}>{o}</option>
|
|
92
|
-
))}
|
|
93
|
-
</select>
|
|
94
|
-
) : (
|
|
95
|
-
<input
|
|
96
|
-
type="text"
|
|
97
|
-
value={String(f.value)}
|
|
98
|
-
readonly
|
|
99
|
-
class:list={["checkout-input", { url: f.kind === "url" }]}
|
|
100
|
-
/>
|
|
101
|
-
)}
|
|
102
|
-
|
|
103
|
-
{f.resettable && f.source === "override" ? (
|
|
104
|
-
<button class="btn ghost checkout-reset" type="button" title={`Reset to theme default: ${f.default}`}>
|
|
105
|
-
Reset
|
|
106
|
-
</button>
|
|
107
|
-
) : f.resettable ? (
|
|
108
|
-
<span class="checkout-default-hint">= theme</span>
|
|
109
|
-
) : (
|
|
110
|
-
<span class="checkout-default-hint">no theme default</span>
|
|
111
|
-
)}
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
{f.help ? <p class="checkout-help">{f.help}</p> : null}
|
|
115
|
-
</div>
|
|
116
|
-
))}
|
|
117
|
-
</div>
|
|
118
|
-
</section>
|
|
119
|
-
))}
|
|
120
|
-
|
|
121
|
-
<p class="note checkout-seam">
|
|
122
|
-
<svg><use href="#i-alert"></use></svg>
|
|
123
|
-
Saving updates the managed checkout theme through the commerce service. That API hop is
|
|
124
|
-
not wired in this build.
|
|
125
|
-
</p>
|
|
126
|
-
</div>
|
|
127
|
-
)}
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<style>
|
|
131
|
-
.checkout-head {
|
|
132
|
-
display: flex;
|
|
133
|
-
gap: 12px;
|
|
134
|
-
align-items: center;
|
|
135
|
-
justify-content: space-between;
|
|
136
|
-
flex-wrap: wrap;
|
|
137
|
-
}
|
|
138
|
-
.checkout-group {
|
|
139
|
-
border-top: 1px solid var(--admin-line);
|
|
140
|
-
padding-top: 14px;
|
|
141
|
-
margin-top: 4px;
|
|
142
|
-
}
|
|
143
|
-
.checkout-group-head h4 {
|
|
144
|
-
margin: 0;
|
|
145
|
-
font-size: 13px;
|
|
146
|
-
}
|
|
147
|
-
.checkout-group-head p {
|
|
148
|
-
margin: 2px 0 12px;
|
|
149
|
-
color: var(--admin-muted);
|
|
150
|
-
font-size: 12px;
|
|
151
|
-
}
|
|
152
|
-
.checkout-fields {
|
|
153
|
-
display: grid;
|
|
154
|
-
gap: 14px;
|
|
155
|
-
}
|
|
156
|
-
.checkout-field {
|
|
157
|
-
display: grid;
|
|
158
|
-
gap: 6px;
|
|
159
|
-
padding-bottom: 12px;
|
|
160
|
-
border-bottom: 1px solid var(--admin-line);
|
|
161
|
-
}
|
|
162
|
-
.checkout-field:last-child {
|
|
163
|
-
border-bottom: 0;
|
|
164
|
-
padding-bottom: 0;
|
|
165
|
-
}
|
|
166
|
-
.checkout-field-label {
|
|
167
|
-
display: flex;
|
|
168
|
-
align-items: center;
|
|
169
|
-
gap: 10px;
|
|
170
|
-
}
|
|
171
|
-
.checkout-field-label label {
|
|
172
|
-
font-size: 13px;
|
|
173
|
-
font-weight: 640;
|
|
174
|
-
color: var(--admin-ink);
|
|
175
|
-
}
|
|
176
|
-
.checkout-field-control {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
gap: 8px;
|
|
180
|
-
flex-wrap: wrap;
|
|
181
|
-
}
|
|
182
|
-
.checkout-swatch {
|
|
183
|
-
width: 26px;
|
|
184
|
-
height: 26px;
|
|
185
|
-
border-radius: var(--admin-radius-sm);
|
|
186
|
-
border: 1px solid var(--admin-line-strong);
|
|
187
|
-
flex: none;
|
|
188
|
-
}
|
|
189
|
-
.checkout-input {
|
|
190
|
-
min-height: 34px;
|
|
191
|
-
padding: 0 10px;
|
|
192
|
-
border: 1px solid var(--admin-line-strong);
|
|
193
|
-
border-radius: var(--admin-radius-sm);
|
|
194
|
-
background: var(--admin-surface);
|
|
195
|
-
color: var(--admin-ink);
|
|
196
|
-
min-width: 220px;
|
|
197
|
-
}
|
|
198
|
-
.checkout-input.url {
|
|
199
|
-
min-width: 340px;
|
|
200
|
-
font-family: ui-monospace, Menlo, monospace;
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
}
|
|
203
|
-
.checkout-reset {
|
|
204
|
-
font-size: 12px;
|
|
205
|
-
}
|
|
206
|
-
.checkout-default-hint {
|
|
207
|
-
color: var(--admin-muted);
|
|
208
|
-
font-size: 11px;
|
|
209
|
-
}
|
|
210
|
-
.checkout-help {
|
|
211
|
-
margin: 0;
|
|
212
|
-
color: var(--admin-muted);
|
|
213
|
-
font-size: 12px;
|
|
214
|
-
}
|
|
215
|
-
.checkout-seam {
|
|
216
|
-
display: flex;
|
|
217
|
-
gap: 8px;
|
|
218
|
-
align-items: flex-start;
|
|
219
|
-
border-top: 1px solid var(--admin-line);
|
|
220
|
-
padding-top: 12px;
|
|
221
|
-
}
|
|
222
|
-
.checkout-seam code {
|
|
223
|
-
font-family: ui-monospace, Menlo, monospace;
|
|
224
|
-
font-size: 11px;
|
|
225
|
-
}
|
|
226
|
-
</style>
|