Repository navigation
Conversation
TimMonko
force-pushed
the
cf/04-worker
branch
from
November 20, 2026 06:25
09a22af to
6d0ed84
Compare
worker/ deploys the static site from scripts/build_site.py with Cloudflare Workers static assets. Cloudflare serves a request that matches a file without running any code, and those requests are free and unmetered. Only a miss runs src/index.js, which handles: 1. /api/conda, the deprecated conda map. It shares its path with the api/conda/ folder, so it cannot be a file. Every released napari and plugin manager calls it, so it keeps its deprecation headers. 2. Slugs that are not normalized (/api/manifest/Napari_Foo). manifest and shields always normalized; pypi and conda now do too, where they used to error. 3. Unknown plugins: a JSON 404 instead of the old 500, and the "unavailable" badge for /api/shields. 4. api.napari-hub.org/<path>, which Vercel rewrote to /api/<path>. About 2,670 plugin READMEs load badges from that host. Tests run with node --test and a fake assets binding, so they need no Cloudflare account. CI also bundles the Worker with a dry-run deploy, with read-only repository permissions. Hostnames are left commented in wrangler.jsonc until the DNS zones are confirmed. Checked locally with wrangler dev over the full 5,105-file site: content types, CORS, the landing page and every case above. Ashley Anderson's cloudflare-poc branch proved the Cloudflare route with R2 and a Python Worker; this keeps the same platform with less code to maintain.
TimMonko
force-pushed
the
cf/04-worker
branch
from
November 20, 2026 06:33
6d0ed84 to
df39607
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
worker/ deploys the static site from scripts/build_site.py with
Cloudflare Workers static assets. Cloudflare serves a request that
matches a file without running any code, and those requests
are free and unmetered. Only a
miss runs src/index.js, which handles:
api/conda/ folder, so it cannot be a file. Every released napari and
plugin manager calls it, so it keeps its deprecation headers.
and shields always normalized; pypi and conda now do too, where they
used to error.
"unavailable" badge for /api/shields.
About 2,670 plugin READMEs load badges from that host.
Tests run with node --test and a fake assets binding, so they need no
Cloudflare account. CI also bundles the Worker with a dry-run deploy.
Hostnames are left commented in wrangler.jsonc until the DNS zones are
confirmed.
Checked locally with wrangler dev over the full 5,105-file site:
content types, CORS, the landing page and every case above.
Ashley Anderson's cloudflare-poc branch proved the Cloudflare route
with R2 and a Python Worker; this keeps the same platform with less
code to maintain.
Stack created with GitHub Stacks CLI • Give Feedback 💬