@canonical/pragma-cli 0.40.0 → 0.42.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 -2
- package/dist/package.json +16 -16
- package/dist/src/capabilities/colophon/markdownTerminal.js.map +1 -1
- package/dist/src/capabilities/config/show.render.js.map +1 -1
- package/dist/src/capabilities/create/constants.js +6 -3
- package/dist/src/capabilities/create/constants.js.map +1 -1
- package/dist/src/capabilities/create/create.render.js.map +1 -1
- package/dist/src/capabilities/create/create.verb.js +22 -3
- package/dist/src/capabilities/create/create.verb.js.map +1 -1
- package/dist/src/capabilities/create/createSurface.generated.js +22 -0
- package/dist/src/capabilities/create/createSurface.generated.js.map +1 -1
- package/dist/src/capabilities/create/index.js +1 -1
- package/dist/src/capabilities/create/pickGenerator.js +1 -0
- package/dist/src/capabilities/create/pickGenerator.js.map +1 -1
- package/dist/src/capabilities/doctor/checks/targetHealth.js.map +1 -1
- package/dist/src/capabilities/resources/provider.js.map +1 -1
- package/dist/src/capabilities/setup/operations/writability.js.map +1 -1
- package/dist/src/capabilities/setup/plan.render.js.map +1 -1
- package/dist/src/capabilities/setup/setup.verb.js.map +1 -1
- package/dist/src/capabilities/shared/packageManager.js.map +1 -1
- package/dist/src/capabilities/skill/discover.js.map +1 -1
- package/dist/src/capabilities/sources/collectStatus.js.map +1 -1
- package/dist/src/capabilities/sources/status.render.js.map +1 -1
- package/dist/src/kernel/completion/complete.js.map +1 -1
- package/dist/src/kernel/completion/emitScripts.js.map +1 -1
- package/dist/src/kernel/completion/parse.js.map +1 -1
- package/dist/src/kernel/completion/rank.js.map +1 -1
- package/dist/src/kernel/completion/resolve.js.map +1 -1
- package/dist/src/kernel/config/readConfig.js.map +1 -1
- package/dist/src/kernel/error/PragmaError.js.map +1 -1
- package/dist/src/kernel/packs/collect.js.map +1 -1
- package/dist/src/kernel/packs/graphql/fetchGraphqlLookup.js.map +1 -1
- package/dist/src/kernel/packs/renderPack.js.map +1 -1
- package/dist/src/kernel/packs/sparql/runSelect.js.map +1 -1
- package/dist/src/kernel/project/cli/dispatch.js.map +1 -1
- package/dist/src/kernel/project/cli/globalFlags.js.map +1 -1
- package/dist/src/kernel/project/mcp/buildServer.js.map +1 -1
- package/dist/src/kernel/project/mcp/envelope.js.map +1 -1
- package/dist/src/kernel/render/envelope.js.map +1 -1
- package/dist/src/kernel/render/renderers.js.map +1 -1
- package/dist/src/kernel/runtime/boot.js.map +1 -1
- package/dist/src/kernel/runtime/refs/resolve.js.map +1 -1
- package/package.json +16 -16
- package/src/capabilities/create/constants.ts +6 -3
- package/src/capabilities/create/create.mcp.test.ts +173 -1
- package/src/capabilities/create/create.test.ts +4 -2
- package/src/capabilities/create/create.verb.ts +29 -3
- package/src/capabilities/create/createGrammar.test.ts +40 -4
- package/src/capabilities/create/createSurface.generated.ts +22 -0
- package/src/capabilities/create/crossCli.subprocess.test.ts +53 -14
- package/src/capabilities/create/index.ts +1 -1
- package/src/capabilities/create/pickGenerator.ts +1 -0
- package/src/capabilities/create/shippedCreate.subprocess.test.ts +28 -7
- package/src/capabilities/surface.test.ts +29 -4
- package/src/kernel/completion/shellDrive.test.ts +2 -2
- package/src/kernel/spec/surfaceConformance.test.ts +2 -2
- package/src/testing/behavioral/README.md +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../../../src/kernel/runtime/refs/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,a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"description": "CLI and MCP server over Canonical's design-system knowledge graph.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.42.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "src/index.ts",
|
|
7
7
|
"types": "src/index.ts",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"eval": "bun run src/testing/eval/report.ts"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@canonical/harnesses": "^0.
|
|
55
|
-
"@canonical/ke": "^0.
|
|
56
|
-
"@canonical/ke-graphql": "^0.
|
|
57
|
-
"@canonical/summon-application": "^0.
|
|
58
|
-
"@canonical/summon-component": "^0.
|
|
59
|
-
"@canonical/summon-core": "^0.
|
|
60
|
-
"@canonical/summon-package": "^0.
|
|
61
|
-
"@canonical/task": "^0.
|
|
54
|
+
"@canonical/harnesses": "^0.42.0",
|
|
55
|
+
"@canonical/ke": "^0.42.0",
|
|
56
|
+
"@canonical/ke-graphql": "^0.42.0",
|
|
57
|
+
"@canonical/summon-application": "^0.42.0",
|
|
58
|
+
"@canonical/summon-component": "^0.42.0",
|
|
59
|
+
"@canonical/summon-core": "^0.42.0",
|
|
60
|
+
"@canonical/summon-package": "^0.42.0",
|
|
61
|
+
"@canonical/task": "^0.42.0",
|
|
62
62
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
63
63
|
"chalk": "^6.0.0",
|
|
64
64
|
"commander": "^15.0.0",
|
|
@@ -67,21 +67,21 @@
|
|
|
67
67
|
"zod": "^3.25.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@biomejs/biome": "2.5.
|
|
70
|
+
"@biomejs/biome": "2.5.14",
|
|
71
71
|
"@canonical/anatomy-dsl": "^0.6.0",
|
|
72
|
-
"@canonical/biome-config": "^0.
|
|
73
|
-
"@canonical/summon": "^0.
|
|
72
|
+
"@canonical/biome-config": "^0.42.0",
|
|
73
|
+
"@canonical/summon": "^0.42.0",
|
|
74
74
|
"@canonical/token-ontology": "^0.10.1",
|
|
75
|
-
"@canonical/typescript-config": "^0.
|
|
76
|
-
"@canonical/webarchitect": "^0.
|
|
75
|
+
"@canonical/typescript-config": "^0.42.0",
|
|
76
|
+
"@canonical/webarchitect": "^0.42.0",
|
|
77
77
|
"@types/bun": "^1.3.10",
|
|
78
78
|
"@types/node": "^26.0.0",
|
|
79
79
|
"@vitest/coverage-v8": "^4.0.18",
|
|
80
|
-
"typescript": "^
|
|
80
|
+
"typescript": "^7.0.2",
|
|
81
81
|
"vitest": "^4.0.18"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=22.18 <23 || >=23.6"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "75c2b17029ba899be3fa645be28290ac6fcb83a9"
|
|
87
87
|
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* hand-written because it cannot be discovered:
|
|
14
14
|
* - surfacing a noun also needs prose and examples in `create.verb.ts`, so
|
|
15
15
|
* the surface is a deliberate SUBSET — `@canonical/summon-application`
|
|
16
|
-
* ships `application/react`, `domain`, `
|
|
17
|
-
* exposes
|
|
18
|
-
* - `pickGenerator` imports all three
|
|
16
|
+
* ships `application/react`, `domain`, `page` and `wrapper`, and `create`
|
|
17
|
+
* exposes `application/react` and `page`;
|
|
18
|
+
* - `pickGenerator` imports all three generator packages STATICALLY. A computed
|
|
19
19
|
* `import(name)` is opaque to every bundler and analyser; the historical
|
|
20
20
|
* cost was measured under `bun build --compile`, which left the
|
|
21
21
|
* generators out of the artifact entirely.
|
|
@@ -38,6 +38,9 @@ export const CREATE_GENERATORS = {
|
|
|
38
38
|
application: {
|
|
39
39
|
paths: ["application/react"],
|
|
40
40
|
},
|
|
41
|
+
page: {
|
|
42
|
+
paths: ["page"],
|
|
43
|
+
},
|
|
41
44
|
} as const;
|
|
42
45
|
|
|
43
46
|
/**
|
|
@@ -5,11 +5,20 @@
|
|
|
5
5
|
* the CLI `--dry-run` preview (both filter out Prompt effects).
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
existsSync,
|
|
10
|
+
mkdirSync,
|
|
11
|
+
mkdtempSync,
|
|
12
|
+
readdirSync,
|
|
13
|
+
readFileSync,
|
|
14
|
+
writeFileSync,
|
|
15
|
+
} from "node:fs";
|
|
9
16
|
import { tmpdir } from "node:os";
|
|
10
17
|
import { join } from "node:path";
|
|
11
18
|
import { afterEach, describe, expect, it } from "vitest";
|
|
19
|
+
import { asPragmaError } from "../../kernel/error/fromTaskError.js";
|
|
12
20
|
import { executeVerb } from "../../kernel/project/cli/dispatch.js";
|
|
21
|
+
import { mapExitCode } from "../../kernel/project/cli/exitCodes.js";
|
|
13
22
|
import { bootRuntime } from "../../kernel/runtime/boot.js";
|
|
14
23
|
import type { GlobalFlags } from "../../kernel/runtime/types.js";
|
|
15
24
|
import type { VerbSpec } from "../../kernel/spec/types.js";
|
|
@@ -221,3 +230,166 @@ describe("create over MCP (PROTECTED)", () => {
|
|
|
221
230
|
}
|
|
222
231
|
});
|
|
223
232
|
});
|
|
233
|
+
|
|
234
|
+
describe("create page (PROTECTED)", () => {
|
|
235
|
+
/** A scratch application holding the `invoices` domain a page is added to. */
|
|
236
|
+
const appWithDomain = (): string => {
|
|
237
|
+
const dir = freshCwd();
|
|
238
|
+
mkdirSync(join(dir, "src/domains/invoices"), { recursive: true });
|
|
239
|
+
writeFileSync(
|
|
240
|
+
join(dir, "src/domains/invoices/routes.ts"),
|
|
241
|
+
"export default {};\n",
|
|
242
|
+
);
|
|
243
|
+
return dir;
|
|
244
|
+
};
|
|
245
|
+
const pageFile = (dir: string) =>
|
|
246
|
+
join(dir, "src/domains/invoices/DetailPage.tsx");
|
|
247
|
+
|
|
248
|
+
it("MCP plan-first: a plan naming the page and the routing guide, nothing written; confirm: true writes it", async () => {
|
|
249
|
+
const dir = appWithDomain();
|
|
250
|
+
const prev = process.cwd();
|
|
251
|
+
process.chdir(dir);
|
|
252
|
+
try {
|
|
253
|
+
const mcp = await projectMcp([createModule], dir);
|
|
254
|
+
cleanup = mcp.cleanup;
|
|
255
|
+
|
|
256
|
+
const planned = await mcp.callTool("create_page", {
|
|
257
|
+
pagePath: "invoices/detail",
|
|
258
|
+
});
|
|
259
|
+
expect(planned.ok).toBe(true);
|
|
260
|
+
expect(planned.meta).toMatchObject({
|
|
261
|
+
planOnly: true,
|
|
262
|
+
confirmRequired: true,
|
|
263
|
+
});
|
|
264
|
+
const plan = (planned.data as { plan: string[] }).plan;
|
|
265
|
+
expect(plan.some((line) => line.includes("DetailPage.tsx"))).toBe(true);
|
|
266
|
+
expect(plan.at(-1)).toContain(
|
|
267
|
+
'import DetailPage from "./DetailPage.js";',
|
|
268
|
+
);
|
|
269
|
+
expect(existsSync(pageFile(dir))).toBe(false);
|
|
270
|
+
|
|
271
|
+
const applied = await mcp.callTool("create_page", {
|
|
272
|
+
pagePath: "invoices/detail",
|
|
273
|
+
confirm: true,
|
|
274
|
+
});
|
|
275
|
+
expect(applied.ok).toBe(true);
|
|
276
|
+
expect(readFileSync(pageFile(dir), "utf8")).toContain(
|
|
277
|
+
"export default function DetailPage(): ReactElement {",
|
|
278
|
+
);
|
|
279
|
+
expect(
|
|
280
|
+
readFileSync(join(dir, "src/domains/invoices/routes.ts"), "utf8"),
|
|
281
|
+
).toBe("export default {};\n");
|
|
282
|
+
} finally {
|
|
283
|
+
process.chdir(prev);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it("the MCP plan matches the CLI --dry-run preview", async () => {
|
|
288
|
+
const dir = appWithDomain();
|
|
289
|
+
const prev = process.cwd();
|
|
290
|
+
process.chdir(dir);
|
|
291
|
+
try {
|
|
292
|
+
const mcp = await projectMcp([createModule], dir);
|
|
293
|
+
cleanup = mcp.cleanup;
|
|
294
|
+
const mcpResult = await mcp.callTool("create_page", {
|
|
295
|
+
pagePath: "invoices/detail",
|
|
296
|
+
});
|
|
297
|
+
const cliOutcome = await executeVerb(
|
|
298
|
+
createVerbs.page as VerbSpec,
|
|
299
|
+
{ pagePath: "invoices/detail" },
|
|
300
|
+
{ dryRun: true, undo: false, yes: false },
|
|
301
|
+
bootRuntime({ ...FLAGS, format: "json" }, dir),
|
|
302
|
+
);
|
|
303
|
+
const cliPlan = (
|
|
304
|
+
JSON.parse(cliOutcome.stdout as string) as {
|
|
305
|
+
data: { plan: string[] };
|
|
306
|
+
}
|
|
307
|
+
).data.plan;
|
|
308
|
+
expect((mcpResult.data as { plan: string[] }).plan).toEqual(cliPlan);
|
|
309
|
+
} finally {
|
|
310
|
+
process.chdir(prev);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
it("CLI: --yes writes the page, --undo deletes it and nothing else", async () => {
|
|
315
|
+
const dir = appWithDomain();
|
|
316
|
+
const prev = process.cwd();
|
|
317
|
+
process.chdir(dir);
|
|
318
|
+
try {
|
|
319
|
+
const run = (undo: boolean) =>
|
|
320
|
+
executeVerb(
|
|
321
|
+
createVerbs.page as VerbSpec,
|
|
322
|
+
{ pagePath: "invoices/detail" },
|
|
323
|
+
{ dryRun: false, undo, yes: true },
|
|
324
|
+
bootRuntime(FLAGS, dir),
|
|
325
|
+
);
|
|
326
|
+
expect((await run(false)).exitCode).toBe(0);
|
|
327
|
+
expect(existsSync(pageFile(dir))).toBe(true);
|
|
328
|
+
expect((await run(true)).exitCode).toBe(0);
|
|
329
|
+
expect(existsSync(pageFile(dir))).toBe(false);
|
|
330
|
+
expect(
|
|
331
|
+
readFileSync(join(dir, "src/domains/invoices/routes.ts"), "utf8"),
|
|
332
|
+
).toBe("export default {};\n");
|
|
333
|
+
} finally {
|
|
334
|
+
process.chdir(prev);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
it("CLI: a missing domain or a taken page name is INVALID_INPUT, exit 2", async () => {
|
|
339
|
+
// What the CLI boundary makes of the run's failure: its error and exit.
|
|
340
|
+
const refusal = async (dir: string) => {
|
|
341
|
+
try {
|
|
342
|
+
await executeVerb(
|
|
343
|
+
createVerbs.page as VerbSpec,
|
|
344
|
+
{ pagePath: "invoices/detail" },
|
|
345
|
+
{ dryRun: false, undo: false, yes: true },
|
|
346
|
+
bootRuntime(FLAGS, dir),
|
|
347
|
+
);
|
|
348
|
+
} catch (error) {
|
|
349
|
+
const pragma = asPragmaError(error);
|
|
350
|
+
return { pragma, exit: mapExitCode(pragma.code) };
|
|
351
|
+
}
|
|
352
|
+
throw new Error("the run did not refuse");
|
|
353
|
+
};
|
|
354
|
+
const prev = process.cwd();
|
|
355
|
+
try {
|
|
356
|
+
const empty = freshCwd();
|
|
357
|
+
process.chdir(empty);
|
|
358
|
+
const missing = await refusal(empty);
|
|
359
|
+
expect(missing.pragma.code).toBe("INVALID_INPUT");
|
|
360
|
+
expect(missing.exit).toBe(2);
|
|
361
|
+
expect(missing.pragma.message).toContain('Domain "invoices" not found');
|
|
362
|
+
expect(readdirSync(empty)).toEqual([]);
|
|
363
|
+
|
|
364
|
+
const dir = appWithDomain();
|
|
365
|
+
process.chdir(dir);
|
|
366
|
+
writeFileSync(pageFile(dir), "hand-written\n");
|
|
367
|
+
const taken = await refusal(dir);
|
|
368
|
+
expect(taken.pragma.code).toBe("INVALID_INPUT");
|
|
369
|
+
expect(taken.exit).toBe(2);
|
|
370
|
+
expect(taken.pragma.message).toContain("already exists");
|
|
371
|
+
expect(readFileSync(pageFile(dir), "utf8")).toBe("hand-written\n");
|
|
372
|
+
} finally {
|
|
373
|
+
process.chdir(prev);
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
it("refuses when the domain does not exist, writing nothing", async () => {
|
|
378
|
+
const dir = freshCwd();
|
|
379
|
+
const prev = process.cwd();
|
|
380
|
+
process.chdir(dir);
|
|
381
|
+
try {
|
|
382
|
+
const mcp = await projectMcp([createModule], dir);
|
|
383
|
+
cleanup = mcp.cleanup;
|
|
384
|
+
const result = await mcp.callTool("create_page", {
|
|
385
|
+
pagePath: "invoices/detail",
|
|
386
|
+
confirm: true,
|
|
387
|
+
});
|
|
388
|
+
expect(result.ok).toBe(false);
|
|
389
|
+
expect(JSON.stringify(result)).toContain("Create the domain first.");
|
|
390
|
+
expect(readdirSync(dir)).toEqual([]);
|
|
391
|
+
} finally {
|
|
392
|
+
process.chdir(prev);
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
});
|
|
@@ -604,6 +604,7 @@ describe("projection fidelity — the committed surface IS the live generators (
|
|
|
604
604
|
"component/lit:componentPath",
|
|
605
605
|
"component/react:componentPath",
|
|
606
606
|
"component/svelte:componentPath",
|
|
607
|
+
"page:pagePath",
|
|
607
608
|
]);
|
|
608
609
|
});
|
|
609
610
|
|
|
@@ -777,18 +778,19 @@ describe("declared generator bindings (PROTECTED)", () => {
|
|
|
777
778
|
expect(framework?.default).toBeUndefined();
|
|
778
779
|
});
|
|
779
780
|
|
|
780
|
-
it("create surfaces exactly the
|
|
781
|
+
it("create surfaces exactly the four declared nouns", () => {
|
|
781
782
|
// A LITERAL surface pin, deliberately not derived from CREATE_GENERATORS:
|
|
782
783
|
// surfacing a noun also needs a hand-written prompt mirror, path param and
|
|
783
784
|
// examples in create.verb.ts, so the surface is a deliberate SUBSET of what
|
|
784
785
|
// the declared packages ship (`@canonical/summon-application` also ships
|
|
785
|
-
// `domain
|
|
786
|
+
// `domain` and `wrapper`). Pinning OUR four nouns rather than any
|
|
786
787
|
// third-party package's generator list keeps an upstream release from
|
|
787
788
|
// turning this red.
|
|
788
789
|
expect(createModule.verbs.map((v) => v.path[1])).toEqual([
|
|
789
790
|
"component",
|
|
790
791
|
"package",
|
|
791
792
|
"application",
|
|
793
|
+
"page",
|
|
792
794
|
]);
|
|
793
795
|
});
|
|
794
796
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `create` verbs — `component` / `package` / `application`, the
|
|
3
|
-
* binding-level VerbSpecs (the MCP/covenant/reference grammar). Their params
|
|
2
|
+
* The `create` verbs — `component` / `package` / `application` / `page`, the
|
|
3
|
+
* FOUR binding-level VerbSpecs (the MCP/covenant/reference grammar). Their params
|
|
4
4
|
* DERIVE mechanically from the generators' own prompts, projected at build
|
|
5
5
|
* time into `createSurface.generated.ts` — no hand mirrors, no flag aliases:
|
|
6
6
|
* the prompt names ARE the param/MCP-arg names, the FLAG tokens are
|
|
@@ -128,12 +128,18 @@ const packageParams: ParamSpec[] = generatorToParams(
|
|
|
128
128
|
const applicationParams: ParamSpec[] = generatorToParams(
|
|
129
129
|
surfaceFor("application/react").prompts,
|
|
130
130
|
);
|
|
131
|
+
const pageParams: ParamSpec[] = generatorToParams(surfaceFor("page").prompts);
|
|
131
132
|
|
|
132
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* The path param each noun jails. `package` writes into a name-derived subdir;
|
|
135
|
+
* `page`'s answer is two name segments (letters, digits, hyphens), never a
|
|
136
|
+
* filesystem path, so neither has one to jail.
|
|
137
|
+
*/
|
|
133
138
|
const PATH_PARAM: Record<CreateKind, string | undefined> = {
|
|
134
139
|
component: "componentPath",
|
|
135
140
|
package: undefined,
|
|
136
141
|
application: "appPath",
|
|
142
|
+
page: undefined,
|
|
137
143
|
};
|
|
138
144
|
|
|
139
145
|
/**
|
|
@@ -547,4 +553,24 @@ export const createVerbs: Record<
|
|
|
547
553
|
example: { appPath: "my-app" },
|
|
548
554
|
},
|
|
549
555
|
),
|
|
556
|
+
page: createVerb(
|
|
557
|
+
"page",
|
|
558
|
+
"Add a page component to an existing domain of a scaffolded application, and print how to route it.",
|
|
559
|
+
pageParams,
|
|
560
|
+
[
|
|
561
|
+
{
|
|
562
|
+
cmd: `${BIN_NAME} create page invoices/detail`,
|
|
563
|
+
note: "writes src/domains/invoices/DetailPage.tsx and prints route examples",
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
cmd: `${BIN_NAME} create page invoices/detail --undo`,
|
|
567
|
+
note: "delete the page again",
|
|
568
|
+
},
|
|
569
|
+
],
|
|
570
|
+
{
|
|
571
|
+
useWhen:
|
|
572
|
+
"when asked to add a page to an existing domain of an application scaffolded with create application",
|
|
573
|
+
example: { pagePath: "invoices/detail" },
|
|
574
|
+
},
|
|
575
|
+
),
|
|
550
576
|
};
|
|
@@ -38,14 +38,21 @@ const FLAGS: GlobalFlags = {
|
|
|
38
38
|
verbose: false,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/**
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Spawn the real bin non-interactively in a fresh, XDG-isolated cwd, after
|
|
43
|
+
* `seed` has written whatever the leaf needs to already exist there.
|
|
44
|
+
*/
|
|
45
|
+
function run(
|
|
46
|
+
args: readonly string[],
|
|
47
|
+
seed?: (cwd: string) => void,
|
|
48
|
+
): {
|
|
43
49
|
status: number | null;
|
|
44
50
|
stdout: string;
|
|
45
51
|
stderr: string;
|
|
46
52
|
cwd: string;
|
|
47
53
|
} {
|
|
48
54
|
const cwd = freshCwd();
|
|
55
|
+
seed?.(cwd);
|
|
49
56
|
const result = spawnSync("bun", [pragmaBin, ...args], {
|
|
50
57
|
cwd,
|
|
51
58
|
encoding: "utf-8",
|
|
@@ -659,6 +666,29 @@ describe("the mounted create grammar (subprocess)", () => {
|
|
|
659
666
|
"--app-path": "replied-app",
|
|
660
667
|
"--rendering": "spa",
|
|
661
668
|
},
|
|
669
|
+
page: { "--page-path": "replied/detail" },
|
|
670
|
+
};
|
|
671
|
+
// A leaf that adds to an existing application needs that part of it
|
|
672
|
+
// present: `page` refuses to run without its domain's routes.ts.
|
|
673
|
+
const SEEDS: Record<
|
|
674
|
+
string,
|
|
675
|
+
{ files: string[]; seed: (cwd: string) => void }
|
|
676
|
+
> = {
|
|
677
|
+
page: {
|
|
678
|
+
files: [
|
|
679
|
+
"src",
|
|
680
|
+
"src/domains",
|
|
681
|
+
"src/domains/replied",
|
|
682
|
+
"src/domains/replied/routes.ts",
|
|
683
|
+
],
|
|
684
|
+
seed: (cwd) => {
|
|
685
|
+
mkdirSync(join(cwd, "src/domains/replied"), { recursive: true });
|
|
686
|
+
writeFileSync(
|
|
687
|
+
join(cwd, "src/domains/replied/routes.ts"),
|
|
688
|
+
"export default {};\n",
|
|
689
|
+
);
|
|
690
|
+
},
|
|
691
|
+
},
|
|
662
692
|
};
|
|
663
693
|
for (const [commandPath, surface] of Object.entries(CREATE_SURFACE)) {
|
|
664
694
|
it(`${commandPath}: the refusal's own instruction WORKS — its Missing tokens supplied back (+ --dry-run) preview, exit 0`, () => {
|
|
@@ -688,11 +718,17 @@ describe("the mounted create grammar (subprocess)", () => {
|
|
|
688
718
|
}
|
|
689
719
|
return [token, value];
|
|
690
720
|
});
|
|
691
|
-
const
|
|
721
|
+
const seeded = SEEDS[commandPath];
|
|
722
|
+
const replied = run(
|
|
723
|
+
["create", ...path, ...supplied, "--dry-run"],
|
|
724
|
+
seeded?.seed,
|
|
725
|
+
);
|
|
692
726
|
expect(replied.stderr).not.toContain("unknown option");
|
|
693
727
|
expect(replied.status, replied.stderr).toBe(0);
|
|
694
728
|
expect(replied.stdout).toContain("Dry-run complete.");
|
|
695
|
-
expect(
|
|
729
|
+
expect(
|
|
730
|
+
readdirSync(replied.cwd, { recursive: true }).map(String).sort(),
|
|
731
|
+
).toEqual(seeded?.files ?? []);
|
|
696
732
|
}, 60_000);
|
|
697
733
|
}
|
|
698
734
|
// The react list stays pinned at its exact bytes (the round-14 literal):
|
|
@@ -267,6 +267,21 @@ export const CREATE_SURFACE: Readonly<Record<string, SurfaceCommand>> = {
|
|
|
267
267
|
}
|
|
268
268
|
]
|
|
269
269
|
},
|
|
270
|
+
"page": {
|
|
271
|
+
"path": [
|
|
272
|
+
"page"
|
|
273
|
+
],
|
|
274
|
+
"description": "Add a page component to an existing domain",
|
|
275
|
+
"prompts": [
|
|
276
|
+
{
|
|
277
|
+
"name": "pagePath",
|
|
278
|
+
"type": "text",
|
|
279
|
+
"message": "Page path, as <domain>/<name> (for example invoices/detail):",
|
|
280
|
+
"positional": true,
|
|
281
|
+
"group": "Page"
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
},
|
|
270
285
|
};
|
|
271
286
|
|
|
272
287
|
/**
|
|
@@ -419,4 +434,11 @@ export const CREATE_CLI_SYNTAX: Readonly<
|
|
|
419
434
|
"kebabName": "run-install"
|
|
420
435
|
}
|
|
421
436
|
},
|
|
437
|
+
"page": {
|
|
438
|
+
"pagePath": {
|
|
439
|
+
"flag": "--page-path",
|
|
440
|
+
"takesValue": true,
|
|
441
|
+
"kebabName": "page-path"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
422
444
|
};
|
|
@@ -41,6 +41,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
41
41
|
import { fileURLToPath } from "node:url";
|
|
42
42
|
import {
|
|
43
43
|
CONFORMANCE_FIXTURES,
|
|
44
|
+
type ConformanceFixture,
|
|
44
45
|
diffTrees,
|
|
45
46
|
flagizeAnswers,
|
|
46
47
|
formatTreeDiff,
|
|
@@ -66,6 +67,40 @@ const summonBin = join(repoRoot, "packages/cli/summon/src/bin.tsx");
|
|
|
66
67
|
const freshCwd = (prefix: string): string =>
|
|
67
68
|
mkdtempSync(join(tmpdir(), prefix));
|
|
68
69
|
|
|
70
|
+
/** A fixture plus the files that must already exist where it runs. */
|
|
71
|
+
interface CrossCliFixture extends ConformanceFixture {
|
|
72
|
+
readonly seed?: Readonly<Record<string, string>>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The shared fixtures, plus pragma's own for the one binding they do not
|
|
77
|
+
* name: `page` adds to an existing domain, so its cwd is seeded with the
|
|
78
|
+
* domain's routes.ts. The seed is identical for every producer, and it stays
|
|
79
|
+
* in each snapshot, so it cannot hide a difference.
|
|
80
|
+
*/
|
|
81
|
+
const FIXTURES: readonly CrossCliFixture[] = [
|
|
82
|
+
...CONFORMANCE_FIXTURES,
|
|
83
|
+
{
|
|
84
|
+
name: "page",
|
|
85
|
+
generator: "page",
|
|
86
|
+
answers: { pagePath: "invoices/detail" },
|
|
87
|
+
seed: { "src/domains/invoices/routes.ts": "export default {};\n" },
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
/** A fresh cwd holding a fixture's seed files. */
|
|
92
|
+
function seededCwd(
|
|
93
|
+
prefix: string,
|
|
94
|
+
seed: Readonly<Record<string, string>> = {},
|
|
95
|
+
): string {
|
|
96
|
+
const cwd = freshCwd(prefix);
|
|
97
|
+
for (const [file, content] of Object.entries(seed)) {
|
|
98
|
+
mkdirSync(dirname(join(cwd, file)), { recursive: true });
|
|
99
|
+
writeFileSync(join(cwd, file), content);
|
|
100
|
+
}
|
|
101
|
+
return cwd;
|
|
102
|
+
}
|
|
103
|
+
|
|
69
104
|
/**
|
|
70
105
|
* A one-file barrel package the summon bin discovers via `--generators`: it
|
|
71
106
|
* re-exports the three BUILT generator maps (`dist/esm`, exactly what a
|
|
@@ -102,8 +137,11 @@ function commandPathOf(fixtureGenerator: string): string {
|
|
|
102
137
|
}
|
|
103
138
|
|
|
104
139
|
/** Producer (1): the compiled pragma binary. */
|
|
105
|
-
function producePragma(
|
|
106
|
-
|
|
140
|
+
function producePragma(
|
|
141
|
+
args: readonly string[],
|
|
142
|
+
seed?: CrossCliFixture["seed"],
|
|
143
|
+
): TreeSnapshot {
|
|
144
|
+
const cwd = seededCwd("crosscli-pragma-", seed);
|
|
107
145
|
execFileSync(process.execPath, [pragmaEntry, "create", ...args], {
|
|
108
146
|
cwd,
|
|
109
147
|
stdio: "pipe",
|
|
@@ -113,8 +151,11 @@ function producePragma(args: readonly string[]): TreeSnapshot {
|
|
|
113
151
|
}
|
|
114
152
|
|
|
115
153
|
/** Producer (2): the real summon bin, served the same generators. */
|
|
116
|
-
function produceSummonBin(
|
|
117
|
-
|
|
154
|
+
function produceSummonBin(
|
|
155
|
+
args: readonly string[],
|
|
156
|
+
seed?: CrossCliFixture["seed"],
|
|
157
|
+
): TreeSnapshot {
|
|
158
|
+
const cwd = seededCwd("crosscli-summon-", seed);
|
|
118
159
|
execFileSync("bun", [summonBin, "--generators", generatorsDir, ...args], {
|
|
119
160
|
cwd,
|
|
120
161
|
stdio: "pipe",
|
|
@@ -248,7 +289,8 @@ const PRAGMA_EXTRAS = new Set(["--dry-run", "--undo", "--yes", "--help"]);
|
|
|
248
289
|
describe("cross-CLI conformance matrix (PROTECTED)", () => {
|
|
249
290
|
// The matrix is COMPLETE by declaration, not by convention: the two loops
|
|
250
291
|
// below iterate the shared fixture list (a literal in summon-core, whose
|
|
251
|
-
// own docblock says the ids are "conventional, not enforced")
|
|
292
|
+
// own docblock says the ids are "conventional, not enforced") plus
|
|
293
|
+
// pragma's own `FIXTURES` additions, so a new
|
|
252
294
|
// declared binding path would otherwise add zero byte-equality and
|
|
253
295
|
// help-parity cells, silently, while this describe's header claims "every
|
|
254
296
|
// declared generator binding". This cell closes the loop — and makes
|
|
@@ -262,11 +304,7 @@ describe("cross-CLI conformance matrix (PROTECTED)", () => {
|
|
|
262
304
|
// one path may carry several fixtures — application/react is driven by
|
|
263
305
|
// both the SSR arm and the SPA arm.
|
|
264
306
|
[
|
|
265
|
-
...new Set(
|
|
266
|
-
CONFORMANCE_FIXTURES.map((fixture) =>
|
|
267
|
-
commandPathOf(fixture.generator),
|
|
268
|
-
),
|
|
269
|
-
),
|
|
307
|
+
...new Set(FIXTURES.map((fixture) => commandPathOf(fixture.generator))),
|
|
270
308
|
].sort(),
|
|
271
309
|
).toEqual(
|
|
272
310
|
Object.values(CREATE_GENERATORS)
|
|
@@ -275,7 +313,7 @@ describe("cross-CLI conformance matrix (PROTECTED)", () => {
|
|
|
275
313
|
);
|
|
276
314
|
});
|
|
277
315
|
|
|
278
|
-
for (const fixture of
|
|
316
|
+
for (const fixture of FIXTURES) {
|
|
279
317
|
it(`${fixture.name}: summon bin ≡ pragma compiled binary ≡ the reference`, async () => {
|
|
280
318
|
const commandPath = commandPathOf(fixture.generator);
|
|
281
319
|
const { pickGenerator } = await import("./pickGenerator.js");
|
|
@@ -288,11 +326,12 @@ describe("cross-CLI conformance matrix (PROTECTED)", () => {
|
|
|
288
326
|
"--yes",
|
|
289
327
|
];
|
|
290
328
|
|
|
291
|
-
let pragma = producePragma(args);
|
|
292
|
-
let summon = produceSummonBin(args);
|
|
329
|
+
let pragma = producePragma(args, fixture.seed);
|
|
330
|
+
let summon = produceSummonBin(args, fixture.seed);
|
|
293
331
|
let reference = await produceReference({
|
|
294
332
|
generator,
|
|
295
333
|
answers: fixture.answers,
|
|
334
|
+
cwd: seededCwd("crosscli-reference-", fixture.seed),
|
|
296
335
|
});
|
|
297
336
|
|
|
298
337
|
// The application fixture resolves its @canonical/* range through
|
|
@@ -322,7 +361,7 @@ describe("cross-CLI conformance matrix (PROTECTED)", () => {
|
|
|
322
361
|
}, 120_000);
|
|
323
362
|
}
|
|
324
363
|
|
|
325
|
-
for (const fixture of
|
|
364
|
+
for (const fixture of FIXTURES) {
|
|
326
365
|
it(`${fixture.name}: help/flag parity over the parity set + structurally equal generator sections`, async () => {
|
|
327
366
|
const commandPath = commandPathOf(fixture.generator);
|
|
328
367
|
const path = commandPath.split("/");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `create` capability barrel — component / package / application scaffolds.
|
|
2
|
+
* The `create` capability barrel — component / package / application / page scaffolds.
|
|
3
3
|
*
|
|
4
4
|
* Importing this pulls only the verb specs (params derived from the committed
|
|
5
5
|
* projection), the mount, and the formatters; every generator load and the
|
|
@@ -25,6 +25,7 @@ const GENERATOR_MAPS: Record<CreateKind, GeneratorMap> = {
|
|
|
25
25
|
component: componentGenerators as unknown as GeneratorMap,
|
|
26
26
|
package: packageGenerators as unknown as GeneratorMap,
|
|
27
27
|
application: applicationGenerators as unknown as GeneratorMap,
|
|
28
|
+
page: applicationGenerators as unknown as GeneratorMap,
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
/**
|