@tokenoftrust/storefront-runner 2.4.60 → 2.4.61
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.
|
@@ -21,8 +21,7 @@ import ReviewSummary from "@/components/commerce/ReviewSummary.astro";
|
|
|
21
21
|
import ReviewList from "@/components/commerce/ReviewList.astro";
|
|
22
22
|
import { isOnSale, isNew, isAvailable, fromPrice } from "@/lib/tot/query";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
priceForPurchaseOption,
|
|
24
|
+
buildMemberSignedCartPayload,
|
|
26
25
|
workerCartApiPath,
|
|
27
26
|
normalizePurchaseOptions,
|
|
28
27
|
visiblePurchaseOptions,
|
|
@@ -243,18 +242,13 @@ if (commerce) {
|
|
|
243
242
|
async (v) => {
|
|
244
243
|
const payloads = await Promise.all(
|
|
245
244
|
purchaseOptions.map(async (purchaseOption) => {
|
|
246
|
-
const effective = priceForPurchaseOption(
|
|
247
|
-
v.price,
|
|
248
|
-
purchaseOption,
|
|
249
|
-
pricingCtx,
|
|
250
|
-
);
|
|
251
245
|
return [
|
|
252
246
|
purchaseOption.id,
|
|
253
|
-
await
|
|
247
|
+
await buildMemberSignedCartPayload(product, v, {
|
|
254
248
|
mode: commerce.mode,
|
|
255
249
|
secret: signing.secret,
|
|
256
250
|
purchaseOption,
|
|
257
|
-
|
|
251
|
+
pricing: pricingCtx,
|
|
258
252
|
autopilotEnabled,
|
|
259
253
|
tenantId: tenant.tenant_id,
|
|
260
254
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.61",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|
|
@@ -276,6 +276,8 @@ export interface MemberSignedCartPayloadOptions {
|
|
|
276
276
|
* is off. Callers should still pre-filter with {@link visiblePurchaseOptions}.
|
|
277
277
|
*/
|
|
278
278
|
autopilotEnabled: boolean;
|
|
279
|
+
/** Tenant id written onto the signed `tenant` field when present. */
|
|
280
|
+
tenantId?: string;
|
|
279
281
|
}
|
|
280
282
|
|
|
281
283
|
/**
|
|
@@ -309,6 +311,7 @@ export async function buildMemberSignedCartPayload(
|
|
|
309
311
|
purchaseOption: opts.purchaseOption,
|
|
310
312
|
signedPrice: effective.price,
|
|
311
313
|
autopilotEnabled: opts.autopilotEnabled,
|
|
314
|
+
tenantId: opts.tenantId,
|
|
312
315
|
});
|
|
313
316
|
}
|
|
314
317
|
|