@beignet/next 0.0.24 → 0.0.25
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 +7 -0
- package/README.md +2 -1
- package/package.json +2 -2
- package/skills/routes-server/SKILL.md +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @beignet/next
|
|
2
2
|
|
|
3
|
+
## 0.0.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7c83da7: Refresh package-shipped TanStack Intent skills to match current Beignet app structure, generators, route helpers, and React Query cache helpers.
|
|
8
|
+
- @beignet/web@0.0.25
|
|
9
|
+
|
|
3
10
|
## 0.0.24
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -37,7 +37,8 @@ This package requires TypeScript 5.0 or higher for proper type inference.
|
|
|
37
37
|
This package ships a TanStack Intent skill for coding agents:
|
|
38
38
|
`@beignet/next#routes-server`. Load it when wiring route groups, central route
|
|
39
39
|
registration, `createNextServer`, server context, OpenAPI/devtools routes,
|
|
40
|
-
Next catch-all API adapters, uploads, webhooks,
|
|
40
|
+
Next catch-all API adapters, uploads, storage routes, webhooks, schedule cron
|
|
41
|
+
routes, or outbox drain routes.
|
|
41
42
|
|
|
42
43
|
## Quick start
|
|
43
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beignet/next",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Next.js server-side handlers for Beignet",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@beignet/web": "^0.0.
|
|
62
|
+
"@beignet/web": "^0.0.25",
|
|
63
63
|
"@standard-schema/spec": "^1.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: routes-server
|
|
3
|
-
description: "Build Beignet Next.js server integration with @beignet/next: defineRouteGroup, defineRoutes, contractsFromRoutes, createNextServer, server context, hooks, OpenAPI/devtools routes, catch-all API adapters, uploads, webhooks, outbox drains, and route inspection. Use when wiring or debugging Beignet routes in a Next app."
|
|
3
|
+
description: "Build Beignet Next.js server integration with @beignet/next: defineRouteGroup, defineRoutes, contractsFromRoutes, createNextServer, createNextClient, server context, hooks, OpenAPI/devtools routes, catch-all API adapters, uploads, storage routes, webhooks, payment webhooks, schedule cron routes, outbox drains, and route inspection. Use when wiring or debugging Beignet routes in a Next app."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Beignet Next Routes And Server
|
|
@@ -102,7 +102,8 @@ HTTP surfaces:
|
|
|
102
102
|
- devtools
|
|
103
103
|
- uploads
|
|
104
104
|
- storage object routes
|
|
105
|
-
- payment or webhook adapters
|
|
105
|
+
- payment or generic webhook adapters
|
|
106
|
+
- schedule cron routes
|
|
106
107
|
- outbox drains
|
|
107
108
|
- redirects or downloads
|
|
108
109
|
|
|
@@ -115,13 +116,24 @@ normal use-case binder.
|
|
|
115
116
|
`server/context.ts` should use `defineServerContext`. Request context reads the
|
|
116
117
|
session, creates an actor, attaches ports, request IDs, and trace context.
|
|
117
118
|
Service context is for schedules, tasks, outbox drains, and background work;
|
|
118
|
-
create a service actor and do not assume a request session.
|
|
119
|
+
create a service actor and do not assume a request session. Focused helpers
|
|
120
|
+
such as `createOutboxDrainRoute(...)`, `createScheduleRoute(...)`, and webhook
|
|
121
|
+
routes build context through the server; keep their fulfillment behavior in
|
|
122
|
+
use cases or app service functions.
|
|
123
|
+
|
|
124
|
+
## Next Client
|
|
125
|
+
|
|
126
|
+
Shared browser client setup usually lives in root `client/`. Use
|
|
127
|
+
`createClient(...)` from `@beignet/core/client` when same-origin relative
|
|
128
|
+
requests are enough. Use `createNextClient(...)` from `@beignet/next` when
|
|
129
|
+
server-side calls need Next-friendly absolute URL defaults.
|
|
119
130
|
|
|
120
131
|
## Debugging
|
|
121
132
|
|
|
122
133
|
- Route group exists but does not run: register it in `server/routes.ts`.
|
|
123
134
|
- Contract missing from OpenAPI: export `contracts = contractsFromRoutes(routes)`.
|
|
124
135
|
- `doctor` dislikes the route shape: use `defineRouteGroup<AppContext>()({ ... })`.
|
|
136
|
+
- Cron route fails closed: verify `CRON_SECRET` and the route's bearer token.
|
|
125
137
|
- Client code imports `server/`: move shared DTOs to schemas and call through
|
|
126
138
|
contracts and the typed client.
|
|
127
139
|
|