@arcblock/did-connect-service 4.1.40 → 4.1.42
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/dist/_generated/asset-bytes.js +1 -1
- package/dist/_generated/asset-manifest.js +2 -2
- package/dist/app-identity.d.ts +283 -0
- package/dist/app-identity.d.ts.map +1 -0
- package/dist/app-identity.js +431 -0
- package/dist/app-identity.js.map +1 -0
- package/dist/assets/{admin-extra.c7a0720f.js → admin-extra.da2c9785.js} +164 -10
- package/dist/assets/{admin.ab0009f2.css → admin.d99b416e.css} +23 -0
- package/dist/blocklet-service-rpc-types.d.ts +12 -0
- package/dist/blocklet-service-rpc-types.d.ts.map +1 -1
- package/dist/blocklet-service-rpc.d.ts +10 -1
- package/dist/blocklet-service-rpc.d.ts.map +1 -1
- package/dist/blocklet-service-rpc.js +32 -3
- package/dist/blocklet-service-rpc.js.map +1 -1
- package/dist/blocklet-service.d.ts +7 -0
- package/dist/blocklet-service.d.ts.map +1 -1
- package/dist/blocklet-service.js +30 -23
- package/dist/blocklet-service.js.map +1 -1
- package/dist/branding-sources.d.ts +60 -0
- package/dist/branding-sources.d.ts.map +1 -0
- package/dist/branding-sources.js +55 -0
- package/dist/branding-sources.js.map +1 -0
- package/dist/embedded.d.ts +20 -0
- package/dist/embedded.d.ts.map +1 -1
- package/dist/embedded.js +45 -27
- package/dist/embedded.js.map +1 -1
- package/dist/handlers/access-key-connect-handler.d.ts.map +1 -1
- package/dist/handlers/access-key-connect-handler.js +3 -1
- package/dist/handlers/access-key-connect-handler.js.map +1 -1
- package/dist/handlers/admin-instance-handler.d.ts.map +1 -1
- package/dist/handlers/admin-instance-handler.js +4 -1
- package/dist/handlers/admin-instance-handler.js.map +1 -1
- package/dist/handlers/auth-handler.d.ts +36 -1
- package/dist/handlers/auth-handler.d.ts.map +1 -1
- package/dist/handlers/auth-handler.js +58 -38
- package/dist/handlers/auth-handler.js.map +1 -1
- package/dist/handlers/blocklet-js-handler.d.ts +10 -2
- package/dist/handlers/blocklet-js-handler.d.ts.map +1 -1
- package/dist/handlers/blocklet-js-handler.js +55 -25
- package/dist/handlers/blocklet-js-handler.js.map +1 -1
- package/dist/handlers/branding-handler.d.ts +97 -11
- package/dist/handlers/branding-handler.d.ts.map +1 -1
- package/dist/handlers/branding-handler.js +212 -113
- package/dist/handlers/branding-handler.js.map +1 -1
- package/dist/handlers/passkey-handler.d.ts +6 -1
- package/dist/handlers/passkey-handler.d.ts.map +1 -1
- package/dist/handlers/passkey-handler.js +38 -26
- package/dist/handlers/passkey-handler.js.map +1 -1
- package/dist/handlers/team-handler.d.ts +4 -0
- package/dist/handlers/team-handler.d.ts.map +1 -1
- package/dist/handlers/team-handler.js +24 -5
- package/dist/handlers/team-handler.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/logo-paths.d.ts +23 -0
- package/dist/logo-paths.d.ts.map +1 -1
- package/dist/logo-paths.js +57 -2
- package/dist/logo-paths.js.map +1 -1
- package/dist/package-branding.d.ts +95 -6
- package/dist/package-branding.d.ts.map +1 -1
- package/dist/package-branding.js +87 -36
- package/dist/package-branding.js.map +1 -1
- package/dist/pages/admin/i18n.d.ts.map +1 -1
- package/dist/pages/admin/i18n.js +32 -0
- package/dist/pages/admin/i18n.js.map +1 -1
- package/dist/pages/admin/styles.d.ts +1 -1
- package/dist/pages/admin/styles.d.ts.map +1 -1
- package/dist/pages/admin/styles.js +23 -0
- package/dist/pages/admin/styles.js.map +1 -1
- package/dist/pages/admin/tab-branding.d.ts.map +1 -1
- package/dist/pages/admin/tab-branding.js +180 -15
- package/dist/pages/admin/tab-branding.js.map +1 -1
- package/dist/store/d1-store.d.ts +9 -1
- package/dist/store/d1-store.d.ts.map +1 -1
- package/dist/store/d1-store.js +30 -0
- package/dist/store/d1-store.js.map +1 -1
- package/dist/theme-utils.d.ts +21 -0
- package/dist/theme-utils.d.ts.map +1 -1
- package/dist/theme-utils.js +63 -1
- package/dist/theme-utils.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/http/security-headers.d.ts +0 -38
- package/dist/http/security-headers.d.ts.map +0 -1
- package/dist/http/security-headers.js +0 -67
- package/dist/http/security-headers.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { advertisesLogoSlot, identityFromAppInfo, identityScopeFor, instanceIdentityRowsFromSettings, resolveAppIdentity, } from "../app-identity.js";
|
|
1
2
|
import { resolveWalletIdentity } from "../identity/wallet-identity.js";
|
|
2
3
|
import { DEFAULT_LANGUAGE_ROWS } from "../locale.js";
|
|
3
|
-
import { formatThemeForOutput } from "../theme-utils.js";
|
|
4
4
|
export class BlockletJsHandler {
|
|
5
5
|
options;
|
|
6
6
|
appDid;
|
|
@@ -8,7 +8,10 @@ export class BlockletJsHandler {
|
|
|
8
8
|
appPk;
|
|
9
9
|
// Server-side cache — avoids D1 listSettings + JSON.parse on every page load.
|
|
10
10
|
// Invalidated naturally when handler is rebuilt (via _handlerCache TTL/invalidation).
|
|
11
|
-
|
|
11
|
+
// Keyed by identity scope: the same construction rows resolve differently as the
|
|
12
|
+
// instance's own rows ("own", above the package layer) and as a stand-in
|
|
13
|
+
// ("fallback", below it), so one body must never answer both.
|
|
14
|
+
_cache = new Map();
|
|
12
15
|
static CACHE_TTL = 60_000; // 60s — matches client Cache-Control
|
|
13
16
|
constructor(options) {
|
|
14
17
|
this.options = options;
|
|
@@ -17,15 +20,22 @@ export class BlockletJsHandler {
|
|
|
17
20
|
this.appPid = identity.appPid;
|
|
18
21
|
this.appPk = identity.appPk;
|
|
19
22
|
}
|
|
20
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @param assertedInstanceDid the instance the HOST asserted for this request (route
|
|
25
|
+
* context, or an opted-in `X-Instance-Did`). Used only to label the identity's
|
|
26
|
+
* origin; the body always comes from this handler's own instance scope.
|
|
27
|
+
*/
|
|
28
|
+
async fetch(request, assertedInstanceDid) {
|
|
21
29
|
const url = new URL(request.url);
|
|
22
30
|
// Fast path: endsWith check avoids regex on every request
|
|
23
31
|
if (!url.pathname.endsWith("/__blocklet__.js") && !url.pathname.endsWith("/__meta__.js"))
|
|
24
32
|
return null;
|
|
25
33
|
const isJson = url.searchParams.get("type") === "json";
|
|
34
|
+
const scope = identityScopeFor(this.options.instanceDid || "_global_", assertedInstanceDid);
|
|
26
35
|
// Serve from cache if fresh
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
const cached = this._cache.get(scope);
|
|
37
|
+
if (cached && Date.now() - cached.at < BlockletJsHandler.CACHE_TTL) {
|
|
38
|
+
return new Response(isJson ? cached.json : cached.js, {
|
|
29
39
|
headers: {
|
|
30
40
|
"Content-Type": isJson ? "application/json" : "application/javascript; charset=utf-8",
|
|
31
41
|
"Cache-Control": "public, max-age=60",
|
|
@@ -33,10 +43,10 @@ export class BlockletJsHandler {
|
|
|
33
43
|
});
|
|
34
44
|
}
|
|
35
45
|
// Build fresh data and populate cache
|
|
36
|
-
const data = await this.buildBlockletData(request);
|
|
46
|
+
const data = await this.buildBlockletData(request, scope);
|
|
37
47
|
const json = JSON.stringify(data);
|
|
38
48
|
const js = `window.blocklet = ${json};`;
|
|
39
|
-
this._cache
|
|
49
|
+
this._cache.set(scope, { js, json, at: Date.now() });
|
|
40
50
|
return new Response(isJson ? json : js, {
|
|
41
51
|
headers: {
|
|
42
52
|
"Content-Type": isJson ? "application/json" : "application/javascript; charset=utf-8",
|
|
@@ -44,7 +54,7 @@ export class BlockletJsHandler {
|
|
|
44
54
|
},
|
|
45
55
|
});
|
|
46
56
|
}
|
|
47
|
-
async buildBlockletData(request) {
|
|
57
|
+
async buildBlockletData(request, scope) {
|
|
48
58
|
const origin = new URL(request.url).origin;
|
|
49
59
|
const store = this.options.store;
|
|
50
60
|
const instanceDid = this.options.instanceDid || "_global_";
|
|
@@ -87,14 +97,30 @@ export class BlockletJsHandler {
|
|
|
87
97
|
return fallback;
|
|
88
98
|
}
|
|
89
99
|
};
|
|
100
|
+
// Identity fields (name / description / logos / theme) come from the single
|
|
101
|
+
// resolver. The rows are read from THIS handler's instance scope, never from the
|
|
102
|
+
// request's X-Instance-Did (preserved as-is — see the did#246 baseline). When the
|
|
103
|
+
// host asserted a different instance for this request, the construction rows are a
|
|
104
|
+
// stand-in and are labelled `scope: "fallback"` — decided by the host-asserted
|
|
105
|
+
// instance, never by a raw request header — without changing any output byte.
|
|
106
|
+
const base = this.options.appIdentity
|
|
107
|
+
?? (this.options.appInfo ? identityFromAppInfo(this.options.appInfo) : undefined);
|
|
108
|
+
const identity = resolveAppIdentity({
|
|
109
|
+
instance: instanceIdentityRowsFromSettings(settingsMap,
|
|
110
|
+
// Legacy app:name is NOT a per-request layer here: it only reaches this
|
|
111
|
+
// surface through the build-time identity (CF honors it, embedded does not).
|
|
112
|
+
["branding", "logos", "theme"], scope),
|
|
113
|
+
inherited: base,
|
|
114
|
+
defaultName: "App",
|
|
115
|
+
});
|
|
116
|
+
// Non-identity branding fields (url, copyright, …) still come from the raw row.
|
|
117
|
+
// passportColor is identity (package layer, S8) and comes from the resolver.
|
|
90
118
|
const branding = parse("app:branding", {});
|
|
91
|
-
const logos = parse("app:logos", {});
|
|
92
119
|
const orgConfig = parse("app:org", { enabled: false });
|
|
93
120
|
const didConnectConfig = parse("app:didConnect", { showDidColor: true, showAppInfo: true });
|
|
94
121
|
const inviteConfig = parse("app:invite", { enabled: false });
|
|
95
122
|
const fedConfig = parse("federation:config", {});
|
|
96
123
|
const navigation = parse("app:navigation", []);
|
|
97
|
-
const theme = parse("app:theme", {});
|
|
98
124
|
const languages = parse("app:languages", DEFAULT_LANGUAGE_ROWS.map((row) => ({ code: row.code, name: row.name })));
|
|
99
125
|
const mountPoints = parse("app:mountPoints", []);
|
|
100
126
|
// Phase 3c keys — must stay aligned
|
|
@@ -152,15 +178,13 @@ export class BlockletJsHandler {
|
|
|
152
178
|
appId: this.appDid,
|
|
153
179
|
appPid: this.appPid,
|
|
154
180
|
appPk: this.appPk,
|
|
155
|
-
appName:
|
|
156
|
-
appDescription:
|
|
157
|
-
? branding.description
|
|
158
|
-
: this.options.appInfo?.description ?? "",
|
|
181
|
+
appName: identity.name.value || "App",
|
|
182
|
+
appDescription: identity.description.value ?? "",
|
|
159
183
|
appUrl: branding.url || origin,
|
|
160
184
|
did: this.appDid,
|
|
161
185
|
status: "running",
|
|
162
186
|
tenantMode: branding.tenantMode || "single",
|
|
163
|
-
passportColor:
|
|
187
|
+
passportColor: identity.passportColor?.value || "#1DC1C7",
|
|
164
188
|
alsoKnownAs: [],
|
|
165
189
|
trustedFactories: [],
|
|
166
190
|
domainAliases: branding.domainAliases || [],
|
|
@@ -175,16 +199,22 @@ export class BlockletJsHandler {
|
|
|
175
199
|
version: branding.version || "1.0.0",
|
|
176
200
|
componentId: this.appDid,
|
|
177
201
|
isComponent: false,
|
|
178
|
-
// --- Brand assets (
|
|
179
|
-
// appLogo always returns a valid URL (fallback to default logo endpoint)
|
|
202
|
+
// --- Brand assets (slot → URL path) ---
|
|
203
|
+
// appLogo always returns a valid URL (fallback to default logo endpoint). A variant
|
|
204
|
+
// is advertised when its own slot is configured or its fallback chain reaches the
|
|
205
|
+
// package logo (did#248) — see advertisesLogoSlot.
|
|
180
206
|
appLogo: "/.well-known/service/blocklet/logo",
|
|
181
|
-
appLogoDark:
|
|
182
|
-
appLogoRect:
|
|
183
|
-
appLogoRectDark:
|
|
184
|
-
appSplashPortrait:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
207
|
+
appLogoDark: advertisesLogoSlot(identity, "squareDark") ? "/.well-known/service/blocklet/logo-dark" : "",
|
|
208
|
+
appLogoRect: advertisesLogoSlot(identity, "rect") ? "/.well-known/service/blocklet/logo-rect" : "",
|
|
209
|
+
appLogoRectDark: advertisesLogoSlot(identity, "rectDark") ? "/.well-known/service/blocklet/logo-rect-dark" : "",
|
|
210
|
+
appSplashPortrait: advertisesLogoSlot(identity, "splashPortrait")
|
|
211
|
+
? "/.well-known/service/blocklet/splash/portrait"
|
|
212
|
+
: "",
|
|
213
|
+
appSplashLandscape: advertisesLogoSlot(identity, "splashLandscape")
|
|
214
|
+
? "/.well-known/service/blocklet/splash/landscape"
|
|
215
|
+
: "",
|
|
216
|
+
appOgImage: advertisesLogoSlot(identity, "ogImage") ? "/.well-known/service/blocklet/og-image" : "",
|
|
217
|
+
blurhash: identity.blurhash?.value || {},
|
|
188
218
|
// --- Config ---
|
|
189
219
|
webWalletUrl: "https://web.abtwallet.io",
|
|
190
220
|
preferences: {},
|
|
@@ -192,7 +222,7 @@ export class BlockletJsHandler {
|
|
|
192
222
|
updatedAt: latestUpdate || 0,
|
|
193
223
|
copyright: branding.copyright || {},
|
|
194
224
|
navigation,
|
|
195
|
-
theme:
|
|
225
|
+
theme: identity.theme.value,
|
|
196
226
|
optionalComponents: [],
|
|
197
227
|
enableDocker: false,
|
|
198
228
|
enableDockerNetwork: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocklet-js-handler.js","sourceRoot":"","sources":["../../src/handlers/blocklet-js-handler.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"blocklet-js-handler.js","sourceRoot":"","sources":["../../src/handlers/blocklet-js-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gCAAgC,EAChC,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAoBrD,MAAM,OAAO,iBAAiB;IAaR;IAZZ,MAAM,CAAS;IACf,MAAM,CAAS;IACf,KAAK,CAAS;IAEtB,8EAA8E;IAC9E,sFAAsF;IACtF,iFAAiF;IACjF,yEAAyE;IACzE,8DAA8D;IAC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S,EAAE,QAAQ,CAAC,SAAS,IAAI,EAAE;YACnC,UAAU;YACV,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK;YAC3B,kBAAkB,EAAE,EAAE;YACtB,YAAY,EAAE,KAAK;YACnB,mBAAmB,EAAE,KAAK;YAC1B,oBAAoB,EAAE,WAAW;YACjC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAEnB,mBAAmB;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP,GAAG,EAAE,iBAAiB;oBACtB,QAAQ,EAAE,aAAa,CAAC,QAAQ,IAAI,IAAI;iBACzC;gBACD,MAAM,EAAE,YAAY;gBACpB,SAAS,EAAE;oBACT,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,EAAE;oBAC9B,MAAM,EAAE;wBACN,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,SAAS;wBACrC,SAAS,EAAE,KAAK;qBACjB;iBACF;gBACD,KAAK,EAAE,EAAE,EAAE,aAAa;gBACxB,cAAc;gBACd,UAAU,EAAE,gBAAgB;gBAC5B,YAAY,EAAE,EAAE;gBAChB,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;gBACrB,YAAY,EAAE;oBACZ,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,qBAAqB,IAAI,WAAW,EAAE,YAAY,CAAC,EAAE;oBAC1E,UAAU,EAAE,KAAK;iBAClB;gBACD,GAAG,EAAE,SAAS;aACf;SACF,CAAC;IACJ,CAAC"}
|
|
@@ -4,17 +4,76 @@
|
|
|
4
4
|
* Public routes (before enforceAccess): Logo access, Theme anti-FOUC
|
|
5
5
|
* Admin routes (after enforceAccess): Branding/Theme/Navigation CRUD, Logo upload/delete
|
|
6
6
|
*/
|
|
7
|
+
import { type AppIdentity } from "../app-identity.js";
|
|
8
|
+
import { type Logger } from "../logger.js";
|
|
7
9
|
import type { OgWorkerRenderer } from "../og/worker.js";
|
|
8
10
|
import type { AppInfo } from "../package-branding.js";
|
|
9
11
|
import type { D1Store } from "../store/d1-store.js";
|
|
12
|
+
/**
|
|
13
|
+
* Host-injected cache purge for an instance's public branding paths.
|
|
14
|
+
*
|
|
15
|
+
* connect-service never talks to a CDN itself: a host whose runtime caches the
|
|
16
|
+
* public branding paths beyond their own `max-age` (arc's Cloudflare worker keeps
|
|
17
|
+
* `/favicon.ico` and the logo paths at the edge for 30 days) injects this, the
|
|
18
|
+
* same way it injects `r2` / `ogRenderer` / `getAccountState`. It is called after
|
|
19
|
+
* a successful branding save with the instance whose branding changed, the host
|
|
20
|
+
* the admin saved from, and the path list to purge — always
|
|
21
|
+
* {@link BRANDING_PUBLIC_PATHS}.
|
|
22
|
+
*
|
|
23
|
+
* `host` is the saving request's own URL host (`new URL(request.url).host`, so a
|
|
24
|
+
* non-default port is kept); no header is consulted. It lets a host that cannot
|
|
25
|
+
* enumerate an instance's domains (arc-services) purge at least the one the admin
|
|
26
|
+
* is on; expanding to the instance's other hosts stays the host's job.
|
|
27
|
+
*
|
|
28
|
+
* Best effort: a rejection (or a throw) is logged and swallowed — the save it
|
|
29
|
+
* follows has already committed and still answers `{ ok: true }`.
|
|
30
|
+
*/
|
|
31
|
+
export type PurgeBrandingPaths = (input: {
|
|
32
|
+
instanceDid: string;
|
|
33
|
+
host: string;
|
|
34
|
+
paths: readonly string[];
|
|
35
|
+
}) => Promise<void> | void;
|
|
10
36
|
export interface BrandingHandlerOptions {
|
|
11
37
|
store: D1Store;
|
|
12
38
|
r2?: R2Bucket;
|
|
13
39
|
instanceDid?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the `X-Instance-Did` request header is host-asserted and may select the
|
|
42
|
+
* branding scope (only when no explicit scope is passed to fetchPublic/fetchAdmin).
|
|
43
|
+
* Set ONLY by hosts whose runtime sets or strips that header itself (the embedded
|
|
44
|
+
* Node host: arc's reserved routes). Default false: the header is ignored.
|
|
45
|
+
*/
|
|
46
|
+
trustInstanceHeader?: boolean;
|
|
14
47
|
/** Deployment RP name used only by the generated default logo fallback. */
|
|
15
48
|
rpName?: string;
|
|
16
|
-
/**
|
|
49
|
+
/** The handler's build-time app identity — the layer under the request-scope rows in dynamic OG text. */
|
|
50
|
+
appIdentity?: AppIdentity;
|
|
51
|
+
/** @deprecated Pass `appIdentity`. A bare AppInfo is wrapped via `identityFromAppInfo`. */
|
|
17
52
|
appInfo?: AppInfo;
|
|
53
|
+
/**
|
|
54
|
+
* The identity BELOW the instance layer — package → deployment → default, resolved
|
|
55
|
+
* with no instance rows. It is what removing an instance override falls back to, so
|
|
56
|
+
* the admin API reports sources against it (did#249). A host whose `appIdentity`
|
|
57
|
+
* already folds in instance rows (Workers `buildHandler`, cached for minutes) must
|
|
58
|
+
* pass it, or a just-restored slot would still read as overridden from that cached
|
|
59
|
+
* copy. Omitted → `appIdentity` when it carries no instance-origin field, else the
|
|
60
|
+
* deployment name alone.
|
|
61
|
+
*/
|
|
62
|
+
baseIdentity?: AppIdentity;
|
|
63
|
+
/**
|
|
64
|
+
* Whether this host's pages honor the legacy D1 `app:name` key as a name layer.
|
|
65
|
+
* Workers `buildHandler` does (it reads it into the build-time identity); the embedded
|
|
66
|
+
* Node host does not (did#246 baseline). The admin sources report the name the host's
|
|
67
|
+
* pages actually show, so a host that ignores the key sets this false. Default true.
|
|
68
|
+
*/
|
|
69
|
+
honorsLegacyName?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Host hook run after a successful branding write, for a host that caches an identity
|
|
72
|
+
* built from this instance's rows (Workers `buildHandler` → `invalidateConfigCache`).
|
|
73
|
+
* Without it, public surfaces built on that cached identity (login page, passkey RP
|
|
74
|
+
* name, `__blocklet__.js`) keep a restored override until the cache expires.
|
|
75
|
+
*/
|
|
76
|
+
invalidateIdentityCache?: (instanceDid: string) => void;
|
|
18
77
|
/** Node-only: dynamic OG generator from `@arcblock/did-connect-service/og-node`.
|
|
19
78
|
* When absent, /og.png falls back to the static /og-image R2 lookup. */
|
|
20
79
|
ogGenerator?: {
|
|
@@ -22,41 +81,68 @@ export interface BrandingHandlerOptions {
|
|
|
22
81
|
};
|
|
23
82
|
/** Worker-compatible byte renderer. Takes precedence over the Node generator. */
|
|
24
83
|
ogRenderer?: OgWorkerRenderer;
|
|
84
|
+
/** Host purge hook run after a successful branding save. Omitted → no purge (unchanged behaviour). */
|
|
85
|
+
purgeBrandingPaths?: PurgeBrandingPaths;
|
|
86
|
+
/** Where a failed purge is reported. Omitted → `consoleLogger`. */
|
|
87
|
+
logger?: Logger;
|
|
25
88
|
}
|
|
26
89
|
export declare class BrandingHandler {
|
|
27
90
|
private options;
|
|
28
91
|
private _themeCache;
|
|
29
92
|
private static THEME_CACHE_TTL;
|
|
93
|
+
private _requestScope;
|
|
30
94
|
constructor(options: BrandingHandlerOptions);
|
|
31
95
|
/**
|
|
32
96
|
* Public routes — Logo access + Theme anti-FOUC endpoints.
|
|
33
97
|
* Called BEFORE enforceAccess in auth-handler route().
|
|
34
98
|
*/
|
|
35
|
-
fetchPublic(request: Request): Promise<Response | null>;
|
|
99
|
+
fetchPublic(request: Request, scopeInstanceDid?: string): Promise<Response | null>;
|
|
36
100
|
/**
|
|
37
101
|
* Admin routes — Branding/Theme/Navigation CRUD.
|
|
38
102
|
* Called AFTER enforceAccess in auth-handler route() (requires admin).
|
|
39
103
|
*/
|
|
40
|
-
fetchAdmin(request: Request): Promise<Response | null>;
|
|
104
|
+
fetchAdmin(request: Request, scopeInstanceDid?: string): Promise<Response | null>;
|
|
41
105
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
106
|
+
* The instance this request's branding reads/writes are scoped to. Precedence:
|
|
107
|
+
* 1. the explicit scope the caller passed (auth-handler: route-context instance,
|
|
108
|
+
* else the header when the host owns it, else the construction instance) —
|
|
109
|
+
* the same scope the admin gate authorized against;
|
|
110
|
+
* 2. `X-Instance-Did`, only when `trustInstanceHeader` — a host opts in only if its
|
|
111
|
+
* runtime sets the header itself and strips any client-supplied value; for a
|
|
112
|
+
* host that does not, the header must stay untrusted (the default);
|
|
113
|
+
* 3. the constructor instance, then the global scope.
|
|
50
114
|
*/
|
|
51
115
|
private instanceDidFor;
|
|
116
|
+
/**
|
|
117
|
+
* This request's identity rows. Branding always reads the host-asserted instance (or,
|
|
118
|
+
* with none asserted, the construction instance), so the rows are that scope's own.
|
|
119
|
+
*/
|
|
120
|
+
private identityRows;
|
|
121
|
+
/** The handler's build-time identity — the layer under the request-scope rows. */
|
|
122
|
+
private get base();
|
|
123
|
+
/** See {@link BrandingHandlerOptions.baseIdentity}. */
|
|
124
|
+
private belowInstance;
|
|
52
125
|
private localeFor;
|
|
53
126
|
private serveLogo;
|
|
54
127
|
private serveOg;
|
|
55
128
|
resolveLogoType(pathname: string): string | null;
|
|
129
|
+
/** @deprecated Use `logoFallbackChain` from app-identity.ts (the single definition). */
|
|
56
130
|
getFallbackChain(type: string): string[];
|
|
57
131
|
private defaultLogoResponse;
|
|
58
132
|
private getBranding;
|
|
59
133
|
private updateBranding;
|
|
134
|
+
/**
|
|
135
|
+
* Run the host's purge hook for `instanceDid`, if one was injected. Awaited so a
|
|
136
|
+
* Workers host does not cancel it with the response, but contained: a rejection
|
|
137
|
+
* or throw is logged and swallowed, because the branding write is the primary
|
|
138
|
+
* operation and the purge is only an optimization over the origin's max-age.
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Run the host's identity-cache hook for `instanceDid`, if one was injected. Contained
|
|
142
|
+
* like the purge below: it is a public host option, and the save has already committed.
|
|
143
|
+
*/
|
|
144
|
+
private invalidateIdentity;
|
|
145
|
+
private purgePublicPaths;
|
|
60
146
|
private uploadLogo;
|
|
61
147
|
private deleteLogo;
|
|
62
148
|
private getTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branding-handler.d.ts","sourceRoot":"","sources":["../../src/handlers/branding-handler.ts"],"names":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