@tokenoftrust/storefront-runner 2.4.85 → 2.4.87
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/env.d.ts +1 -1
- package/apps/storefront/package.json +1 -1
- package/apps/storefront/src/components/{ProductCard.astro → catalog/storefront/ProductCard.astro} +3 -3
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/PriceDisplay.astro +1 -1
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ProductCarousel.astro +1 -1
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ProductGrid.astro +1 -1
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/SearchTypeahead.tsx +1 -1
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/VariantSelector.tsx +1 -1
- package/apps/storefront/src/components/{plp → catalog/storefront/plp}/FacetSidebar.astro +1 -1
- package/apps/storefront/src/components/chrome/SiteHeader.astro +1 -1
- package/apps/storefront/src/components/compliance/{NicotineWarning.astro → storefront/compliance/NicotineWarning.astro} +1 -1
- package/apps/storefront/src/components/{islands → compliance/storefront/islands}/CheckoutComplianceGate.tsx +1 -1
- package/apps/storefront/src/components/{apps → integrations/storefront/apps}/AppWidgetFrame.astro +1 -1
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/HowItWorksSteps.astro +1 -1
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/ManageSubscriptionEntry.astro +1 -1
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/SavingsExplainer.astro +2 -2
- package/apps/storefront/src/config/devTenantSeed.ts +1 -1
- package/apps/storefront/src/layouts/Layout.astro +11 -11
- package/apps/storefront/src/lib/activity/alerts.ts +1 -1
- package/apps/storefront/src/lib/activity/candidateSubmitLease.ts +1 -1
- package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
- package/apps/storefront/src/lib/activity/query.ts +2 -2
- package/apps/storefront/src/lib/activity/store.ts +1 -1
- package/apps/storefront/src/lib/admin/services/mock/index.ts +5 -5
- package/apps/storefront/src/lib/apps/consentConfigRead.ts +1 -1
- package/apps/storefront/src/lib/apps/orders/attributionService.ts +2 -2
- package/apps/storefront/src/lib/apps/orders/orderConversionD1.ts +2 -2
- package/apps/storefront/src/lib/apps/orders/verifiedProviderMeasurement.ts +2 -2
- package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsClient.ts +2 -2
- package/apps/storefront/src/lib/{admin → catalog/admin}/services/catalogProducts.ts +2 -2
- package/apps/storefront/src/lib/{d1 → catalog/d1}/catalog.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → catalog/fixtures}/products.ts +5 -5
- package/apps/storefront/src/lib/{search → catalog/search}/index.ts +1 -1
- package/apps/storefront/src/lib/{priceBuckets.ts → catalog/shared/priceBuckets.ts} +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/ToTClient.ts +3 -3
- package/apps/storefront/src/lib/{tot → catalog/tot}/query.ts +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/syncState.ts +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/tenantCatalog.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → checkout/fixtures}/checkoutSettings.ts +2 -2
- package/apps/storefront/src/lib/content/index.ts +1 -1
- package/apps/storefront/src/lib/env.ts +1 -1
- package/apps/storefront/src/lib/fulfillment/store.ts +1 -1
- package/apps/storefront/src/lib/{apps → integrations/apps}/appVersionStore.ts +1 -1
- package/apps/storefront/src/lib/{apps → integrations/apps}/credentials.ts +1 -1
- package/apps/storefront/src/lib/{apps → integrations/apps}/orders/idempotency.ts +1 -1
- package/apps/storefront/src/lib/{apps → integrations/apps}/registryAccess.ts +2 -2
- package/apps/storefront/src/lib/{apps → integrations/apps}/registryService.ts +1 -1
- package/apps/storefront/src/lib/{integration → integrations/integration}/browserEnvironment.ts +1 -1
- package/apps/storefront/src/lib/{integration → integrations/integration}/managedInstallDeclarations.ts +1 -1
- package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/deliveryEngine.ts +1 -1
- package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/deliveryStore.ts +1 -1
- package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/emit.ts +2 -2
- package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/getDispatcher.ts +2 -2
- package/apps/storefront/src/lib/jsonld.ts +1 -1
- package/apps/storefront/src/lib/monitoring/manifest.ts +1 -1
- package/apps/storefront/src/lib/newsletter/send.ts +1 -1
- package/apps/storefront/src/lib/newsletter/subscribers.ts +1 -1
- package/apps/storefront/src/lib/{apps/orders → orders/data}/orderForwardReceiver.ts +3 -3
- package/apps/storefront/src/lib/{apps/orders → orders/data}/orderMapper.ts +2 -2
- package/apps/storefront/src/lib/{apps/orders → orders/data}/ordersStore.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → orders/fixtures}/orders.ts +5 -5
- package/apps/storefront/src/lib/rawChrome.ts +2 -2
- package/apps/storefront/src/lib/sections.ts +2 -2
- package/apps/storefront/src/lib/social/tokenStore.ts +2 -2
- package/apps/storefront/src/lib/{admin/services/mock → subscriptions/fixtures}/subscriptions.ts +8 -8
- package/apps/storefront/src/lib/tracking/d1Control.ts +1 -1
- package/apps/storefront/src/lib/tracking/interactionStore.ts +0 -0
- package/apps/storefront/src/lib/tracking/pruneRollup.ts +1 -1
- package/apps/storefront/src/lib/tracking/tenantD1Registry.ts +1 -1
- package/apps/storefront/src/lib/url.ts +1 -1
- package/apps/storefront/src/middleware/controlPlane.ts +2 -2
- package/apps/storefront/src/middleware/index.ts +2 -2
- package/apps/storefront/src/middleware/renderChain.ts +7 -7
- package/apps/storefront/src/pages/404.astro +1 -1
- package/apps/storefront/src/pages/api/activity.ts +1 -1
- package/apps/storefront/src/pages/api/admin/activity-alerts.ts +1 -1
- package/apps/storefront/src/pages/api/admin/interaction-insights.ts +1 -1
- package/apps/storefront/src/pages/api/admin/orders/[id].ts +2 -2
- package/apps/storefront/src/pages/api/admin/orders.ts +2 -2
- package/apps/storefront/src/pages/api/commerce/checkout-handoff.ts +2 -2
- package/apps/storefront/src/pages/api/commerce/final-cart-authorization.ts +2 -2
- package/apps/storefront/src/pages/api/compliance/preflight.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/confirm.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +1 -1
- package/apps/storefront/src/pages/api/tracking/interaction.ts +1 -1
- package/apps/storefront/src/pages/collections/[handle].astro +5 -5
- package/apps/storefront/src/pages/collections/index.astro +2 -2
- package/apps/storefront/src/pages/index.astro +7 -7
- package/apps/storefront/src/pages/llms.txt.ts +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +14 -14
- package/apps/storefront/src/pages/search.astro +2 -2
- package/apps/storefront/src/pages/sitemap.xml.ts +1 -1
- package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +34 -34
- package/docs/widget-library-guide.md +36 -36
- package/package.json +1 -1
- package/packages/public-runtime/src/chrome.ts +1 -1
- package/packages/public-runtime/src/customization-scripts.ts +1 -1
- /package/apps/storefront/src/components/{CollectionCard.astro → catalog/storefront/CollectionCard.astro} +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/BrandGrid.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/RatingStars.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ReviewList.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ReviewSummary.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/TagFilterCloud.astro +0 -0
- /package/apps/storefront/src/components/{islands → catalog/storefront/islands}/ImageGallery.tsx +0 -0
- /package/apps/storefront/src/components/{islands → catalog/storefront/islands}/QuickView.tsx +0 -0
- /package/apps/storefront/src/components/{islands → catalog/storefront/islands}/RecentlyViewed.tsx +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/ActiveFilters.astro +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/Pagination.astro +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/SortSelect.astro +0 -0
- /package/apps/storefront/src/components/{commerce → checkout/storefront/commerce}/CartDrawerStyles.astro +0 -0
- /package/apps/storefront/src/components/{commerce → checkout/storefront/commerce}/CheckoutLoader.astro +0 -0
- /package/apps/storefront/src/components/compliance/{AdultSignatureNotice.astro → storefront/compliance/AdultSignatureNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ComplianceNotice.astro → storefront/compliance/ComplianceNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ExciseTaxNotice.astro → storefront/compliance/ExciseTaxNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{PactActNotice.astro → storefront/compliance/PactActNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{Prop65Warning.astro → storefront/compliance/Prop65Warning.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{PurchaseLimitNotice.astro → storefront/compliance/PurchaseLimitNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ShippingRestrictionNotice.astro → storefront/compliance/ShippingRestrictionNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{StateEligibilityNotice.astro → storefront/compliance/StateEligibilityNotice.astro} +0 -0
- /package/apps/storefront/src/components/{islands → compliance/storefront/islands}/AgeGate.tsx +0 -0
- /package/apps/storefront/src/components/{islands → compliance/storefront/islands}/IsolatedAgeGate.tsx +0 -0
- /package/apps/storefront/src/components/{WidgetFrame.astro → integrations/storefront/WidgetFrame.astro} +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsPreview.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsState.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/productSetupPhoto.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/productsTabClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/viewmodels/catalogProducts.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/viewmodels/products.ts +0 -0
- /package/apps/storefront/src/lib/{fixtures → catalog/fixtures}/sampleProducts.ts +0 -0
- /package/apps/storefront/src/lib/{featuredProductsPresentation.ts → catalog/shared/featuredProductsPresentation.ts} +0 -0
- /package/apps/storefront/src/lib/{tot → catalog/tot}/d1Client.ts +0 -0
- /package/apps/storefront/src/lib/{tot → catalog/tot}/totClientInterface.ts +0 -0
- /package/apps/storefront/src/lib/{admin → checkout/admin}/checkoutStyleInput.ts +0 -0
- /package/apps/storefront/src/lib/{admin → checkout/admin}/checkoutStyleTarget.ts +0 -0
- /package/apps/storefront/src/{components/islands → lib/checkout/browser}/useCheckoutHandoffCorrelation.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/checkoutHandoffCorrelation.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/checkoutSettings.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/finalCartAuthorization.ts +0 -0
- /package/apps/storefront/src/lib/{checkoutCommerce.ts → checkout/shared/checkoutCommerce.ts} +0 -0
- /package/apps/storefront/src/{components/islands → lib/compliance/browser}/checkoutVerificationFlow.ts +0 -0
- /package/apps/storefront/src/lib/{visitorRegionCookie.ts → compliance/shared/visitorRegionCookie.ts} +0 -0
- /package/apps/storefront/src/lib/{verification → compliance/verification}/totVerificationClient.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/gatewayKeys.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/gtmMigrationDraft.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/orders/customerHash.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/routeParams.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/scopes.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/widgets/eligibility.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/widgets/frameProps.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/widgets/launchToken.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/widgets/placements.ts +0 -0
- /package/apps/storefront/src/lib/{apps → integrations/apps}/widgets/renderSlot.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/bakedManagedInstalls.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/nonceStamp.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/renderIntegrationState.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/stageDestinationIds.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/tenantAnalyticsDeclarations.ts +0 -0
- /package/apps/storefront/src/lib/{integration → integrations/integration}/tenantDeclarations.ts +0 -0
- /package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/cloudflareQueueDispatcher.ts +0 -0
- /package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/deliveryMapper.ts +0 -0
- /package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/dispatcher.ts +0 -0
- /package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/endpointGuard.ts +0 -0
- /package/apps/storefront/src/lib/{webhooks → integrations/webhooks}/events.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/orderClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/services/orders.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/viewmodels/orders.ts +0 -0
- /package/apps/storefront/src/lib/{apps/orders → orders/providers}/foxyOrderClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → subscriptions/admin}/viewmodels/subscriptions.ts +0 -0
- /package/apps/storefront/src/lib/{subscription → subscriptions/subscription}/model.ts +0 -0
|
@@ -28,7 +28,7 @@ import { buildCloudEventEnvelope } from "./events.js";
|
|
|
28
28
|
import { computeBackoffDelaySeconds, MAX_DELIVERY_ATTEMPTS, type AttemptOutcome } from "./dispatcher.js";
|
|
29
29
|
import { validateWebhookEndpoint } from "./endpointGuard.js";
|
|
30
30
|
import { COMMERCE_SCHEDULER } from "@tot/public-runtime";
|
|
31
|
-
import type { Queryable } from "
|
|
31
|
+
import type { Queryable } from "../../catalog/d1/catalog.js";
|
|
32
32
|
|
|
33
33
|
/** Bounded per-attempt timeout — a hung receiver must not hold a dispatcher slot open indefinitely. */
|
|
34
34
|
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* the delivery via `getOrThrowDelivery` before returning it, the same
|
|
40
40
|
* read-after-write discipline `AppRegistryService` uses.
|
|
41
41
|
*/
|
|
42
|
-
import type { Queryable } from "
|
|
42
|
+
import type { Queryable } from "../../catalog/d1/catalog.js";
|
|
43
43
|
|
|
44
44
|
/** Mirrors the `Delivery.topic` / CloudEvents channel enum in the D1/D2 contract. */
|
|
45
45
|
export type WebhookTopic =
|
|
@@ -50,8 +50,8 @@ import { TOPIC_REQUIRED_SCOPE } from "./events.js";
|
|
|
50
50
|
import { getDispatcher } from "./getDispatcher.js";
|
|
51
51
|
import { getRegistryService } from "../apps/registryAccess.js";
|
|
52
52
|
import type { AppInstall } from "../apps/registryService.js";
|
|
53
|
-
import { fromD1 } from "
|
|
54
|
-
import { readD1 } from "
|
|
53
|
+
import { fromD1 } from "../../catalog/d1/catalog.js";
|
|
54
|
+
import { readD1 } from "../../env.js";
|
|
55
55
|
|
|
56
56
|
/** Contract-scoped payload schema version — `asyncapi.yaml`'s `dataschemaversion` is `const: "1"` for V1. */
|
|
57
57
|
const DATASCHEMA_VERSION = "1";
|
|
@@ -22,8 +22,8 @@ import { AppRegistryService } from "../apps/registryService.js";
|
|
|
22
22
|
import { D1CredentialStore } from "../apps/credentials.js";
|
|
23
23
|
import { DEFAULT_APP_GATEWAY_KID, APP_GATEWAY_KID_ENV } from "../apps/gatewayKeys.js";
|
|
24
24
|
import { json } from "../apps/registryAccess.js";
|
|
25
|
-
import { fromD1, type Queryable } from "
|
|
26
|
-
import { readD1, readEnv, readQueue } from "
|
|
25
|
+
import { fromD1, type Queryable } from "../../catalog/d1/catalog.js";
|
|
26
|
+
import { readD1, readEnv, readQueue } from "../../env.js";
|
|
27
27
|
import { COMMERCE_SCHEDULER } from "@tot/public-runtime";
|
|
28
28
|
|
|
29
29
|
/** Binding name `getDispatcher()` checks to pick the Cloudflare Queues adapter. Not yet declared in `wrangler.toml`. */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* BreadcrumbList, Organization. Kept pure so pages compose them and pass to <Seo>.
|
|
4
4
|
*/
|
|
5
5
|
import type { CatalogProduct, Review, TenantConfig } from "@tot/public-runtime";
|
|
6
|
-
import { isAvailable } from "./tot/query.js";
|
|
6
|
+
import { isAvailable } from "./catalog/tot/query.js";
|
|
7
7
|
|
|
8
8
|
export function organizationLd(tenant: TenantConfig, base: string) {
|
|
9
9
|
// Logo sourced from the migrated brand assets (og image / logo), so the
|
|
@@ -132,7 +132,7 @@ export const MONITORS: readonly Monitor[] = [
|
|
|
132
132
|
category: "commerce",
|
|
133
133
|
signal: {
|
|
134
134
|
source:
|
|
135
|
-
"Signed add-to-cart + cross-origin checkout POST (F11; lib/checkoutCommerce.ts, checkoutCspAdditions)",
|
|
135
|
+
"Signed add-to-cart + cross-origin checkout POST (F11; lib/checkout/shared/checkoutCommerce.ts, checkoutCspAdditions)",
|
|
136
136
|
observe:
|
|
137
137
|
"Worker logs on the signed add-to-cart path + checkout-host success beacon; alert on failure ratio",
|
|
138
138
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* per-subscriber diff. "New since last send" is computed once from the previous
|
|
19
19
|
* ledger row's `sent_at`, not per-subscriber.
|
|
20
20
|
*/
|
|
21
|
-
import type { Queryable } from "../d1/catalog.js";
|
|
21
|
+
import type { Queryable } from "../catalog/d1/catalog.js";
|
|
22
22
|
import type { BlogPostSummary } from "../blog/types.js";
|
|
23
23
|
import {
|
|
24
24
|
sendBatch as realSendBatch,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* caller is responsible for resolving `tenantId` from the request host/session
|
|
10
10
|
* (NEVER a client body) — that is the multi-tenant isolation boundary.
|
|
11
11
|
*/
|
|
12
|
-
import type { Queryable } from "../d1/catalog.js";
|
|
12
|
+
import type { Queryable } from "../catalog/d1/catalog.js";
|
|
13
13
|
|
|
14
14
|
export type SubscriberStatus = "pending" | "confirmed" | "unsubscribed" | "bounced";
|
|
15
15
|
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
* see `docs/private-apps/order-forward-contract.md` for the full rationale.
|
|
34
34
|
*/
|
|
35
35
|
import { OrdersStore, ScrappyOrderLedger, type OrderLineItem, type OrderStatus, type Order } from "./ordersStore.js";
|
|
36
|
-
import { emitWebhookEvent } from "../../webhooks/emit.js";
|
|
37
|
-
import type { WebhookTopic } from "../../webhooks/deliveryStore.js";
|
|
38
|
-
import type { Queryable } from "../../d1/catalog.js";
|
|
36
|
+
import { emitWebhookEvent } from "../../integrations/webhooks/emit.js";
|
|
37
|
+
import type { WebhookTopic } from "../../integrations/webhooks/deliveryStore.js";
|
|
38
|
+
import type { Queryable } from "../../catalog/d1/catalog.js";
|
|
39
39
|
import {
|
|
40
40
|
createLocalJWKSet,
|
|
41
41
|
decodeJwt,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* internals — and never lets a raw customer identifier leave this module:
|
|
9
9
|
* customer identity is always the per-(tenant, install) `customerHash`.
|
|
10
10
|
*/
|
|
11
|
-
import { customerHash } from "
|
|
12
|
-
import type { FoxyOrder, FoxyOrderLineItem } from "
|
|
11
|
+
import { customerHash } from "../../integrations/apps/orders/customerHash.js";
|
|
12
|
+
import type { FoxyOrder, FoxyOrderLineItem } from "../providers/foxyOrderClient.js";
|
|
13
13
|
import {
|
|
14
14
|
COMPLIANCE_STATES,
|
|
15
15
|
FULFILLMENT_STATES,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `AppRegistryService` uses, so this runs unchanged against real D1 in the
|
|
11
11
|
* Worker and an in-memory `node:sqlite` in tests.
|
|
12
12
|
*/
|
|
13
|
-
import type { Queryable, QueryStatement } from "../../d1/catalog.js";
|
|
13
|
+
import type { Queryable, QueryStatement } from "../../catalog/d1/catalog.js";
|
|
14
14
|
import {
|
|
15
15
|
canonicalJson,
|
|
16
16
|
idempotencyKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AdminTenantEnvelope } from "../../envelope";
|
|
2
|
-
import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../seed";
|
|
1
|
+
import type { AdminTenantEnvelope } from "../../admin/envelope";
|
|
2
|
+
import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
|
|
3
3
|
import type {
|
|
4
4
|
OrderDetail,
|
|
5
5
|
OrderEvidenceEvent,
|
|
@@ -7,9 +7,9 @@ import type {
|
|
|
7
7
|
OrderQueueSummary,
|
|
8
8
|
OrderRow,
|
|
9
9
|
OrdersViewModel,
|
|
10
|
-
} from "
|
|
11
|
-
import { tenantProfile } from "
|
|
12
|
-
import { memoizeByEnvelope } from "../../memoizeByEnvelope";
|
|
10
|
+
} from "../admin/viewmodels/orders";
|
|
11
|
+
import { tenantProfile } from "../../admin/services/mock/tenants";
|
|
12
|
+
import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
|
|
13
13
|
|
|
14
14
|
// Must stay index-aligned with customers.ts's NAMES: an order's customerId is
|
|
15
15
|
// derived from the picked name's position here, and customers.ts assigns each
|
|
@@ -431,7 +431,7 @@ function renderHeader(header: ChromeHeader, variant: HeaderVariant, currentPath?
|
|
|
431
431
|
/**
|
|
432
432
|
* Age-gate config, embedded as JSON. The CHROME_BEHAVIOR_JS mechanism
|
|
433
433
|
* reads this and builds the dialog itself inside a closed shadow root — the same
|
|
434
|
-
* tamper-resistance pattern components/islands/IsolatedAgeGate.tsx uses for
|
|
434
|
+
* tamper-resistance pattern components/compliance/storefront/islands/IsolatedAgeGate.tsx uses for
|
|
435
435
|
* component pages (see its header comment). `<` is escaped so an authored value
|
|
436
436
|
* can't close the tag early.
|
|
437
437
|
*/
|
|
@@ -683,7 +683,7 @@ export const CHROME_BEHAVIOR_JS = `(function () {
|
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
// 21+ age gate — shadow-isolated. Only the host <div> lives in light
|
|
686
|
-
// DOM (data-tot-compliance, the same marker components/islands/IsolatedAgeGate.tsx
|
|
686
|
+
// DOM (data-tot-compliance, the same marker components/compliance/storefront/islands/IsolatedAgeGate.tsx
|
|
687
687
|
// uses); its contents sit behind a closed shadow root, so tenant CSS/JS can't
|
|
688
688
|
// select, restyle, or hide the dialog. A MutationObserver re-asserts the host the
|
|
689
689
|
// same way that component does. Config comes from the validated ChromeAgeGate
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
type CatalogProduct,
|
|
17
17
|
type ProductSectionSource,
|
|
18
18
|
} from "@tot/public-runtime";
|
|
19
|
-
import type { ToTClient } from "@/lib/tot/ToTClient";
|
|
20
|
-
import { isOnSale } from "@/lib/tot/query";
|
|
19
|
+
import type { ToTClient } from "@/lib/catalog/tot/ToTClient";
|
|
20
|
+
import { isOnSale } from "@/lib/catalog/tot/query";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Where a merchandising section gets its products. Exactly one shape per source.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* root that wires the real bindings (mirrors `getDispatcher()`); it returns
|
|
19
19
|
* `null` when either binding is absent so callers degrade rather than throw.
|
|
20
20
|
*/
|
|
21
|
-
import type { Queryable } from "../d1/catalog.js";
|
|
21
|
+
import type { Queryable } from "../catalog/d1/catalog.js";
|
|
22
22
|
import { readD1, readEnv } from "../env.js";
|
|
23
23
|
|
|
24
24
|
/** The decrypted token material we persist as one JSON blob under AES-GCM. */
|
|
@@ -162,7 +162,7 @@ export async function rotateSocialToken(
|
|
|
162
162
|
*/
|
|
163
163
|
export async function resolveSocialTokenStore(): Promise<SocialTokenStoreDeps | null> {
|
|
164
164
|
const [{ fromD1 }, d1, rawKek] = await Promise.all([
|
|
165
|
-
import("../d1/catalog.js"),
|
|
165
|
+
import("../catalog/d1/catalog.js"),
|
|
166
166
|
readD1("STOREFRONT_APPS_DB"),
|
|
167
167
|
readEnv("SOCIAL_TOKEN_KEK"),
|
|
168
168
|
]);
|
package/apps/storefront/src/lib/{admin/services/mock → subscriptions/fixtures}/subscriptions.ts
RENAMED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
isSubscriptionFrequency,
|
|
8
8
|
purchaseOptionPrice,
|
|
9
9
|
} from "@tot/public-runtime";
|
|
10
|
-
import type { AdminTenantEnvelope } from "../../envelope";
|
|
11
|
-
import { memoizeByEnvelope } from "../../memoizeByEnvelope";
|
|
10
|
+
import type { AdminTenantEnvelope } from "../../admin/envelope";
|
|
11
|
+
import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
|
|
12
12
|
import {
|
|
13
13
|
MOCK_ANCHOR_ISO,
|
|
14
14
|
offsetIso,
|
|
15
15
|
randomInt,
|
|
16
16
|
seededRandom,
|
|
17
|
-
} from "../../seed";
|
|
18
|
-
import type { CustomerRow } from "
|
|
19
|
-
import type { ProductDetail, ProductRow } from "../../viewmodels/products";
|
|
17
|
+
} from "../../admin/seed";
|
|
18
|
+
import type { CustomerRow } from "../../customers/admin/viewmodels/customers";
|
|
19
|
+
import type { ProductDetail, ProductRow } from "../../catalog/admin/viewmodels/products";
|
|
20
20
|
import type {
|
|
21
21
|
SubscriptionAttentionRow,
|
|
22
22
|
SubscriptionCheckoutField,
|
|
@@ -27,9 +27,9 @@ import type {
|
|
|
27
27
|
SubscriptionRenewalEvent,
|
|
28
28
|
SubscriptionSubscriberRow,
|
|
29
29
|
SubscriptionsViewModel,
|
|
30
|
-
} from "
|
|
31
|
-
import { getCustomersViewModel } from "
|
|
32
|
-
import { getProductsViewModel } from "
|
|
30
|
+
} from "../admin/viewmodels/subscriptions";
|
|
31
|
+
import { getCustomersViewModel } from "../../customers/fixtures/customers";
|
|
32
|
+
import { getProductsViewModel } from "../../catalog/fixtures/products";
|
|
33
33
|
|
|
34
34
|
export interface SubscriptionProductSource {
|
|
35
35
|
productId: string;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* transport-agnostic and unit-testable against an in-memory sqlite.
|
|
23
23
|
*/
|
|
24
24
|
import { readEnv } from "../env.js";
|
|
25
|
-
import type { Queryable, QueryStatement } from "../d1/catalog.js";
|
|
25
|
+
import type { Queryable, QueryStatement } from "../catalog/d1/catalog.js";
|
|
26
26
|
|
|
27
27
|
const CF_API_BASE = "https://api.cloudflare.com/client/v4";
|
|
28
28
|
|
|
Binary file
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* transient D1 fault) is caught, logged, and recorded in that tenant's
|
|
45
45
|
* outcome — it never aborts the rest of the batch.
|
|
46
46
|
*/
|
|
47
|
-
import type { Queryable } from "../d1/catalog.js";
|
|
47
|
+
import type { Queryable } from "../catalog/d1/catalog.js";
|
|
48
48
|
import type { AnalyticsEngineLike } from "../activity/store.js";
|
|
49
49
|
import { fromD1Rest, type D1ControlConfig } from "./d1Control.js";
|
|
50
50
|
import { aggregateInteractions, writeInteractionAnalytics } from "./interactionStore.js";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* &opt.Size=M&tag=sale&priceMin=50&priceMax=200&q=wool
|
|
9
9
|
*/
|
|
10
10
|
import type { ListProductsQuery } from "@tot/public-runtime";
|
|
11
|
-
import type { PriceBucket } from "./priceBuckets.js";
|
|
11
|
+
import type { PriceBucket } from "./catalog/shared/priceBuckets.js";
|
|
12
12
|
|
|
13
13
|
export function parseQuery(url: URL): ListProductsQuery {
|
|
14
14
|
const sp = url.searchParams;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { APIContext, MiddlewareNext } from "astro";
|
|
10
10
|
import { readEnv, readD1, readKv } from "@/lib/env";
|
|
11
|
-
import { fromD1, type D1Like } from "@/lib/d1/catalog";
|
|
11
|
+
import { fromD1, type D1Like } from "@/lib/catalog/d1/catalog";
|
|
12
12
|
import { readCurrentTenantConsentConfig } from "@/lib/apps/consentConfigRead";
|
|
13
|
-
import { loadActiveManagedInstallDeclarations } from "@/lib/integration/managedInstallDeclarations";
|
|
13
|
+
import { loadActiveManagedInstallDeclarations } from "@/lib/integrations/integration/managedInstallDeclarations";
|
|
14
14
|
import { buildTenantConsentBroker, verifyPreviewToken } from "@tot/public-runtime";
|
|
15
15
|
import { tenantIsDeclaredPublic } from "@/config/tenants";
|
|
16
16
|
import type {
|
|
@@ -29,7 +29,7 @@ import { compileRouteTierIndexV1, resolvePublicationRoutePlanV1, type RouteTierI
|
|
|
29
29
|
import type { PublicationArtifactBucketV1, TenantConfig } from "@tot/public-runtime";
|
|
30
30
|
import { DEV_DRAFT_COOKIE } from "@/lib/dev/devDraft";
|
|
31
31
|
import { applySecurityHeaders } from "@/lib/securityHeaders";
|
|
32
|
-
import { visitorRegionFor, withVisitorRegionCookie } from "@/lib/visitorRegionCookie";
|
|
32
|
+
import { visitorRegionFor, withVisitorRegionCookie } from "@/lib/compliance/shared/visitorRegionCookie";
|
|
33
33
|
import { tryServeStaticBundle } from "./staticBundle.js";
|
|
34
34
|
import { resolveCandidateContentPin } from "./candidatePin.js";
|
|
35
35
|
import { parseGateMode } from "@/lib/auth/loginGate";
|
|
@@ -69,7 +69,7 @@ function routeTierIndexFor(tenant: TenantConfig): RouteTierIndexV1 {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Every HTML document leaves with the visitor's region class (lib/visitorRegionCookie),
|
|
72
|
+
* Every HTML document leaves with the visitor's region class (lib/compliance/shared/visitorRegionCookie),
|
|
73
73
|
* appended after the branch has read or written any edge cache.
|
|
74
74
|
*/
|
|
75
75
|
export const onRequest = defineMiddleware(async (context, next) => {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { APIContext, MiddlewareNext } from "astro";
|
|
12
12
|
import { referenceTheme } from "@/themes/reference";
|
|
13
13
|
import { mergeTheme, themeToCssVars } from "@/themes/schema";
|
|
14
|
-
import { createToTClient } from "@/lib/tot/ToTClient";
|
|
14
|
+
import { createToTClient } from "@/lib/catalog/tot/ToTClient";
|
|
15
15
|
import { readEnv, readR2 } from "@/lib/runtimeEnv";
|
|
16
16
|
import { tryServeStaticBundle } from "./staticBundle.js";
|
|
17
17
|
import { isPlatformPublicDiscoveryPath } from "./routeBranch.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
verifyConsentSnapshotSig,
|
|
65
65
|
resolveNativeGa4SandboxUrl,
|
|
66
66
|
} from "@tot/public-runtime";
|
|
67
|
-
import { readBakedManagedInstalls } from "@/lib/integration/bakedManagedInstalls";
|
|
67
|
+
import { readBakedManagedInstalls } from "@/lib/integrations/integration/bakedManagedInstalls";
|
|
68
68
|
import { readWithImagePreviewRewriteOverlay } from "@tot/public-runtime/image-preview-rewrite-overlay";
|
|
69
69
|
import type {
|
|
70
70
|
CapabilityConfig,
|
|
@@ -84,24 +84,24 @@ import {
|
|
|
84
84
|
HTML_CACHE_POLICY_CAPTURE_PROBE,
|
|
85
85
|
} from "@tot/public-runtime";
|
|
86
86
|
import { publicationContentRedirectLocationV1 } from "@tot/public-runtime/publication-content-redirects";
|
|
87
|
-
import { loadTenantIntegrationDeclarations } from "@/lib/integration/tenantDeclarations";
|
|
88
|
-
import { resolveTenantCommerce } from "@/lib/checkoutCommerce";
|
|
87
|
+
import { loadTenantIntegrationDeclarations } from "@/lib/integrations/integration/tenantDeclarations";
|
|
88
|
+
import { resolveTenantCommerce } from "@/lib/checkout/shared/checkoutCommerce";
|
|
89
89
|
import {
|
|
90
90
|
requestBrowserEnvironment,
|
|
91
91
|
previewBrowserEnvironment,
|
|
92
92
|
deriveSiteSurface,
|
|
93
93
|
cspHeaderName,
|
|
94
|
-
} from "@/lib/integration/browserEnvironment";
|
|
94
|
+
} from "@/lib/integrations/integration/browserEnvironment";
|
|
95
95
|
import {
|
|
96
96
|
carriesLiveNonce,
|
|
97
97
|
freshNonce,
|
|
98
98
|
isErrorPageReroute,
|
|
99
99
|
stampResponseNonce,
|
|
100
|
-
} from "@/lib/integration/nonceStamp";
|
|
100
|
+
} from "@/lib/integrations/integration/nonceStamp";
|
|
101
101
|
import {
|
|
102
102
|
composeIntegrationDeclarations,
|
|
103
103
|
resolveIntegrationRenderState,
|
|
104
|
-
} from "@/lib/integration/renderIntegrationState";
|
|
104
|
+
} from "@/lib/integrations/integration/renderIntegrationState";
|
|
105
105
|
import { recordActivity } from "@/lib/activity/recordActivity";
|
|
106
106
|
import { middlewareRewriteTargetV1 } from "./routeBranch.js";
|
|
107
107
|
import { declaredTenantOrigins } from "@/lib/tenantOrigins";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
export const prerender = false;
|
|
13
13
|
|
|
14
14
|
import Layout from "@/layouts/Layout.astro";
|
|
15
|
-
import CollectionCard from "@/components/CollectionCard.astro";
|
|
15
|
+
import CollectionCard from "@/components/catalog/storefront/CollectionCard.astro";
|
|
16
16
|
import { withBase } from "@/lib/basePath";
|
|
17
17
|
|
|
18
18
|
const { tenant, tot, basePath, features } = Astro.locals;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import type { APIContext } from "astro";
|
|
31
31
|
import { readD1, readEnv, readAnalytics, runAfterResponse, type CfExecutionContextLike } from "@/lib/env";
|
|
32
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
32
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
33
33
|
import { verifyIngestAuth } from "@/lib/activity/ingestAuth";
|
|
34
34
|
import { ingestEvents, type IngestRejection } from "@/lib/activity/ingest";
|
|
35
35
|
import { fanOutActivity, type AnalyticsEngineLike, type ActivitySinks } from "@/lib/activity/store";
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import type { APIContext } from "astro";
|
|
28
28
|
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
29
29
|
import { readD1 } from "@/lib/env";
|
|
30
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
30
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
31
31
|
import { checkActivityAlerts } from "@/lib/activity/alerts";
|
|
32
32
|
|
|
33
33
|
export const prerender = false;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import type { APIContext } from "astro";
|
|
31
31
|
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
32
32
|
import { readD1 } from "@/lib/env";
|
|
33
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
33
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
34
34
|
import { resolveTenantStore, trackingNamePrefix } from "@/lib/tracking/tenantD1Registry";
|
|
35
35
|
import { readD1Control } from "@/lib/tracking/d1Control";
|
|
36
36
|
import { readTenantInteractionInsights } from "@/lib/tracking/tenantReadAccess";
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
orderApiBaseUrl,
|
|
16
16
|
OrderApiError,
|
|
17
17
|
projectCheckoutOrder,
|
|
18
|
-
} from "@/lib/admin/orderClient";
|
|
19
|
-
import { assessCheckoutOrder } from "@/lib/admin/services/orders";
|
|
18
|
+
} from "@/lib/orders/admin/orderClient";
|
|
19
|
+
import { assessCheckoutOrder } from "@/lib/orders/admin/services/orders";
|
|
20
20
|
import { commerceStageForEnv } from "@/lib/fulfillment/fulfillmentService";
|
|
21
21
|
|
|
22
22
|
export const prerender = false;
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
createCheckoutOrderClient,
|
|
17
17
|
orderApiBaseUrl,
|
|
18
18
|
OrderApiError,
|
|
19
|
-
} from "@/lib/admin/orderClient";
|
|
19
|
+
} from "@/lib/orders/admin/orderClient";
|
|
20
20
|
import { commerceStageForEnv } from "@/lib/fulfillment/fulfillmentService";
|
|
21
|
-
import { assessCheckoutOrder, parseOrderFilters } from "@/lib/admin/services/orders";
|
|
21
|
+
import { assessCheckoutOrder, parseOrderFilters } from "@/lib/orders/admin/services/orders";
|
|
22
22
|
|
|
23
23
|
export const prerender = false;
|
|
24
24
|
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
defaultConsentSnapshot,
|
|
26
26
|
type CartDenialCode,
|
|
27
27
|
} from "@tot/public-runtime";
|
|
28
|
-
import { resolveCheckoutHandoffCorrelation } from "@/lib/commerce/checkoutHandoffCorrelation";
|
|
29
|
-
import { resolveCartSigning, shopperCartDenialMessage } from "@/lib/checkoutCommerce";
|
|
28
|
+
import { resolveCheckoutHandoffCorrelation } from "@/lib/checkout/commerce/checkoutHandoffCorrelation";
|
|
29
|
+
import { resolveCartSigning, shopperCartDenialMessage } from "@/lib/checkout/shared/checkoutCommerce";
|
|
30
30
|
|
|
31
31
|
export const prerender = false;
|
|
32
32
|
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
type PaymentState,
|
|
18
18
|
type StockState,
|
|
19
19
|
} from "@tot/public-runtime";
|
|
20
|
-
import { fromD1, listAllActiveProducts } from "@/lib/d1/catalog.js";
|
|
20
|
+
import { fromD1, listAllActiveProducts } from "@/lib/catalog/d1/catalog.js";
|
|
21
21
|
import { readD1, readEnv } from "@/lib/env";
|
|
22
|
-
import { evaluateFinalCart, type SeamView } from "@/lib/commerce/finalCartAuthorization.js";
|
|
22
|
+
import { evaluateFinalCart, type SeamView } from "@/lib/checkout/commerce/finalCartAuthorization.js";
|
|
23
23
|
import { d1CommerceRunner, mirrorOnHand, reserveAllocation } from "@/lib/inventory/allocations.js";
|
|
24
24
|
import { POST as compliancePreflight } from "../compliance/preflight.js";
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
createTotVerificationClient,
|
|
34
34
|
type TotVerificationClient,
|
|
35
35
|
type TotVerificationStatus,
|
|
36
|
-
} from "@/lib/verification/totVerificationClient";
|
|
36
|
+
} from "@/lib/compliance/verification/totVerificationClient";
|
|
37
37
|
|
|
38
38
|
export const prerender = false;
|
|
39
39
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { APIRoute } from "astro";
|
|
18
18
|
import { readD1, readKv, readEnv } from "@/lib/env";
|
|
19
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
19
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
20
20
|
import { checkRateLimit } from "@/lib/rate/kvWindow";
|
|
21
21
|
import { NewsletterSubscribersStore } from "@/lib/newsletter/subscribers";
|
|
22
22
|
import { randomToken, hashConsentIp } from "@/lib/newsletter/consent";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { APIRoute } from "astro";
|
|
13
13
|
import { readD1 } from "@/lib/env";
|
|
14
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
14
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
15
15
|
import { NewsletterSubscribersStore } from "@/lib/newsletter/subscribers";
|
|
16
16
|
|
|
17
17
|
export const prerender = false;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import type { APIContext } from "astro";
|
|
22
22
|
import { readD1 } from "@/lib/env";
|
|
23
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
23
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
24
24
|
import { unsubscribeByToken } from "@/lib/newsletter/subscribers";
|
|
25
25
|
|
|
26
26
|
export const prerender = false;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
*/
|
|
39
39
|
import type { APIContext } from "astro";
|
|
40
40
|
import { readD1, readAnalytics, runAfterResponse, type CfExecutionContextLike } from "@/lib/env";
|
|
41
|
-
import { fromD1 } from "@/lib/d1/catalog";
|
|
41
|
+
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
42
42
|
import { ingestInteractions, type StampedInteractionEvent } from "@/lib/tracking/collectorIngest";
|
|
43
43
|
import { readD1Control } from "@/lib/tracking/d1Control";
|
|
44
44
|
import { resolveTenantStore, trackingNamePrefix } from "@/lib/tracking/tenantD1Registry";
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import Layout from "@/layouts/Layout.astro";
|
|
9
9
|
import Breadcrumbs from "@/components/Breadcrumbs.astro";
|
|
10
10
|
import { homeCrumbLabel, siteTrail } from "@/lib/breadcrumbs";
|
|
11
|
-
import ProductCard from "@/components/ProductCard.astro";
|
|
11
|
+
import ProductCard from "@/components/catalog/storefront/ProductCard.astro";
|
|
12
12
|
import EmptyState from "@/components/EmptyState.astro";
|
|
13
|
-
import FacetSidebar from "@/components/plp/FacetSidebar.astro";
|
|
14
|
-
import ActiveFilters from "@/components/plp/ActiveFilters.astro";
|
|
15
|
-
import SortSelect from "@/components/plp/SortSelect.astro";
|
|
16
|
-
import Pagination from "@/components/plp/Pagination.astro";
|
|
13
|
+
import FacetSidebar from "@/components/catalog/storefront/plp/FacetSidebar.astro";
|
|
14
|
+
import ActiveFilters from "@/components/catalog/storefront/plp/ActiveFilters.astro";
|
|
15
|
+
import SortSelect from "@/components/catalog/storefront/plp/SortSelect.astro";
|
|
16
|
+
import Pagination from "@/components/catalog/storefront/plp/Pagination.astro";
|
|
17
17
|
import Img from "@/components/assets/storefront/Img.astro";
|
|
18
18
|
import { parseQuery, buildQueryString } from "@/lib/url";
|
|
19
19
|
import { breadcrumbLd, itemListLd } from "@/lib/jsonld";
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import Layout from "@/layouts/Layout.astro";
|
|
7
7
|
import Breadcrumbs from "@/components/Breadcrumbs.astro";
|
|
8
8
|
import { homeCrumbLabel, siteTrail } from "@/lib/breadcrumbs";
|
|
9
|
-
import CollectionCard from "@/components/CollectionCard.astro";
|
|
9
|
+
import CollectionCard from "@/components/catalog/storefront/CollectionCard.astro";
|
|
10
10
|
import EmptyState from "@/components/EmptyState.astro";
|
|
11
11
|
import { breadcrumbLd } from "@/lib/jsonld";
|
|
12
|
-
import { activeMemberCount, nonEmptyCollections } from "@/lib/tot/query";
|
|
12
|
+
import { activeMemberCount, nonEmptyCollections } from "@/lib/catalog/tot/query";
|
|
13
13
|
|
|
14
14
|
const { tenant, tot, canonicalBase } = Astro.locals;
|
|
15
15
|
// Commerce-only route: marketing tenants have no catalog surface.
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import Layout from "@/layouts/Layout.astro";
|
|
10
10
|
import Section from "@/components/Section.astro";
|
|
11
11
|
import Hero from "@/components/home/Hero.astro";
|
|
12
|
-
import ProductCarousel from "@/components/commerce/ProductCarousel.astro";
|
|
13
|
-
import ProductGrid from "@/components/commerce/ProductGrid.astro";
|
|
14
|
-
import CollectionCard from "@/components/CollectionCard.astro";
|
|
12
|
+
import ProductCarousel from "@/components/catalog/storefront/commerce/ProductCarousel.astro";
|
|
13
|
+
import ProductGrid from "@/components/catalog/storefront/commerce/ProductGrid.astro";
|
|
14
|
+
import CollectionCard from "@/components/catalog/storefront/CollectionCard.astro";
|
|
15
15
|
import Img from "@/components/assets/storefront/Img.astro";
|
|
16
16
|
import PromoTiles from "@/components/content/PromoTiles.astro";
|
|
17
17
|
import TrustStrip from "@/components/content/TrustStrip.astro";
|
|
@@ -21,9 +21,9 @@ import TierCards from "@/components/membership/storefront/membership/TierCards.a
|
|
|
21
21
|
import { withBase } from "@/lib/basePath";
|
|
22
22
|
import { rawHtmlPolicy, rawHtmlResponse } from "@/lib/rawMarketingHtml";
|
|
23
23
|
import { renderRawComplianceTop, renderRawComplianceBottom } from "@/lib/compliance/rawComplianceNotices";
|
|
24
|
-
import AppWidgetFrame from "@/components/apps/AppWidgetFrame.astro";
|
|
25
|
-
import { getRegistryService } from "@/lib/apps/registryAccess.js";
|
|
26
|
-
import { renderWidgetSlot } from "@/lib/apps/widgets/renderSlot.js";
|
|
24
|
+
import AppWidgetFrame from "@/components/integrations/storefront/apps/AppWidgetFrame.astro";
|
|
25
|
+
import { getRegistryService } from "@/lib/integrations/apps/registryAccess.js";
|
|
26
|
+
import { renderWidgetSlot } from "@/lib/integrations/apps/widgets/renderSlot.js";
|
|
27
27
|
import type { CatalogCollection, CatalogProduct } from "@tot/public-runtime";
|
|
28
28
|
import {
|
|
29
29
|
isMarketingBlock,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
normalizeProductSectionSource,
|
|
37
37
|
} from "@tot/public-runtime";
|
|
38
38
|
import { resolveSectionSource } from "@/lib/sections";
|
|
39
|
-
import { featuredProductsPresentationView } from "@/lib/featuredProductsPresentation";
|
|
39
|
+
import { featuredProductsPresentationView } from "@/lib/catalog/shared/featuredProductsPresentation";
|
|
40
40
|
import {
|
|
41
41
|
editorialMediaView,
|
|
42
42
|
resolveCommerceStaticBlock,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* SEO text; compliance facts come from tenant.compliance.
|
|
11
11
|
*/
|
|
12
12
|
import type { APIContext } from "astro";
|
|
13
|
-
import { nonEmptyCollections } from "@/lib/tot/query.js";
|
|
13
|
+
import { nonEmptyCollections } from "@/lib/catalog/tot/query.js";
|
|
14
14
|
import { getBlogSettings, listBlogPosts } from "@/lib/blog/provider.js";
|
|
15
15
|
import { compileRouteTierIndexV1 } from "@tot/public-runtime";
|
|
16
16
|
import { readKv } from "@/lib/runtimeEnv.js";
|