@tokenoftrust/storefront-runner 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -117,12 +117,14 @@ export async function authorizeInternalContentRequest(
|
|
|
117
117
|
}
|
|
118
118
|
if (!contexts) return { allowed: false, reason: "unavailable" };
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
// The broker sends one context per (store, kind). Only a direct membership (owner or
|
|
121
|
+
// developer) authorizes internal content; staff, operator and unknown kinds carry nothing
|
|
122
|
+
// here and displace nothing. Two memberships on one store are ambiguous and refused.
|
|
123
|
+
const memberships = contexts.filter((context) =>
|
|
124
|
+
context.appDomain === input.route.tenant &&
|
|
125
|
+
(context.audience === "owner" || context.audience === "developer"));
|
|
126
|
+
if (memberships.length !== 1) return { allowed: false, reason: "denied" };
|
|
127
|
+
const audience = memberships[0]!.audience as "owner" | "developer";
|
|
126
128
|
return {
|
|
127
129
|
allowed: true,
|
|
128
130
|
tenant: input.route.tenant,
|
|
@@ -62,7 +62,11 @@ export const referenceTheme: ThemeTokens = {
|
|
|
62
62
|
logoLight: "/brand/northwind-logo-light.svg",
|
|
63
63
|
logoDark: "/brand/northwind-logo-dark.svg",
|
|
64
64
|
favicon: "/favicon.svg",
|
|
65
|
-
ogImage:
|
|
65
|
+
// No ogImage default: this object is the merge BASE for every tenant
|
|
66
|
+
// (schema.ts mergeTheme(referenceTheme, tenant.theme_tokens)), not just the
|
|
67
|
+
// reference/demo tenant's own theme. A hardcoded default here silently
|
|
68
|
+
// became every tenant's og:image unless they declared their own -- the
|
|
69
|
+
// northwind-og.svg placeholder shipped live on tokenoftrust.com this way.
|
|
66
70
|
motion: "full",
|
|
67
71
|
},
|
|
68
72
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
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",
|
|
@@ -139,7 +139,8 @@ export interface ThemeBrandTokens {
|
|
|
139
139
|
logoLight: string;
|
|
140
140
|
logoDark: string;
|
|
141
141
|
favicon: string;
|
|
142
|
-
|
|
142
|
+
/** No platform default: a tenant with no declared og:image gets no og:image tag, never a shared placeholder. */
|
|
143
|
+
ogImage?: string;
|
|
143
144
|
/** "full" | "reduced" — tenant-level default motion preference. */
|
|
144
145
|
motion: "full" | "reduced";
|
|
145
146
|
/**
|