@vllnt/convex-api-keys 0.4.0-canary.d1df60e → 0.4.0-canary.eb43b0d
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/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 +50 -19
- package/llms.txt +23 -9
- package/package.json +8 -9
- 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/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
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
relative path. `pnpm test:package` (run by `pnpm test` and
|
|
13
13
|
`pnpm test:coverage`) fails when one of them is missing from the tarball.
|
|
14
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.
|
|
15
23
|
|
|
16
24
|
### Changed
|
|
17
25
|
|
|
@@ -26,12 +34,54 @@
|
|
|
26
34
|
its shipped docs; a repository variable no longer gates them.
|
|
27
35
|
- `homepage` points to https://oss.vllnt.com/packages/convex-api-keys.
|
|
28
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
|
+
issues and npm, 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
|
+
- `pnpm test:package` runs `scripts/test-consumer.mjs`. It packs the tarball
|
|
60
|
+
and installs it with pnpm in a clean project outside the repo. Node imports
|
|
61
|
+
and runs only `.` and reads `./package.json`. It resolves `./convex.config`
|
|
62
|
+
and `./convex.config.js` without running them, because they only run inside
|
|
63
|
+
the Convex CLI. The other entry points are type-checked: a `strict` consumer
|
|
64
|
+
imports every entry point and calls `ApiKeys` from a mutation, a query, an
|
|
65
|
+
action and an HTTP action. The test fails when an `exports` subpath is not
|
|
66
|
+
covered, and runs in CI's Test job and before every publish.
|
|
67
|
+
- `pnpm typecheck:ci` type-checks `src/component/`, every test file and
|
|
68
|
+
`example/convex/`; before, a type error in a test or the example passed CI.
|
|
29
69
|
|
|
30
70
|
### Fixed
|
|
31
71
|
|
|
72
|
+
- `scripts/check-package-contents.sh` also blocks `.spec.mts` and `.spec.cts`
|
|
73
|
+
files, and CI runs its test harness.
|
|
32
74
|
- `package.json` `repository.url` uses the form npm expects, so publishing no
|
|
33
75
|
longer prints an auto-correction warning. `pnpm test:package` fails when
|
|
34
76
|
`npm pkg fix` would rewrite any field.
|
|
77
|
+
- `RunMutationCtx` and `RunQueryCtx` accept action and HTTP action contexts.
|
|
78
|
+
They were `Pick`s of the mutation and query context types, which an action
|
|
79
|
+
`ctx` does not satisfy, so calling `ApiKeys` methods from an action or HTTP
|
|
80
|
+
action failed to type-check. They are now interfaces with only the
|
|
81
|
+
`runMutation` / `runQuery` call, for public and internal function references.
|
|
82
|
+
- The 7-day minimum release age now lives in `pnpm-workspace.yaml`, where
|
|
83
|
+
pnpm 10 reads it; pnpm ignored it in the `package.json` `pnpm` field.
|
|
84
|
+
Renovate uses the same rule, with `@vllnt` packages exempt.
|
|
35
85
|
|
|
36
86
|
## [0.3.0] - 2026-11-26
|
|
37
87
|
|
|
@@ -98,7 +148,8 @@
|
|
|
98
148
|
from return type.
|
|
99
149
|
- **`validate()`**: `retryAfter` removed from failure response (no internal rate
|
|
100
150
|
limiting).
|
|
101
|
-
- **`list()` / `listByTag()`**: Now
|
|
151
|
+
- **`list()` / `listByTag()`**: Now return at most `limit` keys (default 100).
|
|
152
|
+
There is no cursor.
|
|
102
153
|
|
|
103
154
|
### Migration Guide
|
|
104
155
|
|
|
@@ -147,7 +198,9 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
|
|
|
147
198
|
- Public client wrapper now forwards optional `limit` to `list()` and
|
|
148
199
|
`listByTag()`
|
|
149
200
|
- `ValidationFailure` no longer advertises the removed `retryAfter` field
|
|
150
|
-
- Auth boundary: `ownerId` cross-check on
|
|
201
|
+
- Auth boundary: `ownerId` cross-check on every key-level admin call
|
|
202
|
+
(`revoke`, `rotate`, `update`, `disable`, `enable`, `getUsage`); `configure`
|
|
203
|
+
takes no `ownerId`
|
|
151
204
|
- Server-side secret generation for `create()` and `rotate()`
|
|
152
205
|
- Input validation: keyPrefix charset, env charset, gracePeriodMs bounds
|
|
153
206
|
(60s–30d), metadata size (4KB), scopes (50), tags (20)
|
|
@@ -156,7 +209,7 @@ shardedCounterTest.register(t, "apiKeys/shardedCounter");
|
|
|
156
209
|
- lastUsedAt throttled to 60s (reduces OCC contention)
|
|
157
210
|
- Remaining decrement decoupled from lastUsedAt write (single merged patch)
|
|
158
211
|
- revokeByTag expanded to include `rotating` and `disabled` statuses
|
|
159
|
-
-
|
|
212
|
+
- `list`/`listByTag` return at most `limit` keys (default 100), with no cursor
|
|
160
213
|
|
|
161
214
|
## 0.1.1
|
|
162
215
|
|