@decocms/start 1.4.0 → 1.4.1

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": "@decocms/start",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "description": "Deco framework for TanStack Start - CMS bridge, admin protocol, hooks, schema generation",
6
6
  "main": "./src/index.ts",
@@ -1551,7 +1551,7 @@ export async function resolveDeferredSectionFull(
1551
1551
  * rawProps for the section at the given index. Expensive but ensures correctness
1552
1552
  * when the in-memory cache has been evicted (different isolate, TTL expired).
1553
1553
  */
1554
- async function reExtractRawProps(
1554
+ export async function reExtractRawProps(
1555
1555
  pagePath: string,
1556
1556
  component: string,
1557
1557
  sectionIndex: number,
@@ -36,6 +36,7 @@ import {
36
36
  extractSeoFromProps,
37
37
  extractSeoFromSections,
38
38
  getDeferredRawProps,
39
+ reExtractRawProps,
39
40
  resolveDecoPage,
40
41
  resolveDeferredSection,
41
42
  resolveDeferredSectionFull,
@@ -220,9 +221,14 @@ export const loadDeferredSection = createServerFn({ method: "POST" })
220
221
  request: originRequest,
221
222
  };
222
223
 
223
- // Resolve rawProps: prefer client-provided (backward compat), then server cache
224
+ // Resolve rawProps: prefer client-provided (backward compat), then server cache,
225
+ // then re-extract from the page as a last resort (handles cross-isolate cache miss
226
+ // on Cloudflare Workers and TTL expiry for slow-scrolling users).
224
227
  const rawProps = clientRawProps
225
- ?? (index !== undefined ? getDeferredRawProps(pagePath, component, index) : null);
228
+ ?? (index !== undefined ? getDeferredRawProps(pagePath, component, index) : null)
229
+ ?? (index !== undefined
230
+ ? await reExtractRawProps(pagePath, component, index, matcherCtx)
231
+ : null);
226
232
 
227
233
  if (!rawProps) {
228
234
  console.warn(`[CMS] Deferred section cache miss: ${component} at index ${index} on ${pagePath}`);