Commit Graph
4 Commits
Author SHA1 Message Date
chrnx 686a4527cf 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>
2026-09-23 11:24:09 -05:00
chrnx 16f8329794 docs(plugins): say how to install now that npm is not an option
CI / dco (pull_request) Successful in 5s
CI / build (pull_request) Successful in 15s
CI / runtimes (bun) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 9s
CI / runtimes (deno) (pull_request) Successful in 11s
The READMEs still described a dual publish, and none of them carried an install
command at all — so the instruction a reader would infer, `npm i
@green-tea/jwt`, is the one command that no longer works. Each package README is
also the page JSR renders, which makes it the first thing anyone sees.

Adds `npx jsr add` to all three, with the deno and bun forms, and says plainly
that there is no npmjs.org package rather than letting someone find out from a
404.

Also corrects a claim in the root README that this branch made false: "installing
one never pulls a second copy of core". Measured while deciding this change — a
plugin names an exact core in `deno.json`, and across a minor boundary npm nests
a second copy instead of deduplicating. The copy is inert, since a plugin's built
code never imports core, and that is worth saying precisely: what is guaranteed
is which core *runs*, not how many are on disk.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 10:26:10 -05:00
chrnx 772f4d11a9 docs: list every package, and show the graph doing the work
CI / dco (pull_request) Successful in 3s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / build (pull_request) Successful in 18s
CI / runtimes (deno) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 10s
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>
2026-09-19 12:24:23 -05:00
chrnx b15ce29315 feat(rate-limit): declare the package and the runtimes it claims
No workerd: the default store counts per isolate, and an edge deployment has
many, so the limit it would enforce is not the one configured. The README says
so rather than leaving someone to find out.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-18 13:17:45 -05:00