@tokenoftrust/storefront-runner 4.11.14 → 4.11.15

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.
@@ -25,7 +25,6 @@ import type {
25
25
  ProviderOutcome,
26
26
  PublicCommerceEvent,
27
27
  StockState,
28
- CustomizationEnv,
29
28
  TenantConfig,
30
29
  } from "@tot/public-runtime";
31
30
  import {
@@ -61,14 +60,15 @@ import { DeclaredTenantConfigUnreadError, withDeclaredTenantConfig } from "@/con
61
60
  const EVIDENCE_STATES: readonly EvidenceState[] = ["fresh", "not-required", "UNKNOWN", "stale", "unreadable", "absent"];
62
61
  const REFUND_PAYMENTS: ReadonlySet<PaymentState> = new Set(["refunded", "refund_requested", "refund_unknown"]);
63
62
 
64
- /** Read the selected store's declared clock from the same channel as its Orders data. */
63
+ /** Read the selected store's declared clock from its actual Orders scope's channel. */
65
64
  export async function readOrdersTimeZone(
66
65
  target: TenantConfig | null,
67
66
  kvGet: (key: string) => Promise<string | null>,
68
- env: CustomizationEnv,
67
+ scope: CommerceScope | null,
69
68
  ): Promise<string> {
70
- if (!target) return DEFAULT_TIMEZONE;
69
+ if (!target || !scope) return DEFAULT_TIMEZONE;
71
70
  try {
71
+ const env = scope.stage === "publication" ? "live" : "test";
72
72
  const declared = await withDeclaredTenantConfig(target, kvGet, { env });
73
73
  return resolveStoreTimeZone(declared.timezone);
74
74
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "4.11.14",
3
+ "version": "4.11.15",
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",