@decocms/blocks 8.9.1 → 8.11.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.
Files changed (409) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/protocol/channel.d.ts +98 -0
  6. package/dist/protocol/channel.d.ts.map +1 -0
  7. package/dist/protocol/channel.js +58 -0
  8. package/dist/protocol/channel.js.map +1 -0
  9. package/dist/protocol/client.js +2 -2
  10. package/dist/protocol/client.js.map +1 -1
  11. package/dist/protocol/conformance/blockMetaVectors.json +214 -0
  12. package/dist/protocol/conformance/contentHashFixtures.d.ts +22 -0
  13. package/dist/protocol/conformance/contentHashFixtures.d.ts.map +1 -1
  14. package/dist/protocol/conformance/contentHashFixtures.js +55 -0
  15. package/dist/protocol/conformance/contentHashFixtures.js.map +1 -1
  16. package/dist/protocol/conformance/index.d.ts +2 -1
  17. package/dist/protocol/conformance/index.d.ts.map +1 -1
  18. package/dist/protocol/conformance/index.js +2 -1
  19. package/dist/protocol/conformance/index.js.map +1 -1
  20. package/dist/protocol/conformance/vectors.d.ts +33 -0
  21. package/dist/protocol/conformance/vectors.d.ts.map +1 -0
  22. package/dist/protocol/conformance/vectors.js +3 -0
  23. package/dist/protocol/conformance/vectors.js.map +1 -0
  24. package/dist/protocol/index.d.ts +11 -1
  25. package/dist/protocol/index.d.ts.map +1 -1
  26. package/dist/protocol/index.js +11 -1
  27. package/dist/protocol/index.js.map +1 -1
  28. package/dist/protocol/keys.d.ts +1 -1
  29. package/dist/protocol/keys.js +1 -1
  30. package/dist/v8/background.d.ts +13 -0
  31. package/dist/v8/background.d.ts.map +1 -1
  32. package/dist/v8/background.js +41 -0
  33. package/dist/v8/background.js.map +1 -1
  34. package/dist/v8/blockMeta.d.ts +27 -0
  35. package/dist/v8/blockMeta.d.ts.map +1 -0
  36. package/dist/v8/blockMeta.js +75 -0
  37. package/dist/v8/blockMeta.js.map +1 -0
  38. package/dist/v8/blockStore.d.ts +43 -0
  39. package/dist/v8/blockStore.d.ts.map +1 -0
  40. package/dist/v8/blockStore.js +95 -0
  41. package/dist/v8/blockStore.js.map +1 -0
  42. package/dist/v8/boundedJson.d.ts +5 -0
  43. package/dist/v8/boundedJson.d.ts.map +1 -1
  44. package/dist/v8/boundedJson.js +10 -2
  45. package/dist/v8/boundedJson.js.map +1 -1
  46. package/dist/v8/boundedMap.d.ts +19 -0
  47. package/dist/v8/boundedMap.d.ts.map +1 -0
  48. package/dist/v8/boundedMap.js +52 -0
  49. package/dist/v8/boundedMap.js.map +1 -0
  50. package/dist/v8/builtins/data.d.ts +18 -2
  51. package/dist/v8/builtins/data.d.ts.map +1 -1
  52. package/dist/v8/builtins/data.js +17 -1
  53. package/dist/v8/builtins/data.js.map +1 -1
  54. package/dist/v8/builtins/index.d.ts.map +1 -1
  55. package/dist/v8/builtins/index.js +2 -1
  56. package/dist/v8/builtins/index.js.map +1 -1
  57. package/dist/v8/builtins/legacy.d.ts +6 -3
  58. package/dist/v8/builtins/legacy.d.ts.map +1 -1
  59. package/dist/v8/builtins/legacy.js +6 -3
  60. package/dist/v8/builtins/legacy.js.map +1 -1
  61. package/dist/v8/canonical.d.ts +8 -0
  62. package/dist/v8/canonical.d.ts.map +1 -1
  63. package/dist/v8/canonical.js +15 -0
  64. package/dist/v8/canonical.js.map +1 -1
  65. package/dist/v8/cli/builtins.d.ts.map +1 -1
  66. package/dist/v8/cli/builtins.js +1 -0
  67. package/dist/v8/cli/builtins.js.map +1 -1
  68. package/dist/v8/cli/check/index.d.ts +10 -0
  69. package/dist/v8/cli/check/index.d.ts.map +1 -1
  70. package/dist/v8/cli/check/index.js +91 -7
  71. package/dist/v8/cli/check/index.js.map +1 -1
  72. package/dist/v8/cli/content.d.ts +12 -25
  73. package/dist/v8/cli/content.d.ts.map +1 -1
  74. package/dist/v8/cli/content.js +46 -75
  75. package/dist/v8/cli/content.js.map +1 -1
  76. package/dist/v8/cli/index.d.ts +2 -2
  77. package/dist/v8/cli/index.d.ts.map +1 -1
  78. package/dist/v8/cli/index.js +2 -2
  79. package/dist/v8/cli/index.js.map +1 -1
  80. package/dist/v8/cli/remote/commands.d.ts +71 -0
  81. package/dist/v8/cli/remote/commands.d.ts.map +1 -0
  82. package/dist/v8/cli/remote/commands.js +644 -0
  83. package/dist/v8/cli/remote/commands.js.map +1 -0
  84. package/dist/v8/cli/remote/diff.d.ts +15 -0
  85. package/dist/v8/cli/remote/diff.d.ts.map +1 -0
  86. package/dist/v8/cli/remote/diff.js +102 -0
  87. package/dist/v8/cli/remote/diff.js.map +1 -0
  88. package/dist/v8/cli/remote/env.d.ts +35 -0
  89. package/dist/v8/cli/remote/env.d.ts.map +1 -0
  90. package/dist/v8/cli/remote/env.js +84 -0
  91. package/dist/v8/cli/remote/env.js.map +1 -0
  92. package/dist/v8/cli/remote/http.d.ts +149 -0
  93. package/dist/v8/cli/remote/http.d.ts.map +1 -0
  94. package/dist/v8/cli/remote/http.js +381 -0
  95. package/dist/v8/cli/remote/http.js.map +1 -0
  96. package/dist/v8/cli/remote/local.d.ts +90 -0
  97. package/dist/v8/cli/remote/local.d.ts.map +1 -0
  98. package/dist/v8/cli/remote/local.js +309 -0
  99. package/dist/v8/cli/remote/local.js.map +1 -0
  100. package/dist/v8/cli/root.d.ts +29 -0
  101. package/dist/v8/cli/root.d.ts.map +1 -1
  102. package/dist/v8/cli/root.js +28 -0
  103. package/dist/v8/cli/root.js.map +1 -1
  104. package/dist/v8/cli/run.d.ts +13 -1
  105. package/dist/v8/cli/run.d.ts.map +1 -1
  106. package/dist/v8/cli/run.js +310 -124
  107. package/dist/v8/cli/run.js.map +1 -1
  108. package/dist/v8/cli/schema/builtinSchemas.d.ts.map +1 -1
  109. package/dist/v8/cli/schema/builtinSchemas.js +28 -10
  110. package/dist/v8/cli/schema/builtinSchemas.js.map +1 -1
  111. package/dist/v8/cli/schema/generate.js +1 -1
  112. package/dist/v8/cli/schema/generate.js.map +1 -1
  113. package/dist/v8/cli/skills.d.ts +25 -0
  114. package/dist/v8/cli/skills.d.ts.map +1 -0
  115. package/dist/v8/cli/skills.js +70 -0
  116. package/dist/v8/cli/skills.js.map +1 -0
  117. package/dist/v8/client.d.ts +9 -9
  118. package/dist/v8/client.d.ts.map +1 -1
  119. package/dist/v8/client.js +138 -50
  120. package/dist/v8/client.js.map +1 -1
  121. package/dist/v8/cms.d.ts +2 -1
  122. package/dist/v8/cms.d.ts.map +1 -1
  123. package/dist/v8/cms.js +55 -46
  124. package/dist/v8/cms.js.map +1 -1
  125. package/dist/v8/content.d.ts +39 -78
  126. package/dist/v8/content.d.ts.map +1 -1
  127. package/dist/v8/content.js +155 -195
  128. package/dist/v8/content.js.map +1 -1
  129. package/dist/v8/contentIndex.d.ts +71 -0
  130. package/dist/v8/contentIndex.d.ts.map +1 -0
  131. package/dist/v8/contentIndex.js +137 -0
  132. package/dist/v8/contentIndex.js.map +1 -0
  133. package/dist/v8/draft.d.ts +7 -7
  134. package/dist/v8/draft.d.ts.map +1 -1
  135. package/dist/v8/draft.js +10 -9
  136. package/dist/v8/draft.js.map +1 -1
  137. package/dist/v8/draftChanges.d.ts +59 -32
  138. package/dist/v8/draftChanges.d.ts.map +1 -1
  139. package/dist/v8/draftChanges.js +139 -75
  140. package/dist/v8/draftChanges.js.map +1 -1
  141. package/dist/v8/errors.d.ts +21 -0
  142. package/dist/v8/errors.d.ts.map +1 -1
  143. package/dist/v8/errors.js +22 -0
  144. package/dist/v8/errors.js.map +1 -1
  145. package/dist/v8/hostedSource.d.ts +57 -0
  146. package/dist/v8/hostedSource.d.ts.map +1 -0
  147. package/dist/v8/hostedSource.js +18 -0
  148. package/dist/v8/hostedSource.js.map +1 -0
  149. package/dist/v8/identity.d.ts +1 -1
  150. package/dist/v8/identity.js +1 -1
  151. package/dist/v8/index.d.ts +1 -0
  152. package/dist/v8/index.d.ts.map +1 -1
  153. package/dist/v8/index.js +1 -0
  154. package/dist/v8/index.js.map +1 -1
  155. package/dist/v8/matchRoute.js +7 -4
  156. package/dist/v8/matchRoute.js.map +1 -1
  157. package/dist/v8/pin.d.ts +34 -0
  158. package/dist/v8/pin.d.ts.map +1 -0
  159. package/dist/v8/pin.js +156 -0
  160. package/dist/v8/pin.js.map +1 -0
  161. package/dist/v8/preview/StudioBridge.d.ts +8 -8
  162. package/dist/v8/preview/StudioBridge.d.ts.map +1 -1
  163. package/dist/v8/preview/StudioBridge.js +8 -10
  164. package/dist/v8/preview/StudioBridge.js.map +1 -1
  165. package/dist/v8/preview/StudioChannel.d.ts +51 -0
  166. package/dist/v8/preview/StudioChannel.d.ts.map +1 -0
  167. package/dist/v8/preview/StudioChannel.js +104 -0
  168. package/dist/v8/preview/StudioChannel.js.map +1 -0
  169. package/dist/v8/preview/index.d.ts +3 -0
  170. package/dist/v8/preview/index.d.ts.map +1 -1
  171. package/dist/v8/preview/index.js +3 -0
  172. package/dist/v8/preview/index.js.map +1 -1
  173. package/dist/v8/remoteLoader.d.ts +42 -5
  174. package/dist/v8/remoteLoader.d.ts.map +1 -1
  175. package/dist/v8/remoteLoader.js +317 -259
  176. package/dist/v8/remoteLoader.js.map +1 -1
  177. package/dist/v8/resolver.d.ts +22 -8
  178. package/dist/v8/resolver.d.ts.map +1 -1
  179. package/dist/v8/resolver.js +37 -32
  180. package/dist/v8/resolver.js.map +1 -1
  181. package/dist/v8/revisionId.d.ts +11 -0
  182. package/dist/v8/revisionId.d.ts.map +1 -0
  183. package/dist/v8/revisionId.js +13 -0
  184. package/dist/v8/revisionId.js.map +1 -0
  185. package/dist/v8/settings.d.ts +6 -6
  186. package/dist/v8/settings.d.ts.map +1 -1
  187. package/dist/v8/settings.js +8 -7
  188. package/dist/v8/settings.js.map +1 -1
  189. package/dist/v8/telemetry.d.ts +4 -2
  190. package/dist/v8/telemetry.d.ts.map +1 -1
  191. package/dist/v8/telemetry.js +2 -2
  192. package/dist/v8/telemetry.js.map +1 -1
  193. package/dist/v8/types.d.ts +52 -40
  194. package/dist/v8/types.d.ts.map +1 -1
  195. package/dist/v8/variants.d.ts +7 -2
  196. package/dist/v8/variants.d.ts.map +1 -1
  197. package/dist/v8/variants.js +21 -24
  198. package/dist/v8/variants.js.map +1 -1
  199. package/dist/v8/vite/index.d.ts +2 -2
  200. package/dist/v8/vite/index.js +1 -1
  201. package/dist/v8/vite/index.js.map +1 -1
  202. package/package.json +3 -2
  203. package/skills/deco-apps/SKILL.md +82 -0
  204. package/skills/deco-apps/references/algolia.md +51 -0
  205. package/skills/deco-apps/references/commerce-types.md +132 -0
  206. package/skills/deco-apps/references/instrumented-fetch.md +144 -0
  207. package/skills/deco-apps/references/magento.md +55 -0
  208. package/skills/deco-apps/references/messaging.md +76 -0
  209. package/skills/deco-apps/references/shopify.md +69 -0
  210. package/skills/deco-apps/references/vendored-loaders.md +135 -0
  211. package/skills/deco-apps/references/vtex-cookies-auth.md +146 -0
  212. package/skills/deco-apps/references/vtex.md +150 -0
  213. package/skills/deco-apps/references/wake.md +75 -0
  214. package/skills/deco-cms-schema/SKILL.md +80 -0
  215. package/skills/deco-cms-schema/references/annotations.md +147 -0
  216. package/skills/deco-cms-schema/references/content-hygiene.md +91 -0
  217. package/skills/deco-cms-schema/references/formats-and-widgets.md +112 -0
  218. package/skills/deco-cms-schema/references/shapes-that-break-the-form.md +165 -0
  219. package/skills/deco-cms-schema/references/types-to-fields.md +112 -0
  220. package/skills/deco-go-live/SKILL.md +127 -0
  221. package/skills/deco-go-live/references/content-releases.md +90 -0
  222. package/skills/deco-go-live/references/process.md +106 -0
  223. package/skills/deco-go-live/references/proxy-headers-checkout.md +139 -0
  224. package/skills/deco-go-live/references/qa-checklist-template.md +150 -0
  225. package/skills/deco-go-live/references/qa-inventory.md +120 -0
  226. package/skills/deco-go-live/references/react-spa.md +183 -0
  227. package/skills/deco-go-live/references/seo-analytics.md +114 -0
  228. package/skills/deco-go-live/references/traffic-ramp.md +87 -0
  229. package/skills/deco-go-live/references/worker-runtime.md +93 -0
  230. package/skills/deco-go-live/scripts/preflight.sh +221 -0
  231. package/skills/deco-images-media/SKILL.md +64 -0
  232. package/skills/deco-images-media/references/asset-upload.md +191 -0
  233. package/skills/deco-images-media/references/components-per-binding.md +167 -0
  234. package/skills/deco-images-media/references/providers-and-cdn.md +145 -0
  235. package/skills/deco-images-media/references/quality-and-lcp.md +93 -0
  236. package/skills/deco-images-media/references/troubleshooting.md +147 -0
  237. package/skills/deco-images-media/references/video.md +122 -0
  238. package/skills/deco-make-editable/SKILL.md +94 -0
  239. package/skills/deco-make-editable/references/a11y-and-e2e.md +104 -0
  240. package/skills/deco-make-editable/references/content-shapes.md +198 -0
  241. package/skills/deco-make-editable/references/from-figma.md +110 -0
  242. package/skills/deco-make-editable/references/i18n-fields.md +112 -0
  243. package/skills/deco-make-editable/references/inventory.md +79 -0
  244. package/skills/deco-make-editable/references/pixel-parity.md +175 -0
  245. package/skills/deco-make-editable/references/seeding-content.md +119 -0
  246. package/skills/deco-nextjs-site/SKILL.md +74 -0
  247. package/skills/deco-nextjs-site/references/caching.md +116 -0
  248. package/skills/deco-nextjs-site/references/metadata-seo.md +100 -0
  249. package/skills/deco-nextjs-site/references/proxy-and-drafts.md +177 -0
  250. package/skills/deco-nextjs-site/references/rendering.md +171 -0
  251. package/skills/deco-nextjs-site/references/setup.md +190 -0
  252. package/skills/deco-nextjs-site/references/studio-bridge.md +130 -0
  253. package/skills/deco-site-authoring/SKILL.md +75 -0
  254. package/skills/deco-site-authoring/references/lazy-blocks.md +155 -0
  255. package/skills/deco-site-authoring/references/loaders.md +192 -0
  256. package/skills/deco-site-authoring/references/pages.md +156 -0
  257. package/skills/deco-site-authoring/references/review-before-publish.md +95 -0
  258. package/skills/deco-site-authoring/references/sections.md +158 -0
  259. package/skills/deco-site-authoring/references/seo.md +116 -0
  260. package/skills/deco-site-workflow/SKILL.md +92 -0
  261. package/skills/deco-site-workflow/references/check.md +116 -0
  262. package/skills/deco-site-workflow/references/cli-reference.md +104 -0
  263. package/skills/deco-site-workflow/references/content-layout.md +93 -0
  264. package/skills/deco-site-workflow/references/content-sync.md +146 -0
  265. package/skills/deco-site-workflow/references/delivery.md +51 -0
  266. package/skills/deco-site-workflow/references/deploy.md +87 -0
  267. package/skills/deco-site-workflow/references/schema.md +173 -0
  268. package/skills/deco-site-workflow/references/serve-and-studio.md +138 -0
  269. package/skills/deco-storefront-caching/SKILL.md +67 -0
  270. package/skills/deco-storefront-caching/references/cache-keys.md +129 -0
  271. package/skills/deco-storefront-caching/references/case-study.md +82 -0
  272. package/skills/deco-storefront-caching/references/egress-traps.md +153 -0
  273. package/skills/deco-storefront-caching/references/nextjs.md +60 -0
  274. package/skills/deco-storefront-caching/references/perf-guardrails-e2e.md +123 -0
  275. package/skills/deco-storefront-caching/references/verification.md +136 -0
  276. package/skills/deco-storefront-caching/references/worker-page-cache.md +160 -0
  277. package/skills/deco-storefront-caching/scripts/html-anatomy.mjs +97 -0
  278. package/skills/deco-storefront-performance/SKILL.md +81 -0
  279. package/skills/deco-storefront-performance/references/cls-third-party.md +90 -0
  280. package/skills/deco-storefront-performance/references/hydration.md +116 -0
  281. package/skills/deco-storefront-performance/references/loaders-n-plus-1.md +107 -0
  282. package/skills/deco-storefront-performance/references/navigation-ux.md +130 -0
  283. package/skills/deco-storefront-performance/references/payload-trim.md +163 -0
  284. package/skills/deco-storefront-performance/references/render-location.md +152 -0
  285. package/skills/deco-storefront-performance/references/request-dedupe.md +147 -0
  286. package/skills/deco-storefront-performance/references/trace-reading.md +79 -0
  287. package/skills/deco-storefront-performance/references/worker-memory.md +176 -0
  288. package/skills/deco-tanstack-site/SKILL.md +68 -0
  289. package/skills/deco-tanstack-site/references/document-and-security.md +155 -0
  290. package/skills/deco-tanstack-site/references/router-and-navigation.md +137 -0
  291. package/skills/deco-tanstack-site/references/routes-and-pages.md +183 -0
  292. package/skills/deco-tanstack-site/references/server-functions.md +123 -0
  293. package/skills/deco-tanstack-site/references/setup.md +153 -0
  294. package/skills/deco-tanstack-site/references/worker-entry.md +152 -0
  295. package/skills/deco-v7-to-v8-migration/SKILL.md +122 -0
  296. package/skills/deco-v7-to-v8-migration/references/caching-and-privacy.md +10 -0
  297. package/skills/deco-v7-to-v8-migration/references/content.md +25 -0
  298. package/skills/deco-v7-to-v8-migration/references/editor-forms.md +27 -0
  299. package/skills/deco-v7-to-v8-migration/references/faststore.md +40 -0
  300. package/skills/deco-v7-to-v8-migration/references/framework-code.md +53 -0
  301. package/skills/deco-v7-to-v8-migration/references/hosted-releases.md +16 -0
  302. package/skills/deco-v7-to-v8-migration/references/import-map.md +81 -0
  303. package/skills/deco-v7-to-v8-migration/references/legacy-names.md +33 -0
  304. package/skills/deco-v7-to-v8-migration/references/manual-steps.md +10 -0
  305. package/skills/deco-v7-to-v8-migration/references/native-apps.md +43 -0
  306. package/skills/deco-v7-to-v8-migration/references/nextjs.md +19 -0
  307. package/skills/deco-v7-to-v8-migration/references/parity.md +66 -0
  308. package/skills/deco-v7-to-v8-migration/references/rendering.md +13 -0
  309. package/skills/deco-v7-to-v8-migration/references/running-the-script.md +29 -0
  310. package/skills/deco-v7-to-v8-migration/references/script-steps.md +13 -0
  311. package/skills/deco-v7-to-v8-migration/references/server-functions.md +15 -0
  312. package/skills/deco-v7-to-v8-migration/references/sibling-port.md +11 -0
  313. package/skills/deco-v7-to-v8-migration/references/site-code.md +15 -0
  314. package/skills/deco-v7-to-v8-migration/references/telemetry.md +10 -0
  315. package/skills/deco-v7-to-v8-migration/references/verify.md +20 -0
  316. package/skills/deco-v7-to-v8-migration/scripts/apps.ts +297 -0
  317. package/skills/deco-v7-to-v8-migration/scripts/asyncRendering.ts +73 -0
  318. package/skills/deco-v7-to-v8-migration/scripts/blockMap.ts +584 -0
  319. package/skills/deco-v7-to-v8-migration/scripts/ciSchemaCheck.ts +145 -0
  320. package/skills/deco-v7-to-v8-migration/scripts/compat.ts +357 -0
  321. package/skills/deco-v7-to-v8-migration/scripts/content.ts +121 -0
  322. package/skills/deco-v7-to-v8-migration/scripts/experiments.ts +81 -0
  323. package/skills/deco-v7-to-v8-migration/scripts/framework.ts +61 -0
  324. package/skills/deco-v7-to-v8-migration/scripts/imageCopy.ts +276 -0
  325. package/skills/deco-v7-to-v8-migration/scripts/imageModule.ts +285 -0
  326. package/skills/deco-v7-to-v8-migration/scripts/imports.ts +942 -0
  327. package/skills/deco-v7-to-v8-migration/scripts/invoke.ts +624 -0
  328. package/skills/deco-v7-to-v8-migration/scripts/legacyNames.ts +45 -0
  329. package/skills/deco-v7-to-v8-migration/scripts/main.ts +59 -0
  330. package/skills/deco-v7-to-v8-migration/scripts/matchers.ts +41 -0
  331. package/skills/deco-v7-to-v8-migration/scripts/migrate.ts +176 -0
  332. package/skills/deco-v7-to-v8-migration/scripts/redirects.ts +455 -0
  333. package/skills/deco-v7-to-v8-migration/scripts/report.ts +50 -0
  334. package/skills/deco-v7-to-v8-migration/scripts/scaffold.ts +1119 -0
  335. package/skills/deco-v7-to-v8-migration/scripts/secrets.ts +35 -0
  336. package/skills/deco-v7-to-v8-migration/scripts/sectionLoaders.ts +216 -0
  337. package/skills/deco-v7-to-v8-migration/scripts/siteSettings.ts +261 -0
  338. package/skills/deco-v7-to-v8-migration/scripts/stubs.ts +388 -0
  339. package/skills/deco-v7-to-v8-migration/scripts/tsconfig.json +7 -0
  340. package/skills/deco-v7-to-v8-migration/scripts/vendor.ts +249 -0
  341. package/skills/deco-v7-to-v8-migration/scripts/vtexInvoke.ts +240 -0
  342. package/skills/deco-v7-to-v8-migration/scripts/walk.ts +30 -0
  343. package/skills/deco-variants/SKILL.md +57 -0
  344. package/skills/deco-variants/references/caching-variants.md +63 -0
  345. package/skills/deco-variants/references/custom-matchers.md +83 -0
  346. package/skills/deco-variants/references/draft-preview.md +59 -0
  347. package/skills/deco-variants/references/experiments-and-campaigns.md +104 -0
  348. package/skills/deco-variants/references/multivariate.md +85 -0
  349. package/skills/deco-variants/references/v7-matchers.md +71 -0
  350. package/src/index.ts +2 -0
  351. package/src/protocol/channel.ts +127 -0
  352. package/src/protocol/client.ts +2 -2
  353. package/src/protocol/conformance/blockMetaVectors.json +214 -0
  354. package/src/protocol/conformance/contentHashFixtures.ts +74 -0
  355. package/src/protocol/conformance/index.ts +9 -1
  356. package/src/protocol/conformance/vectors.ts +36 -0
  357. package/src/protocol/index.ts +32 -0
  358. package/src/protocol/keys.ts +1 -1
  359. package/src/v8/background.ts +42 -0
  360. package/src/v8/blockMeta.ts +100 -0
  361. package/src/v8/blockStore.ts +124 -0
  362. package/src/v8/boundedJson.ts +20 -2
  363. package/src/v8/boundedMap.ts +53 -0
  364. package/src/v8/builtins/data.ts +26 -2
  365. package/src/v8/builtins/index.ts +2 -1
  366. package/src/v8/builtins/legacy.ts +6 -3
  367. package/src/v8/canonical.ts +15 -0
  368. package/src/v8/cli/builtins.ts +1 -0
  369. package/src/v8/cli/check/index.ts +97 -7
  370. package/src/v8/cli/content.ts +49 -91
  371. package/src/v8/cli/index.ts +2 -2
  372. package/src/v8/cli/remote/commands.ts +834 -0
  373. package/src/v8/cli/remote/diff.ts +100 -0
  374. package/src/v8/cli/remote/env.ts +107 -0
  375. package/src/v8/cli/remote/http.ts +484 -0
  376. package/src/v8/cli/remote/local.ts +343 -0
  377. package/src/v8/cli/root.ts +40 -0
  378. package/src/v8/cli/run.ts +366 -135
  379. package/src/v8/cli/schema/builtinSchemas.ts +29 -10
  380. package/src/v8/cli/schema/generate.ts +1 -1
  381. package/src/v8/cli/skills.ts +91 -0
  382. package/src/v8/client.ts +162 -60
  383. package/src/v8/cms.ts +62 -53
  384. package/src/v8/content.ts +179 -229
  385. package/src/v8/contentIndex.ts +183 -0
  386. package/src/v8/draft.ts +15 -14
  387. package/src/v8/draftChanges.ts +151 -85
  388. package/src/v8/errors.ts +37 -0
  389. package/src/v8/hostedSource.ts +67 -0
  390. package/src/v8/identity.ts +1 -1
  391. package/src/v8/index.ts +1 -0
  392. package/src/v8/matchRoute.ts +7 -4
  393. package/src/v8/pin.ts +176 -0
  394. package/src/v8/preview/StudioBridge.ts +8 -10
  395. package/src/v8/preview/StudioChannel.ts +116 -0
  396. package/src/v8/preview/index.ts +3 -0
  397. package/src/v8/remoteLoader.ts +350 -286
  398. package/src/v8/resolver.ts +56 -33
  399. package/src/v8/revisionId.ts +14 -0
  400. package/src/v8/settings.ts +10 -9
  401. package/src/v8/telemetry.ts +3 -3
  402. package/src/v8/types.ts +52 -40
  403. package/src/v8/variants.ts +30 -26
  404. package/src/v8/vite/index.ts +3 -3
  405. package/dist/v8/cli/serve/server.d.ts +0 -29
  406. package/dist/v8/cli/serve/server.d.ts.map +0 -1
  407. package/dist/v8/cli/serve/server.js +0 -296
  408. package/dist/v8/cli/serve/server.js.map +0 -1
  409. package/src/v8/cli/serve/server.ts +0 -348
