api-tests-coverage 1.0.20 → 1.0.22

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 (561) hide show
  1. package/README.md +3 -7
  2. package/dist/dashboard/assets/{_basePickBy-DZR484hj.js → _basePickBy-DiDMiru0.js} +1 -1
  3. package/dist/dashboard/{dist/assets/_baseUniq-Bwm426M6.js → assets/_baseUniq-CFoKRFhS.js} +1 -1
  4. package/dist/dashboard/{dist/assets/arc-51ef6HeW.js → assets/arc-B2fWu2mo.js} +1 -1
  5. package/dist/dashboard/{dist/assets/architectureDiagram-VXUJARFQ-Boahc5dR.js → assets/architectureDiagram-VXUJARFQ-DpIe4yWB.js} +1 -1
  6. package/dist/dashboard/assets/{blockDiagram-VD42YOAC-BvkiW8lj.js → blockDiagram-VD42YOAC-CKAgfH2X.js} +1 -1
  7. package/dist/dashboard/{dist/assets/c4Diagram-YG6GDRKO-Bww0QPxL.js → assets/c4Diagram-YG6GDRKO-CUtb-R__.js} +1 -1
  8. package/dist/dashboard/assets/channel-B9iMjZmm.js +1 -0
  9. package/dist/dashboard/assets/{chunk-4BX2VUAB-BrU7mtb9.js → chunk-4BX2VUAB-C3CSqwcX.js} +1 -1
  10. package/dist/dashboard/assets/{chunk-55IACEB6-DwsmCNp_.js → chunk-55IACEB6-CV8VzOOp.js} +1 -1
  11. package/dist/dashboard/{dist/assets/chunk-B4BG7PRW-B7YfMggR.js → assets/chunk-B4BG7PRW-URwnN3Q_.js} +1 -1
  12. package/dist/dashboard/{dist/assets/chunk-DI55MBZ5-B-xsiGYI.js → assets/chunk-DI55MBZ5-CV_d-z8j.js} +1 -1
  13. package/dist/dashboard/assets/{chunk-FMBD7UC4-DRb5NEMr.js → chunk-FMBD7UC4-8DJI9OkS.js} +1 -1
  14. package/dist/dashboard/assets/{chunk-QN33PNHL-BRSlHScq.js → chunk-QN33PNHL-pVzUBBoU.js} +1 -1
  15. package/dist/dashboard/assets/{chunk-QZHKN3VN-Cix7nLqx.js → chunk-QZHKN3VN-DCGN273N.js} +1 -1
  16. package/dist/dashboard/assets/{chunk-TZMSLE5B-BtXpcWN4.js → chunk-TZMSLE5B-D0wY-rJ0.js} +1 -1
  17. package/dist/dashboard/assets/classDiagram-2ON5EDUG-BNi5TogT.js +1 -0
  18. package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-BNi5TogT.js +1 -0
  19. package/dist/dashboard/assets/clone-m2eeeKVa.js +1 -0
  20. package/dist/dashboard/{dist/assets/cose-bilkent-S5V4N54A-BUkL7Wtq.js → assets/cose-bilkent-S5V4N54A-BIRyRYk0.js} +1 -1
  21. package/dist/dashboard/assets/{dagre-6UL2VRFP-DgEqrxGj.js → dagre-6UL2VRFP-KVIfxT9V.js} +1 -1
  22. package/dist/dashboard/assets/{diagram-PSM6KHXK-Y-M5J_PO.js → diagram-PSM6KHXK-VUmdxoiM.js} +1 -1
  23. package/dist/dashboard/assets/{diagram-QEK2KX5R-BXMS0hEZ.js → diagram-QEK2KX5R-LQ9k2vBy.js} +1 -1
  24. package/dist/dashboard/{dist/assets/diagram-S2PKOQOG--oRtrIMC.js → assets/diagram-S2PKOQOG-DIDe2of5.js} +1 -1
  25. package/dist/dashboard/{dist/assets/erDiagram-Q2GNP2WA-D0MbudeO.js → assets/erDiagram-Q2GNP2WA-CpMIyDcr.js} +1 -1
  26. package/dist/dashboard/{dist/assets/flowDiagram-NV44I4VS-1j044bLK.js → assets/flowDiagram-NV44I4VS-DR2nUASu.js} +1 -1
  27. package/dist/dashboard/assets/{ganttDiagram-JELNMOA3-Cjy_BOl2.js → ganttDiagram-JELNMOA3-C3J3WvDp.js} +1 -1
  28. package/dist/dashboard/{dist/assets/gitGraphDiagram-V2S2FVAM-CuJ5l3TK.js → assets/gitGraphDiagram-V2S2FVAM-C5V2Xlzu.js} +1 -1
  29. package/dist/dashboard/assets/{graph-BVGuJ5gs.js → graph-GSdi8Xy9.js} +1 -1
  30. package/dist/dashboard/{dist/assets/index-D3sRJga7.js → assets/index-Bhd7ZvcY.js} +82 -82
  31. package/dist/dashboard/assets/{infoDiagram-HS3SLOUP-CxmZGT-4.js → infoDiagram-HS3SLOUP-DVP1dWh4.js} +1 -1
  32. package/dist/dashboard/{dist/assets/journeyDiagram-XKPGCS4Q-8hUcTxo0.js → assets/journeyDiagram-XKPGCS4Q-CNHD7swq.js} +1 -1
  33. package/dist/dashboard/{dist/assets/kanban-definition-3W4ZIXB7-BvWm-0QQ.js → assets/kanban-definition-3W4ZIXB7-C-Jc4Ozy.js} +1 -1
  34. package/dist/dashboard/{dist/assets/layout-BFZ0bRU2.js → assets/layout-B0rNqEfo.js} +1 -1
  35. package/dist/dashboard/assets/{mindmap-definition-VGOIOE7T-BVsYbH_c.js → mindmap-definition-VGOIOE7T-hlQXiFXa.js} +1 -1
  36. package/dist/dashboard/assets/{pieDiagram-ADFJNKIX-BpwMMFZ3.js → pieDiagram-ADFJNKIX-CutZB3jG.js} +1 -1
  37. package/dist/dashboard/{dist/assets/quadrantDiagram-AYHSOK5B-C6NljtBN.js → assets/quadrantDiagram-AYHSOK5B-Bv6m-3mt.js} +1 -1
  38. package/dist/dashboard/{dist/assets/requirementDiagram-UZGBJVZJ-B3VaAf8y.js → assets/requirementDiagram-UZGBJVZJ-BQkld-bF.js} +1 -1
  39. package/dist/dashboard/{dist/assets/sankeyDiagram-TZEHDZUN-2ZhiU1NT.js → assets/sankeyDiagram-TZEHDZUN-DCWiCVGp.js} +1 -1
  40. package/dist/dashboard/assets/{sequenceDiagram-WL72ISMW-nMYJrjDT.js → sequenceDiagram-WL72ISMW-Dq_0SNSh.js} +1 -1
  41. package/dist/dashboard/{dist/assets/stateDiagram-FKZM4ZOC-0Wd-KmOv.js → assets/stateDiagram-FKZM4ZOC-BAd-cwxt.js} +1 -1
  42. package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-DXlj7mrF.js +1 -0
  43. package/dist/dashboard/{dist/assets/timeline-definition-IT6M3QCI-CAmQOjBu.js → assets/timeline-definition-IT6M3QCI-BlMKo2bz.js} +1 -1
  44. package/dist/dashboard/{dist/assets/treemap-GDKQZRPO-CRP-WvE-.js → assets/treemap-GDKQZRPO-Cn6SBC6j.js} +1 -1
  45. package/dist/dashboard/{dist/assets/xychartDiagram-PRI3JC2R-5DoR2_q5.js → assets/xychartDiagram-PRI3JC2R-DlBeMjr8.js} +1 -1
  46. package/dist/dashboard/dist/assets/{_basePickBy-C2jmWITn.js → _basePickBy-BKGHUeDJ.js} +1 -1
  47. package/dist/dashboard/{assets/_baseUniq-BZHS9wTU.js → dist/assets/_baseUniq-CtA-DQF7.js} +1 -1
  48. package/dist/dashboard/dist/assets/{arc-B-Q4nGPT.js → arc-CbXP3Mc9.js} +1 -1
  49. package/dist/dashboard/dist/assets/{architectureDiagram-VXUJARFQ-Bs48s9rH.js → architectureDiagram-VXUJARFQ-n7QxasMM.js} +1 -1
  50. package/dist/dashboard/dist/assets/{blockDiagram-VD42YOAC-BPw-T2eL.js → blockDiagram-VD42YOAC-MXnGwKRn.js} +1 -1
  51. package/dist/dashboard/{assets/c4Diagram-YG6GDRKO-DuP3tG_c.js → dist/assets/c4Diagram-YG6GDRKO-B3yZ5P9k.js} +1 -1
  52. package/dist/dashboard/dist/assets/channel-C7QwX7U8.js +1 -0
  53. package/dist/dashboard/dist/assets/{chunk-4BX2VUAB-B9cIE1K2.js → chunk-4BX2VUAB-Dw3El5KF.js} +1 -1
  54. package/dist/dashboard/dist/assets/{chunk-55IACEB6-BIFhHB94.js → chunk-55IACEB6-T8Jf00IL.js} +1 -1
  55. package/dist/dashboard/dist/assets/{chunk-B4BG7PRW-B3IrqteW.js → chunk-B4BG7PRW-DAJalKYJ.js} +1 -1
  56. package/dist/dashboard/dist/assets/{chunk-DI55MBZ5-B7xHuqZu.js → chunk-DI55MBZ5-p7o_KuDF.js} +1 -1
  57. package/dist/dashboard/dist/assets/{chunk-FMBD7UC4-BBMfQbw1.js → chunk-FMBD7UC4-B0wUAfQR.js} +1 -1
  58. package/dist/dashboard/dist/assets/{chunk-QN33PNHL-BBQ6Q-9S.js → chunk-QN33PNHL-BTFwTEw8.js} +1 -1
  59. package/dist/dashboard/dist/assets/{chunk-QZHKN3VN-9uXt-06K.js → chunk-QZHKN3VN-CNXHnjkC.js} +1 -1
  60. package/dist/dashboard/dist/assets/{chunk-TZMSLE5B-BjDMUc_L.js → chunk-TZMSLE5B-BIVywBYp.js} +1 -1
  61. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-Dkb-G0UK.js +1 -0
  62. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-Dkb-G0UK.js +1 -0
  63. package/dist/dashboard/dist/assets/clone-BSdXhKmH.js +1 -0
  64. package/dist/dashboard/dist/assets/{cose-bilkent-S5V4N54A-DLYZ4dZA.js → cose-bilkent-S5V4N54A-DuALhY5a.js} +1 -1
  65. package/dist/dashboard/dist/assets/{dagre-6UL2VRFP-B8oEROJc.js → dagre-6UL2VRFP-w6endfy9.js} +1 -1
  66. package/dist/dashboard/dist/assets/{diagram-PSM6KHXK-5uki9Dw8.js → diagram-PSM6KHXK-BDnUwPQC.js} +1 -1
  67. package/dist/dashboard/dist/assets/{diagram-QEK2KX5R-BRNhmby2.js → diagram-QEK2KX5R-Cbb7ctAo.js} +1 -1
  68. package/dist/dashboard/{assets/diagram-S2PKOQOG-Bk_jyoxg.js → dist/assets/diagram-S2PKOQOG-76ascveh.js} +1 -1
  69. package/dist/dashboard/dist/assets/{erDiagram-Q2GNP2WA-BbPQp6RA.js → erDiagram-Q2GNP2WA-BQQnVF0J.js} +1 -1
  70. package/dist/dashboard/dist/assets/{flowDiagram-NV44I4VS-BAHshMEg.js → flowDiagram-NV44I4VS-dKukiSxD.js} +1 -1
  71. package/dist/dashboard/dist/assets/{ganttDiagram-JELNMOA3-BS4JnN-M.js → ganttDiagram-JELNMOA3-BqnazZuZ.js} +1 -1
  72. package/dist/dashboard/{assets/gitGraphDiagram-V2S2FVAM-RgQMxxaQ.js → dist/assets/gitGraphDiagram-V2S2FVAM-BUFcnXCj.js} +1 -1
  73. package/dist/dashboard/dist/assets/{graph-CD7-npU0.js → graph-CGQIvL3r.js} +1 -1
  74. package/dist/dashboard/dist/assets/index-CadOHtae.css +1 -0
  75. package/dist/dashboard/dist/assets/{index-D3_88Gr5.js → index-DwqfA4mc.js} +115 -115
  76. package/dist/dashboard/dist/assets/{infoDiagram-HS3SLOUP-BMp4C5wf.js → infoDiagram-HS3SLOUP-BdylFPLI.js} +1 -1
  77. package/dist/dashboard/{assets/journeyDiagram-XKPGCS4Q-CdvZAxeA.js → dist/assets/journeyDiagram-XKPGCS4Q-BzJTBkhp.js} +1 -1
  78. package/dist/dashboard/{assets/kanban-definition-3W4ZIXB7-DTse5xX8.js → dist/assets/kanban-definition-3W4ZIXB7-StKomgio.js} +1 -1
  79. package/dist/dashboard/dist/assets/{layout-6njVG9Ld.js → layout-BnsX73QS.js} +1 -1
  80. package/dist/dashboard/dist/assets/{mindmap-definition-VGOIOE7T-B7wYeLe1.js → mindmap-definition-VGOIOE7T-HqFRhVFX.js} +1 -1
  81. package/dist/dashboard/dist/assets/{pieDiagram-ADFJNKIX-5pSPRGJ2.js → pieDiagram-ADFJNKIX-2I2tFH0C.js} +1 -1
  82. package/dist/dashboard/{assets/quadrantDiagram-AYHSOK5B-C6NljtBN.js → dist/assets/quadrantDiagram-AYHSOK5B-PlELkdBW.js} +1 -1
  83. package/dist/dashboard/{assets/requirementDiagram-UZGBJVZJ-Ban4o6oK.js → dist/assets/requirementDiagram-UZGBJVZJ-_9eLQNcZ.js} +1 -1
  84. package/dist/dashboard/dist/assets/{sankeyDiagram-TZEHDZUN-BDImwZtB.js → sankeyDiagram-TZEHDZUN-DHl1Ss7O.js} +1 -1
  85. package/dist/dashboard/dist/assets/{sequenceDiagram-WL72ISMW-1d8_kyI3.js → sequenceDiagram-WL72ISMW-B9p0m3Uf.js} +1 -1
  86. package/dist/dashboard/dist/assets/{stateDiagram-FKZM4ZOC-BWqoDymf.js → stateDiagram-FKZM4ZOC--rpDODjT.js} +1 -1
  87. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-Ca9uGk46.js +1 -0
  88. package/dist/dashboard/dist/assets/{timeline-definition-IT6M3QCI-CBR9kqeJ.js → timeline-definition-IT6M3QCI-BCHaGBHB.js} +1 -1
  89. package/dist/dashboard/{assets/treemap-GDKQZRPO-D-XpcCUD.js → dist/assets/treemap-GDKQZRPO-CgiqDY8M.js} +1 -1
  90. package/dist/dashboard/dist/assets/{xychartDiagram-PRI3JC2R-7aSkQtVu.js → xychartDiagram-PRI3JC2R-BMvBBbeV.js} +1 -1
  91. package/dist/dashboard/dist/index.html +2 -2
  92. package/dist/dashboard/dist/reports/coverage-summary.json +848 -616
  93. package/dist/dashboard/index.html +2 -2
  94. package/dist/src/config/defaultConfig.d.ts.map +1 -1
  95. package/dist/src/config/defaultConfig.js +0 -37
  96. package/dist/src/config/types.d.ts +0 -42
  97. package/dist/src/config/types.d.ts.map +1 -1
  98. package/dist/src/config/validateConfig.d.ts.map +1 -1
  99. package/dist/src/config/validateConfig.js +0 -3
  100. package/dist/src/discovery/fileClassifier.d.ts.map +1 -1
  101. package/dist/src/discovery/fileClassifier.js +16 -15
  102. package/dist/src/discovery/projectDiscovery.d.ts.map +1 -1
  103. package/dist/src/discovery/projectDiscovery.js +1 -4
  104. package/dist/src/generation/context-builder.d.ts +3 -13
  105. package/dist/src/generation/context-builder.d.ts.map +1 -1
  106. package/dist/src/generation/context-builder.js +151 -119
  107. package/dist/src/generation/engine.d.ts +34 -13
  108. package/dist/src/generation/engine.d.ts.map +1 -1
  109. package/dist/src/generation/engine.js +317 -143
  110. package/dist/src/generation/file-router.d.ts +4 -5
  111. package/dist/src/generation/file-router.d.ts.map +1 -1
  112. package/dist/src/generation/file-router.js +39 -58
  113. package/dist/src/generation/gap-extractor.d.ts +9 -4
  114. package/dist/src/generation/gap-extractor.d.ts.map +1 -1
  115. package/dist/src/generation/gap-extractor.js +230 -240
  116. package/dist/src/generation/template-renderer.d.ts +9 -11
  117. package/dist/src/generation/template-renderer.d.ts.map +1 -1
  118. package/dist/src/generation/template-renderer.js +499 -519
  119. package/dist/src/generation/types.d.ts +48 -244
  120. package/dist/src/generation/types.d.ts.map +1 -1
  121. package/dist/src/generation/types.js +0 -4
  122. package/dist/src/index.js +247 -254
  123. package/dist/src/inference/businessRuleInference.d.ts.map +1 -1
  124. package/dist/src/inference/businessRuleInference.js +0 -95
  125. package/dist/src/inference/integrationFlowInference.d.ts +1 -11
  126. package/dist/src/inference/integrationFlowInference.d.ts.map +1 -1
  127. package/dist/src/inference/integrationFlowInference.js +2 -49
  128. package/dist/src/inference/routeInference.d.ts.map +1 -1
  129. package/dist/src/inference/routeInference.js +8 -54
  130. package/dist/src/languages/java/semanticBuilder.d.ts.map +1 -1
  131. package/dist/src/languages/java/semanticBuilder.js +12 -69
  132. package/dist/src/languages/javascript/angularDetector.d.ts.map +1 -1
  133. package/dist/src/languages/javascript/angularDetector.js +17 -50
  134. package/dist/src/languages/javascript/assertionResolver.js +4 -6
  135. package/dist/src/languages/javascript/hapiDetector.d.ts.map +1 -1
  136. package/dist/src/languages/javascript/hapiDetector.js +5 -48
  137. package/dist/src/languages/javascript/vueDetector.d.ts +0 -2
  138. package/dist/src/languages/javascript/vueDetector.d.ts.map +1 -1
  139. package/dist/src/languages/javascript/vueDetector.js +0 -22
  140. package/dist/src/languages/python/index.d.ts +1 -1
  141. package/dist/src/languages/python/index.d.ts.map +1 -1
  142. package/dist/src/languages/python/index.js +3 -33
  143. package/dist/src/pipeline/confidence.d.ts +1 -6
  144. package/dist/src/pipeline/confidence.d.ts.map +1 -1
  145. package/dist/src/pipeline/confidence.js +3 -8
  146. package/dist/src/pipeline/detectors/expressMiddlewareDetector.d.ts +21 -0
  147. package/dist/src/pipeline/detectors/expressMiddlewareDetector.d.ts.map +1 -0
  148. package/dist/src/pipeline/detectors/expressMiddlewareDetector.js +201 -0
  149. package/dist/src/pipeline/detectors/flaskBlueprintDetector.d.ts +23 -0
  150. package/dist/src/pipeline/detectors/flaskBlueprintDetector.d.ts.map +1 -0
  151. package/dist/src/pipeline/detectors/flaskBlueprintDetector.js +263 -0
  152. package/dist/src/pipeline/detectors/springDddDetector.d.ts +23 -0
  153. package/dist/src/pipeline/detectors/springDddDetector.d.ts.map +1 -0
  154. package/dist/src/pipeline/detectors/springDddDetector.js +237 -0
  155. package/dist/src/pipeline/detectors/types.d.ts +97 -0
  156. package/dist/src/pipeline/detectors/types.d.ts.map +1 -0
  157. package/dist/src/pipeline/detectors/types.js +15 -0
  158. package/dist/src/pipeline/graph.d.ts.map +1 -1
  159. package/dist/src/pipeline/graph.js +4 -16
  160. package/dist/src/pipeline/stages/ast/astStage.d.ts.map +1 -1
  161. package/dist/src/pipeline/stages/ast/astStage.js +2 -46
  162. package/dist/src/pipeline/stages/ast/baseUrlComposer.d.ts.map +1 -1
  163. package/dist/src/pipeline/stages/ast/baseUrlComposer.js +4 -18
  164. package/dist/src/pipeline/stages/ast/crossFileResolver.js +0 -29
  165. package/dist/src/pipeline/stages/ast/graphBuilder.d.ts.map +1 -1
  166. package/dist/src/pipeline/stages/ast/graphBuilder.js +0 -81
  167. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.d.ts +1 -3
  168. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.d.ts.map +1 -1
  169. package/dist/src/pipeline/stages/ast/optionalAuthUnifier.js +14 -34
  170. package/dist/src/pipeline/stages/ast/resolvers/angularInjectionResolver.d.ts.map +1 -1
  171. package/dist/src/pipeline/stages/ast/resolvers/angularInjectionResolver.js +3 -22
  172. package/dist/src/pipeline/stages/ast/resolvers/dddLayerResolver.d.ts.map +1 -1
  173. package/dist/src/pipeline/stages/ast/resolvers/dddLayerResolver.js +28 -104
  174. package/dist/src/pipeline/stages/ast/resolvers/mybatisResolver.d.ts.map +1 -1
  175. package/dist/src/pipeline/stages/ast/resolvers/mybatisResolver.js +0 -56
  176. package/dist/src/pipeline/stages/ast/resolvers/vuexActionResolver.d.ts.map +1 -1
  177. package/dist/src/pipeline/stages/ast/resolvers/vuexActionResolver.js +18 -43
  178. package/dist/src/pipeline/stages/ast/rulesEnforcer.d.ts.map +1 -1
  179. package/dist/src/pipeline/stages/ast/rulesEnforcer.js +45 -336
  180. package/dist/src/pipeline/stages/merge/conflictDetector.d.ts +0 -2
  181. package/dist/src/pipeline/stages/merge/conflictDetector.d.ts.map +1 -1
  182. package/dist/src/pipeline/stages/merge/conflictDetector.js +2 -54
  183. package/dist/src/pipeline/stages/merge/coverageMappingBuilder.d.ts.map +1 -1
  184. package/dist/src/pipeline/stages/merge/coverageMappingBuilder.js +3 -67
  185. package/dist/src/pipeline/stages/tia/mockBoundaryDetector.d.ts.map +1 -1
  186. package/dist/src/pipeline/stages/tia/mockBoundaryDetector.js +1 -8
  187. package/dist/src/pipeline/stages/tia/parameterizedTestExpander.js +4 -8
  188. package/dist/src/pipeline/stages/tia/testLayerClassifier.d.ts.map +1 -1
  189. package/dist/src/pipeline/stages/tia/testLayerClassifier.js +10 -36
  190. package/dist/src/pipeline/types.d.ts +1 -1
  191. package/dist/src/pipeline/types.d.ts.map +1 -1
  192. package/dist/src/reporting.d.ts.map +1 -1
  193. package/dist/src/reporting.js +2 -1
  194. package/dist/src/streaming/detectors/eventBridgeDetector.d.ts +5 -0
  195. package/dist/src/streaming/detectors/eventBridgeDetector.d.ts.map +1 -0
  196. package/dist/src/streaming/detectors/eventBridgeDetector.js +82 -0
  197. package/dist/src/streaming/detectors/kafkaDetector.d.ts +5 -0
  198. package/dist/src/streaming/detectors/kafkaDetector.d.ts.map +1 -0
  199. package/dist/src/streaming/detectors/kafkaDetector.js +97 -0
  200. package/dist/src/streaming/detectors/natsDetector.d.ts +5 -0
  201. package/dist/src/streaming/detectors/natsDetector.d.ts.map +1 -0
  202. package/dist/src/streaming/detectors/natsDetector.js +96 -0
  203. package/dist/src/streaming/detectors/pubsubDetector.d.ts +5 -0
  204. package/dist/src/streaming/detectors/pubsubDetector.d.ts.map +1 -0
  205. package/dist/src/streaming/detectors/pubsubDetector.js +82 -0
  206. package/dist/src/streaming/detectors/rabbitmqDetector.d.ts +5 -0
  207. package/dist/src/streaming/detectors/rabbitmqDetector.d.ts.map +1 -0
  208. package/dist/src/streaming/detectors/rabbitmqDetector.js +103 -0
  209. package/dist/src/streaming/detectors/redisPubsubDetector.d.ts +5 -0
  210. package/dist/src/streaming/detectors/redisPubsubDetector.d.ts.map +1 -0
  211. package/dist/src/streaming/detectors/redisPubsubDetector.js +81 -0
  212. package/dist/src/streaming/detectors/snsDetector.d.ts +5 -0
  213. package/dist/src/streaming/detectors/snsDetector.d.ts.map +1 -0
  214. package/dist/src/streaming/detectors/snsDetector.js +81 -0
  215. package/dist/src/streaming/detectors/sqsDetector.d.ts +5 -0
  216. package/dist/src/streaming/detectors/sqsDetector.d.ts.map +1 -0
  217. package/dist/src/streaming/detectors/sqsDetector.js +81 -0
  218. package/dist/src/streaming/eventCoverage.d.ts +46 -0
  219. package/dist/src/streaming/eventCoverage.d.ts.map +1 -0
  220. package/dist/src/streaming/eventCoverage.js +270 -0
  221. package/dist/src/streaming/types.d.ts +34 -0
  222. package/dist/src/streaming/types.d.ts.map +1 -0
  223. package/dist/src/streaming/types.js +2 -0
  224. package/dist/src/summary/markdownRenderer.d.ts.map +1 -1
  225. package/dist/src/summary/markdownRenderer.js +1 -0
  226. package/dist/src/summary/summaryTypes.d.ts.map +1 -1
  227. package/dist/src/summary/summaryTypes.js +1 -0
  228. package/package.json +3 -3
  229. package/dist/dashboard/assets/arc-D4xT0thw.js +0 -1
  230. package/dist/dashboard/assets/architectureDiagram-VXUJARFQ-Bs48s9rH.js +0 -36
  231. package/dist/dashboard/assets/channel-YFEOkJua.js +0 -1
  232. package/dist/dashboard/assets/chunk-B4BG7PRW-D5WlZonc.js +0 -165
  233. package/dist/dashboard/assets/chunk-DI55MBZ5-B-xsiGYI.js +0 -220
  234. package/dist/dashboard/assets/classDiagram-2ON5EDUG-CE9rmEXI.js +0 -1
  235. package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-CE9rmEXI.js +0 -1
  236. package/dist/dashboard/assets/clone-BAVNftx6.js +0 -1
  237. package/dist/dashboard/assets/cose-bilkent-S5V4N54A-DrNDePwE.js +0 -1
  238. package/dist/dashboard/assets/erDiagram-Q2GNP2WA-BbPQp6RA.js +0 -60
  239. package/dist/dashboard/assets/flowDiagram-NV44I4VS-1j044bLK.js +0 -162
  240. package/dist/dashboard/assets/index-Bt72YjAZ.css +0 -1
  241. package/dist/dashboard/assets/index-DuT2LnIf.js +0 -523
  242. package/dist/dashboard/assets/layout-CnKzeCpQ.js +0 -1
  243. package/dist/dashboard/assets/sankeyDiagram-TZEHDZUN-BDImwZtB.js +0 -10
  244. package/dist/dashboard/assets/stateDiagram-FKZM4ZOC-DkBAMCJV.js +0 -1
  245. package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-CtkfyoSn.js +0 -1
  246. package/dist/dashboard/assets/timeline-definition-IT6M3QCI-CGUDCWFx.js +0 -61
  247. package/dist/dashboard/assets/xychartDiagram-PRI3JC2R-BlIpbwyn.js +0 -7
  248. package/dist/dashboard/dist/assets/_basePickBy-CErN2e4K.js +0 -1
  249. package/dist/dashboard/dist/assets/_basePickBy-CYB1KXah.js +0 -1
  250. package/dist/dashboard/dist/assets/_basePickBy-D4ml7gdd.js +0 -1
  251. package/dist/dashboard/dist/assets/_basePickBy-D7SXdoHL.js +0 -1
  252. package/dist/dashboard/dist/assets/_basePickBy-DUQHbXda.js +0 -1
  253. package/dist/dashboard/dist/assets/_basePickBy-DZR484hj.js +0 -1
  254. package/dist/dashboard/dist/assets/_basePickBy-_zJIZmFM.js +0 -1
  255. package/dist/dashboard/dist/assets/_baseUniq-BZHS9wTU.js +0 -1
  256. package/dist/dashboard/dist/assets/_baseUniq-BzwtoVZI.js +0 -1
  257. package/dist/dashboard/dist/assets/_baseUniq-C2oBAxY3.js +0 -1
  258. package/dist/dashboard/dist/assets/_baseUniq-CUKBQ2bc.js +0 -1
  259. package/dist/dashboard/dist/assets/_baseUniq-Ct8XEXnH.js +0 -1
  260. package/dist/dashboard/dist/assets/_baseUniq-DE6cyzJb.js +0 -1
  261. package/dist/dashboard/dist/assets/_baseUniq-DzHorfx6.js +0 -1
  262. package/dist/dashboard/dist/assets/arc-B7p8x22e.js +0 -1
  263. package/dist/dashboard/dist/assets/arc-BDOeMmjX.js +0 -1
  264. package/dist/dashboard/dist/assets/arc-BaDRUN_n.js +0 -1
  265. package/dist/dashboard/dist/assets/arc-CjFGY63A.js +0 -1
  266. package/dist/dashboard/dist/assets/arc-D4xT0thw.js +0 -1
  267. package/dist/dashboard/dist/assets/arc-g03p1JXB.js +0 -1
  268. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-BUdFGrlT.js +0 -36
  269. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-CLCqS7Lv.js +0 -36
  270. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-C_5dqWCI.js +0 -36
  271. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-WnVycqnT.js +0 -36
  272. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-mH7lInv5.js +0 -36
  273. package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-wVr1_uNB.js +0 -36
  274. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-BBXc88fn.js +0 -122
  275. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-BvkiW8lj.js +0 -122
  276. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-CavSRNuP.js +0 -122
  277. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-D-TzNNzc.js +0 -122
  278. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-DK0YAM7_.js +0 -122
  279. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-DbGIO6Kt.js +0 -122
  280. package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-V4vxrfzX.js +0 -122
  281. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-Bs4R4b6P.js +0 -10
  282. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-BsgzPfQ3.js +0 -10
  283. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-CAFpcejP.js +0 -10
  284. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-DVnWnYOL.js +0 -10
  285. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-DuP3tG_c.js +0 -10
  286. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-ZEVciqTW.js +0 -10
  287. package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-w18S5AEN.js +0 -10
  288. package/dist/dashboard/dist/assets/channel-BSnIwwuG.js +0 -1
  289. package/dist/dashboard/dist/assets/channel-BgeGdqQG.js +0 -1
  290. package/dist/dashboard/dist/assets/channel-CyXkK5KC.js +0 -1
  291. package/dist/dashboard/dist/assets/channel-D5Cq9giL.js +0 -1
  292. package/dist/dashboard/dist/assets/channel-DbeZpf5T.js +0 -1
  293. package/dist/dashboard/dist/assets/channel-Di9el3wE.js +0 -1
  294. package/dist/dashboard/dist/assets/channel-YFEOkJua.js +0 -1
  295. package/dist/dashboard/dist/assets/channel-psxgcQ_j.js +0 -1
  296. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-BDYDsvGv.js +0 -1
  297. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-BF8loPLD.js +0 -1
  298. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-BrU7mtb9.js +0 -1
  299. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-CSJ8KLGx.js +0 -1
  300. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-DY1boKsq.js +0 -1
  301. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-IN53WLTx.js +0 -1
  302. package/dist/dashboard/dist/assets/chunk-4BX2VUAB-oleArqPu.js +0 -1
  303. package/dist/dashboard/dist/assets/chunk-55IACEB6-BSL35gyW.js +0 -1
  304. package/dist/dashboard/dist/assets/chunk-55IACEB6-BzCzmNUn.js +0 -1
  305. package/dist/dashboard/dist/assets/chunk-55IACEB6-C3HNF-UF.js +0 -1
  306. package/dist/dashboard/dist/assets/chunk-55IACEB6-CiEoroXY.js +0 -1
  307. package/dist/dashboard/dist/assets/chunk-55IACEB6-DV6VmXIy.js +0 -1
  308. package/dist/dashboard/dist/assets/chunk-55IACEB6-DwsmCNp_.js +0 -1
  309. package/dist/dashboard/dist/assets/chunk-55IACEB6-kJkjQYxk.js +0 -1
  310. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-BChq1Wly.js +0 -165
  311. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-BiYJ9gu_.js +0 -165
  312. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-CCMwwYCe.js +0 -165
  313. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-D5WlZonc.js +0 -165
  314. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-eTDXrKrv.js +0 -165
  315. package/dist/dashboard/dist/assets/chunk-B4BG7PRW-wQ6TCEMq.js +0 -165
  316. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-BD9C9H7Y.js +0 -220
  317. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-BTfzxsg4.js +0 -220
  318. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-CSRqV3_6.js +0 -220
  319. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-D7eiRvhB.js +0 -220
  320. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-DfslhtXS.js +0 -220
  321. package/dist/dashboard/dist/assets/chunk-DI55MBZ5-M-8I3jEy.js +0 -220
  322. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-BgEzYy_c.js +0 -15
  323. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-CtTcDWZJ.js +0 -15
  324. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-CyF99olo.js +0 -15
  325. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-DRb5NEMr.js +0 -15
  326. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-K3PC79JF.js +0 -15
  327. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-V0V2L4Gq.js +0 -15
  328. package/dist/dashboard/dist/assets/chunk-FMBD7UC4-bSA0XiS0.js +0 -15
  329. package/dist/dashboard/dist/assets/chunk-QN33PNHL-BNX7uRa_.js +0 -1
  330. package/dist/dashboard/dist/assets/chunk-QN33PNHL-BRSlHScq.js +0 -1
  331. package/dist/dashboard/dist/assets/chunk-QN33PNHL-BrOIYUBs.js +0 -1
  332. package/dist/dashboard/dist/assets/chunk-QN33PNHL-CCuhlE1C.js +0 -1
  333. package/dist/dashboard/dist/assets/chunk-QN33PNHL-CmeZ1h1Z.js +0 -1
  334. package/dist/dashboard/dist/assets/chunk-QN33PNHL-DFgUs0T8.js +0 -1
  335. package/dist/dashboard/dist/assets/chunk-QN33PNHL-JcQZ0Q-Q.js +0 -1
  336. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-Cix7nLqx.js +0 -1
  337. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-CliaQGD4.js +0 -1
  338. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-Cyg7Km90.js +0 -1
  339. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-DKgOcPif.js +0 -1
  340. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-MNv3v4He.js +0 -1
  341. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-T5hoQANf.js +0 -1
  342. package/dist/dashboard/dist/assets/chunk-QZHKN3VN-mq-zucvn.js +0 -1
  343. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-BoJFBewj.js +0 -1
  344. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-BtXpcWN4.js +0 -1
  345. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-C8KNXDi7.js +0 -1
  346. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-CyhcxGB1.js +0 -1
  347. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-DGTVcqTS.js +0 -1
  348. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-DqMNcR7I.js +0 -1
  349. package/dist/dashboard/dist/assets/chunk-TZMSLE5B-F1fppg7C.js +0 -1
  350. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-AMwn99HP.js +0 -1
  351. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-BbkwHRko.js +0 -1
  352. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-Be0F7AG8.js +0 -1
  353. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-BkGN4Cpz.js +0 -1
  354. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-CE9rmEXI.js +0 -1
  355. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-CM6Qs-Qs.js +0 -1
  356. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-D3VDjeKC.js +0 -1
  357. package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-o8p5Y0H9.js +0 -1
  358. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-AMwn99HP.js +0 -1
  359. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-BbkwHRko.js +0 -1
  360. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-Be0F7AG8.js +0 -1
  361. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-BkGN4Cpz.js +0 -1
  362. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-CE9rmEXI.js +0 -1
  363. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-CM6Qs-Qs.js +0 -1
  364. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-D3VDjeKC.js +0 -1
  365. package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-o8p5Y0H9.js +0 -1
  366. package/dist/dashboard/dist/assets/clone-B5PF81Z3.js +0 -1
  367. package/dist/dashboard/dist/assets/clone-BAVNftx6.js +0 -1
  368. package/dist/dashboard/dist/assets/clone-BmpQ0ely.js +0 -1
  369. package/dist/dashboard/dist/assets/clone-CKIuLE_W.js +0 -1
  370. package/dist/dashboard/dist/assets/clone-Cv0cxIIi.js +0 -1
  371. package/dist/dashboard/dist/assets/clone-Cvq8JuOb.js +0 -1
  372. package/dist/dashboard/dist/assets/clone-DEYRVSAn.js +0 -1
  373. package/dist/dashboard/dist/assets/clone-KEkbvJY9.js +0 -1
  374. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-DMGRGhwB.js +0 -1
  375. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-DrNDePwE.js +0 -1
  376. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-GjySlYac.js +0 -1
  377. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-UX3RfzXW.js +0 -1
  378. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-YL9kFxCl.js +0 -1
  379. package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-xVw-THr_.js +0 -1
  380. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-BO79zHpJ.js +0 -4
  381. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-Bjadb8g_.js +0 -4
  382. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-CJT7lofP.js +0 -4
  383. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-CUx6EwnW.js +0 -4
  384. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-D03qnh38.js +0 -4
  385. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-DgEqrxGj.js +0 -4
  386. package/dist/dashboard/dist/assets/dagre-6UL2VRFP-NZWnQN_Y.js +0 -4
  387. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-BPFtplp4.js +0 -24
  388. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-BgOmComt.js +0 -24
  389. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-DGtyS7lD.js +0 -24
  390. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-D__FKIzE.js +0 -24
  391. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-DtE0cTIs.js +0 -24
  392. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-JEfxbZj6.js +0 -24
  393. package/dist/dashboard/dist/assets/diagram-PSM6KHXK-Y-M5J_PO.js +0 -24
  394. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-1hjfopmw.js +0 -43
  395. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-BHyZd544.js +0 -43
  396. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-BXMS0hEZ.js +0 -43
  397. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-BtOA2yYh.js +0 -43
  398. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-CSCGZUfr.js +0 -43
  399. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-CYK-aLR5.js +0 -43
  400. package/dist/dashboard/dist/assets/diagram-QEK2KX5R-CYxueP7U.js +0 -43
  401. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-Bk_jyoxg.js +0 -24
  402. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-CRUXUQeh.js +0 -24
  403. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-CzytkAcm.js +0 -24
  404. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-D-ku_X8U.js +0 -24
  405. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-DdqZVGN1.js +0 -24
  406. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-Gj3ANjIG.js +0 -24
  407. package/dist/dashboard/dist/assets/diagram-S2PKOQOG-qvXlTDud.js +0 -24
  408. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DDk1KpRF.js +0 -60
  409. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DGl6gPe2.js +0 -60
  410. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DSC5VPcF.js +0 -60
  411. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DZpjLrp5.js +0 -60
  412. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-Dhb_VQMS.js +0 -60
  413. package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DvI8ycM6.js +0 -60
  414. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-CBnhpWKd.js +0 -162
  415. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-CYXUqE3L.js +0 -162
  416. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-Co89qYBD.js +0 -162
  417. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-DRAD4OG7.js +0 -162
  418. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-PVleScVK.js +0 -162
  419. package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-gKUH-GJ2.js +0 -162
  420. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-2r3WpWQC.js +0 -267
  421. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-BA65eVi0.js +0 -267
  422. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-Cjy_BOl2.js +0 -267
  423. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-CsUMU5Ws.js +0 -267
  424. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-DK_45K6s.js +0 -267
  425. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-DX-lROHt.js +0 -267
  426. package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-Dm_lLo9y.js +0 -267
  427. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-C9NpbucY.js +0 -65
  428. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-CWo2OK69.js +0 -65
  429. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-DM9AW1aP.js +0 -65
  430. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-DYrdM8tK.js +0 -65
  431. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-RgQMxxaQ.js +0 -65
  432. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-Uz3nRdju.js +0 -65
  433. package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-bYKe_efj.js +0 -65
  434. package/dist/dashboard/dist/assets/graph-BP2ns4se.js +0 -1
  435. package/dist/dashboard/dist/assets/graph-BVGuJ5gs.js +0 -1
  436. package/dist/dashboard/dist/assets/graph-Clj85F2M.js +0 -1
  437. package/dist/dashboard/dist/assets/graph-CpRVMcWW.js +0 -1
  438. package/dist/dashboard/dist/assets/graph-Cwn7jgQS.js +0 -1
  439. package/dist/dashboard/dist/assets/graph-ZtgwAPQj.js +0 -1
  440. package/dist/dashboard/dist/assets/graph-gV0gk5Dq.js +0 -1
  441. package/dist/dashboard/dist/assets/index-Bt72YjAZ.css +0 -1
  442. package/dist/dashboard/dist/assets/index-ByH_nEhG.js +0 -523
  443. package/dist/dashboard/dist/assets/index-C302ingQ.css +0 -1
  444. package/dist/dashboard/dist/assets/index-CqEIqNus.js +0 -781
  445. package/dist/dashboard/dist/assets/index-D-AtVpd2.js +0 -523
  446. package/dist/dashboard/dist/assets/index-DEXwnExZ.js +0 -523
  447. package/dist/dashboard/dist/assets/index-DbUdNJca.js +0 -781
  448. package/dist/dashboard/dist/assets/index-DuT2LnIf.js +0 -523
  449. package/dist/dashboard/dist/assets/index-xecKLQ58.css +0 -1
  450. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-BjChBCME.js +0 -2
  451. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-BxoN3QPh.js +0 -2
  452. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-CxmZGT-4.js +0 -2
  453. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-D3SFXNAS.js +0 -2
  454. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-DyT5Fs8R.js +0 -2
  455. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-HLwGZBHJ.js +0 -2
  456. package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-ujnMqVz3.js +0 -2
  457. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-BC0GSZ7W.js +0 -139
  458. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-Bv1IeJ8A.js +0 -139
  459. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-CFgbI9OH.js +0 -139
  460. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-CdvZAxeA.js +0 -139
  461. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-CiMM9buE.js +0 -139
  462. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-DQzfeBIo.js +0 -139
  463. package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-nYZBlgTD.js +0 -139
  464. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-AkiB-BRk.js +0 -89
  465. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-BjYw_9v5.js +0 -89
  466. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-COTfX74l.js +0 -89
  467. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-D3u5Ov-5.js +0 -89
  468. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-D6aRd_q1.js +0 -89
  469. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-DTse5xX8.js +0 -89
  470. package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-ueIaoeks.js +0 -89
  471. package/dist/dashboard/dist/assets/layout-B1fTYUMj.js +0 -1
  472. package/dist/dashboard/dist/assets/layout-BbJNDkTr.js +0 -1
  473. package/dist/dashboard/dist/assets/layout-BwmMaJCx.js +0 -1
  474. package/dist/dashboard/dist/assets/layout-CnKzeCpQ.js +0 -1
  475. package/dist/dashboard/dist/assets/layout-DgtRACDS.js +0 -1
  476. package/dist/dashboard/dist/assets/layout-JbkTCGhr.js +0 -1
  477. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-B93XW27v.js +0 -68
  478. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-BJ5xCmsL.js +0 -68
  479. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-BVsYbH_c.js +0 -68
  480. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-CkyYtMaD.js +0 -68
  481. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-CmcASbkx.js +0 -68
  482. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-D001Ygrx.js +0 -68
  483. package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-QDZ_z8OE.js +0 -68
  484. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-9G1tEuaq.js +0 -30
  485. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-BIOVbZG_.js +0 -30
  486. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-Bf8vKEOf.js +0 -30
  487. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-BpwMMFZ3.js +0 -30
  488. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-DOXOzepj.js +0 -30
  489. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-EeNihpUP.js +0 -30
  490. package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-uWFQFMEe.js +0 -30
  491. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-Bwppivuy.js +0 -7
  492. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-CM8qiFLR.js +0 -7
  493. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-Crgu5WqK.js +0 -7
  494. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-CtbMtM_F.js +0 -7
  495. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-i3-JTN3e.js +0 -7
  496. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-jDtdB4Ws.js +0 -7
  497. package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-o21Z8BWo.js +0 -7
  498. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-Ban4o6oK.js +0 -64
  499. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-BfAcJrqc.js +0 -64
  500. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-CgXxZ2rH.js +0 -64
  501. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-ClNSNeYe.js +0 -64
  502. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-DPTtP4Ve.js +0 -64
  503. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-Dw260IiT.js +0 -64
  504. package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-WIJ0qiJG.js +0 -64
  505. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-BFNTuDV7.js +0 -10
  506. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-Cb4WB9UB.js +0 -10
  507. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-D2OGoxU5.js +0 -10
  508. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-DEVTdH0h.js +0 -10
  509. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-LR8T4Hv0.js +0 -10
  510. package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-VcdyPlVE.js +0 -10
  511. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-97qjzqIO.js +0 -145
  512. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-Bjr5wgXg.js +0 -145
  513. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-BqGJWVUS.js +0 -145
  514. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-C5h60fvZ.js +0 -145
  515. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-DBqchhlr.js +0 -145
  516. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-DOr6An-q.js +0 -145
  517. package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-nMYJrjDT.js +0 -145
  518. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-Bl16d4W5.js +0 -1
  519. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-C1KYr7Wj.js +0 -1
  520. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DDrhZYly.js +0 -1
  521. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DKkWVu_K.js +0 -1
  522. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DkBAMCJV.js +0 -1
  523. package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DlLDy54e.js +0 -1
  524. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-B05ygO34.js +0 -1
  525. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-B0euQu1p.js +0 -1
  526. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-BlwaoFEG.js +0 -1
  527. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-CtkfyoSn.js +0 -1
  528. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-DRV_IYr6.js +0 -1
  529. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-Im6pH8C-.js +0 -1
  530. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-K_qkvHaB.js +0 -1
  531. package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-pZ_Rrx6C.js +0 -1
  532. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-CGUDCWFx.js +0 -61
  533. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-CLdinkid.js +0 -61
  534. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-CsRS0WGC.js +0 -61
  535. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-D6JNee_P.js +0 -61
  536. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-DAT3r9va.js +0 -61
  537. package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-DR6HNny6.js +0 -61
  538. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-BlA8rg0m.js +0 -162
  539. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-CBle3d0d.js +0 -162
  540. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-CCvvSJBX.js +0 -162
  541. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-Cw9mkiYN.js +0 -162
  542. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-D-XpcCUD.js +0 -162
  543. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-MpQr6tee.js +0 -162
  544. package/dist/dashboard/dist/assets/treemap-GDKQZRPO-vW7FSd7C.js +0 -162
  545. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-B72UwDAP.js +0 -7
  546. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-BceejIon.js +0 -7
  547. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-BlIpbwyn.js +0 -7
  548. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-ByLRWyI2.js +0 -7
  549. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-DjyK-sw-.js +0 -7
  550. package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-bS40I4IT.js +0 -7
  551. package/dist/dashboard/reports/coverage-summary.json +0 -763
  552. package/dist/src/generation/ai-flow-exporter.d.ts +0 -7
  553. package/dist/src/generation/ai-flow-exporter.d.ts.map +0 -1
  554. package/dist/src/generation/ai-flow-exporter.js +0 -260
  555. package/dist/src/generation/index.d.ts +0 -9
  556. package/dist/src/generation/index.d.ts.map +0 -1
  557. package/dist/src/generation/index.js +0 -15
  558. package/dist/src/generation/quality-scorer.d.ts +0 -15
  559. package/dist/src/generation/quality-scorer.d.ts.map +0 -1
  560. package/dist/src/generation/quality-scorer.js +0 -273
  561. /package/dist/dashboard/{dist/assets → assets}/index-D_begBP0.css +0 -0
