Cloudflare Worker that handles ?go-get=1 requests and emits go-import meta tags routing go.moleculesai.app/<area>/* to the canonical Gitea repo for that area. See molecule-ai/internal#71 for design + module map. Files: - worker.js: stateless responder (~170 lines, vendor-portable) - wrangler.toml: route binding + zone config - README.md: deploy + smoke-test instructions Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
15 lines
563 B
TOML
15 lines
563 B
TOML
name = "go-import-responder"
|
|
main = "worker.js"
|
|
compatibility_date = "2025-09-01"
|
|
|
|
# Bind the worker to go.moleculesai.app at the zone root + every path
|
|
# under it. The route pattern uses a wildcard so /core/platform,
|
|
# /controlplane, /cli, /plugin/gh-identity all hit the same worker.
|
|
routes = [
|
|
{ pattern = "go.moleculesai.app/*", zone_name = "moleculesai.app" },
|
|
]
|
|
|
|
# No KV / R2 / Durable Objects bindings — the responder is fully
|
|
# stateless and serves from an in-memory MODULE_MAP. Keeps cold-start
|
|
# < 5ms and removes a cache layer that could go stale.
|