@thecms/cli 0.20.4-dev.137 → 0.20.4-dev.138
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/{chunk-CSGYGLCL.js → chunk-S6WTBB6Y.js} +12 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -175,7 +175,7 @@ function realContext(env = process.env) {
|
|
|
175
175
|
import { parseArgs } from "util";
|
|
176
176
|
|
|
177
177
|
// src/context.ts
|
|
178
|
-
var CLI_VERSION = "0.20.4-dev.
|
|
178
|
+
var CLI_VERSION = "0.20.4-dev.138";
|
|
179
179
|
function call(ctx, path, init = {}) {
|
|
180
180
|
const { token, client = "cli", ...rest } = init;
|
|
181
181
|
const headers = new Headers(rest.headers);
|
|
@@ -6047,7 +6047,17 @@ async function publish(session, input) {
|
|
|
6047
6047
|
const live = schema.draft.ops - stale.length;
|
|
6048
6048
|
for (const s of stale) plan.change.push(`schema ${input.schema}: the draft's ${s.op} no longer applies and is dropped (${s.why})`);
|
|
6049
6049
|
if (live > 0) plan.change.push(`schema ${input.schema}: its draft (${live} change${live === 1 ? "" : "s"}) becomes the next version${when}`);
|
|
6050
|
-
|
|
6050
|
+
const published = await session.find(`/schemas/${enc2(input.schema)}?state=published`);
|
|
6051
|
+
const kept = new Set((schema.fields ?? []).map((f) => f.name));
|
|
6052
|
+
let fixable = 0;
|
|
6053
|
+
for (const field of (published?.fields ?? []).filter((f) => !kept.has(f.name))) {
|
|
6054
|
+
const impact = await session.send("POST", "/impact", { target: { kind: "field", entity: input.schema, field: field.name } });
|
|
6055
|
+
const ref = (r) => [r.source, r.path].filter(Boolean).join(" ");
|
|
6056
|
+
for (const b of impact.blocking) refused.push(`field ${field.name}: ${ref(b)} uses it \u2014 change that first`);
|
|
6057
|
+
for (const f of impact.fixable) plan.change.push(`field ${field.name}: ${ref(f)} is fixed with it`);
|
|
6058
|
+
fixable += impact.fixable.length;
|
|
6059
|
+
}
|
|
6060
|
+
steps.push({ label: `schema ${input.schema}`, path: `/schemas/${enc2(input.schema)}/publish${fixable ? "?cascade=true" : ""}`, ...publishAt ? { body: { publishAt } } : {} });
|
|
6051
6061
|
}
|
|
6052
6062
|
}
|
|
6053
6063
|
if (input.records) {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecms/cli",
|
|
3
|
-
"version": "0.20.4-dev.
|
|
3
|
+
"version": "0.20.4-dev.138",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "theCMS. command line: the standard's starter, checks, brand, the method's docs, sign-in with a personal token",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
38
38
|
"@resvg/resvg-wasm": "2.6.2",
|
|
39
|
-
"@thecms/sdk": "0.20.4-dev.
|
|
39
|
+
"@thecms/sdk": "0.20.4-dev.138",
|
|
40
40
|
"libpg-query": "18.2.0",
|
|
41
41
|
"zod": "4.6.5"
|
|
42
42
|
},
|