Commit Graph
1 Commits
Author SHA1 Message Date
yetone dd884058e7 plugins: a Discover plugin's README comes from the copy usemagpie.ai keeps, before npm or GitHub (River_WLan on X)
npm's human check answers 200 with a page that isn't the package's entry, so the
README showed "npm didn't answer: unexpected end of JSON input". The community
repo's tagged workflow now keeps each listed plugin's README at readmes/<key>.md
on dist (plugins repo, pushed), usemagpie.ai serves it at /api/plugins/readme
(edge 10 min, jsDelivr stands in for raw), and ReadmeIn asks it (5s an address,
MAGPIE_PLUGIN_CATALOG=off skips) before npm / GitHub; an installed plugin's folder
still comes first. A page that isn't npm's entry now says npm may be asking for
a human check. Only the plain README.md is kept: a language README is read from
npm/GitHub only when the copy is missing.

Run: go test ./internal/plugin ok (wsl); site/worker.test.mjs 40 pass (wsl).
Red on old code: TestReadmeFromTheKeptCopyBeforeNPM fails with "unexpected end of
JSON input" and npm asked 2 times; worker test red with the route removed.
tagged.mjs run on wsl against real GitHub: 369 plugins, 369 READMEs, a second run
re-read none. Not tried: the Actions run itself, the GUI (no GUI file changed).
2026-11-11 16:24:37 +08:00