Skip to content

fix(fastdeploy): recognize .deco/blocks.gen.json (7.x) as content#31

Open
hugo-ccabral wants to merge 1 commit into
mainfrom
fix/content-gate-deco-blocks-gen
Open

fix(fastdeploy): recognize .deco/blocks.gen.json (7.x) as content#31
hugo-ccabral wants to merge 1 commit into
mainfrom
fix/content-gate-deco-blocks-gen

Conversation

@hugo-ccabral

@hugo-ccabral hugo-ccabral commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Problem

The content-only gate (isContentPath) matched the bundled snapshot only at the pre-7.x path src/server/cms/blocks.gen.json. The 7.x @decocms/blocks-cli emits it at .deco/blocks.gen.json — a file at the .deco/ root, not under the .deco/blocks/ prefix. So a content-only Studio commit that regenerates the snapshot on a 7.x site would be misclassified as a code push and skip fast-deploy.

Surfaced while migrating storefront-tanstack to @decocms/* 7.x (deco-sites/storefront-tanstack#47).

Fix

isContentPath now accepts both:

  • .deco/blocks.gen.json (7.x)
  • src/server/cms/blocks.gen.json (legacy @decocms/start@6, kept so un-migrated sites still fast-deploy)

Also verified other .deco/*.gen.* files (sections.gen.ts, meta.gen.json) stay classified as code (they only change on code changes). Docs updated.

Test

go build / go test ./internal/deploy/... pass; added table cases for the 7.x path, the legacy path, and the non-content .deco/*.gen.* files.

🤖 Generated with Claude Code


Summary by cubic

Treats .deco/blocks.gen.json from 7.x @decocms/blocks-cli as content to restore fast-deploy for Studio content commits. Legacy src/server/cms/blocks.gen.json remains supported.

  • Bug Fixes
    • Accept both snapshot paths in isContentPath.
    • Add tests for 7.x and legacy paths; keep other .deco/*.gen.* classified as code.
    • Update docs to show .deco/blocks.gen.json path.

Written for commit c37d192. Summary will update on new commits.

Review in cubic

The content-only gate matched only the pre-7.x bundled-snapshot path
src/server/cms/blocks.gen.json. @decocms/blocks-cli 7.x emits the snapshot at
.deco/blocks.gen.json, which is NOT under the .deco/blocks/ prefix, so a
content-only commit that regenerates it would be misclassified as a code push
and skip fast-deploy. Treat .deco/blocks.gen.json as content; keep the legacy
path for sites still on @decocms/start@6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant