[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-quota
Scheduled-reset per-subject allowances — calendar, rolling, or epoch windows with readable remaining
STABLE 0.1.0 · 0 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.1d90c9f).
pnpm add @vllnt/convex-quota
pnpm add @vllnt/convex-quota@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import quota from "@vllnt/convex-quota/convex.config";
const app = defineApp();
app.use(quota);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 1,056
- Since first publish
- 5,545
Downloads per week since 12 September 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
1,056 downloads in the last 7 days. 5,545 downloads since 12 September 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 12 September 2026 to 14 September 2026 | 845 |
| 15 September 2026 to 21 September 2026 | 313 |
| 22 September 2026 to 28 September 2026 | 374 |
| 29 September 2026 to 5 October 2026 | 197 |
| 6 October 2026 to 12 October 2026 | 168 |
| 13 October 2026 to 19 October 2026 | 321 |
| 20 October 2026 to 26 October 2026 | 330 |
| 27 October 2026 to 2 November 2026 | 1,113 |
| 3 November 2026 to 9 November 2026 | 441 |
| 10 November 2026 to 16 November 2026 | 387 |
| 17 November 2026 to 23 November 2026 | 1,056 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 10 canary builds since 12 September 2026. Latest stable: 0.1.0 on 22 November 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.1d90c9f | canary | 23 November 2026 |
| 0.1.1-canary.9b7189e | canary | 23 November 2026 |
| 0.1.0 | stable | 22 November 2026 |
| 0.1.0-canary.2bd8928 | canary | 22 November 2026 |
| 0.1.0-canary.20d9329 | canary | 22 November 2026 |
| 0.1.0-canary.01d53eb | canary | 31 October 2026 |
| 0.1.0-canary.936ef1f | canary | 30 October 2026 |
| 0.1.0-canary.5210d71 | canary | 30 October 2026 |
| 0.1.0-canary.11242ec | canary | 24 October 2026 |
| 0.1.0-canary.cbb12fa | canary | 12 September 2026 |
| 0.1.0-canary.0 | canary | 12 September 2026 |
Changelog
The newest stable releases of @vllnt/convex-quota, with the notes from its changelog.
0.1.0
First stable release.
Added
Quotaclient withconsume,remaining,refundanderaseSubject(batched, reschedules until clean).consumereturns{ allowed, used, remaining, limit, periodKey, resetsAt },remainingthe same withoutallowed,refund{ refunded, used, remaining }, anderaseSubjectthe number of rows deleted in that pass.- Window kinds: calendar (
day/week/monthin an IANA timezone, Monday or Sunday week start), rolling (starts at the first allowed consume) and epoch. Time is read on the server. Skipped and repeated civil midnights resolve deterministically. - A fixed window policy per
(scope, subjectRef, key); changing it throwsPOLICY_MISMATCH. The limit may change without resetting usage. - Fail-closed input validation with
ConvexErrorcodes:INVALID_REF,INVALID_LIMIT,INVALID_AMOUNT,INVALID_DURATION,INVALID_TIME_ZONE,INVALID_BATCH. Refs and scopes are 1..256 UTF-16 code units; limits, amounts and durations are positive safe integers. refundonly applies to the stored, unexpired period; otherwise it returnsrefunded: false.@vllnt/convex-quota/testregisters the component withconvex-test; the consuming app needsconvex-testandvitest. It type-checks under bothbundlerandnodenextmodule resolution.- Multiple named mounts and runtime scopes.
Notes
consumeandrefundare not idempotent. See the README host rules.- Releases are published only from
v*.*.*tags through npm trusted publishing with provenance. Builds frommainuse thecanarydist-tag.
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.1d90c9f
- GitHub stars
- 0 GitHub stars
- Licence
- MIT
- Issues
- Open an issue