@beignet/cli 0.0.14 → 0.0.15
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 +21 -0
- package/README.md +11 -8
- package/dist/inspect.js +12 -3
- package/dist/inspect.js.map +1 -1
- package/dist/make.js +2 -2
- package/dist/templates/agents.d.ts +2 -2
- package/dist/templates/agents.d.ts.map +1 -1
- package/dist/templates/agents.js +9 -9
- package/dist/templates/agents.js.map +1 -1
- package/dist/templates/base.js +1 -1
- package/dist/templates/base.js.map +1 -1
- package/dist/templates/server.d.ts.map +1 -1
- package/dist/templates/server.js +13 -6
- package/dist/templates/server.js.map +1 -1
- package/dist/templates/shared.js +1 -1
- package/dist/templates/shared.js.map +1 -1
- package/dist/templates/todos.js +1 -1
- package/package.json +2 -2
- package/src/inspect.ts +15 -3
- package/src/make.ts +2 -2
- package/src/templates/agents.ts +9 -10
- package/src/templates/base.ts +3 -3
- package/src/templates/server.ts +13 -6
- package/src/templates/shared.ts +1 -1
- package/src/templates/todos.ts +1 -1
- package/dist/templates/db.d.ts +0 -15
- package/dist/templates/db.d.ts.map +0 -1
- package/dist/templates/db.js +0 -1001
- package/dist/templates/db.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @beignet/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 73a682a: Make the type-preserving curried route-group form the canonical Beignet route
|
|
8
|
+
API across generated apps, docs, READMEs, and examples. `beignet doctor` now
|
|
9
|
+
warns when feature route groups use the direct generic form, and the direct
|
|
10
|
+
overload is deprecated because TypeScript erases per-route contract output
|
|
11
|
+
checks there.
|
|
12
|
+
- 2a02469: Add `createErrorReportingHooks(...)` for capturing unexpected HTTP failures
|
|
13
|
+
through `ctx.ports.errorReporter`, and wire generated apps to install the hook
|
|
14
|
+
with a no-op local reporter by default.
|
|
15
|
+
- 0645165: Rename the Inngest jobs provider package to `@beignet/provider-jobs-inngest` and update generated apps to use `inngestJobsProvider`.
|
|
16
|
+
- 2a02469: Generate MCP client configuration that launches the app-local Beignet CLI bin
|
|
17
|
+
instead of resolving the unrelated unscoped `beignet` package through registry
|
|
18
|
+
runners.
|
|
19
|
+
- Updated dependencies [73a682a]
|
|
20
|
+
- Updated dependencies [2a02469]
|
|
21
|
+
- Updated dependencies [7d3c980]
|
|
22
|
+
- @beignet/core@0.0.15
|
|
23
|
+
|
|
3
24
|
## 0.0.14
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ By default the CLI creates a Next.js app with:
|
|
|
54
54
|
- UOW, audit logging, durable idempotency, and a durable outbox drain route
|
|
55
55
|
- Jobs, events, listeners, schedules, mail-backed notifications, and uploads
|
|
56
56
|
- App-owned ports with provider-backed infra adapters
|
|
57
|
+
- No-op error reporting wired through the HTTP error reporting hook
|
|
57
58
|
- Validated application use cases
|
|
58
59
|
- A Beignet server wired through Next.js route handlers
|
|
59
60
|
- App error helpers, auth helpers, env validation, health checks, and devtools
|
|
@@ -70,8 +71,8 @@ page and a reduced typed client.
|
|
|
70
71
|
|
|
71
72
|
The starter ships local production-shaped defaults: Better Auth, Drizzle
|
|
72
73
|
persistence, pino logging, UOW, durable idempotency, a durable outbox, audit
|
|
73
|
-
logging, and devtools. Add external service
|
|
74
|
-
those providers:
|
|
74
|
+
logging, no-op error reporting, and devtools. Add external service
|
|
75
|
+
integrations only when you want those providers:
|
|
75
76
|
|
|
76
77
|
```bash
|
|
77
78
|
bunx @beignet/cli create my-app --integrations inngest,resend
|
|
@@ -79,7 +80,7 @@ bunx @beignet/cli create my-app --integrations inngest,resend
|
|
|
79
80
|
|
|
80
81
|
Available integrations:
|
|
81
82
|
|
|
82
|
-
- `inngest` - Inngest-backed background jobs via `@beignet/provider-inngest`
|
|
83
|
+
- `inngest` - Inngest-backed background jobs via `@beignet/provider-jobs-inngest`
|
|
83
84
|
- `resend` - Resend-backed mail via `@beignet/provider-mail-resend`
|
|
84
85
|
- `upstash-rate-limit` - Upstash-backed rate limiting via
|
|
85
86
|
`@beignet/provider-rate-limit-upstash`
|
|
@@ -635,7 +636,8 @@ instrumentation, actor, and tenant decisions as the scheduled drain route.
|
|
|
635
636
|
|
|
636
637
|
There is intentionally no separate `beignet jobs drain` command. Outbox-backed
|
|
637
638
|
jobs drain through the outbox beside durable events. Direct provider jobs should
|
|
638
|
-
use provider-owned worker entrypoints, such as
|
|
639
|
+
use provider-owned worker entrypoints, such as a BullMQ worker built with
|
|
640
|
+
`createBullMQJobWorker(...)` or an Inngest route built with
|
|
639
641
|
`createInngestJobFunction(...)`.
|
|
640
642
|
|
|
641
643
|
Use `beignet schedule run` when you need to run a schedule explicitly from a
|
|
@@ -889,10 +891,11 @@ The server exposes five tools:
|
|
|
889
891
|
artifact kinds as `beignet make`
|
|
890
892
|
|
|
891
893
|
Tool outputs match the JSON the matching `--json` flags print. Generated apps
|
|
892
|
-
ship a `.mcp.json` that
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
894
|
+
ship a `.mcp.json` that runs `./node_modules/.bin/beignet mcp`, so Claude
|
|
895
|
+
Code picks up the app-local CLI version with no configuration; Cursor and VS
|
|
896
|
+
Code users add the same command to `.cursor/mcp.json` or `.vscode/mcp.json`.
|
|
897
|
+
For one-off usage outside an installed app, run the scoped package, such as
|
|
898
|
+
`bunx @beignet/cli mcp` or `npx @beignet/cli mcp`. Generated apps also include
|
|
896
899
|
`AGENTS.md` and `CLAUDE.md` covering registration, generator, placement, and
|
|
897
900
|
validation conventions.
|
|
898
901
|
|
package/dist/inspect.js
CHANGED
|
@@ -939,12 +939,12 @@ async function inspectCanonicalConformance(targetDir, files, config, convention,
|
|
|
939
939
|
message: `${file} should import type { AppContext } from ${config.paths.appContext} so feature routes use the app-wide context type.`,
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
if (!/defineRouteGroup\s*<\s*AppContext\s
|
|
942
|
+
if (!/defineRouteGroup\s*<\s*AppContext\s*>\s*\(\s*\)\s*\(/.test(source)) {
|
|
943
943
|
diagnostics.push({
|
|
944
944
|
severity: "warning",
|
|
945
945
|
code: "BEIGNET_FEATURE_ROUTE_GROUP_CONTEXT",
|
|
946
946
|
file,
|
|
947
|
-
message: `${file} should call defineRouteGroup<AppContext>(
|
|
947
|
+
message: `${file} should call defineRouteGroup<AppContext>()({ ... }) so route groups preserve per-route contract and use-case type checks.`,
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
950
|
}
|
|
@@ -1303,7 +1303,7 @@ async function inspectPaymentsProductionReadiness(targetDir, files, config, sour
|
|
|
1303
1303
|
severity: "warning",
|
|
1304
1304
|
code: "BEIGNET_PAYMENTS_WEBHOOK_ROUTE_MISSING",
|
|
1305
1305
|
file: directoryPath(config.paths.routes),
|
|
1306
|
-
message: "This app appears to use payments, but no route calls createPaymentWebhookRoute(...). Expose payment webhooks under app/api/webhooks/payments/route.ts or an equivalent configured route so provider events can update billing state.",
|
|
1306
|
+
message: "This app appears to use payments, but no route calls createPaymentWebhookRoute(...) or createWebhookRoute(...) for payments. Expose payment webhooks under app/api/webhooks/payments/route.ts or an equivalent configured route so provider events can update billing state.",
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
const billingContractsFile = `${directoryPath(config.paths.features)}/billing/contracts.ts`;
|
|
@@ -1783,9 +1783,18 @@ async function hasPaymentWebhookRoute(targetDir, files, config, sourceCache) {
|
|
|
1783
1783
|
if (containsCallExpression(source, "createPaymentWebhookRoute")) {
|
|
1784
1784
|
return true;
|
|
1785
1785
|
}
|
|
1786
|
+
if (containsPaymentWebhookRoute(source)) {
|
|
1787
|
+
return true;
|
|
1788
|
+
}
|
|
1786
1789
|
}
|
|
1787
1790
|
return false;
|
|
1788
1791
|
}
|
|
1792
|
+
function containsPaymentWebhookRoute(source) {
|
|
1793
|
+
if (!containsCallExpression(source, "createWebhookRoute"))
|
|
1794
|
+
return false;
|
|
1795
|
+
return (source.includes("payments.verifyWebhook") ||
|
|
1796
|
+
source.includes("paymentWebhook"));
|
|
1797
|
+
}
|
|
1789
1798
|
async function appPortsIncludesIdempotency(targetDir, files, config, sourceCache) {
|
|
1790
1799
|
return appPortsIncludesPort(targetDir, files, config, sourceCache, "idempotency");
|
|
1791
1800
|
}
|