@beignet/cli 0.0.12 → 0.0.14
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/CHANGELOG.md +26 -0
- package/README.md +24 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/inspect.js +174 -0
- package/dist/inspect.js.map +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +22 -3
- package/dist/lint.js.map +1 -1
- package/dist/make.d.ts +11 -0
- package/dist/make.d.ts.map +1 -1
- package/dist/make.js +1608 -0
- package/dist/make.js.map +1 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +14 -2
- package/dist/mcp.js.map +1 -1
- package/dist/templates/agents.d.ts +4 -3
- package/dist/templates/agents.d.ts.map +1 -1
- package/dist/templates/agents.js +4 -3
- package/dist/templates/agents.js.map +1 -1
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +1 -0
- package/dist/templates/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +35 -0
- package/src/inspect.ts +361 -0
- package/src/lint.ts +28 -3
- package/src/make.ts +1823 -0
- package/src/mcp.ts +16 -2
- package/src/templates/agents.ts +4 -3
- package/src/templates/index.ts +1 -0
package/src/mcp.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
makeJob,
|
|
16
16
|
makeListener,
|
|
17
17
|
makeNotification,
|
|
18
|
+
makePayments,
|
|
18
19
|
makePolicy,
|
|
19
20
|
makePort,
|
|
20
21
|
makeResource,
|
|
@@ -43,6 +44,7 @@ const makeArtifactChoices = [
|
|
|
43
44
|
"job",
|
|
44
45
|
"listener",
|
|
45
46
|
"notification",
|
|
47
|
+
"payments",
|
|
46
48
|
"policy",
|
|
47
49
|
"port",
|
|
48
50
|
"resource",
|
|
@@ -62,8 +64,9 @@ const makeInputSchema = {
|
|
|
62
64
|
.describe("Kind of artifact to generate."),
|
|
63
65
|
name: z
|
|
64
66
|
.string()
|
|
67
|
+
.optional()
|
|
65
68
|
.describe(
|
|
66
|
-
"Artifact name. Feature-owned artifacts use feature-scoped paths such as posts/backfill.",
|
|
69
|
+
"Artifact name. Required except for payments. Feature-owned artifacts use feature-scoped paths such as posts/backfill.",
|
|
67
70
|
),
|
|
68
71
|
with: z
|
|
69
72
|
.array(z.enum(makeFeatureAddonChoices))
|
|
@@ -125,7 +128,7 @@ const makeInputSchema = {
|
|
|
125
128
|
|
|
126
129
|
type MakeToolInput = {
|
|
127
130
|
artifact: MakeArtifact;
|
|
128
|
-
name
|
|
131
|
+
name?: string;
|
|
129
132
|
with?: Array<(typeof makeFeatureAddonChoices)[number]>;
|
|
130
133
|
event?: string;
|
|
131
134
|
cron?: string;
|
|
@@ -176,6 +179,17 @@ async function runMakeTool(
|
|
|
176
179
|
cwd: string,
|
|
177
180
|
input: MakeToolInput,
|
|
178
181
|
): Promise<MakeResourceResult> {
|
|
182
|
+
if (input.artifact === "payments") {
|
|
183
|
+
return makePayments({
|
|
184
|
+
cwd,
|
|
185
|
+
force: input.force,
|
|
186
|
+
dryRun: input.dryRun,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
if (!input.name) {
|
|
190
|
+
throw new Error(`make ${input.artifact} requires a name.`);
|
|
191
|
+
}
|
|
192
|
+
|
|
179
193
|
const base = {
|
|
180
194
|
name: input.name,
|
|
181
195
|
cwd,
|
package/src/templates/agents.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { json, packageRunner, type TemplateContext } from "./shared.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* AGENTS.md
|
|
5
|
-
* from the code: registration wiring, generators, and the
|
|
6
|
-
* README.md owns setup and the app map; this file must not
|
|
4
|
+
* AGENTS.md and CLAUDE.md teach coding agents the conventions that are not
|
|
5
|
+
* discoverable from the code: registration wiring, generators, and the
|
|
6
|
+
* validation loop. README.md owns setup and the app map; this file must not
|
|
7
|
+
* duplicate it.
|
|
7
8
|
*/
|
|
8
9
|
export function agentsMd(ctx: TemplateContext): string {
|
|
9
10
|
const cli = packageRunner(ctx);
|
package/src/templates/index.ts
CHANGED
|
@@ -44,6 +44,7 @@ export function getTemplateFiles(ctx: TemplateContext): TemplateFile[] {
|
|
|
44
44
|
{ path: "package.json", content: packageJson(ctx) },
|
|
45
45
|
{ path: "README.md", content: readme(ctx) },
|
|
46
46
|
{ path: "AGENTS.md", content: agentsMd(ctx) },
|
|
47
|
+
{ path: "CLAUDE.md", content: agentsMd(ctx) },
|
|
47
48
|
{ path: ".mcp.json", content: mcpJson(ctx) },
|
|
48
49
|
{ path: ".gitignore", content: baseFiles.gitignore },
|
|
49
50
|
{ path: ".env.example", content: envExample(ctx) },
|