@metaobjectsdev/cli 0.24.5 → 0.25.0
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/README.md +2 -1
- package/dist/src/commands/docs.d.ts +14 -1
- package/dist/src/commands/docs.d.ts.map +1 -1
- package/dist/src/commands/docs.js +153 -8
- package/dist/src/commands/docs.js.map +1 -1
- package/dist/src/commands/eject.d.ts +1 -1
- package/dist/src/commands/eject.js +3 -3
- package/dist/src/commands/eject.js.map +1 -1
- package/dist/src/commands/gen.d.ts.map +1 -1
- package/dist/src/commands/gen.js +43 -20
- package/dist/src/commands/gen.js.map +1 -1
- package/dist/src/commands/init.d.ts +4 -0
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +31 -6
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/types.d.ts +2 -1
- package/dist/src/commands/types.d.ts.map +1 -1
- package/dist/src/commands/types.js +165 -28
- package/dist/src/commands/types.js.map +1 -1
- package/dist/src/commands/verify.d.ts +9 -1
- package/dist/src/commands/verify.d.ts.map +1 -1
- package/dist/src/commands/verify.js +291 -50
- package/dist/src/commands/verify.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +82 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/advisory.d.ts +77 -0
- package/dist/src/lib/advisory.d.ts.map +1 -0
- package/dist/src/lib/advisory.js +97 -0
- package/dist/src/lib/advisory.js.map +1 -0
- package/dist/src/lib/anti-patterns.d.ts +27 -3
- package/dist/src/lib/anti-patterns.d.ts.map +1 -1
- package/dist/src/lib/anti-patterns.js +145 -8
- package/dist/src/lib/anti-patterns.js.map +1 -1
- package/dist/src/lib/args.d.ts +27 -1
- package/dist/src/lib/args.d.ts.map +1 -1
- package/dist/src/lib/args.js +13 -1
- package/dist/src/lib/args.js.map +1 -1
- package/dist/src/lib/docs-drift.d.ts +31 -0
- package/dist/src/lib/docs-drift.d.ts.map +1 -0
- package/dist/src/lib/docs-drift.js +195 -0
- package/dist/src/lib/docs-drift.js.map +1 -0
- package/dist/src/lib/format.d.ts +10 -0
- package/dist/src/lib/format.d.ts.map +1 -1
- package/dist/src/lib/format.js +15 -0
- package/dist/src/lib/format.js.map +1 -1
- package/dist/src/lib/output.d.ts +13 -0
- package/dist/src/lib/output.d.ts.map +1 -1
- package/dist/src/lib/output.js +16 -1
- package/dist/src/lib/output.js.map +1 -1
- package/package.json +10 -10
- package/src/commands/docs.ts +194 -8
- package/src/commands/eject.ts +3 -3
- package/src/commands/gen.ts +54 -19
- package/src/commands/init.ts +35 -6
- package/src/commands/types.ts +185 -34
- package/src/commands/verify.ts +350 -46
- package/src/index.ts +91 -6
- package/src/lib/advisory.ts +150 -0
- package/src/lib/anti-patterns.ts +163 -8
- package/src/lib/args.ts +40 -2
- package/src/lib/docs-drift.ts +222 -0
- package/src/lib/format.ts +14 -0
- package/src/lib/output.ts +33 -2
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// `meta verify --docs` — the docs-drift gate.
|
|
2
|
+
//
|
|
3
|
+
// It runs `meta docs` into a throwaway temp directory and diffs what that produces
|
|
4
|
+
// against the committed docs tree. Same shape as `--codegen`, pointed at `docs.outDir`,
|
|
5
|
+
// and it exists because nothing checked the docs tree at all: `--codegen` regenerates only
|
|
6
|
+
// the config's `outDir`/`targets`, so a model could move and every committed page keep
|
|
7
|
+
// describing the previous one indefinitely, with every gate green.
|
|
8
|
+
//
|
|
9
|
+
// IT CALLS THE DOCS COMMAND, NOT A REIMPLEMENTATION OF IT. The gate and the door must not
|
|
10
|
+
// be two answers to "what are the docs" — that is the defect this whole surface is meant to
|
|
11
|
+
// prevent, and it would be embarrassing to introduce it in the checker.
|
|
12
|
+
//
|
|
13
|
+
// TWO DELIBERATE DIFFERENCES FROM `--codegen`, both in the direction of not convicting the
|
|
14
|
+
// innocent:
|
|
15
|
+
//
|
|
16
|
+
// 1. NO HAND-EDIT PRESERVATION, so a byte difference IS drift. Docs pages are read, never
|
|
17
|
+
// imported: there is no three-way merge, nothing records what was written, and the
|
|
18
|
+
// documented workflow never invites an edit inside one. `--codegen` needs
|
|
19
|
+
// `.gen-state/.hashes.json` to tell a preserved hand edit from stale output; here
|
|
20
|
+
// there is no such offer to honour.
|
|
21
|
+
//
|
|
22
|
+
// 2. IT REPORTS A FILE AS EXTRA ONLY WHERE IT OWNS THE DIRECTORY. `docs.outDir`
|
|
23
|
+
// defaults to `./docs`, which in a real repository is full of hand-written
|
|
24
|
+
// documentation — this repository's own `docs/` holds a hundred such files. Its
|
|
25
|
+
// `api/` subtree is not ours either: on a multi-port project those pages are written
|
|
26
|
+
// by the OTHER port's docs command (`mvn metaobjects:docs`, `metaobjects docs`,
|
|
27
|
+
// `dotnet meta docs`), which this gate never runs, so a fresh run here legitimately
|
|
28
|
+
// emits none of them. `--codegen` can convict a committed-but-not-regenerated file
|
|
29
|
+
// because `.gen-state` proves the generator wrote it; over the docs root there is no
|
|
30
|
+
// such manifest, and convicting anyway is precisely the jurisdiction mistake
|
|
31
|
+
// `--codegen`'s orphan branch was corrected for in 0.24.3.
|
|
32
|
+
//
|
|
33
|
+
// `agent/` IS ours, and there the ownership question has an answer on disk: the Node
|
|
34
|
+
// `meta docs` command is the only thing that writes that directory (its name is not
|
|
35
|
+
// configurable), and every page it writes opens with the `@generated` marker. That
|
|
36
|
+
// marker is the proof `--codegen` has to consult `.gen-state` for, so BOTH conditions
|
|
37
|
+
// are required — under `agent/` AND carrying the marker. A hand-written note dropped
|
|
38
|
+
// in `agent/` carries no marker and is left alone, exactly as one in the docs root is.
|
|
39
|
+
//
|
|
40
|
+
// It matters because the schema page is SKIPPED rather than failed when the expected
|
|
41
|
+
// schema cannot be built or no dialect is declared — so without this, a committed
|
|
42
|
+
// `agent/schema.md` describing the previous schema passed the gate on exactly the
|
|
43
|
+
// change it most needs to flag.
|
|
44
|
+
//
|
|
45
|
+
// The residual cost is stated rather than hidden: outside `agent/`, a page for an
|
|
46
|
+
// entity that was DELETED stays committed and this gate stays green.
|
|
47
|
+
import { mkdtempSync, rmSync, existsSync, readFileSync, readdirSync, lstatSync } from "node:fs";
|
|
48
|
+
import { tmpdir } from "node:os";
|
|
49
|
+
import { join, relative, resolve, isAbsolute, sep } from "node:path";
|
|
50
|
+
import { docsCommand } from "../commands/docs.js";
|
|
51
|
+
/**
|
|
52
|
+
* Recursively list files under `dir`, relative to it.
|
|
53
|
+
*
|
|
54
|
+
* `lstatSync`, NOT `statSync`, and symlinks are SKIPPED. This walks the committed docs
|
|
55
|
+
* tree as well as the fresh one now, and a real repository's `docs/` may hold a symlink to
|
|
56
|
+
* a build output that is absent on CI — `statSync` follows it and throws `ENOENT`, which
|
|
57
|
+
* the caller reports as "regeneration failed", blaming the fresh run for a dangling link
|
|
58
|
+
* in the committed tree. A directory symlink would also let the walk recurse without
|
|
59
|
+
* bound. Nothing MetaObjects writes is a symlink, so skipping them cannot hide a page of
|
|
60
|
+
* ours; a symlinked page is somebody else's file, which this gate does not judge anyway.
|
|
61
|
+
*/
|
|
62
|
+
function listFiles(dir) {
|
|
63
|
+
if (!existsSync(dir))
|
|
64
|
+
return [];
|
|
65
|
+
const out = [];
|
|
66
|
+
const walk = (d) => {
|
|
67
|
+
for (const entry of readdirSync(d)) {
|
|
68
|
+
const full = join(d, entry);
|
|
69
|
+
const st = lstatSync(full);
|
|
70
|
+
if (st.isSymbolicLink())
|
|
71
|
+
continue;
|
|
72
|
+
if (st.isDirectory())
|
|
73
|
+
walk(full);
|
|
74
|
+
else
|
|
75
|
+
out.push(relative(dir, full));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
walk(dir);
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Docs-root-relative prefixes the Node `meta docs` command owns outright — the only
|
|
83
|
+
* places a committed page that a fresh run does not emit is drift rather than somebody
|
|
84
|
+
* else's file. `agent` is fixed (it is not a configurable subdirectory), which is what
|
|
85
|
+
* makes the claim checkable; `api` deliberately is NOT here, because its subdirectory IS
|
|
86
|
+
* configurable and on a multi-port project another port's docs command writes it.
|
|
87
|
+
*/
|
|
88
|
+
const OWNED_PREFIXES = ["agent/"];
|
|
89
|
+
/** The marker every generated docs page opens with — the on-disk ownership proof. */
|
|
90
|
+
const GENERATED_MARKER = "@generated";
|
|
91
|
+
/**
|
|
92
|
+
* True when this committed file is one WE wrote: under a directory this command owns, and
|
|
93
|
+
* carrying the generated marker in its opening lines. Both halves are load-bearing — the
|
|
94
|
+
* prefix keeps another port's `api/` pages out of jurisdiction, the marker keeps a
|
|
95
|
+
* hand-written note inside `agent/` out of it.
|
|
96
|
+
*/
|
|
97
|
+
function isOurs(docsDir, rel) {
|
|
98
|
+
const normalized = rel.split(sep).join("/");
|
|
99
|
+
if (!OWNED_PREFIXES.some((p) => normalized.startsWith(p)))
|
|
100
|
+
return false;
|
|
101
|
+
try {
|
|
102
|
+
return readFileSync(join(docsDir, rel), "utf8")
|
|
103
|
+
.split("\n", 3)
|
|
104
|
+
.some((line) => line.includes(GENERATED_MARKER));
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// Unreadable is not proof of ownership, and this gate never convicts without it.
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Regenerate the docs into a temp tree and diff it against the committed one.
|
|
113
|
+
*
|
|
114
|
+
* A non-zero exit from the docs command is returned as `error` rather than as drift: a run
|
|
115
|
+
* that could not produce the pages has not shown that the committed ones are wrong, and
|
|
116
|
+
* reporting it as drift would send a reader to edit files that are probably fine.
|
|
117
|
+
*/
|
|
118
|
+
export async function computeDocsDrift(args) {
|
|
119
|
+
const root = isAbsolute(args.projectRoot) ? args.projectRoot : resolve(args.projectRoot);
|
|
120
|
+
const docsDir = isAbsolute(args.docsDir) ? args.docsDir : resolve(root, args.docsDir);
|
|
121
|
+
const tempRoot = mkdtempSync(join(tmpdir(), "meta-verify-docs-"));
|
|
122
|
+
try {
|
|
123
|
+
// NO `<project-root>` POSITIONAL, deliberately. Passing one is not the same command:
|
|
124
|
+
// an explicit path PINS the source set to that directory's own sources (#327), while a
|
|
125
|
+
// bare run discovers the project by walking up. The committed pages were produced by
|
|
126
|
+
// whatever the user actually ran, and a bare run is what `meta docs` means by default —
|
|
127
|
+
// so the gate reproduces that and takes its project root from `cwd`, the way the docs
|
|
128
|
+
// command itself does. A gate that resolved a different source set would report pages
|
|
129
|
+
// as drifted that a plain regeneration would reproduce exactly.
|
|
130
|
+
//
|
|
131
|
+
// `--out` IS passed, because the whole point is to write somewhere else; everything
|
|
132
|
+
// else — layout, surfaces, api surfaces, base URL — still resolves from the project's
|
|
133
|
+
// own config.
|
|
134
|
+
const exit = await docsCommand(["--out", tempRoot], args.cwd, { silent: true });
|
|
135
|
+
if (exit !== 0) {
|
|
136
|
+
return {
|
|
137
|
+
clean: false,
|
|
138
|
+
driftedFiles: [],
|
|
139
|
+
lines: [],
|
|
140
|
+
checked: 0,
|
|
141
|
+
error: `verify --docs: 'meta docs' exited ${exit}, so the committed pages could not be ` +
|
|
142
|
+
`compared against a fresh run. Fix that first — the error is above.`,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const fresh = listFiles(tempRoot).sort();
|
|
146
|
+
if (fresh.length === 0) {
|
|
147
|
+
return {
|
|
148
|
+
clean: false,
|
|
149
|
+
driftedFiles: [],
|
|
150
|
+
lines: [],
|
|
151
|
+
checked: 0,
|
|
152
|
+
error: "verify --docs: a fresh 'meta docs' produced no pages, so there is nothing to " +
|
|
153
|
+
"compare. Check that this project declares metadata the docs surfaces cover.",
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const driftedFiles = [];
|
|
157
|
+
const lines = [];
|
|
158
|
+
for (const rel of fresh) {
|
|
159
|
+
const committedPath = join(docsDir, rel);
|
|
160
|
+
if (!existsSync(committedPath)) {
|
|
161
|
+
driftedFiles.push(rel);
|
|
162
|
+
lines.push(`+ ${rel} (a fresh 'meta docs' emits it; not committed)`);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const a = readFileSync(committedPath, "utf8");
|
|
166
|
+
const b = readFileSync(join(tempRoot, rel), "utf8");
|
|
167
|
+
if (a !== b) {
|
|
168
|
+
driftedFiles.push(rel);
|
|
169
|
+
lines.push(`~ ${rel} (committed content differs from a fresh 'meta docs')`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Committed-but-not-regenerated, inside the directories this command owns. Counted
|
|
173
|
+
// into `checked` as well as `driftedFiles` so the failing line and the passing line
|
|
174
|
+
// keep dividing by the same set — the `verify --templates` mistake, where a red run
|
|
175
|
+
// and a green run reported different denominators for the same project.
|
|
176
|
+
const freshSet = new Set(fresh);
|
|
177
|
+
const orphans = listFiles(docsDir)
|
|
178
|
+
.filter((rel) => !freshSet.has(rel) && isOurs(docsDir, rel))
|
|
179
|
+
.sort();
|
|
180
|
+
for (const rel of orphans) {
|
|
181
|
+
driftedFiles.push(rel);
|
|
182
|
+
lines.push(`- ${rel} (committed; a fresh 'meta docs' no longer emits it)`);
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
clean: driftedFiles.length === 0,
|
|
186
|
+
driftedFiles: driftedFiles.sort(),
|
|
187
|
+
lines,
|
|
188
|
+
checked: fresh.length + orphans.length,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
finally {
|
|
192
|
+
rmSync(tempRoot, { recursive: true, force: true });
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=docs-drift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-drift.js","sourceRoot":"","sources":["../../../src/lib/docs-drift.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,mFAAmF;AACnF,wFAAwF;AACxF,2FAA2F;AAC3F,uFAAuF;AACvF,mEAAmE;AACnE,EAAE;AACF,0FAA0F;AAC1F,4FAA4F;AAC5F,wEA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AO,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;SACvC,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
package/dist/src/lib/format.d.ts
CHANGED
|
@@ -5,4 +5,14 @@ export declare const VALID_FORMATS: readonly OutputFormat[];
|
|
|
5
5
|
export declare function isValidFormat(flag: string): flag is OutputFormat;
|
|
6
6
|
export declare function resolveFormat(flag: string | undefined, isTTY: boolean): OutputFormat;
|
|
7
7
|
export declare function toonEncode(value: unknown): string;
|
|
8
|
+
/**
|
|
9
|
+
* Put ONE machine-readable document on stdout in the active structured format.
|
|
10
|
+
*
|
|
11
|
+
* Text format writes nothing here — its human rendering is the caller's job, and a
|
|
12
|
+
* command in text mode has already printed it. Callers in a structured format must
|
|
13
|
+
* keep every prose line off stdout (route narration to stderr): a document with a
|
|
14
|
+
* sentence in front of it breaks `| jq` outright. `meta migrate`'s
|
|
15
|
+
* `emitStructuredError` is the same split, made command-locally before this existed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function emitStructured(payload: unknown, fmt: OutputFormat): void;
|
|
8
18
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/lib/format.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAIpD,iDAAiD;AACjD,eAAO,MAAM,aAAa,EAAE,SAAS,YAAY,EAA6B,CAAC;AAE/E,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,YAAY,CAEhE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAIpF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEjD"}
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/lib/format.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAIpD,iDAAiD;AACjD,eAAO,MAAM,aAAa,EAAE,SAAS,YAAY,EAA6B,CAAC;AAE/E,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,YAAY,CAEhE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAIpF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CAGxE"}
|
package/dist/src/lib/format.js
CHANGED
|
@@ -15,4 +15,19 @@ export function resolveFormat(flag, isTTY) {
|
|
|
15
15
|
export function toonEncode(value) {
|
|
16
16
|
return encode(value);
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Put ONE machine-readable document on stdout in the active structured format.
|
|
20
|
+
*
|
|
21
|
+
* Text format writes nothing here — its human rendering is the caller's job, and a
|
|
22
|
+
* command in text mode has already printed it. Callers in a structured format must
|
|
23
|
+
* keep every prose line off stdout (route narration to stderr): a document with a
|
|
24
|
+
* sentence in front of it breaks `| jq` outright. `meta migrate`'s
|
|
25
|
+
* `emitStructuredError` is the same split, made command-locally before this existed.
|
|
26
|
+
*/
|
|
27
|
+
export function emitStructured(payload, fmt) {
|
|
28
|
+
if (fmt === "json")
|
|
29
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
30
|
+
else if (fmt === "toon")
|
|
31
|
+
console.log(toonEncode(payload));
|
|
32
|
+
}
|
|
18
33
|
//# sourceMappingURL=format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,KAAK,GAAG,IAAI,GAAG,CAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9D,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/E,+DAA+D;AAC/D,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAoB,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAwB,EAAE,KAAc;IACpE,IAAI,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,IAAoB,CAAC;QAAE,OAAO,IAAoB,CAAC;IACzE,2EAA2E;IAC3E,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,KAAK,GAAG,IAAI,GAAG,CAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9D,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/E,+DAA+D;AAC/D,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAoB,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAwB,EAAE,KAAc;IACpE,IAAI,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,IAAoB,CAAC;QAAE,OAAO,IAAoB,CAAC;IACzE,2EAA2E;IAC3E,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,GAAiB;IAChE,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SAC7D,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/src/lib/output.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Dialect } from "./kysely.js";
|
|
2
|
+
import { type AdvisoryFindingRow, type AdvisorySection } from "./advisory.js";
|
|
2
3
|
export interface FormatOptions {
|
|
3
4
|
isTTY: boolean;
|
|
4
5
|
}
|
|
@@ -15,6 +16,17 @@ export interface GenResultShape {
|
|
|
15
16
|
dialect: Dialect | undefined;
|
|
16
17
|
dryRun: boolean;
|
|
17
18
|
warnings: string[];
|
|
19
|
+
/**
|
|
20
|
+
* The advisory anti-pattern pass, in full. Optional on the TYPE only so the
|
|
21
|
+
* pure formatter tests can build a result without one; `genResultToData` turns
|
|
22
|
+
* an absent section into an explicit "skipped" with a reason, because a payload
|
|
23
|
+
* that omits the advisory is precisely the defect this field closes — a run
|
|
24
|
+
* carrying hundreds of findings read as "all green" to an agent parsing stdout.
|
|
25
|
+
*
|
|
26
|
+
* NEVER capped here. The text renderer truncates for a human's terminal; the
|
|
27
|
+
* structured payload carries every finding.
|
|
28
|
+
*/
|
|
29
|
+
antiPatterns?: AdvisorySection<AdvisoryFindingRow>;
|
|
18
30
|
}
|
|
19
31
|
export declare function formatGenResult(result: GenResultShape, opts: FormatOptions): string;
|
|
20
32
|
export interface BlockedEntry {
|
|
@@ -55,6 +67,7 @@ export declare function genResultToData(result: GenResultShape): {
|
|
|
55
67
|
}[];
|
|
56
68
|
summary: string;
|
|
57
69
|
help: string[];
|
|
70
|
+
antiPatterns: AdvisorySection<AdvisoryFindingRow>;
|
|
58
71
|
};
|
|
59
72
|
export declare function formatGenResultToon(result: GenResultShape): string;
|
|
60
73
|
export declare function migrateResultToData(result: MigrateResultShape): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/output.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/output.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAkB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE9F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;CAChB;AAMD,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MA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AAa,CAAA;KAAE,EAAE,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,YAAY,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;CACnD,CAmCA;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAElE;AAMD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG;IAC/D,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAuDA;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAE1E"}
|
package/dist/src/lib/output.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// TTY-gated glyphs: unicode (✓ ↺ ✗ = ⚠) when stdout is a TTY, plain words
|
|
4
4
|
// (NEW MERGED CONFLICT UNCHANGED REFUSED) otherwise. Per SP5 §5.1.
|
|
5
5
|
import { toonEncode } from "./format.js";
|
|
6
|
+
import { skippedSection } from "./advisory.js";
|
|
6
7
|
const GEN_GLYPHS = {
|
|
7
8
|
new: "✓",
|
|
8
9
|
merged: "↺",
|
|
@@ -123,7 +124,21 @@ export function genResultToData(result) {
|
|
|
123
124
|
const help = result.files.length === 0
|
|
124
125
|
? ["author entities in this project's metadata sources then re-run `meta gen`"]
|
|
125
126
|
: ["typecheck the generated code with `npx tsc`", "create your database tables with `meta migrate --from-db --db <url> --dialect <sqlite|postgres> --slug init --apply`"];
|
|
126
|
-
|
|
127
|
+
// An absent section is STATED, never omitted: a reader must be able to tell
|
|
128
|
+
// "the scan found nothing" from "the scan never ran".
|
|
129
|
+
const antiPatterns = result.antiPatterns
|
|
130
|
+
?? skippedSection("the advisory anti-pattern pass did not run for this result");
|
|
131
|
+
// One more next step when there is something to act on — the whole reason the
|
|
132
|
+
// findings are in the payload is that somebody can now act on all of them.
|
|
133
|
+
if (antiPatterns.total > 0) {
|
|
134
|
+
help.push(`${antiPatterns.total} authored site(s) hand-roll what MetaObjects can model — see antiPatterns.rows[] and run \`meta types <construct>\``);
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
gen: result.files.map((f) => ({ file: f.path, status: f.status })),
|
|
138
|
+
summary,
|
|
139
|
+
help,
|
|
140
|
+
antiPatterns,
|
|
141
|
+
};
|
|
127
142
|
}
|
|
128
143
|
export function formatGenResultToon(result) {
|
|
129
144
|
return toonEncode(genResultToData(result));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/lib/output.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,0EAA0E;AAC1E,mEAAmE;AAGnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/lib/output.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,0EAA0E;AAC1E,mEAAmE;AAGnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAiD,MAAM,eAAe,CAAC;AAsC9F,MAAM,UAAU,GAAkC;IAChD,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,MAAM,SAAS,GAAkC;IAC/C,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAA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I,CAAC,UAAU,EAAE,CAAC;QACvB,OAAO,GAAG,mBAAmB,CAAC;QAC9B,IAAI,GAAG,CAAC,iDAAiD,CAAC,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,GAAG,aAAa,eAAe,CAAC;QAC1C,IAAI,GAAG,CAAC,kDAAkD,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,MAA0B;IAChE,OAAO,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metaobjectsdev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "CLI for MetaObjects: scaffold, codegen, migrate, and drift-detection commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@libsql/kysely-libsql": "^0.4.0",
|
|
52
|
-
"@metaobjectsdev/codegen-ts": "0.
|
|
53
|
-
"@metaobjectsdev/codegen-ts-react": "0.
|
|
54
|
-
"@metaobjectsdev/codegen-ts-tanstack": "0.
|
|
55
|
-
"@metaobjectsdev/docs-site": "0.
|
|
56
|
-
"@metaobjectsdev/metadata": "0.
|
|
57
|
-
"@metaobjectsdev/migrate-ts": "0.
|
|
58
|
-
"@metaobjectsdev/render": "0.
|
|
59
|
-
"@metaobjectsdev/runtime-ts": "0.
|
|
60
|
-
"@metaobjectsdev/sdk": "0.
|
|
52
|
+
"@metaobjectsdev/codegen-ts": "0.25.0",
|
|
53
|
+
"@metaobjectsdev/codegen-ts-react": "0.25.0",
|
|
54
|
+
"@metaobjectsdev/codegen-ts-tanstack": "0.25.0",
|
|
55
|
+
"@metaobjectsdev/docs-site": "0.25.0",
|
|
56
|
+
"@metaobjectsdev/metadata": "0.25.0",
|
|
57
|
+
"@metaobjectsdev/migrate-ts": "0.25.0",
|
|
58
|
+
"@metaobjectsdev/render": "0.25.0",
|
|
59
|
+
"@metaobjectsdev/runtime-ts": "0.25.0",
|
|
60
|
+
"@metaobjectsdev/sdk": "0.25.0",
|
|
61
61
|
"@toon-format/toon": "^2.3.0",
|
|
62
62
|
"jiti": "^2.4.0"
|
|
63
63
|
},
|