fix(fastdeploy): recognize .deco/blocks.gen.json (7.x) as content#31
Open
hugo-ccabral wants to merge 1 commit into
Open
fix(fastdeploy): recognize .deco/blocks.gen.json (7.x) as content#31hugo-ccabral wants to merge 1 commit into
hugo-ccabral wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The content-only gate (
isContentPath) matched the bundled snapshot only at the pre-7.x pathsrc/server/cms/blocks.gen.json. The 7.x@decocms/blocks-cliemits 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
isContentPathnow 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.jsonfrom 7.x@decocms/blocks-clias content to restore fast-deploy for Studio content commits. Legacysrc/server/cms/blocks.gen.jsonremains supported.isContentPath..deco/*.gen.*classified as code..deco/blocks.gen.jsonpath.Written for commit c37d192. Summary will update on new commits.