kitcn 0.33.0 → 0.33.1
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/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +20 -20
- package/dist/auth/nextjs/index.d.ts +2 -2
- package/dist/auth/start/server/index.d.ts +2 -2
- package/dist/{builder-Cyd5nCxZ.js → builder-DDYTlmTB.js} +12 -3
- package/dist/caller-factory-C3pcbzo0.d.ts +140 -0
- package/dist/crpc/index.d.ts +3 -2
- package/dist/{generated-contract-disabled-PdNGvNYP.d.ts → generated-contract-disabled-B_EaHGCP.d.ts} +42 -42
- package/dist/{http-types-BhhPZtwa.d.ts → http-types-8FBr10yl.d.ts} +3 -79
- package/dist/{middleware-BBS7oLtT.d.ts → middleware-D2hKJuSZ.d.ts} +1 -1
- package/dist/{middleware-D61Nm-iB.js → middleware-LvZov-hA.js} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DgMiD0-a.js → procedure-caller-DgGF_hA8.js} +1 -1
- package/dist/{procedure-name-DPYyLiVS.d.ts → procedure-name-kn-awLk1.d.ts} +12 -142
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +2 -2
- package/dist/react/index.d.ts +5 -6
- package/dist/react/index.js +20 -66
- package/dist/rsc/index.d.ts +4 -3
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +2 -2
- package/dist/solid/index.d.ts +5 -6
- package/dist/solid/index.js +20 -66
- package/dist/transformer-BEkxlnss.d.ts +78 -0
- package/dist/{types-BXpu7xIU.d.ts → types-Cl0utsTL.d.ts} +4 -3
- package/dist/{where-clause-compiler-DrV6lQg0.d.ts → where-clause-compiler-CoPVAVDO.d.ts} +135 -135
- package/package.json +1 -1
- package/skills/kitcn/SKILL.md +2 -1
- package/skills/kitcn/references/features/auth-admin.md +1 -0
- package/skills/kitcn/references/features/react.md +4 -5
- /package/dist/{context-utils-Cbv4r0AA.d.ts → context-utils-ax351iFc.d.ts} +0 -0
- /package/dist/{token-tlbNKQS0.d.ts → token-CZpDQUHd.d.ts} +0 -0
- /package/dist/{types-Bkeicpo6.d.ts → types-CzGsrLrY.d.ts} +0 -0
package/package.json
CHANGED
package/skills/kitcn/SKILL.md
CHANGED
|
@@ -34,7 +34,7 @@ Only remember these non-parity deltas:
|
|
|
34
34
|
2. No `z.void()` outputs; omit `.output(...)` for no-value mutations.
|
|
35
35
|
3. `.output(...)` parses the handler's value as-is and substitutes nothing: a handler must return the schema's *input* type, so `z.string().nullable()` needs an explicit `null` (`?? null`), not `undefined`. Model absent values as `.nullable()`, never a top-level `.optional()` — Convex wires `undefined` as `null` and cannot express top-level optionality, so `.output(z.string().optional())` publishes `v.string()` and the deployment rejects the `null` whenever the handler returns `undefined`. `.optional()` inside an object is fine. The low-level `returns:` option on `zCustomQuery`/`zCustomMutation`/`zCustomAction` differs — it substitutes `null` for `undefined` before parsing.
|
|
36
36
|
4. Stacked `.input(...)` calls merge input shapes.
|
|
37
|
-
5. `.paginated({ limit, item })` must be before `.query()` and
|
|
37
|
+
5. `.paginated({ limit, item })` must be before `.query()` and adds `input.cursor`, `input.endCursor`, and `input.limit`; pass all three to ORM cursor queries so live splits stay bounded.
|
|
38
38
|
6. Metadata is codegen’d onto `@convex/api` leaves (`api.namespace.fn.meta`) so never put secrets in `.meta(...)`; chaining `.meta(...)` is shallow merge and supports `defaultMeta`.
|
|
39
39
|
7. Auth metadata drives client behavior: `auth: "optional"` waits for auth load then runs, `auth: "required"` waits then skips when logged out.
|
|
40
40
|
8. `ctx.orm` enforces constraints + RLS; `ctx.db` bypasses them.
|
|
@@ -245,6 +245,7 @@ export const listProjects = authQuery
|
|
|
245
245
|
where: { ownerId: ctx.userId },
|
|
246
246
|
orderBy: { updatedAt: "desc" },
|
|
247
247
|
cursor: input.cursor,
|
|
248
|
+
endCursor: input.endCursor,
|
|
248
249
|
limit: input.limit,
|
|
249
250
|
})
|
|
250
251
|
);
|
|
@@ -374,20 +374,19 @@ export const list = publicQuery
|
|
|
374
374
|
.input(z.object({ userId: z.string().optional() }))
|
|
375
375
|
.paginated({ limit: 20, item: SessionSchema })
|
|
376
376
|
.query(async ({ ctx, input }) => {
|
|
377
|
-
// input.cursor and input.limit auto-added
|
|
378
377
|
return ctx.orm.query.session.findMany({
|
|
379
378
|
where: input.userId ? { userId: input.userId } : undefined,
|
|
380
379
|
orderBy: { createdAt: 'desc' },
|
|
381
380
|
cursor: input.cursor,
|
|
381
|
+
endCursor: input.endCursor,
|
|
382
382
|
limit: input.limit,
|
|
383
383
|
});
|
|
384
|
-
// output auto-wrapped as { continueCursor, isDone, page }
|
|
385
384
|
});
|
|
386
385
|
```
|
|
387
386
|
|
|
388
387
|
`.paginated({ limit, item })`:
|
|
389
|
-
- Adds `cursor`
|
|
390
|
-
-
|
|
388
|
+
- Adds `cursor`, optional `endCursor`, and `limit` to input
|
|
389
|
+
- Accepts the full Convex page result, including `pageStatus` and `splitCursor`
|
|
391
390
|
- Must be called before `.query()`
|
|
392
391
|
|
|
393
392
|
### Return Value
|
|
@@ -414,7 +413,7 @@ const { data, isPlaceholderData } = useInfiniteQuery(
|
|
|
414
413
|
|
|
415
414
|
### Real-time & Error Recovery
|
|
416
415
|
|
|
417
|
-
Each page maintains its own WebSocket subscription.
|
|
416
|
+
Each page maintains its own WebSocket subscription. Split pages use `endCursor` to keep adjacent subscriptions bounded. An `InvalidCursor` on a loaded page resets the list cleanly to page 0. Pagination state persists in `queryClient` for scroll restoration.
|
|
418
417
|
|
|
419
418
|
---
|
|
420
419
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|