@decocms/start 1.3.0 → 1.3.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.3.0",
3
+ "version": "1.3.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",
@@ -10,7 +10,7 @@
10
10
  * import { validateDeferredSectionInput } from "@decocms/start/middleware/validateSection";
11
11
  *
12
12
  * // In your storefront's middleware chain:
13
- * export const loadSection = createServerFn({ method: "GET" })
13
+ * export const loadSection = createServerFn({ method: "POST" })
14
14
  * .inputValidator(validateDeferredSectionInput)
15
15
  * .handler(async (ctx) => { ... });
16
16
  * ```
@@ -188,12 +188,11 @@ export const loadCmsHomePage = createServerFn({ method: "GET" }).handler(async (
188
188
  // ---------------------------------------------------------------------------
189
189
 
190
190
  /**
191
- * Loads a single deferred CMS section on demand (IntersectionObserver lazy loading).
192
- * Uses GET so responses benefit from standard HTTP caching at the edge/browser.
193
- * Payload is serialized into the URL by TanStack Start (~3-4KB typical, well within
194
- * Cloudflare Workers' 16KB URL limit).
191
+ * @deprecated Prefer TanStack native streaming via `deferredPromises` in the
192
+ * route loader. This POST server function is kept for backward compatibility
193
+ * and as a fallback for SPA navigations.
195
194
  */
196
- export const loadDeferredSection = createServerFn({ method: "GET" })
195
+ export const loadDeferredSection = createServerFn({ method: "POST" })
197
196
  .inputValidator(
198
197
  (data: unknown) =>
199
198
  data as {