Commit Graph
8 Commits
Author SHA1 Message Date
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
chrnx 74f297dafd test: pick the child-process command from the host runtime
The exit test spawns a probe and asserts it dies on its own, and the contract
files run unchanged on three runtimes — so the argv has to be decided at run
time rather than written for Node and skipped elsewhere.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-18 13:17:12 -05:00
chrnx d8ffb09ddc Merge pull request 'feat: plugins workspace with @green-tea/jwt' (#1) from feature/scaffold-jwt into develop
CI / dco (push) Has been skipped
CI / build (push) Successful in 11s
CI / runtimes (bun) (push) Successful in 12s
CI / runtimes (deno) (push) Successful in 11s
CI / runtimes (edge) (push) Successful in 10s
2026-09-18 04:20:47 +00:00
chrnx 7be37f5184 ci: gate every package on Gitea
CI / dco (pull_request) Successful in 3s
CI / build (pull_request) Successful in 11s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / runtimes (deno) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 8s
Lint, format, complexity, typecheck and the Node suite on the engines floor,
then Deno and Bun for the packages that declare them. Gitea only until core
comes from npm, because the version these packages build against lives on
Verdaccio.

The JSR dry-run is kept rather than deferred: it passes locally on Deno 2.9.6,
because `nodeModulesDir: manual` resolves core from the tree `npm ci` installed,
so JSR's checker never needs that version to exist on npm.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 23:18:22 -05:00
chrnx 1c0b6bde91 feat(jwt): load signing keys at boot as a named plugin
Extracted from patitas-peludas onto the object plugin contract. Core is a type
import only, so installing the plugin never drags in a second core or a version
warning; a bad key still fails boot, which the contract tests now pin.

The extraction moves from jose 5 to jose 6, and that is not a version bump: jose
6 refuses a private CryptoKey in jwtVerify, where jose 5 accepted one and derived
the public half itself. The original keeps a single key per signer and verifies
with the key it signed with, which works on 5 and throws
"CryptoKey instances must be of type public" on 6 — for every asymmetric
algorithm, so ES*, RS*, PS* and EdDSA alike. Symmetric keys are unaffected, which
is exactly why one HS256 test would have shipped it.

importJWKKey now imports the key twice for an asymmetric pair: as given, to sign
with, and with the private fields stripped, to verify with. A symmetric key has
no public half, so it keeps one secret for both. The round-trip is covered per
algorithm family rather than once, because one algorithm is not coverage — it is
the gap the defect lived in.

The get() helper in the contract tests is generic in its body: Response.json()
is typed Promise<unknown>, so reaching into the payload did not typecheck.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 23:11:55 -05:00
chrnx 42a2f490e8 test: check each package against the plugin convention
Rules 8 and 9 are the two a reviewer cannot see from a diff: where core sits in
package.json, and whether engines, the README table and JSR still agree. A
static test makes a drift fail the build instead of reaching a user.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 23:02:12 -05:00
chrnx efffaebb96 build: npm and Deno workspace with core's gates
Same lint, format and complexity gates as core, plus a lint rule that keeps
core a types-only import in plugin sources. Runtime suites are chosen from each
package's engines, so declaring a runtime is what puts a package under its test.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 23:00:49 -05:00
chrnx 9745a2f9aa chore: start the official plugins repository
One package per plugin, typed against core without depending on it at runtime.
The convention lives in AGENTS.md because the design it comes from is not
published anywhere a contributor can read.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 22:55:16 -05:00