@vllnt/convex-api-keys 0.3.1-canary.a0808f9 → 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 +56 -3
- package/README.md +343 -143
- package/dist/client/index.d.ts +68 -3
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +56 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/types.d.ts +9 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/convex.config.d.ts +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +1 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/mutations.d.ts.map +1 -1
- package/dist/component/mutations.js +2 -1
- package/dist/component/mutations.js.map +1 -1
- package/dist/component/validators.d.ts +1 -1
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +1 -1
- package/dist/component/validators.js.map +1 -1
- package/dist/log.d.ts +0 -1
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js.map +1 -1
- package/dist/shared.d.ts +2 -0
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js.map +1 -1
- package/docs/API.md +60 -23
- package/llms.txt +23 -9
- package/package.json +9 -6
- package/src/client/index.ts +80 -3
- package/src/client/types.ts +9 -0
- package/src/component/convex.config.ts +1 -0
- package/src/component/mutations.ts +2 -1
- package/src/component/validators.ts +1 -1
- package/src/log.ts +0 -1
- package/src/shared.ts +2 -0
- package/src/test.ts +14 -0
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,13 +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.
|
|
19
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.
|
|
20
70
|
|
|
21
71
|
## [0.3.0] - 2026-11-26
|
|
22
72
|
|
|
@@ -83,7 +133,8 @@
|
|
|
83
133
|
from return type.
|
|
84
134
|
- **`validate()`**: `retryAfter` removed from failure response (no internal rate
|
|
85
135
|
limiting).
|
|
86
|
-
- **`list()` / `listByTag()`**: Now
|
|
136
|
+
- **`list()` / `listByTag()`**: Now return at most `limit` keys (default 100).
|
|
137
|
+
There is no cursor.
|
|
87
138
|
|
|
88
139
|
### Migration Guide
|
|
89
140
|
|
|
@@ -132,7 +183,9 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
|
|
|
132
183
|
- Public client wrapper now forwards optional `limit` to `list()` and
|
|
133
184
|
`listByTag()`
|
|
134
185
|
- `ValidationFailure` no longer advertises the removed `retryAfter` field
|
|
135
|
-
- Auth boundary: `ownerId` cross-check on
|
|
186
|
+
- Auth boundary: `ownerId` cross-check on every key-level admin call
|
|
187
|
+
(`revoke`, `rotate`, `update`, `disable`, `enable`, `getUsage`); `configure`
|
|
188
|
+
takes no `ownerId`
|
|
136
189
|
- Server-side secret generation for `create()` and `rotate()`
|
|
137
190
|
- Input validation: keyPrefix charset, env charset, gracePeriodMs bounds
|
|
138
191
|
(60s–30d), metadata size (4KB), scopes (50), tags (20)
|
|
@@ -141,7 +194,7 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
|
|
|
141
194
|
- lastUsedAt throttled to 60s (reduces OCC contention)
|
|
142
195
|
- Remaining decrement decoupled from lastUsedAt write (single merged patch)
|
|
143
196
|
- revokeByTag expanded to include `rotating` and `disabled` statuses
|
|
144
|
-
-
|
|
197
|
+
- `list`/`listByTag` return at most `limit` keys (default 100), with no cursor
|
|
145
198
|
|
|
146
199
|
## 0.1.1
|
|
147
200
|
|