@boost33/shell-data 0.1.0 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,82 @@
2
2
 
3
3
  Changes to the published surface of `@boost33/shell-data`. Consumers upgrade by hand, as with `@boost33/ui`, so this file is the only notice they get.
4
4
 
5
+ ## 0.2.0 — 2026-11-18
6
+
7
+ **One rail in every app, and two fixes.** Jamal, 18 Nov 2026: the rail is
8
+ "remembered for the account and always present the same regardless of which
9
+ app the user is in". Ship it with `@boost33/ui` 0.16.0, which draws Inbox and
10
+ reads `locale`.
11
+
12
+ ### Changed
13
+
14
+ - **`products.pinned` is the person's saved pins.** Identity sends them with
15
+ the product list (`pinnedApps`). Never chosen gives the first four, as
16
+ before. Chosen none gives none. A list gives that list, in the person's
17
+ order, kept to apps the list has, each once, at most four. This is the Hub's
18
+ `splitByPin`, moved here: `pinnedFrom`. An Identity that does not send pins
19
+ yet reads as never chosen, so today's rail is unchanged until it does.
20
+ - **Apps whose own Backdrop is not ready are hidden** from `products.all`, and
21
+ so from every app's rail and All apps panel: `BACKDROP_NOT_READY`, the Hub's
22
+ list (`boostvoice`, `brokers`), and `hiddenOnBackdrop(slug)`. One rule
23
+ instead of the Hub's alone. The app still answers on its own origin.
24
+
25
+ ### Added
26
+
27
+ - **`links.inbox`**, the Hub's `/inbox`: every app's rail draws it after Wallet.
28
+ - **`locale`** in the chrome data, from a new optional `locale` claim. It
29
+ picks the chrome's words.
30
+ - **`appMenuFolded`** in the chrome data: the person's saved app-menu fold,
31
+ read in the same Identity call as the product list (true folded, false
32
+ open, null never chose or the read failed), never cached. The chrome
33
+ draws the menu that way from the start. **`saveAppMenuFolded({ cookies,
34
+ config, folded })`** saves a toggle to Identity as the viewer, for the
35
+ app's server action behind the chrome's `onAppMenuFoldedChange`. It never
36
+ throws.
37
+ - **`@boost33/shell-data/contract`**: `RAIL_CONTRACT`, a fixed person, product
38
+ list and set of pins, and the rail every app must draw from them. Each app's
39
+ test imports it with `backdropStandardRailKeys` from `@boost33/ui/backdrop`.
40
+
41
+ ### Fixed
42
+
43
+ - **A client could see a staff-only app on a fallback.** The last good list
44
+ was cached per Identity origin, and Identity filters the list by audience,
45
+ so after a team member's read a client falling back could be served Boost
46
+ Pipe. The cache is now kept per audience (team: the `staff` claim or a
47
+ Boost33 address). Found by score-jmini and hub-jmini, 16 Nov 2026.
48
+ - **The cache never holds pins.** It outlives the request and is shared by
49
+ everyone the server serves, so a fallback draws the default rail, never
50
+ somebody else's.
51
+
52
+ ## 0.1.1 — 2026-11-13
53
+
54
+ ### Added — `gate()` and `isNavigation()`, for an app whose proxy does more than refresh
55
+
56
+ **Not breaking.** `gateRequest` behaves exactly as in 0.1.0; it is now built on `gate()`.
57
+
58
+ - **`gate(request, options) → GateResult`**: the same §5.1 decision without building a response. It takes any `Request` and returns one of five outcomes:
59
+ - `none`: no session cookie.
60
+ - `live`: the short-lived cookie is not near expiry. This is an unverified check, so verify it yourself.
61
+ - `refreshed`: the new token, already verified, plus the cookies to forward verbatim and the rewritten Cookie header.
62
+ - `dead`: a ready 307 to sign in that clears both cookies.
63
+ - `unwell`: forward nothing.
64
+
65
+ This is for apps that verify `b33_ctx` in their own proxy and hand claims to the page, as Results does.
66
+ - **`isNavigation(request)`**: the matcher's rule in code, for an app whose proxy must run on every request and so cannot narrow its matcher.
67
+ - **`CLAIMS_PROXY_MATCHER` and `isPrefetch(request)`, for an app whose proxy hands claims to its pages in a request header.** `SESSION_GATE_MATCHER` is safe only where pages verify `b33_ctx` themselves. Its prefetch exclusions read headers the client sets, so in a header-passing app a request marked as a prefetch would skip the proxy, and the page would trust a forged header. `CLAIMS_PROXY_MATCHER` runs the proxy on every request but Next's static assets. `isPrefetch` (Next's router, `purpose` and `sec-purpose`) and `isNavigation` then skip only the refresh. The README, and each matcher's JSDoc, name the architecture it assumes. Found by activity-jmini and hub-jmini.
68
+ - `isNavigation` now also treats `sec-purpose: prefetch` (a browser's speculative load) as a prefetch. `SESSION_GATE_MATCHER` is unchanged, so an app's existing literal copy still passes `matcherIsNavigationOnly`.
69
+ - **A viewer-credential mode for apps with no service keys** (Results, from activity-jmini). `identityKey`, `appId` and `ledger` are now optional.
70
+ - Without `identityKey`, there is no profile read: `profileName` resolves null and the name claim stands.
71
+ - Without a ledger `key` and `app`, the tokens are read as the viewer through `@boost33/ledger-client`'s `tokenSplitForViewer(b33_ctx)`, which is read-only and keyless.
72
+ - The product list was already read as the viewer.
73
+ - In viewer mode, an expired `b33_ctx` gives `unknown` with no retry, and the ledger's `no_wallet` gives `none`.
74
+
75
+ An app with keys passes them exactly as in 0.1.0, and nothing changes for it. The output shape is unchanged.
76
+ - **Fixed: a ledger URL ending in `/api/v1` read every token as "unknown".** The package appended `/api/v1` to whatever it was given, so an app whose `BOOST33_LEDGER_URL` already ends in it (Outbound, B33-660) asked for `/api/v1/api/v1/…`. The URL is now accepted with or without the suffix and trailing slashes, and never doubled. Found by outbound-jmini on 0.1.0.
77
+ - `appId` is documented as Identity's `APPS` slug (`outbound`), not the product slug (`boostoutbound`).
78
+ - **A compile-time check against `@boost33/ui` 0.11.0's `BackdropStandardChromeProps`** (both directions), so the data this package returns and what the chrome takes cannot drift apart without this package's build failing. `@boost33/ui` is a types-only devDependency; a test holds that `src/` never imports it. The check compiles with `moduleResolution: "bundler"`, as a Next app does (`tsconfig.drift.json`). Under this package's own NodeNext setting, `@boost33/ui`'s types silently resolve to `any` and the check could never fail; a negative control proved that before the fix.
79
+ - **`client` is identity's caller slug** from `APPS` in boost33-identity `src/config/apps.ts`, not a product slug: `outbound`, `passport`, `hub`, `boostscore`… An unlisted value still works; identity logs it as `unrecognised`.
80
+
5
81
  ## 0.1.0 — 2026-11-13
6
82
 
7
83
  ### Added — `getBackdropChromeData`, everything the Backdrop chrome draws, from one call (B33-1726)
package/README.md CHANGED
@@ -12,20 +12,36 @@ return <BackdropStandardChrome {...data} variant="app" place="boostscore" labels
12
12
 
13
13
  - **`claims`**: the claims your app already verified from `b33_ctx`. This package does not verify them again, and it never reads `design`. Deciding which design a person sees is your app's `isBackdropPreview`, and only that.
14
14
  - **`cookies`**: the request's `b33_sid` and `b33_ctx` values.
15
- - **`config`**: origins and keys from your server environment: `identityUrl`, `hubUrl`, `identityKey`, `appId`, and `ledger: { url, key, app }`. Optionally `docsUrl` and `supportEmail`.
15
+ - **`config`**: origins, and keys if your app has them, from your server environment: `identityUrl`, `hubUrl`, and optionally `identityKey` with `appId`, `ledger: { url, key, app }`, `docsUrl` and `supportEmail`.
16
+
17
+ **Two credential modes, chosen by what you pass.**
18
+ - **An app with service keys** (it is in Identity's `APPS`, with a ledger key) passes `identityKey`, `appId` and `ledger: { url, key, app }`. **`appId` is your slug in Identity's `APPS`** (boost33-identity `src/config/apps.ts`), not your product slug: Outbound passes `outbound`, not `boostoutbound`. The ledger `url` may be the origin or end in `/api/v1`; either works. The profile is read with the Identity key, and the tokens with the ledger key.
19
+ - **An app without them** (Results, for one) leaves the keys out and reads everything as the viewer, with the cookies it was given:
20
+ - the product list, which is always read this way;
21
+ - the tokens, through the ledger's `tokenSplitForViewer` with the viewer's `b33_ctx`.
22
+
23
+ The profile read is skipped, so `profileName` resolves null and the `name` claim stands. This needs no new secret and grants the least privilege.
16
24
 
17
25
  `person` and `links` are ready at once. `profileName`, `products` and `tokens` are promises. All three start together and none ever rejects, so the chrome streams each one in its own Suspense boundary. Each read fails alone, and the chrome always renders.
18
26
 
19
27
  | Read | Source | On failure |
20
28
  | --- | --- | --- |
21
29
  | `products` | Identity `GET /api/v1/products`, as the viewer (their cookies) | the last good list, `stale: true`; else `null` (global rail items only) |
22
- | `profileName` | Identity `GET /api/v1/profile`, with your service key | `null`: the `name` claim stays |
23
- | `tokens` | `@boost33/ledger-client` `tokenSplit()` | `{ kind: 'unknown' }`; no wallet gives `{ kind: 'none' }` |
30
+ | `profileName` | Identity `GET /api/v1/profile`, with your service key (skipped without one) | `null`: the `name` claim stays |
31
+ | `tokens` | `@boost33/ledger-client` `tokenSplit()` with your key, else `tokenSplitForViewer()` with the viewer's `b33_ctx` | `{ kind: 'unknown' }`; no wallet gives `{ kind: 'none' }` |
24
32
 
25
33
  The package returns no words. Labels, date formats and the mailto subject are your app's, in its language. App order is Identity's, as returned; nothing here hardcodes a product list.
26
34
 
27
35
  ## The session gate: `@boost33/shell-data/session`
28
36
 
37
+ > [!warning] Pick the matcher for how your pages trust the session
38
+ > **Your pages verify `b33_ctx` themselves** (every page runs its own `jwtVerify`, and your proxy sets no request header a page trusts; the Hub is one). Use `gateRequest` behind `SESSION_GATE_MATCHER`.
39
+ >
40
+ > **Your proxy hands claims to the page in a request header** (Results' `x-results-claims`). Use `gate()` behind `CLAIMS_PROXY_MATCHER`, and call it only when `isNavigation(request)` is true. Delete the claims header from every incoming request first.
41
+ >
42
+ > **Why the second kind cannot use `SESSION_GATE_MATCHER`.** Its prefetch exclusions read headers the client sets. A client can send an ordinary page request marked as a prefetch. That request skips your proxy, and the page then trusts a claims header the client wrote. `isPrefetch` and `isNavigation` decide only whether to spend a refresh, never whether your proxy runs.
43
+
44
+
29
45
  Refreshes an expired `b33_ctx` before the page renders, exactly as boost33-identity's contract §5.1 requires. It is lifted from Passport's production gate (B33-1751). Without it, a person on the Backdrop preview flips back to the classic design whenever their ten-minute `b33_ctx` runs out.
30
46
 
31
47
  ```ts
@@ -51,3 +67,15 @@ export const config = { matcher: [ /* … */ ] }
51
67
  - **One-bounce guard (§5.1.7)**: if your page redirects to Identity when it finds no claims, pass `markBounce(returnUrl)` as the return URL. On arrival, send `isRepeatBounce(url)` to a terminal page instead of back to Identity.
52
68
 
53
69
  `next` and `jose` are optional peer dependencies, needed only for this entry.
70
+
71
+ ### When your proxy does more than refresh
72
+
73
+ If your proxy also verifies `b33_ctx` and hands claims to the page, use `gate(request, options)`. It returns a decision rather than a response; see `GateResult`.
74
+
75
+ - `refreshed` gives you `freshCtx` (already verified), the `setCookies` to forward verbatim, and the `cookieHeader` to render this request with.
76
+ - `dead` gives you a `redirect` to return as is.
77
+
78
+ Use it behind `CLAIMS_PROXY_MATCHER`, which runs your proxy on every request except Next's static assets, and call `gate` only when `isNavigation(request)` is true. **Delete your claims header from the incoming request first, on every path**, and set it only from claims your proxy verified (a live `b33_ctx` you verified, or `freshCtx`).
79
+
80
+ `client` is your slug in Identity's `APPS` (`src/config/apps.ts` in boost33-identity), not your product slug.
81
+
@@ -0,0 +1,64 @@
1
+ export declare const RAIL_CONTRACT: {
2
+ /** The verified claims an app would pass: a client (not the Boost33 team), acting on an account with two products, in French. */
3
+ readonly claims: {
4
+ readonly email: "camille@atelier-nord.example";
5
+ readonly name: "Camille Martin";
6
+ readonly orgName: "Atelier Nord";
7
+ readonly locale: "fr-FR";
8
+ readonly act: "acc_contract";
9
+ readonly accounts: readonly [{
10
+ readonly id: "acc_contract";
11
+ readonly role: "admin";
12
+ readonly products: readonly ["boostscore", "boostoutbound"];
13
+ readonly walletId: "wal_contract";
14
+ }];
15
+ };
16
+ /** The configuration an app would pass, minus its keys. */
17
+ readonly config: {
18
+ readonly identityUrl: "https://id.boost33.example";
19
+ readonly hubUrl: "https://app.boost33.example";
20
+ };
21
+ /**
22
+ * Identity's answer: the Wallet, three apps, one app not ready on Backdrop
23
+ * (hidden), and the person's pins in their order, one of them for the hidden
24
+ * app, which is dropped.
25
+ */
26
+ readonly response: {
27
+ readonly products: readonly [{
28
+ readonly slug: "boostoutbound";
29
+ readonly name: "Boost Outbound";
30
+ readonly url: "https://outbound.boost33.example";
31
+ readonly live: true;
32
+ readonly entitled: true;
33
+ }, {
34
+ readonly slug: "wallet";
35
+ readonly name: "Wallet";
36
+ readonly url: "https://wallet.boost33.example";
37
+ readonly live: true;
38
+ readonly entitled: true;
39
+ }, {
40
+ readonly slug: "boostscore";
41
+ readonly name: "Boost Score";
42
+ readonly url: "https://score.boost33.example";
43
+ readonly live: true;
44
+ readonly entitled: true;
45
+ }, {
46
+ readonly slug: "boostresults";
47
+ readonly name: "Boost Results";
48
+ readonly url: "https://results.boost33.example";
49
+ readonly live: true;
50
+ readonly entitled: false;
51
+ }, {
52
+ readonly slug: "brokers";
53
+ readonly name: "Brokers";
54
+ readonly url: "https://brokers.boost33.example";
55
+ readonly live: true;
56
+ readonly entitled: true;
57
+ }];
58
+ readonly pinnedApps: readonly ["boostscore", "brokers", "boostoutbound"];
59
+ };
60
+ /** The rail, in order: what `backdropStandardRailKeys` must return for every app. */
61
+ readonly railKeys: readonly ["home", "wallet", "inbox", "boostscore", "boostoutbound", "allApps", "docs", "settings"];
62
+ /** The words: the person's language, as the chrome data serves it. */
63
+ readonly locale: "fr-FR";
64
+ };
@@ -0,0 +1,49 @@
1
+ /*
2
+ * The one-rail contract (0.2.0; Jamal, 18 Nov 2026: the rail is "always
3
+ * present the same regardless of which app the user is in").
4
+ *
5
+ * A fixed person, a fixed answer from Identity's `GET /api/v1/products` (the
6
+ * product list and the person's saved pins, as Identity sends them), and the
7
+ * rail every app must draw from them. Each app's contract test feeds
8
+ * `RAIL_CONTRACT.response` to `getBackdropChromeData` through a fake fetch,
9
+ * hands the result to `backdropStandardRailKeys` from @boost33/ui/backdrop, and
10
+ * expects `RAIL_CONTRACT.railKeys`. Imported, never copied, so a change here
11
+ * reaches every app's test at the next bump.
12
+ *
13
+ * Its own entry point, `@boost33/shell-data/contract`, with no `server-only`
14
+ * import, so a test runner imports it as plain data. It reads nothing and holds
15
+ * no secret.
16
+ */
17
+ export const RAIL_CONTRACT = {
18
+ /** The verified claims an app would pass: a client (not the Boost33 team), acting on an account with two products, in French. */
19
+ claims: {
20
+ email: 'camille@atelier-nord.example',
21
+ name: 'Camille Martin',
22
+ orgName: 'Atelier Nord',
23
+ locale: 'fr-FR',
24
+ act: 'acc_contract',
25
+ accounts: [{ id: 'acc_contract', role: 'admin', products: ['boostscore', 'boostoutbound'], walletId: 'wal_contract' }],
26
+ },
27
+ /** The configuration an app would pass, minus its keys. */
28
+ config: { identityUrl: 'https://id.boost33.example', hubUrl: 'https://app.boost33.example' },
29
+ /**
30
+ * Identity's answer: the Wallet, three apps, one app not ready on Backdrop
31
+ * (hidden), and the person's pins in their order, one of them for the hidden
32
+ * app, which is dropped.
33
+ */
34
+ response: {
35
+ products: [
36
+ { slug: 'boostoutbound', name: 'Boost Outbound', url: 'https://outbound.boost33.example', live: true, entitled: true },
37
+ { slug: 'wallet', name: 'Wallet', url: 'https://wallet.boost33.example', live: true, entitled: true },
38
+ { slug: 'boostscore', name: 'Boost Score', url: 'https://score.boost33.example', live: true, entitled: true },
39
+ { slug: 'boostresults', name: 'Boost Results', url: 'https://results.boost33.example', live: true, entitled: false },
40
+ { slug: 'brokers', name: 'Brokers', url: 'https://brokers.boost33.example', live: true, entitled: true },
41
+ ],
42
+ pinnedApps: ['boostscore', 'brokers', 'boostoutbound'],
43
+ },
44
+ /** The rail, in order: what `backdropStandardRailKeys` must return for every app. */
45
+ railKeys: ['home', 'wallet', 'inbox', 'boostscore', 'boostoutbound', 'allApps', 'docs', 'settings'],
46
+ /** The words: the person's language, as the chrome data serves it. */
47
+ locale: 'fr-FR',
48
+ };
49
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iIAAiI;IACjI,MAAM,EAAE;QACN,KAAK,EAAE,8BAA8B;QACrC,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,cAAc;QACnB,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,OAAgB,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;KAChI;IACD,2DAA2D;IAC3D,MAAM,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,EAAE,6BAA6B,EAAE;IAC5F;;;;OAIG;IACH,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,kCAAkC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;YACtH,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,gCAAgC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrG,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,+BAA+B,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC7G,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,iCAAiC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;YACpH,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,iCAAiC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;SACzG;QACD,UAAU,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,eAAe,CAAC;KACvD;IACD,qFAAqF;IACrF,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC;IACnG,sEAAsE;IACtE,MAAM,EAAE,OAAO;CACP,CAAA"}
package/dist/index.d.ts CHANGED
@@ -17,6 +17,8 @@ export type GetBackdropChromeDataDeps = {
17
17
  fetch?: typeof fetch;
18
18
  tokenSplit?: TokenSplitReader;
19
19
  };
20
+ export type { TokenSplitReader } from './tokens.js';
21
+ export { BACKDROP_NOT_READY, hiddenOnBackdrop, pinnedFrom, saveAppMenuFolded } from './products.js';
20
22
  /**
21
23
  * Everything the Backdrop chrome draws, from one call (B33-1726).
22
24
  *
@@ -28,9 +30,16 @@ export type GetBackdropChromeDataDeps = {
28
30
  *
29
31
  * - Identity's products unreachable: the last good list (`stale: true`), or
30
32
  * else null, which draws the rail's global items and no apps.
31
- * - Identity's profile unreachable: null, so the `name` claim stays.
33
+ * - Identity's profile unreachable, or no `identityKey`: null, so the `name` claim stays.
32
34
  * - The ledger unreachable or unclear: tokens `{ kind: 'unknown' }`.
33
35
  *
36
+ * Two credential modes, chosen by `config`. An app with service keys reads the
37
+ * profile with `identityKey` and the tokens with `ledger.key`. An app without
38
+ * them (one not in Identity's `APPS`) reads everything as the viewer, with the
39
+ * cookies it was given: the product list, and the tokens through
40
+ * `tokenSplitForViewer`; the profile read is skipped. Least privilege, and no
41
+ * new secret.
42
+ *
34
43
  * Server only: it reads service keys and must never reach a browser bundle.
35
44
  * It reads no secret of its own; every key comes in `config`, from the app's
36
45
  * server environment.
package/dist/index.js CHANGED
@@ -1,9 +1,12 @@
1
1
  import 'server-only';
2
2
  import { linksFrom } from './links.js';
3
3
  import { personFrom } from './person.js';
4
- import { readProducts } from './products.js';
4
+ import { readProductsAndSettings } from './products.js';
5
5
  import { readProfileName } from './profile.js';
6
6
  import { ledgerReader, readTokens } from './tokens.js';
7
+ // 0.2.0: the one rail. The pin rule and the hidden-app rule, shared with the
8
+ // Hub so it and every app draw the same rail.
9
+ export { BACKDROP_NOT_READY, hiddenOnBackdrop, pinnedFrom, saveAppMenuFolded } from './products.js';
7
10
  /**
8
11
  * Everything the Backdrop chrome draws, from one call (B33-1726).
9
12
  *
@@ -15,21 +18,32 @@ import { ledgerReader, readTokens } from './tokens.js';
15
18
  *
16
19
  * - Identity's products unreachable: the last good list (`stale: true`), or
17
20
  * else null, which draws the rail's global items and no apps.
18
- * - Identity's profile unreachable: null, so the `name` claim stays.
21
+ * - Identity's profile unreachable, or no `identityKey`: null, so the `name` claim stays.
19
22
  * - The ledger unreachable or unclear: tokens `{ kind: 'unknown' }`.
20
23
  *
24
+ * Two credential modes, chosen by `config`. An app with service keys reads the
25
+ * profile with `identityKey` and the tokens with `ledger.key`. An app without
26
+ * them (one not in Identity's `APPS`) reads everything as the viewer, with the
27
+ * cookies it was given: the product list, and the tokens through
28
+ * `tokenSplitForViewer`; the profile read is skipped. Least privilege, and no
29
+ * new secret.
30
+ *
21
31
  * Server only: it reads service keys and must never reach a browser bundle.
22
32
  * It reads no secret of its own; every key comes in `config`, from the app's
23
33
  * server environment.
24
34
  */
25
35
  export function getBackdropChromeData(input, deps = {}) {
26
36
  const fetchImpl = deps.fetch ?? fetch;
37
+ // One read of Identity: the product list and the person's rail settings.
38
+ const read = readProductsAndSettings(input, fetchImpl);
27
39
  return {
28
40
  person: personFrom(input.claims),
29
41
  profileName: readProfileName({ sid: input.cookies.sid, config: input.config }, fetchImpl),
30
- products: readProducts(input, fetchImpl),
31
- tokens: readTokens(input.claims, deps.tokenSplit ?? ledgerReader(input.config)),
42
+ products: read.then((result) => result.products),
43
+ appMenuFolded: read.then((result) => result.appMenuFolded),
44
+ tokens: readTokens(input.claims, input.cookies.ctx, deps.tokenSplit ?? ledgerReader(input.config)),
32
45
  links: linksFrom(input.config),
46
+ locale: input.claims.locale ?? null,
33
47
  };
34
48
  }
35
49
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAyB,MAAM,aAAa,CAAA;AA4B7E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAiC,EACjC,OAAkC,EAAE;IAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,KAAK,CAAA;IACrC,OAAO;QACL,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;QAChC,WAAW,EAAE,eAAe,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC;QACzF,QAAQ,EAAE,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC;QACxC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC/E,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;KAC/B,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAyB,MAAM,aAAa,CAAA;AA8B7E,6EAA6E;AAC7E,8CAA8C;AAC9C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAiC,EACjC,OAAkC,EAAE;IAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,KAAK,CAAA;IACrC,yEAAyE;IACzE,MAAM,IAAI,GAAG,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACtD,OAAO;QACL,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;QAChC,WAAW,EAAE,eAAe,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC;QACzF,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChD,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;QAC1D,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAClG,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI;KACpC,CAAA;AACH,CAAC"}
package/dist/links.js CHANGED
@@ -24,6 +24,7 @@ export function linksFrom(config) {
24
24
  signOut: `${identity}/signout`,
25
25
  docs: config.docsUrl ?? DEFAULT_DOCS_URL,
26
26
  support: `mailto:${config.supportEmail ?? DEFAULT_SUPPORT_EMAIL}`,
27
+ inbox: `${hub}/inbox`,
27
28
  };
28
29
  }
29
30
  //# sourceMappingURL=links.js.map
package/dist/links.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"links.js","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAA;AAC1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAA;AAE1D,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,MAAoB;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;IAC3C,OAAO;QACL,IAAI,EAAE,GAAG,GAAG,GAAG;QACf,QAAQ,EAAE,GAAG,GAAG,WAAW;QAC3B,OAAO,EAAE,GAAG,GAAG,mBAAmB;QAClC,OAAO,EAAE,GAAG,GAAG,uBAAuB;QACtC,IAAI,EAAE,GAAG,GAAG,oBAAoB;QAChC,OAAO,EAAE,GAAG,GAAG,uBAAuB;QACtC,aAAa,EAAE,GAAG,GAAG,yBAAyB;QAC9C,QAAQ,EAAE,GAAG,QAAQ,mBAAmB;QACxC,aAAa,EAAE,GAAG,QAAQ,iBAAiB;QAC3C,OAAO,EAAE,GAAG,QAAQ,UAAU;QAC9B,IAAI,EAAE,MAAM,CAAC,OAAO,IAAI,gBAAgB;QACxC,OAAO,EAAE,UAAU,MAAM,CAAC,YAAY,IAAI,qBAAqB,EAAE;KAClE,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"links.js","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAA;AAC1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAA;AAE1D,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,MAAoB;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;IAC3C,OAAO;QACL,IAAI,EAAE,GAAG,GAAG,GAAG;QACf,QAAQ,EAAE,GAAG,GAAG,WAAW;QAC3B,OAAO,EAAE,GAAG,GAAG,mBAAmB;QAClC,OAAO,EAAE,GAAG,GAAG,uBAAuB;QACtC,IAAI,EAAE,GAAG,GAAG,oBAAoB;QAChC,OAAO,EAAE,GAAG,GAAG,uBAAuB;QACtC,aAAa,EAAE,GAAG,GAAG,yBAAyB;QAC9C,QAAQ,EAAE,GAAG,QAAQ,mBAAmB;QACxC,aAAa,EAAE,GAAG,QAAQ,iBAAiB;QAC3C,OAAO,EAAE,GAAG,QAAQ,UAAU;QAC9B,IAAI,EAAE,MAAM,CAAC,OAAO,IAAI,gBAAgB;QACxC,OAAO,EAAE,UAAU,MAAM,CAAC,YAAY,IAAI,qBAAqB,EAAE;QACjE,KAAK,EAAE,GAAG,GAAG,QAAQ;KACtB,CAAA;AACH,CAAC"}
@@ -1,5 +1,35 @@
1
1
  import type { ChromeClaims, ChromeConfig, ChromeProducts } from './types.js';
2
2
  export declare const READ_TIMEOUT_MS = 5000;
3
+ /**
4
+ * ── Apps whose own Backdrop is not ready, hidden from Backdrop viewers ──────
5
+ *
6
+ * Jamal, 16 Nov 2026, when Backdrop went customer-wide: a person on Backdrop
7
+ * should not be able to open an app that has not moved yet ("users can't even
8
+ * go into them"). It was the Hub's own list (boost33-hub
9
+ * src/app/backdrop/app-cards.ts, `BACKDROP_NOT_READY`) and moved here in 0.2.0,
10
+ * so every app hides the same apps (Jamal, 18 Nov 2026: one rule, the same in
11
+ * every app).
12
+ *
13
+ * A record of work in flight, not a feature: each slug comes off the day that
14
+ * app's `*_BACKDROP_READY` flips, and the list then goes, with this filter.
15
+ * It removes the door from the chrome, nothing more: the app still answers on
16
+ * its own origin, so a bookmark or a payment return still reaches it. Identity
17
+ * serving each product's readiness would make this list unnecessary.
18
+ */
19
+ export declare const BACKDROP_NOT_READY: readonly string[];
20
+ /** The one hidden-app rule: drawn nowhere in the Backdrop chrome. */
21
+ export declare function hiddenOnBackdrop(slug: string): boolean;
22
+ /**
23
+ * The rail's apps from the person's saved pins, the Hub's `splitByPin` rule
24
+ * moved here so every app draws the same rail (0.2.0):
25
+ *
26
+ * - `null` (never chosen, or no pins could be read): the first four of `slugs`;
27
+ * - `[]` (chose none): none;
28
+ * - a list: that list, in its order, kept to slugs in `slugs` (a pin survives a
29
+ * lapsed grant in Identity, so it may name an app this list no longer has),
30
+ * each once, at most four.
31
+ */
32
+ export declare function pinnedFrom(slugs: readonly string[], saved: readonly string[] | null): string[];
3
33
  /** For tests: forget every cached list. */
4
34
  export declare function forgetProducts(): void;
5
35
  /**
@@ -15,3 +45,34 @@ export declare function readProducts(input: {
15
45
  };
16
46
  config: ChromeConfig;
17
47
  }, fetchImpl: typeof fetch): Promise<ChromeProducts | null>;
48
+ /**
49
+ * The product list and the person's two rail settings, from one read of
50
+ * Identity's `GET /api/v1/products` (0.2.0). The settings are the person's
51
+ * own, so they are read live and never cached: on a fallback both are their
52
+ * defaults (pins null, the fold null), never anyone's last read.
53
+ */
54
+ export declare function readProductsAndSettings(input: {
55
+ claims: ChromeClaims;
56
+ cookies: {
57
+ sid: string;
58
+ ctx: string | null;
59
+ };
60
+ config: ChromeConfig;
61
+ }, fetchImpl: typeof fetch): Promise<{
62
+ products: ChromeProducts | null;
63
+ appMenuFolded: boolean | null;
64
+ }>;
65
+ /**
66
+ * Saves the person's app-menu fold to Identity (`POST /api/v1/profile/app-menu`,
67
+ * idempotent), as the viewer: their own `b33_sid`, no key. For the app's server
68
+ * action behind the chrome's `onAppMenuFoldedChange`. True when Identity took
69
+ * it. Never throws: a failed save leaves the menu as the person left it.
70
+ */
71
+ export declare function saveAppMenuFolded(input: {
72
+ cookies: {
73
+ sid: string;
74
+ ctx: string | null;
75
+ };
76
+ config: Pick<ChromeConfig, 'identityUrl'>;
77
+ folded: boolean | null;
78
+ }, fetchImpl?: typeof fetch): Promise<boolean>;
package/dist/products.js CHANGED
@@ -4,8 +4,65 @@ const WALLET_SLUG = 'wallet';
4
4
  const PINNED = 4;
5
5
  export const READ_TIMEOUT_MS = 5_000;
6
6
  /**
7
- * The last list that read cleanly, per Identity origin, without `entitled`:
8
- * that half is per person and is rebuilt from the claims on a fallback.
7
+ * ── Apps whose own Backdrop is not ready, hidden from Backdrop viewers ──────
8
+ *
9
+ * Jamal, 16 Nov 2026, when Backdrop went customer-wide: a person on Backdrop
10
+ * should not be able to open an app that has not moved yet ("users can't even
11
+ * go into them"). It was the Hub's own list (boost33-hub
12
+ * src/app/backdrop/app-cards.ts, `BACKDROP_NOT_READY`) and moved here in 0.2.0,
13
+ * so every app hides the same apps (Jamal, 18 Nov 2026: one rule, the same in
14
+ * every app).
15
+ *
16
+ * A record of work in flight, not a feature: each slug comes off the day that
17
+ * app's `*_BACKDROP_READY` flips, and the list then goes, with this filter.
18
+ * It removes the door from the chrome, nothing more: the app still answers on
19
+ * its own origin, so a bookmark or a payment return still reaches it. Identity
20
+ * serving each product's readiness would make this list unnecessary.
21
+ */
22
+ export const BACKDROP_NOT_READY = ['boostvoice', 'brokers'];
23
+ /** The one hidden-app rule: drawn nowhere in the Backdrop chrome. */
24
+ export function hiddenOnBackdrop(slug) {
25
+ return BACKDROP_NOT_READY.includes(slug);
26
+ }
27
+ /**
28
+ * The rail's apps from the person's saved pins, the Hub's `splitByPin` rule
29
+ * moved here so every app draws the same rail (0.2.0):
30
+ *
31
+ * - `null` (never chosen, or no pins could be read): the first four of `slugs`;
32
+ * - `[]` (chose none): none;
33
+ * - a list: that list, in its order, kept to slugs in `slugs` (a pin survives a
34
+ * lapsed grant in Identity, so it may name an app this list no longer has),
35
+ * each once, at most four.
36
+ */
37
+ export function pinnedFrom(slugs, saved) {
38
+ if (saved === null)
39
+ return slugs.slice(0, PINNED);
40
+ const known = new Set(slugs);
41
+ const out = [];
42
+ for (const slug of saved) {
43
+ if (out.length === PINNED)
44
+ break;
45
+ if (known.has(slug) && !out.includes(slug))
46
+ out.push(slug);
47
+ }
48
+ return out;
49
+ }
50
+ /**
51
+ * Whose list a cached copy is. Identity filters the registry by audience: a
52
+ * Boost33 team member's list carries staff-only products (Boost Pipe) that a
53
+ * client's must not, not even as "soon". So a fallback may serve only a list
54
+ * read for the same audience (found by score-jmini and hub-jmini, 16 Nov 2026).
55
+ * Team, as Identity decides it: the staff flag, or a Boost33 address.
56
+ */
57
+ function audienceOf(claims) {
58
+ return claims.staff === true || /@boost33\.(com|network)$/i.test(claims.email) ? 'team' : 'clients';
59
+ }
60
+ /**
61
+ * The last list that read cleanly, per Identity origin and audience, without
62
+ * `entitled`: that half is per person and is rebuilt from the claims on a
63
+ * fallback. **Never the person's pins**: this map outlives the request and is
64
+ * shared by everyone this server process serves, so a fallback draws the
65
+ * default rail rather than somebody else's (identity-jmini, 18 Nov 2026).
9
66
  * Module scope, so it lives as long as the server process, as the Hub's does.
10
67
  */
11
68
  const lastGood = new Map();
@@ -13,6 +70,23 @@ const lastGood = new Map();
13
70
  export function forgetProducts() {
14
71
  lastGood.clear();
15
72
  }
73
+ /**
74
+ * The person's saved pins from the same response (Identity, 18 Nov 2026):
75
+ * `null` never chose, `[]` chose none, a list in rail order. Anything else,
76
+ * including an Identity that does not send the key yet, reads as null, the
77
+ * default rail.
78
+ */
79
+ function parsePins(body) {
80
+ const pins = body && typeof body === 'object' ? body.pinnedApps : undefined;
81
+ if (!Array.isArray(pins) || !pins.every((slug) => typeof slug === 'string'))
82
+ return null;
83
+ return pins;
84
+ }
85
+ /** The person's saved app-menu fold, from the same response: true folded, false open, null never chose. Anything else is null. */
86
+ function parseFold(body) {
87
+ const folded = body && typeof body === 'object' ? body.appMenuFolded : undefined;
88
+ return typeof folded === 'boolean' ? folded : null;
89
+ }
16
90
  function parseRegistry(body) {
17
91
  if (!body || typeof body !== 'object')
18
92
  return null;
@@ -41,15 +115,15 @@ function stateOf(entry, hasAccount, supportEmail) {
41
115
  return { state: 'open', href: entry.url };
42
116
  }
43
117
  const shortNameOf = (name) => name.replace(/^Boost\s+/i, '') || name;
44
- function shape(entries, hasAccount, supportEmail, stale) {
118
+ function shape(entries, pins, hasAccount, supportEmail, stale) {
45
119
  const wallet = entries.find((entry) => entry.slug === WALLET_SLUG);
46
120
  const walletHref = wallet?.live ? wallet.url : null;
47
121
  const all = entries
48
- .filter((entry) => entry.slug !== WALLET_SLUG)
122
+ .filter((entry) => entry.slug !== WALLET_SLUG && !hiddenOnBackdrop(entry.slug))
49
123
  .map((entry) => ({ slug: entry.slug, name: entry.name, shortName: shortNameOf(entry.name), ...stateOf(entry, hasAccount, supportEmail) }));
50
124
  return {
51
125
  all,
52
- pinned: all.slice(0, PINNED).map((product) => product.slug),
126
+ pinned: pinnedFrom(all.map((product) => product.slug), pins),
53
127
  walletHref,
54
128
  buyTokensHref: walletHref ? `${walletHref.replace(/\/+$/, '')}/subscribe` : null,
55
129
  stale,
@@ -61,16 +135,30 @@ function shape(entries, hasAccount, supportEmail, stale) {
61
135
  * the viewer, B33-1725). Five seconds, then the last good list, then null.
62
136
  */
63
137
  export async function readProducts(input, fetchImpl) {
138
+ return (await readProductsAndSettings(input, fetchImpl)).products;
139
+ }
140
+ /**
141
+ * The product list and the person's two rail settings, from one read of
142
+ * Identity's `GET /api/v1/products` (0.2.0). The settings are the person's
143
+ * own, so they are read live and never cached: on a fallback both are their
144
+ * defaults (pins null, the fold null), never anyone's last read.
145
+ */
146
+ export async function readProductsAndSettings(input, fetchImpl) {
64
147
  const identity = input.config.identityUrl.replace(/\/+$/, '');
65
148
  const supportEmail = input.config.supportEmail ?? DEFAULT_SUPPORT_EMAIL;
66
149
  const account = actingAccount(input.claims);
67
150
  const hasAccount = account !== undefined;
151
+ const cacheKey = `${identity}|${audienceOf(input.claims)}`;
152
+ // The pins and the fold are never taken from a cache: a fallback draws the defaults.
68
153
  const fallback = () => {
69
- const cached = lastGood.get(identity);
154
+ const cached = lastGood.get(cacheKey);
70
155
  if (!cached)
71
- return null;
156
+ return { products: null, appMenuFolded: null };
72
157
  const entitled = (slug) => slug === WALLET_SLUG ? hasAccount : hasAccount && (account?.products ?? []).includes(slug);
73
- return shape(cached.map((entry) => ({ ...entry, entitled: entitled(entry.slug) })), hasAccount, supportEmail, true);
158
+ return {
159
+ products: shape(cached.map((entry) => ({ ...entry, entitled: entitled(entry.slug) })), null, hasAccount, supportEmail, true),
160
+ appMenuFolded: null,
161
+ };
74
162
  };
75
163
  try {
76
164
  const cookie = [`b33_sid=${input.cookies.sid}`, input.cookies.ctx ? `b33_ctx=${input.cookies.ctx}` : null]
@@ -83,14 +171,36 @@ export async function readProducts(input, fetchImpl) {
83
171
  });
84
172
  if (!res.ok)
85
173
  return fallback();
86
- const entries = parseRegistry(await res.json().catch(() => null));
174
+ const body = await res.json().catch(() => null);
175
+ const entries = parseRegistry(body);
87
176
  if (!entries)
88
177
  return fallback();
89
- lastGood.set(identity, entries.map(({ slug, name, url, live }) => ({ slug, name, url, live })));
90
- return shape(entries, hasAccount, supportEmail, false);
178
+ lastGood.set(cacheKey, entries.map(({ slug, name, url, live }) => ({ slug, name, url, live })));
179
+ return { products: shape(entries, parsePins(body), hasAccount, supportEmail, false), appMenuFolded: parseFold(body) };
91
180
  }
92
181
  catch {
93
182
  return fallback();
94
183
  }
95
184
  }
185
+ /**
186
+ * Saves the person's app-menu fold to Identity (`POST /api/v1/profile/app-menu`,
187
+ * idempotent), as the viewer: their own `b33_sid`, no key. For the app's server
188
+ * action behind the chrome's `onAppMenuFoldedChange`. True when Identity took
189
+ * it. Never throws: a failed save leaves the menu as the person left it.
190
+ */
191
+ export async function saveAppMenuFolded(input, fetchImpl = fetch) {
192
+ try {
193
+ const res = await fetchImpl(`${input.config.identityUrl.replace(/\/+$/, '')}/api/v1/profile/app-menu`, {
194
+ method: 'POST',
195
+ headers: { cookie: `b33_sid=${input.cookies.sid}`, 'content-type': 'application/json' },
196
+ body: JSON.stringify({ appMenuFolded: input.folded }),
197
+ cache: 'no-store',
198
+ signal: AbortSignal.timeout(READ_TIMEOUT_MS),
199
+ });
200
+ return res.ok;
201
+ }
202
+ catch {
203
+ return false;
204
+ }
205
+ }
96
206
  //# sourceMappingURL=products.js.map