@decocms/blocks-cli 7.20.6 → 7.20.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/scripts/generate.ts +20 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/blocks-cli",
|
|
3
|
-
"version": "7.20.
|
|
3
|
+
"version": "7.20.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco codegen (generate-blocks, generate-schema, generate-invoke) and Fresh-to-TanStack migration tooling",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint:unused": "knip"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@decocms/blocks": "7.20.
|
|
33
|
+
"@decocms/blocks": "7.20.7",
|
|
34
34
|
"ts-morph": "^27.0.0",
|
|
35
35
|
"tsx": "^4.22.5"
|
|
36
36
|
},
|
package/scripts/generate.ts
CHANGED
|
@@ -178,8 +178,13 @@ Selection:
|
|
|
178
178
|
|
|
179
179
|
Platform:
|
|
180
180
|
--platform <name> Forwarded to schema. With "eitri": runs ONLY schema +
|
|
181
|
-
blocks (skips manifest/sections/loaders/invoke) and
|
|
182
|
-
the
|
|
181
|
+
blocks (skips manifest/sections/loaders/invoke) and tags
|
|
182
|
+
the composed meta's framework field with "eitri".
|
|
183
|
+
|
|
184
|
+
The generated meta.gen.json is always self-contained (composeMeta runs at gen
|
|
185
|
+
time for every platform), so FS-only consumers (FS-based Studio, Eitri) and the
|
|
186
|
+
committed artifact all carry the framework block types. The tanstack runtime
|
|
187
|
+
re-composes on load idempotently, so it sees the same shape either way.
|
|
183
188
|
|
|
184
189
|
Forwarded to the individual generators:
|
|
185
190
|
--blocks-dir <dir> blocks + manifest input (default .deco/blocks)
|
|
@@ -653,9 +658,19 @@ export function buildPlan(cwd: string, opts: CliOptions): GeneratorPlan[] {
|
|
|
653
658
|
...(opts.namespace ? ["--namespace", opts.namespace] : []),
|
|
654
659
|
...(opts.platform ? ["--platform", opts.platform] : []),
|
|
655
660
|
...(opts.skipApps ? ["--skip-apps"] : []),
|
|
656
|
-
//
|
|
657
|
-
//
|
|
658
|
-
|
|
661
|
+
// Always bake composeMeta's framework block types (Page, matchers,
|
|
662
|
+
// __SECTION_REF__, Resolvable) into meta.gen.json so the file is
|
|
663
|
+
// SELF-CONTAINED for every consumer that reads it straight from disk —
|
|
664
|
+
// the FS-based Studio and the Eitri stack, but also anyone diffing the
|
|
665
|
+
// committed artifact against /live/_meta. The tanstack runtime re-runs
|
|
666
|
+
// composeMeta on load, which is now idempotent (it returns an
|
|
667
|
+
// already-composed meta unchanged — see composeMeta's `framework`
|
|
668
|
+
// sentinel), so this is a no-op there rather than a double-compose.
|
|
669
|
+
"--compose",
|
|
670
|
+
// Non-React stacks (Eitri) tag the composed meta with their own
|
|
671
|
+
// framework name; everyone else gets composeMeta's default
|
|
672
|
+
// ("tanstack-start").
|
|
673
|
+
...(opts.platform === "eitri" ? ["--framework", "eitri"] : []),
|
|
659
674
|
],
|
|
660
675
|
stage: 2,
|
|
661
676
|
...enabledIf(
|