@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,91 @@
1
+ # Content hygiene: fields that should not exist
2
+
3
+ A form is easier to use with fewer, better fields. This file covers what to
4
+ render when fields are empty, which fields to remove, and how to remove one
5
+ without breaking saved content.
6
+
7
+ ## Render something sensible with empty props
8
+
9
+ A new block starts with nothing filled in, and an optional prop arrives as
10
+ `undefined`. The section must not throw and should not render blank: a
11
+ realistic default is how an editor learns what a field is for.
12
+
13
+ Declare `DEFAULT_*` constants for what optional fields fall back to, and use
14
+ them once, where props enter the component, instead of scattering
15
+ `?? something` through the JSX.
16
+
17
+ ```tsx
18
+ const DEFAULT_TITLE = "New arrivals";
19
+
20
+ export function Shelf({ title = DEFAULT_TITLE, products = [] }: Props) {
21
+ // โ€ฆ
22
+ }
23
+ ```
24
+
25
+ `@default` only writes `default` into the schema. It does not change what
26
+ your component receives for content saved without the field, so keep the code
27
+ default too.
28
+
29
+ ## Dead fields: the editor sets them, nothing happens
30
+
31
+ A field that reaches no DOM attribute is worse than a missing one. The editor
32
+ changes it, sees no effect, and decides the CMS is broken.
33
+
34
+ They pile up when a shared type is reused for a narrower purpose: a `Cta` type
35
+ with `buttonStyle`, `backgroundColor`, `hoverColor` and `showArrowIcon`,
36
+ attached to a section that only reads `url` and `text`. Give that section its
37
+ own narrower type.
38
+
39
+ Check the result in `.deco/schema.gen.json`, not in the `.tsx` diff: every
40
+ removed field gone from the block's definition, every kept field still there.
41
+
42
+ ## Layout controls posing as content
43
+
44
+ A field should carry an editorial decision: which image, which text, which
45
+ color, how many items. Not a layout one: card width in pixels, a desktop gap
46
+ and a separate mobile gap as raw numbers.
47
+
48
+ The test: remove the field and fix one value in the component. Does the
49
+ editor lose a decision they really need to make? If not, it is not a prop.
50
+ One content review removed a set of these because every editor used the same
51
+ value anyway. The fields only added a way to break the layout by accident.
52
+
53
+ When a developer escape hatch has to stay visible, end its `@title` with
54
+ "(advanced)" so editors can tell it from fields meant for daily use.
55
+
56
+ ## Removing or renaming a field with saved content
57
+
58
+ `deco check` rejects a key that the code does not declare. Keys starting with
59
+ `_`, `$` or `@` are exempt. So deleting or renaming a prop makes every saved
60
+ block that still has the old key fail `deco check`.
61
+
62
+ Two safe paths:
63
+
64
+ - **Migrate the content in the same change.** Update the saved blocks so no
65
+ value uses the old key, run `deco check`, and ship both together. How to
66
+ edit content and send it as a draft is in the `deco-site-workflow` skill.
67
+ - **Retire the field first.** Keep it in the type with `@hide` and
68
+ `@deprecated`, with a `//` comment saying what replaced it. Content keeps
69
+ validating; editors no longer see it. Delete it once no content uses it.
70
+
71
+ `@ignore` is not a way to retire a field: it removes the field from the
72
+ schema, so saved values fail `deco check` just as if it were deleted.
73
+
74
+ ## Placeholder content
75
+
76
+ Blocks left with lorem ipsum, placeholder image URLs, or hidden on the page
77
+ render nothing useful and clutter the form with entries an editor cannot tell
78
+ from real ones. Delete them before handing the site over.
79
+
80
+ ## Structure
81
+
82
+ - Past about 30โ€“40 lines of `Props`, or once there are two or more nested
83
+ types (an array item, a variant union), move the types to a sibling
84
+ `types.ts`. Types only, no logic.
85
+ - More than about eight top-level fields with no grouping reads as a wall of
86
+ inputs. Group them into named nested objects (`/** @title Colors */ colors:
87
+ {โ€ฆ}`).
88
+ - When two or more sections need the same piece of form (same field, same
89
+ label, same `@description`), extract a shared type and compose it. Image
90
+ pairs (desktop and mobile) and autoplay settings are the usual candidates.
91
+ Sections that should behave the same drift apart otherwise.
@@ -0,0 +1,112 @@
1
+ # Formats and widgets
2
+
3
+ A field's `format` picks its widget in Studio. There are three ways to set it:
4
+
5
+ 1. `@format` on the **field** itself. This always wins.
6
+ 2. A **widget alias** as the field's type (`image: ImageWidget`).
7
+ 3. `@format` on a **type alias** the field uses. It applies only when no
8
+ widget alias already set a format.
9
+
10
+ All three end up as the same `format` string in `.deco/schema.gen.json`.
11
+
12
+ ## Widget aliases
13
+
14
+ `deco schema` matches these by **name, as written on the prop**
15
+ (`WIDGET_TYPE_FORMATS` in `typeToSchema.ts`). Each is a `string`.
16
+
17
+ | Alias | `format` |
18
+ |---|---|
19
+ | `ImageWidget` | `image-uri` |
20
+ | `VideoWidget` | `video-uri` |
21
+ | `HTMLWidget` | `html` |
22
+ | `RichText` | `rich-text` |
23
+ | `Color` | `color` |
24
+ | `TextArea` | `textarea` |
25
+ | `Code` | `code` |
26
+ | `DateTimeWidget` | `date-time` |
27
+ | `Secret` | `password` |
28
+
29
+ Where to get them:
30
+
31
+ - `@decocms/compat-v7/types/widgets` (also re-exported from
32
+ `@decocms/compat-v7/types` and `@decocms/compat-v7`) exports `ImageWidget`,
33
+ `VideoWidget`, `HTMLWidget`, `RichText`, `TextArea`, `Color`, `Secret`, plus
34
+ `TextWidget` and `ButtonWidget`.
35
+ - `Code` and `DateTimeWidget` are not exported there. Because the match is by
36
+ name, a site can declare `type Code = string` itself and get the widget.
37
+ - `TextWidget` and `ButtonWidget` have no format. They are plain text fields.
38
+
39
+ The alias also works inside the annotation: `ImageWidget[]` sets the format on
40
+ the items, and `ImageWidget | null` or an optional field works too. The match is a whole
41
+ word, so `BrandColor` does not count as `Color`.
42
+
43
+ Other names are not guessed from. For a `BrandColor` alias, put
44
+ `@format color` on the alias or on the field.
45
+
46
+ `Secret` is a masked text box, nothing more. The value is a plain string saved
47
+ in content. Real credentials belong in the deploy platform's secrets, read by
48
+ the site's code.
49
+
50
+ ## `@format` on a type alias
51
+
52
+ `@format` on a type alias reaches every field typed with it, including a
53
+ literal select and arrays of it. A field's own `@format` still wins.
54
+
55
+ ```ts
56
+ /** @format color */
57
+ type TextTone = "black" | "white";
58
+
59
+ interface Props {
60
+ /** @title Text color */
61
+ tone: TextTone; // select with format "color"
62
+ /** @title Palette */
63
+ palette: TextTone[]; // items get format "color"
64
+ }
65
+ ```
66
+
67
+ ## `@format` values
68
+
69
+ The generator passes any `@format` value through unchanged, except `datetime`,
70
+ which it rewrites to `date-time` (`FORMAT_ALIASES`).
71
+
72
+ `deco check` validates only three formats on saved content:
73
+
74
+ | `@format` | `deco check` accepts |
75
+ |---|---|
76
+ | `date` | A real calendar date, `YYYY-MM-DD` |
77
+ | `date-time` | A date, `T` or a space, and a time; seconds and zone optional |
78
+ | `uri` | A parseable URL with a scheme |
79
+
80
+ Every other format (`image-uri`, `color`, `rich-text`, `textarea`, `html`โ€ฆ)
81
+ names a widget, not a rule. `deco check` accepts any string there.
82
+
83
+ Whether Studio draws a special widget for a format outside the alias table is
84
+ Studio's decision, not the generator's. Open the form and look before you rely
85
+ on one.
86
+
87
+ `@format dynamic-options` is kept in the schema, but in v8 it gives a text
88
+ field: the site editor never runs site code, so there are no suggestions. See
89
+ the `@options` section of [annotations.md](./annotations.md).
90
+
91
+ ## Picking a text widget
92
+
93
+ - **`RichText`** when the editor needs bold or an inline link. One rich-text
94
+ field beats a text field plus a separate URL field.
95
+ - **`TextArea`** for plain running text.
96
+ - A bare `string` for one line.
97
+ - **`HTMLWidget`** only for markup pasted from elsewhere. It gives the least
98
+ protection against an editor breaking the page.
99
+
100
+ ## Never a bare string where a widget exists
101
+
102
+ A `videoSrc: string` renders as a text box that asks an editor for a URL. Use
103
+ `VideoWidget`. The same goes for images (`ImageWidget`) and colors (`Color`):
104
+ no free-text field holding an image URL, no raw hex string without a color
105
+ picker.
106
+
107
+ Name the field for what it holds. Once a field is titled "Video (MP4 URL)",
108
+ editors keep pasting URLs even after a picker arrives. Title it "Video
109
+ (desktop)" and say in `@description` what an empty value does.
110
+
111
+ For what an image field's `@description` should say about sizes, see the
112
+ `deco-images-media` skill.
@@ -0,0 +1,165 @@
1
+ # Shapes that break the form
2
+
3
+ These shapes compile, pass review and generate a schema. They fail in front
4
+ of an editor, or in production on content an editor saved.
5
+
6
+ ## Nest a one-to-many relation. Never link it by a typed key.
7
+
8
+ If an item belongs to exactly one group, the items live inside the group.
9
+
10
+ ```ts
11
+ // Good: a column owns its links
12
+ /** @titleBy heading */
13
+ export interface FooterColumn {
14
+ /** @title Heading */
15
+ heading: string;
16
+ /** @title Links */
17
+ links: FooterLink[];
18
+ }
19
+
20
+ // Bad: two sibling arrays joined by a key the editor types from memory
21
+ tabs: { label: string; key: string }[];
22
+ cards: { caption: string; tabKey?: string }[];
23
+ ```
24
+
25
+ The bad shape fails three ways. The typed key has no autocomplete. A
26
+ mismatched key makes a card vanish from its tab with no visible error. And the
27
+ two arrays have to be kept in sync by hand. Use sibling arrays plus a key only
28
+ when the relation is really many-to-many, which is rare in editorial content.
29
+
30
+ ## Two sibling fields with the same anonymous inline type
31
+
32
+ ```ts
33
+ // Bad
34
+ collection?: { collectionId: string } | { skuId: string };
35
+ collection2?: { collectionId: string } | { skuId: string };
36
+ ```
37
+
38
+ Both fields produce identical inline schemas (the generator gives a shared
39
+ `$ref` only to named types). On the v7 Studio this shape made both fields
40
+ share one form state: typing into the first mirrored into the second, and it
41
+ shipped on live content. That bug has not been checked on the v8 Studio.
42
+
43
+ Either way, numbered sibling slots are the wrong shape. Use a list, so each
44
+ entry is its own node:
45
+
46
+ ```ts
47
+ /** @titleBy label */
48
+ export interface Companion {
49
+ /** @title Label */
50
+ label: string;
51
+ /** @title Collection ID */
52
+ collectionId?: string;
53
+ }
54
+
55
+ interface Props {
56
+ /** @title Companion products */
57
+ products?: Companion[];
58
+ }
59
+ ```
60
+
61
+ If saved content still uses the old fields, keep them with `@hide @deprecated`
62
+ until the content is migrated. See [content-hygiene.md](./content-hygiene.md).
63
+
64
+ ## Arrays from content can hold holes
65
+
66
+ The type says `T[]`. At runtime an entry can still be:
67
+
68
+ - `null`, saved in content, or returned by a block in that slot;
69
+ - an object with fields missing: an empty row an editor saved, or content
70
+ written before a field was added.
71
+
72
+ In v8, when a block inside an array resolves to `undefined` (for
73
+ example a `multivariate` with no matching rule), the resolver drops that entry
74
+ and the array gets shorter. `null` values are still kept.
75
+
76
+ `deco check` reports a `null` where the item type is not nullable, and missing
77
+ required fields. Run it, but do not count on it: content changes after deploy.
78
+
79
+ Compact once, where the data enters the component, before any `.map`,
80
+ `.filter` or `.find`:
81
+
82
+ ```ts
83
+ const isPresent = <T>(value: T | null | undefined): value is T => value != null;
84
+ const links = (props.links ?? []).filter(isPresent);
85
+ ```
86
+
87
+ Prefer a type guard like this over `.filter(Boolean)`. `Boolean` works at
88
+ runtime but does not narrow the type, so you cast afterwards. On a list of
89
+ primitives it also drops legitimate `0`, `""` and `false`.
90
+
91
+ This matters most in a section on every page (header, footer). One unhandled
92
+ hole there breaks every page, not one section.
93
+
94
+ How multivariate blocks are written and previewed is in the `deco-variants`
95
+ skill.
96
+
97
+ ## Variants: a union of types, not an enum plus dead fields
98
+
99
+ When a field can take really different structures, model it as a union of
100
+ named types, each with a `@title`. The editor picks a member and sees only
101
+ its fields, instead of an `aspectRatio` box that does nothing under every
102
+ other choice. See [types-to-fields.md](./types-to-fields.md) for how members
103
+ get their labels.
104
+
105
+ ```ts
106
+ /** @title Wide */
107
+ export interface WideLayout {
108
+ /** @hide */
109
+ kind: "wide";
110
+ /** @title Aspect ratio */
111
+ aspectRatio: string;
112
+ }
113
+
114
+ /** @title Contained */
115
+ export interface ContainedLayout {
116
+ // Nothing to set: this is the default crop. The literal keeps the type
117
+ // from being empty (see below).
118
+ /** @hide */
119
+ kind: "contained";
120
+ }
121
+
122
+ interface Props {
123
+ /** @title Layout */
124
+ layout?: WideLayout | ContainedLayout;
125
+ }
126
+ ```
127
+
128
+ Details that keep this safe on a section that already has content:
129
+
130
+ - **Do not leave a member empty.** In v8 an object field also offers every
131
+ block whose return type fits it (TypeScript assignability, see
132
+ [types-to-fields.md](./types-to-fields.md)). An empty interface accepts any
133
+ object, so every block that returns an object would show up as a choice.
134
+ A single string literal field fixes it. The generator gives a literal an
135
+ equal `default`, so the editor writes it into new entries, and a hidden
136
+ field with a default stays required.
137
+ - **Switch on the literal** at runtime (`layout?.kind === "wide"`), and treat
138
+ any other value as the default member.
139
+ - **Adding `kind` to a union that already has content** makes old entries
140
+ fail `deco check` (a required field is missing) until each saved value gets
141
+ its `kind`. Run `deco check` and fix the content in the same change.
142
+ - **Keep the prop optional.** Content saved before the union existed has no
143
+ value, and `deco check` would report a missing required field.
144
+ - **Title every member** in the editor's language.
145
+
146
+ When each member of a string union needs a matching value, pair it with a
147
+ `Record<Union, โ€ฆ>`. The compiler then refuses a new option without its
148
+ counterpart.
149
+
150
+ ```ts
151
+ type Tone = "light" | "dark";
152
+ const TONE_CLASS: Record<Tone, string> = { light: "bg-white", dark: "bg-black" };
153
+ ```
154
+
155
+ ## Free text is untrusted input
156
+
157
+ A text field is the one place TypeScript cannot help: the editor can type
158
+ anything. If the code parses it (a number, a JSON value, a facet key, a URL),
159
+ guard the parse at the consumer and fall back to a default. On a section
160
+ that renders on every page or on the home page, a bad value breaks the whole
161
+ page. One incident came from an editor typing a platform-specific facet key
162
+ into a free-text field.
163
+
164
+ If the value has a closed set of choices, make it a select instead
165
+ (a literal union or `@options`).
@@ -0,0 +1,112 @@
1
+ # What each TypeScript shape becomes
2
+
3
+ `typeToJsonSchema` in `packages/blocks/src/v8/cli/schema/typeToSchema.ts`
4
+ turns the props type into JSON Schema; Studio draws the form from that. When a
5
+ field comes out as the wrong kind, find its shape here, then read the block's
6
+ entry in `.deco/schema.gen.json` to confirm.
7
+
8
+ ## Primitives and selects
9
+
10
+ | Type | Field |
11
+ |---|---|
12
+ | `string` | Text (or a widget, see [formats-and-widgets.md](./formats-and-widgets.md)) |
13
+ | `number` | Number |
14
+ | `boolean`, `true \| false` | Boolean |
15
+ | `"a" \| "b"`, a string `enum` | Select: `type: "string"` with `enum`, in the order the type spells them |
16
+ | `1 \| 2 \| 3` | Number select |
17
+ | A single string literal, `kind: "image"` | `const` with an equal `default`, so new entries get the value |
18
+ | `T \| null`, `T \| undefined` | `T` with `nullable: true` |
19
+ | `prop?: T` | `T`, left out of `required` |
20
+ | `string & { brand }` | The primitive (`string`) |
21
+ | `any`, `unknown` | An empty schema: no usable field |
22
+
23
+ A literal union, written inline or through a type alias, lists its choices
24
+ in the order you wrote them, even when the checker met the literals in
25
+ another order.
26
+
27
+ ## Objects, lists and maps
28
+
29
+ | Type | Field |
30
+ |---|---|
31
+ | An interface or object type | A group of fields, in declaration order |
32
+ | `T[]` | A list of `T` |
33
+ | `A & B` (objects) | One group with the fields of both |
34
+ | `Record<string, T>` | A map: `additionalProperties` of `T` |
35
+ | `Record<string, any>` | A free-form map. It does not offer blocks |
36
+ | A type that contains itself (`Link { submenu?: Link[] }`) | A `$ref` to its shared definition |
37
+
38
+ ## Unions of objects: the variant picker
39
+
40
+ `A | B` where the members are objects becomes `anyOf`: the editor picks one
41
+ member and fills in that member's fields. Each member's label comes from, in
42
+ order:
43
+
44
+ 1. `@title` on the member's interface or type alias;
45
+ 2. the type's name (`WideLayout`);
46
+ 3. the value of the first literal property (`kind: "wide"` โ†’ "wide").
47
+
48
+ An anonymous member with none of these has no label. Give every member a
49
+ `@title` in the editor's language: the picker shows those strings.
50
+
51
+ A union that mixes primitives and objects (`string | Banner`) is also an
52
+ `anyOf`, of a text field and a group.
53
+
54
+ ## Sections, lazy values and blocks
55
+
56
+ | Type | Field |
57
+ |---|---|
58
+ | `ReactNode`, `ReactElement`, `JSX.Element` | A section picker |
59
+ | `ReactNode[]` | A list of sections |
60
+ | A render descriptor (`{ component; props }`) | A section picker |
61
+ | v7's opaque `Section` / `Section[]` (`type Section = any`) | A section picker / list |
62
+ | `Lazy<T>` | A `lazy` block whose `value` has the form of `T` |
63
+
64
+ An object or list field that a block can fill gets three kinds of choice:
65
+ a saved block ("Select from saved"), "Inline data" (the plain form), and every
66
+ block whose function's awaited return type fits the field. Sections and
67
+ matchers are never offered here. "Fits" is TypeScript assignability, not the
68
+ type's name. So a `products: Product[]` field offers every loader that returns
69
+ `Product[]`. Two exceptions:
70
+
71
+ - A type whose fields are all optional (`{ size?: number }`) would accept
72
+ almost any object. For such a type a block must return the same named type.
73
+ - A `Record<string, any>` field offers no blocks, because every block would
74
+ fit.
75
+
76
+ How to write lazy blocks and sections is in the `deco-site-authoring` skill.
77
+
78
+ ## Props that never reach the form
79
+
80
+ These are skipped:
81
+
82
+ - methods and other function-typed props (but `Lazy<T>` is a field);
83
+ - `__resolveType`, any name starting with `$`, and `@type`;
84
+ - React internals: `ref`, `then`, `catch`, `finally`, `$$typeof`, `_owner`,
85
+ `_store`;
86
+ - symbol keys;
87
+ - anything tagged `@ignore`.
88
+
89
+ Names starting with `_` are kept: `__title` labels a list entry, `_id` is
90
+ site data.
91
+
92
+ Platform types from the TypeScript lib (`URL`, `URLSearchParams`, `Request`,
93
+ `Response`, `Headers`, `AbortSignal`, `ReadableStream`, `WritableStream`,
94
+ `Blob`, `File`, `FormData`) become a hidden object. Nobody edits them in a
95
+ form.
96
+
97
+ ## `required`
98
+
99
+ A prop that is not optional is in `required`, unless it is hidden with no
100
+ default. `deco check` reports saved content missing a required field, and a
101
+ `null` where the type is not nullable. If old content may lack the field, make
102
+ it optional or give it a `@default`.
103
+
104
+ ## Whole-block warnings
105
+
106
+ `deco schema` warns, and the form is empty, when:
107
+
108
+ - the block's props are typed `any`;
109
+ - its first parameter is not an object (for example a string).
110
+
111
+ It also warns when a block returns `any`: that block is then not offered for
112
+ any field.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: deco-go-live
3
+ description: "Go-live and the first 72 hours for a site on @decocms/blocks 8 (mainly TanStack Start behind createDecoWorker from @decocms/tanstack/worker). Covers code and content freeze, the last content import as a draft (deco push --draft, deco check, deco publish), how releases reach the site from the CDN and how to roll back traffic, code and content (deco releases, Studio's make-current), the traffic ramp with abTestingRoutes from @decocms/compat-v7/tanstack/worker, Worker runtime limits (128 MB, shared state, deadlines, telemetry), go-live cache checks, proxied checkout headers (COOP, 304 and bfcache), React/SPA leftovers from Fresh ports, SEO, redirects and analytics parity, a read-only preflight script, and a QA checklist built from an inventory of the site's blocks and routes. Load it before a cutover, after a migration or a framework upgrade, to build a QA pass, or to chase a regression right after launch. Assumes the site already builds and renders."
4
+ ---
5
+
6
+ # Go-live check for a v8 site
7
+
8
+ Most items below come from a real incident on a store that already went live. Walk
9
+ it on the candidate (and on the real host) before the first byte of
10
+ production traffic, again on cutover day, and once more 24 to 72 hours later.
11
+ It is a double check, not a setup guide: wiring is in **deco-tanstack-site**
12
+ and **deco-nextjs-site**, the CLI flow in **deco-site-workflow**.
13
+
14
+ - ๐Ÿ”ด **Blocks go-live**: data leak, site down, checkout or revenue loss.
15
+ - ๐ŸŸก **Fix before ramping above 0%**: cache, SEO, analytics, performance.
16
+ - ๐ŸŸข **Watch after go-live**: monitor, compare with the old site.
17
+ - ๐Ÿงช needs a browser and a person looking at the result.
18
+
19
+ Record PASS / FAIL / N/A for every line in the go-live ticket. "Didn't check"
20
+ is not N/A.
21
+
22
+ ## When to load what
23
+
24
+ | Reference | Load it when |
25
+ |---|---|
26
+ | [`references/process.md`](./references/process.md) | Planning the freeze, the last content import, the CMS pass, cutover day or the first 72 hours |
27
+ | [`references/content-releases.md`](./references/content-releases.md) | Checking how a publish reaches the site, what it doesn't reach, or writing the rollback plan |
28
+ | [`references/traffic-ramp.md`](./references/traffic-ramp.md) | Splitting the production host between the new site and the old origin |
29
+ | [`references/worker-runtime.md`](./references/worker-runtime.md) | Memory errors, 524s, data shown to the wrong user, missing telemetry |
30
+ | [`references/proxy-headers-checkout.md`](./references/proxy-headers-checkout.md) | A proxied checkout, header differences with the old site, real-host-only bugs, redirect loops |
31
+ | [`references/react-spa.md`](./references/react-spa.md) | Something works after F5 but not after a click, hydration errors, stale chunks |
32
+ | [`references/seo-analytics.md`](./references/seo-analytics.md) | Tag-manager timing, indexing, soft 404s, the redirect sweep, sitemaps, search behavior |
33
+ | [`references/qa-inventory.md`](./references/qa-inventory.md) | Building a QA pass: list the blocks, routes, interactions and integrations first |
34
+ | [`references/qa-checklist-template.md`](./references/qa-checklist-template.md) | Filling the QA checklist from that inventory |
35
+
36
+ Cache keys, profiles and hit-rate work are in **deco-storefront-caching**;
37
+ render and upstream performance in **deco-storefront-performance**; parity with
38
+ a v7 site in **deco-v7-to-v8-migration**.
39
+
40
+ ## Quick start
41
+
42
+ ```bash
43
+ bash <path-to-this-skill>/scripts/preflight.sh \
44
+ <site-repo> https://<candidate-host> https://<old-site-host>
45
+ deco schema --check && deco check
46
+ ```
47
+
48
+ The script is read-only (greps and curls). It only catches what is greppable
49
+ or curl-able.
50
+
51
+ ## 1. Process (โ†’ [process.md](./references/process.md))
52
+
53
+ - [ ] ๐Ÿ”ด **Code freeze on the old repo** with a date and a recorded `FREEZE_SHA`; every commit since the migration cut reconciled.
54
+ - [ ] ๐Ÿ”ด **Content freeze on the old CMS**; last import after the last edit, pushed as a draft, `deco check --draft=<name>` clean, then `deco publish`.
55
+ - [ ] ๐Ÿ”ด **Schemas match production**: same props and defaults; five-criteria parity.
56
+ - [ ] ๐ŸŸก **CMS pass** with the editors before go-live; draft preview works on their hosts.
57
+ - [ ] ๐ŸŸก **Inventory** of integrations not ported and of A/B tests whose variant code was never ported.
58
+
59
+ ## 2. Content and rollback (โ†’ [content-releases.md](./references/content-releases.md))
60
+
61
+ - [ ] ๐Ÿ”ด `createCMS({ site })` on production; a cold start renders; no direct imports of `.deco/blocks/*.json` that a publish can't reach.
62
+ - [ ] ๐Ÿ”ด `"blocksMajor": 8` in `.deco/schema.gen.json`; `deco schema push` runs on production deploys.
63
+ - [ ] ๐Ÿ”ด **Rollback written and rehearsed** for traffic, code and content.
64
+ - [ ] ๐ŸŸก The content team knows a publish takes about a minute to show.
65
+
66
+ ## 3. Traffic ramp (โ†’ [traffic-ramp.md](./references/traffic-ramp.md))
67
+
68
+ - [ ] ๐Ÿ”ด At 0%, the **fallback bucket** works through the worker: the worker 404s `/live/*` and `/deco/*` before the split, so old pages that call them break.
69
+ - [ ] ๐Ÿ”ด `shouldBypassAB` returns `true` for routes only the new site has.
70
+ - [ ] ๐ŸŸก Both buckets smoke-tested with `?_deco_bucket=worker|fallback`, including existing proxies.
71
+
72
+ ## 4. Worker runtime (โ†’ [worker-runtime.md](./references/worker-runtime.md))
73
+
74
+ - [ ] ๐Ÿ”ด **No per-user state at module scope** (`new QueryClient()` outside `getRouter`, module `Map`s with user data).
75
+ - [ ] ๐Ÿ”ด **Memory under ~80% of 128 MB** in a load test; big responses streamed; no content in the bundle.
76
+ - [ ] ๐ŸŸก **Every upstream await has a deadline**; shared promises have one too.
77
+ - [ ] ๐ŸŸก Observability and CMS telemetry on; `service.version` set to the commit.
78
+ - [ ] ๐ŸŸข Memory compared after every `@decocms/*` bump.
79
+
80
+ ## 5. Cache (โ†’ **deco-storefront-caching**)
81
+
82
+ - [ ] ๐Ÿ”ด **A signed-in shopper never gets a stored anonymous page**; nothing per-user is stored.
83
+ - [ ] ๐ŸŸก Anonymous pages set no cookie except the first-visit `deco_segment`, and the second request is `X-Cache: HIT`.
84
+ - [ ] ๐ŸŸก The cache key drops the paid-media parameters your traffic carries.
85
+ - [ ] ๐ŸŸก A failed loader marks the page degraded (`x-deco-degraded`) instead of caching "not found".
86
+
87
+ ## 6. Proxy, headers, checkout (โ†’ [proxy-headers-checkout.md](./references/proxy-headers-checkout.md))
88
+
89
+ - [ ] ๐Ÿ”ด **Header diff old ร— new** on store pages and the proxied checkout; the worker's default COOP overridden where the old site sent none.
90
+ - [ ] ๐Ÿ”ด **The proxied checkout never answers 304** from a stored copy; ๐Ÿงช bfcache tested on a deployed preview.
91
+ - [ ] ๐Ÿ”ด Third-party checkout scripts **byte-compared** with the old site.
92
+ - [ ] ๐Ÿ”ด **Real-host-only bugs** checked with the production `Host`.
93
+ - [ ] ๐ŸŸก No self-redirect loops on encoded paths.
94
+
95
+ ## 7. React / SPA (โ†’ [react-spa.md](./references/react-spa.md))
96
+
97
+ - [ ] ๐Ÿ”ด ๐Ÿงช **Cart write then immediate navigation** to checkout keeps the change.
98
+ - [ ] ๐Ÿ”ด Fresh leftovers grep is clean (`window.STOREFRONT`, `hx-*`, `value=` without `onChange`).
99
+ - [ ] ๐ŸŸก ๐Ÿงช Every inline-script component works when reached by **SPA click**.
100
+ - [ ] ๐ŸŸก ๐Ÿงช Product โ†’ product by SPA: gallery keyed, no React #310; hook-order lint on.
101
+ - [ ] ๐ŸŸก ๐Ÿงช Zero React #418 on mobile with the tag manager on.
102
+ - [ ] ๐ŸŸก Stale-chunk reload guard; intent-preload payload measured.
103
+ - [ ] ๐ŸŸข Old service worker unregistered by a self-unregistering `sw.js`.
104
+
105
+ ## 8. SEO, analytics, search (โ†’ [seo-analytics.md](./references/seo-analytics.md))
106
+
107
+ - [ ] ๐Ÿ”ด **Tag manager loads from `<head>` without a gesture gate**; checkout cookies match the old site.
108
+ - [ ] ๐Ÿ”ด On the real host at 0%: **no `noindex`, no `Disallow: /`**; real 404 status codes.
109
+ - [ ] ๐ŸŸก Every analytics vendor mounted and receiving events the next day.
110
+ - [ ] ๐ŸŸก No duplicate `from` in the redirects block (`deco check` does not catch them), and a **sweep of every rule** against the old site.
111
+ - [ ] ๐ŸŸก Sitemap served by a real route and streamed.
112
+ - [ ] ๐ŸŸก Facet change resets `page`; autocomplete uses the typed term.
113
+
114
+ ## 9. Cutover day and after (โ†’ [process.md](./references/process.md#cutover-day))
115
+
116
+ - [ ] ๐Ÿ”ด Deploy freeze during the window.
117
+ - [ ] ๐Ÿ”ด Split config before the route; smoke with each bucket forced.
118
+ - [ ] ๐ŸŸก Cache warmed by fetching **pages** with mobile and desktop user agents.
119
+ - [ ] ๐ŸŸก Traffic ladder with written gates.
120
+ - [ ] ๐ŸŸข Compare with the **same hour the day before**; keep removed endpoints alive for the HTML cache TTL; keep porting old-repo drift.
121
+
122
+ ## Related
123
+
124
+ - **deco-site-workflow**: `deco pull`, `push`, `drafts`, `publish`, `releases`, `schema push`.
125
+ - **deco-variants**: tests and campaigns, preview links with `__test` / `__campaign`.
126
+ - **ecommerce-qa** (decocms/storefront-skills): end-to-end purchase tests with `@decocms/qa`.
127
+ - **tools-reconcile-snapshot** (decocms/migrations; planned to move to the blocks 7.x branch as **deco-reconcile-snapshot**): old-repo drift since the cut.