@decocms/tanstack 7.52.0 → 7.52.1
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 +4 -4
- package/src/vite/plugin.js +11 -11
- package/src/vite/plugin.test.js +5 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/tanstack",
|
|
3
|
-
"version": "7.52.
|
|
3
|
+
"version": "7.52.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco framework binding for TanStack Start + Cloudflare Workers",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"lint:unused": "knip"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@decocms/blocks": "7.52.
|
|
28
|
-
"@decocms/blocks-admin": "7.52.
|
|
29
|
-
"@decocms/blocks-cli": "7.52.
|
|
27
|
+
"@decocms/blocks": "7.52.1",
|
|
28
|
+
"@decocms/blocks-admin": "7.52.1",
|
|
29
|
+
"@decocms/blocks-cli": "7.52.1",
|
|
30
30
|
"@deco-cx/warp-node": "^0.3.16",
|
|
31
31
|
"fast-json-patch": "^3.1.0",
|
|
32
32
|
"ws": "^8.18.0"
|
package/src/vite/plugin.js
CHANGED
|
@@ -157,20 +157,20 @@ const STUB_SOURCE = {
|
|
|
157
157
|
/**
|
|
158
158
|
* Argv (after the generate-schema.ts script path) for a meta.gen.json run.
|
|
159
159
|
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* as-is (no composeMeta at read time)
|
|
164
|
-
* the admin editors
|
|
165
|
-
* (casaevideo-tanstack #633). Mirrors `npm run generate`'s schema
|
|
166
|
-
*
|
|
167
|
-
*
|
|
160
|
+
* generate-schema ALWAYS composes before writing, so the emitted meta.gen.json
|
|
161
|
+
* carries every framework `website/*` block (Page, matchers, __SECTION_REF__,
|
|
162
|
+
* Resolvable). This matters because meta.gen.json is committed and Studio reads
|
|
163
|
+
* it as-is (no composeMeta at read time) — an uncomposed rewrite would silently
|
|
164
|
+
* break the admin editors, e.g. the date matcher powering variant rules
|
|
165
|
+
* disappearing (casaevideo-tanstack #633). Mirrors `npm run generate`'s schema
|
|
166
|
+
* step. Both invocation sites in configureServer derive their args here so they
|
|
167
|
+
* can never drift apart.
|
|
168
168
|
*
|
|
169
169
|
* @param {string} siteName
|
|
170
170
|
* @returns {string[]}
|
|
171
171
|
*/
|
|
172
172
|
export function generateSchemaArgs(siteName) {
|
|
173
|
-
return ["--site", siteName
|
|
173
|
+
return ["--site", siteName];
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/** @returns {import("vite").PluginOption} */
|
|
@@ -473,8 +473,8 @@ export function decoVitePlugin() {
|
|
|
473
473
|
// re-run generate-schema.ts so meta.gen.json stays in sync during dev.
|
|
474
474
|
// No --out is passed to the generator below, so it writes to its own
|
|
475
475
|
// default (.deco/meta.gen.json) — this constant must track that default.
|
|
476
|
-
// Both invocations get their args from generateSchemaArgs()
|
|
477
|
-
//
|
|
476
|
+
// Both invocations get their args from generateSchemaArgs() so they can't
|
|
477
|
+
// drift apart (see its doc comment).
|
|
478
478
|
const schemaWatchDirs = ["src"];
|
|
479
479
|
const schemaOutFile = path.resolve(cwd, ".deco/meta.gen.json");
|
|
480
480
|
|
package/src/vite/plugin.test.js
CHANGED
|
@@ -55,17 +55,12 @@ describe("decoVitePlugin client stubs (regression guard)", () => {
|
|
|
55
55
|
|
|
56
56
|
describe("generateSchemaArgs (regression: meta.gen.json must be composed)", () => {
|
|
57
57
|
// Both generate-schema.ts invocations in configureServer (watch regen + cold
|
|
58
|
-
// start) derive their args from this helper.
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
// casaevideo-tanstack #633.
|
|
63
|
-
it("always includes --compose", () => {
|
|
64
|
-
expect(generateSchemaArgs("casaevideo")).toContain("--compose");
|
|
65
|
-
});
|
|
66
|
-
|
|
58
|
+
// start) derive their args from this helper. generate-schema always composes
|
|
59
|
+
// before writing, so the manifest carries every framework website/* block
|
|
60
|
+
// (matchers/Page/Resolvable) that Studio — which reads meta.gen.json as-is —
|
|
61
|
+
// needs, e.g. the variant date matcher. See casaevideo-tanstack #633.
|
|
67
62
|
it("targets the given site", () => {
|
|
68
|
-
expect(generateSchemaArgs("my-site")).toEqual(["--site", "my-site"
|
|
63
|
+
expect(generateSchemaArgs("my-site")).toEqual(["--site", "my-site"]);
|
|
69
64
|
});
|
|
70
65
|
});
|
|
71
66
|
|