@ultimat3/render 31.2.0 → 31.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/render",
3
- "version": "31.2.0",
3
+ "version": "31.3.0",
4
4
  "description": "The route primitive and the five render modes: static, isr, ssr, stream, spa.",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -52,12 +52,12 @@
52
52
  "test": "bun test"
53
53
  },
54
54
  "dependencies": {
55
- "@ultimat3/cache": "31.2.0",
56
- "@ultimat3/core": "31.2.0",
57
- "@ultimat3/http": "31.2.0",
58
- "@ultimat3/i18n": "31.2.0",
59
- "@ultimat3/schema": "31.2.0",
60
- "@ultimat3/seo": "31.2.0",
55
+ "@ultimat3/cache": "31.3.0",
56
+ "@ultimat3/core": "31.3.0",
57
+ "@ultimat3/http": "31.3.0",
58
+ "@ultimat3/i18n": "31.3.0",
59
+ "@ultimat3/schema": "31.3.0",
60
+ "@ultimat3/seo": "31.3.0",
61
61
  "sass": "1.106.1"
62
62
  }
63
63
  }
package/src/index.ts CHANGED
@@ -234,4 +234,4 @@ export {
234
234
  surfaceAllows,
235
235
  surfaceOf,
236
236
  } from './surfaces';
237
- export { zoneScript, zoneScriptBody } from './zone-script';
237
+ export { DETECTED_ZONE_COOKIE, zoneScript, zoneScriptBody } from './zone-script';
@@ -12,6 +12,9 @@ export const ZONE_SCRIPT_MAX_BYTES = 200;
12
12
  /** A year: the zone a device is in changes rarely, and every load rewrites it anyway. */
13
13
  const MAX_AGE_SECONDS = 31_536_000;
14
14
 
15
+ /** The request pipeline's detected-zone cookie, exported for harnesses that must seed it. */
16
+ export const DETECTED_ZONE_COOKIE = DEFAULT_TZ_CONFIG.detectedCookie;
17
+
15
18
  /**
16
19
  * The body alone, so the CSP hash and the tag come from one string (`themeScriptBody`'s rule).
17
20
  * The name is `@ultimat3/http`'s `detectedCookie` — the one `resolvePreferences` reads, ranked
@@ -20,7 +23,7 @@ const MAX_AGE_SECONDS = 31_536_000;
20
23
  * the zone: `httpOnly: false` because a script writes it, and an IANA name is all cookie octets.
21
24
  */
22
25
  export function zoneScriptBody(): string {
23
- const line = serializeSetCookie(DEFAULT_TZ_CONFIG.detectedCookie, '', {
26
+ const line = serializeSetCookie(DETECTED_ZONE_COOKIE, '', {
24
27
  maxAge: MAX_AGE_SECONDS,
25
28
  httpOnly: false,
26
29
  });