class
Analyzer::Typescript::TRPC
Defined in:
analyzer/analyzers/typescript/trpc.crConstant Summary
-
DEFAULT_PREFIX =
"/api/trpc" -
PREFIX_HINTS =
["endpoint:", "createExpressMiddleware", "createKoaMiddleware", "fastifyTRPCPlugin", "fastifyTRPC"] -
PREFIX_HINTS_RE =
Regex.union(PREFIX_HINTS) -
PROCEDURE_BUILDER_RE =
Regex.union("Procedure", ".procedure") -
Procedure/.procedureidentify a procedure-builder reference. -
PROCEDURE_HINTS =
[".query(", ".query (", ".mutation(", ".mutation (", ".subscription(", ".subscription ("] -
PROCEDURE_HINTS_RE =
Regex.union(PROCEDURE_HINTS) -
One precompiled
Regex.union(PCRE2 JIT) scan replaces the six-item.any? { includes? }check below — this gate is evaluated on every candidate file, from both v9_router_candidate? and trpc_candidate?. -
PROCEDURE_VERBS =
{"query" => "GET", "mutation" => "POST", "subscription" => "SUBSCRIBE"} -
TEST_FIXTURE_PATH_MARKERS =
["/test/", "/tests/", "/__tests__/", "/e2e/", "/snapshots/", "/test-files/"] -
TRPC_ROOT_MARKER_RE =
Regex.union("initTRPC", "createTRPCRouter") -
initTRPC/createTRPCRouterare OR-ed as a standalone boolean gate in trpc_candidate? below; union them into one scan like the hint lists above instead of two sequential String#includes? calls. -
V9_MERGE_HINTS =
[".merge(", ".merge ("] -
V9_MERGE_HINTS_RE =
Regex.union(V9_MERGE_HINTS) -
V9_ROUTER_MARKER_RE =
Regex.union("createRouter", "trpc.router") -
createRouter/trpc.routergate the v9 chain-router shape.