@cmssy/cli 10.6.0 → 10.6.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/dist/index.js +7 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1007,7 +1007,7 @@ async function runLink(options, deps) {
|
|
|
1007
1007
|
|
|
1008
1008
|
// src/types-command.ts
|
|
1009
1009
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
|
|
1010
|
-
import { dirname as dirname3,
|
|
1010
|
+
import { dirname as dirname3, relative, resolve as resolvePath } from "path";
|
|
1011
1011
|
import { DEFAULT_CMSSY_API_URL } from "@cmssy/core";
|
|
1012
1012
|
|
|
1013
1013
|
// src/model-types.ts
|
|
@@ -1280,7 +1280,10 @@ async function runTypes(options, deps) {
|
|
|
1280
1280
|
);
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
|
-
const
|
|
1283
|
+
const requested = options.out?.trim() || DEFAULT_OUT;
|
|
1284
|
+
const outPath = resolvePath(deps.cwd, requested);
|
|
1285
|
+
const inside = relative(deps.cwd, outPath);
|
|
1286
|
+
const shown = inside && !inside.startsWith("..") ? inside : outPath;
|
|
1284
1287
|
const source = generateModelTypes(models, { workspace });
|
|
1285
1288
|
let previous = null;
|
|
1286
1289
|
try {
|
|
@@ -1289,7 +1292,7 @@ async function runTypes(options, deps) {
|
|
|
1289
1292
|
previous = null;
|
|
1290
1293
|
}
|
|
1291
1294
|
if (previous === source) {
|
|
1292
|
-
deps.log(`cmssy: ${
|
|
1295
|
+
deps.log(`cmssy: ${shown} is up to date`);
|
|
1293
1296
|
return 0;
|
|
1294
1297
|
}
|
|
1295
1298
|
mkdirSync3(dirname3(outPath), { recursive: true });
|
|
@@ -1299,7 +1302,7 @@ async function runTypes(options, deps) {
|
|
|
1299
1302
|
0
|
|
1300
1303
|
);
|
|
1301
1304
|
deps.log(
|
|
1302
|
-
`cmssy: wrote ${
|
|
1305
|
+
`cmssy: wrote ${shown} - ${models.length} model${models.length === 1 ? "" : "s"}, ${fieldCount} field${fieldCount === 1 ? "" : "s"}`
|
|
1303
1306
|
);
|
|
1304
1307
|
deps.log(
|
|
1305
1308
|
` ${models.map((model) => model.slug).join(", ")}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/cli",
|
|
3
|
-
"version": "10.6.
|
|
3
|
+
"version": "10.6.1",
|
|
4
4
|
"description": "The cmssy CLI: `cmssy init` wires cmssy into an existing Next.js, Astro or React Router app; `cmssy link` connects it to a workspace and verifies the editor wiring.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"assets"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cmssy/core": "10.6.
|
|
30
|
+
"@cmssy/core": "10.6.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^20.0.0",
|