@vllnt/convex-invitations 0.2.0 → 0.2.1-canary.3957083
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 +9 -0
- package/README.md +7 -0
- package/docs/API.md +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Docs: README Limits and gotchas and `docs/API.md` say to keep `role` and
|
|
12
|
+
`payload` small. Each `prune` pass reads up to `batch` whole invites (200 for
|
|
13
|
+
the built-in cron), so large rows can make every pass hit Convex's read limit
|
|
14
|
+
and the daily cron fail. No runtime change.
|
|
15
|
+
|
|
7
16
|
## [0.2.0] - 2026-11-28
|
|
8
17
|
|
|
9
18
|
### Changed
|
package/README.md
CHANGED
|
@@ -389,6 +389,13 @@ the component runs. An error thrown by your `roleValidator` or
|
|
|
389
389
|
- `role` and `payload` are stored as any Convex value. Your validators run on
|
|
390
390
|
write and on every read, so a validator that rejects older stored values
|
|
391
391
|
makes those reads throw.
|
|
392
|
+
- `role` and `payload` have no size cap, but keep them small (a few KB). Each
|
|
393
|
+
`prune` pass reads up to `batch` whole invites in one transaction (200 for
|
|
394
|
+
the built-in cron), so large rows can push a pass over Convex's
|
|
395
|
+
per-transaction read limit; then the pass throws, and the cron fails the
|
|
396
|
+
same way every day. Store large data in your own table and put its ID in
|
|
397
|
+
`payload`. If invites are already large, call `prune` with a smaller
|
|
398
|
+
`batch` from your own scheduler.
|
|
392
399
|
- `accept` returns the grant; it writes nothing in your tables. Call it from a
|
|
393
400
|
mutation and apply the grant in that same mutation. Called from an action,
|
|
394
401
|
the accept and your write are separate transactions.
|
package/docs/API.md
CHANGED
|
@@ -191,6 +191,10 @@ One pass, oldest first, touches at most `batch` rows:
|
|
|
191
191
|
2. With the remaining budget, sets `pending` invitations whose
|
|
192
192
|
`expiresAt < before` to `expired`.
|
|
193
193
|
|
|
194
|
+
Each pass reads up to `batch` whole invites, `role` and `payload` included, in
|
|
195
|
+
one transaction. With large rows, lower `batch` so a pass stays under Convex's
|
|
196
|
+
per-transaction read limit; the built-in cron always uses 200.
|
|
197
|
+
|
|
194
198
|
Deleting before expiring means a row expired in this pass is deleted in a later
|
|
195
199
|
pass, not twice in one. If the pass touched `batch` rows, it schedules another
|
|
196
200
|
pass with the same cutoffs. Returns the count of the first pass. Calling it does
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vllnt/convex-invitations",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1-canary.3957083",
|
|
4
4
|
"description": "TypeScript Convex component for single-use, expiring invitation links: issue, accept once, revoke, expire and prune invites.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|