Analyzer::Javascript::CloudflarePages
Inherits Analyzer::Javascript::ServerlessFunctionSupport < Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Cloudflare Pages Functions: every module under a project's functions/
directory is a route, its path mirroring the file path.
functions/api/users/[id].ts -> /api/users/{id} functions/api/files/[[path]].ts -> /api/files/{path} (catch-all) functions/index.ts -> /
onRequestGet / onRequestPost / ... exports serve one method each;
onRequest serves every method without a dedicated export. The
_middleware modules wrap routes and aren't routes themselves.
Rules follow wrangler's pages functions build (filepath-routing.ts).
Constants
The extensions wrangler routes (no .cjs / .mts).
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.