Analyzer::Javascript::Nestjs
Inherits Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Constants
Class decorators that open a controller and carry its path prefix.
The other decorator-controller frameworks
(Analyzer::Typescript::DecoratorController) name their own.
Extensions worth scanning for cross-file enum/object constants —
the enum may live in a .ts file even when the route-scan pass only
walks .js, so cast a wide net here.
Midway imports the same @Controller/@Get vocabulary from
@midwayjs/*. Analyzer::Typescript::Midway claims those .ts files
and Analyzer::Typescript::Nestjs leaves them to it; JavaScript stays
with this analyzer, as there is no JS Midway analyzer.
Markers that identify a NestJS application root, so a prefix set in one app's bootstrap is not stamped onto another app's controllers.
NestJS's argument decorators in the order their params are added: the
decorator, the param type, and the param one without a string argument
stands for (nil: none). @Query('q') is the query param q;
@Query() / @Query(pipe) the whole query.
Precompiled once — a single PCRE2-JIT scan replaces five naive String#includes? substring scans over the whole file content. Regex.union auto-escapes each literal, so this is provably equivalent to the OR-of-includes? it replaces.
Every const NAME = <expr> in the scan, first definition wins. Version
and header constants are usually imported (@calcom/platform-constants)
and re-cast (VERSION_X as unknown as VersionValue), so the per-file
literal table cannot see them.
Request-object fields read in handler bodies, paired with the param type they map to. Iterated in this order when extracting params.
Name of the route_conditions entry that carries a route's raw version
list from the per-file scan to separate_header_versions.
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.