772f4d11a91c2d062ef86a7145281da1ec641a66
The root README still advertised one package, three releases in. jwt and rate-limit both demonstrated themselves from inside a handler, which reads as a middleware chain with extra steps. Signing does belong there — it is the response to that one request — but verifying is a precondition shared by every protected route, and its result is what those routes are actually asking for. Shown as a `@Step` that provides `user`, so the handler asks for `user` and never for `jwt`. rate-limit gains the same treatment plus the constraint that makes it work: the step must provide a token the handler names. `subgraphFor` builds each route's closure backwards from the handler's `needs`, so a step providing something nobody asks for is not in the closure and never runs — the limit would silently not apply, which is the worst way for a rate limiter to fail. The inline call is kept as the smaller option, with what it costs. metrics is left alone: rendering a scrape really is a route's job. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
green-tea plugins
Official plugins for green-tea. Each one is its own
package under packages/, published to npm and JSR, and each README says which runtimes it supports
and why not the others.
| Package | What it does |
|---|---|
@green-tea/jwt |
Loads signing keys at boot and publishes a sign/verify registry |
@green-tea/rate-limit |
A per-request limiter with a branded 429 and a swept in-memory store |
@green-tea/metrics |
Counts the lifecycle stream and renders the Prometheus text format |
Plugins import core as types only, so installing one never pulls a second copy of core — and never warns about a version range, which under CalVer no range can express.
Description
Official plugins for green-tea. Each package imports core as types only — installing one never pulls a second copy of the framework — and declares which runtimes it supports.
Readme
MIT
470 KiB
0 Stars
3 Watchers
0 Forks
Languages
TypeScript
80.3%
JavaScript
18.9%
Shell
0.8%