@tokenoftrust/storefront-runner 2.4.88 → 2.4.90
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/astro.config.mjs +2 -2
- package/apps/storefront/drizzle.config.apps.ts +1 -1
- package/apps/storefront/env.d.ts +1 -1
- package/apps/storefront/migrations/README.md +5 -5
- package/apps/storefront/perf/README.md +6 -6
- package/apps/storefront/perf/assert-budgets.ts +2 -2
- package/apps/storefront/src/components/catalog/storefront/CollectionCard.astro +1 -1
- package/apps/storefront/src/components/catalog/storefront/ProductCard.astro +1 -1
- package/apps/storefront/src/components/catalog/storefront/commerce/BrandGrid.astro +1 -1
- package/apps/storefront/src/components/catalog/storefront/commerce/TagFilterCloud.astro +1 -1
- package/apps/storefront/src/components/catalog/storefront/islands/QuickView.tsx +1 -1
- package/apps/storefront/src/components/catalog/storefront/islands/RecentlyViewed.tsx +1 -1
- package/apps/storefront/src/components/catalog/storefront/islands/SearchTypeahead.tsx +1 -1
- package/apps/storefront/src/components/catalog/storefront/plp/ActiveFilters.astro +2 -2
- package/apps/storefront/src/components/catalog/storefront/plp/FacetSidebar.astro +2 -2
- package/apps/storefront/src/components/catalog/storefront/plp/Pagination.astro +1 -1
- package/apps/storefront/src/components/content/storefront/Breadcrumbs.astro +1 -1
- package/apps/storefront/src/components/content/storefront/EmptyState.astro +1 -1
- package/apps/storefront/src/components/content/storefront/blog/BlogPaywall.astro +1 -1
- package/apps/storefront/src/components/content/storefront/blog/ReactionBar.astro +2 -2
- package/apps/storefront/src/components/content/storefront/chrome/NavDropdown.astro +1 -1
- package/apps/storefront/src/components/content/storefront/chrome/SiteFooter.astro +1 -1
- package/apps/storefront/src/components/content/storefront/chrome/SiteHeader.astro +1 -1
- package/apps/storefront/src/components/content/storefront/chrome/UtilityNav.astro +1 -1
- package/apps/storefront/src/components/content/storefront/commerce/ArticleCard.astro +1 -1
- package/apps/storefront/src/components/content/storefront/home/Hero.astro +1 -1
- package/apps/storefront/src/components/content/storefront/marketing/CardGrid.astro +1 -1
- package/apps/storefront/src/components/content/storefront/marketing/Integrations.astro +1 -1
- package/apps/storefront/src/components/content/storefront/marketing/MarketingCtas.astro +1 -1
- package/apps/storefront/src/components/customers/storefront/islands/SavedList.tsx +1 -1
- package/apps/storefront/src/config/adminTargetTenant.ts +1 -1
- package/apps/storefront/src/config/devTenants.ts +1 -1
- package/apps/storefront/src/config/resolver.ts +2 -2
- package/apps/storefront/src/layouts/Layout.astro +5 -5
- package/apps/storefront/src/lib/{admin → access/admin}/README.md +3 -3
- package/apps/storefront/src/lib/{admin → access/admin}/adminShell.ts +1 -1
- package/apps/storefront/src/lib/{admin → access/admin}/envelope.ts +2 -2
- package/apps/storefront/src/lib/{admin → access/admin}/viewmodels/settings.ts +2 -2
- package/apps/storefront/src/lib/{auth → access/auth}/adminApiGuard.ts +2 -2
- package/apps/storefront/src/lib/{auth → access/auth}/adminEntry.ts +3 -3
- package/apps/storefront/src/lib/{auth → access/auth}/adminLanding.ts +1 -1
- package/apps/storefront/src/lib/{auth → access/auth}/brokerAssertion.ts +1 -1
- package/apps/storefront/src/lib/{auth → access/auth}/devAuth.ts +1 -1
- package/apps/storefront/src/lib/{auth → access/auth}/identityToken.ts +2 -2
- package/apps/storefront/src/lib/{auth → access/auth}/loginGate.ts +2 -2
- package/apps/storefront/src/lib/{auth → access/auth}/mcpClientAssertion.ts +1 -1
- package/apps/storefront/src/lib/{auth → access/auth}/route.ts +1 -1
- package/apps/storefront/src/lib/{auth → access/auth}/totAccessClient.ts +5 -5
- package/apps/storefront/src/lib/{dashboard → access/dashboard}/delegateGate.ts +3 -3
- package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffAdmission.ts +1 -1
- package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffVendorAccess.ts +1 -1
- package/apps/storefront/src/lib/{dashboard → access/dashboard}/tenantSelection.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/settings.ts +4 -4
- package/apps/storefront/src/lib/{shared → access/shared}/accessExplain.ts +1 -1
- package/apps/storefront/src/lib/{adminTenantEnvelope.ts → access/shared/adminTenantEnvelope.ts} +3 -3
- package/apps/storefront/src/lib/{shared → access/shared}/developerInvites.ts +5 -5
- package/apps/storefront/src/lib/{shared → access/shared}/invitePreflight.ts +1 -1
- package/apps/storefront/src/lib/{shared → access/shared}/principalGrants.ts +3 -3
- package/apps/storefront/src/lib/{tenantRouting.ts → access/shared/tenantRouting.ts} +1 -1
- package/apps/storefront/src/lib/{shared → access/shared}/viewerGrant.ts +1 -1
- package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
- package/apps/storefront/src/lib/activity/killSwitch.ts +1 -1
- package/apps/storefront/src/lib/activity/uiActor.ts +5 -5
- package/apps/storefront/src/lib/activity/workerCommit.ts +1 -1
- package/apps/storefront/src/lib/admin/services/mock/index.ts +4 -4
- package/apps/storefront/src/lib/assets/durableR2Bindings.ts +1 -1
- package/apps/storefront/src/lib/{admin → automation/admin}/viewmodels/aiWorkflows.ts +3 -3
- package/apps/storefront/src/lib/{admin → automation}/ai/askEnvelope.ts +1 -1
- package/apps/storefront/src/lib/{admin → automation}/ai/operationalRuns.ts +4 -4
- package/apps/storefront/src/lib/{admin/services/mock → automation/fixtures}/aiWorkflows.ts +4 -4
- package/apps/storefront/src/lib/catalog/fixtures/products.ts +4 -4
- package/apps/storefront/src/lib/checkout/admin/checkoutStyleTarget.ts +2 -2
- package/apps/storefront/src/lib/checkout/commerce/checkoutHandoffCorrelation.ts +1 -1
- package/apps/storefront/src/lib/checkout/fixtures/checkoutSettings.ts +1 -1
- package/apps/storefront/src/lib/checkout/shared/checkoutCommerce.ts +1 -1
- package/apps/storefront/src/lib/compliance/browser/checkoutVerificationFlow.ts +1 -1
- package/apps/storefront/src/lib/compliance/enforcement.ts +1 -1
- package/apps/storefront/src/lib/compliance/tamper-sentinel-boot.ts +1 -1
- package/apps/storefront/src/lib/compliance/verification/totVerificationClient.ts +2 -2
- package/apps/storefront/src/lib/content/blog/access.ts +1 -1
- package/apps/storefront/src/lib/content/blog/collection.ts +1 -1
- package/apps/storefront/src/lib/content/blog/postView.ts +2 -2
- package/apps/storefront/src/lib/content/blog/provider.ts +1 -1
- package/apps/storefront/src/lib/content/shared/heroSlideshow.ts +1 -1
- package/apps/storefront/src/lib/content/shared/homeVisualParity.ts +1 -1
- package/apps/storefront/src/lib/content/shared/rawMarketingHtml.ts +1 -1
- package/apps/storefront/src/lib/content/storyblok/provider.ts +1 -1
- package/apps/storefront/src/lib/customers/fixtures/customers.ts +3 -3
- package/apps/storefront/src/lib/{admin → developer-experience/admin}/memoizeByEnvelope.ts +1 -1
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityIngestToken.ts +2 -2
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/cliSignInCode.ts +4 -4
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/livePreview.ts +1 -1
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/previewStatus.ts +2 -2
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/rendezvousBroker.ts +3 -3
- package/apps/storefront/src/lib/{dev → developer-experience/dev}/subjectReissue.ts +2 -2
- package/apps/storefront/src/lib/{http → developer-experience/http}/mcpServiceCall.ts +1 -1
- package/apps/storefront/src/lib/{cloudflare-workers.d.ts → developer-experience/types/cloudflare-workers.d.ts} +1 -1
- package/apps/storefront/src/lib/engagement/messaging/messagesClient.ts +2 -2
- package/apps/storefront/src/lib/engagement/newsletter/resendClient.ts +1 -1
- package/apps/storefront/src/lib/engagement/social/tokenStore.ts +1 -1
- package/apps/storefront/src/lib/fulfillment/fulfillmentService.ts +4 -4
- package/apps/storefront/src/lib/integrations/apps/gatewayKeys.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/registryAccess.ts +1 -1
- package/apps/storefront/src/lib/integrations/integration/browserEnvironment.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/emit.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/getDispatcher.ts +1 -1
- package/apps/storefront/src/lib/measurement/attribution/orderConversionD1.ts +1 -1
- package/apps/storefront/src/lib/measurement/tracking/d1Control.ts +1 -1
- package/apps/storefront/src/lib/measurement/tracking/interactionCollector.ts +1 -1
- package/apps/storefront/src/lib/measurement/tracking/tenantD1Registry.ts +1 -1
- package/apps/storefront/src/lib/{monitoring → observability/monitoring}/manifest.ts +2 -2
- package/apps/storefront/src/lib/{analytics → observability/performance}/budgets.json +1 -1
- package/apps/storefront/src/lib/{analytics → observability/performance}/webVitals.ts +1 -1
- package/apps/storefront/src/lib/orders/fixtures/orders.ts +4 -4
- package/apps/storefront/src/lib/orders/providers/foxyOrderClient.ts +1 -1
- package/apps/storefront/src/lib/{basePath.ts → publication/shared/basePath.ts} +1 -1
- package/apps/storefront/src/lib/{env.ts → publication/shared/env.ts} +1 -1
- package/apps/storefront/src/lib/{previewReload.ts → publication/shared/previewReload.ts} +1 -1
- package/apps/storefront/src/lib/{runtimeEnv.ts → publication/shared/runtimeEnv.ts} +1 -1
- package/apps/storefront/src/lib/{url.ts → publication/shared/url.ts} +1 -1
- package/apps/storefront/src/lib/reporting/fixtures/reporting.ts +3 -3
- package/apps/storefront/src/lib/subscriptions/fixtures/subscriptions.ts +3 -3
- package/apps/storefront/src/middleware/candidatePin.ts +1 -1
- package/apps/storefront/src/middleware/controlPlane.ts +8 -8
- package/apps/storefront/src/middleware/index.ts +13 -13
- package/apps/storefront/src/middleware/publicRender.ts +2 -2
- package/apps/storefront/src/middleware/renderChain.ts +9 -9
- package/apps/storefront/src/middleware/staticBundle.ts +2 -2
- 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 +2 -2
- package/apps/storefront/src/pages/api/admin/commerce-readiness.ts +1 -1
- package/apps/storefront/src/pages/api/admin/fulfillment/batches.ts +1 -1
- package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id]/address.ts +1 -1
- package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id].ts +1 -1
- package/apps/storefront/src/pages/api/admin/interaction-insights.ts +2 -2
- 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/auth/logout.ts +2 -2
- package/apps/storefront/src/pages/api/auth/magic-exchange.ts +6 -6
- package/apps/storefront/src/pages/api/auth/send.ts +3 -3
- package/apps/storefront/src/pages/api/auth/step-up-send.ts +1 -1
- package/apps/storefront/src/pages/api/auth/step-up-verify.ts +3 -3
- package/apps/storefront/src/pages/api/auth/verify.ts +5 -5
- package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +2 -2
- package/apps/storefront/src/pages/api/checkout-style.css.ts +1 -1
- package/apps/storefront/src/pages/api/cli/policy.ts +1 -1
- package/apps/storefront/src/pages/api/commerce/final-cart-authorization.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +2 -2
- package/apps/storefront/src/pages/api/newsletter/confirm.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +2 -2
- package/apps/storefront/src/pages/api/newsletter.ts +2 -2
- package/apps/storefront/src/pages/api/request-access.ts +1 -1
- package/apps/storefront/src/pages/api/rum/vitals.ts +2 -2
- package/apps/storefront/src/pages/api/tracking/interaction.ts +1 -1
- package/apps/storefront/src/pages/auth/login.astro +3 -3
- package/apps/storefront/src/pages/auth/magic.astro +1 -1
- package/apps/storefront/src/pages/capabilities.astro +1 -1
- package/apps/storefront/src/pages/collections/[handle].astro +2 -2
- package/apps/storefront/src/pages/feed.json.ts +1 -1
- package/apps/storefront/src/pages/index.astro +1 -1
- package/apps/storefront/src/pages/llms.txt.ts +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +1 -1
- package/apps/storefront/src/pages/search-index.json.ts +1 -1
- package/apps/storefront/src/pages/search.astro +1 -1
- package/apps/storefront/src/pages/sitemap.xml.ts +1 -1
- package/apps/storefront/src/pages/tenants/[id]/[...path].ts +1 -1
- package/apps/storefront/test/pipeline/fake-preview-services.ts +2 -2
- package/apps/storefront/test/pipeline/harness.ts +1 -1
- package/apps/storefront/test/pipeline/matrix-faults.ts +4 -4
- package/apps/storefront/test/pipeline/pipeline-host.ts +9 -9
- package/apps/storefront/test/pipeline/publish-kinds.ts +4 -4
- package/apps/storefront/test/pipeline/synthetic-job.ts +3 -3
- package/apps/storefront/test/pipeline-faults/matrix-lib.ts +2 -2
- package/package.json +1 -1
- package/packages/public-runtime/src/hosted-image-media-types.ts +1 -1
- package/packages/public-runtime/src/retention-holds.ts +1 -1
- package/scripts/dev/locate.mjs +1 -1
- package/apps/storefront/src/lib/admin/ai/index.ts +0 -6
- /package/apps/storefront/src/components/{auth → access/storefront/auth}/AuthBadge.astro +0 -0
- /package/apps/storefront/src/lib/{auth → access/auth}/gatePage.ts +0 -0
- /package/apps/storefront/src/lib/{auth → access/auth}/internalContentAuthority.ts +0 -0
- /package/apps/storefront/src/lib/{auth → access/auth}/operatorSession.ts +0 -0
- /package/apps/storefront/src/lib/{auth → access/auth}/session.ts +0 -0
- /package/apps/storefront/src/lib/{auth → access/auth}/stepUpChallenge.ts +0 -0
- /package/apps/storefront/src/lib/{dashboard → access/dashboard}/vendorQuery.ts +0 -0
- /package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/tenants.ts +0 -0
- /package/apps/storefront/src/lib/{email → access/notifications}/magicLinkInviteEmail.ts +0 -0
- /package/apps/storefront/src/lib/{privacy → access/privacy}/emailHint.ts +0 -0
- /package/apps/storefront/src/lib/{rate → access/rate}/kvWindow.ts +0 -0
- /package/apps/storefront/src/lib/{shared → access/shared}/capability.ts +0 -0
- /package/apps/storefront/src/lib/{cspStaticHashes.ts → access/shared/cspStaticHashes.ts} +0 -0
- /package/apps/storefront/src/lib/{demoGate.ts → access/shared/demoGate.ts} +0 -0
- /package/apps/storefront/src/lib/{maintenance.ts → access/shared/maintenance.ts} +0 -0
- /package/apps/storefront/src/lib/{securityHeaders.ts → access/shared/securityHeaders.ts} +0 -0
- /package/apps/storefront/src/lib/{tenantOrigins.ts → access/shared/tenantOrigins.ts} +0 -0
- /package/apps/storefront/src/lib/{admin → automation}/ai/approvalMode.ts +0 -0
- /package/apps/storefront/src/lib/{admin → automation}/ai/audit.ts +0 -0
- /package/apps/storefront/src/lib/{admin → automation}/ai/recommendation.ts +0 -0
- /package/apps/storefront/src/lib/{admin → developer-experience/admin}/seed.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityStore.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/ai-widget-client.js +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/apiBase.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/ask.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/clickToSource.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/copyCommand.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/files.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/hostedActivity.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/infoPopover.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/mcpCopy.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/monitor.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/stepper.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/themeToggle.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/devDraft.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/obstacleStore.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/runtimeStore.ts +0 -0
- /package/apps/storefront/src/lib/{dev → developer-experience/dev}/storeStatus.ts +0 -0
- /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/regulated-commerce-truth/index.ts +0 -0
- /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/ws3-readonly-clone-preflight/index.ts +0 -0
- /package/apps/storefront/src/lib/{http → developer-experience/http}/fetchTransport.ts +0 -0
- /package/apps/storefront/src/lib/{memoryKv.ts → developer-experience/shared/memoryKv.ts} +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/capture.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/consoleLine.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/debugConsole.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/debugMode.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/debugWindow.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/redact.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/reference.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/referenceStore.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/report.ts +0 -0
- /package/apps/storefront/src/lib/{diag → observability/diag}/session.ts +0 -0
- /package/apps/storefront/src/lib/{analytics → observability/performance}/lighthouseReport.ts +0 -0
- /package/apps/storefront/src/lib/{analytics → observability/performance}/perfBudgets.ts +0 -0
- /package/apps/storefront/src/lib/{analytics → observability/performance}/rumAlert.ts +0 -0
- /package/apps/storefront/src/lib/{health.ts → observability/shared/health.ts} +0 -0
- /package/apps/storefront/src/lib/{d1 → publication/d1}/schema-apps.ts +0 -0
- /package/apps/storefront/src/lib/{email → publication/notifications}/candidateConflictEmail.ts +0 -0
- /package/apps/storefront/src/lib/{cdnForward.ts → publication/shared/cdnForward.ts} +0 -0
- /package/apps/storefront/src/lib/{edgeCache.ts → publication/shared/edgeCache.ts} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The read runs only after the owner gate admits the caller.
|
|
4
4
|
*/
|
|
5
5
|
import type { APIContext } from "astro";
|
|
6
|
-
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
6
|
+
import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
|
|
7
7
|
import {
|
|
8
8
|
fulfillmentResultResponse,
|
|
9
9
|
isOpaqueId,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The response is state codes and the fulfillment view. It never returns an address.
|
|
4
4
|
*/
|
|
5
5
|
import type { APIContext } from "astro";
|
|
6
|
-
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
6
|
+
import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
|
|
7
7
|
import {
|
|
8
8
|
fulfillmentResultResponse,
|
|
9
9
|
isOpaqueId,
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* scoping) — see the unit's completion report for the reasoning.
|
|
29
29
|
*/
|
|
30
30
|
import type { APIContext } from "astro";
|
|
31
|
-
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
32
|
-
import { readD1 } from "@/lib/env";
|
|
31
|
+
import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
|
|
32
|
+
import { readD1 } from "@/lib/publication/shared/env";
|
|
33
33
|
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
34
34
|
import { resolveTenantStore, trackingNamePrefix } from "@/lib/measurement/tracking/tenantD1Registry";
|
|
35
35
|
import { readD1Control } from "@/lib/measurement/tracking/d1Control";
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Read-only.
|
|
8
8
|
*/
|
|
9
9
|
import type { APIContext } from "astro";
|
|
10
|
-
import { readEnv } from "@/lib/env";
|
|
11
|
-
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
10
|
+
import { readEnv } from "@/lib/publication/shared/env";
|
|
11
|
+
import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
|
|
12
12
|
import {
|
|
13
13
|
commerceActorForAdmin,
|
|
14
14
|
createCheckoutOrderClient,
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* host/approver layer) — same posture as `api/evidence.json.ts`; no new gate here.
|
|
11
11
|
*/
|
|
12
12
|
import type { APIContext } from "astro";
|
|
13
|
-
import { readEnv } from "@/lib/env";
|
|
14
|
-
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
13
|
+
import { readEnv } from "@/lib/publication/shared/env";
|
|
14
|
+
import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
|
|
15
15
|
import {
|
|
16
16
|
createCheckoutOrderClient,
|
|
17
17
|
orderApiBaseUrl,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* sign out.
|
|
8
8
|
*/
|
|
9
9
|
import type { APIContext } from "astro";
|
|
10
|
-
import { getSessionStore, clearSessionCookie } from "@/lib/auth/route";
|
|
11
|
-
import { revokeSession, SESSION_COOKIE } from "@/lib/auth/session";
|
|
10
|
+
import { getSessionStore, clearSessionCookie } from "@/lib/access/auth/route";
|
|
11
|
+
import { revokeSession, SESSION_COOKIE } from "@/lib/access/auth/session";
|
|
12
12
|
|
|
13
13
|
export const prerender = false;
|
|
14
14
|
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
getSessionStore,
|
|
19
19
|
setSessionCookie,
|
|
20
20
|
safeNext,
|
|
21
|
-
} from "@/lib/auth/route";
|
|
21
|
+
} from "@/lib/access/auth/route";
|
|
22
22
|
import {
|
|
23
23
|
getFederatedVerifier,
|
|
24
24
|
sessionFromFederatedClaims,
|
|
25
|
-
} from "@/lib/auth/identityToken";
|
|
26
|
-
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
|
|
27
|
-
import { normalizeEmailHint } from "@/lib/privacy/emailHint";
|
|
28
|
-
import { acceptDeveloperInvite } from "@/lib/shared/developerInvites";
|
|
29
|
-
import { explainDeveloperAccess } from "@/lib/shared/accessExplain";
|
|
25
|
+
} from "@/lib/access/auth/identityToken";
|
|
26
|
+
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
|
|
27
|
+
import { normalizeEmailHint } from "@/lib/access/privacy/emailHint";
|
|
28
|
+
import { acceptDeveloperInvite } from "@/lib/access/shared/developerInvites";
|
|
29
|
+
import { explainDeveloperAccess } from "@/lib/access/shared/accessExplain";
|
|
30
30
|
|
|
31
31
|
export const prerender = false;
|
|
32
32
|
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
* redirect to the "enter your code" step. Accepts an HTML form post (no JS needed).
|
|
10
10
|
*/
|
|
11
11
|
import type { APIContext } from "astro";
|
|
12
|
-
import { readKv } from "@/lib/env";
|
|
12
|
+
import { readKv } from "@/lib/publication/shared/env";
|
|
13
13
|
import {
|
|
14
14
|
EMAIL_RE,
|
|
15
15
|
getAccessClient,
|
|
16
16
|
safeNext,
|
|
17
17
|
loginRedirect,
|
|
18
|
-
} from "@/lib/auth/route";
|
|
18
|
+
} from "@/lib/access/auth/route";
|
|
19
19
|
import {
|
|
20
20
|
devAuthEnabled,
|
|
21
21
|
devAuthCode,
|
|
22
22
|
storeDevCode,
|
|
23
23
|
DEV_AUTH_CODE_TTL_SECONDS,
|
|
24
|
-
} from "@/lib/auth/devAuth";
|
|
24
|
+
} from "@/lib/access/auth/devAuth";
|
|
25
25
|
|
|
26
26
|
export const prerender = false;
|
|
27
27
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* but also accepts a plain form post so a no-JS fallback stays possible.
|
|
14
14
|
*/
|
|
15
15
|
import type { APIContext } from "astro";
|
|
16
|
-
import { getAccessClient } from "@/lib/auth/route";
|
|
16
|
+
import { getAccessClient } from "@/lib/access/auth/route";
|
|
17
17
|
|
|
18
18
|
export const prerender = false;
|
|
19
19
|
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
setSessionCookie,
|
|
23
23
|
safeNext,
|
|
24
24
|
loginRedirect,
|
|
25
|
-
} from "@/lib/auth/route";
|
|
26
|
-
import { getFederatedVerifier, sessionFromFederatedClaims } from "@/lib/auth/identityToken";
|
|
27
|
-
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
|
|
25
|
+
} from "@/lib/access/auth/route";
|
|
26
|
+
import { getFederatedVerifier, sessionFromFederatedClaims } from "@/lib/access/auth/identityToken";
|
|
27
|
+
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
|
|
28
28
|
|
|
29
29
|
export const prerender = false;
|
|
30
30
|
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
* flat JSON). See `@/lib/auth/identityToken`.
|
|
15
15
|
*/
|
|
16
16
|
import type { APIContext } from "astro";
|
|
17
|
-
import { readKv } from "@/lib/env";
|
|
17
|
+
import { readKv } from "@/lib/publication/shared/env";
|
|
18
18
|
import {
|
|
19
19
|
getAccessClient,
|
|
20
20
|
getSessionStore,
|
|
21
21
|
setSessionCookie,
|
|
22
22
|
safeNext,
|
|
23
23
|
loginRedirect,
|
|
24
|
-
} from "@/lib/auth/route";
|
|
24
|
+
} from "@/lib/access/auth/route";
|
|
25
25
|
import {
|
|
26
26
|
getFederatedVerifier,
|
|
27
27
|
sessionFromFederatedClaims,
|
|
28
|
-
} from "@/lib/auth/identityToken";
|
|
29
|
-
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
|
|
30
|
-
import { devAuthEnabled, consumeDevCode, devSessionFields } from "@/lib/auth/devAuth";
|
|
28
|
+
} from "@/lib/access/auth/identityToken";
|
|
29
|
+
import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
|
|
30
|
+
import { devAuthEnabled, consumeDevCode, devSessionFields } from "@/lib/access/auth/devAuth";
|
|
31
31
|
|
|
32
32
|
export const prerender = false;
|
|
33
33
|
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* itself best-effort and never throws.
|
|
13
13
|
*/
|
|
14
14
|
import type { APIRoute } from "astro";
|
|
15
|
-
import { readKv } from "@/lib/env";
|
|
15
|
+
import { readKv } from "@/lib/publication/shared/env";
|
|
16
16
|
import {
|
|
17
17
|
getReactionCounts,
|
|
18
18
|
isReaction,
|
|
19
19
|
recordReaction,
|
|
20
20
|
type Reaction,
|
|
21
21
|
} from "@/lib/content/blog/reactions";
|
|
22
|
-
import { checkRateLimit } from "@/lib/rate/kvWindow";
|
|
22
|
+
import { checkRateLimit } from "@/lib/access/rate/kvWindow";
|
|
23
23
|
|
|
24
24
|
export const prerender = false;
|
|
25
25
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* the idiomatic write path today. See docs/architecture/dev-experience-hosted-vs-local.md.
|
|
22
22
|
*/
|
|
23
23
|
import type { APIContext } from "astro";
|
|
24
|
-
import { readKv } from "@/lib/env";
|
|
24
|
+
import { readKv } from "@/lib/publication/shared/env";
|
|
25
25
|
|
|
26
26
|
export const prerender = false;
|
|
27
27
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
type StockState,
|
|
19
19
|
} from "@tot/public-runtime";
|
|
20
20
|
import { fromD1, listAllActiveProducts } from "@/lib/catalog/d1/catalog.js";
|
|
21
|
-
import { readD1, readEnv } from "@/lib/env";
|
|
21
|
+
import { readD1, readEnv } from "@/lib/publication/shared/env";
|
|
22
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";
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* is redirected back to the referrer so the page can show its own thanks.
|
|
16
16
|
*/
|
|
17
17
|
import type { APIRoute } from "astro";
|
|
18
|
-
import { readD1, readKv, readEnv } from "@/lib/env";
|
|
18
|
+
import { readD1, readKv, readEnv } from "@/lib/publication/shared/env";
|
|
19
19
|
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
20
|
-
import { checkRateLimit } from "@/lib/rate/kvWindow";
|
|
20
|
+
import { checkRateLimit } from "@/lib/access/rate/kvWindow";
|
|
21
21
|
import { NewsletterSubscribersStore } from "@/lib/engagement/newsletter/subscribers";
|
|
22
22
|
import { randomToken, hashConsentIp } from "@/lib/engagement/newsletter/consent";
|
|
23
23
|
import { sendConfirmationEmail } from "@/lib/engagement/newsletter/confirmationEmail";
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* stale token renders a clean "invalid link" page — never a 500.
|
|
11
11
|
*/
|
|
12
12
|
import type { APIRoute } from "astro";
|
|
13
|
-
import { readD1 } from "@/lib/env";
|
|
13
|
+
import { readD1 } from "@/lib/publication/shared/env";
|
|
14
14
|
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
15
15
|
import { NewsletterSubscribersStore } from "@/lib/engagement/newsletter/subscribers";
|
|
16
16
|
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* (re-unsubscribing is a no-op success) and NON-LEAKING: an unknown token gets the exact
|
|
15
15
|
* same response as a real one, so an observer can't probe which tokens exist.
|
|
16
16
|
*
|
|
17
|
-
* NOTE (integration): The front door.s cross-site form check (lib/cdnForward.ts `crossSiteFormRefusal`,
|
|
17
|
+
* NOTE (integration): The front door.s cross-site form check (lib/publication/shared/cdnForward.ts `crossSiteFormRefusal`,
|
|
18
18
|
* the rule Astro.s `security.checkOrigin` applies) 403s a cross-origin form-encoded POST before it reaches this handler, which
|
|
19
19
|
* would break the RFC 8058 one-click POST from a mailbox provider. See the unit report.
|
|
20
20
|
*/
|
|
21
21
|
import type { APIContext } from "astro";
|
|
22
|
-
import { readD1 } from "@/lib/env";
|
|
22
|
+
import { readD1 } from "@/lib/publication/shared/env";
|
|
23
23
|
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
24
24
|
import { unsubscribeByToken } from "@/lib/engagement/newsletter/subscribers";
|
|
25
25
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* 500. All failures degrade to a friendly thank-you.
|
|
16
16
|
*/
|
|
17
17
|
import type { APIContext } from "astro";
|
|
18
|
-
import { readKv } from "@/lib/env";
|
|
19
|
-
import { withBase } from "@/lib/basePath";
|
|
18
|
+
import { readKv } from "@/lib/publication/shared/env";
|
|
19
|
+
import { withBase } from "@/lib/publication/shared/basePath";
|
|
20
20
|
|
|
21
21
|
// Minimal, permissive email shape check — we are not the source of truth for
|
|
22
22
|
// deliverability; the ESP validates properly downstream.
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* store/forward is the documented follow-up; the SHAPE it stores is fixed here.
|
|
14
14
|
*/
|
|
15
15
|
import type { APIRoute } from "astro";
|
|
16
|
-
import { rateMetric, type WebVitalName, type WebVitalsSample } from "@/lib/
|
|
17
|
-
import { readKv, runAfterResponse, type CfExecutionContextLike } from "@/lib/env";
|
|
16
|
+
import { rateMetric, type WebVitalName, type WebVitalsSample } from "@/lib/observability/performance/webVitals";
|
|
17
|
+
import { readKv, runAfterResponse, type CfExecutionContextLike } from "@/lib/publication/shared/env";
|
|
18
18
|
import { recordBlogView } from "@/lib/content/blog/viewCounts";
|
|
19
19
|
|
|
20
20
|
export const prerender = false;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* stream is ever added.
|
|
38
38
|
*/
|
|
39
39
|
import type { APIContext } from "astro";
|
|
40
|
-
import { readD1, readAnalytics, runAfterResponse, type CfExecutionContextLike } from "@/lib/env";
|
|
40
|
+
import { readD1, readAnalytics, runAfterResponse, type CfExecutionContextLike } from "@/lib/publication/shared/env";
|
|
41
41
|
import { fromD1 } from "@/lib/catalog/d1/catalog";
|
|
42
42
|
import { ingestInteractions, type StampedInteractionEvent } from "@/lib/measurement/tracking/collectorIngest";
|
|
43
43
|
import { readD1Control } from "@/lib/measurement/tracking/d1Control";
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* (tot20 sends/verifies the code, the storefront mints the session). No secrets
|
|
11
11
|
* reach the browser. Inline style carries the per-request CSP nonce.
|
|
12
12
|
*/
|
|
13
|
-
import { normalizeEmailHint } from "@/lib/privacy/emailHint";
|
|
14
|
-
import { safeNext } from "@/lib/auth/route";
|
|
13
|
+
import { normalizeEmailHint } from "@/lib/access/privacy/emailHint";
|
|
14
|
+
import { safeNext } from "@/lib/access/auth/route";
|
|
15
15
|
// Self-hosted web fonts (audit finding 6) — same-origin @fontsource, replacing
|
|
16
16
|
// the render-blocking fonts.googleapis.com stylesheet. Covers Plus Jakarta Sans,
|
|
17
17
|
// Inter, and JetBrains Mono used by this page's inline styles.
|
|
@@ -62,7 +62,7 @@ const showCodeStep = sent && errorCode !== "expired" && errorCode !== "too_many_
|
|
|
62
62
|
const devMode = import.meta.env.DEV;
|
|
63
63
|
let devAuthOn = false;
|
|
64
64
|
if (devMode) {
|
|
65
|
-
const { readEnv } = await import("@/lib/env");
|
|
65
|
+
const { readEnv } = await import("@/lib/publication/shared/env");
|
|
66
66
|
devAuthOn = (await readEnv("DEV_AUTH")) === "1";
|
|
67
67
|
}
|
|
68
68
|
---
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the token before the user ever clicked. So: NEVER exchange on GET. The token rides
|
|
10
10
|
* in a hidden form field and leaves only via the POST.
|
|
11
11
|
*/
|
|
12
|
-
import { normalizeEmailHint, redactEmailForHint } from "@/lib/privacy/emailHint";
|
|
12
|
+
import { normalizeEmailHint, redactEmailForHint } from "@/lib/access/privacy/emailHint";
|
|
13
13
|
// Self-hosted web fonts (audit finding 6) — same-origin @fontsource, replacing
|
|
14
14
|
// the render-blocking fonts.googleapis.com stylesheet. Covers Plus Jakarta Sans,
|
|
15
15
|
// Inter, and JetBrains Mono used by this page's inline styles.
|
|
@@ -15,12 +15,12 @@ import ActiveFilters from "@/components/catalog/storefront/plp/ActiveFilters.ast
|
|
|
15
15
|
import SortSelect from "@/components/catalog/storefront/plp/SortSelect.astro";
|
|
16
16
|
import Pagination from "@/components/catalog/storefront/plp/Pagination.astro";
|
|
17
17
|
import Img from "@/components/assets/storefront/Img.astro";
|
|
18
|
-
import { parseQuery, buildQueryString } from "@/lib/url";
|
|
18
|
+
import { parseQuery, buildQueryString } from "@/lib/publication/shared/url";
|
|
19
19
|
import { breadcrumbLd, itemListLd } from "@/lib/content/shared/jsonld";
|
|
20
20
|
import { truncate } from "@/lib/content/shared/format";
|
|
21
21
|
import { pageUrlForm } from "@/lib/content/seo/urlForm";
|
|
22
22
|
import { sourceSeoTitle } from "@/lib/content/seo/documentTitle";
|
|
23
|
-
import { withBase } from "@/lib/basePath";
|
|
23
|
+
import { withBase } from "@/lib/publication/shared/basePath";
|
|
24
24
|
import { isBlankDescriptionHtml, sanitizeDescriptionHtml } from "@/lib/content/sanitizeDescriptionHtml";
|
|
25
25
|
|
|
26
26
|
const { handle } = Astro.params;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { APIContext } from "astro";
|
|
9
9
|
import { compileRouteTierIndexV1 } from "@tot/public-runtime";
|
|
10
|
-
import { readKv } from "@/lib/runtimeEnv.js";
|
|
10
|
+
import { readKv } from "@/lib/publication/shared/runtimeEnv.js";
|
|
11
11
|
import {
|
|
12
12
|
declaresMountedSpacesV1,
|
|
13
13
|
feedInstantV1,
|
|
@@ -18,7 +18,7 @@ import TrustStrip from "@/components/content/storefront/content/TrustStrip.astro
|
|
|
18
18
|
import Faq from "@/components/content/storefront/marketing/Faq.astro";
|
|
19
19
|
import MarketingBlocks from "@/components/content/storefront/marketing/MarketingBlocks.astro";
|
|
20
20
|
import TierCards from "@/components/membership/storefront/membership/TierCards.astro";
|
|
21
|
-
import { withBase } from "@/lib/basePath";
|
|
21
|
+
import { withBase } from "@/lib/publication/shared/basePath";
|
|
22
22
|
import { rawHtmlPolicy, rawHtmlResponse } from "@/lib/content/shared/rawMarketingHtml";
|
|
23
23
|
import { renderRawComplianceTop, renderRawComplianceBottom } from "@/lib/compliance/rawComplianceNotices";
|
|
24
24
|
import AppWidgetFrame from "@/components/integrations/storefront/apps/AppWidgetFrame.astro";
|
|
@@ -13,7 +13,7 @@ import type { APIContext } from "astro";
|
|
|
13
13
|
import { nonEmptyCollections } from "@/lib/catalog/tot/query.js";
|
|
14
14
|
import { getBlogSettings, listBlogPosts } from "@/lib/content/blog/provider.js";
|
|
15
15
|
import { compileRouteTierIndexV1 } from "@tot/public-runtime";
|
|
16
|
-
import { readKv } from "@/lib/runtimeEnv.js";
|
|
16
|
+
import { readKv } from "@/lib/publication/shared/runtimeEnv.js";
|
|
17
17
|
import {
|
|
18
18
|
declaresMountedSpacesV1,
|
|
19
19
|
mountedDiscoveryUrlV1,
|
|
@@ -44,7 +44,7 @@ import { resolveMemberContext } from "@/lib/membership/eligibility";
|
|
|
44
44
|
import { truncate } from "@/lib/content/shared/format";
|
|
45
45
|
import { productLd, breadcrumbLd, reviewLd } from "@/lib/content/shared/jsonld";
|
|
46
46
|
import { isUsableImageUrl } from "@/lib/content/shared/placeholder";
|
|
47
|
-
import { withBase } from "@/lib/basePath";
|
|
47
|
+
import { withBase } from "@/lib/publication/shared/basePath";
|
|
48
48
|
import { productPageType, structuredDataProfile } from "@/lib/content/seo/structuredData";
|
|
49
49
|
import { pageUrlForm } from "@/lib/content/seo/urlForm";
|
|
50
50
|
import { sourceSeoTitle } from "@/lib/content/seo/documentTitle";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { APIContext } from "astro";
|
|
8
8
|
import { compileRouteTierIndexV1 } from "@tot/public-runtime";
|
|
9
|
-
import { readKv } from "@/lib/runtimeEnv.js";
|
|
9
|
+
import { readKv } from "@/lib/publication/shared/runtimeEnv.js";
|
|
10
10
|
import {
|
|
11
11
|
declaresMountedSpacesV1,
|
|
12
12
|
mountedDiscoveryUrlV1,
|
|
@@ -17,7 +17,7 @@ import EmptyState from "@/components/content/storefront/EmptyState.astro";
|
|
|
17
17
|
import Section from "@/components/content/storefront/Section.astro";
|
|
18
18
|
import { toTypeaheadDoc } from "@/lib/catalog/search/index";
|
|
19
19
|
import { breadcrumbLd } from "@/lib/content/shared/jsonld";
|
|
20
|
-
import { withBase } from "@/lib/basePath";
|
|
20
|
+
import { withBase } from "@/lib/publication/shared/basePath";
|
|
21
21
|
|
|
22
22
|
const { tenant, tot, canonicalBase, basePath } = Astro.locals;
|
|
23
23
|
// Commerce-only route (page + typeahead JSON): off for marketing tenants.
|
|
@@ -17,7 +17,7 @@ import { getTheBuildSettings, listBuildPosts } from "@/lib/content/the-build/pro
|
|
|
17
17
|
import { resolveTheBuildIndexCopy } from "@/lib/content/the-build/pagination.js";
|
|
18
18
|
import { isIndexableHtml, rawPageCanonicalUrl } from "@/lib/content/shared/rawMarketingHtml.js";
|
|
19
19
|
import { compileRouteTierIndexV1 } from "@tot/public-runtime";
|
|
20
|
-
import { readKv } from "@/lib/runtimeEnv.js";
|
|
20
|
+
import { readKv } from "@/lib/publication/shared/runtimeEnv.js";
|
|
21
21
|
import {
|
|
22
22
|
declaresMountedSpacesV1,
|
|
23
23
|
mountedDiscoveryUrlV1,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "@tot/public-runtime";
|
|
44
44
|
import { publicationRecoveryActiveV1, publicationRecoveryKeyV1 } from "@tot/public-runtime/publication-recovery";
|
|
45
45
|
import { readWithImagePreviewRewriteOverlay } from "@tot/public-runtime/image-preview-rewrite-overlay";
|
|
46
|
-
import { readR2, readKv, readEnv } from "@/lib/env";
|
|
46
|
+
import { readR2, readKv, readEnv } from "@/lib/publication/shared/env";
|
|
47
47
|
import {
|
|
48
48
|
resolvePreviewVersionFromCookies,
|
|
49
49
|
resolveSharedPreviewAssetVersion,
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
* A fault fires `times` times (0 = every time); its firing is persisted before it acts.
|
|
23
23
|
*/
|
|
24
24
|
import type { DurableObjectState } from "cloudflare:workers";
|
|
25
|
-
import { ForgeToolError, ForgeTransportError } from "../../src/lib/forge/errors";
|
|
25
|
+
import { ForgeToolError, ForgeTransportError } from "../../src/lib/publication/forge/errors";
|
|
26
26
|
import {
|
|
27
27
|
BUILD_CHECKPOINT_EVERY,
|
|
28
28
|
type MembershipEntry,
|
|
29
29
|
type MergeCandidate,
|
|
30
30
|
type PreviewJobServices,
|
|
31
|
-
} from "../../src/lib/pipeline/preview-jobs";
|
|
31
|
+
} from "../../src/lib/publication/pipeline/preview-jobs";
|
|
32
32
|
|
|
33
33
|
/** Files a fake build materializes. */
|
|
34
34
|
export const FAKE_FILE_COUNT = 250;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Shared helpers for the TenantPipeline harness tests (run inside workerd). */
|
|
2
2
|
import { env } from "cloudflare:test";
|
|
3
3
|
import { expect } from "vitest";
|
|
4
|
-
import type { JobState, JobView, TransitionView } from "../../src/lib/pipeline/job-runner";
|
|
4
|
+
import type { JobState, JobView, TransitionView } from "../../src/lib/publication/pipeline/job-runner";
|
|
5
5
|
import type { TenantPipeline } from "./pipeline-host";
|
|
6
6
|
import { S3_CHUNKS, SYNTHETIC_KIND, type Fault } from "./synthetic-job";
|
|
7
7
|
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
* engine's live record — a kill that leaves them apart with no compensation armed is a finding.
|
|
27
27
|
*/
|
|
28
28
|
import type { DurableObjectState } from "cloudflare:workers";
|
|
29
|
-
import { JobKindRegistry, type JobKindDefinition, type StepContext, type StepDefinition } from "../../src/lib/pipeline/job-runner";
|
|
30
|
-
import type { PreviewJobServices } from "../../src/lib/pipeline/preview-jobs";
|
|
31
|
-
import { readLivePointer } from "../../src/lib/pipeline/publish/live-pointer";
|
|
32
|
-
import { projectionStore, type TestKv } from "../../src/lib/pipeline/publish/publish-test-support";
|
|
29
|
+
import { JobKindRegistry, type JobKindDefinition, type StepContext, type StepDefinition } from "../../src/lib/publication/pipeline/job-runner";
|
|
30
|
+
import type { PreviewJobServices } from "../../src/lib/publication/pipeline/preview-jobs";
|
|
31
|
+
import { readLivePointer } from "../../src/lib/publication/pipeline/publish/live-pointer";
|
|
32
|
+
import { projectionStore, type TestKv } from "../../src/lib/publication/pipeline/publish/publish-test-support";
|
|
33
33
|
|
|
34
34
|
export type MatrixMode = "before" | "after" | "resume" | "effect" | "hold";
|
|
35
35
|
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
* fault matrix's kill points (`./matrix-faults.ts`), inert until a test arms one.
|
|
9
9
|
*/
|
|
10
10
|
import type { DurableObjectState } from "cloudflare:workers";
|
|
11
|
-
import { TenantPipeline as DeployedTenantPipeline } from "../../src/lib/pipeline/tenant-pipeline";
|
|
12
|
-
import { submitIntent, tenantPipeline, type TenantPipelineNamespace } from "../../src/lib/pipeline/intake";
|
|
13
|
-
import { submitPreviewSync } from "../../src/lib/pipeline/preview-sync-intake";
|
|
14
|
-
import { JobKindRegistry, StaleExecutionError, type PipelineIntent } from "../../src/lib/pipeline/job-runner";
|
|
11
|
+
import { TenantPipeline as DeployedTenantPipeline } from "../../src/lib/publication/pipeline/tenant-pipeline";
|
|
12
|
+
import { submitIntent, tenantPipeline, type TenantPipelineNamespace } from "../../src/lib/publication/pipeline/intake";
|
|
13
|
+
import { submitPreviewSync } from "../../src/lib/publication/pipeline/preview-sync-intake";
|
|
14
|
+
import { JobKindRegistry, StaleExecutionError, type PipelineIntent } from "../../src/lib/publication/pipeline/job-runner";
|
|
15
15
|
import { abandonedContexts, syntheticJobKinds, syntheticSpans } from "./synthetic-job";
|
|
16
|
-
import { registerPreviewJobKinds, type PreviewJobTiming } from "../../src/lib/pipeline/preview-jobs";
|
|
16
|
+
import { registerPreviewJobKinds, type PreviewJobTiming } from "../../src/lib/publication/pipeline/preview-jobs";
|
|
17
17
|
import { configureFake, fakePreviewServices, readFakeState, type FakeFault, type FakeState } from "./fake-preview-services";
|
|
18
18
|
import { MatrixFaults, previewServicesWithEffects, type Landed, type MatrixFault } from "./matrix-faults";
|
|
19
|
-
import { kvAbandonServices, legacyOperationKey, registerSeedJobKind, type SeedServices } from "../../src/lib/pipeline/seed-from-legacy";
|
|
19
|
+
import { kvAbandonServices, legacyOperationKey, registerSeedJobKind, type SeedServices } from "../../src/lib/publication/pipeline/seed-from-legacy";
|
|
20
20
|
import { readAssetsPointer } from "@tot/public-runtime";
|
|
21
|
-
import { readLivePointer } from "../../src/lib/pipeline/publish/live-pointer";
|
|
21
|
+
import { readLivePointer } from "../../src/lib/publication/pipeline/publish/live-pointer";
|
|
22
22
|
import {
|
|
23
23
|
listIntegrationRuns,
|
|
24
24
|
listReleaseReceipts,
|
|
25
25
|
readReleaseTruth,
|
|
26
26
|
writeIntegrationRun,
|
|
27
27
|
type ReleaseModelKv,
|
|
28
|
-
} from "../../src/lib/change/store/aggregate-release-store";
|
|
29
|
-
import { projectionStore, seedGreenAggregate, testVersionStore, type TestKv } from "../../src/lib/pipeline/publish/publish-test-support";
|
|
28
|
+
} from "../../src/lib/publication/change/store/aggregate-release-store";
|
|
29
|
+
import { projectionStore, seedGreenAggregate, testVersionStore, type TestKv } from "../../src/lib/publication/pipeline/publish/publish-test-support";
|
|
30
30
|
import {
|
|
31
31
|
armPublishFault,
|
|
32
32
|
firedPublishFaults,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The REAL publish / rollback / hotfix job kinds for the TenantPipeline fault harness, over the
|
|
3
|
-
* stand-in world (`src/lib/pipeline/publish/publish-test-support.ts`: GitHub Actions, CloudFront,
|
|
3
|
+
* stand-in world (`src/lib/publication/pipeline/publish/publish-test-support.ts`: GitHub Actions, CloudFront,
|
|
4
4
|
* the Cloudflare edge, the MCP promotion ledger). Test-only.
|
|
5
5
|
*
|
|
6
6
|
* Every byte of state — the job's KV (release ledger, version store, `live` pointer) and the
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* SQLite record, projected to the harness KV) — the production writer.
|
|
20
20
|
*/
|
|
21
21
|
import type { DurableObjectState } from "cloudflare:workers";
|
|
22
|
-
import { JobKindRegistry, type JobKindDefinition, type StepDefinition } from "../../src/lib/pipeline/job-runner";
|
|
23
|
-
import { registerPublishJobKinds, type PublishKindTuning, type PublishTiming } from "../../src/lib/pipeline/publish/publish-job";
|
|
22
|
+
import { JobKindRegistry, type JobKindDefinition, type StepDefinition } from "../../src/lib/publication/pipeline/job-runner";
|
|
23
|
+
import { registerPublishJobKinds, type PublishKindTuning, type PublishTiming } from "../../src/lib/publication/pipeline/publish/publish-job";
|
|
24
24
|
import {
|
|
25
25
|
PublishWorld,
|
|
26
26
|
movePreview,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
type CiDispatch,
|
|
30
30
|
type TestKv,
|
|
31
31
|
type WorldDesignation,
|
|
32
|
-
} from "../../src/lib/pipeline/publish/publish-test-support";
|
|
32
|
+
} from "../../src/lib/publication/pipeline/publish/publish-test-support";
|
|
33
33
|
import type { Landed } from "./matrix-faults";
|
|
34
34
|
|
|
35
35
|
type SiteVersionStore = ReturnType<typeof testVersionStore>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A synthetic 5-step job kind for the TenantPipeline fault harness. Test-only: the deployed
|
|
3
|
-
* registry (`src/lib/pipeline/job-kinds.ts`) never contains it.
|
|
3
|
+
* registry (`src/lib/publication/pipeline/job-kinds.ts`) never contains it.
|
|
4
4
|
*
|
|
5
5
|
* Steps s1..s5. s3 works in three chunks and checkpoints after each one. s2 records a commit
|
|
6
6
|
* fact, s4 evidence, s5 the live state, so retried fact writes are exercised too. Every step
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* persisted before it acts so it survives the eviction it causes.
|
|
15
15
|
*/
|
|
16
16
|
import type { DurableObjectState } from "cloudflare:workers";
|
|
17
|
-
import { PipelineRefusal } from "../../src/lib/pipeline/classify";
|
|
17
|
+
import { PipelineRefusal } from "../../src/lib/publication/pipeline/classify";
|
|
18
18
|
import {
|
|
19
19
|
InvalidJobInput,
|
|
20
20
|
JobKindRegistry,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
type StepContext,
|
|
24
24
|
type StepDefinition,
|
|
25
25
|
type StepOutcome,
|
|
26
|
-
} from "../../src/lib/pipeline/job-runner";
|
|
26
|
+
} from "../../src/lib/publication/pipeline/job-runner";
|
|
27
27
|
|
|
28
28
|
export type FaultMode = "throw" | "hang" | "evict" | "refuse" | "crash";
|
|
29
29
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* a CI dispatch is completed and its callback delivered, a hotfix's static prebuild is staged and
|
|
12
12
|
* reported. The cell's outcome is then held against the scenario's unfaulted run (`baselineOf`).
|
|
13
13
|
*/
|
|
14
|
-
import type { JobView, TransitionView } from "../../src/lib/pipeline/job-runner";
|
|
14
|
+
import type { JobView, TransitionView } from "../../src/lib/publication/pipeline/job-runner";
|
|
15
15
|
import type { MatrixEffect, MatrixFault, MatrixKill } from "../pipeline/matrix-faults";
|
|
16
|
-
import type { CiDispatch } from "../../src/lib/pipeline/publish/publish-test-support";
|
|
16
|
+
import type { CiDispatch } from "../../src/lib/publication/pipeline/publish/publish-test-support";
|
|
17
17
|
import { pipelineFor, uniqueTenant } from "../pipeline/harness";
|
|
18
18
|
|
|
19
19
|
export type Provider = "worker-r2-pointer" | "s3-overwrite";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.90",
|
|
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",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These used to be independent literal objects copy-pasted across the S3 and
|
|
5
5
|
* R2 publish paths -- which is exactly how one of them silently fell out of
|
|
6
6
|
* sync (the SVG entry landed in scripts/publish/lib/hosted-original-publication.mjs's
|
|
7
|
-
* EXT map but not apps/storefront/src/lib/change/publication/hostedOriginalPoolStage.ts's
|
|
7
|
+
* EXT map but not apps/storefront/src/lib/publication/change/publication/hostedOriginalPoolStage.ts's
|
|
8
8
|
* MEDIA_TYPES map, so a tenant with a pinned SVG favicon staged to CloudFront but
|
|
9
9
|
* was silently rejected on the Cloudflare/R2 mirror). Importing from here instead
|
|
10
10
|
* of re-declaring the literal is what makes that class of drift impossible, not just
|