@certrev/cert-block 1.2.1-canary.0 → 1.3.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 +72 -0
- package/README.md +12 -1
- package/dist/builder/cert-review-card.d.ts.map +1 -1
- package/dist/builder/cert-review-card.js +68 -3
- package/dist/builder/cert-review-card.js.map +1 -1
- package/dist/builder/delivered-face.d.ts +74 -0
- package/dist/builder/delivered-face.d.ts.map +1 -0
- package/dist/builder/delivered-face.js +122 -0
- package/dist/builder/delivered-face.js.map +1 -0
- package/dist/builder/delivery-runtime.d.ts +1 -1
- package/dist/builder/delivery-runtime.d.ts.map +1 -1
- package/dist/builder/delivery-runtime.js +3 -1
- package/dist/builder/delivery-runtime.js.map +1 -1
- package/dist/builder/index.d.ts +4 -1
- package/dist/builder/index.d.ts.map +1 -1
- package/dist/builder/index.js +4 -1
- package/dist/builder/index.js.map +1 -1
- package/dist/builder/ssr-seed.d.ts +13 -1
- package/dist/builder/ssr-seed.d.ts.map +1 -1
- package/dist/builder/ssr-seed.js +14 -2
- package/dist/builder/ssr-seed.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/verify/get-verified-delivery.d.ts +28 -0
- package/dist/verify/get-verified-delivery.d.ts.map +1 -1
- package/dist/verify/get-verified-delivery.js +29 -3
- package/dist/verify/get-verified-delivery.js.map +1 -1
- package/package.json +112 -112
- package/src/builder/cert-review-card.tsx +96 -4
- package/src/builder/delivered-face.ts +142 -0
- package/src/builder/delivery-runtime.ts +3 -1
- package/src/builder/index.tsx +4 -1
- package/src/builder/ssr-seed.ts +25 -2
- package/src/index.ts +3 -0
- package/src/verify/get-verified-delivery.ts +45 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,78 @@ change the rendered cert output and never break a compiling integration** (regis
|
|
|
5
5
|
exports, types). Anything that would alter what a visitor sees, or require integration changes,
|
|
6
6
|
is announced loudly here first.
|
|
7
7
|
|
|
8
|
+
## 1.3.0 · 2026-10-18
|
|
9
|
+
|
|
10
|
+
Minor: **a `delivery` card can paint the face CertREV rendered for the brand's design, when the signed envelope binds
|
|
11
|
+
it.** Backward compatible: **with no delivered face, or an envelope without `faceDigest`, the card renders exactly what
|
|
12
|
+
1.2.1 renders, byte for byte** (the server's HTML and its seed, hydration, a streamed record, a fallback record, a
|
|
13
|
+
`clientRead` read). A block without the marker and a pinned card are untouched, and no integration needs a code
|
|
14
|
+
change. Like 1.1.0's marker, the new face is switched on from CertREV's side, never by the upgrade: it takes an
|
|
15
|
+
envelope minted with a `faceDigest` (`@certrev/cert-contract` 0.6.0) AND a Delivery response serving the face it hashes.
|
|
16
|
+
|
|
17
|
+
- **A delivered face, bound by a signed digest.** The Builder Delivery response may carry an unsigned top-level
|
|
18
|
+
`face: { html, css }` beside `payload`, `signature` and `renderDef`. The signature does not cover it; the signed
|
|
19
|
+
`payload.content.faceDigest` (`{ v: 1, defVersion, html, css }`, the lowercase hex sha256 of each half's UTF-8
|
|
20
|
+
bytes for one saved design version) binds it. The card paints the delivered face only when ALL of these hold: the
|
|
21
|
+
verdict is `render`; the card is not pinned; the block shows the whole card (below); the verified content carries a
|
|
22
|
+
`faceDigest` with `v: 1`; a well-formed face was served; a `renderDef` was served and its `v` is
|
|
23
|
+
`faceDigest.defVersion`; and sha256(html) and sha256(css), computed with WebCrypto (`crypto.subtle.digest`, the
|
|
24
|
+
global the kernel already verifies with), equal the signed values. It then paints `<style>` + css + `</style>` +
|
|
25
|
+
html inside the card's usual wrapper, which keeps `data-certrev-cert-chrome`, `data-certrev-delivery`,
|
|
26
|
+
`data-certrev-strings-version`, `data-certrev-def-version` and the seed, and gains
|
|
27
|
+
`data-certrev-face="delivered"`. It paints in place of the legacy or reader face, with no reader stylesheet and no
|
|
28
|
+
sidebar flow rules.
|
|
29
|
+
- **A split banner keeps its own halves.** The delivered face is a whole design, so only a block whose `part` is
|
|
30
|
+
absent or `'full'` (or null, or a value `renderCertBlock` does not recognise, which it paints as the full card)
|
|
31
|
+
paints it. A block with `part: 'header'` or `part: 'memo'` paints its own part as 1.2.1 does, and hashes nothing.
|
|
32
|
+
The block's `mode` is not consulted: the delivered face carries the design's own layout.
|
|
33
|
+
- **The browser re-checks the face before it paints it.** A server that painted the delivered face ends the seed with
|
|
34
|
+
the same `face`: `{ v: 1, baseUrl, externalId, payload, signature?, renderDef, face }`. A seed without one is the
|
|
35
|
+
1.2.1 seed byte for byte. The browser repaints the face from the seed (hydration, a later client mount, a record
|
|
36
|
+
streamed in while the page loads) only after hashing it against the seed payload's own `faceDigest`, for the
|
|
37
|
+
seed's def; a `clientRead` read is judged as the server judges it. A seed with no `face`, a malformed one, or one
|
|
38
|
+
whose hashes fail paints what 1.2.1 paints for it. While a card hydrates over the server's delivered face and the
|
|
39
|
+
browser cannot confirm it (no WebCrypto, as on an insecure `http:` page), it adopts the server's element without
|
|
40
|
+
rendering that markup, and the render right after hydration replaces it with the face 1.2.1 paints, with no
|
|
41
|
+
hydration error. A card hydrating a delivered face suspends once while WebCrypto hashes it, and keeps the server's
|
|
42
|
+
HTML on screen meanwhile; the hashes are memoized by the face's content, so one face is hashed once per process.
|
|
43
|
+
- **Page weight.** The face is on the page twice: painted, and in the seed, where JSON and attribute escaping add
|
|
44
|
+
between a few percent and about 60% (more for quote- and markup-dense HTML). A face the size of the 1.2.1 reader
|
|
45
|
+
card (about 43 KB with its stylesheet) adds about 46 KB to the seed, uncompressed. The delivered face replaces the
|
|
46
|
+
card's own face, so the painted half costs about what the reader face did.
|
|
47
|
+
- **Fails closed as before.** A digest rewritten in transit fails the signature, so the card renders nothing and
|
|
48
|
+
writes a `"none"` record, as for any tampering. Markup whose bytes do not hash to the signed digest is never
|
|
49
|
+
painted, and a WebCrypto failure counts as a mismatch.
|
|
50
|
+
- **New API, all additive.** Root: `parseDeliveredFace` (the face sibling's shape check, as `parseRenderDef` is the
|
|
51
|
+
def's), the `DeliveredFace` type and the `CertFaceDigest` contract type. `VerifiedDelivery` and `CachedDelivery`
|
|
52
|
+
gain an optional `face`, present only on a `render` verdict whose response carried a well-formed face, so a read
|
|
53
|
+
with no face is the 1.2.1 object exactly. **`face` is carried unverified:** a `getVerifiedDelivery` caller that
|
|
54
|
+
paints it must check it against the digest first, as the card does.
|
|
55
|
+
- **Dependency.** `@certrev/cert-contract` is now `^0.6.0` (was `^0.5.0`), for `CertFaceDigest`. The `^0.5.0` range
|
|
56
|
+
did not match the workspace's 0.6.0, so `pnpm -r build` on a cold tree built cert-block before cert-contract and
|
|
57
|
+
failed; it now builds in order.
|
|
58
|
+
- **Unchanged:** every face 1.2.1 paints, the seed and fallback records without a face, the stale window and the
|
|
59
|
+
deadline, the pinned card, the options path (no marker), the registration and inputs, the web component, and the
|
|
60
|
+
storefront modal bundle (`src/modal/*` and `dist/modal/certrev-cert.js`: nothing it bundles changed).
|
|
61
|
+
- **Tests.** `builder/__tests__/delivered-face.test.tsx` (server) and `delivered-face-client.test.tsx` (jsdom):
|
|
62
|
+
the delivered face on the server for the legacy, the legacy-without-hidden-fields and the reader defs (exact bytes,
|
|
63
|
+
the seed the 1.2.1 seed plus the face); every other case of the matrix (17 failing deliveries per def, the two
|
|
64
|
+
split-banner parts, the pinned card, a tombstone) against `__golden__/delivered-face-1.2.1.json`, rendered by the
|
|
65
|
+
unmodified 1.2.1 card; the browser's hydration (same node, no read, no error), client mount, streamed record and
|
|
66
|
+
`clientRead` with a face, and with a face the browser cannot confirm, against `__golden__/delivered-face-client-1.2.1.json`;
|
|
67
|
+
1.2.1's server HTML hydrating as served; tampering; and the seed's `face` parse and write. `delivered-face-use.test.tsx`
|
|
68
|
+
pins the one promise per face a React 19 `use` replays. `get-verified-delivery.test.ts` gains the face sibling's
|
|
69
|
+
parse, cache and settle. No existing expectation changed.
|
|
70
|
+
|
|
71
|
+
## 1.2.1 · 2026-10-09
|
|
72
|
+
|
|
73
|
+
Patch, stable (dist-tag `latest`): **1.2.1-canary.0, below, as a stable release.** A card the browser renders while
|
|
74
|
+
the page is still loading waits for the record a streaming server sends after it, so a phone's first load of a
|
|
75
|
+
streamed page keeps its card. The source is the canary's, byte for byte; only the version stamps change. No
|
|
76
|
+
integration change, and the rendered cert output is unchanged: a card that hydrates, a `clientRead` card and a card
|
|
77
|
+
mounted after the page has loaded paint exactly as in 1.2.0. The profile and certificate modals for the Builder card
|
|
78
|
+
are not in this release.
|
|
79
|
+
|
|
8
80
|
## 1.2.1-canary.0 · 2026-10-07
|
|
9
81
|
|
|
10
82
|
Patch, canary tag only: **a card the browser renders while the page is still loading waits for the record a
|
package/README.md
CHANGED
|
@@ -419,6 +419,16 @@ browser hydrates from it:
|
|
|
419
419
|
`connect-src` for the Delivery origin; where it is blocked or fails, the card **renders nothing and logs
|
|
420
420
|
nothing**, never a broken card and never the host's tree unmounted. It is not a Builder input: a brand that wants
|
|
421
421
|
it sets it in code, on a wrapper of the registered component.
|
|
422
|
+
- **The delivered face (1.3.0).** The Delivery API may serve, beside the envelope, a face it rendered for the
|
|
423
|
+
brand's design: an unsigned `face: { html, css }`. The envelope's signed `content.faceDigest`
|
|
424
|
+
(`@certrev/cert-contract` 0.6.0) holds the sha256 of each half's UTF-8 bytes and the def version they were
|
|
425
|
+
rendered for. The card paints that face (`<style>` + css + `</style>` + html, in its usual wrapper, marked
|
|
426
|
+
`data-certrev-face="delivered"`) only for an unpinned block that shows the whole card (not a split banner's
|
|
427
|
+
`part: 'header'` or `'memo'`), when the def served is that version and both hashes, computed with WebCrypto,
|
|
428
|
+
equal the signed values. The seed then ends with the same `face`, and the browser hashes it again against the
|
|
429
|
+
seed payload's digest before it paints it; with no WebCrypto (an insecure `http:` page) or bytes that do not
|
|
430
|
+
hash, the card paints what 1.2.1 paints. Every other delivery paints exactly what 1.2.1 paints, seed included.
|
|
431
|
+
The face is on the page twice (painted, and in the seed).
|
|
422
432
|
- **The server's read** waits up to 8 s (the verifier's own default stays 3 s). Its cache keeps a certificate for
|
|
423
433
|
60 s, then serves it for up to 5 minutes more while one background refresh runs or while CertREV cannot be
|
|
424
434
|
reached; a refusal (revoked, expired) lands as soon as its refresh does. A cold placement waits once; a warm one
|
|
@@ -850,6 +860,7 @@ alongside each modal module. The load-bearing ones:
|
|
|
850
860
|
- **`__tests__/webcomponent.test.tsx`**: the shared `renderBadgeHtml` string renderer (hand-escaping, unsafe-URL/color dropping, compact style) and the `<certrev-badge>` custom element (idempotent registration, SSR light-DOM preservation, client-mode fail-closed without a resolver).
|
|
851
861
|
- **`builder/__tests__/builder.test.tsx`** covers the PUSH card and its registration: the wire-type ⇄ inputs parity lock, the fused-credential gate, and the mistyped-option degradation.
|
|
852
862
|
- **`builder/__tests__/delivery-card-hydrate.test.tsx`** + **`builder/__tests__/ssr-seed.test.tsx`** (1.2.0): a server-rendered delivery card hydrates on both faces with zero browser reads, no mismatch and the same nodes; its seed is the served envelope and still verifies; revoked and browser-clock-expired cards come down; a later client mount reuses the page's seed; the server's options and none records are kept through hydration and through React's client re-render after a hydration error, with no read; a client mount with no record makes no read and paints the options face or nothing, and only with `clientRead` reads once, or renders nothing and logs nothing when the read is refused; a reviewer photo that fails to load repaints as initials; the seed and fallback-record parsers refuse malformed records and each other's; the design pin is part of the seed's key; a hidden `reviewerPhoto` or `memo`, or `display.showExpertPhoto: false` (the photo URLs), is absent from the whole server HTML and the seed carries no signature; every server render in these files runs under jsdom with no server switch; and the card's inlined reader stylesheet names no font URL. **`builder/__tests__/delivery-card.test.tsx`** pins the unreachable cases to the 1.0.3 options face byte for byte, and the 8 s deadline and the stale window; **`verify/__tests__/cache.test.ts`** the cache's stale-while-revalidate, stale-if-error and in-flight limit. **`reader/__tests__/reader-initials.test.ts`** pins the initials bytes (honorifics, escaping, hidden and missing photos, `showExpertPhoto`, the empty name).
|
|
863
|
+
- **`builder/__tests__/delivered-face.test.tsx`** + **`builder/__tests__/delivered-face-client.test.tsx`** + **`builder/__tests__/delivered-face-use.test.tsx`** (1.3.0): the delivered face paints, server and browser (hydration, a client mount over the page's record, a streamed record, `clientRead`), only when its hashes match the signed digest for the def served, on an unpinned whole-card block; every other delivery, and a browser that cannot hash, renders what the unmodified 1.2.1 card rendered for the same input, byte for byte, seed included (`__golden__/delivered-face-1.2.1.json`, `__golden__/delivered-face-client-1.2.1.json`); a tampered digest suppresses.
|
|
853
864
|
- **`builder/__tests__/streamed-record-card.test.tsx`** (1.2.1): a card the client renders while the page loads paints nothing, then the record the stream adds, to the document (#421) or to the server's `<html>` after React replaced it (#423, with and without `MutationObserver`), and what a client mount paints once the page loads with none; pinned, options, none and expired records; no read; hydration, `clientRead` and a loaded page unchanged.
|
|
854
865
|
- **`modal/*.test.ts`**, per module: the modal element (tombstone → `markSuppressed`), the dialog view, interactions, placement, badge revalidation, and the Delivery-API verify client. `modal/own-face-modal.test.ts` puts two faces on one page and proves each control opens its own face's modal; `modal/closed-container-face.test.ts` proves a face that loads inside a closed `<details>`, tab or accordion is left alone and renders when opened (there is no runtime disclosure guard).
|
|
855
866
|
- **`__tests__/readme-version.test.ts`** + **`__tests__/readme-contract.test.ts`** pin the claims in this file that rot silently: the version stamp against `package.json`, the key id, the route-example heading, and every `exports` subpath appearing under Public API.
|
|
@@ -859,7 +870,7 @@ published at `@certrev/cert-block/fixtures`).
|
|
|
859
870
|
|
|
860
871
|
## Version
|
|
861
872
|
|
|
862
|
-
`1.
|
|
873
|
+
`1.3.0`: see [CHANGELOG.md](./CHANGELOG.md) for the release history and the semver contract
|
|
863
874
|
(patch/minor never change the rendered cert output or break a compiling integration). Publishes
|
|
864
875
|
**publicly** to npm as `@certrev/cert-block` (`publishConfig.access: public`) via GitHub Actions
|
|
865
876
|
trusted publishing (OIDC); the internal `@certrev` GitHub-Packages channel mirrors it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cert-review-card.d.ts","sourceRoot":"","sources":["../../src/builder/cert-review-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;G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AE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB;;;;OAIG;IACH,yBAAyB,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAA;CACtD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,iCAOlC,CAAA"}
|
|
@@ -27,6 +27,7 @@ import { renderVerdict } from '../contract/kernel.js';
|
|
|
27
27
|
import { getVerifiedDelivery, parseDesignPin, readVerifiedDelivery, } from '../verify/get-verified-delivery.js';
|
|
28
28
|
import { CARD_READER_CSS } from './card-reader-css.js';
|
|
29
29
|
import { BUILDER_CERT_CHROME_KEYS } from './cert-chrome-data.js';
|
|
30
|
+
import { deliveredFaceDigest, deliveredFaceHtml, deliveredFaceMatches, faceHashesFor, showsWholeCard, } from './delivered-face.js';
|
|
30
31
|
import { cardDeliveryRuntime } from './delivery-runtime.js';
|
|
31
32
|
import { envelopeCardHtml, envelopeCardInput, isReaderFaceDef } from './envelope-face.js';
|
|
32
33
|
import { pageHoldsServerHtml, pageRecordFor, SEED_ATTRIBUTE, seedFor, serializeFallback, serializeSeed, streamedRecordFor, subscribeStreamedRecords, watchStreamedRecords, withoutPhotos, } from './ssr-seed.js';
|
|
@@ -111,11 +112,23 @@ function suspendOn(key, start) {
|
|
|
111
112
|
pending = start().finally(() => inflightReads.delete(key));
|
|
112
113
|
inflightReads.set(key, pending);
|
|
113
114
|
}
|
|
115
|
+
return suspendUntil(pending);
|
|
116
|
+
}
|
|
117
|
+
/** `use` where React has it (19), else the thrown promise (18). */
|
|
118
|
+
function suspendUntil(pending) {
|
|
114
119
|
const use = React.use;
|
|
115
120
|
if (typeof use === 'function')
|
|
116
121
|
return use(pending);
|
|
117
122
|
throw pending;
|
|
118
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* 1.3.0: a delivered face's two digests, suspending once while WebCrypto computes them (`faceHashesFor` memoizes them
|
|
126
|
+
* by the face's content, so every later render of the same face, server or browser, reads them at once).
|
|
127
|
+
*/
|
|
128
|
+
function suspendOnFaceHashes(face) {
|
|
129
|
+
const memo = faceHashesFor(face);
|
|
130
|
+
return memo.settled ? memo.settled.hashes : suspendUntil(memo.pending);
|
|
131
|
+
}
|
|
119
132
|
/**
|
|
120
133
|
* 1.2.0-canary.6: the reader sidebar card is a right float that the article's copy flows around, as it does on a
|
|
121
134
|
* WordPress or Shopify page. On a Builder page the card sits in its own block, a flex item of the flex column that holds
|
|
@@ -186,8 +199,12 @@ function EnvelopeFace(props) {
|
|
|
186
199
|
el.addEventListener('error', onError, true);
|
|
187
200
|
return () => el.removeEventListener('error', onError, true);
|
|
188
201
|
}, [onBrokenPhoto]);
|
|
189
|
-
return withSidebarFlow(props.reader, _jsx("div", { ref: ref, "data-certrev-cert-chrome": "", "data-certrev-delivery": "", "data-certrev-strings-version": CERT_STRINGS_VERSION, "data-certrev-def-version": props.defVersion, [SEED_ATTRIBUTE]: props.seed, ...(props.reader
|
|
190
|
-
|
|
202
|
+
return withSidebarFlow(props.reader, _jsx("div", { ref: ref, "data-certrev-cert-chrome": "", "data-certrev-delivery": "", "data-certrev-strings-version": CERT_STRINGS_VERSION, "data-certrev-def-version": props.defVersion, [SEED_ATTRIBUTE]: props.seed, ...(props.reader
|
|
203
|
+
? { 'data-certrev-face': 'reader', style: { display: 'flow-root' } }
|
|
204
|
+
: props.delivered
|
|
205
|
+
? { 'data-certrev-face': 'delivered' }
|
|
206
|
+
: {}),
|
|
207
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: renderCertBlock is the escaping-safe SSR string renderer; a delivered face paints only when its bytes hash to the signed faceDigest
|
|
191
208
|
dangerouslySetInnerHTML: { __html: props.html } }));
|
|
192
209
|
}
|
|
193
210
|
/** The reader face paints the author's avatar small (`.certrev-r-face.sm`); every other avatar is the expert's. */
|
|
@@ -223,6 +240,38 @@ function ReaderEnvelopeFace(props) {
|
|
|
223
240
|
// faces (card-reader-css.ts), so the card asks the page's CSP for nothing.
|
|
224
241
|
html: `<style data-certrev-reader-css>${CARD_READER_CSS}</style>${reader}`, defVersion: props.renderDef.v, seed: props.seed, onBrokenPhoto: onBrokenPhoto }));
|
|
225
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* 1.3.0: the delivered face this paint may use, or undefined (paint what 1.2.1 paints). Only for an unpinned card on a
|
|
245
|
+
* block that shows the whole card, a digest the verified content signs for the def's version, and a face whose UTF-8
|
|
246
|
+
* bytes hash to it (`delivered-face.ts`). Suspends once while WebCrypto hashes a face it has not seen.
|
|
247
|
+
*/
|
|
248
|
+
function deliveredFaceFor(payload, renderDef, face, props) {
|
|
249
|
+
if (!face || props.design || !showsWholeCard(props.part))
|
|
250
|
+
return undefined;
|
|
251
|
+
const digest = deliveredFaceDigest(payload.content, renderDef, face);
|
|
252
|
+
if (!digest)
|
|
253
|
+
return undefined;
|
|
254
|
+
return deliveredFaceMatches(suspendOnFaceHashes(face), digest) ? face : undefined;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* 1.3.0: the delivered face, in the card's own wrapper (the same attributes as any envelope face, and
|
|
258
|
+
* `data-certrev-face="delivered"`): the server's stylesheet, then its markup. `seed` is the record that names it.
|
|
259
|
+
*/
|
|
260
|
+
function DeliveredEnvelopeFace(props) {
|
|
261
|
+
return _jsx(EnvelopeFace, { delivered: true, html: deliveredFaceHtml(props.face), defVersion: props.defVersion, seed: props.seed });
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* 1.3.0: what a card hydrating a seed that names a delivered face renders when the browser's own check of that face
|
|
265
|
+
* fails (no WebCrypto: an insecure context; or bytes that do not hash to the seed's digest). The server painted the
|
|
266
|
+
* delivered face there, and the browser must not render that markup, so this adopts the server's element as it stands
|
|
267
|
+
* (no attribute or innerHTML compared: `suppressHydrationWarning`; no children hydrated: `dangerouslySetInnerHTML`)
|
|
268
|
+
* and paints nothing of its own. The render right after hydration (at the browser's clock) is another component, so
|
|
269
|
+
* React replaces this element with the face 1.2.1 paints for the seed.
|
|
270
|
+
*/
|
|
271
|
+
function ServerFaceUntilHydrated() {
|
|
272
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: an empty string; it only stops React hydrating the server's children
|
|
273
|
+
return _jsx("div", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: '' } });
|
|
274
|
+
}
|
|
226
275
|
/** Paint a verified payload with its def; null when the def and content give no face. */
|
|
227
276
|
function paintEnvelope(payload, renderDef, props, seed) {
|
|
228
277
|
if (!pinnedDefHolds(props.design, renderDef))
|
|
@@ -295,7 +344,17 @@ function paintRecord(record, props, context, judge) {
|
|
|
295
344
|
return null;
|
|
296
345
|
}
|
|
297
346
|
}
|
|
298
|
-
|
|
347
|
+
// 1.3.0: a seed that names a delivered face repaints it only after the browser hashes it against the seed
|
|
348
|
+
// payload's own digest; otherwise the seed paints what 1.2.1 paints for it.
|
|
349
|
+
const { seed } = record;
|
|
350
|
+
const delivered = deliveredFaceFor(seed.payload, seed.renderDef, seed.face, props);
|
|
351
|
+
if (delivered && seed.renderDef) {
|
|
352
|
+
return _jsx(DeliveredEnvelopeFace, { face: delivered, defVersion: seed.renderDef.v, seed: record.raw });
|
|
353
|
+
}
|
|
354
|
+
// Hydrating (not `judge`) over the delivered face the server painted, which the browser could not confirm.
|
|
355
|
+
if (seed.face && !judge)
|
|
356
|
+
return _jsx(ServerFaceUntilHydrated, {});
|
|
357
|
+
return paintEnvelope(seed.payload, seed.renderDef, props, record.raw);
|
|
299
358
|
}
|
|
300
359
|
const html = record.fallback.face === 'options' ? fallbackFace(props) : null;
|
|
301
360
|
return html === null ? (_jsx(NoFace, { record: record.raw })) : (_jsx(OptionsFace, { block: props.block, html: html, record: record.raw }));
|
|
@@ -433,6 +492,12 @@ function EnvelopeCertReviewCard(props) {
|
|
|
433
492
|
signature: settled.signature,
|
|
434
493
|
renderDef: settled.renderDef,
|
|
435
494
|
});
|
|
495
|
+
// 1.3.0: the server-rendered face the Delivery API served beside the envelope, when its bytes hash to the digest the
|
|
496
|
+
// verified payload signs; the seed then carries it, so the browser can repaint (and re-check) the same face.
|
|
497
|
+
const delivered = deliveredFaceFor(seed.payload, seed.renderDef, settled.face, props);
|
|
498
|
+
if (delivered && seed.renderDef) {
|
|
499
|
+
return (_jsx(DeliveredEnvelopeFace, { face: delivered, defVersion: seed.renderDef.v, seed: serializeSeed({ ...seed, face: delivered }) }));
|
|
500
|
+
}
|
|
436
501
|
return paintEnvelope(seed.payload, seed.renderDef, props, serializeSeed(seed));
|
|
437
502
|
}
|
|
438
503
|
export function CertReviewCard(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cert-review-card.js","sourceRoot":"","sources":["../../src/builder/cert-review-card.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAsB,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACxF,OAAO,EAAE,oBAAoB,EAA2B,MAAM,6BAA6B,CAAA;AAC3F,OAAO,EAAoB,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAEN,mBAAmB,EACnB,cAAc,EACd,oBAAoB,GAEpB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,EAGN,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,aAAa,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B,GAAiC;IACjE,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;IAC7C,yBAAyB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;CACnD,CAAA;AAqBD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC;IACtE,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,cAAc;IACzB,WAAW,EACV,4HAA4H;IAC7H,MAAM,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;IAC7C,yBAAyB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;CACnD,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
* The delivered face gate: when the Builder card may paint the server's markup (1.3.0)
|
|
4
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* The Delivery API may serve a server-rendered face (`face: { html, css }`) beside the signed artifact. That sibling
|
|
7
|
+
* is UNSIGNED. What binds it is the signed `payload.content.faceDigest` (cert-contract 0.6.0): the lowercase hex sha256
|
|
8
|
+
* of the markup's and the stylesheet's UTF-8 bytes, for one saved design version. The card paints the delivered face
|
|
9
|
+
* only when ALL of these hold:
|
|
10
|
+
*
|
|
11
|
+
* - the verdict is `render` (the caller has already checked that);
|
|
12
|
+
* - the card is not pinned (a design pin keeps 1.2.1's pinned face; the caller checks that);
|
|
13
|
+
* - the block shows the whole card: `part` is not `'header'` or `'memo'`, so a split banner never paints the face
|
|
14
|
+
* twice (`showsWholeCard`);
|
|
15
|
+
* - the verified content carries a digest it understands (`v: 1`, two 64-char lowercase hex digests, a numeric
|
|
16
|
+
* `defVersion`);
|
|
17
|
+
* - a well-formed face was served;
|
|
18
|
+
* - a def was served and its `v` IS the digest's `defVersion` (markup rendered for another design version is not
|
|
19
|
+
* this design);
|
|
20
|
+
* - sha256(html) and sha256(css) equal the signed values.
|
|
21
|
+
*
|
|
22
|
+
* In every other case the card paints exactly what 1.2.1 paints. Markup whose bytes do not hash to the signed digest
|
|
23
|
+
* is never painted, and a WebCrypto failure counts as a mismatch, never as a pass.
|
|
24
|
+
*
|
|
25
|
+
* Hashing uses WebCrypto (`crypto.subtle.digest`), the global the kernel verifies with, so it runs wherever the card
|
|
26
|
+
* already verifies (Node SSR, edge runtimes, a browser in a secure context). It is react-free; the card owns the
|
|
27
|
+
* suspension around the async digest.
|
|
28
|
+
*/
|
|
29
|
+
import type { CertContent, CertFaceDigest } from '../contract/kernel.js';
|
|
30
|
+
import type { DeliveredFace } from '../verify/get-verified-delivery.js';
|
|
31
|
+
import type { CertChromeRenderDef } from './cert-chrome-data.js';
|
|
32
|
+
/**
|
|
33
|
+
* Whether a block shows the whole card, by `renderCertBlock`'s own rule: only `'header'` and `'memo'` split the
|
|
34
|
+
* banner; absent, `'full'`, null or anything unrecognised is the full card. A split block keeps its own part even
|
|
35
|
+
* when a delivered face matches, because the delivered face is a whole design.
|
|
36
|
+
*/
|
|
37
|
+
export declare function showsWholeCard(part: unknown): boolean;
|
|
38
|
+
/** The signed digest, accepted only in the shape cert-contract 0.6.0 defines; anything else is null. */
|
|
39
|
+
export declare function acceptedFaceDigest(content: CertContent | null | undefined): CertFaceDigest | null;
|
|
40
|
+
/**
|
|
41
|
+
* The synchronous half of the gate: the digest to hash the face against, or null when the delivered face cannot
|
|
42
|
+
* paint whatever its bytes are (no digest, no face, no def, or a def of another version). The card hashes only when
|
|
43
|
+
* this is non-null, so a delivery without a face never suspends a second time.
|
|
44
|
+
*/
|
|
45
|
+
export declare function deliveredFaceDigest(content: CertContent | null | undefined, renderDef: CertChromeRenderDef | null, face: DeliveredFace | null | undefined): CertFaceDigest | null;
|
|
46
|
+
/** Lowercase hex sha256 of a string's UTF-8 bytes, via WebCrypto. */
|
|
47
|
+
export declare function sha256HexUtf8(text: string): Promise<string>;
|
|
48
|
+
/** The two digests of a delivered face. */
|
|
49
|
+
export interface DeliveredFaceHashes {
|
|
50
|
+
readonly html: string;
|
|
51
|
+
readonly css: string;
|
|
52
|
+
}
|
|
53
|
+
/** Hash both halves. Never rejects: a WebCrypto failure (none in an insecure context) is null, which never matches. */
|
|
54
|
+
export declare function hashDeliveredFace(face: DeliveredFace): Promise<DeliveredFaceHashes | null>;
|
|
55
|
+
/** The asynchronous half's verdict: both halves hash to the signed values. */
|
|
56
|
+
export declare function deliveredFaceMatches(hashes: DeliveredFaceHashes | null, digest: CertFaceDigest): boolean;
|
|
57
|
+
/** The markup the card paints for a matching face: the stylesheet first, then the face. */
|
|
58
|
+
export declare function deliveredFaceHtml(face: DeliveredFace): string;
|
|
59
|
+
/** One face's hashing: the pending digest, and its answer once settled. */
|
|
60
|
+
export interface FaceHashMemo {
|
|
61
|
+
readonly pending: Promise<DeliveredFaceHashes | null>;
|
|
62
|
+
settled?: {
|
|
63
|
+
readonly hashes: DeliveredFaceHashes | null;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The memoized hashing of one face, keyed by its CONTENT (both strings), not by the object: the browser parses a seed
|
|
68
|
+
* from the page afresh on each render, and a server's cached read and a seed of the same face share one entry. A
|
|
69
|
+
* failure settles to null and stays settled (a context with no WebCrypto does not gain one).
|
|
70
|
+
*/
|
|
71
|
+
export declare function faceHashesFor(face: DeliveredFace): FaceHashMemo;
|
|
72
|
+
/** Test seam: forget every face's hashes (a new process). */
|
|
73
|
+
export declare function forgetFaceHashesForTests(): void;
|
|
74
|
+
//# sourceMappingURL=delivered-face.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivered-face.d.ts","sourceRoot":"","sources":["../../src/builder/delivered-face.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MA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,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAA;CACzD;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CAgB/D;AAED,6DAA6D;AAC7D,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
* The delivered face gate: when the Builder card may paint the server's markup (1.3.0)
|
|
4
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* The Delivery API may serve a server-rendered face (`face: { html, css }`) beside the signed artifact. That sibling
|
|
7
|
+
* is UNSIGNED. What binds it is the signed `payload.content.faceDigest` (cert-contract 0.6.0): the lowercase hex sha256
|
|
8
|
+
* of the markup's and the stylesheet's UTF-8 bytes, for one saved design version. The card paints the delivered face
|
|
9
|
+
* only when ALL of these hold:
|
|
10
|
+
*
|
|
11
|
+
* - the verdict is `render` (the caller has already checked that);
|
|
12
|
+
* - the card is not pinned (a design pin keeps 1.2.1's pinned face; the caller checks that);
|
|
13
|
+
* - the block shows the whole card: `part` is not `'header'` or `'memo'`, so a split banner never paints the face
|
|
14
|
+
* twice (`showsWholeCard`);
|
|
15
|
+
* - the verified content carries a digest it understands (`v: 1`, two 64-char lowercase hex digests, a numeric
|
|
16
|
+
* `defVersion`);
|
|
17
|
+
* - a well-formed face was served;
|
|
18
|
+
* - a def was served and its `v` IS the digest's `defVersion` (markup rendered for another design version is not
|
|
19
|
+
* this design);
|
|
20
|
+
* - sha256(html) and sha256(css) equal the signed values.
|
|
21
|
+
*
|
|
22
|
+
* In every other case the card paints exactly what 1.2.1 paints. Markup whose bytes do not hash to the signed digest
|
|
23
|
+
* is never painted, and a WebCrypto failure counts as a mismatch, never as a pass.
|
|
24
|
+
*
|
|
25
|
+
* Hashing uses WebCrypto (`crypto.subtle.digest`), the global the kernel verifies with, so it runs wherever the card
|
|
26
|
+
* already verifies (Node SSR, edge runtimes, a browser in a secure context). It is react-free; the card owns the
|
|
27
|
+
* suspension around the async digest.
|
|
28
|
+
*/
|
|
29
|
+
const SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a block shows the whole card, by `renderCertBlock`'s own rule: only `'header'` and `'memo'` split the
|
|
32
|
+
* banner; absent, `'full'`, null or anything unrecognised is the full card. A split block keeps its own part even
|
|
33
|
+
* when a delivered face matches, because the delivered face is a whole design.
|
|
34
|
+
*/
|
|
35
|
+
export function showsWholeCard(part) {
|
|
36
|
+
return part !== 'header' && part !== 'memo';
|
|
37
|
+
}
|
|
38
|
+
/** The signed digest, accepted only in the shape cert-contract 0.6.0 defines; anything else is null. */
|
|
39
|
+
export function acceptedFaceDigest(content) {
|
|
40
|
+
const digest = content?.faceDigest;
|
|
41
|
+
if (typeof digest !== 'object' || digest === null || Array.isArray(digest))
|
|
42
|
+
return null;
|
|
43
|
+
const { v, defVersion, html, css } = digest;
|
|
44
|
+
if (v !== 1 || typeof defVersion !== 'number' || !Number.isFinite(defVersion))
|
|
45
|
+
return null;
|
|
46
|
+
if (typeof html !== 'string' || !SHA256_HEX.test(html))
|
|
47
|
+
return null;
|
|
48
|
+
if (typeof css !== 'string' || !SHA256_HEX.test(css))
|
|
49
|
+
return null;
|
|
50
|
+
return { v: 1, defVersion, html, css };
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The synchronous half of the gate: the digest to hash the face against, or null when the delivered face cannot
|
|
54
|
+
* paint whatever its bytes are (no digest, no face, no def, or a def of another version). The card hashes only when
|
|
55
|
+
* this is non-null, so a delivery without a face never suspends a second time.
|
|
56
|
+
*/
|
|
57
|
+
export function deliveredFaceDigest(content, renderDef, face) {
|
|
58
|
+
if (!face)
|
|
59
|
+
return null;
|
|
60
|
+
const digest = acceptedFaceDigest(content);
|
|
61
|
+
if (!digest || !renderDef || renderDef.v !== digest.defVersion)
|
|
62
|
+
return null;
|
|
63
|
+
return digest;
|
|
64
|
+
}
|
|
65
|
+
/** Lowercase hex sha256 of a string's UTF-8 bytes, via WebCrypto. */
|
|
66
|
+
export async function sha256HexUtf8(text) {
|
|
67
|
+
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(text)));
|
|
68
|
+
let hex = '';
|
|
69
|
+
for (const byte of digest)
|
|
70
|
+
hex += byte.toString(16).padStart(2, '0');
|
|
71
|
+
return hex;
|
|
72
|
+
}
|
|
73
|
+
/** Hash both halves. Never rejects: a WebCrypto failure (none in an insecure context) is null, which never matches. */
|
|
74
|
+
export async function hashDeliveredFace(face) {
|
|
75
|
+
try {
|
|
76
|
+
const [html, css] = await Promise.all([sha256HexUtf8(face.html), sha256HexUtf8(face.css)]);
|
|
77
|
+
return { html, css };
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** The asynchronous half's verdict: both halves hash to the signed values. */
|
|
84
|
+
export function deliveredFaceMatches(hashes, digest) {
|
|
85
|
+
return hashes !== null && hashes.html === digest.html && hashes.css === digest.css;
|
|
86
|
+
}
|
|
87
|
+
/** The markup the card paints for a matching face: the stylesheet first, then the face. */
|
|
88
|
+
export function deliveredFaceHtml(face) {
|
|
89
|
+
return `<style>${face.css}</style>${face.html}`;
|
|
90
|
+
}
|
|
91
|
+
/** How many faces' hashes are kept (insertion order; the oldest goes first). A page or a brand has one or a few. */
|
|
92
|
+
const FACE_HASH_MEMO_MAX = 64;
|
|
93
|
+
const faceHashMemo = new Map();
|
|
94
|
+
/**
|
|
95
|
+
* The memoized hashing of one face, keyed by its CONTENT (both strings), not by the object: the browser parses a seed
|
|
96
|
+
* from the page afresh on each render, and a server's cached read and a seed of the same face share one entry. A
|
|
97
|
+
* failure settles to null and stays settled (a context with no WebCrypto does not gain one).
|
|
98
|
+
*/
|
|
99
|
+
export function faceHashesFor(face) {
|
|
100
|
+
const key = `${face.html.length}:${face.html}${face.css}`;
|
|
101
|
+
const known = faceHashMemo.get(key);
|
|
102
|
+
if (known)
|
|
103
|
+
return known;
|
|
104
|
+
const fresh = {
|
|
105
|
+
pending: hashDeliveredFace(face).then((hashes) => {
|
|
106
|
+
fresh.settled = { hashes };
|
|
107
|
+
return hashes;
|
|
108
|
+
}),
|
|
109
|
+
};
|
|
110
|
+
if (faceHashMemo.size >= FACE_HASH_MEMO_MAX) {
|
|
111
|
+
const oldest = faceHashMemo.keys().next().value;
|
|
112
|
+
if (oldest !== undefined)
|
|
113
|
+
faceHashMemo.delete(oldest);
|
|
114
|
+
}
|
|
115
|
+
faceHashMemo.set(key, fresh);
|
|
116
|
+
return fresh;
|
|
117
|
+
}
|
|
118
|
+
/** Test seam: forget every face's hashes (a new process). */
|
|
119
|
+
export function forgetFaceHashesForTests() {
|
|
120
|
+
faceHashMemo.clear();
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=delivered-face.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivered-face.js","sourceRoot":"","sources":["../../src/builder/delivered-face.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,MAAM,UAAU,GAAG,gBAAgB,CAAA;AAEnC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAa;IAC3C,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,MAAM,CAAA;AAC5C,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,kBAAkB,CAAC,OAAuC;IACzE,MAAM,MAAM,GAAa,OAAuD,EAAE,UAAU,CAAA;IAC5F,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAA;IACvF,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAA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AAE,EAAE;YAChD,KAAK,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,CAAA;YAC1B,OAAO,MAAM,CAAA;QACd,CAAC,CAAC;KACF,CAAA;IACD,IAAI,YAAY,CAAC,IAAI,IAAI,kBAAkB,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAA;QAC/C,IAAI,MAAM,KAAK,SAAS;YAAE,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACtD,CAAC;IACD,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC5B,OAAO,KAAK,CAAA;AACb,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,wBAAwB;IACvC,YAAY,CAAC,KAAK,EAAE,CAAA;AACrB,CAAC"}
|
|
@@ -31,7 +31,7 @@ export interface CardDeliveryRuntime {
|
|
|
31
31
|
export declare function cardDeliveryRuntime(): CardDeliveryRuntime;
|
|
32
32
|
/**
|
|
33
33
|
* Test seam: replace parts of the runtime (a fresh cache unless one is given) and forget the page's envelope seeds
|
|
34
|
-
* (a fresh runtime is a fresh page). Returns a restore.
|
|
34
|
+
* (a fresh runtime is a fresh page) and (1.3.0) every delivered face's memoized hashes. Returns a restore.
|
|
35
35
|
*/
|
|
36
36
|
export declare function setCardDeliveryRuntimeForTests(overrides: Partial<CardDeliveryRuntime>): () => void;
|
|
37
37
|
//# sourceMappingURL=delivery-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-runtime.d.ts","sourceRoot":"","sources":["../../src/builder/delivery-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;
|
|
1
|
+
{"version":3,"file":"delivery-runtime.d.ts","sourceRoot":"","sources":["../../src/builder/delivery-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,OAAQ,CAAA;AAC7C,wGAAwG;AACxG,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAE7C,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,KAAK,CAAA;IACtC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC3B;AA6BD,wBAAgB,mBAAmB,IAAI,mBAAmB,CAEzD;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,MAAM,IAAI,CAalG"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* the same cache shape, so they exercise what production runs.
|
|
16
16
|
*/
|
|
17
17
|
import { TtlCache } from '../verify/cache.js';
|
|
18
|
+
import { forgetFaceHashesForTests } from './delivered-face.js';
|
|
18
19
|
import { CERT_ISSUER_KID, CERT_ISSUER_PUBLIC_KEY_PEM } from './issuer-key.js';
|
|
19
20
|
import { forgetPageSeedsForTests } from './ssr-seed.js';
|
|
20
21
|
/** The card's server read deadline. A brand's server waits this long once per cold placement. */
|
|
@@ -48,10 +49,11 @@ export function cardDeliveryRuntime() {
|
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* Test seam: replace parts of the runtime (a fresh cache unless one is given) and forget the page's envelope seeds
|
|
51
|
-
* (a fresh runtime is a fresh page). Returns a restore.
|
|
52
|
+
* (a fresh runtime is a fresh page) and (1.3.0) every delivered face's memoized hashes. Returns a restore.
|
|
52
53
|
*/
|
|
53
54
|
export function setCardDeliveryRuntimeForTests(overrides) {
|
|
54
55
|
forgetPageSeedsForTests();
|
|
56
|
+
forgetFaceHashesForTests();
|
|
55
57
|
const previous = runtime;
|
|
56
58
|
const now = overrides.now ?? previous.now;
|
|
57
59
|
runtime = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-runtime.js","sourceRoot":"","sources":["../../src/builder/delivery-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAEvD,iGAAiG;AACjG,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAA;AAC7C,wGAAwG;AACxG,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAA;AAU7C,MAAM,eAAe,GAA0B,CAAC,GAAG,EAAE,EAAE,CACtD,GAAG,KAAK,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAEpF,SAAS,YAAY,CAAC,GAAkB;IACvC,OAAO,IAAI,QAAQ,CAAiB;QACnC,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,KAAK;QACpB,OAAO,EAAE,sBAAsB;QAC/B,wFAAwF;QACxF,+EAA+E;QAC/E,aAAa,EAAE,wBAAwB,GAAG,KAAK;QAC/C,GA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EAAE;QACX,OAAO,GAAG,QAAQ,CAAA;IACnB,CAAC,CAAA;AACF,CAAC"}
|
package/dist/builder/index.d.ts
CHANGED
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
* for the entry it renders inside (`builderContext.content.id`) from the CertREV Delivery API on
|
|
28
28
|
* `baseUrl` (an https certrev.com origin, nothing else), verifies it against the baked
|
|
29
29
|
* `cert-issuer-1` key, re-judges revocation and expiry at every render, and paints the brand's
|
|
30
|
-
* render def served beside it.
|
|
30
|
+
* render def served beside it. 1.3.0: when the Delivery API also serves a server-rendered face
|
|
31
|
+
* (`face: { html, css }`, unsigned) and the verified envelope signs that face's sha256 digests for the
|
|
32
|
+
* def version served (`content.faceDigest`), an unpinned whole-card block paints that face instead;
|
|
33
|
+
* markup that does not hash to the signed digest is never painted. A revoked, expired, unverifiable or unreachable cert, a marker that
|
|
31
34
|
* is not exactly that shape, or a missing entry id renders nothing. A block WITHOUT the marker
|
|
32
35
|
* (every entry exported before 1.1.0) renders from its options exactly as 1.0.3 did, so the
|
|
33
36
|
* paragraph above still describes it: an editor who deletes the marker gets the options face back,
|