@@ -1,546 +1,526 @@
1
1
  "use strict";
2
- /**
3
- * Feature 28 — TemplateRenderer
4
- * Renders test scaffolds from GenerationContext.
5
- * Uses string-based templates (no external dependency required).
6
- */
7
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OWASP_INJECTION_STRINGS = void 0;
4
+ exports.renderFileHeader = renderFileHeader;
8
5
  exports.renderTemplate = renderTemplate;
9
- // ─── Header comment (RULE-GEN01) ──────────────────────────────────────────────
10
- function autoGeneratedHeader(ctx) {
6
+ exports.getTemplateName = getTemplateName;
7
+ /** Common OWASP injection strings for security tests */
8
+ exports.OWASP_INJECTION_STRINGS = [
9
+ "' OR '1'='1",
10
+ "'; DROP TABLE users; --",
11
+ '<script>alert("xss")</script>',
12
+ '../../../etc/passwd',
13
+ '${7*7}',
14
+ '{{7*7}}',
15
+ '; ls -la',
16
+ '\\x00',
17
+ '%00',
18
+ '<img src=x onerror=alert(1)>',
19
+ ];
20
+ /** Standard file header injected into every generated test file */
21
+ function renderFileHeader(gapId, gapType) {
11
22
  return [
12
- `// AUTO-GENERATED by api-test-coverage-analyzer (Feature 28)`,
13
- `// Gap: ${ctx.gap.id} | Risk: ${ctx.gap.riskScore} | Priority: ${ctx.gap.priority}`,
14
- `// TODO: Review generated assertions and replace placeholder values`,
15
- ``,
23
+ '// AUTO-GENERATED by api-test-coverage-analyzer',
24
+ `// Gap ID: ${gapId} | Type: ${gapType}`,
25
+ '// DO NOT EDIT regenerate with: node dist/src/index.js generate-tests',
26
+ '// TODO: Review and adjust before committing',
27
+ '',
16
28
  ].join('\n');
17
29
  }
18
- // ─── TypeScript / Jest unit + integration ─────────────────────────────────────
19
- function renderTypescriptJestUnit(ctx) {
30
+ /** Simple string interpolation replaces {{key}} tokens with values */
31
+ function interpolate(template, vars) {
32
+ return template.replace(/\{\{(\w+)\}\}/g, (_, key) => { var _a; return (_a = vars[key]) !== null && _a !== void 0 ? _a : `{{${key}}}`; });
33
+ }
34
+ // ─── TypeScript / Jest templates ─────────────────────────────────────────────
35
+ function renderEndpointMissing(gap, ctx) {
20
36
  var _a, _b, _c, _d;
21
- const { endpoint, fixtures, project } = ctx;
22
- const method = endpoint.method.toLowerCase();
23
- const descName = (_a = endpoint.operationId) !== null && _a !== void 0 ? _a : `${endpoint.method} ${endpoint.path}`;
24
- const authRequired = endpoint.auth.required;
25
- const scheme = (_b = endpoint.auth.scheme) !== null && _b !== void 0 ? _b : 'Bearer';
26
- const lines = [
27
- autoGeneratedHeader(ctx),
28
- `import request from 'supertest';`,
29
- `import { app } from '${project.importPrefix}/app';`,
30
- ``,
31
- `const BASE_URL = process.env.TEST_BASE_URL ?? '${project.baseUrl}';`,
32
- ``,
33
- `// TODO: Replace with a valid JWT token from your test auth setup`,
34
- `const VALID_AUTH_TOKEN = '${scheme} <your-test-token>';`,
35
- ``,
36
- `describe('${descName}', () => {`,
37
- ];
38
- // Happy path
39
- lines.push(` describe('happy path', () => {`);
40
- lines.push(` it('should succeed and return the expected response', async () => {`);
41
- if (Object.keys(fixtures.validPayload).length > 0) {
42
- lines.push(` const payload = ${JSON.stringify(fixtures.validPayload, null, 8).replace(/\n/g, '\n ')};`);
43
- lines.push(` // TODO: Replace with realistic test data`);
44
- lines.push(``);
45
- }
46
- lines.push(` const response = await request(app)`);
47
- lines.push(` .${method}('${endpoint.pathNormalized}')`);
48
- if (authRequired) {
49
- lines.push(` .set('Authorization', VALID_AUTH_TOKEN)`);
50
- }
51
- if (Object.keys(fixtures.validPayload).length > 0) {
52
- lines.push(` .send(payload);`);
53
- }
54
- else {
55
- lines.push(` ;`);
56
- }
57
- lines.push(``);
58
- // Find success status code
59
- const successStatus = (_d = (_c = ctx.responses.find(r => r.statusCode >= 200 && r.statusCode < 300)) === null || _c === void 0 ? void 0 : _c.statusCode) !== null && _d !== void 0 ? _d : 200;
60
- lines.push(` expect(response.status).toBe(${successStatus});`);
61
- lines.push(` expect(response.body).toBeDefined();`);
62
- lines.push(` });`);
63
- lines.push(` });`);
64
- lines.push(``);
65
- // Auth tests (RULE-GEN03)
66
- if (authRequired) {
67
- lines.push(` describe('authentication', () => {`);
68
- lines.push(` it('should return 401 when no auth token is provided', async () => {`);
69
- lines.push(` const response = await request(app)`);
70
- lines.push(` .${method}('${endpoint.pathNormalized}');`);
71
- lines.push(``);
72
- lines.push(` expect(response.status).toBe(401);`);
73
- lines.push(` });`);
74
- lines.push(``);
75
- lines.push(` it('should return 401 when an invalid auth token is provided', async () => {`);
76
- lines.push(` const response = await request(app)`);
77
- lines.push(` .${method}('${endpoint.pathNormalized}')`);
78
- lines.push(` .set('Authorization', '${scheme} invalid-token-value');`);
79
- lines.push(``);
80
- lines.push(` expect(response.status).toBe(401);`);
81
- lines.push(` });`);
82
- lines.push(` });`);
83
- lines.push(``);
84
- }
85
- // Validation / error tests
86
- const requiredParams = ctx.parameters.filter(p => p.required && p.in === 'body');
87
- if (requiredParams.length > 0) {
88
- lines.push(` describe('validation', () => {`);
89
- for (const param of requiredParams.slice(0, 3)) {
90
- lines.push(` it('should return 422 when ${param.name} is missing', async () => {`);
91
- const partialPayload = {};
92
- for (const other of requiredParams) {
93
- if (other.name !== param.name) {
94
- partialPayload[other.name] = 'test-value';
95
- }
96
- }
97
- lines.push(` const response = await request(app)`);
98
- lines.push(` .${method}('${endpoint.pathNormalized}')`);
99
- if (authRequired) {
100
- lines.push(` .set('Authorization', VALID_AUTH_TOKEN)`);
101
- }
102
- lines.push(` .send(${JSON.stringify(partialPayload)});`);
103
- lines.push(``);
104
- lines.push(` expect(response.status).toBe(422);`);
105
- lines.push(` expect(response.body).toHaveProperty('errors');`);
106
- lines.push(` });`);
107
- lines.push(``);
108
- }
109
- lines.push(` });`);
110
- }
111
- lines.push(`});`);
112
- lines.push(``);
113
- return lines.join('\n');
37
+ const method = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : 'GET';
38
+ const endpointPath = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : '/unknown';
39
+ const methodLower = method.toLowerCase();
40
+ const header = renderFileHeader(gap.id, gap.type);
41
+ const body = `
42
+ import request from 'supertest'; // TODO: adjust import path
43
+ import app from '../../../src/app'; // TODO: adjust import path
44
+
45
+ describe('${method} ${endpointPath}', () => {
46
+ it('should return 200 with valid response', async () => {
47
+ const response = await request(app)
48
+ .${methodLower}('${endpointPath}')
49
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'); // TODO: add valid token
50
+
51
+ expect(response.status).toBe(200);
52
+ expect(response.body).toMatchObject({}); // TODO: add expected shape
53
+ });
54
+
55
+ it('should return 401 when not authenticated', async () => {
56
+ const response = await request(app).${methodLower}('${endpointPath}');
57
+ expect(response.status).toBe(401);
58
+ });
59
+ });
60
+ `;
61
+ return header + body.trimStart();
114
62
  }
115
- // ─── TypeScript / Jest security ───────────────────────────────────────────────
116
- function renderTypescriptJestSecurity(ctx) {
117
- var _a;
118
- const { endpoint, project } = ctx;
119
- const method = endpoint.method.toLowerCase();
120
- const scheme = (_a = endpoint.auth.scheme) !== null && _a !== void 0 ? _a : 'Bearer';
121
- const lines = [
122
- autoGeneratedHeader(ctx),
123
- `import request from 'supertest';`,
124
- `import { app } from '${project.importPrefix}/app';`,
125
- ``,
126
- `// TODO: Replace with a valid JWT token from your test auth setup`,
127
- `const VALID_AUTH_TOKEN = '${scheme} <your-test-token>';`,
128
- ``,
129
- `describe('Security: ${endpoint.method} ${endpoint.path} — Auth Controls', () => {`,
130
- ` it('[SEC-AUTH-01] should reject requests with no Authorization header', async () => {`,
131
- ` const response = await request(app)`,
132
- ` .${method}('${endpoint.pathNormalized}');`,
133
- ``,
134
- ` expect(response.status).toBe(401);`,
135
- ` });`,
136
- ``,
137
- ` it('[SEC-AUTH-02] should reject requests with malformed token', async () => {`,
138
- ` const response = await request(app)`,
139
- ` .${method}('${endpoint.pathNormalized}')`,
140
- ` .set('Authorization', 'malformed-token-without-scheme');`,
141
- ``,
142
- ` expect(response.status).toBe(401);`,
143
- ` });`,
144
- ``,
145
- ` it('[SEC-AUTH-03] should reject requests with expired token', async () => {`,
146
- ` // TODO: Generate or use a known-expired JWT for your test environment`,
147
- ` const expiredToken = '${scheme} eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDAwMDAwMDAsImV4cCI6MTYwMDAwMDAwMX0.TODO';`,
148
- ``,
149
- ` const response = await request(app)`,
150
- ` .${method}('${endpoint.pathNormalized}')`,
151
- ` .set('Authorization', expiredToken);`,
152
- ``,
153
- ` expect(response.status).toBe(401);`,
154
- ` });`,
155
- ``,
156
- ` it('[SEC-AUTH-04] should reject requests with a token for a different user role', async () => {`,
157
- ` // TODO: Get a token for a user WITHOUT the required permissions`,
158
- ` const lowPrivToken = '${scheme} <low-privilege-token>';`,
159
- ``,
160
- ` const response = await request(app)`,
161
- ` .${method}('${endpoint.pathNormalized}')`,
162
- ` .set('Authorization', lowPrivToken);`,
163
- ``,
164
- ` // Expect either 401 (unauthenticated) or 403 (unauthorized)`,
165
- ` expect([401, 403]).toContain(response.status);`,
166
- ` });`,
167
- `});`,
168
- ``,
169
- `describe('Security: ${endpoint.method} ${endpoint.path} — Injection Prevention', () => {`,
170
- ` it('[SEC-INJ-01] should not execute SQL injection in request body', async () => {`,
171
- ` const response = await request(app)`,
172
- ` .${method}('${endpoint.pathNormalized}')`,
173
- ` .set('Authorization', VALID_AUTH_TOKEN)`,
174
- ` .send({ title: "'; DROP TABLE articles; --", body: 'Body', description: 'Desc' });`,
175
- ``,
176
- ` // Should either succeed (sanitized) or return 422 (rejected) — never 500`,
177
- ` expect(response.status).not.toBe(500);`,
178
- ` expect(response.status).not.toBe(503);`,
179
- ` });`,
180
- ``,
181
- ` it('[SEC-INJ-02] should not execute XSS in request fields', async () => {`,
182
- ` const response = await request(app)`,
183
- ` .${method}('${endpoint.pathNormalized}')`,
184
- ` .set('Authorization', VALID_AUTH_TOKEN)`,
185
- ` .send({ title: '<script>alert("xss")</script>', body: 'Body', description: 'Desc' });`,
186
- ``,
187
- ` expect(response.status).not.toBe(500);`,
188
- ``,
189
- ` if (response.status >= 200 && response.status < 300) {`,
190
- ` // If the server accepted it, it must have been sanitized`,
191
- ` const body = JSON.stringify(response.body);`,
192
- ` expect(body).not.toContain('<script>');`,
193
- ` }`,
194
- ` });`,
195
- ``,
196
- ` it('[SEC-INJ-03] should handle oversized payload gracefully', async () => {`,
197
- ` const oversizedBody = 'x'.repeat(10_000_000); // 10 MB`,
198
- ``,
199
- ` const response = await request(app)`,
200
- ` .${method}('${endpoint.pathNormalized}')`,
201
- ` .set('Authorization', VALID_AUTH_TOKEN)`,
202
- ` .send({ title: 'Test', body: oversizedBody, description: 'Desc' });`,
203
- ``,
204
- ` // Must not crash — 413 or 422 are acceptable`,
205
- ` expect([413, 422, 400]).toContain(response.status);`,
206
- ` });`,
207
- `});`,
208
- ``,
209
- ];
210
- return lines.join('\n');
63
+ function renderParameterMissing(gap, ctx) {
64
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
65
+ const paramName = (_b = (_a = gap.parameter) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : 'param';
66
+ const paramIn = (_d = (_c = gap.parameter) === null || _c === void 0 ? void 0 : _c.in) !== null && _d !== void 0 ? _d : 'query';
67
+ const required = (_f = (_e = gap.parameter) === null || _e === void 0 ? void 0 : _e.required) !== null && _f !== void 0 ? _f : false;
68
+ const endpointPath = (_h = (_g = gap.endpoint) === null || _g === void 0 ? void 0 : _g.path) !== null && _h !== void 0 ? _h : '/api/endpoint';
69
+ const method = (_k = (_j = gap.endpoint) === null || _j === void 0 ? void 0 : _j.method) !== null && _k !== void 0 ? _k : 'GET';
70
+ const methodLower = method.toLowerCase();
71
+ const header = renderFileHeader(gap.id, gap.type);
72
+ const body = `
73
+ import request from 'supertest'; // TODO: adjust import path
74
+ import app from '../../../src/app'; // TODO: adjust import path
75
+
76
+ describe('${method} ${endpointPath} — parameter: ${paramName}', () => {
77
+ it('should accept a valid ${paramName} ${paramIn} parameter', async () => {
78
+ const response = await request(app)
79
+ .${methodLower}('${endpointPath}')
80
+ ${paramIn === 'query' ? `.query({ ${paramName}: 'valid-value' }) // TODO: provide valid value` : `.send({ ${paramName}: 'valid-value' }) // TODO: provide valid value`}
81
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'); // TODO: add valid token
82
+
83
+ expect(response.status).toBe(200);
84
+ expect(response.body).toMatchObject({}); // TODO: add expected shape
85
+ });
86
+ ${required
87
+ ? `
88
+ it('should return 400 when ${paramName} is missing', async () => {
89
+ const response = await request(app)
90
+ .${methodLower}('${endpointPath}')
91
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'); // TODO: add valid token
92
+
93
+ expect(response.status).toBe(400);
94
+ });
95
+ `
96
+ : ''}
97
+ it('should return 400 when ${paramName} is invalid', async () => {
98
+ const response = await request(app)
99
+ .${methodLower}('${endpointPath}')
100
+ ${paramIn === 'query' ? `.query({ ${paramName}: 'INVALID_VALUE' }) // TODO: provide invalid value` : `.send({ ${paramName}: 'INVALID_VALUE' }) // TODO: provide invalid value`}
101
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'); // TODO: add valid token
102
+
103
+ expect(response.status).toBe(400);
104
+ });
105
+ });
106
+ `;
107
+ return header + body.trimStart();
211
108
  }
212
- // ─── TypeScript / Jest integration flow ───────────────────────────────────────
213
- function renderTypescriptJestIntegration(ctx) {
214
- const { endpoint, project, flow } = ctx;
215
- if (!flow) {
216
- return renderTypescriptJestUnit(ctx);
217
- }
218
- const lines = [
219
- autoGeneratedHeader(ctx),
220
- `import request from 'supertest';`,
221
- `import { app } from '${project.importPrefix}/app';`,
222
- ``,
223
- `describe('Integration Flow: ${flow.name}', () => {`,
224
- ` let authToken: string;`,
225
- ``,
226
- ` // RULE-INT04: beforeAll (not beforeEach) for auth setup`,
227
- ` beforeAll(async () => {`,
228
- ` // TODO: Replace with your test user credentials`,
229
- ` const loginResponse = await request(app)`,
230
- ` .post('/api/users/login')`,
231
- ` .send({ user: { email: 'test@example.com', password: 'testpassword' } });`,
232
- ``,
233
- ` expect(loginResponse.status).toBe(200);`,
234
- ` authToken = \`Token \${loginResponse.body.user.token}\`;`,
235
- ` });`,
236
- ``,
237
- ];
238
- for (let i = 0; i < flow.steps.length; i++) {
239
- const step = flow.steps[i];
240
- const isMissing = i === flow.missingStepIndex;
241
- const stepMethod = step.method.toLowerCase();
242
- const stepPath = step.path;
243
- if (isMissing) {
244
- lines.push(` // ⚠️ MISSING STEP — This step was detected as uncovered by the analyzer`);
245
- }
246
- lines.push(` it('Step ${i + 1}: ${step.description}${isMissing ? ' (MISSING COVERAGE)' : ''}', async () => {`);
247
- if (isMissing) {
248
- lines.push(` // TODO: This step was identified as missing. Implement the test.`);
249
- }
250
- lines.push(` const response = await request(app)`);
251
- lines.push(` .${stepMethod}('${stepPath}')`);
252
- lines.push(` .set('Authorization', authToken);`);
253
- lines.push(``);
254
- lines.push(` expect(response.status).toBe(200);`);
255
- lines.push(` });`);
256
- lines.push(``);
257
- }
258
- lines.push(`});`);
259
- lines.push(``);
260
- return lines.join('\n');
109
+ function renderParameterNotValidated(gap, ctx) {
110
+ var _a, _b, _c, _d, _e, _f;
111
+ const paramName = (_b = (_a = gap.parameter) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : 'param';
112
+ const endpointPath = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : '/api/endpoint';
113
+ const method = (_f = (_e = gap.endpoint) === null || _e === void 0 ? void 0 : _e.method) !== null && _f !== void 0 ? _f : 'GET';
114
+ const methodLower = method.toLowerCase();
115
+ const header = renderFileHeader(gap.id, gap.type);
116
+ const body = `
117
+ import request from 'supertest'; // TODO: adjust import path
118
+ import app from '../../../src/app'; // TODO: adjust import path
119
+
120
+ describe('${method} ${endpointPath} — validation: ${paramName}', () => {
121
+ it('should reject empty ${paramName}', async () => {
122
+ const response = await request(app)
123
+ .${methodLower}('${endpointPath}')
124
+ .send({ ${paramName}: '' }) // TODO: adjust payload location
125
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
126
+
127
+ expect(response.status).toBe(400);
128
+ expect(response.body).toMatchObject({ error: expect.any(String) }); // TODO: match actual error shape
129
+ });
130
+
131
+ it('should reject ${paramName} exceeding max length', async () => {
132
+ const response = await request(app)
133
+ .${methodLower}('${endpointPath}')
134
+ .send({ ${paramName}: 'x'.repeat(1000) }) // TODO: adjust max length
135
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
136
+
137
+ expect(response.status).toBe(400);
138
+ });
139
+ });
140
+ `;
141
+ return header + body.trimStart();
261
142
  }
262
- // ─── TypeScript / Jest error scenario ────────────────────────────────────────
263
- function renderTypescriptJestErrorScenario(ctx) {
264
- var _a, _b;
265
- const { endpoint, project } = ctx;
266
- const method = endpoint.method.toLowerCase();
267
- const scheme = (_a = endpoint.auth.scheme) !== null && _a !== void 0 ? _a : 'Bearer';
268
- const lines = [
269
- autoGeneratedHeader(ctx),
270
- `import request from 'supertest';`,
271
- `import { app } from '${project.importPrefix}/app';`,
272
- ``,
273
- `// TODO: Replace with a valid JWT token from your test auth setup`,
274
- `const VALID_AUTH_TOKEN = '${scheme} <your-test-token>';`,
275
- ``,
276
- `describe('Error Scenarios: ${endpoint.method} ${endpoint.path}', () => {`,
277
- ];
278
- for (const resp of ctx.responses.filter(r => r.statusCode >= 400)) {
279
- lines.push(` it('should return ${resp.statusCode} when ${(_b = resp.description) !== null && _b !== void 0 ? _b : `error ${resp.statusCode}`}', async () => {`);
280
- lines.push(` const response = await request(app)`);
281
- lines.push(` .${method}('${endpoint.pathNormalized}')`);
282
- if (endpoint.auth.required) {
283
- lines.push(` .set('Authorization', VALID_AUTH_TOKEN)`);
284
- }
285
- lines.push(` .send({});`);
286
- lines.push(``);
287
- lines.push(` expect(response.status).toBe(${resp.statusCode});`);
288
- lines.push(` });`);
289
- lines.push(``);
290
- }
291
- lines.push(`});`);
292
- lines.push(``);
293
- return lines.join('\n');
143
+ function renderBusinessMissing(gap, ctx) {
144
+ var _a, _b, _c, _d;
145
+ const ruleId = (_b = (_a = gap.businessRule) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : 'BR-XXX';
146
+ const description = (_d = (_c = gap.businessRule) === null || _c === void 0 ? void 0 : _c.description) !== null && _d !== void 0 ? _d : 'Business rule';
147
+ const header = renderFileHeader(gap.id, gap.type);
148
+ const body = `
149
+ import request from 'supertest'; // TODO: adjust import path
150
+ import app from '../../../src/app'; // TODO: adjust import path
151
+
152
+ // Business Rule: ${ruleId} ${description}
153
+ describe('Business Rule ${ruleId}: ${description}', () => {
154
+ it('should enforce rule when conditions are met', async () => {
155
+ // TODO: set up test data that triggers the business rule
156
+ const response = await request(app)
157
+ .post('/api/TODO_ENDPOINT') // TODO: replace with actual endpoint
158
+ .send({
159
+ // TODO: add request body that triggers the rule
160
+ })
161
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
162
+
163
+ expect(response.status).toBe(422); // TODO: adjust expected status
164
+ expect(response.body).toMatchObject({
165
+ error: expect.any(String), // TODO: match actual error shape
166
+ });
167
+ });
168
+
169
+ it('should allow the operation when the rule is satisfied', async () => {
170
+ const response = await request(app)
171
+ .post('/api/TODO_ENDPOINT') // TODO: replace with actual endpoint
172
+ .send({
173
+ // TODO: add request body that satisfies the rule
174
+ })
175
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
176
+
177
+ expect(response.status).toBe(200); // TODO: adjust expected status
178
+ });
179
+ });
180
+ `;
181
+ return header + body.trimStart();
294
182
  }
295
- // ─── TypeScript / Jest business rule ─────────────────────────────────────────
296
- function renderTypescriptJestBusinessRule(ctx) {
297
- var _a;
298
- const { endpoint, project, businessRule } = ctx;
299
- const method = endpoint.method.toLowerCase();
300
- const scheme = (_a = endpoint.auth.scheme) !== null && _a !== void 0 ? _a : 'Bearer';
301
- const rule = businessRule !== null && businessRule !== void 0 ? businessRule : { id: 'rule-1', description: 'Business rule', condition: 'When condition is met', acceptanceCriteria: ['Expected behavior is verified'] };
302
- const lines = [
303
- autoGeneratedHeader(ctx),
304
- `import request from 'supertest';`,
305
- `import { app } from '${project.importPrefix}/app';`,
306
- ``,
307
- `// TODO: Replace with a valid JWT token from your test auth setup`,
308
- `const VALID_AUTH_TOKEN = '${scheme} <your-test-token>';`,
309
- ``,
310
- `describe('Business Rule: ${rule.id} ${rule.description}', () => {`,
311
- ` // Rule condition: ${rule.condition}`,
312
- ];
313
- for (const criterion of rule.acceptanceCriteria) {
314
- lines.push(` it('${criterion}', async () => {`);
315
- lines.push(` // TODO: Implement test for acceptance criterion: ${criterion}`);
316
- lines.push(` const response = await request(app)`);
317
- lines.push(` .${method}('${endpoint.pathNormalized}')`);
318
- if (endpoint.auth.required) {
319
- lines.push(` .set('Authorization', VALID_AUTH_TOKEN)`);
320
- }
321
- lines.push(` .send({});`);
322
- lines.push(``);
323
- lines.push(` expect(response.status).toBeDefined();`);
324
- lines.push(` // TODO: Add specific assertions for this acceptance criterion`);
325
- lines.push(` });`);
326
- lines.push(``);
327
- }
328
- lines.push(`});`);
329
- lines.push(``);
330
- return lines.join('\n');
183
+ function renderIntegrationMissingStep(gap, ctx) {
184
+ var _a, _b, _c, _d, _e, _f;
185
+ const flowId = (_b = (_a = gap.integrationFlow) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : 'flow-001';
186
+ const flowName = (_d = (_c = gap.integrationFlow) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : 'Integration Flow';
187
+ const missingStep = (_f = (_e = gap.integrationFlow) === null || _e === void 0 ? void 0 : _e.missingStep) !== null && _f !== void 0 ? _f : 'step';
188
+ const header = renderFileHeader(gap.id, gap.type);
189
+ const body = `
190
+ import request from 'supertest'; // TODO: adjust import path
191
+ import app from '../../../src/app'; // TODO: adjust import path
192
+
193
+ // Integration Flow: ${flowId} ${flowName}
194
+ describe('Integration Flow ${flowId}: ${flowName}', () => {
195
+ it('should complete the full flow including: ${missingStep}', async () => {
196
+ // Step 1: TODO — describe step 1
197
+ const step1 = await request(app)
198
+ .post('/api/TODO_STEP_1') // TODO: replace with actual endpoint
199
+ .send({}) // TODO: add step 1 body
200
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
201
+ expect(step1.status).toBe(200);
202
+
203
+ // Step 2: ${missingStep} (this was the missing step)
204
+ const step2 = await request(app)
205
+ .post('/api/TODO_STEP_2') // TODO: replace with actual endpoint
206
+ .send({}) // TODO: add step 2 body
207
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
208
+ expect(step2.status).toBe(200);
209
+ expect(step2.body).toMatchObject({}); // TODO: verify step 2 result
210
+ });
211
+ });
212
+ `;
213
+ return header + body.trimStart();
331
214
  }
332
- // ─── Python / pytest ──────────────────────────────────────────────────────────
333
- function renderPythonPytestUnit(ctx) {
334
- var _a, _b;
335
- const { endpoint } = ctx;
336
- const method = endpoint.method.toLowerCase();
337
- const authRequired = endpoint.auth.required;
338
- const lines = [
339
- `# AUTO-GENERATED by api-test-coverage-analyzer (Feature 28)`,
340
- `# Gap: ${ctx.gap.id} | Risk: ${ctx.gap.riskScore} | Priority: ${ctx.gap.priority}`,
341
- `# TODO: Review generated assertions and replace placeholder values`,
342
- ``,
343
- `import pytest`,
344
- ``,
345
- `# TODO: Import your app factory and configure for testing`,
346
- `# from app import create_app`,
347
- ``,
348
- `VALID_AUTH_TOKEN = 'Token <your-test-token>' # TODO: Replace`,
349
- ``,
350
- ``,
351
- `@pytest.fixture`,
352
- `def client(app):`,
353
- ` """TODO: Configure this fixture for your test setup."""`,
354
- ` return app.test_client()`,
355
- ``,
356
- ``,
357
- `class Test${toPascalCase(endpoint.method + '_' + endpoint.path.replace(/[^a-zA-Z0-9]/g, '_'))}:`,
358
- ` """Tests for ${endpoint.method} ${endpoint.path}"""`,
359
- ``,
360
- ];
361
- lines.push(` def test_happy_path(self, client):`);
362
- lines.push(` """Should succeed with valid input."""`);
363
- if (authRequired) {
364
- lines.push(` response = client.${method}(`);
365
- lines.push(` '${endpoint.path}',`);
366
- lines.push(` json={},`);
367
- lines.push(` headers={'Authorization': VALID_AUTH_TOKEN},`);
368
- lines.push(` )`);
369
- }
370
- else {
371
- lines.push(` response = client.${method}('${endpoint.path}')`);
372
- }
373
- lines.push(``);
374
- const successStatus = (_b = (_a = ctx.responses.find(r => r.statusCode >= 200 && r.statusCode < 300)) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200;
375
- lines.push(` assert response.status_code == ${successStatus}`);
376
- lines.push(``);
377
- if (authRequired) {
378
- lines.push(` def test_requires_auth(self, client):`);
379
- lines.push(` """Should return 401 when no auth token is provided."""`);
380
- lines.push(` response = client.${method}('${endpoint.path}', json={})`);
381
- lines.push(``);
382
- lines.push(` assert response.status_code == 401`);
383
- lines.push(``);
384
- lines.push(` def test_invalid_token(self, client):`);
385
- lines.push(` """Should return 401 when an invalid token is provided."""`);
386
- lines.push(` response = client.${method}(`);
387
- lines.push(` '${endpoint.path}',`);
388
- lines.push(` json={},`);
389
- lines.push(` headers={'Authorization': 'Token invalid-token'},`);
390
- lines.push(` )`);
391
- lines.push(``);
392
- lines.push(` assert response.status_code == 401`);
393
- lines.push(``);
394
- }
395
- return lines.join('\n');
215
+ function renderErrorMissingStatus(gap, ctx) {
216
+ var _a, _b, _c, _d;
217
+ const endpointPath = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : '/api/endpoint';
218
+ const method = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : 'GET';
219
+ const methodLower = method.toLowerCase();
220
+ const header = renderFileHeader(gap.id, gap.type);
221
+ const body = `
222
+ import request from 'supertest'; // TODO: adjust import path
223
+ import app from '../../../src/app'; // TODO: adjust import path
224
+
225
+ describe('${method} ${endpointPath} — error handling', () => {
226
+ it('should return 400 for invalid request body', async () => {
227
+ const response = await request(app)
228
+ .${methodLower}('${endpointPath}')
229
+ .send({ invalidField: 'bad-value' }) // TODO: craft invalid payload
230
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
231
+
232
+ expect(response.status).toBe(400);
233
+ expect(response.body).toMatchObject({ error: expect.any(String) }); // TODO: match error shape
234
+ });
235
+
236
+ it('should return 401 when unauthenticated', async () => {
237
+ const response = await request(app).${methodLower}('${endpointPath}');
238
+ expect(response.status).toBe(401);
239
+ });
240
+
241
+ it('should return 404 for non-existent resource', async () => {
242
+ const response = await request(app)
243
+ .${methodLower}('${endpointPath.replace('{id}', 'nonexistent-99999')}')
244
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
245
+ expect(response.status).toBe(404);
246
+ });
247
+
248
+ it('should return 500 when the service fails', async () => {
249
+ // TODO: mock the service to throw an error
250
+ // Example with jest.spyOn:
251
+ // jest.spyOn(someService, 'someMethod').mockRejectedValueOnce(new Error('Service error'));
252
+ const response = await request(app)
253
+ .${methodLower}('${endpointPath}')
254
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
255
+ // TODO: trigger 500 condition
256
+ expect(response.status).toBeGreaterThanOrEqual(500);
257
+ });
258
+ });
259
+ `;
260
+ return header + body.trimStart();
396
261
  }
397
- function toPascalCase(s) {
398
- return s
399
- .replace(/[^a-zA-Z0-9]+(.)/g, (_, c) => c.toUpperCase())
400
- .replace(/^(.)/, (c) => c.toUpperCase());
262
+ function renderSecurityMissingAuth(gap, ctx) {
263
+ var _a, _b, _c, _d;
264
+ const endpointPath = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : '/api/endpoint';
265
+ const method = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : 'GET';
266
+ const methodLower = method.toLowerCase();
267
+ const header = renderFileHeader(gap.id, gap.type);
268
+ const body = `
269
+ import request from 'supertest'; // TODO: adjust import path
270
+ import app from '../../../src/app'; // TODO: adjust import path
271
+
272
+ describe('${method} ${endpointPath} — authentication', () => {
273
+ it('should return 401 when no token is provided', async () => {
274
+ const response = await request(app).${methodLower}('${endpointPath}');
275
+ expect(response.status).toBe(401);
276
+ });
277
+
278
+ it('should return 401 when an invalid token is provided', async () => {
279
+ const response = await request(app)
280
+ .${methodLower}('${endpointPath}')
281
+ .set('Authorization', 'Bearer invalid-token-here');
282
+ expect(response.status).toBe(401);
283
+ });
284
+
285
+ it('should return 403 when the user lacks required permissions', async () => {
286
+ const response = await request(app)
287
+ .${methodLower}('${endpointPath}')
288
+ .set('Authorization', 'Bearer TODO_LOW_PRIVILEGE_TOKEN'); // TODO: provide a low-privilege token
289
+ expect(response.status).toBe(403);
290
+ });
291
+
292
+ it('should succeed when a valid authorized token is provided', async () => {
293
+ const response = await request(app)
294
+ .${methodLower}('${endpointPath}')
295
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'); // TODO: provide valid token
296
+ expect(response.status).toBe(200);
297
+ });
298
+ });
299
+ `;
300
+ return header + body.trimStart();
401
301
  }
402
- // ─── Java / JUnit5 ────────────────────────────────────────────────────────────
403
- function renderJavaJunit5Unit(ctx) {
404
- var _a, _b;
405
- const { endpoint } = ctx;
406
- const method = endpoint.method;
407
- const authRequired = endpoint.auth.required;
408
- const successStatus = (_b = (_a = ctx.responses.find(r => r.statusCode >= 200 && r.statusCode < 300)) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200;
409
- const statusMatcher = successStatus === 201 ? 'isCreated()' : successStatus === 204 ? 'isNoContent()' : 'isOk()';
410
- const lines = [
411
- `// AUTO-GENERATED by api-test-coverage-analyzer (Feature 28)`,
412
- `// Gap: ${ctx.gap.id} | Risk: ${ctx.gap.riskScore} | Priority: ${ctx.gap.priority}`,
413
- `// TODO: Review generated assertions and replace placeholder values`,
414
- ``,
415
- `package generated;`,
416
- ``,
417
- `import org.junit.jupiter.api.Test;`,
418
- `import org.springframework.beans.factory.annotation.Autowired;`,
419
- `import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;`,
420
- `import org.springframework.boot.test.context.SpringBootTest;`,
421
- `import org.springframework.http.MediaType;`,
422
- `import org.springframework.test.web.servlet.MockMvc;`,
423
- ``,
424
- `import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.${method.toLowerCase()};`,
425
- `import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;`,
426
- ``,
427
- `@SpringBootTest`,
428
- `@AutoConfigureMockMvc`,
429
- `public class ${toPascalCase(method + '_' + endpoint.path.replace(/[^a-zA-Z0-9]/g, '_') + '_Test')} {`,
430
- ``,
431
- ` @Autowired`,
432
- ` private MockMvc mockMvc;`,
433
- ``,
434
- ` // TODO: Replace with a valid JWT from your test auth setup`,
435
- ` private static final String VALID_TOKEN = "Token <your-test-token>";`,
436
- ``,
437
- ` @Test`,
438
- ` void happyPath_returns${successStatus}() throws Exception {`,
439
- ` mockMvc.perform(${method.toLowerCase()}("${endpoint.path}")`,
440
- ...(authRequired ? [` .header("Authorization", VALID_TOKEN)`] : []),
441
- ` .contentType(MediaType.APPLICATION_JSON)`,
442
- ` .content("{}")) // TODO: Replace with valid payload`,
443
- ` .andExpect(status().${statusMatcher});`,
444
- ` }`,
445
- ``,
446
- ];
447
- if (authRequired) {
448
- lines.push(` @Test`);
449
- lines.push(` void noAuth_returns401() throws Exception {`);
450
- lines.push(` mockMvc.perform(${method.toLowerCase()}("${endpoint.path}")`);
451
- lines.push(` .contentType(MediaType.APPLICATION_JSON)`);
452
- lines.push(` .content("{}"))`);
453
- lines.push(` .andExpect(status().isUnauthorized());`);
454
- lines.push(` }`);
455
- lines.push(``);
302
+ function renderSecurityInjection(gap, ctx) {
303
+ var _a, _b, _c, _d;
304
+ const endpointPath = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : '/api/endpoint';
305
+ const method = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : 'POST';
306
+ const methodLower = method.toLowerCase();
307
+ const injectionCases = exports.OWASP_INJECTION_STRINGS.slice(0, 4)
308
+ .map((s) => ` { input: ${JSON.stringify(s)}, label: 'injection: ${s.slice(0, 20)}...' },`)
309
+ .join('\n');
310
+ const header = renderFileHeader(gap.id, gap.type);
311
+ const body = `
312
+ import request from 'supertest'; // TODO: adjust import path
313
+ import app from '../../../src/app'; // TODO: adjust import path
314
+
315
+ describe('${method} ${endpointPath} — injection security', () => {
316
+ const injectionPayloads = [
317
+ ${injectionCases}
318
+ ];
319
+
320
+ it.each(injectionPayloads)('should reject $label', async ({ input }) => {
321
+ const response = await request(app)
322
+ .${methodLower}('${endpointPath}')
323
+ .send({ field: input }) // TODO: replace 'field' with actual vulnerable field name
324
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
325
+
326
+ expect(response.status).toBe(400); // TODO: adjust — may be 422 or 200 with sanitised output
327
+ expect(response.body).not.toMatchObject({ data: input }); // TODO: verify injection is blocked
328
+ });
329
+ });
330
+ `;
331
+ return header + body.trimStart();
332
+ }
333
+ function renderPerformanceMissingSla(gap, ctx) {
334
+ var _a, _b, _c, _d;
335
+ const endpointPath = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : '/api/endpoint';
336
+ const method = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : 'GET';
337
+ const methodLower = method.toLowerCase();
338
+ const header = renderFileHeader(gap.id, gap.type);
339
+ const body = `
340
+ import request from 'supertest'; // TODO: adjust import path
341
+ import app from '../../../src/app'; // TODO: adjust import path
342
+
343
+ const SLA_RESPONSE_MS = 500; // TODO: adjust SLA threshold
344
+
345
+ describe('${method} ${endpointPath} — performance SLA', () => {
346
+ it('should respond within SLA threshold', async () => {
347
+ const start = Date.now();
348
+ const response = await request(app)
349
+ .${methodLower}('${endpointPath}')
350
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
351
+ const elapsed = Date.now() - start;
352
+
353
+ expect(response.status).toBe(200);
354
+ expect(elapsed).toBeLessThan(SLA_RESPONSE_MS);
355
+ });
356
+
357
+ it('should handle concurrent requests within SLA', async () => {
358
+ const concurrency = 5; // TODO: adjust concurrency level
359
+ const start = Date.now();
360
+ const responses = await Promise.all(
361
+ Array.from({ length: concurrency }, () =>
362
+ request(app)
363
+ .${methodLower}('${endpointPath}')
364
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN'),
365
+ ),
366
+ );
367
+ const elapsed = Date.now() - start;
368
+
369
+ for (const response of responses) {
370
+ expect(response.status).toBe(200);
456
371
  }
457
- lines.push(`}`);
458
- lines.push(``);
459
- return lines.join('\n');
372
+ expect(elapsed / concurrency).toBeLessThan(SLA_RESPONSE_MS);
373
+ });
374
+ });
375
+ `;
376
+ return header + body.trimStart();
460
377
  }
461
- // ─── Cypress E2E ──────────────────────────────────────────────────────────────
462
- function renderCypressEndpoint(ctx) {
463
- var _a, _b;
464
- const { endpoint } = ctx;
465
- const method = endpoint.method;
466
- const authRequired = endpoint.auth.required;
467
- const successStatus = (_b = (_a = ctx.responses.find(r => r.statusCode >= 200 && r.statusCode < 300)) === null || _a === void 0 ? void 0 : _a.statusCode) !== null && _b !== void 0 ? _b : 200;
468
- const lines = [
469
- `// AUTO-GENERATED by api-test-coverage-analyzer (Feature 28)`,
470
- `// Gap: ${ctx.gap.id} | Risk: ${ctx.gap.riskScore} | Priority: ${ctx.gap.priority}`,
471
- `// NOTE: add generated/ to your specPattern in cypress.config.js if not already included`,
472
- ``,
473
- `describe('${method} ${endpoint.path} E2E', () => {`,
474
- ];
475
- if (authRequired) {
476
- lines.push(` let authToken;`);
477
- lines.push(``);
478
- lines.push(` before(() => {`);
479
- lines.push(` // TODO: Replace with your Cypress login command or fixture`);
480
- lines.push(` cy.request('POST', '/api/users/login', {`);
481
- lines.push(` user: { email: Cypress.env('TEST_USER_EMAIL'), password: Cypress.env('TEST_USER_PASSWORD') },`);
482
- lines.push(` }).then((response) => {`);
483
- lines.push(` expect(response.status).to.eq(200);`);
484
- lines.push(` authToken = \`Token \${response.body.user.token}\`;`);
485
- lines.push(` });`);
486
- lines.push(` });`);
487
- lines.push(``);
378
+ function renderResilienceMissingRetry(gap, ctx) {
379
+ var _a, _b, _c, _d;
380
+ const endpointPath = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : '/api/endpoint';
381
+ const method = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.method) !== null && _d !== void 0 ? _d : 'GET';
382
+ const methodLower = method.toLowerCase();
383
+ const header = renderFileHeader(gap.id, gap.type);
384
+ const body = `
385
+ import request from 'supertest'; // TODO: adjust import path
386
+ import app from '../../../src/app'; // TODO: adjust import path
387
+
388
+ describe('${method} ${endpointPath} resilience / retry', () => {
389
+ it('should return 503 or retry-after header when service is unavailable', async () => {
390
+ // TODO: mock downstream dependency to simulate failure
391
+ // jest.spyOn(downstreamService, 'call').mockRejectedValueOnce(new Error('Downstream unavailable'));
392
+ const response = await request(app)
393
+ .${methodLower}('${endpointPath}')
394
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
395
+
396
+ // Either the service retries successfully (200) or signals unavailability (503)
397
+ expect([200, 503]).toContain(response.status);
398
+ if (response.status === 503) {
399
+ expect(response.headers).toHaveProperty('retry-after'); // TODO: check actual header name
488
400
  }
489
- lines.push(` it('should succeed with valid request', () => {`);
490
- lines.push(` cy.request({`);
491
- lines.push(` method: '${method}',`);
492
- lines.push(` url: '${endpoint.path}',`);
493
- if (authRequired) {
494
- lines.push(` headers: { Authorization: authToken },`);
401
+ });
402
+
403
+ it('should handle circuit-breaker open state gracefully', async () => {
404
+ // TODO: trigger circuit breaker open state
405
+ const response = await request(app)
406
+ .${methodLower}('${endpointPath}')
407
+ .set('Authorization', 'Bearer TODO_VALID_TOKEN');
408
+
409
+ expect(response.status).toBe(503); // TODO: adjust expected status
410
+ expect(response.body).toMatchObject({ error: expect.any(String) });
411
+ });
412
+ });
413
+ `;
414
+ return header + body.trimStart();
415
+ }
416
+ // ─── Python / pytest templates ────────────────────────────────────────────────
417
+ function renderPythonEndpoint(gap, ctx) {
418
+ var _a, _b, _c, _d;
419
+ const method = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : 'GET';
420
+ const endpointPath = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : '/api/endpoint';
421
+ const methodLower = method.toLowerCase();
422
+ const header = renderFileHeader(gap.id, gap.type).replace(/\/\//g, '#');
423
+ const body = `
424
+ import pytest
425
+ import requests # TODO: adjust import path
426
+
427
+ BASE_URL = "${ctx.baseUrl}" # TODO: adjust base URL
428
+ AUTH_TOKEN = "TODO_VALID_TOKEN" # TODO: add valid token
429
+
430
+
431
+ class Test${method.charAt(0) + method.slice(1).toLowerCase()}${endpointPath.replace(/[^a-zA-Z0-9]/g, '_')}:
432
+ def test_returns_200_with_valid_request(self):
433
+ response = requests.${methodLower}(
434
+ f"{BASE_URL}${endpointPath}",
435
+ headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
436
+ )
437
+ assert response.status_code == 200
438
+ assert response.json() is not None # TODO: replace with specific assertion
439
+
440
+ def test_returns_401_when_unauthenticated(self):
441
+ response = requests.${methodLower}(f"{BASE_URL}${endpointPath}")
442
+ assert response.status_code == 401
443
+ `;
444
+ return header + body.trimStart();
445
+ }
446
+ // ─── Java / JUnit5 templates ──────────────────────────────────────────────────
447
+ function renderJavaEndpoint(gap, ctx) {
448
+ var _a, _b, _c, _d;
449
+ const method = (_b = (_a = gap.endpoint) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : 'GET';
450
+ const endpointPath = (_d = (_c = gap.endpoint) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : '/api/endpoint';
451
+ const className = `Test${gap.id.split('-').map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join('')}`;
452
+ const header = renderFileHeader(gap.id, gap.type).replace(/\/\//g, '//');
453
+ const body = `
454
+ package generated;
455
+
456
+ import org.junit.jupiter.api.Test;
457
+ import org.springframework.boot.test.context.SpringBootTest;
458
+ import org.springframework.beans.factory.annotation.Autowired;
459
+ import org.springframework.test.web.servlet.MockMvc;
460
+ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
461
+ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
462
+
463
+ // TODO: Add @SpringBootTest or @WebMvcTest and adjust imports
464
+ @SpringBootTest
465
+ class ${className} {
466
+
467
+ @Autowired
468
+ private MockMvc mockMvc; // TODO: inject MockMvc
469
+
470
+ @Test
471
+ void shouldReturn200WithValidRequest() throws Exception {
472
+ mockMvc.perform(${method.toLowerCase()}("${endpointPath}")
473
+ .header("Authorization", "Bearer TODO_VALID_TOKEN")) // TODO: add valid token
474
+ .andExpect(status().isOk())
475
+ .andExpect(jsonPath("$").isNotEmpty()); // TODO: replace with specific assertion
495
476
  }
496
- lines.push(` body: {}, // TODO: Replace with valid payload`);
497
- lines.push(` }).then((response) => {`);
498
- lines.push(` expect(response.status).to.eq(${successStatus});`);
499
- lines.push(` expect(response.body).to.be.an('object');`);
500
- lines.push(` });`);
501
- lines.push(` });`);
502
- lines.push(``);
503
- if (authRequired) {
504
- lines.push(` it('should return 401 without auth token', () => {`);
505
- lines.push(` cy.request({`);
506
- lines.push(` method: '${method}',`);
507
- lines.push(` url: '${endpoint.path}',`);
508
- lines.push(` body: {},`);
509
- lines.push(` failOnStatusCode: false, // RULE-CY03`);
510
- lines.push(` }).then((response) => {`);
511
- lines.push(` expect(response.status).to.eq(401);`);
512
- lines.push(` });`);
513
- lines.push(` });`);
477
+
478
+ @Test
479
+ void shouldReturn401WhenUnauthenticated() throws Exception {
480
+ mockMvc.perform(${method.toLowerCase()}("${endpointPath}"))
481
+ .andExpect(status().isUnauthorized());
514
482
  }
515
- lines.push(`});`);
516
- lines.push(``);
517
- return lines.join('\n');
518
483
  }
519
- function renderTemplate(ctx, opts) {
520
- const { language, testType } = opts;
484
+ `;
485
+ return header + body.trimStart();
486
+ }
487
+ // ─── Public API ───────────────────────────────────────────────────────────────
488
+ /** Render test file content for a given gap and context */
489
+ function renderTemplate(gap, ctx) {
490
+ const { language } = ctx;
521
491
  if (language === 'python') {
522
- return renderPythonPytestUnit(ctx);
492
+ return renderPythonEndpoint(gap, ctx);
523
493
  }
524
494
  if (language === 'java' || language === 'kotlin') {
525
- return renderJavaJunit5Unit(ctx);
495
+ return renderJavaEndpoint(gap, ctx);
526
496
  }
527
- // Default: TypeScript
528
- switch (testType) {
529
- case 'security':
530
- return renderTypescriptJestSecurity(ctx);
531
- case 'integration':
532
- return renderTypescriptJestIntegration(ctx);
533
- case 'cypress':
534
- return renderCypressEndpoint(ctx);
497
+ // TypeScript / JavaScript (Jest, Cypress, Playwright)
498
+ switch (gap.type) {
499
+ case 'endpoint:missing':
500
+ return renderEndpointMissing(gap, ctx);
501
+ case 'parameter:missing':
502
+ return renderParameterMissing(gap, ctx);
503
+ case 'parameter:not-validated':
504
+ return renderParameterNotValidated(gap, ctx);
505
+ case 'business:missing':
506
+ return renderBusinessMissing(gap, ctx);
507
+ case 'integration:missing-step':
508
+ return renderIntegrationMissingStep(gap, ctx);
509
+ case 'error:missing-status':
510
+ return renderErrorMissingStatus(gap, ctx);
511
+ case 'security:missing-auth':
512
+ return renderSecurityMissingAuth(gap, ctx);
513
+ case 'security:injection':
514
+ return renderSecurityInjection(gap, ctx);
515
+ case 'performance:missing-sla':
516
+ return renderPerformanceMissingSla(gap, ctx);
517
+ case 'resilience:missing-retry':
518
+ return renderResilienceMissingRetry(gap, ctx);
535
519
  default:
536
- // Differentiate by gap type
537
- switch (ctx.gap.type) {
538
- case 'error':
539
- return renderTypescriptJestErrorScenario(ctx);
540
- case 'business':
541
- return renderTypescriptJestBusinessRule(ctx);
542
- default:
543
- return renderTypescriptJestUnit(ctx);
544
- }
520
+ return renderEndpointMissing(gap, ctx);
545
521
  }
546
522
  }
523
+ /** Returns the template name used for a given gap type */
524
+ function getTemplateName(gap, ctx) {
525
+ return `${ctx.language}/${ctx.framework}/${gap.type}`;
526
+ }