class

Analyzer::Javascript::NetlifyFunctions

Inherits Analyzer::Javascript::ServerlessFunctionSupport < Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object

Netlify Functions: each module in the functions directory (netlify/functions/ by default, or [functions] directory in netlify.toml) is a function named after its file — hello.mts, hello/hello.mts and hello/index.mts are all hello.

A function answers at config.path when it sets one (a URLPattern string or array, e.g. /api/users/:id) and only there; otherwise at /.netlify/functions/<name>. config.method narrows the verbs. Handlers are the modern default export (req, context) or the legacy Lambda-style export const handler = async (event) => ....

Edge functions (netlify/edge-functions/) are routed only by an inline config.path here; netlify.toml [[edge_functions]] declarations belong to the netlify config analyzer. Scheduled functions take no HTTP traffic and are skipped.

Constants

DEFAULT_URL_BASE = "/.netlify/functions/"
EDGE_KIND = "edge-functions"
EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts", ".jsx", ".tsx"]
FUNCTION_KIND = "functions"
SCHEDULE_WRAPPER_RE = /\bschedule\s*\(\s*['"`]/

v1 export const handler = schedule("@hourly", async () => ...).

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

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.

Source