docs(plugins): give each package a header, and stop leaning on a marketplace
CI / dco (pull_request) Successful in 7s
CI / build (pull_request) Successful in 12s
CI / runtimes (bun) (pull_request) Successful in 12s
CI / runtimes (deno) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 10s

Each README now opens the way core's does — logo, name, one line saying what
the package is for. The package README is the page JSR renders, so it is the
first thing anyone sees, and three of them opened with a bare `# @green-tea/x`.

The logo is an absolute URL rather than a relative path, deliberately. Core's
README points at `./assets/logo.png`, and core's `publish.include` does not ship
`assets/` — so that image 404s on core's JSR page today. Repeating the pattern
three more times would have repeated the bug three more times.

Also drops the claim that npmjs.org discovery does not matter "where the
marketplace is the channel anyway". There is no marketplace yet, and a plugin
should stand on its own rather than on a site that has not shipped. The cost is
now stated plainly instead of argued away.

Corrects "their built code never imports it": with JSR publishing the source,
the build is JSR's, not ours. What holds is that a type import leaves nothing
behind, so the published JavaScript never mentions core.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-23 11:24:09 -05:00
1 parent 16f8329794
commit 686a4527cf
5 files changed
+63 -10

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
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
a site behind a registry proxy that mirrors npmjs.org and refuses a second one cannot reach the
plugins. Core still can — it publishes to both.
What this gives up, stated plainly rather than argued away: nobody searching npmjs.org will find
these, and a site behind a registry proxy that mirrors npmjs.org and refuses to add a second one
cannot install them at all. Core still can — it publishes to both.
## 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
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/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
is always your application's, whatever version a plugin was written against — and nothing warns
about a version range, which under CalVer no range can express.
Plugins import core as types only, and a type import leaves nothing behind when it compiles — the
JavaScript JSR publishes never mentions core. So the core that runs is always your application's,
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
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
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
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
rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain —