jevhooks.git / web / CLAUDE.md
1@README.md
2
3## Notes for agents
4
5**Never deploy.** `mise run web:deploy` publishes to a public address and is the
6owner's to run. `mise run web:dev` and `mise run test:web` are yours.
7
8**The `wasm-bindgen` crate and CLI are one version**, pinned here (`=0.2.127`) and in
9`mise.toml`; `tools/check-versions.sh` fails when they differ. Move both together.
10
11**`web:dev` needs `--local-upstream localhost:8790`.** Without it wrangler tells the
12Worker it was reached at the route in `wrangler.toml` (`hooks.lmjtfy.fun`), the gate
13takes that for another address, and every local request is answered `308` to itself
14(seen 2026-10-06: every path, `/nope` included, was a redirect).
15
16**This workspace is not the plugin's.** The root `Cargo.toml` excludes `web`; do not add
17it as a member. The plugin builds with no Workers toolchain (no `worker`, no `wasm-bindgen` CLI, no
18wrangler) and must keep doing so.
19
20**The site compiles the plugin's own crates** (`jevhooks-events`, `jevhooks-rules`), by
21path, into wasm32. A dependency added to either that does not build there (anything
22with I/O or `tokio`) breaks the site's build, not the plugin's: run `mise run test:web`
23and `mise run web:build` after changing one.
24
25**Both submodules must be fetchable before this is pushed.** The site pins
26`third-party/jevcrates` and `third-party/rustcrates` at commits; a push of this
27repository while either commit exists only on the owner's machine breaks
28`git clone --recurse-submodules` for everyone else, the plugin's own build included.