@decocms/blocks-cli 7.5.0 → 7.5.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/blocks-cli",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco codegen (generate-blocks, generate-schema, generate-invoke) and Fresh-to-TanStack migration tooling",
|
|
6
6
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"lint:unused": "knip"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@decocms/blocks": "7.5.
|
|
37
|
+
"@decocms/blocks": "7.5.1",
|
|
38
38
|
"ts-morph": "^27.0.0",
|
|
39
|
-
"tsx": "^4.
|
|
39
|
+
"tsx": "^4.22.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"knip": "^5.86.0",
|
|
@@ -97,7 +97,7 @@ describe("typeToJsonSchema with an unresolvable widget alias import", () => {
|
|
|
97
97
|
type: "string",
|
|
98
98
|
format: "color",
|
|
99
99
|
});
|
|
100
|
-
});
|
|
100
|
+
}, 30_000);
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
// ---------------------------------------------------------------------------
|
|
@@ -160,7 +160,7 @@ describe("generate-schema default output path (.deco/)", () => {
|
|
|
160
160
|
expect(fs.existsSync(newDefault)).toBe(true);
|
|
161
161
|
const meta = JSON.parse(fs.readFileSync(newDefault, "utf-8"));
|
|
162
162
|
expect(meta.manifest.blocks.sections).toHaveProperty("site/sections/Hero.tsx");
|
|
163
|
-
});
|
|
163
|
+
}, 30_000);
|
|
164
164
|
|
|
165
165
|
it("warns once to stderr naming both paths when the OLD default file exists and no --out is passed, but still writes the NEW default", () => {
|
|
166
166
|
const oldDefaultDir = path.join(tmpDir, "src", "server", "admin");
|
|
@@ -176,7 +176,7 @@ describe("generate-schema default output path (.deco/)", () => {
|
|
|
176
176
|
|
|
177
177
|
const newDefault = path.join(tmpDir, ".deco", "meta.gen.json");
|
|
178
178
|
expect(fs.existsSync(newDefault)).toBe(true);
|
|
179
|
-
});
|
|
179
|
+
}, 30_000);
|
|
180
180
|
|
|
181
181
|
it("does not warn when an explicit --out is passed, even if the OLD default file exists", () => {
|
|
182
182
|
const oldDefaultDir = path.join(tmpDir, "src", "server", "admin");
|
|
@@ -189,5 +189,5 @@ describe("generate-schema default output path (.deco/)", () => {
|
|
|
189
189
|
|
|
190
190
|
expect(stderr).not.toContain("Generator default output moved");
|
|
191
191
|
expect(fs.existsSync(explicitOut)).toBe(true);
|
|
192
|
-
});
|
|
192
|
+
}, 30_000);
|
|
193
193
|
});
|
|
@@ -71,7 +71,7 @@ describe("generate-sections walkDir exclusions", () => {
|
|
|
71
71
|
expect(generated).not.toContain("Hero.test.tsx");
|
|
72
72
|
expect(generated).not.toContain("Hero.stories.tsx");
|
|
73
73
|
expect(generated).not.toContain("sections.gen.ts");
|
|
74
|
-
});
|
|
74
|
+
}, 30_000);
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
describe("generate-sections default output path (.deco/)", () => {
|
|
@@ -101,7 +101,7 @@ describe("generate-sections default output path (.deco/)", () => {
|
|
|
101
101
|
expect(fs.readFileSync(newDefault, "utf-8")).toContain("site/sections/Hero.tsx");
|
|
102
102
|
// No legacy file present, so no warning is expected.
|
|
103
103
|
expect(stderr).not.toContain("Generator default output moved");
|
|
104
|
-
});
|
|
104
|
+
}, 30_000);
|
|
105
105
|
|
|
106
106
|
it("warns once to stderr naming both paths when the OLD default file exists and no --out-file is passed, but still writes the NEW default", () => {
|
|
107
107
|
const oldDefaultDir = path.join(tmpDir, "src", "server", "cms");
|
|
@@ -118,7 +118,7 @@ describe("generate-sections default output path (.deco/)", () => {
|
|
|
118
118
|
const newDefault = path.join(tmpDir, ".deco", "sections.gen.ts");
|
|
119
119
|
expect(fs.existsSync(newDefault)).toBe(true);
|
|
120
120
|
expect(fs.readFileSync(newDefault, "utf-8")).toContain("site/sections/Hero.tsx");
|
|
121
|
-
});
|
|
121
|
+
}, 30_000);
|
|
122
122
|
|
|
123
123
|
it("does not warn when an explicit --out-file is passed, even if the OLD default file exists", () => {
|
|
124
124
|
const oldDefaultDir = path.join(tmpDir, "src", "server", "cms");
|
|
@@ -131,7 +131,7 @@ describe("generate-sections default output path (.deco/)", () => {
|
|
|
131
131
|
|
|
132
132
|
expect(stderr).not.toContain("Generator default output moved");
|
|
133
133
|
expect(fs.existsSync(explicitOut)).toBe(true);
|
|
134
|
-
});
|
|
134
|
+
}, 30_000);
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
describe("generate-sections --registry", () => {
|
|
@@ -186,7 +186,7 @@ describe("generate-sections --registry", () => {
|
|
|
186
186
|
expect(generated).toContain(
|
|
187
187
|
`"./sections/Nested/Promo.tsx": () => import("${expectedImportPath(promoPath)}")`,
|
|
188
188
|
);
|
|
189
|
-
});
|
|
189
|
+
}, 30_000);
|
|
190
190
|
|
|
191
191
|
it("does not emit sectionImports without the --registry flag", () => {
|
|
192
192
|
fs.writeFileSync(
|
|
@@ -203,7 +203,7 @@ describe("generate-sections --registry", () => {
|
|
|
203
203
|
|
|
204
204
|
const generated = fs.readFileSync(outFile, "utf-8");
|
|
205
205
|
expect(generated).not.toContain("sectionImports");
|
|
206
|
-
});
|
|
206
|
+
}, 30_000);
|
|
207
207
|
|
|
208
208
|
it("emits a doc comment that does not self-terminate early, and the resulting file is importable (regression: a literal `**/` inside the emitted /** */ comment used to close it prematurely, leaving prose as bare statements and making every --registry output invalid TypeScript)", () => {
|
|
209
209
|
const heroPath = path.join(sectionsDir, "Hero.tsx");
|