api-tests-coverage 1.0.15 → 1.0.17

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 (139) hide show
  1. package/dist/dashboard/dist/assets/_basePickBy-C2jmWITn.js +1 -0
  2. package/dist/dashboard/dist/assets/_baseUniq-DE6cyzJb.js +1 -0
  3. package/dist/dashboard/dist/assets/arc-B-Q4nGPT.js +1 -0
  4. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-C_5dqWCI.js +36 -0
  5. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-DbGIO6Kt.js +122 -0
  6. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-CAFpcejP.js +10 -0
  7. package/dist/dashboard/dist/assets/channel-Di9el3wE.js +1 -0
  8. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-DY1boKsq.js +1 -0
  9. package/dist/dashboard/dist/assets/chunk-55IACEB6-BSL35gyW.js +1 -0
  10. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-eTDXrKrv.js +165 -0
  11. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-M-8I3jEy.js +220 -0
  12. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-bSA0XiS0.js +15 -0
  13. package/dist/dashboard/dist/assets/chunk-QN33PNHL-BrOIYUBs.js +1 -0
  14. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-CliaQGD4.js +1 -0
  15. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-CyhcxGB1.js +1 -0
  16. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-BkGN4Cpz.js +1 -0
  17. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-BkGN4Cpz.js +1 -0
  18. package/dist/dashboard/dist/assets/clone-Cvq8JuOb.js +1 -0
  19. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-BUkL7Wtq.js +1 -0
  20. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-B8oEROJc.js +4 -0
  21. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-5uki9Dw8.js +24 -0
  22. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-BRNhmby2.js +43 -0
  23. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-D-ku_X8U.js +24 -0
  24. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DGl6gPe2.js +60 -0
  25. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-Co89qYBD.js +162 -0
  26. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-2r3WpWQC.js +267 -0
  27. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-CuJ5l3TK.js +65 -0
  28. package/dist/dashboard/dist/assets/graph-ZtgwAPQj.js +1 -0
  29. package/dist/dashboard/dist/assets/index-D3sRJga7.js +777 -0
  30. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-ujnMqVz3.js +2 -0
  31. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-DQzfeBIo.js +139 -0
  32. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-ueIaoeks.js +89 -0
  33. package/dist/dashboard/dist/assets/layout-B1fTYUMj.js +1 -0
  34. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-B7wYeLe1.js +68 -0
  35. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-Bf8vKEOf.js +30 -0
  36. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-CM8qiFLR.js +7 -0
  37. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-DPTtP4Ve.js +64 -0
  38. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-DEVTdH0h.js +10 -0
  39. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-Bjr5wgXg.js +145 -0
  40. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DDrhZYly.js +1 -0
  41. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-Im6pH8C-.js +1 -0
  42. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-DAT3r9va.js +61 -0
  43. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-BlA8rg0m.js +162 -0
  44. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-7aSkQtVu.js +7 -0
  45. package/dist/src/ast/astTypes.d.ts +86 -0
  46. package/dist/src/ast/astTypes.d.ts.map +1 -1
  47. package/dist/src/discovery/fileClassifier.d.ts.map +1 -1
  48. package/dist/src/discovery/fileClassifier.js +15 -16
  49. package/dist/src/discovery/frameworkDetector.d.ts +28 -0
  50. package/dist/src/discovery/frameworkDetector.d.ts.map +1 -0
  51. package/dist/src/discovery/frameworkDetector.js +189 -0
  52. package/dist/src/discovery/projectDiscovery.d.ts +5 -1
  53. package/dist/src/discovery/projectDiscovery.d.ts.map +1 -1
  54. package/dist/src/discovery/projectDiscovery.js +8 -1
  55. package/dist/src/inference/routeInference.d.ts.map +1 -1
  56. package/dist/src/inference/routeInference.js +224 -1
  57. package/dist/src/languages/java/graphqlSchemaParser.d.ts +65 -0
  58. package/dist/src/languages/java/graphqlSchemaParser.d.ts.map +1 -0
  59. package/dist/src/languages/java/graphqlSchemaParser.js +164 -0
  60. package/dist/src/languages/java/mybatisXmlParser.d.ts +52 -0
  61. package/dist/src/languages/java/mybatisXmlParser.d.ts.map +1 -0
  62. package/dist/src/languages/java/mybatisXmlParser.js +107 -0
  63. package/dist/src/languages/java/semanticBuilder.d.ts.map +1 -1
  64. package/dist/src/languages/java/semanticBuilder.js +69 -12
  65. package/dist/src/languages/javascript/angularDetector.d.ts +74 -0
  66. package/dist/src/languages/javascript/angularDetector.d.ts.map +1 -0
  67. package/dist/src/languages/javascript/angularDetector.js +227 -0
  68. package/dist/src/languages/javascript/assertionResolver.js +6 -4
  69. package/dist/src/languages/javascript/hapiDetector.d.ts +40 -0
  70. package/dist/src/languages/javascript/hapiDetector.d.ts.map +1 -0
  71. package/dist/src/languages/javascript/hapiDetector.js +174 -0
  72. package/dist/src/languages/javascript/mongooseDetector.d.ts +65 -0
  73. package/dist/src/languages/javascript/mongooseDetector.d.ts.map +1 -0
  74. package/dist/src/languages/javascript/mongooseDetector.js +237 -0
  75. package/dist/src/languages/javascript/vueDetector.d.ts +42 -0
  76. package/dist/src/languages/javascript/vueDetector.d.ts.map +1 -0
  77. package/dist/src/languages/javascript/vueDetector.js +109 -0
  78. package/dist/src/languages/python/index.d.ts +6 -2
  79. package/dist/src/languages/python/index.d.ts.map +1 -1
  80. package/dist/src/languages/python/index.js +200 -5
  81. package/dist/src/languages/python/testPatternDetector.d.ts +70 -0
  82. package/dist/src/languages/python/testPatternDetector.d.ts.map +1 -0
  83. package/dist/src/languages/python/testPatternDetector.js +201 -0
  84. package/dist/src/pipeline/confidence.d.ts +6 -1
  85. package/dist/src/pipeline/confidence.d.ts.map +1 -1
  86. package/dist/src/pipeline/confidence.js +8 -3
  87. package/dist/src/pipeline/graph.d.ts.map +1 -1
  88. package/dist/src/pipeline/graph.js +16 -4
  89. package/dist/src/pipeline/stages/ast/astStage.d.ts.map +1 -1
  90. package/dist/src/pipeline/stages/ast/astStage.js +51 -1
  91. package/dist/src/pipeline/stages/ast/baseUrlComposer.d.ts +44 -0
  92. package/dist/src/pipeline/stages/ast/baseUrlComposer.d.ts.map +1 -0
  93. package/dist/src/pipeline/stages/ast/baseUrlComposer.js +97 -0
  94. package/dist/src/pipeline/stages/ast/crossFileResolutionPass.d.ts +54 -0
  95. package/dist/src/pipeline/stages/ast/crossFileResolutionPass.d.ts.map +1 -0
  96. package/dist/src/pipeline/stages/ast/crossFileResolutionPass.js +88 -0
  97. package/dist/src/pipeline/stages/ast/crossFileResolver.d.ts.map +1 -1
  98. package/dist/src/pipeline/stages/ast/crossFileResolver.js +39 -1
  99. package/dist/src/pipeline/stages/ast/graphBuilder.d.ts.map +1 -1
  100. package/dist/src/pipeline/stages/ast/graphBuilder.js +81 -0
  101. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.d.ts +41 -0
  102. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.d.ts.map +1 -0
  103. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.js +101 -0
  104. package/dist/src/pipeline/stages/ast/resolvers/angularInjectionResolver.d.ts +18 -0
  105. package/dist/src/pipeline/stages/ast/resolvers/angularInjectionResolver.d.ts.map +1 -0
  106. package/dist/src/pipeline/stages/ast/resolvers/angularInjectionResolver.js +96 -0
  107. package/dist/src/pipeline/stages/ast/resolvers/dddLayerResolver.d.ts +46 -0
  108. package/dist/src/pipeline/stages/ast/resolvers/dddLayerResolver.d.ts.map +1 -0
  109. package/dist/src/pipeline/stages/ast/resolvers/dddLayerResolver.js +314 -0
  110. package/dist/src/pipeline/stages/ast/resolvers/expressRouterResolver.d.ts +17 -0
  111. package/dist/src/pipeline/stages/ast/resolvers/expressRouterResolver.d.ts.map +1 -0
  112. package/dist/src/pipeline/stages/ast/resolvers/expressRouterResolver.js +65 -0
  113. package/dist/src/pipeline/stages/ast/resolvers/flaskBlueprintResolver.d.ts +17 -0
  114. package/dist/src/pipeline/stages/ast/resolvers/flaskBlueprintResolver.d.ts.map +1 -0
  115. package/dist/src/pipeline/stages/ast/resolvers/flaskBlueprintResolver.js +114 -0
  116. package/dist/src/pipeline/stages/ast/resolvers/mybatisResolver.d.ts +27 -0
  117. package/dist/src/pipeline/stages/ast/resolvers/mybatisResolver.d.ts.map +1 -0
  118. package/dist/src/pipeline/stages/ast/resolvers/mybatisResolver.js +130 -0
  119. package/dist/src/pipeline/stages/ast/resolvers/vuexActionResolver.d.ts +17 -0
  120. package/dist/src/pipeline/stages/ast/resolvers/vuexActionResolver.d.ts.map +1 -0
  121. package/dist/src/pipeline/stages/ast/resolvers/vuexActionResolver.js +80 -0
  122. package/dist/src/pipeline/stages/ast/rulesEnforcer.d.ts +24 -0
  123. package/dist/src/pipeline/stages/ast/rulesEnforcer.d.ts.map +1 -0
  124. package/dist/src/pipeline/stages/ast/rulesEnforcer.js +411 -0
  125. package/dist/src/pipeline/stages/ast/types.d.ts +114 -1
  126. package/dist/src/pipeline/stages/ast/types.d.ts.map +1 -1
  127. package/dist/src/pipeline/stages/merge/conflictDetector.d.ts +2 -0
  128. package/dist/src/pipeline/stages/merge/conflictDetector.d.ts.map +1 -1
  129. package/dist/src/pipeline/stages/merge/conflictDetector.js +54 -2
  130. package/dist/src/pipeline/stages/merge/coverageMappingBuilder.d.ts.map +1 -1
  131. package/dist/src/pipeline/stages/merge/coverageMappingBuilder.js +67 -3
  132. package/dist/src/pipeline/stages/tia/mockBoundaryDetector.d.ts.map +1 -1
  133. package/dist/src/pipeline/stages/tia/mockBoundaryDetector.js +8 -1
  134. package/dist/src/pipeline/stages/tia/parameterizedTestExpander.js +8 -4
  135. package/dist/src/pipeline/stages/tia/testLayerClassifier.d.ts.map +1 -1
  136. package/dist/src/pipeline/stages/tia/testLayerClassifier.js +41 -10
  137. package/dist/src/pipeline/types.d.ts +1 -1
  138. package/dist/src/pipeline/types.d.ts.map +1 -1
  139. package/package.json +3 -3
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Flask Blueprint cross-file resolver (Feature 27)
3
+ *
4
+ * Resolves Flask Blueprint route URLs across files by:
5
+ * 1. Finding all Blueprint() constructor calls → blueprint registry
6
+ * 2. Finding all app.register_blueprint() calls with url_prefix
7
+ * 3. Matching blueprint vars across files via import resolution
8
+ * 4. Composing final URL: url_prefix + route_path
9
+ */
10
+ import type { CrossFileResolver, CrossFileResolutionContext, CrossFileResolutionResult } from '../types';
11
+ import type { DetectedApiFramework } from '../../../../discovery/frameworkDetector';
12
+ export declare class FlaskBlueprintResolver implements CrossFileResolver {
13
+ readonly name = "flask-blueprint";
14
+ appliesTo(frameworks: DetectedApiFramework[]): boolean;
15
+ resolve(ctx: CrossFileResolutionContext): CrossFileResolutionResult;
16
+ }
17
+ //# sourceMappingURL=flaskBlueprintResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flaskBlueprintResolver.d.ts","sourceRoot":"","sources":["../../../../../../src/pipeline/stages/ast/resolvers/flaskBlueprintResolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EAE1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAGpF,qBAAa,sBAAuB,YAAW,iBAAiB;IAC9D,QAAQ,CAAC,IAAI,qBAAqB;IAElC,SAAS,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO;IAItD,OAAO,CAAC,GAAG,EAAE,0BAA0B,GAAG,yBAAyB;CAsGpE"}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ /**
3
+ * Flask Blueprint cross-file resolver (Feature 27)
4
+ *
5
+ * Resolves Flask Blueprint route URLs across files by:
6
+ * 1. Finding all Blueprint() constructor calls → blueprint registry
7
+ * 2. Finding all app.register_blueprint() calls with url_prefix
8
+ * 3. Matching blueprint vars across files via import resolution
9
+ * 4. Composing final URL: url_prefix + route_path
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FlaskBlueprintResolver = void 0;
13
+ class FlaskBlueprintResolver {
14
+ constructor() {
15
+ this.name = 'flask-blueprint';
16
+ }
17
+ appliesTo(frameworks) {
18
+ return frameworks.some((f) => f.name === 'flask' || f.name === 'fastapi');
19
+ }
20
+ resolve(ctx) {
21
+ var _a;
22
+ let entriesAdded = 0;
23
+ const diagnostics = [];
24
+ const unresolvedRefs = [];
25
+ // Step 1: Collect all Blueprint constructor calls (gives us var name → prefix mapping)
26
+ const blueprintVars = new Map();
27
+ // Step 2: Collect all register_blueprint calls (gives us mount points)
28
+ const registerCalls = [];
29
+ // Step 3: Collect all route registrations
30
+ const routesByRegistrar = new Map();
31
+ for (const [filePath, model] of ctx.symbolTable.models) {
32
+ if (!model.routeRegistrations)
33
+ continue;
34
+ for (const reg of model.routeRegistrations) {
35
+ // Blueprint constructor: bp = Blueprint('name', __name__, url_prefix='/api')
36
+ if (!reg.targetModule && !reg.methods) {
37
+ blueprintVars.set(reg.registrarName, {
38
+ prefix: reg.path,
39
+ sourceFile: filePath,
40
+ line: reg.line,
41
+ });
42
+ }
43
+ // register_blueprint call
44
+ if (reg.targetModule) {
45
+ registerCalls.push({
46
+ targetVar: reg.targetModule,
47
+ prefix: reg.path,
48
+ sourceFile: filePath,
49
+ line: reg.line,
50
+ });
51
+ }
52
+ // Route registration (@blueprint.route)
53
+ if (reg.methods) {
54
+ if (!routesByRegistrar.has(reg.registrarName)) {
55
+ routesByRegistrar.set(reg.registrarName, []);
56
+ }
57
+ routesByRegistrar.get(reg.registrarName).push(reg);
58
+ }
59
+ }
60
+ }
61
+ // Step 4: Compose router mounts from register_blueprint calls
62
+ for (const call of registerCalls) {
63
+ // Try to find the Blueprint variable
64
+ const bp = blueprintVars.get(call.targetVar);
65
+ // The final prefix is: register_blueprint url_prefix overrides Blueprint url_prefix
66
+ const finalPrefix = call.prefix || (bp === null || bp === void 0 ? void 0 : bp.prefix) || '';
67
+ if (finalPrefix) {
68
+ const sourceFile = call.sourceFile;
69
+ if (!ctx.symbolTable.routerMounts.has(sourceFile)) {
70
+ ctx.symbolTable.routerMounts.set(sourceFile, []);
71
+ }
72
+ ctx.symbolTable.routerMounts.get(sourceFile).push({
73
+ prefix: finalPrefix,
74
+ targetModulePath: (_a = bp === null || bp === void 0 ? void 0 : bp.sourceFile) !== null && _a !== void 0 ? _a : call.targetVar,
75
+ middleware: [],
76
+ sourceFile,
77
+ line: call.line,
78
+ });
79
+ entriesAdded++;
80
+ }
81
+ else if (!bp) {
82
+ unresolvedRefs.push({
83
+ ref: call.targetVar,
84
+ reason: `Blueprint variable '${call.targetVar}' not found in parsed models`,
85
+ });
86
+ }
87
+ }
88
+ // Step 5: For blueprints with inline url_prefix in the constructor,
89
+ // add them as router mounts even without register_blueprint
90
+ for (const [varName, bp] of blueprintVars) {
91
+ if (bp.prefix) {
92
+ const alreadyRegistered = registerCalls.some((c) => c.targetVar === varName);
93
+ if (!alreadyRegistered) {
94
+ if (!ctx.symbolTable.routerMounts.has(bp.sourceFile)) {
95
+ ctx.symbolTable.routerMounts.set(bp.sourceFile, []);
96
+ }
97
+ ctx.symbolTable.routerMounts.get(bp.sourceFile).push({
98
+ prefix: bp.prefix,
99
+ targetModulePath: bp.sourceFile,
100
+ middleware: [],
101
+ sourceFile: bp.sourceFile,
102
+ line: bp.line,
103
+ });
104
+ entriesAdded++;
105
+ }
106
+ }
107
+ }
108
+ if (blueprintVars.size > 0) {
109
+ diagnostics.push(`Found ${blueprintVars.size} Blueprint(s), ${registerCalls.length} register_blueprint() call(s)`);
110
+ }
111
+ return { entriesAdded, diagnostics, unresolvedRefs };
112
+ }
113
+ }
114
+ exports.FlaskBlueprintResolver = FlaskBlueprintResolver;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * MyBatis cross-file resolver (Feature 27, Sub-PR 5)
3
+ *
4
+ * Links @Mapper interfaces to their MyBatis XML mapper files by matching:
5
+ * - @Mapper interface FQCN ↔ <mapper namespace="..."> in XML
6
+ * - Interface method names ↔ <select id="...">, <insert id="...">, etc.
7
+ */
8
+ import type { CrossFileResolver, CrossFileResolutionContext, CrossFileResolutionResult } from '../types';
9
+ import type { DetectedApiFramework } from '../../../../discovery/frameworkDetector';
10
+ export interface MyBatisBinding {
11
+ /** Java @Mapper interface name (simple name, not FQCN) */
12
+ mapperInterface: string;
13
+ /** File path of the Java @Mapper interface */
14
+ mapperInterfaceFile?: string;
15
+ /** XML namespace (FQCN from <mapper namespace="...">) */
16
+ xmlNamespace: string;
17
+ /** File path of the MyBatis XML mapper */
18
+ xmlFile: string;
19
+ /** Methods defined in the XML */
20
+ xmlMethods: string[];
21
+ }
22
+ export declare class MyBatisResolver implements CrossFileResolver {
23
+ readonly name = "mybatis";
24
+ appliesTo(frameworks: DetectedApiFramework[]): boolean;
25
+ resolve(ctx: CrossFileResolutionContext): CrossFileResolutionResult;
26
+ }
27
+ //# sourceMappingURL=mybatisResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mybatisResolver.d.ts","sourceRoot":"","sources":["../../../../../../src/pipeline/stages/ast/resolvers/mybatisResolver.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAIpF,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,qBAAa,eAAgB,YAAW,iBAAiB;IACvD,QAAQ,CAAC,IAAI,aAAa;IAE1B,SAAS,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO;IAItD,OAAO,CAAC,GAAG,EAAE,0BAA0B,GAAG,yBAAyB;CAmFpE"}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ /**
3
+ * MyBatis cross-file resolver (Feature 27, Sub-PR 5)
4
+ *
5
+ * Links @Mapper interfaces to their MyBatis XML mapper files by matching:
6
+ * - @Mapper interface FQCN ↔ <mapper namespace="..."> in XML
7
+ * - Interface method names ↔ <select id="...">, <insert id="...">, etc.
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.MyBatisResolver = void 0;
44
+ const mybatisXmlParser_1 = require("../../../../languages/java/mybatisXmlParser");
45
+ const fs = __importStar(require("fs"));
46
+ class MyBatisResolver {
47
+ constructor() {
48
+ this.name = 'mybatis';
49
+ }
50
+ appliesTo(frameworks) {
51
+ return frameworks.some((f) => f.name === 'spring-boot');
52
+ }
53
+ resolve(ctx) {
54
+ var _a, _b;
55
+ let entriesAdded = 0;
56
+ const diagnostics = [];
57
+ const unresolvedRefs = [];
58
+ // Collect @Mapper interface files and XML mapper files
59
+ const mapperInterfaces = [];
60
+ const xmlMappers = [];
61
+ // Scan source files for @Mapper annotations
62
+ for (const [filePath, model] of ctx.symbolTable.models) {
63
+ if (!filePath.endsWith('.java') && !filePath.endsWith('.kt'))
64
+ continue;
65
+ // Check if any exported class has @Mapper annotation
66
+ for (const [funcName, func] of model.functions) {
67
+ if ((_a = func.annotations) === null || _a === void 0 ? void 0 : _a.some((a) => a.includes('Mapper'))) {
68
+ // The class containing the @Mapper method
69
+ mapperInterfaces.push({ name: funcName, file: filePath });
70
+ }
71
+ }
72
+ }
73
+ // Check class registry for interfaces that might be @Mapper by naming convention
74
+ for (const [className, classInfo] of ctx.symbolTable.classes) {
75
+ if (className.endsWith('Mapper')) {
76
+ mapperInterfaces.push({ name: className, file: classInfo.filePath });
77
+ }
78
+ }
79
+ // Parse XML mapper files from the project
80
+ for (const filePath of ctx.allSourceFiles) {
81
+ if (!filePath.endsWith('.xml'))
82
+ continue;
83
+ try {
84
+ const content = fs.readFileSync(filePath, 'utf-8');
85
+ if (!(0, mybatisXmlParser_1.isMyBatisMapperXml)(content))
86
+ continue;
87
+ const parsed = (0, mybatisXmlParser_1.parseMyBatisMapper)(content, filePath);
88
+ if (parsed) {
89
+ xmlMappers.push({
90
+ namespace: parsed.namespace,
91
+ file: filePath,
92
+ methods: parsed.queries.map((q) => q.id),
93
+ });
94
+ }
95
+ }
96
+ catch {
97
+ // Skip unreadable XML files
98
+ }
99
+ }
100
+ // Match mapper interfaces to XML files by namespace suffix
101
+ for (const xml of xmlMappers) {
102
+ const simpleName = (_b = xml.namespace.split('.').pop()) !== null && _b !== void 0 ? _b : xml.namespace;
103
+ const matchedInterface = mapperInterfaces.find((m) => m.name === simpleName || xml.namespace.endsWith(m.name));
104
+ if (matchedInterface) {
105
+ // Create interface → implementation mapping
106
+ if (!ctx.symbolTable.interfaceImplementations.has(matchedInterface.file)) {
107
+ ctx.symbolTable.interfaceImplementations.set(matchedInterface.file, []);
108
+ }
109
+ ctx.symbolTable.interfaceImplementations.get(matchedInterface.file).push({
110
+ interfaceName: matchedInterface.name,
111
+ interfaceFile: matchedInterface.file,
112
+ implName: `${simpleName}XmlMapper`,
113
+ implFile: xml.file,
114
+ });
115
+ entriesAdded++;
116
+ }
117
+ else {
118
+ unresolvedRefs.push({
119
+ ref: xml.namespace,
120
+ reason: `No @Mapper interface found for XML namespace '${xml.namespace}'`,
121
+ });
122
+ }
123
+ }
124
+ if (mapperInterfaces.length > 0 || xmlMappers.length > 0) {
125
+ diagnostics.push(`Found ${mapperInterfaces.length} @Mapper interface(s), ${xmlMappers.length} XML mapper(s)`);
126
+ }
127
+ return { entriesAdded, diagnostics, unresolvedRefs };
128
+ }
129
+ }
130
+ exports.MyBatisResolver = MyBatisResolver;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Vuex action cross-file resolver (Feature 27, Sub-PR 8)
3
+ *
4
+ * Resolves Vuex dispatch → action → ApiService → axios → URL chain:
5
+ * 1. Find all this.$store.dispatch('actionName') calls
6
+ * 2. Find the Vuex action definition with that name
7
+ * 3. Follow ApiService.get('resource') calls inside the action
8
+ * 4. Compose full URL from baseURL + resource path
9
+ */
10
+ import type { CrossFileResolver, CrossFileResolutionContext, CrossFileResolutionResult } from '../types';
11
+ import type { DetectedApiFramework } from '../../../../discovery/frameworkDetector';
12
+ export declare class VuexActionResolver implements CrossFileResolver {
13
+ readonly name = "vuex-action";
14
+ appliesTo(frameworks: DetectedApiFramework[]): boolean;
15
+ resolve(ctx: CrossFileResolutionContext): CrossFileResolutionResult;
16
+ }
17
+ //# sourceMappingURL=vuexActionResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vuexActionResolver.d.ts","sourceRoot":"","sources":["../../../../../../src/pipeline/stages/ast/resolvers/vuexActionResolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,qBAAa,kBAAmB,YAAW,iBAAiB;IAC1D,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,SAAS,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO;IAItD,OAAO,CAAC,GAAG,EAAE,0BAA0B,GAAG,yBAAyB;CAgEpE"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * Vuex action cross-file resolver (Feature 27, Sub-PR 8)
4
+ *
5
+ * Resolves Vuex dispatch → action → ApiService → axios → URL chain:
6
+ * 1. Find all this.$store.dispatch('actionName') calls
7
+ * 2. Find the Vuex action definition with that name
8
+ * 3. Follow ApiService.get('resource') calls inside the action
9
+ * 4. Compose full URL from baseURL + resource path
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.VuexActionResolver = void 0;
13
+ class VuexActionResolver {
14
+ constructor() {
15
+ this.name = 'vuex-action';
16
+ }
17
+ appliesTo(frameworks) {
18
+ return frameworks.some((f) => f.name === 'vue');
19
+ }
20
+ resolve(ctx) {
21
+ let entriesAdded = 0;
22
+ const diagnostics = [];
23
+ const unresolvedRefs = [];
24
+ // Collect Vuex store files: files with functions that have API calls (actions)
25
+ const actionFiles = new Map(); // filePath → action function names
26
+ for (const [filePath, model] of ctx.symbolTable.models) {
27
+ const actionNames = [];
28
+ for (const [funcName, func] of model.functions) {
29
+ if (func.bodyHttpCalls.length > 0) {
30
+ actionNames.push(funcName);
31
+ }
32
+ }
33
+ if (actionNames.length > 0) {
34
+ actionFiles.set(filePath, actionNames);
35
+ }
36
+ }
37
+ // Find dispatch calls and link them to actions
38
+ for (const [filePath, model] of ctx.symbolTable.models) {
39
+ for (const [funcName, func] of model.functions) {
40
+ for (const calledFunc of func.calledFunctions) {
41
+ if (!calledFunc.includes('dispatch'))
42
+ continue;
43
+ // Try to match dispatched action name to a known action function
44
+ // dispatch('getArticles') → match to 'getArticles' action in a store file
45
+ // Extract the action name from the dispatch call if possible
46
+ // Since we only have function names from calledFunctions, look for action names
47
+ // across all store files
48
+ for (const [storeFile, actionNames] of actionFiles) {
49
+ if (storeFile === filePath)
50
+ continue; // Don't link a file to itself
51
+ for (const actionName of actionNames) {
52
+ // Check if the current file references this action name
53
+ if (func.calledFunctions.some((f) => f.includes(actionName))) {
54
+ if (!ctx.symbolTable.injectionChains.has(filePath)) {
55
+ ctx.symbolTable.injectionChains.set(filePath, []);
56
+ }
57
+ ctx.symbolTable.injectionChains.get(filePath).push({
58
+ consumerFile: filePath,
59
+ consumerClass: funcName,
60
+ serviceClass: actionName,
61
+ serviceFile: storeFile,
62
+ injectionStyle: 'property',
63
+ });
64
+ entriesAdded++;
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ if (actionFiles.size > 0) {
72
+ diagnostics.push(`Found ${actionFiles.size} Vuex store file(s) with actions`);
73
+ }
74
+ if (entriesAdded > 0) {
75
+ diagnostics.push(`Linked ${entriesAdded} Vuex dispatch→action chain(s)`);
76
+ }
77
+ return { entriesAdded, diagnostics, unresolvedRefs };
78
+ }
79
+ }
80
+ exports.VuexActionResolver = VuexActionResolver;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Structure-agnostic rules enforcer (Feature 27, Sub-PR 9)
3
+ *
4
+ * Validates the 10 behavioral rules (SA01-SA10) after all resolution completes.
5
+ * Emits diagnostics for violations.
6
+ */
7
+ import type { CrossFileSymbolTable } from './types';
8
+ export interface RuleViolation {
9
+ ruleId: string;
10
+ severity: 'error' | 'warning' | 'info';
11
+ message: string;
12
+ filePath?: string;
13
+ line?: number;
14
+ }
15
+ export interface RulesEnforcementResult {
16
+ violations: RuleViolation[];
17
+ rulesChecked: number;
18
+ rulesPassed: number;
19
+ }
20
+ /**
21
+ * Run all SA rules against the resolved symbol table.
22
+ */
23
+ export declare function enforceStructureAgnosticRules(symbolTable: CrossFileSymbolTable, projectRoot: string): RulesEnforcementResult;
24
+ //# sourceMappingURL=rulesEnforcer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rulesEnforcer.d.ts","sourceRoot":"","sources":["../../../../../src/pipeline/stages/ast/rulesEnforcer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,oBAAoB,EACjC,WAAW,EAAE,MAAM,GAClB,sBAAsB,CA0BxB"}