Analyzer::Javascript::VercelFunctions
Inherits Analyzer::Javascript::ServerlessFunctionSupport < Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Vercel Functions: every Node.js module under a project's root api/
directory is deployed as a function at the matching path.
api/hello.ts -> /api/hello api/users/[id].ts -> /api/users/{id} api/index.ts -> /api
A default-exported (req, res) / (request) handler serves every method;
export function GET(request) style exports serve one each. Entries
starting with _ or . are not deployed (api/_lib/db.ts is a helper).
Only an api/ at the scan root or directly in a project root counts, and
only in a Vercel project (vercel.json / now.json, an @vercel/node /
@vercel/functions dependency, or a module importing them), so a
Next.js pages/api/ or Nuxt server/api/ tree never lands here.
Rules follow @vercel/fs-detectors (detect-builders.ts).
Constants
api/**/*.+(js|mjs|ts|tsx) — the @vercel/node builder's pattern.
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.