@vllnt/convex-api-keys 0.3.1-canary.080ce0b → 0.4.0-canary.d0b69e3

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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.4.0] - 2026-11-27
6
+
5
7
  ### Added
6
8
 
7
9
  - The npm package now ships `docs/API.md`, `CHANGELOG.md` and `llms.txt`, so
@@ -10,12 +12,61 @@
10
12
  relative path. `pnpm test:package` (run by `pnpm test` and
11
13
  `pnpm test:coverage`) fails when one of them is missing from the tarball.
12
14
  - `docs/API.md` documents the package entry points and exported types.
15
+ - Every public export and `ApiKeys` method has a TSDoc summary, shipped in the
16
+ `.d.ts` files; `ApiKeys` links its package page with `@see`.
17
+ - `pnpm test:package` runs `scripts/check-docs.mjs`. It fails when a README
18
+ section is missing or out of order, a code block has no language, a relative
19
+ link or anchor breaks, an export or error message is undocumented, a README
20
+ or `docs/API.md` TypeScript example does not type-check against the built
21
+ package, or the vllnt footer, `llms.txt` ecosystem block or package metadata
22
+ drift.
13
23
 
14
24
  ### Changed
15
25
 
26
+ - **Behaviour change: `revoke()` keeps a final status final.** On a key whose
27
+ stored status is `expired` or `exhausted` it now does nothing, as it already
28
+ did for a `revoked` key: the status and `revokedAt` stay as they are and no
29
+ `key.revoked` log entry is written. Before, it changed the status to `revoked`
30
+ and set `revokedAt`. It still returns without error. If your app read
31
+ `status === "revoked"` or `revokedAt` to mean "revoke was called", also treat
32
+ `expired` and `exhausted` as final.
16
33
  - Canary releases publish on every push to `main` that touches the package or
17
34
  its shipped docs; a repository variable no longer gates them.
18
35
  - `homepage` points to https://oss.vllnt.com/packages/convex-api-keys.
36
+ - Update `@convex-dev/sharded-counter` to `^0.2.4`.
37
+ - The README is organised for coding agents: When to use, Install, Quick
38
+ start, an API table of every export, Common tasks, an Errors and fixes table
39
+ of every message and `validate` reason, Limits and gotchas, and
40
+ Compatibility. `llms.txt` carries the same summary and links.
41
+ - `package.json` `description` and `keywords` describe what the package does.
42
+ - The README intro is the `package.json` `description`, the same sentence as
43
+ the `llms.txt` summary.
44
+ - The README has a Links section (docs, release feed, package search, source,
45
+ community, author, sponsor) that replaces the Author section.
46
+ - README Related packages lists only packages this one uses in code; it is now
47
+ "None.".
48
+ - The `llms.txt` Ecosystem block links the release feed and package search.
49
+ - `scripts/check-docs.mjs` also fails when the `package.json` description is
50
+ not one sentence naming Convex, or is not both the first line after the
51
+ README title and the first line after the `llms.txt` title (as `> `); when
52
+ the README Links section differs from the standard list, is not directly
53
+ before License, or License is not the last section; when Related packages
54
+ does not list exactly the `@vllnt` packages in `dependencies`,
55
+ `peerDependencies` or imports in `src/` and `example/` (one "None." line when
56
+ there are none); when `llms.txt` does not end with the Ecosystem block; and
57
+ when a `docs/API.md` TypeScript example does not type-check. CHANGELOG and
58
+ TSDoc examples are not type-checked.
59
+
60
+ ### Fixed
61
+
62
+ - `package.json` `repository.url` uses the form npm expects, so publishing no
63
+ longer prints an auto-correction warning. `pnpm test:package` fails when
64
+ `npm pkg fix` would rewrite any field.
65
+ - `RunMutationCtx` and `RunQueryCtx` accept action and HTTP action contexts.
66
+ They were `Pick`s of the mutation and query context types, which an action
67
+ `ctx` does not satisfy, so calling `ApiKeys` methods from an action or HTTP
68
+ action failed to type-check. They are now interfaces with only the
69
+ `runMutation` / `runQuery` call, for public and internal function references.
19
70
 
20
71
  ## [0.3.0] - 2026-11-26
21
72
 
@@ -82,7 +133,8 @@
82
133
  from return type.
83
134
  - **`validate()`**: `retryAfter` removed from failure response (no internal rate
84
135
  limiting).
85
- - **`list()` / `listByTag()`**: Now paginated with `limit` param (default 100).
136
+ - **`list()` / `listByTag()`**: Now return at most `limit` keys (default 100).
137
+ There is no cursor.
86
138
 
87
139
  ### Migration Guide
88
140
 
@@ -131,7 +183,9 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
131
183
  - Public client wrapper now forwards optional `limit` to `list()` and
132
184
  `listByTag()`
133
185
  - `ValidationFailure` no longer advertises the removed `retryAfter` field
134
- - Auth boundary: `ownerId` cross-check on all admin mutations
186
+ - Auth boundary: `ownerId` cross-check on every key-level admin call
187
+ (`revoke`, `rotate`, `update`, `disable`, `enable`, `getUsage`); `configure`
188
+ takes no `ownerId`
135
189
  - Server-side secret generation for `create()` and `rotate()`
136
190
  - Input validation: keyPrefix charset, env charset, gracePeriodMs bounds
137
191
  (60s–30d), metadata size (4KB), scopes (50), tags (20)
@@ -140,7 +194,7 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
140
194
  - lastUsedAt throttled to 60s (reduces OCC contention)
141
195
  - Remaining decrement decoupled from lastUsedAt write (single merged patch)
142
196
  - revokeByTag expanded to include `rotating` and `disabled` statuses
143
- - Paginated list/listByTag with configurable limit
197
+ - `list`/`listByTag` return at most `limit` keys (default 100), with no cursor
144
198
 
145
199
  ## 0.1.1
146
200