Analyzer::Javascript::JavascriptEngine
Inherits Analyzer < FileHelper < Reference < Object
Constants
A route module's page component (SolidStart, Qwik City). Line-anchored
without consuming earlier lines, so line_for_match lands on it.
Default extension set for JavaScript/TypeScript source files.
Analyzers with a different filter (e.g. Nitro adds .mts, NestJS JS
only uses .js/.jsx) pass their own list to parallel_file_scan.
This list mirrors what the JS detectors declare in extensions:
(.js .mjs .cjs .jsx .ts .mts .cts .tsx). It has to: detection and analysis
read the same tree, so any extension a detector accepts but this
list omits produces a project that detects fine and then yields
zero endpoints, with nothing logged and nothing for --strict to
report. .mjs/.cjs were exactly that hole — an ESM Express app
(app.mjs) detected as js_express and returned no routes.
Analyzers that pass their own list (koa, hapi, sails, adonisjs,
elysia, feathers, ...) already spelled .mjs/.cjs out by hand;
the six that relied on this default (express, fastify, hono,
restify, apollo, graphql_yoga, plus socketio) silently did not.
Compiled once per verb — interpolated regex literals would otherwise be rebuilt (full PCRE2 compile) for every method on every file.
Lowest-cost defaults for endpoints whose handler doesn't advertise its verbs explicitly. Mirrors the Next.js fallback.
Verb-named exports of a file-routed API module (Astro, SvelteKit).
Route-directory segments → URL for the src/routes/ conventions
(SvelteKit, SolidStart, Qwik City): (group) segments are hidden and
every param group normalizes to {name}, in place, so static text
around it survives (foo-[id], @[user]):
[id] [id=int] [...rest] [[opt]] [[opt=int]] [[...rest]]