@@ -0,0 +1,90 @@
1
+ # Content releases, publish timing and rollback
2
+
3
+ On v8, published content is a **release**: a revision Studio writes to the
4
+ delivery CDN. The worker does not bundle it and does not keep it in a KV
5
+ namespace. This file covers what to check about that path before go-live, and
6
+ how to roll back each layer.
7
+
8
+ ## How a release reaches the site
9
+
10
+ - `createCMS({ blocks, site })` reads the site's latest release from the delivery CDN at runtime. With `site`, passing `content` too is an error: content never comes from the bundle.
11
+ - The first client of an isolate loads the release index (10 s per fetch). Until a load succeeds, reads fail with a `ContentUnavailableError` cause. Test a cold start: the first request after a deploy must render.
12
+ - Each isolate checks for a newer release every `interval` (default and minimum 60 000 ms, plus or minus up to 10 s), at an idle moment, in the background. So a publish shows up within about a minute per isolate, and the first request after the interval may still render the previous release. Tell the content team; the old stack may have felt instant.
13
+ - A draft request checks for the latest release first (once per request), so a draft preview builds on what was published a moment ago.
14
+ - Block bodies are fetched by hash and kept in a per-isolate LRU bounded at 32 MB of JSON text. A hash always means the same body, so nothing there is invalidated.
15
+ - Without `site`, content is the module `deco content` writes (`.deco/blocks.gen.ts`), bundled into the worker, and every content change needs a deploy. Large content in the bundle costs memory on every isolate ([worker-runtime.md](./worker-runtime.md#memory-128-mb-per-isolate)).
16
+
17
+ Setting `site` and `token` (and the `DECO_SITE` / `DECO_SITE_TOKEN` values a
18
+ site passes to them) is covered in **deco-site-workflow** and, for a v7 site,
19
+ in **deco-v7-to-v8-migration**.
20
+
21
+ ### What a publish does not reach
22
+
23
+ A publish changes only what reads through the CMS client. Before go-live, grep
24
+ for content that bypasses it:
25
+
26
+ ```bash
27
+ grep -rnE "\.deco/blocks/[^\"']+\.json" src # direct JSON imports: frozen at the last deploy
28
+ grep -rn "blocks.gen" src # the bundled content module
29
+ grep -rln "readFileSync\|readdirSync" scripts 2>/dev/null | xargs grep -ln "\.deco/blocks" 2>/dev/null # build-time reads
30
+ ```
31
+
32
+ Route each through the client, or write down that it needs a deploy.
33
+
34
+ ### Page cache and releases
35
+
36
+ `cacheVersion(cms, buildHash, page.url)` from `@decocms/tanstack/worker` is
37
+ `<build>.<content revision>`, so a deploy or a publish moves the site's page
38
+ cache to new keys at once. A preview (`?__draft=`, `off` included, or the
39
+ draft cookie) never reaches `pageCache`, and an old release is never stored.
40
+ Cache keys and profiles are in **deco-storefront-caching**.
41
+
42
+ ## Check the release before you publish
43
+
44
+ ```bash
45
+ deco check # production against the local .deco/schema.gen.json
46
+ deco check --draft=<name> # a draft
47
+ deco check --revision=<id> # a published revision (ids from deco releases)
48
+ ```
49
+
50
+ `deco check` validates content against the local schema. Run it on the
51
+ commit you are about to deploy: a deploy that changes a section's props can
52
+ reject content that is already live.
53
+
54
+ The schema the site editor draws forms from must be the deployed one: `deco
55
+ schema push` on every production deploy (**deco-site-workflow**). The
56
+ committed `.deco/schema.gen.json` must carry `"blocksMajor": 8`, or `deco check`
57
+ fails and the editor treats the site as v7.
58
+
59
+ ## Redirects are content
60
+
61
+ The worker answers the redirects block (the saved block of type `redirects`)
62
+ before any route, including before an A/B split. They ship with a publish, not
63
+ with a deploy. Their rules and the sweep against the old site are in
64
+ [seo-analytics.md](./seo-analytics.md#redirect-sweep).
65
+
66
+ ## Rollback
67
+
68
+ Write down one path per layer before cutover, and rehearse each on the
69
+ candidate.
70
+
71
+ | Layer | How | Check |
72
+ |---|---|---|
73
+ | Traffic | Set the split ratio back to 0 in the host's KV entry, or remove the route ([traffic-ramp.md](./traffic-ramp.md)) | `x-deco-bucket: fallback` on a fresh visitor |
74
+ | Content | In Studio, make an earlier release current. It becomes a new revision with the next sequence, and isolates adopt it within the interval | `deco releases` lists it as `rollback to <id>`, marked `current` |
75
+ | Code | Roll back the Worker deployment (the Cloudflare dashboard's Deployments, as in this repo's `docs/runbooks/http-error-spike.md`) | `service.version` in telemetry flips back. It is `unknown` unless the site sets it in `telemetry.resource` (e.g. to the commit): set it before go-live |
76
+
77
+ A code rollback keeps the content that is live now. Before rolling code back,
78
+ check out the older commit and run `deco check`: if live content no longer
79
+ fits the older schema, roll content back first, or the older code renders it
80
+ wrong.
81
+
82
+ ## Telemetry
83
+
84
+ With `token` (or a `telemetry.endpoint`), the worker records
85
+ `http.server.request.duration` for every request, labelled with the page
86
+ template, method, status class, cache decision (`HIT`, `MISS`, `BYPASS`,
87
+ `DRAFT`) and device. Upstream calls made through `createInstrumentedFetch`
88
+ (`@decocms/blocks/fetch`) record `http.client.request.duration` per provider.
89
+ Without either, nothing is sent: confirm it is on before the ramp, or you
90
+ compare buckets blind.
@@ -0,0 +1,106 @@
1
+ # Process: freeze, parity, cutover, first 72 hours
2
+
3
+ Most go-live pain was not code. It was code or content changing on the old
4
+ site while the new one was being validated, or a cutover step done in the
5
+ wrong order.
6
+
7
+ ## Code freeze and reconcile
8
+
9
+ **What happened:** on one store the team kept shipping to the old repo after
10
+ the candidate was validated, and at cutover the new site was out of date. On
11
+ another there was no freeze for a month, and 4 to 5 features had to be pulled
12
+ out of commit history. After go-live, three old-repo PRs and an A/B variant
13
+ that was never ported still had to be ported.
14
+
15
+ - [ ] Agree a **freeze date** in writing: from that day until go-live, no code merges on the old repo.
16
+ - [ ] Record `FREEZE_SHA`: the old repo's `main` at the freeze.
17
+ - [ ] Reconcile every old-repo commit from the migration cut to `FREEZE_SHA` (the **tools-reconcile-snapshot** skill in decocms/migrations gives one diff per changed file). Port by hand. Skip generated files and saved content: content moves separately (below).
18
+ - [ ] After go-live, keep watching the old repo. Anything merged there is a port ticket.
19
+
20
+ ```bash
21
+ git -C <old-repo> log --oneline <CUT_SHA>..origin/main -- . ':!.deco/blocks' ':!static'
22
+ ```
23
+
24
+ ## Content freeze and the last import
25
+
26
+ On v8 the content lives in Studio releases, served from the delivery CDN.
27
+ The old CMS keeps changing until someone stops it. An import done at 07:00
28
+ misses an edit published at 08:00.
29
+
30
+ - [ ] Agree a **content freeze** on the old CMS, and do the last import after the content team's last publish.
31
+ - [ ] Bring the imported blocks in as a draft, check it, then publish it:
32
+
33
+ ```bash
34
+ deco push --draft=cutover # saves the blocks changed since the pull; prints the preview link
35
+ deco check --draft=cutover # the draft against .deco/schema.gen.json: 0 errors
36
+ deco publish --draft=cutover --message="cutover import"
37
+ deco releases # the new revision is "current"
38
+ ```
39
+
40
+ - [ ] After go-live, the old CMS is read-only. A one-way sync that keeps running overwrites edits made in Studio. On one store a leftover sync overwrote 21 blocks edited in the new CMS.
41
+ - [ ] Fix content problems **in code at the seam** (a guard, a default, a cap) when the next import would bring the bad value back.
42
+
43
+ `deco push`, `pull`, `diff` and drafts are covered in **deco-site-workflow**.
44
+
45
+ ## Structural parity (five criteria)
46
+
47
+ AI ports tend to rebuild components their own way. On one store, schemas were
48
+ changed, then the content import broke pages, because a component read the
49
+ same props differently on each side. Rule: **content stays the same and
50
+ components keep the interface they had in production.**
51
+
52
+ 1. **HTML**: same landmarks, headings, `rel` and prefetch attributes, and the `data-*` attributes tags read.
53
+ 2. **Schema**: same props, names, types and defaults. `deco schema`, then compare the Studio form with the old one (**deco-cms-schema**).
54
+ 3. **Wiring**: every prop reaches the DOM; every `__resolveType` in `.deco/blocks` exists in the block map. `deco check` reports unknown types and broken references.
55
+ 4. **Behavior**: open and close, add to cart, filters, forms, on desktop and mobile.
56
+ 5. **Visual**: spacing, layout, icons, animation (pixel diff per section; **deco-make-editable** has the method).
57
+
58
+ For a v7 site, the parity harness and the list of approved differences are in
59
+ **deco-v7-to-v8-migration**.
60
+
61
+ ## CMS pass
62
+
63
+ One hour with the people who edit the site, **before** go-live. The goal is
64
+ not training. Confirm that the props they edit are editable, the blocks they
65
+ pick still exist, and a draft preview works on the hosts they use (`deco
66
+ drafts url <name>` prints a draft's link).
67
+
68
+ ## Inventory of what was not ported
69
+
70
+ - [ ] List integrations disabled or stubbed in the port (back-in-stock, try-on, chat, reviews) and get sign-off.
71
+ - [ ] List the A/B tests running on the old site (testing tools, search vendors). A variant whose code exists only on the old site must be ported or paused.
72
+ - [ ] Grep the old repo for inline behaviors (`hx-on:` handlers, inline scripts). Each one must exist in the port. On one store an unported `hx-on:click` left an empty box on every page.
73
+
74
+ ## Cutover day
75
+
76
+ The safe pattern is a traffic split on the production host, not a switch of
77
+ DNS: the new worker takes every request and sends a share of visitors to the
78
+ old origin. Start at 0%, test the new bucket on the real domain, then ramp.
79
+ The v8 handler for this, and its traps, are in [traffic-ramp.md](./traffic-ramp.md).
80
+
81
+ 1. **Deploy freeze** for the window. Each deploy changes the build hash, which moves every page-cache key (`cacheVersion`), and leaves open tabs with missing chunks ([react-spa.md](./react-spa.md#stale-chunks-after-deploy)).
82
+ 2. **Split config first, then the route.** Write the KV entry for the host before the route sends traffic to the worker.
83
+ 3. **Smoke with each bucket forced** (`?_deco_bucket=worker` and `?_deco_bucket=fallback`): home, listing, product, search, login, cart, checkout, old landing pages, redirects, `robots.txt`, sitemap, tag manager.
84
+ 4. **Check the proxies** the site already has (checkout, `/api`, media) in both buckets.
85
+ 5. **Warm the cache** by fetching **pages** with a mobile and a desktop user agent, for the top URLs from analytics. Warming loaders does not warm HTML.
86
+ 6. **Traffic ladder** with written gates: 1% → 10% → 50% → 100%. At each step compare errors, `X-Cache` hit rate, 5xx rate, memory, and conversion per bucket.
87
+ 7. **Rollback** written down and rehearsed for each layer: traffic, code, content ([content-releases.md](./content-releases.md#rollback)).
88
+
89
+ ```bash
90
+ # warm-up: pages, both devices
91
+ while read -r path; do
92
+ for ua in "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) Mobile/15E148" \
93
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Chrome/139 Safari/537.36"; do
94
+ curl -s -o /dev/null -A "$ua" -w "%{http_code} %{time_total}s $path\n" "https://$HOST$path"
95
+ done
96
+ done < top-urls.txt
97
+ ```
98
+
99
+ ## First 72 hours
100
+
101
+ - Compare each metric with the **same hour the day before on the old site**, not with earlier the same day. Traffic shape changes by hour.
102
+ - When you remove an endpoint (telemetry, a beacon), keep it answering for at least the HTML cache TTL. Cached pages still call it.
103
+ - Feature flags: deploy the code that reads the new default first, then remove the old flag value.
104
+ - Path-filter CI jobs that run on every PR against a preview. One store's per-PR perf job cost 3,300 CI minutes a month and was deleted.
105
+ - Check each analytics vendor's own report against the same day last week ([seo-analytics.md](./seo-analytics.md#vendors-that-stop-silently)).
106
+ - Keep porting old-repo drift (see the freeze above).
@@ -0,0 +1,139 @@
1
+ # Proxy, headers and checkout
2
+
3
+ The worker sits in front of everything: store pages, a proxied checkout,
4
+ `/api`, media and, during the ramp, the old site. A header the new stack adds
5
+ or a proxy that behaves differently shows up as lost conversion, not as an
6
+ error. Always compare with the old site.
7
+
8
+ On v8 the framework ships no commerce proxy. A proxied checkout is the site's
9
+ own code in `createDecoWorker({ routes })`. What the worker does to every
10
+ response on the way out still applies to it:
11
+
12
+ - On an HTML response, it sets each of its security headers **only when the response has none**: `X-Content-Type-Options`, `Referrer-Policy`, `Permissions-Policy`, `X-XSS-Protection`, `Strict-Transport-Security`, `Cross-Origin-Opener-Policy: same-origin-allow-popups`, and a `Content-Security-Policy`: the site's `csp` option with Studio's origins added, or, with no `csp`, only a `frame-ancestors` listing Studio's origins. So a proxied page that sends no CSP of its own can then be framed only by Studio (no `X-Frame-Options` is sent).
13
+ - It sets `CDN-Cache-Control: no-store` on any response that names none.
14
+ - It keeps one `Set-Cookie` per cookie (name, Domain and Path).
15
+ - A `routes` response gets no `preload` hints.
16
+
17
+ ## Header diff against the old site
18
+
19
+ **What happened:** the v7 TanStack worker sent `Cross-Origin-Opener-Policy:
20
+ same-origin-allow-popups` on all HTML; the proxied checkout had none and the
21
+ old Fresh site never sent COOP. Every store → checkout navigation switched
22
+ browsing-context group: popups lost `window.opener`, `window.name` was wiped,
23
+ and WebKit reset its timing clock. v8 sends the same default.
24
+
25
+ Fix: set the header yourself on the responses that must not carry it. The
26
+ worker never overwrites a header the response already has.
27
+
28
+ ```ts
29
+ // in your routes proxy, on the proxied checkout's response
30
+ const out = new Response(upstream.body, upstream);
31
+ out.headers.set("Cross-Origin-Opener-Policy", "unsafe-none");
32
+ return out;
33
+ ```
34
+
35
+ For pages the app renders, set it in the route's `headers` (they reach the document response). If the
36
+ old site sent no COOP anywhere, decide it once for the whole site.
37
+
38
+ ```bash
39
+ for host in "$OLD" "$CANDIDATE"; do
40
+ for p in / /checkout/; do
41
+ echo "== $host$p"
42
+ curl -sI -A "Mozilla/5.0 Chrome/139" "$host$p" \
43
+ | grep -iE "cross-origin|content-security|permissions-policy|x-frame|referrer-policy|strict-transport"
44
+ done
45
+ done
46
+ ```
47
+
48
+ Any header the new stack adds that the old one did not is a parity risk on
49
+ same-origin navigations to proxied pages. The CSP is also the site's: pass it
50
+ as `createDecoWorker({ csp: { enforce, reportOnly, frameAncestors } })`
51
+ (**deco-tanstack-site**). Start with `reportOnly` if the old site had none.
52
+
53
+ ## Checkout HTML, 304 and bfcache
54
+
55
+ **What happened (two rounds):**
56
+
57
+ 1. A proxy forced `private, no-store` on the checkout HTML, so it was never restored from bfcache. "Back" reloaded in 3 to 10 s, lost the coupon or card, and fired the tag-manager steps again.
58
+ 2. Relaxing it to `private, no-cache, max-age=0, must-revalidate` made the browser store the HTML **with the platform's `Last-Modified`**. The next visit sent `If-Modified-Since`, the proxy passed it on, the platform answered 304, and the browser rendered a stale checkout. Anonymous conversion dropped from 28.8% to 23.8%.
59
+
60
+ Fix: on `GET` of the checkout paths, strip `If-Modified-Since` and
61
+ `If-None-Match` before proxying, and delete `Last-Modified` and `ETag` from the
62
+ checkout HTML. Keep `CDN-Cache-Control: no-store` (the worker's default).
63
+
64
+ ```bash
65
+ curl -sD- -o /dev/null -A "Mozilla/5.0 Chrome/139" \
66
+ -H "If-Modified-Since: Tue, 20 Oct 2026 00:00:00 GMT" "$CANDIDATE/checkout/" \
67
+ | grep -iE "^HTTP|last-modified|etag|cache-control"
68
+ # expect 200, no Last-Modified, no ETag
69
+ ```
70
+
71
+ 🧪 bfcache: DevTools → Application → Back/forward cache on the checkout, **on
72
+ a deployed preview**. A dev server's proxy may bypass the worker. In the
73
+ browser, `performance.getEntriesByType('navigation')[0].transferSize` of about
74
+ 300 bytes means a 304 was reused.
75
+
76
+ Large proxied bodies: stream them (`new Response(upstream.body, upstream)`);
77
+ never `await upstream.text()` on a whole page ([worker-runtime.md](./worker-runtime.md#memory-128-mb-per-isolate)).
78
+
79
+ ## Third-party checkout scripts
80
+
81
+ **What happened:** an inline shim fixed a JS error in a store's custom
82
+ checkout script. Unblocking that code path made a broken call post
83
+ `marketingData` and **remove the coupon**, and an order-form patch made a
84
+ payment guard swallow "place order". The old site never reached that code,
85
+ because the error stopped it first.
86
+
87
+ - Errors that also happen on the old site may be load-bearing. In checkout, parity beats correctness.
88
+ - Byte-compare the proxied checkout HTML, old against new, and list every injected inline script. Put each injection behind a flag you can turn off.
89
+ - Measure payment-method pick → transaction on both stacks before blaming the migration.
90
+ - A third party that posts the order form's marketing data replaces the whole object. Read, merge, then write, so UTMs and your own tags survive.
91
+ - Never `<link rel=prefetch>` a third-party script that the next page loads with `crossorigin`. A cache mismatch stopped one checkout from mounting for about 2 hours.
92
+ - Store cart and checkout must share the same order-form cookie.
93
+
94
+ ```bash
95
+ strip() { sed -E 's/[0-9a-f]{8,}//g; s/[0-9]{10,}//g'; }
96
+ diff <(curl -s "$OLD/checkout/" | strip) <(curl -s "$CANDIDATE/checkout/" | strip) | head -50
97
+ ```
98
+
99
+ ## Bugs that only exist on the real host
100
+
101
+ Previews on a `workers.dev` or preview domain miss them.
102
+
103
+ | Symptom | Root cause |
104
+ |---|---|
105
+ | server-side calls to `https://www.<domain>` hit the old site | a Worker's fetch to its own public hostname does not run the Worker again; it goes to the zone's origin |
106
+ | tags or analytics behave differently in production | tags gated on the hostname |
107
+ | a Studio draft link shows the release on the real host | once a release carries `previewHosts` (Studio writes them), drafts preview only on those hosts plus `createCMS({ preview: { hosts } })`; any other host gets the release |
108
+
109
+ ```bash
110
+ grep -rn "https://www\.<domain>" src # server-side self-fetch, host checks
111
+ ```
112
+
113
+ For every hit of the domain in `src/`, ask: what changes when the host **is**
114
+ this one? Test with the production `Host` before the route goes live.
115
+
116
+ ## Self-redirect loop on encoded paths
117
+
118
+ **What happened on v7 TanStack sites:** the router compared the request's
119
+ path with the one it would build and redirected on a mismatch. Braces were not
120
+ re-encoded, so `/{x}` → 307 `/{x}` → the browser re-encodes → loop
121
+ (`ERR_TOO_MANY_REDIRECTS`, ~17k 307s a day from one login modal's
122
+ `<img src="{{qRCodeUrl}}">`). The v8 worker adds no guard for this. If the
123
+ fuzz below loops, answer such paths with a 404 in `routes`, before the router.
124
+
125
+ ```bash
126
+ for p in '/%7Bx%7D' '/x%7B' '/foo-%7Bx%7D-1/p' '/%5Bx%5D' '/%7Cx' '/%5Ex' '/a%20b'; do
127
+ curl -s -o /dev/null -L --max-redirs 10 -A "Mozilla/5.0 Chrome/139" \
128
+ -w "$p %{http_code} hops=%{num_redirects}\n" "$CANDIDATE$p"
129
+ done # 5 or more hops (or curl error 47) is a loop
130
+ ```
131
+
132
+ It is not only braces: `^` also looped on one store. Fuzz every character the
133
+ router may decode and not re-encode.
134
+
135
+ ## Requests the worker answers itself
136
+
137
+ - `/deco/_liveness` answers `OK`. Use it for uptime checks, not `/`.
138
+ - `/deco/*`, `/live/*` and `/.decofile` answer 404 (v7's admin paths). Old tooling or monitors that call them see 404s; update them. During a ramp this also affects the old site ([traffic-ramp.md](./traffic-ramp.md#traps)).
139
+ - A page request with `Authorization` answers `Cache-Control: private, no-cache, no-store, must-revalidate`, whatever the app set.
@@ -0,0 +1,150 @@
1
+ # QA checklist template
2
+
3
+ Fill this from the [inventory](./qa-inventory.md). Keep only the sections the
4
+ site has, put a real file and a real URL in each row, and add a row for every
5
+ site-specific block the template doesn't cover. Mark the purchase path (home →
6
+ listing → product → cart → checkout) as P0.
7
+
8
+ Record PASS / FAIL / N/A per row. "Not checked" is not N/A.
9
+
10
+ Test every interactive row twice: after a full load (F5) and after reaching
11
+ the page by a **SPA click** ([react-spa.md](./react-spa.md)).
12
+
13
+ ## A. Build and content
14
+
15
+ | # | Test | How to verify | Where |
16
+ |---|---|---|---|
17
+ | A1 | Build succeeds | the site's build script exits 0 | `vite.config.ts` / `next.config.*` |
18
+ | A2 | Schema is current | `deco schema --check` exits 0 | `.deco/schema.gen.json` |
19
+ | A3 | Content fits the schema | `deco check` (and `--draft=<name>` for the draft under test): 0 errors | `.deco/blocks` |
20
+ | A4 | Every saved block type exists | `deco check` reports no `no saved block or block type` | `.deco/index.ts` |
21
+ | A5 | Dev server starts clean | no errors in the terminal or the browser console | worker entry, root route |
22
+
23
+ ## B. Page loads (one row per route template)
24
+
25
+ | # | Test | How to verify | Route |
26
+ |---|---|---|---|
27
+ | B1 | Home renders every section | visual check, console clean | `/` |
28
+ | B2 | Listing renders the product grid | a real category URL | catch-all |
29
+ | B3 | Product page renders every section | a real product URL, one with and one without optional blocks | catch-all |
30
+ | B4 | Search renders results and the empty state | a real term, then nonsense | catch-all or search route |
31
+ | B5 | Institutional pages render | one per template | catch-all |
32
+ | B6 | Not found is a real 404 | `curl -o /dev/null -w '%{http_code}'` on a made-up path → 404 | catch-all |
33
+ | B7 | A lazy section loads and its fallback is sane | throttle the network; scroll to it | lazy blocks |
34
+
35
+ ## C. Header
36
+
37
+ | # | Test | How to verify |
38
+ |---|---|---|
39
+ | C1 | Announcement bar renders (and rotates, if it does) | visual |
40
+ | C2 | Menu opens on mobile, closes on Escape and on the overlay | click, key, click |
41
+ | C3 | Mega-menu opens on hover on desktop | hover each top item |
42
+ | C4 | Search opens, suggests the **typed** term, submits | type a product name |
43
+ | C5 | Minicart opens; the badge counts items | add an item |
44
+ | C6 | Login or account entry works | click it, signed out and signed in |
45
+
46
+ ## D. Sliders and carousels (one row per instance)
47
+
48
+ | # | Test | How to verify |
49
+ |---|---|---|
50
+ | D1 | Previous and next work | click the arrows |
51
+ | D2 | Dots work | click the dots |
52
+ | D3 | Autoplay advances, if configured | wait one interval |
53
+ | D4 | Listeners are cleaned up | navigate away and back 3×; listener count stays flat |
54
+
55
+ ## E. Product page
56
+
57
+ | # | Test | How to verify |
58
+ |---|---|---|
59
+ | E1 | Gallery loads; zoom works | click or hover the main image |
60
+ | E2 | Variant picker changes the SKU, price and URL, and stays on the site | pick each dimension |
61
+ | E3 | Product → product by SPA click shows the new product's images at once | click a related product |
62
+ | E4 | Buy button adds the item, shows a loading state, opens the minicart | click once; double click adds once |
63
+ | E5 | Shipping estimate returns options; the URL doesn't change | enter a postal code |
64
+ | E6 | Out-of-stock state shows; buy button disabled | an unavailable SKU |
65
+ | E7 | Reviews, recommendations, wishlist, share render or fail quietly | each block present on the page |
66
+ | E8 | Breadcrumb links work | click each item |
67
+
68
+ ## F. Cart
69
+
70
+ | # | Test | How to verify |
71
+ |---|---|---|
72
+ | F1 | Items show image, name, price, quantity | add two different items |
73
+ | F2 | Quantity change and remove update the total | +, −, remove |
74
+ | F3 | Coupon applies and survives a reload | a valid and an invalid code |
75
+ | F4 | Free-shipping progress updates | add items near the threshold |
76
+ | F5 | **Change quantity, then go to checkout within 300 ms**: checkout shows the new quantity | WebKit and Chromium |
77
+ | F6 | Checkout button reaches checkout with the same cart | compare the order form |
78
+
79
+ ## G. Listing and search
80
+
81
+ | # | Test | How to verify |
82
+ |---|---|---|
83
+ | G1 | Filters apply; from page 2 they reset to page 1 | apply a filter on page 2 |
84
+ | G2 | Sort reorders and keeps the filters | change sort with a filter on |
85
+ | G3 | Pagination or "load more" works and keeps `q` and `sort` | page 2, 3 |
86
+ | G4 | Price range filter works | slider or inputs |
87
+ | G5 | Empty result shows the fallback | a nonsense term |
88
+ | G6 | Cards link to the product; discount flags render | click, visual |
89
+ | G7 | Title, description, canonical and `rel=next/prev` match the old site | view source on page 1 and 2 |
90
+
91
+ ## H. Modals and drawers
92
+
93
+ One row per drawer or modal in the inventory: it opens, closes on Escape,
94
+ closes on the overlay and on its close button, and opens again after a SPA
95
+ navigation.
96
+
97
+ ## I. Footer
98
+
99
+ | # | Test | How to verify |
100
+ |---|---|---|
101
+ | I1 | Newsletter submits and shows success and error | a valid and an invalid email |
102
+ | I2 | Links, social icons and payment icons render | visual; links open the right targets |
103
+ | I3 | Back-to-top works | click |
104
+
105
+ ## J. Content editing (Studio)
106
+
107
+ | # | Test | How to verify |
108
+ |---|---|---|
109
+ | J1 | Each block type in use has a usable form | open one of each in Studio (**deco-cms-schema**) |
110
+ | J2 | A draft previews on the hosts editors use | `deco drafts url <name>` → the page shows the draft |
111
+ | J3 | A preview is never cached | the draft response has `Cache-Control: max-age=0, no-cache, must-revalidate` and `X-Robots-Tag: noindex, nofollow` |
112
+ | J4 | A publish reaches the live site within about a minute | publish a small change; reload |
113
+ | J5 | Each running test and campaign renders both sides | preview links with `__test` / `__campaign` (**deco-variants**) |
114
+
115
+ ## K. Analytics
116
+
117
+ | # | Test | How to verify |
118
+ |---|---|---|
119
+ | K1 | Tag manager loads from `<head>` without a gesture | network panel, no interaction |
120
+ | K2 | Page view fires on load **and** on SPA navigation | `dataLayer` after a click |
121
+ | K3 | `view_item`, `select_item`, `add_to_cart` fire with the old payload shape | compare with the old site |
122
+ | K4 | Every vendor in the inventory receives events | its own dashboard the next day |
123
+
124
+ ## L. Console and network health
125
+
126
+ | # | Test | What to look for |
127
+ |---|---|---|
128
+ | L1 | No hydration errors | React #418, #423, #425; "did not match" warnings |
129
+ | L2 | No hook-order errors | React #310 on product → product |
130
+ | L3 | No `Cannot read properties of undefined` | a loader result without a guard |
131
+ | L4 | No 404 on `/assets/*` after a deploy | keep a tab open across a deploy |
132
+ | L5 | No duplicate upstream calls per page | the server log or `http.client.request.duration` per provider (**deco-storefront-performance**) |
133
+
134
+ ## M. Performance and cache sanity
135
+
136
+ | # | Test | How to verify |
137
+ |---|---|---|
138
+ | M1 | Browser heap stays flat over 10 SPA navigations | DevTools Memory |
139
+ | M2 | Minicart open/close 10× leaves the heap flat | heap snapshots before and after |
140
+ | M3 | Anonymous pages send no `Set-Cookie` except the first-visit `deco_segment` | `curl -sI` without cookies |
141
+ | M4 | The second anonymous request is a cache hit | `X-Cache: HIT` from the site's page cache (**deco-storefront-caching**) |
142
+ | M5 | Lazy sections load their chunk only when needed | network panel while scrolling |
143
+
144
+ ## Adapting it
145
+
146
+ 1. Remove the sections the site doesn't have.
147
+ 2. Add a section per site-specific feature (configurators, calculators, store locators, wizards): open, use, result, error.
148
+ 3. Swap platform rows (cart, checkout, shipping) for the site's commerce platform.
149
+ 4. Add rows for bugs found in earlier rounds.
150
+ 5. For end-to-end purchase tests that run in CI, see the **ecommerce-qa** skill in decocms/storefront-skills (the `@decocms/qa` engine). Its stack detection was written for older sites; check it recognizes a v8 site before relying on it.
@@ -0,0 +1,120 @@
1
+ # QA inventory: what this site actually has
2
+
3
+ A QA checklist is only useful when it is scoped to the site: no rows for
4
+ features it doesn't have, and a row for every block, route and interaction it
5
+ does have. Build the inventory first, then fill
6
+ [qa-checklist-template.md](./qa-checklist-template.md) from it.
7
+
8
+ Run everything from the site root (the folder that holds `.deco/`). Pull
9
+ production content first so `.deco/blocks` matches what is live:
10
+
11
+ ```bash
12
+ deco pull # production into .deco/blocks (see deco-site-workflow)
13
+ ```
14
+
15
+ ## 1. Health: schema and content
16
+
17
+ ```bash
18
+ deco schema --check # .deco/schema.gen.json is up to date with the block types
19
+ deco check # production content against the schema: 0 errors
20
+ ```
21
+
22
+ Every error here is a page that renders wrong. Fix them before QA starts, or
23
+ list them as known issues.
24
+
25
+ ## 2. Block types (the block map)
26
+
27
+ `.deco/index.ts` (or `.tsx`) exports the block map, the types `deco schema` turns into
28
+ Studio forms. Each key is a block type editors can pick.
29
+
30
+ ```bash
31
+ sed -n '1,200p' .deco/index.ts* # read the map and where each entry comes from
32
+ ```
33
+
34
+ Then count which types the content really uses. Types in the map that no
35
+ saved block uses need no QA row; types used everywhere need one per place.
36
+
37
+ ```bash
38
+ jq -r '.. | objects | .["__resolveType"]? // empty' .deco/blocks/*.json | sort | uniq -c | sort -rn
39
+ ```
40
+
41
+ ## 3. Pages and routes
42
+
43
+ Each saved page block has a `path` (a literal, `:name` segments, or a
44
+ trailing `*`). The site's catch-all route matches a URL against them with
45
+ `matchRoute`; other routes are the framework's own (TanStack `src/routes/`,
46
+ Next.js `app/`).
47
+
48
+ ```bash
49
+ jq -r 'select(.path) | "\(.path)\t\(input_filename | split("/") | last)"' .deco/blocks/*.json | sort
50
+ ls src/routes 2>/dev/null; find app -name 'page.tsx' 2>/dev/null
51
+ ```
52
+
53
+ For each template, pick one real URL (a real product slug, a real category)
54
+ for the checklist. Add the page types every store has even if the template is
55
+ generic: home, listing, product, search, not found, institutional.
56
+
57
+ ## 4. Redirects, experiments, campaigns
58
+
59
+ ```bash
60
+ jq '.redirects | length' .deco/blocks/Redirects.json 2>/dev/null # rules to sweep
61
+ jq . .deco/blocks/experiments.json .deco/blocks/campaigns.json 2>/dev/null # the saved blocks every test and campaign rule reads
62
+ grep -rl '"multivariate"' .deco/blocks | head # pages with variants
63
+ ```
64
+
65
+ Each running test or campaign needs a row per side: force each with a Studio
66
+ preview link (`__test`, `__campaign` on a draft link). **deco-variants** has
67
+ the details.
68
+
69
+ ## 5. Interactive components
70
+
71
+ ```bash
72
+ # client state and effects
73
+ grep -rlE "useState|useEffect|useReducer|useSyncExternalStore" src --include='*.tsx'
74
+ # event handlers
75
+ grep -rlE "onClick|onChange|onSubmit|addEventListener" src --include='*.tsx'
76
+ # direct DOM access (fragile under React)
77
+ grep -rlE "document\.(getElementById|querySelector)" src --include='*.tsx' --include='*.ts'
78
+ # inline scripts (test by SPA click, not only F5)
79
+ grep -rlE "useScript\(|useScriptAsDataURI\(|inlineScript\(|<script" src
80
+ ```
81
+
82
+ Group the hits by UI: header (menu, search, minicart), sliders, product page
83
+ (gallery, variant picker, buy button, shipping estimate), cart, listing
84
+ (filters, sort, pagination), modals and drawers, footer (newsletter).
85
+
86
+ ## 6. Server functions and loaders
87
+
88
+ Server functions replace v7's `/deco/invoke`. Each one is a request the
89
+ browser makes and a thing that can be cancelled by navigation.
90
+
91
+ ```bash
92
+ grep -rn "createServerFn" src | cut -d: -f1 | sort | uniq -c # TanStack
93
+ grep -rln '"use server"' src app 2>/dev/null # Next.js
94
+ ```
95
+
96
+ Mark the ones that write (cart, newsletter, login): they need a "write then
97
+ navigate at once" row ([react-spa.md](./react-spa.md#server-functions-cancelled-on-navigation)).
98
+
99
+ ## 7. Integrations
100
+
101
+ ```bash
102
+ jq -r '.dependencies // {} | keys[]' package.json | grep -E "^@decocms/" # apps-vtex, apps-shopify, …
103
+ grep -rliE "dataLayer|sendEvent|DECO\.events" src | head # analytics
104
+ grep -rliE "<vendor names you know of: reviews, chat, search, consent>" src
105
+ ```
106
+
107
+ Each integration gets a row: it loads, it receives events, and it fails
108
+ without breaking the page.
109
+
110
+ ## 8. Old-site behaviors
111
+
112
+ If the site was ported, diff the inventory against the old repo too: a
113
+ feature that exists there and has no row here was either dropped (get
114
+ sign-off) or forgotten ([process.md](./process.md#inventory-of-what-was-not-ported)).
115
+
116
+ ## Output
117
+
118
+ Write the inventory down as a short table before the checklist: block type →
119
+ pages that use it → component file. That table is what makes each checklist row
120
+ point at a real file and a real URL.