Promote develop to main — JSR-only plugins, and the GitHub mirror #7

Merged
chrnx merged 31 commits from develop into main 2026-09-23 17:03:17 +00:00
5 changed files with 63 additions and 10 deletions
Showing only changes of commit 686a4527cf - Show all commits

No files matched your search

+3 -3
View File
@@ -69,9 +69,9 @@ mirror is Plan B3, and it is unblocked rather than done.
it lived. It is declared in the JSR package settings, not in `deno.json` — the config schema it lived. It is declared in the JSR package settings, not in `deno.json` — the config schema
accepts `name`, `version`, `license`, `exports` and `publish`, and nothing else. accepts `name`, `version`, `license`, `exports` and `publish`, and nothing else.
What this gives up: no discovery on npmjs.org, where the marketplace is the channel anyway, and What this gives up, stated plainly rather than argued away: nobody searching npmjs.org will find
a site behind a registry proxy that mirrors npmjs.org and refuses a second one cannot reach the these, and a site behind a registry proxy that mirrors npmjs.org and refuses to add a second one
plugins. Core still can — it publishes to both. cannot install them at all. Core still can — it publishes to both.
## Conventions ## Conventions
+18 -4
View File
@@ -1,4 +1,17 @@
# green-tea plugins <p align="center">
<img src="https://raw.githubusercontent.com/Expressive-Tea/green-tea/main/assets/logo.png" width="96" alt="Green Tea" />
</p>
<h1 align="center">green&nbsp;tea plugins.</h1>
<p align="center"><b>Each one is a node in the graph, not a link in a chain.</b></p>
<p align="center">
A plugin declares what it provides; your route declares what it needs.<br />
Nothing runs for a route that never asked for it.
</p>
---
Official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea). Each one is its own Official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea). Each one is its own
package under `packages/`, published to JSR, and each README says which runtimes it supports and why package under `packages/`, published to JSR, and each README says which runtimes it supports and why
@@ -20,9 +33,10 @@ That works under every package manager: `jsr add` writes one line to `.npmrc` an
| [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store | | [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store |
| [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format | | [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format |
Plugins import core as types only. Their built code never imports it at all, so the core that runs Plugins import core as types only, and a type import leaves nothing behind when it compiles — the
is always your application's, whatever version a plugin was written against — and nothing warns JavaScript JSR publishes never mentions core. So the core that runs is always your application's,
about a version range, which under CalVer no range can express. whatever version a plugin was written against, and nothing warns about a version range, which under
CalVer no range can express.
That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when
your version differs by more than the patch, npm places a second copy under the plugin rather than your version differs by more than the patch, npm places a second copy under the plugin rather than
+14 -1
View File
@@ -1,4 +1,17 @@
# @green-tea/jwt <p align="center">
<img src="https://raw.githubusercontent.com/Expressive-Tea/green-tea/main/assets/logo.png" width="96" alt="Green Tea" />
</p>
<h1 align="center">@green-tea/jwt</h1>
<p align="center"><b>Sign and verify, as one node in the graph.</b></p>
<p align="center">
Keys load once, while providers boot — a bad key fails the deploy,<br />
not the first sign-in of the day.
</p>
---
Loads JWT signing keys at boot and publishes them into the graph as one registry. A handler asks for Loads JWT signing keys at boot and publishes them into the graph as one registry. A handler asks for
it with `@needs('jwt')` and signs or verifies by key name. it with `@needs('jwt')` and signs or verifies by key name.
+14 -1
View File
@@ -1,4 +1,17 @@
# @green-tea/metrics <p align="center">
<img src="https://raw.githubusercontent.com/Expressive-Tea/green-tea/main/assets/logo.png" width="96" alt="Green Tea" />
</p>
<h1 align="center">@green-tea/metrics</h1>
<p align="center"><b>Count the lifecycle. Render Prometheus.</b></p>
<p align="center">
Reads the event stream green-tea already emits, so nothing in your<br />
handlers has to know it is being measured.
</p>
---
Subscribes to green-tea's lifecycle stream and counts what happened. You expose it on a route you Subscribes to green-tea's lifecycle stream and counts what happened. You expose it on a route you
own, with the transformer this package ships. own, with the transformer this package ships.
+14 -1
View File
@@ -1,4 +1,17 @@
# @green-tea/rate-limit <p align="center">
<img src="https://raw.githubusercontent.com/Expressive-Tea/green-tea/main/assets/logo.png" width="96" alt="Green Tea" />
</p>
<h1 align="center">@green-tea/rate-limit</h1>
<p align="center"><b>A limit your handler's signature admits to.</b></p>
<p align="center">
The route asks for the limiter by name, so it runs where it is wanted<br />
and nowhere else — and you can see which routes those are.
</p>
---
Publishes a per-request rate limiter into the graph. A handler opts in by asking for it and naming a Publishes a per-request rate limiter into the graph. A handler opts in by asking for it and naming a
rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain — rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain —