@nithin554/code-crawler 0.1.64 → 0.1.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +14 -0
  2. package/dist/parser/frameworks/aspectj.d.ts +3 -0
  3. package/dist/parser/frameworks/aspectj.js +15 -0
  4. package/dist/parser/frameworks/aspectj.js.map +1 -0
  5. package/dist/parser/frameworks/celery.d.ts +3 -0
  6. package/dist/parser/frameworks/celery.js +15 -0
  7. package/dist/parser/frameworks/celery.js.map +1 -0
  8. package/dist/parser/frameworks/dependencyInjector.d.ts +3 -0
  9. package/dist/parser/frameworks/dependencyInjector.js +8 -0
  10. package/dist/parser/frameworks/dependencyInjector.js.map +1 -0
  11. package/dist/parser/frameworks/events.d.ts +3 -0
  12. package/dist/parser/frameworks/events.js +13 -0
  13. package/dist/parser/frameworks/events.js.map +1 -0
  14. package/dist/parser/frameworks/express.d.ts +6 -0
  15. package/dist/parser/frameworks/express.js +9 -0
  16. package/dist/parser/frameworks/express.js.map +1 -0
  17. package/dist/parser/frameworks/fastapi.d.ts +3 -0
  18. package/dist/parser/frameworks/fastapi.js +17 -0
  19. package/dist/parser/frameworks/fastapi.js.map +1 -0
  20. package/dist/parser/frameworks/fastify.d.ts +3 -0
  21. package/dist/parser/frameworks/fastify.js +6 -0
  22. package/dist/parser/frameworks/fastify.js.map +1 -0
  23. package/dist/parser/frameworks/flask.d.ts +3 -0
  24. package/dist/parser/frameworks/flask.js +12 -0
  25. package/dist/parser/frameworks/flask.js.map +1 -0
  26. package/dist/parser/frameworks/index.d.ts +38 -0
  27. package/dist/parser/frameworks/index.js +167 -0
  28. package/dist/parser/frameworks/index.js.map +1 -0
  29. package/dist/parser/frameworks/jakarta.d.ts +3 -0
  30. package/dist/parser/frameworks/jakarta.js +7 -0
  31. package/dist/parser/frameworks/jakarta.js.map +1 -0
  32. package/dist/parser/frameworks/jest.d.ts +3 -0
  33. package/dist/parser/frameworks/jest.js +10 -0
  34. package/dist/parser/frameworks/jest.js.map +1 -0
  35. package/dist/parser/frameworks/junit.d.ts +3 -0
  36. package/dist/parser/frameworks/junit.js +11 -0
  37. package/dist/parser/frameworks/junit.js.map +1 -0
  38. package/dist/parser/frameworks/nestjs.d.ts +7 -0
  39. package/dist/parser/frameworks/nestjs.js +49 -0
  40. package/dist/parser/frameworks/nestjs.js.map +1 -0
  41. package/dist/parser/frameworks/nestjsParam.d.ts +3 -0
  42. package/dist/parser/frameworks/nestjsParam.js +19 -0
  43. package/dist/parser/frameworks/nestjsParam.js.map +1 -0
  44. package/dist/parser/frameworks/pytest.d.ts +3 -0
  45. package/dist/parser/frameworks/pytest.js +11 -0
  46. package/dist/parser/frameworks/pytest.js.map +1 -0
  47. package/dist/parser/frameworks/spring.d.ts +3 -0
  48. package/dist/parser/frameworks/spring.js +23 -0
  49. package/dist/parser/frameworks/spring.js.map +1 -0
  50. package/dist/parser/frameworks/tsDi.d.ts +6 -0
  51. package/dist/parser/frameworks/tsDi.js +9 -0
  52. package/dist/parser/frameworks/tsDi.js.map +1 -0
  53. package/dist/parser/frameworks/types.d.ts +52 -0
  54. package/dist/parser/frameworks/types.js +2 -0
  55. package/dist/parser/frameworks/types.js.map +1 -0
  56. package/dist/parser/languages/java.js +33 -70
  57. package/dist/parser/languages/java.js.map +1 -1
  58. package/dist/parser/languages/python.js +27 -21
  59. package/dist/parser/languages/python.js.map +1 -1
  60. package/dist/parser/languages/typescript.js +46 -66
  61. package/dist/parser/languages/typescript.js.map +1 -1
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -611,6 +611,16 @@ Adding a language requires:
611
611
  4. Optionally a resolver in `src/resolver/` exposed through `src/resolver/registry.ts`;
612
612
  most languages work with the shared `module` resolver and only override
613
613
  language-specific builtins.
614
+ 5. Any framework it should recognise that is not registered yet — a module in
615
+ `src/parser/frameworks/` declaring its entry points, injections and markers. That is
616
+ a data change: no parser is edited.
617
+
618
+ Frameworks are resolved per file by import evidence, then by the descriptor's
619
+ `frameworks` order, then by every registered module. A file that imports
620
+ `dependency_injector` attributes its `@inject` there, while a Java file with no such
621
+ import still falls back to the registry rather than losing the annotation. Parsers keep
622
+ what is genuinely syntactic: receiver names for call-style routes, path joining, and the
623
+ text recorded as an entry point's detail.
614
624
 
615
625
  No existing language module needs editing: dispatch in `src/crawler.ts` reads the
616
626
  descriptor's `resolver`, so a language never appears in a conditional.
@@ -669,6 +679,10 @@ src/
669
679
  │ ├── controlFlow.ts enclosing branch/loop/try/catch + guard text
670
680
  │ ├── moduleId.ts import-aware module id derivation
671
681
  │ ├── methodId.ts method id scheme (overload signatures, constructor ids)
682
+ │ ├── frameworks/
683
+ │ │ ├── types.ts FrameworkModule / FrameworkScope contracts
684
+ │ │ ├── index.ts registry + scope/entry-point/injection lookups
685
+ │ │ └── <framework>.ts one module per framework (spring, nestjs, fastapi, …)
672
686
  │ └── languages/
673
687
  │ ├── index.ts descriptor table + per-file language detection
674
688
  │ ├── java.ts Java structural extraction
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** AspectJ: advice annotations and the `@Aspect` class marker. */
3
+ export declare const aspectj: FrameworkModule;
@@ -0,0 +1,15 @@
1
+ /** AspectJ: advice annotations and the `@Aspect` class marker. */
2
+ export const aspectj = {
3
+ name: "aspectj",
4
+ evidence: ["org.aspectj"],
5
+ aspects: ["Aspect"],
6
+ advice: {
7
+ Before: "before",
8
+ After: "after",
9
+ Around: "around",
10
+ AfterReturning: "afterReturning",
11
+ AfterThrowing: "afterThrowing",
12
+ Pointcut: "pointcut",
13
+ },
14
+ };
15
+ //# sourceMappingURL=aspectj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspectj.js","sourceRoot":"","sources":["../../../src/parser/frameworks/aspectj.ts"],"names":[],"mappings":"AAEA,kEAAkE;AAClE,MAAM,CAAC,MAAM,OAAO,GAAoB;IACtC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,QAAQ;QAChB,cAAc,EAAE,gBAAgB;QAChC,aAAa,EAAE,eAAe;QAC9B,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Celery (and celery-beat) task and schedule decorators. */
3
+ export declare const celery: FrameworkModule;
@@ -0,0 +1,15 @@
1
+ /** Celery (and celery-beat) task and schedule decorators. */
2
+ export const celery = {
3
+ name: "celery",
4
+ evidence: ["celery"],
5
+ entryPoints: {
6
+ task: { kind: "messaging" },
7
+ shared_task: { kind: "messaging" },
8
+ celery_task: { kind: "messaging" },
9
+ periodic_task: { kind: "messaging" },
10
+ scheduled: { kind: "scheduler" },
11
+ cron: { kind: "scheduler" },
12
+ interval: { kind: "scheduler" },
13
+ },
14
+ };
15
+ //# sourceMappingURL=celery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"celery.js","sourceRoot":"","sources":["../../../src/parser/frameworks/celery.ts"],"names":[],"mappings":"AAEA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAClC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAClC,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QACpC,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAChC,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;KAChC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** dependency-injector: `@inject` / `@injectable` markers and `Inject(...)` parameters. */
3
+ export declare const dependencyInjector: FrameworkModule;
@@ -0,0 +1,8 @@
1
+ /** dependency-injector: `@inject` / `@injectable` markers and `Inject(...)` parameters. */
2
+ export const dependencyInjector = {
3
+ name: "dependency-injector",
4
+ evidence: ["dependency_injector"],
5
+ injections: { inject: true, injectable: true, autowired: true, provide: true },
6
+ paramMarkers: { "Inject(": "dependency-injector" },
7
+ };
8
+ //# sourceMappingURL=dependencyInjector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencyInjector.js","sourceRoot":"","sources":["../../../src/parser/frameworks/dependencyInjector.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,CAAC,qBAAqB,CAAC;IACjC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9E,YAAY,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE;CACnD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Generic event-listener decorators with no single owning library. */
3
+ export declare const events: FrameworkModule;
@@ -0,0 +1,13 @@
1
+ /** Generic event-listener decorators with no single owning library. */
2
+ export const events = {
3
+ name: "events",
4
+ entryPoints: {
5
+ on_event: { kind: "event" },
6
+ listener: { kind: "event" },
7
+ receiver: { kind: "event" },
8
+ on_message: { kind: "event" },
9
+ subscribe: { kind: "event" },
10
+ handler: { kind: "event" },
11
+ },
12
+ };
13
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/parser/frameworks/events.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC5B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KAC3B;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /**
3
+ * Express declares evidence only: route registration is detected from call
4
+ * receivers (`app.get(...)`), which is a syntactic heuristic the parser owns.
5
+ */
6
+ export declare const express: FrameworkModule;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Express declares evidence only: route registration is detected from call
3
+ * receivers (`app.get(...)`), which is a syntactic heuristic the parser owns.
4
+ */
5
+ export const express = {
6
+ name: "express",
7
+ evidence: ["express"],
8
+ };
9
+ //# sourceMappingURL=express.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express.js","sourceRoot":"","sources":["../../../src/parser/frameworks/express.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAoB;IACtC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,SAAS,CAAC;CACtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** FastAPI: verb decorators register routes, `Depends` injects a parameter. */
3
+ export declare const fastapi: FrameworkModule;
@@ -0,0 +1,17 @@
1
+ /** FastAPI: verb decorators register routes, `Depends` injects a parameter. */
2
+ export const fastapi = {
3
+ name: "fastapi",
4
+ evidence: ["fastapi"],
5
+ entryPoints: {
6
+ get: { kind: "http", httpMethod: "GET" },
7
+ post: { kind: "http", httpMethod: "POST" },
8
+ put: { kind: "http", httpMethod: "PUT" },
9
+ delete: { kind: "http", httpMethod: "DELETE" },
10
+ patch: { kind: "http", httpMethod: "PATCH" },
11
+ head: { kind: "http", httpMethod: "HEAD" },
12
+ options: { kind: "http", httpMethod: "OPTIONS" },
13
+ trace: { kind: "http", httpMethod: "TRACE" },
14
+ },
15
+ paramMarkers: { "Depends(": "fastapi" },
16
+ };
17
+ //# sourceMappingURL=fastapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastapi.js","sourceRoot":"","sources":["../../../src/parser/frameworks/fastapi.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,OAAO,GAAoB;IACtC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,WAAW,EAAE;QACX,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QACxC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;QAC1C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QACxC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC9C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;QAC5C,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;QAC1C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE;QAChD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;KAC7C;IACD,YAAY,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;CACxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Fastify declares evidence only; the receiver heuristic lives in the parser. */
3
+ export declare const fastify: FrameworkModule;
@@ -0,0 +1,6 @@
1
+ /** Fastify declares evidence only; the receiver heuristic lives in the parser. */
2
+ export const fastify = {
3
+ name: "fastify",
4
+ evidence: ["fastify"],
5
+ };
6
+ //# sourceMappingURL=fastify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastify.js","sourceRoot":"","sources":["../../../src/parser/frameworks/fastify.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,MAAM,CAAC,MAAM,OAAO,GAAoB;IACtC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,SAAS,CAAC;CACtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Flask: route decorators that accept any verb, plus `add_url_rule`. */
3
+ export declare const flask: FrameworkModule;
@@ -0,0 +1,12 @@
1
+ /** Flask: route decorators that accept any verb, plus `add_url_rule`. */
2
+ export const flask = {
3
+ name: "flask",
4
+ evidence: ["flask"],
5
+ entryPoints: {
6
+ route: { kind: "http", httpMethod: "ANY" },
7
+ api_route: { kind: "http", httpMethod: "ANY" },
8
+ websocket: { kind: "http", httpMethod: "ANY" },
9
+ websocket_route: { kind: "http", httpMethod: "ANY" },
10
+ },
11
+ };
12
+ //# sourceMappingURL=flask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flask.js","sourceRoot":"","sources":["../../../src/parser/frameworks/flask.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,WAAW,EAAE;QACX,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QAC1C,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QAC9C,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QAC9C,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;KACrD;CACF,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { ImportInfo } from "../language.js";
2
+ import type { EntryPointSpec, FrameworkModule, FrameworkScope } from "./types.js";
3
+ export type { EntryPointSpec, FrameworkModule, FrameworkScope } from "./types.js";
4
+ /** Every registered framework, in precedence order. */
5
+ export declare function listFrameworks(): FrameworkModule[];
6
+ /** Registered framework names, in precedence order. */
7
+ export declare function frameworkNames(): string[];
8
+ export declare function frameworkNamed(name: string): FrameworkModule | undefined;
9
+ /**
10
+ * Build the conventions a file is judged against. Imports come first so a
11
+ * project that evidences `dependency_injector` attributes `@inject` there,
12
+ * while a Java file with no such import still falls back to the registry.
13
+ */
14
+ export declare function frameworkScope(imports?: ImportInfo[], preferred?: string[], caseInsensitive?: boolean): FrameworkScope;
15
+ export interface EntryPointMatch {
16
+ module: FrameworkModule;
17
+ spec: EntryPointSpec;
18
+ }
19
+ /**
20
+ * What an annotation means, if anything. `accept` lets a language keep its own
21
+ * extra condition (Python only treats a verb decorator as HTTP when a receiver
22
+ * or the `route` name is present).
23
+ */
24
+ export declare function entryPointIn(scope: FrameworkScope, name: string, qualified?: string, accept?: (spec: EntryPointSpec) => boolean): EntryPointMatch | undefined;
25
+ /** Framework label an annotation attributes an injection to. */
26
+ export declare function injectionIn(scope: FrameworkScope, name: string): string | undefined;
27
+ /** Whether an annotation marks a class as container-managed. */
28
+ export declare function injectableIn(scope: FrameworkScope, name: string): boolean;
29
+ /** Whether an annotation marks an aspect class. */
30
+ export declare function aspectIn(scope: FrameworkScope, name: string): boolean;
31
+ export interface AdviceMatch {
32
+ module: FrameworkModule;
33
+ kind: string;
34
+ }
35
+ /** Advice kind an annotation implies (`before`, `around`, ...). */
36
+ export declare function adviceIn(scope: FrameworkScope, name: string): AdviceMatch | undefined;
37
+ /** Injection label implied by a raw marker in a parameter list, e.g. `Depends(`. */
38
+ export declare function paramMarkerIn(scope: FrameworkScope, text: string): string | undefined;
@@ -0,0 +1,167 @@
1
+ import { aspectj } from "./aspectj.js";
2
+ import { celery } from "./celery.js";
3
+ import { dependencyInjector } from "./dependencyInjector.js";
4
+ import { events } from "./events.js";
5
+ import { express } from "./express.js";
6
+ import { fastapi } from "./fastapi.js";
7
+ import { fastify } from "./fastify.js";
8
+ import { flask } from "./flask.js";
9
+ import { jakarta } from "./jakarta.js";
10
+ import { jest } from "./jest.js";
11
+ import { junit } from "./junit.js";
12
+ import { nestjs } from "./nestjs.js";
13
+ import { nestjsParam } from "./nestjsParam.js";
14
+ import { pytest } from "./pytest.js";
15
+ import { spring } from "./spring.js";
16
+ import { tsDi } from "./tsDi.js";
17
+ /**
18
+ * Registration order decides ties when no import evidence separates two claims,
19
+ * so specific frameworks are listed before generic ones.
20
+ */
21
+ const REGISTRY = [
22
+ spring,
23
+ jakarta,
24
+ aspectj,
25
+ junit,
26
+ jest,
27
+ nestjs,
28
+ nestjsParam,
29
+ fastapi,
30
+ flask,
31
+ dependencyInjector,
32
+ pytest,
33
+ celery,
34
+ events,
35
+ express,
36
+ fastify,
37
+ tsDi,
38
+ ];
39
+ const BY_NAME = new Map(REGISTRY.map((module) => [module.name, module]));
40
+ /** Every registered framework, in precedence order. */
41
+ export function listFrameworks() {
42
+ return [...REGISTRY];
43
+ }
44
+ /** Registered framework names, in precedence order. */
45
+ export function frameworkNames() {
46
+ return REGISTRY.map((module) => module.name);
47
+ }
48
+ export function frameworkNamed(name) {
49
+ return BY_NAME.get(name);
50
+ }
51
+ function evidenceMatches(importInfo, module) {
52
+ const prefixes = module.evidence ?? [];
53
+ if (prefixes.length === 0)
54
+ return false;
55
+ const candidates = [importInfo.fqn, importInfo.module, importInfo.importedName].filter((candidate) => typeof candidate === "string" && candidate.length > 0);
56
+ return candidates.some((candidate) => prefixes.some((prefix) => candidate === prefix || candidate.startsWith(prefix)));
57
+ }
58
+ /**
59
+ * Build the conventions a file is judged against. Imports come first so a
60
+ * project that evidences `dependency_injector` attributes `@inject` there,
61
+ * while a Java file with no such import still falls back to the registry.
62
+ */
63
+ export function frameworkScope(imports = [], preferred = [], caseInsensitive = false) {
64
+ const evidenced = REGISTRY.filter((module) => imports.some((importInfo) => evidenceMatches(importInfo, module)));
65
+ const preferredModules = preferred
66
+ .map((name) => frameworkNamed(name))
67
+ .filter((module) => module !== undefined);
68
+ return { evidenced, preferred: preferredModules, all: [...REGISTRY], caseInsensitive };
69
+ }
70
+ function ordered(scope) {
71
+ const seen = new Set();
72
+ const result = [];
73
+ for (const module of [...scope.evidenced, ...scope.preferred, ...scope.all]) {
74
+ if (seen.has(module.name))
75
+ continue;
76
+ seen.add(module.name);
77
+ result.push(module);
78
+ }
79
+ return result;
80
+ }
81
+ function lastSegment(name) {
82
+ const dot = name.lastIndexOf(".");
83
+ return dot === -1 ? [name] : [name, name.slice(dot + 1)];
84
+ }
85
+ function matchKey(table, candidate, caseInsensitive) {
86
+ if (!table)
87
+ return undefined;
88
+ const parts = lastSegment(candidate);
89
+ for (const key of parts) {
90
+ if (Object.hasOwn(table, key))
91
+ return table[key];
92
+ }
93
+ if (!caseInsensitive)
94
+ return undefined;
95
+ for (const [key, value] of Object.entries(table)) {
96
+ const lower = key.toLowerCase();
97
+ if (parts.some((part) => part.toLowerCase() === lower))
98
+ return value;
99
+ }
100
+ return undefined;
101
+ }
102
+ function matchQualifiedPrefix(table, qualified) {
103
+ if (!table)
104
+ return undefined;
105
+ const lower = qualified.toLowerCase();
106
+ for (const [prefix, value] of Object.entries(table)) {
107
+ if (lower.startsWith(prefix))
108
+ return value;
109
+ }
110
+ return undefined;
111
+ }
112
+ /**
113
+ * What an annotation means, if anything. `accept` lets a language keep its own
114
+ * extra condition (Python only treats a verb decorator as HTTP when a receiver
115
+ * or the `route` name is present).
116
+ */
117
+ export function entryPointIn(scope, name, qualified, accept) {
118
+ for (const module of ordered(scope)) {
119
+ const spec = matchKey(module.entryPoints, name, scope.caseInsensitive) ??
120
+ (qualified ? matchQualifiedPrefix(module.qualifiedPrefixes, qualified) : undefined);
121
+ if (!spec)
122
+ continue;
123
+ if (accept && !accept(spec))
124
+ continue;
125
+ return { module, spec };
126
+ }
127
+ return undefined;
128
+ }
129
+ /** Framework label an annotation attributes an injection to. */
130
+ export function injectionIn(scope, name) {
131
+ for (const module of ordered(scope)) {
132
+ const label = matchKey(module.injections, name, scope.caseInsensitive);
133
+ if (label === undefined)
134
+ continue;
135
+ return label === true ? module.name : label;
136
+ }
137
+ return undefined;
138
+ }
139
+ /** Whether an annotation marks a class as container-managed. */
140
+ export function injectableIn(scope, name) {
141
+ return ordered(scope).some((module) => (module.injectables ?? []).some((marker) => scope.caseInsensitive ? marker.toLowerCase() === name.toLowerCase() : marker === name));
142
+ }
143
+ /** Whether an annotation marks an aspect class. */
144
+ export function aspectIn(scope, name) {
145
+ return ordered(scope).some((module) => (module.aspects ?? []).some((marker) => scope.caseInsensitive ? marker.toLowerCase() === name.toLowerCase() : marker === name));
146
+ }
147
+ /** Advice kind an annotation implies (`before`, `around`, ...). */
148
+ export function adviceIn(scope, name) {
149
+ for (const module of ordered(scope)) {
150
+ const kind = matchKey(module.advice, name, scope.caseInsensitive);
151
+ if (kind)
152
+ return { module, kind };
153
+ }
154
+ return undefined;
155
+ }
156
+ /** Injection label implied by a raw marker in a parameter list, e.g. `Depends(`. */
157
+ export function paramMarkerIn(scope, text) {
158
+ const compact = text.replace(/\s+/g, "");
159
+ for (const module of ordered(scope)) {
160
+ for (const [marker, label] of Object.entries(module.paramMarkers ?? {})) {
161
+ if (compact.includes(marker.replace(/\s+/g, "")))
162
+ return label;
163
+ }
164
+ }
165
+ return undefined;
166
+ }
167
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parser/frameworks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,C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EAAE,EAAE,CACrC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,CACtF,CACF,CAAC;AACJ,CAAC;AAOD,mEAAmE;AACnE,MAAM,UAAU,QAAQ,CAAC,KAAqB,EAAE,IAAY;IAC1D,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;QAClE,IAAI,IAAI;YAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,aAAa,CAAC,KAAqB,EAAE,IAAY;IAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzC,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,CAAC;YACxE,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAAE,OAAO,KAAK,CAAC;QACjE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Jakarta EE / JSR-330 injection annotations. */
3
+ export declare const jakarta: FrameworkModule;
@@ -0,0 +1,7 @@
1
+ /** Jakarta EE / JSR-330 injection annotations. */
2
+ export const jakarta = {
3
+ name: "jakarta",
4
+ evidence: ["jakarta.", "javax."],
5
+ injections: { Inject: true, Resource: true, ManagedProperty: true },
6
+ };
7
+ //# sourceMappingURL=jakarta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jakarta.js","sourceRoot":"","sources":["../../../src/parser/frameworks/jakarta.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,MAAM,CAAC,MAAM,OAAO,GAAoB;IACtC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAChC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE;CACpE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Jest/Mocha test declarations. */
3
+ export declare const jest: FrameworkModule;
@@ -0,0 +1,10 @@
1
+ /** Jest/Mocha test declarations. */
2
+ export const jest = {
3
+ name: "jest",
4
+ evidence: ["@jest/", "jest", "mocha"],
5
+ entryPoints: {
6
+ Test: { kind: "test" },
7
+ It: { kind: "test" },
8
+ },
9
+ };
10
+ //# sourceMappingURL=jest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../src/parser/frameworks/jest.ts"],"names":[],"mappings":"AAEA,oCAAoC;AACpC,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IACrC,WAAW,EAAE;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACtB,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACrB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** JUnit: test-method annotations that make a method a framework-invoked root. */
3
+ export declare const junit: FrameworkModule;
@@ -0,0 +1,11 @@
1
+ /** JUnit: test-method annotations that make a method a framework-invoked root. */
2
+ export const junit = {
3
+ name: "junit",
4
+ evidence: ["org.junit"],
5
+ entryPoints: {
6
+ Test: { kind: "test" },
7
+ ParameterizedTest: { kind: "test" },
8
+ RepeatedTest: { kind: "test" },
9
+ },
10
+ };
11
+ //# sourceMappingURL=junit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"junit.js","sourceRoot":"","sources":["../../../src/parser/frameworks/junit.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,WAAW,CAAC;IACvB,WAAW,EAAE;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACtB,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACnC,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KAC/B;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /**
3
+ * NestJS: route/messaging/scheduler/event decorators, its injection decorators,
4
+ * and the class decorators that make a class container-managed. The Angular
5
+ * class decorators share this list because the parser labels both `nestjs`.
6
+ */
7
+ export declare const nestjs: FrameworkModule;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * NestJS: route/messaging/scheduler/event decorators, its injection decorators,
3
+ * and the class decorators that make a class container-managed. The Angular
4
+ * class decorators share this list because the parser labels both `nestjs`.
5
+ */
6
+ export const nestjs = {
7
+ name: "nestjs",
8
+ evidence: ["@nestjs/"],
9
+ entryPoints: {
10
+ Get: { kind: "http", httpMethod: "GET" },
11
+ Post: { kind: "http", httpMethod: "POST" },
12
+ Put: { kind: "http", httpMethod: "PUT" },
13
+ Delete: { kind: "http", httpMethod: "DELETE" },
14
+ Patch: { kind: "http", httpMethod: "PATCH" },
15
+ Head: { kind: "http", httpMethod: "HEAD" },
16
+ Options: { kind: "http", httpMethod: "OPTIONS" },
17
+ All: { kind: "http", httpMethod: "ALL" },
18
+ MessagePattern: { kind: "messaging" },
19
+ EventPattern: { kind: "messaging" },
20
+ OnMessage: { kind: "messaging" },
21
+ Cron: { kind: "scheduler" },
22
+ Interval: { kind: "scheduler" },
23
+ Timeout: { kind: "scheduler" },
24
+ OnEvent: { kind: "event" },
25
+ EventSubscriber: { kind: "event" },
26
+ SubscribeMessage: { kind: "event" },
27
+ },
28
+ injections: {
29
+ Inject: true,
30
+ InjectRepository: true,
31
+ InjectModel: true,
32
+ InjectDataSource: true,
33
+ /** Spring-style decorator accepted by the TS parser. */
34
+ Autowired: "spring",
35
+ },
36
+ injectables: [
37
+ "Injectable",
38
+ "Controller",
39
+ "Component",
40
+ "Service",
41
+ "Directive",
42
+ "Pipe",
43
+ "Guard",
44
+ "Gateway",
45
+ "Resolver",
46
+ "Module",
47
+ ],
48
+ };
49
+ //# sourceMappingURL=nestjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nestjs.js","sourceRoot":"","sources":["../../../src/parser/frameworks/nestjs.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,WAAW,EAAE;QACX,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QACxC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;QAC1C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QACxC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC9C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;QAC5C,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;QAC1C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE;QAChD,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;QACxC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QACrC,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QACnC,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAChC,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC9B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC1B,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAClC,gBAAgB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KACpC;IACD,UAAU,EAAE;QACV,MAAM,EAAE,IAAI;QACZ,gBAAgB,EAAE,IAAI;QACtB,WAAW,EAAE,IAAI;QACjB,gBAAgB,EAAE,IAAI;QACtB,wDAAwD;QACxD,SAAS,EAAE,QAAQ;KACpB;IACD,WAAW,EAAE;QACX,YAAY;QACZ,YAAY;QACZ,WAAW;QACX,SAAS;QACT,WAAW;QACX,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;QACV,QAAQ;KACT;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Parameter decorators that bind a request value rather than inject a dependency. */
3
+ export declare const nestjsParam: FrameworkModule;
@@ -0,0 +1,19 @@
1
+ /** Parameter decorators that bind a request value rather than inject a dependency. */
2
+ export const nestjsParam = {
3
+ name: "nestjs-param",
4
+ evidence: ["@nestjs/"],
5
+ injections: {
6
+ Body: true,
7
+ Param: true,
8
+ Query: true,
9
+ Headers: true,
10
+ Req: true,
11
+ Res: true,
12
+ Session: true,
13
+ UploadedFile: true,
14
+ UploadedFiles: true,
15
+ Ip: true,
16
+ HostParam: true,
17
+ },
18
+ };
19
+ //# sourceMappingURL=nestjsParam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nestjsParam.js","sourceRoot":"","sources":["../../../src/parser/frameworks/nestjsParam.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,MAAM,CAAC,MAAM,WAAW,GAAoB;IAC1C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,UAAU,EAAE;QACV,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;QACnB,EAAE,EAAE,IAAI;QACR,SAAS,EAAE,IAAI;KAChB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** pytest: fixtures, parametrization, and `@pytest.mark.*` decorated tests. */
3
+ export declare const pytest: FrameworkModule;
@@ -0,0 +1,11 @@
1
+ /** pytest: fixtures, parametrization, and `@pytest.mark.*` decorated tests. */
2
+ export const pytest = {
3
+ name: "pytest",
4
+ evidence: ["pytest"],
5
+ entryPoints: {
6
+ fixture: { kind: "test" },
7
+ parametrize: { kind: "test" },
8
+ },
9
+ qualifiedPrefixes: { "mark.": { kind: "test" } },
10
+ };
11
+ //# sourceMappingURL=pytest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pytest.js","sourceRoot":"","sources":["../../../src/parser/frameworks/pytest.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,MAAM,GAAoB;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,WAAW,EAAE;QACX,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACzB,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KAC9B;IACD,iBAAiB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FrameworkModule } from "./types.js";
2
+ /** Spring: HTTP mappings, scheduling, events, and Spring messaging listeners. */
3
+ export declare const spring: FrameworkModule;