api-tests-coverage 1.0.9 → 1.0.11
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.
- package/dist/dashboard/assets/{_basePickBy-CW9m1gAF.js → _basePickBy-DZR484hj.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-Cz9Wv_1o.js → _baseUniq-BZHS9wTU.js} +1 -1
- package/dist/dashboard/{dist/assets/arc-D1c5N9j9.js → assets/arc-D4xT0thw.js} +1 -1
- package/dist/dashboard/{dist/assets/architectureDiagram-VXUJARFQ-DCThDJJL.js → assets/architectureDiagram-VXUJARFQ-Bs48s9rH.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-VD42YOAC-7WLq10tc.js → blockDiagram-VD42YOAC-BvkiW8lj.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-YG6GDRKO-DQ6F3dCg.js → c4Diagram-YG6GDRKO-DuP3tG_c.js} +1 -1
- package/dist/dashboard/assets/channel-YFEOkJua.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-9d8ahBcQ.js → chunk-4BX2VUAB-BrU7mtb9.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-DoDGO_Bn.js → chunk-55IACEB6-DwsmCNp_.js} +1 -1
- package/dist/dashboard/{dist/assets/chunk-B4BG7PRW-DtOAWUMl.js → assets/chunk-B4BG7PRW-D5WlZonc.js} +1 -1
- package/dist/dashboard/{dist/assets/chunk-DI55MBZ5-D8EspuAI.js → assets/chunk-DI55MBZ5-B-xsiGYI.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-2n8Ehv6e.js → chunk-FMBD7UC4-DRb5NEMr.js} +1 -1
- package/dist/dashboard/assets/{chunk-QN33PNHL-C_ll8qBD.js → chunk-QN33PNHL-BRSlHScq.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-DELgunJM.js → chunk-QZHKN3VN-Cix7nLqx.js} +1 -1
- package/dist/dashboard/assets/{chunk-TZMSLE5B-NWlzmrEM.js → chunk-TZMSLE5B-BtXpcWN4.js} +1 -1
- package/dist/dashboard/assets/classDiagram-2ON5EDUG-CE9rmEXI.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-CE9rmEXI.js +1 -0
- package/dist/dashboard/assets/clone-BAVNftx6.js +1 -0
- package/dist/dashboard/{dist/assets/cose-bilkent-S5V4N54A-CqMWoTVR.js → assets/cose-bilkent-S5V4N54A-DrNDePwE.js} +1 -1
- package/dist/dashboard/assets/{dagre-6UL2VRFP-B317hoVZ.js → dagre-6UL2VRFP-DgEqrxGj.js} +1 -1
- package/dist/dashboard/assets/{diagram-PSM6KHXK-BD57GDxW.js → diagram-PSM6KHXK-Y-M5J_PO.js} +1 -1
- package/dist/dashboard/assets/{diagram-QEK2KX5R-B7vZx7ZZ.js → diagram-QEK2KX5R-BXMS0hEZ.js} +1 -1
- package/dist/dashboard/assets/{diagram-S2PKOQOG-C-Eeg0BN.js → diagram-S2PKOQOG-Bk_jyoxg.js} +1 -1
- package/dist/dashboard/{dist/assets/erDiagram-Q2GNP2WA-DfYB0TOu.js → assets/erDiagram-Q2GNP2WA-BbPQp6RA.js} +1 -1
- package/dist/dashboard/{dist/assets/flowDiagram-NV44I4VS-BkheLOyQ.js → assets/flowDiagram-NV44I4VS-1j044bLK.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-JELNMOA3-DbNp3CL8.js → ganttDiagram-JELNMOA3-Cjy_BOl2.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-V2S2FVAM-C5VOCa_s.js → gitGraphDiagram-V2S2FVAM-RgQMxxaQ.js} +1 -1
- package/dist/dashboard/assets/{graph-Ci7CYTIy.js → graph-BVGuJ5gs.js} +1 -1
- package/dist/dashboard/assets/index-Bt72YjAZ.css +1 -0
- package/dist/dashboard/assets/{index-DE34Ncpq.js → index-DuT2LnIf.js} +97 -96
- package/dist/dashboard/assets/{infoDiagram-HS3SLOUP-CIfsVrgN.js → infoDiagram-HS3SLOUP-CxmZGT-4.js} +1 -1
- package/dist/dashboard/{dist/assets/journeyDiagram-XKPGCS4Q-8I66yxzt.js → assets/journeyDiagram-XKPGCS4Q-CdvZAxeA.js} +1 -1
- package/dist/dashboard/{dist/assets/kanban-definition-3W4ZIXB7-DOmr-NQ9.js → assets/kanban-definition-3W4ZIXB7-DTse5xX8.js} +1 -1
- package/dist/dashboard/{dist/assets/layout-BTQZOyDZ.js → assets/layout-CnKzeCpQ.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-VGOIOE7T-CqWkxJdf.js → mindmap-definition-VGOIOE7T-BVsYbH_c.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-ADFJNKIX-BCADLXzp.js → pieDiagram-ADFJNKIX-BpwMMFZ3.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-AYHSOK5B-Dg_6Vh1Q.js → quadrantDiagram-AYHSOK5B-C6NljtBN.js} +1 -1
- package/dist/dashboard/{dist/assets/requirementDiagram-UZGBJVZJ-CA87MpOS.js → assets/requirementDiagram-UZGBJVZJ-Ban4o6oK.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-TZEHDZUN-CHnIdrhm.js → sankeyDiagram-TZEHDZUN-BDImwZtB.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-WL72ISMW-Dp6xL301.js → sequenceDiagram-WL72ISMW-nMYJrjDT.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FKZM4ZOC-DxGFYBLI.js → stateDiagram-FKZM4ZOC-DkBAMCJV.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-CtkfyoSn.js +1 -0
- package/dist/dashboard/{dist/assets/timeline-definition-IT6M3QCI-CrMAvKwo.js → assets/timeline-definition-IT6M3QCI-CGUDCWFx.js} +1 -1
- package/dist/dashboard/{dist/assets/treemap-GDKQZRPO-C7e3LA34.js → assets/treemap-GDKQZRPO-D-XpcCUD.js} +1 -1
- package/dist/dashboard/{dist/assets/xychartDiagram-PRI3JC2R-DBeb02lL.js → assets/xychartDiagram-PRI3JC2R-BlIpbwyn.js} +1 -1
- package/dist/dashboard/dist/assets/{_basePickBy--qgenNPq.js → _basePickBy-DZR484hj.js} +1 -1
- package/dist/dashboard/dist/assets/_basePickBy-_zJIZmFM.js +1 -0
- package/dist/dashboard/dist/assets/{_baseUniq-CUHm9crC.js → _baseUniq-BZHS9wTU.js} +1 -1
- package/dist/dashboard/dist/assets/_baseUniq-CUKBQ2bc.js +1 -0
- package/dist/dashboard/{assets/arc-DT25_rOH.js → dist/assets/arc-BDOeMmjX.js} +1 -1
- package/dist/dashboard/dist/assets/arc-D4xT0thw.js +1 -0
- package/dist/dashboard/{assets/architectureDiagram-VXUJARFQ-sddHV_RY.js → dist/assets/architectureDiagram-VXUJARFQ-BUdFGrlT.js} +1 -1
- package/dist/dashboard/dist/assets/architectureDiagram-VXUJARFQ-Bs48s9rH.js +36 -0
- package/dist/dashboard/dist/assets/{blockDiagram-VD42YOAC-BZ7-TACV.js → blockDiagram-VD42YOAC-BvkiW8lj.js} +1 -1
- package/dist/dashboard/dist/assets/blockDiagram-VD42YOAC-D-TzNNzc.js +122 -0
- package/dist/dashboard/dist/assets/{c4Diagram-YG6GDRKO-BebrJmGB.js → c4Diagram-YG6GDRKO-DuP3tG_c.js} +1 -1
- package/dist/dashboard/dist/assets/c4Diagram-YG6GDRKO-ZEVciqTW.js +10 -0
- package/dist/dashboard/dist/assets/channel-CyXkK5KC.js +1 -0
- package/dist/dashboard/dist/assets/channel-YFEOkJua.js +1 -0
- package/dist/dashboard/dist/assets/{chunk-4BX2VUAB-C2PVph5w.js → chunk-4BX2VUAB-B9cIE1K2.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-4BX2VUAB-BrU7mtb9.js +1 -0
- package/dist/dashboard/dist/assets/{chunk-55IACEB6-BL2iYVPK.js → chunk-55IACEB6-BzCzmNUn.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-55IACEB6-DwsmCNp_.js +1 -0
- package/dist/dashboard/{assets/chunk-B4BG7PRW-BTnP2N-l.js → dist/assets/chunk-B4BG7PRW-B3IrqteW.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-B4BG7PRW-D5WlZonc.js +165 -0
- package/dist/dashboard/{assets/chunk-DI55MBZ5-DXohPVKZ.js → dist/assets/chunk-DI55MBZ5-B-xsiGYI.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-DI55MBZ5-CSRqV3_6.js +220 -0
- package/dist/dashboard/dist/assets/{chunk-FMBD7UC4-DVV3MUyn.js → chunk-FMBD7UC4-CtTcDWZJ.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-FMBD7UC4-DRb5NEMr.js +15 -0
- package/dist/dashboard/dist/assets/{chunk-QN33PNHL-CNOKKDgF.js → chunk-QN33PNHL-BRSlHScq.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-QN33PNHL-JcQZ0Q-Q.js +1 -0
- package/dist/dashboard/dist/assets/{chunk-QZHKN3VN-b10c-Iks.js → chunk-QZHKN3VN-Cix7nLqx.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-QZHKN3VN-T5hoQANf.js +1 -0
- package/dist/dashboard/dist/assets/{chunk-TZMSLE5B-BkI0RHW5.js → chunk-TZMSLE5B-BtXpcWN4.js} +1 -1
- package/dist/dashboard/dist/assets/chunk-TZMSLE5B-DqMNcR7I.js +1 -0
- package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-CE9rmEXI.js +1 -0
- package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-o8p5Y0H9.js +1 -0
- package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-CE9rmEXI.js +1 -0
- package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-o8p5Y0H9.js +1 -0
- package/dist/dashboard/dist/assets/clone-BAVNftx6.js +1 -0
- package/dist/dashboard/dist/assets/clone-BmpQ0ely.js +1 -0
- package/dist/dashboard/{assets/cose-bilkent-S5V4N54A-B4WnMQqX.js → dist/assets/cose-bilkent-S5V4N54A-DrNDePwE.js} +1 -1
- package/dist/dashboard/dist/assets/cose-bilkent-S5V4N54A-GjySlYac.js +1 -0
- package/dist/dashboard/dist/assets/{dagre-6UL2VRFP-BcmqdcVT.js → dagre-6UL2VRFP-CUx6EwnW.js} +1 -1
- package/dist/dashboard/dist/assets/dagre-6UL2VRFP-DgEqrxGj.js +4 -0
- package/dist/dashboard/dist/assets/{diagram-PSM6KHXK-Dxe_ZeID.js → diagram-PSM6KHXK-D__FKIzE.js} +1 -1
- package/dist/dashboard/dist/assets/diagram-PSM6KHXK-Y-M5J_PO.js +24 -0
- package/dist/dashboard/dist/assets/{diagram-QEK2KX5R-wQ8wk_wm.js → diagram-QEK2KX5R-1hjfopmw.js} +1 -1
- package/dist/dashboard/dist/assets/diagram-QEK2KX5R-BXMS0hEZ.js +43 -0
- package/dist/dashboard/dist/assets/{diagram-S2PKOQOG-DE_7OyI2.js → diagram-S2PKOQOG--oRtrIMC.js} +1 -1
- package/dist/dashboard/dist/assets/diagram-S2PKOQOG-Bk_jyoxg.js +24 -0
- package/dist/dashboard/{assets/erDiagram-Q2GNP2WA-Sr67kxaS.js → dist/assets/erDiagram-Q2GNP2WA-BbPQp6RA.js} +1 -1
- package/dist/dashboard/dist/assets/erDiagram-Q2GNP2WA-DZpjLrp5.js +60 -0
- package/dist/dashboard/{assets/flowDiagram-NV44I4VS-BwsBHwQ2.js → dist/assets/flowDiagram-NV44I4VS-1j044bLK.js} +1 -1
- package/dist/dashboard/dist/assets/flowDiagram-NV44I4VS-CBnhpWKd.js +162 -0
- package/dist/dashboard/dist/assets/{ganttDiagram-JELNMOA3-Dv0TS2qN.js → ganttDiagram-JELNMOA3-BA65eVi0.js} +1 -1
- package/dist/dashboard/dist/assets/ganttDiagram-JELNMOA3-Cjy_BOl2.js +267 -0
- package/dist/dashboard/dist/assets/{gitGraphDiagram-V2S2FVAM-Co8phpa1.js → gitGraphDiagram-V2S2FVAM-CWo2OK69.js} +1 -1
- package/dist/dashboard/dist/assets/gitGraphDiagram-V2S2FVAM-RgQMxxaQ.js +65 -0
- package/dist/dashboard/dist/assets/{graph-D8K70adm.js → graph-BVGuJ5gs.js} +1 -1
- package/dist/dashboard/dist/assets/graph-CpRVMcWW.js +1 -0
- package/dist/dashboard/dist/assets/index-Bt72YjAZ.css +1 -0
- package/dist/dashboard/dist/assets/index-D-AtVpd2.js +523 -0
- package/dist/dashboard/dist/assets/{index-BJlq7ORf.js → index-DuT2LnIf.js} +97 -96
- package/dist/dashboard/dist/assets/{infoDiagram-HS3SLOUP-Qwosd--X.js → infoDiagram-HS3SLOUP-CxmZGT-4.js} +1 -1
- package/dist/dashboard/dist/assets/infoDiagram-HS3SLOUP-D3SFXNAS.js +2 -0
- package/dist/dashboard/{assets/journeyDiagram-XKPGCS4Q-D8CW3fPs.js → dist/assets/journeyDiagram-XKPGCS4Q-Bv1IeJ8A.js} +1 -1
- package/dist/dashboard/dist/assets/journeyDiagram-XKPGCS4Q-CdvZAxeA.js +139 -0
- package/dist/dashboard/{assets/kanban-definition-3W4ZIXB7-CpaumI4L.js → dist/assets/kanban-definition-3W4ZIXB7-BvWm-0QQ.js} +1 -1
- package/dist/dashboard/dist/assets/kanban-definition-3W4ZIXB7-DTse5xX8.js +89 -0
- package/dist/dashboard/{assets/layout-zud4xhhe.js → dist/assets/layout-CnKzeCpQ.js} +1 -1
- package/dist/dashboard/dist/assets/layout-JbkTCGhr.js +1 -0
- package/dist/dashboard/dist/assets/{mindmap-definition-VGOIOE7T-DnAHPuGZ.js → mindmap-definition-VGOIOE7T-BVsYbH_c.js} +1 -1
- package/dist/dashboard/dist/assets/mindmap-definition-VGOIOE7T-D001Ygrx.js +68 -0
- package/dist/dashboard/dist/assets/{pieDiagram-ADFJNKIX-Dj5EZ8Xw.js → pieDiagram-ADFJNKIX-BpwMMFZ3.js} +1 -1
- package/dist/dashboard/dist/assets/pieDiagram-ADFJNKIX-EeNihpUP.js +30 -0
- package/dist/dashboard/dist/assets/{quadrantDiagram-AYHSOK5B-BElhVhB9.js → quadrantDiagram-AYHSOK5B-Bwppivuy.js} +1 -1
- package/dist/dashboard/dist/assets/quadrantDiagram-AYHSOK5B-C6NljtBN.js +7 -0
- package/dist/dashboard/{assets/requirementDiagram-UZGBJVZJ-CcLac02-.js → dist/assets/requirementDiagram-UZGBJVZJ-Ban4o6oK.js} +1 -1
- package/dist/dashboard/dist/assets/requirementDiagram-UZGBJVZJ-BfAcJrqc.js +64 -0
- package/dist/dashboard/dist/assets/{sankeyDiagram-TZEHDZUN-sc1Ndkyn.js → sankeyDiagram-TZEHDZUN-BDImwZtB.js} +1 -1
- package/dist/dashboard/dist/assets/sankeyDiagram-TZEHDZUN-BFNTuDV7.js +10 -0
- package/dist/dashboard/dist/assets/{sequenceDiagram-WL72ISMW-Dv5Zx3Tb.js → sequenceDiagram-WL72ISMW-1d8_kyI3.js} +1 -1
- package/dist/dashboard/dist/assets/sequenceDiagram-WL72ISMW-nMYJrjDT.js +145 -0
- package/dist/dashboard/dist/assets/{stateDiagram-FKZM4ZOC-R3tg0iuT.js → stateDiagram-FKZM4ZOC-DKkWVu_K.js} +1 -1
- package/dist/dashboard/dist/assets/stateDiagram-FKZM4ZOC-DkBAMCJV.js +1 -0
- package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-B0euQu1p.js +1 -0
- package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-CtkfyoSn.js +1 -0
- package/dist/dashboard/{assets/timeline-definition-IT6M3QCI-BdvWQ55q.js → dist/assets/timeline-definition-IT6M3QCI-CGUDCWFx.js} +1 -1
- package/dist/dashboard/dist/assets/timeline-definition-IT6M3QCI-CsRS0WGC.js +61 -0
- package/dist/dashboard/{assets/treemap-GDKQZRPO-DX-9Cs8K.js → dist/assets/treemap-GDKQZRPO-CBle3d0d.js} +1 -1
- package/dist/dashboard/dist/assets/treemap-GDKQZRPO-D-XpcCUD.js +162 -0
- package/dist/dashboard/{assets/xychartDiagram-PRI3JC2R-C2KcyFpw.js → dist/assets/xychartDiagram-PRI3JC2R-BlIpbwyn.js} +1 -1
- package/dist/dashboard/dist/assets/xychartDiagram-PRI3JC2R-ByLRWyI2.js +7 -0
- package/dist/dashboard/dist/index.html +2 -2
- package/dist/dashboard/index.html +2 -2
- package/dist/src/businessCoverage.d.ts.map +1 -1
- package/dist/src/businessCoverage.js +53 -2
- package/dist/src/index.js +134 -18
- package/dist/src/inference/routeInference.d.ts.map +1 -1
- package/dist/src/inference/routeInference.js +87 -1
- package/package.json +1 -1
- package/dist/dashboard/assets/channel-CJN0ayk9.js +0 -1
- package/dist/dashboard/assets/classDiagram-2ON5EDUG-DD7jeLQl.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-DD7jeLQl.js +0 -1
- package/dist/dashboard/assets/clone-CdC-VoG4.js +0 -1
- package/dist/dashboard/assets/index-HrRX8fCW.css +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-l_xKoe09.js +0 -1
- package/dist/dashboard/dist/assets/channel-B7nagIQI.js +0 -1
- package/dist/dashboard/dist/assets/classDiagram-2ON5EDUG-BaWA959r.js +0 -1
- package/dist/dashboard/dist/assets/classDiagram-v2-WZHVMYZB-BaWA959r.js +0 -1
- package/dist/dashboard/dist/assets/clone-9jVj5p80.js +0 -1
- package/dist/dashboard/dist/assets/index-HrRX8fCW.css +0 -1
- package/dist/dashboard/dist/assets/stateDiagram-v2-4FDKWEC3-DKN4XxW9.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Nt,H as yi,e as mi,y as bi,F as Ct,i as Ai,D as Yt,E as wi,L as Ci,M as Bt,N as Si,K as Wt,O as zt}from"./index-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Nt,H as yi,e as mi,y as bi,F as Ct,i as Ai,D as Yt,E as wi,L as Ci,M as Bt,N as Si,K as Wt,O as zt}from"./index-DuT2LnIf.js";var mt=function(){var s=n(function(W,r,u,g){for(u=u||{},g=W.length;g--;u[W[g]]=r);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],c=[1,6],d=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],b=[1,25],P=[1,26],I=[1,28],R=[1,29],L=[1,30],z=[1,31],F=[1,32],D=[1,33],V=[1,34],f=[1,35],C=[1,36],l=[1,37],M=[1,43],B=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],k=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],w=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],$={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,u,g,x,A,o,nt){var p=o.length-1;switch(A){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:this.$=[Number(o[p-2]),...o[p]];break;case 21:this.$=[Number(o[p])];break;case 22:x.setXAxisTitle(o[p]);break;case 23:x.setXAxisTitle(o[p-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[p]);break;case 26:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 27:this.$=o[p-1];break;case 28:this.$=[o[p-2],...o[p]];break;case 29:this.$=[o[p]];break;case 30:x.setYAxisTitle(o[p]);break;case 31:x.setYAxisTitle(o[p-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 37:this.$={text:o[p],type:"text"};break;case 38:this.$={text:o[p],type:"text"};break;case 39:this.$={text:o[p],type:"markdown"};break;case 40:this.$=o[p];break;case 41:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:c,36:d}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:c,36:d}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:c,36:d}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(m,[2,34]),s(m,[2,35]),s(m,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:c,36:d}),{1:[2,3]},s(m,[2,5]),s(t,[2,7],{4:22,34:a,35:c,36:d}),{11:23,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:45,15:44,27:U,33:46,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:49,17:48,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:52,17:51,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{20:[1,53]},{22:[1,54]},s(h,[2,18]),{1:[2,2]},s(h,[2,8]),s(h,[2,9]),s(k,[2,37],{40:55,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l}),s(k,[2,38]),s(k,[2,39]),s(w,[2,40]),s(w,[2,42]),s(w,[2,43]),s(w,[2,44]),s(w,[2,45]),s(w,[2,46]),s(w,[2,47]),s(w,[2,48]),s(w,[2,49]),s(w,[2,50]),s(w,[2,51]),s(h,[2,10]),s(h,[2,22],{30:41,29:56,24:M,27:B}),s(h,[2,24]),s(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,11]),s(h,[2,30],{33:60,27:U}),s(h,[2,32]),{31:[1,61]},s(h,[2,12]),{17:62,24:X},{25:63,27:S},s(h,[2,14]),{17:65,24:X},s(h,[2,16]),s(h,[2,17]),s(w,[2,41]),s(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(h,[2,31]),{27:[1,69]},s(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(h,[2,15]),s(h,[2,26]),s(h,[2,27]),{11:59,32:72,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,33]),s(h,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],A=[null],o=[],nt=this.table,p="",lt=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),_=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);_.setInput(r,Y.yy),Y.yy.lexer=_,Y.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;o.push(pt);var ci=_.options&&_.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){g.length=g.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||_.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=u.symbols_[v]||v),v}n(Vt,"lex");for(var T,H,E,ft,q={},ct,O,Mt,ut;;){if(H=g[g.length-1],this.defaultActions[H]?E=this.defaultActions[H]:((T===null||typeof T>"u")&&(T=Vt()),E=nt[H]&&nt[H][T]),typeof E>"u"||!E.length||!E[0]){var yt="";ut=[];for(ct in nt[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");_.showPosition?yt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[T]||T)+"'":yt="Parse error on line "+(lt+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:pt,expected:ut})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+T);switch(E[0]){case 1:g.push(T),A.push(_.yytext),o.push(_.yylloc),g.push(E[1]),T=null,Et=_.yyleng,p=_.yytext,lt=_.yylineno,pt=_.yylloc;break;case 2:if(O=this.productions_[E[1]][1],q.$=A[A.length-O],q._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ci&&(q._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(q,[p,Et,lt,Y.yy,E[1],A,o].concat(li)),typeof ft<"u")return ft;O&&(g=g.slice(0,-1*O*2),A=A.slice(0,-1*O),o=o.slice(0,-1*O)),g.push(this.productions_[E[1]][0]),A.push(q.$),o.push(q._$),Mt=nt[g[g.length-2]][g[g.length-1]],g.push(Mt);break;case 3:return!0}}return!0},"parse")},Lt=function(){var W={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Nt,H as yi,e as mi,y as bi,F as Ct,i as Ai,D as Yt,E as wi,L as Ci,M as Bt,N as Si,K as Wt,O as zt}from"./index-D-AtVpd2.js";var mt=function(){var s=n(function(W,r,u,g){for(u=u||{},g=W.length;g--;u[W[g]]=r);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],c=[1,6],d=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],b=[1,25],P=[1,26],I=[1,28],R=[1,29],L=[1,30],z=[1,31],F=[1,32],D=[1,33],V=[1,34],f=[1,35],C=[1,36],l=[1,37],M=[1,43],B=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],k=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],w=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],$={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,u,g,x,A,o,nt){var p=o.length-1;switch(A){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:this.$=[Number(o[p-2]),...o[p]];break;case 21:this.$=[Number(o[p])];break;case 22:x.setXAxisTitle(o[p]);break;case 23:x.setXAxisTitle(o[p-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[p]);break;case 26:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 27:this.$=o[p-1];break;case 28:this.$=[o[p-2],...o[p]];break;case 29:this.$=[o[p]];break;case 30:x.setYAxisTitle(o[p]);break;case 31:x.setYAxisTitle(o[p-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 37:this.$={text:o[p],type:"text"};break;case 38:this.$={text:o[p],type:"text"};break;case 39:this.$={text:o[p],type:"markdown"};break;case 40:this.$=o[p];break;case 41:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:c,36:d}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:c,36:d}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:c,36:d}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(m,[2,34]),s(m,[2,35]),s(m,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:c,36:d}),{1:[2,3]},s(m,[2,5]),s(t,[2,7],{4:22,34:a,35:c,36:d}),{11:23,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:45,15:44,27:U,33:46,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:49,17:48,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:52,17:51,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{20:[1,53]},{22:[1,54]},s(h,[2,18]),{1:[2,2]},s(h,[2,8]),s(h,[2,9]),s(k,[2,37],{40:55,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l}),s(k,[2,38]),s(k,[2,39]),s(w,[2,40]),s(w,[2,42]),s(w,[2,43]),s(w,[2,44]),s(w,[2,45]),s(w,[2,46]),s(w,[2,47]),s(w,[2,48]),s(w,[2,49]),s(w,[2,50]),s(w,[2,51]),s(h,[2,10]),s(h,[2,22],{30:41,29:56,24:M,27:B}),s(h,[2,24]),s(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,11]),s(h,[2,30],{33:60,27:U}),s(h,[2,32]),{31:[1,61]},s(h,[2,12]),{17:62,24:X},{25:63,27:S},s(h,[2,14]),{17:65,24:X},s(h,[2,16]),s(h,[2,17]),s(w,[2,41]),s(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(h,[2,31]),{27:[1,69]},s(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(h,[2,15]),s(h,[2,26]),s(h,[2,27]),{11:59,32:72,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,33]),s(h,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],A=[null],o=[],nt=this.table,p="",lt=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),_=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);_.setInput(r,Y.yy),Y.yy.lexer=_,Y.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;o.push(pt);var ci=_.options&&_.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){g.length=g.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||_.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=u.symbols_[v]||v),v}n(Vt,"lex");for(var T,H,E,ft,q={},ct,O,Mt,ut;;){if(H=g[g.length-1],this.defaultActions[H]?E=this.defaultActions[H]:((T===null||typeof T>"u")&&(T=Vt()),E=nt[H]&&nt[H][T]),typeof E>"u"||!E.length||!E[0]){var yt="";ut=[];for(ct in nt[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");_.showPosition?yt="Parse error on line "+(lt+1)+`:
|
|
2
|
+
`+_.showPosition()+`
|
|
3
|
+
Expecting `+ut.join(", ")+", got '"+(this.terminals_[T]||T)+"'":yt="Parse error on line "+(lt+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:pt,expected:ut})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+T);switch(E[0]){case 1:g.push(T),A.push(_.yytext),o.push(_.yylloc),g.push(E[1]),T=null,Et=_.yyleng,p=_.yytext,lt=_.yylineno,pt=_.yylloc;break;case 2:if(O=this.productions_[E[1]][1],q.$=A[A.length-O],q._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ci&&(q._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(q,[p,Et,lt,Y.yy,E[1],A,o].concat(li)),typeof ft<"u")return ft;O&&(g=g.slice(0,-1*O*2),A=A.slice(0,-1*O),o=o.slice(0,-1*O)),g.push(this.productions_[E[1]][0]),A.push(q.$),o.push(q._$),Mt=nt[g[g.length-2]][g[g.length-1]],g.push(Mt);break;case 3:return!0}}return!0},"parse")},Lt=function(){var W={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:n(function(r,u){var g,x,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),x=r[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var o in A)this[o]=A[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,u,g,x;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),o=0;o<A.length;o++)if(g=this._input.match(this.rules[A[o]]),g&&(!u||g[0].length>u[0].length)){if(u=g,x=o,this.options.backtrack_lexer){if(r=this.test_match(g,A[o]),r!==!1)return r;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(r=this.test_match(u,A[x]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var u=this.next();return u||this.lex()},"lex"),begin:n(function(u){this.conditionStack.push(u)},"begin"),popState:n(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:n(function(u){this.begin(u)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(u,g,x,A){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return W}();$.lexer=Lt;function N(){this.yy={}}return n(N,"Parser"),N.prototype=$,$.Parser=N,new N}();mt.parser=mt;var _i=mt;function bt(s){return s.type==="bar"}n(bt,"isBarPlot");function St(s){return s.type==="band"}n(St,"isBandAxisData");function G(s){return s.type==="linear"}n(G,"isLinearAxisData");var j,Ht=(j=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((c,d)=>Math.max(d.length,c),0)*i,height:i};const e={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const c of t){const d=Si(a,1,c),m=d?d.width:c.length*i,b=d?d.height:i;e.width=Math.max(e.width,m),e.height=Math.max(e.height,b)}return a.remove(),e}},n(j,"TextDimensionCalculatorWithFont"),j),Ft=.7,Ot=.2,Q,Ut=(Q=class{constructor(t,i,e,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ft*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ft*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),a=Ot*t.width;this.outerPadding=Math.min(e.width/2,a);const c=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,c<=i&&(i-=c,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),a=Ot*t.height;this.outerPadding=Math.min(e.height/2,a);const c=e.width+this.axisConfig.labelPadding*2;c<=i&&(i-=c,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n(Q,"BaseAxis"),Q),K,ki=(K=class extends Ut{constructor(t,i,e,a,c){super(t,a,c,i),this.categories=e,this.scale=Bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n(K,"BandAxis"),K),Z,Ti=(Z=class extends Ut{constructor(t,i,e,a,c){super(t,a,c,i),this.domain=e,this.scale=Wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n(Z,"LinearAxis"),Z);function At(s,t,i,e){const a=new Ht(e);return St(s)?new ki(t,i,s.categories,s.title,a):new Ti(t,i,[s.min,s.max],s.title,a)}n(At,"getAxis");var J,Ri=(J=class{constructor(t,i,e,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},n(J,"ChartTitle"),J);function $t(s,t,i,e){const a=new Ht(e);return new Ri(a,s,t,i)}n($t,"getChartTitleComponent");var tt,Di=(tt=class{constructor(t,i,e,a,c){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=a,this.plotIndex=c}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=zt().y(e=>e[0]).x(e=>e[1])(t):i=zt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n(tt,"LinePlot"),tt),it,vi=(it=class{constructor(t,i,e,a,c,d){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=a,this.orientation=c,this.plotIndex=d}getDrawableElement(){const t=this.barData.data.map(c=>[this.xAxis.getScaleValue(c[0]),this.yAxis.getScaleValue(c[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(c=>({x:this.boundingRect.x,y:c[0]-a,height:e,width:c[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(c=>({x:c[0]-a,y:c[1],width:e,height:this.boundingRect.y+this.boundingRect.height-c[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n(it,"BarPlot"),it),et,Pi=(et=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const a=new Di(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{const a=new vi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},n(et,"BasePlot"),et);function qt(s,t,i){return new Pi(s,t,i)}n(qt,"getPlotComponent");var st,Li=(st=class{constructor(t,i,e,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,e,a),plot:qt(t,i,e),xAxis:At(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},a),yAxis:At(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),d=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:c,height:d});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("bottom"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=m.height,this.componentStore.yAxis.setAxisPosition("left"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=m.width,t-=m.width,t>0&&(c+=t,t=0),i>0&&(d+=i,i=0),this.componentStore.plot.calculateSpace({width:c,height:d}),this.componentStore.plot.setBoundingBoxXY({x:e,y:a}),this.componentStore.xAxis.setRange([e,e+c]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:a+d}),this.componentStore.yAxis.setRange([a,a+d]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(b=>bt(b))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,c=0,d=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),m=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),b=this.componentStore.plot.calculateSpace({width:d,height:m});t-=b.width,i-=b.height,b=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=b.height,i-=b.height,this.componentStore.xAxis.setAxisPosition("left"),b=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=b.width,a=b.width,this.componentStore.yAxis.setAxisPosition("top"),b=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=b.height,c=e+b.height,t>0&&(d+=t,t=0),i>0&&(m+=i,i=0),this.componentStore.plot.calculateSpace({width:d,height:m}),this.componentStore.plot.setBoundingBoxXY({x:a,y:c}),this.componentStore.yAxis.setRange([a,a+d]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:e}),this.componentStore.xAxis.setRange([c,c+m]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:c}),this.chartData.plots.some(P=>bt(P))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},n(st,"Orchestrator"),st),at,Ei=(at=class{static build(t,i,e,a){return new Li(t,i,e,a).getDrawableElement()}},n(at,"XYChartBuilder"),at),ot=0,Gt,rt=Tt(),ht=kt(),y=Rt(),wt=ht.plotColorPalette.split(",").map(s=>s.trim()),gt=!1,_t=!1;function kt(){const s=Ci(),t=Ct();return Yt(s.xyChart,t.themeVariables.xyChart)}n(kt,"getChartDefaultThemeConfig");function Tt(){const s=Ct();return Yt(wi.xyChart,s.xyChart)}n(Tt,"getChartDefaultConfig");function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(Rt,"getChartDefaultData");function xt(s){const t=Ct();return Ai(s.trim(),t)}n(xt,"textSanitizer");function jt(s){Gt=s}n(jt,"setTmpSVGG");function Qt(s){s==="horizontal"?rt.chartOrientation="horizontal":rt.chartOrientation="vertical"}n(Qt,"setOrientation");function Kt(s){y.xAxis.title=xt(s.text)}n(Kt,"setXAxisTitle");function Dt(s,t){y.xAxis={type:"linear",title:y.xAxis.title,min:s,max:t},gt=!0}n(Dt,"setXAxisRangeData");function Zt(s){y.xAxis={type:"band",title:y.xAxis.title,categories:s.map(t=>xt(t.text))},gt=!0}n(Zt,"setXAxisBand");function Jt(s){y.yAxis.title=xt(s.text)}n(Jt,"setYAxisTitle");function ti(s,t){y.yAxis={type:"linear",title:y.yAxis.title,min:s,max:t},_t=!0}n(ti,"setYAxisRangeData");function ii(s){const t=Math.min(...s),i=Math.max(...s),e=G(y.yAxis)?y.yAxis.min:1/0,a=G(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(e,t),max:Math.max(a,i)}}n(ii,"setYAxisRangeFromPlotData");function vt(s){let t=[];if(s.length===0)return t;if(!gt){const i=G(y.xAxis)?y.xAxis.min:1/0,e=G(y.xAxis)?y.xAxis.max:-1/0;Dt(Math.min(i,1),Math.max(e,s.length))}if(_t||ii(s),St(y.xAxis)&&(t=y.xAxis.categories.map((i,e)=>[i,s[e]])),G(y.xAxis)){const i=y.xAxis.min,e=y.xAxis.max,a=(e-i)/(s.length-1),c=[];for(let d=i;d<=e;d+=a)c.push(`${d}`);t=c.map((d,m)=>[d,s[m]])}return t}n(vt,"transformDataWithoutCategory");function Pt(s){return wt[s===0?0:s%wt.length]}n(Pt,"getPlotColorFromPalette");function ei(s,t){const i=vt(t);y.plots.push({type:"line",strokeFill:Pt(ot),strokeWidth:2,data:i}),ot++}n(ei,"setLineData");function si(s,t){const i=vt(t);y.plots.push({type:"bar",fill:Pt(ot),data:i}),ot++}n(si,"setBarData");function ai(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=Xt(),Ei.build(rt,y,ht,Gt)}n(ai,"getDrawableElem");function ni(){return ht}n(ni,"getChartThemeConfig");function oi(){return rt}n(oi,"getChartConfig");function ri(){return y}n(ri,"getXYChartData");var Ii=n(function(){bi(),ot=0,rt=Tt(),y=Rt(),ht=kt(),wt=ht.plotColorPalette.split(",").map(s=>s.trim()),gt=!1,_t=!1},"clear"),Vi={getDrawableElem:ai,clear:Ii,setAccTitle:fi,getAccTitle:pi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Dt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ni,getChartConfig:oi,getXYChartData:ri},Mi=n((s,t,i,e)=>{const a=e.db,c=a.getChartThemeConfig(),d=a.getChartConfig(),m=a.getXYChartData().plots[0].data.map(f=>f[1]);function b(f){return f==="top"?"text-before-edge":"middle"}n(b,"getDominantBaseLine");function P(f){return f==="left"?"start":f==="right"?"end":"middle"}n(P,"getTextAnchor");function I(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}n(I,"getTextTransformation"),Nt.debug(`Rendering xychart chart
|
|
7
|
+
`+s);const R=yi(t),L=R.append("g").attr("class","main"),z=L.append("rect").attr("width",d.width).attr("height",d.height).attr("class","background");mi(R,d.height,d.width,!0),R.attr("viewBox",`0 0 ${d.width} ${d.height}`),z.attr("fill",c.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const F=a.getDrawableElem(),D={};function V(f){let C=L,l="";for(const[M]of f.entries()){let B=L;M>0&&D[l]&&(B=D[l]),l+=f[M],C=D[l],C||(C=D[l]=B.append("g").attr("class",f[M]))}return C}n(V,"getGroup");for(const f of F){if(f.data.length===0)continue;const C=V(f.groupTexts);switch(f.type){case"rect":if(C.selectAll("rect").data(f.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),d.showDataLabel)if(d.chartOrientation==="horizontal"){let l=function(h,k){const{data:w,label:S}=h;return k*S.length*M<=w.width-10};n(l,"fitsHorizontally");const M=.7,B=f.data.map((h,k)=>({data:h,label:m[k].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=B.map(h=>{const{data:k}=h;let w=k.height*.7;for(;!l(h,w)&&w>0;)w-=1;return w}),X=Math.floor(Math.min(...U));C.selectAll("text").data(B).enter().append("text").attr("x",h=>h.data.x+h.data.width-10).attr("y",h=>h.data.y+h.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}else{let l=function(h,k,w){const{data:S,label:$}=h,N=k*$.length*.7,W=S.x+S.width/2,r=W-N/2,u=W+N/2,g=r>=S.x&&u<=S.x+S.width,x=S.y+w+k<=S.y+S.height;return g&&x};n(l,"fitsInBar");const M=10,B=f.data.map((h,k)=>({data:h,label:m[k].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=B.map(h=>{const{data:k,label:w}=h;let S=k.width/(w.length*.7);for(;!l(h,S,M)&&S>0;)S-=1;return S}),X=Math.floor(Math.min(...U));C.selectAll("text").data(B).enter().append("text").attr("x",h=>h.data.x+h.data.width/2).attr("y",h=>h.data.y+M).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}break;case"text":C.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>b(l.verticalPos)).attr("text-anchor",l=>P(l.horizontalPos)).attr("transform",l=>I(l)).text(l=>l.text);break;case"path":C.selectAll("path").data(f.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Bi={draw:Mi},zi={parser:_i,db:Vi,renderer:Bi};export{zi as diagram};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>API Coverage Analyzer Dashboard</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-D-AtVpd2.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bt72YjAZ.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>API Coverage Analyzer Dashboard</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DuT2LnIf.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bt72YjAZ.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessCoverage.d.ts","sourceRoot":"","sources":["../../src/businessCoverage.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,YAAY,CAAC;IACnB,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,qDAAqD;IACrD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,KAAK,EAAE,oBAAoB,EAAE,CAAC;CAC/B;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CA8BpE;
|
|
1
|
+
{"version":3,"file":"businessCoverage.d.ts","sourceRoot":"","sources":["../../src/businessCoverage.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,YAAY,CAAC;IACnB,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,qDAAqD;IACrD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,KAAK,EAAE,oBAAoB,EAAE,CAAC;CAC/B;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CA8BpE;AA4HD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,YAAY,EAAE,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAyDjC;AAID;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,oBAAoB,EAAE,GAChC,sBAAsB,CAOxB;AAID;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,sBAAsB,EAC9B,UAAU,EAAE,MAAM,GACjB,IAAI,CAgHN"}
|
|
@@ -83,8 +83,39 @@ function parseBusinessRules(rulesPath) {
|
|
|
83
83
|
/**
|
|
84
84
|
* Extract all test / it declarations from a file, together with their
|
|
85
85
|
* description string and the surrounding code up to the next declaration.
|
|
86
|
+
*
|
|
87
|
+
* Supports:
|
|
88
|
+
* - JS/TS: test("desc", ...) / it("desc", ...)
|
|
89
|
+
* - Java/Kotlin: @Test public void methodName() { ... }
|
|
86
90
|
*/
|
|
87
91
|
function extractTestEntries(filePath, fileContents) {
|
|
92
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
93
|
+
// ── Java / Kotlin ──────────────────────────────────────────────────────────
|
|
94
|
+
if (ext === '.java' || ext === '.kt' || ext === '.kts') {
|
|
95
|
+
const entries = [];
|
|
96
|
+
// Match @Test annotation followed (within a few lines) by a method declaration.
|
|
97
|
+
// Captures the method name as group 1.
|
|
98
|
+
const javaTestPattern = /@Test\b[^{]*?(?:public|protected|private|default)?\s+(?:\w+\s+)?(\w+)\s*\(\s*\)/g;
|
|
99
|
+
const positions = [];
|
|
100
|
+
let m;
|
|
101
|
+
while ((m = javaTestPattern.exec(fileContents)) !== null) {
|
|
102
|
+
const methodName = m[1];
|
|
103
|
+
// Convert snake_case / camelCase to space-separated for readability / matching
|
|
104
|
+
const desc = methodName.replace(/_/g, ' ');
|
|
105
|
+
positions.push({ start: m.index, desc });
|
|
106
|
+
}
|
|
107
|
+
for (let i = 0; i < positions.length; i++) {
|
|
108
|
+
const start = positions[i].start;
|
|
109
|
+
const end = i + 1 < positions.length ? positions[i + 1].start : fileContents.length;
|
|
110
|
+
entries.push({
|
|
111
|
+
description: positions[i].desc,
|
|
112
|
+
content: fileContents.slice(start, end),
|
|
113
|
+
filePath,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return entries;
|
|
117
|
+
}
|
|
118
|
+
// ── JS / TS ────────────────────────────────────────────────────────────────
|
|
88
119
|
const entries = [];
|
|
89
120
|
const declPattern = /\b(?:test|it)\s*\(\s*(['"`])([\s\S]*?)\1/g;
|
|
90
121
|
const positions = [];
|
|
@@ -108,21 +139,41 @@ function extractTestEntries(filePath, fileContents) {
|
|
|
108
139
|
*
|
|
109
140
|
* A match occurs when:
|
|
110
141
|
* 1. The test description contains `@rule <ruleId>` (case-insensitive), OR
|
|
111
|
-
* 2. The test description (lowercased) contains at least one of the keywords
|
|
142
|
+
* 2. The test description (lowercased) contains at least one of the keywords, OR
|
|
143
|
+
* 3. For Java/Kotlin tests: the test body contains ALL "specific" keywords
|
|
144
|
+
* (keywords with ≥ 8 chars, e.g. "authorization", "authentication").
|
|
145
|
+
* Generic short keywords like "null", "data", "first" are excluded from
|
|
146
|
+
* content matching to avoid false positives.
|
|
112
147
|
*/
|
|
113
148
|
function testMatchesKeywords(entry, ruleId, keywords) {
|
|
114
149
|
const descLower = entry.description.toLowerCase();
|
|
150
|
+
const ext = path.extname(entry.filePath).toLowerCase();
|
|
151
|
+
const isJavaLike = ext === '.java' || ext === '.kt' || ext === '.kts';
|
|
115
152
|
// Annotation-based match: @rule BL001
|
|
116
153
|
const annotationPattern = new RegExp(`@rule\\s+${ruleId}`, 'i');
|
|
117
154
|
if (annotationPattern.test(entry.description) || annotationPattern.test(entry.content)) {
|
|
118
155
|
return true;
|
|
119
156
|
}
|
|
120
|
-
// Keyword-based match
|
|
157
|
+
// Keyword-based match against description
|
|
121
158
|
for (const kw of keywords) {
|
|
122
159
|
if (descLower.includes(kw.toLowerCase())) {
|
|
123
160
|
return true;
|
|
124
161
|
}
|
|
125
162
|
}
|
|
163
|
+
// For Java/Kotlin: also search the test body for specific (long) keywords.
|
|
164
|
+
// Using a ≥8-char threshold avoids matching generic words like "null", "data",
|
|
165
|
+
// "first", "last", "header", "cursor" that appear in almost every test body.
|
|
166
|
+
if (isJavaLike) {
|
|
167
|
+
const specificKeywords = keywords.filter((k) => k.length >= 8);
|
|
168
|
+
if (specificKeywords.length > 0) {
|
|
169
|
+
const contentLower = entry.content.toLowerCase();
|
|
170
|
+
for (const kw of specificKeywords) {
|
|
171
|
+
if (contentLower.includes(kw.toLowerCase())) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
126
177
|
return false;
|
|
127
178
|
}
|
|
128
179
|
/**
|
package/dist/src/index.js
CHANGED
|
@@ -1010,6 +1010,7 @@ program
|
|
|
1010
1010
|
// its raw report object in CoverageResult.details, so we normalise here at
|
|
1011
1011
|
// read time to avoid touching the 11 coverage command implementations.
|
|
1012
1012
|
function normalizeDetailsForIntelligence(type, raw) {
|
|
1013
|
+
var _a, _b;
|
|
1013
1014
|
if (Array.isArray(raw))
|
|
1014
1015
|
return raw; // already normalised (e.g. dashboard sample)
|
|
1015
1016
|
if (!raw || typeof raw !== 'object')
|
|
@@ -1017,15 +1018,27 @@ function normalizeDetailsForIntelligence(type, raw) {
|
|
|
1017
1018
|
const obj = raw;
|
|
1018
1019
|
switch (type) {
|
|
1019
1020
|
case 'endpoint': {
|
|
1020
|
-
|
|
1021
|
+
// Spec-based: { endpoints: [{ method, path, covered }] }
|
|
1022
|
+
// Inferred: { items: [{ id: "GET /path", covered, matchedTests, source_file }] }
|
|
1023
|
+
const eps = ((_a = obj.endpoints) !== null && _a !== void 0 ? _a : obj.items);
|
|
1021
1024
|
if (!Array.isArray(eps))
|
|
1022
1025
|
return [];
|
|
1023
1026
|
return eps.map((e) => {
|
|
1024
1027
|
var _a;
|
|
1025
|
-
|
|
1026
|
-
|
|
1028
|
+
let method = e.method;
|
|
1029
|
+
let epPath = e.path;
|
|
1030
|
+
// Inferred format stores id as "METHOD /path"
|
|
1031
|
+
if (!method && !epPath && typeof e.id === 'string') {
|
|
1032
|
+
const parts = e.id.split(' ');
|
|
1033
|
+
if (parts.length >= 2) {
|
|
1034
|
+
method = parts[0];
|
|
1035
|
+
epPath = parts.slice(1).join(' ');
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
return {
|
|
1039
|
+
endpoint: { method, path: epPath },
|
|
1027
1040
|
covered: (_a = e.covered) !== null && _a !== void 0 ? _a : false,
|
|
1028
|
-
}
|
|
1041
|
+
};
|
|
1029
1042
|
});
|
|
1030
1043
|
}
|
|
1031
1044
|
case 'parameter': {
|
|
@@ -1083,17 +1096,52 @@ function normalizeDetailsForIntelligence(type, raw) {
|
|
|
1083
1096
|
});
|
|
1084
1097
|
}
|
|
1085
1098
|
case 'error': {
|
|
1086
|
-
|
|
1087
|
-
|
|
1099
|
+
// Spec-based: { scenarios: [{ scenario: { method, path, errorCode }, covered }] }
|
|
1100
|
+
// Inferred: { items: [{ id, description, covered, source_location, code_snippet }] }
|
|
1101
|
+
const rawItems = ((_b = obj.scenarios) !== null && _b !== void 0 ? _b : obj.items);
|
|
1102
|
+
if (!Array.isArray(rawItems))
|
|
1088
1103
|
return [];
|
|
1089
|
-
return
|
|
1090
|
-
var _a;
|
|
1104
|
+
return rawItems.map((s) => {
|
|
1105
|
+
var _a, _b, _c, _d, _e;
|
|
1091
1106
|
const sc = s.scenario;
|
|
1107
|
+
if (sc) {
|
|
1108
|
+
// Spec-based format
|
|
1109
|
+
return {
|
|
1110
|
+
endpoint: sc ? { method: sc.method, path: sc.path } : undefined,
|
|
1111
|
+
covered: (_a = s.covered) !== null && _a !== void 0 ? _a : false,
|
|
1112
|
+
errorCodes: (sc === null || sc === void 0 ? void 0 : sc.errorCode) ? [String(sc.errorCode)] : [],
|
|
1113
|
+
name: sc === null || sc === void 0 ? void 0 : sc.id,
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
// Inferred format — synthesize errorCodes from exception/condition patterns
|
|
1117
|
+
const desc = ((_b = s.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1118
|
+
const id = (_c = s.id) !== null && _c !== void 0 ? _c : '';
|
|
1119
|
+
const syntheticCodes = [];
|
|
1120
|
+
if (/unauthorized|no.*authorization|forbidden/.test(desc + id))
|
|
1121
|
+
syntheticCodes.push('403');
|
|
1122
|
+
else if (/authentication|invalid.*auth|invalid_auth/.test(desc + id))
|
|
1123
|
+
syntheticCodes.push('401');
|
|
1124
|
+
else if (/not.*found|resource.*not/.test(desc + id))
|
|
1125
|
+
syntheticCodes.push('404');
|
|
1126
|
+
else if (/illegal.*argument|invalid.*param|bad.*request/.test(desc + id))
|
|
1127
|
+
syntheticCodes.push('400');
|
|
1128
|
+
else if (/null.*check|npe|null_check/.test(desc + id))
|
|
1129
|
+
syntheticCodes.push('500');
|
|
1130
|
+
// Fall back to a generic code so the intelligence engine generates a finding
|
|
1131
|
+
if (syntheticCodes.length === 0)
|
|
1132
|
+
syntheticCodes.push('exception');
|
|
1133
|
+
// Extract a rough endpoint path from source_location (e.g. "...api/ArticleApi.java:54")
|
|
1134
|
+
// Handle Api, Controller, Resource, Handler, Mutation, Datafetcher, Filter, Service
|
|
1135
|
+
const sourceLocation = (_d = s.source_location) !== null && _d !== void 0 ? _d : '';
|
|
1136
|
+
const fileMatch = sourceLocation.match(/\/([A-Z][a-zA-Z]+?)(?:Api|Controller|Resource|Handler|Mutation|Datafetcher|Filter|QueryService|Repository)\.java/i);
|
|
1137
|
+
const endpointPath = fileMatch
|
|
1138
|
+
? `/${fileMatch[1].toLowerCase()}`
|
|
1139
|
+
: undefined;
|
|
1092
1140
|
return {
|
|
1093
|
-
endpoint:
|
|
1094
|
-
covered: (
|
|
1095
|
-
errorCodes:
|
|
1096
|
-
name:
|
|
1141
|
+
endpoint: endpointPath ? { path: endpointPath } : undefined,
|
|
1142
|
+
covered: (_e = s.covered) !== null && _e !== void 0 ? _e : false,
|
|
1143
|
+
errorCodes: syntheticCodes,
|
|
1144
|
+
name: id,
|
|
1097
1145
|
};
|
|
1098
1146
|
});
|
|
1099
1147
|
}
|
|
@@ -1438,6 +1486,8 @@ program
|
|
|
1438
1486
|
// These are reused for endpoint, error, and business-rule coverage matching
|
|
1439
1487
|
// (avoids multiple glob expansions which can hang on large projects).
|
|
1440
1488
|
const TEST_DECL_RE = /\b(?:test|it)\s*\(\s*(['"`])([\s\S]*?)\1/g;
|
|
1489
|
+
// Java/Kotlin JUnit: @Test followed by a method declaration
|
|
1490
|
+
const JAVA_TEST_RE = /@Test\b[^{]*?(?:public|protected|private|default)?\s+(?:\w+\s+)?(\w+)\s*\(\s*\)/g;
|
|
1441
1491
|
const testEntries = artifacts.testFiles.flatMap((tf) => {
|
|
1442
1492
|
let content = '';
|
|
1443
1493
|
try {
|
|
@@ -1448,12 +1498,23 @@ program
|
|
|
1448
1498
|
}
|
|
1449
1499
|
const descriptions = [];
|
|
1450
1500
|
const contentLower = content.toLowerCase();
|
|
1501
|
+
const ext = path.extname(tf).toLowerCase();
|
|
1502
|
+
const isJavaLike = ext === '.java' || ext === '.kt' || ext === '.kts';
|
|
1451
1503
|
let m;
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1504
|
+
if (isJavaLike) {
|
|
1505
|
+
// Extract @Test-annotated method names; convert snake_case to spaces for keyword matching
|
|
1506
|
+
JAVA_TEST_RE.lastIndex = 0;
|
|
1507
|
+
while ((m = JAVA_TEST_RE.exec(content)) !== null) {
|
|
1508
|
+
descriptions.push(m[1].replace(/_/g, ' ').toLowerCase());
|
|
1509
|
+
}
|
|
1455
1510
|
}
|
|
1456
|
-
|
|
1511
|
+
else {
|
|
1512
|
+
TEST_DECL_RE.lastIndex = 0;
|
|
1513
|
+
while ((m = TEST_DECL_RE.exec(content)) !== null) {
|
|
1514
|
+
descriptions.push(m[2].toLowerCase());
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
return [{ file: tf, contentLower, descriptions, isJavaLike }];
|
|
1457
1518
|
});
|
|
1458
1519
|
if (artifacts.specs.length > 0) {
|
|
1459
1520
|
for (const specPath of artifacts.specs) {
|
|
@@ -1608,7 +1669,7 @@ program
|
|
|
1608
1669
|
const errorItems = errorCandidateRules.map((rule) => {
|
|
1609
1670
|
var _a;
|
|
1610
1671
|
const matchedTestDescriptions = [];
|
|
1611
|
-
for (const { file, descriptions } of testEntries) {
|
|
1672
|
+
for (const { file, descriptions, isJavaLike, contentLower } of testEntries) {
|
|
1612
1673
|
// Match at TEST DESCRIPTION level, not file level
|
|
1613
1674
|
// Require: description contains an error indicator + at least one specific keyword
|
|
1614
1675
|
const specificKws = (_a = rule.specificKeywords) !== null && _a !== void 0 ? _a : [];
|
|
@@ -1626,6 +1687,23 @@ program
|
|
|
1626
1687
|
if (matchingDescs.length > 0) {
|
|
1627
1688
|
matchedTestDescriptions.push(...matchingDescs.map((d) => `[${path.basename(file)}] ${d}`));
|
|
1628
1689
|
}
|
|
1690
|
+
else if (isJavaLike) {
|
|
1691
|
+
// Java/Kotlin: test method names rarely contain exception class names.
|
|
1692
|
+
// Check file body for specific long keywords (≥8 chars, e.g. "authorization")
|
|
1693
|
+
// combined with HTTP 4xx status checks or exception throws.
|
|
1694
|
+
const specificLongKws = specificKws
|
|
1695
|
+
.filter((k) => k.length >= 8)
|
|
1696
|
+
.map((k) => k.toLowerCase());
|
|
1697
|
+
if (specificLongKws.length > 0 && specificLongKws.some((kw) => contentLower.includes(kw))) {
|
|
1698
|
+
const hasErrorInContent = /\.statuscode\s*\(\s*[45]\d{2}|throw\s+new\s+\w*exception/i.test(contentLower);
|
|
1699
|
+
if (hasErrorInContent) {
|
|
1700
|
+
// Prefer test methods that look like error/boundary tests
|
|
1701
|
+
const errorDescs = descriptions.filter((d) => /\b(4\d\d|error|fail|forbidden|unauthorized|invalid|exception|not.?found)\b/.test(d));
|
|
1702
|
+
const descsToReport = errorDescs.length > 0 ? errorDescs : descriptions.slice(0, 1);
|
|
1703
|
+
matchedTestDescriptions.push(...descsToReport.map((d) => `[${path.basename(file)}] ${d}`));
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1629
1707
|
}
|
|
1630
1708
|
return {
|
|
1631
1709
|
id: rule.id,
|
|
@@ -1726,12 +1804,24 @@ program
|
|
|
1726
1804
|
const kwsLower = rule.keywords.map((k) => k.toLowerCase());
|
|
1727
1805
|
const matchedDescs = [];
|
|
1728
1806
|
const matchedFileSet = new Set();
|
|
1729
|
-
for (const { file, descriptions } of testEntries) {
|
|
1807
|
+
for (const { file, descriptions, isJavaLike, contentLower } of testEntries) {
|
|
1730
1808
|
const hitting = descriptions.filter((desc) => kwsLower.length > 0 && kwsLower.some((kw) => desc.includes(kw)));
|
|
1731
1809
|
if (hitting.length > 0) {
|
|
1732
1810
|
matchedDescs.push(...hitting);
|
|
1733
1811
|
matchedFileSet.add(file);
|
|
1734
1812
|
}
|
|
1813
|
+
else if (isJavaLike) {
|
|
1814
|
+
// Java/Kotlin: test method names may not contain exception class names.
|
|
1815
|
+
// Fall back to checking the file body for specific long keywords (≥8 chars).
|
|
1816
|
+
const specificLongKws = kwsLower.filter((k) => k.length >= 8);
|
|
1817
|
+
if (specificLongKws.length > 0 && specificLongKws.some((kw) => contentLower.includes(kw))) {
|
|
1818
|
+
// Prefer tests that look like error/boundary tests; otherwise include all
|
|
1819
|
+
const relevantDescs = descriptions.filter((d) => /\b(4\d\d|error|fail|forbidden|unauthorized|invalid|exception|not.?found)\b/.test(d));
|
|
1820
|
+
const descsToAdd = relevantDescs.length > 0 ? relevantDescs : descriptions;
|
|
1821
|
+
matchedDescs.push(...descsToAdd);
|
|
1822
|
+
matchedFileSet.add(file);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1735
1825
|
}
|
|
1736
1826
|
return {
|
|
1737
1827
|
rule,
|
|
@@ -1842,6 +1932,32 @@ program
|
|
|
1842
1932
|
// Non-fatal — discovery info is also in scan-manifest.json
|
|
1843
1933
|
}
|
|
1844
1934
|
console.log(`\nReports written to: ${reportsDir}`);
|
|
1935
|
+
// ── 4f-intel. Run coverage intelligence automatically ─────────────────
|
|
1936
|
+
try {
|
|
1937
|
+
const coverageResultsForIntel = allCoverageResults.map((r) => ({
|
|
1938
|
+
type: r.type,
|
|
1939
|
+
totalItems: r.totalItems,
|
|
1940
|
+
coveredItems: r.coveredItems,
|
|
1941
|
+
coveragePercent: r.coveragePercent,
|
|
1942
|
+
details: normalizeDetailsForIntelligence(r.type, r.details),
|
|
1943
|
+
}));
|
|
1944
|
+
const intelReport = (0, index_3.runIntelligenceEngine)({
|
|
1945
|
+
coverageResults: coverageResultsForIntel,
|
|
1946
|
+
languages: artifacts.languages,
|
|
1947
|
+
frameworks: artifacts.frameworks,
|
|
1948
|
+
projectName: path.basename(rootDir),
|
|
1949
|
+
outDir: reportsDir,
|
|
1950
|
+
});
|
|
1951
|
+
console.log(`\nCoverage Intelligence: ${intelReport.summary.totalFindings} findings, ` +
|
|
1952
|
+
`${intelReport.summary.totalRecommendations} recommendations ` +
|
|
1953
|
+
`(${intelReport.summary.criticalUncoveredItems} critical uncovered)`);
|
|
1954
|
+
if (intelReport.summary.recommendationsByPriority.P0 > 0) {
|
|
1955
|
+
console.log(`⚠️ P0 Recommendations: ${intelReport.summary.recommendationsByPriority.P0} — immediate action required`);
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
catch (intelErr) {
|
|
1959
|
+
warnings.push(`Coverage intelligence failed: ${intelErr instanceof Error ? intelErr.message : String(intelErr)}`);
|
|
1960
|
+
}
|
|
1845
1961
|
}
|
|
1846
1962
|
// ── 4f. Write scan manifest ────────────────────────────────────────────
|
|
1847
1963
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeInference.d.ts","sourceRoot":"","sources":["../../../src/inference/routeInference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,eAAO,MAAM,YAAY,uEAAwE,CAAC;AAClG,MAAM,MAAM,UAAU,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAoDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"routeInference.d.ts","sourceRoot":"","sources":["../../../src/inference/routeInference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,eAAO,MAAM,YAAY,uEAAwE,CAAC;AAClG,MAAM,MAAM,UAAU,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAoDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE,CAuFrE;AAgHD;;GAEG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAgBxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAY5F"}
|
|
@@ -102,6 +102,11 @@ const HANDLER_SCAN_WINDOW_MULTILINE = 25;
|
|
|
102
102
|
* Code-based patterns take priority over JSDoc annotations for the same method+path.
|
|
103
103
|
*/
|
|
104
104
|
function inferRoutesFromFile(filePath) {
|
|
105
|
+
// Dispatch to language-specific parsers before falling back to the generic (Node/Express) path
|
|
106
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
107
|
+
if (ext === '.java' || ext === '.kt' || ext === '.kts') {
|
|
108
|
+
return inferRoutesFromJavaFile(filePath);
|
|
109
|
+
}
|
|
105
110
|
let content;
|
|
106
111
|
try {
|
|
107
112
|
content = fs.readFileSync(filePath, 'utf-8');
|
|
@@ -183,7 +188,88 @@ function findHandlerFunction(lines, startLine, maxLines) {
|
|
|
183
188
|
}
|
|
184
189
|
return undefined;
|
|
185
190
|
}
|
|
186
|
-
// ───
|
|
191
|
+
// ─── Java / Spring inference ──────────────────────────────────────────────────
|
|
192
|
+
/**
|
|
193
|
+
* Matches class-level @RequestMapping (sets the base path for all methods).
|
|
194
|
+
* @RequestMapping(path = "/articles/{slug}")
|
|
195
|
+
* @RequestMapping("/articles")
|
|
196
|
+
* @RequestMapping("tags") ← no leading slash
|
|
197
|
+
*/
|
|
198
|
+
const SPRING_CLASS_BASE_PATH = /@RequestMapping\s*\(\s*(?:path\s*=\s*)?["']([^"']+)["']/;
|
|
199
|
+
/**
|
|
200
|
+
* Matches any Spring method-mapping annotation and an optional path argument.
|
|
201
|
+
* @GetMapping → GET, no sub-path
|
|
202
|
+
* @GetMapping(path = "feed") → GET, sub-path "feed"
|
|
203
|
+
* @GetMapping("feed") → GET, sub-path "feed"
|
|
204
|
+
* @PostMapping(path = "follow") → POST, sub-path "follow"
|
|
205
|
+
* @RequestMapping(path = "{id}", method = RequestMethod.DELETE)
|
|
206
|
+
* @RequestMapping(path = "/users", method = POST)
|
|
207
|
+
*/
|
|
208
|
+
const SPRING_METHOD_MAPPING = /@(Get|Post|Put|Patch|Delete)Mapping(?:\s*\(\s*(?:path\s*=\s*)?["']([^"']*)["'])?/i;
|
|
209
|
+
/** Matches @RequestMapping with explicit method= (used when special HTTP method needed) */
|
|
210
|
+
const SPRING_REQUEST_MAPPING_EXPLICIT = /@RequestMapping\s*\((?:[^)]*?\bpath\s*=\s*["']([^"']+)["'][^)]*?\bmethod\s*=\s*(?:RequestMethod\.)?([A-Z]+)|(?:[^)]*?\bmethod\s*=\s*(?:RequestMethod\.)?([A-Z]+)[^)]*?\bpath\s*=\s*["']([^"']+)["']))/;
|
|
211
|
+
/**
|
|
212
|
+
* Infer Spring routes from a Java or Kotlin source file.
|
|
213
|
+
* Works in two passes:
|
|
214
|
+
* 1. Scan for class-level @RequestMapping to capture the base path.
|
|
215
|
+
* 2. Scan for method-level @xMapping annotations and combine with the base.
|
|
216
|
+
*/
|
|
217
|
+
function inferRoutesFromJavaFile(filePath) {
|
|
218
|
+
var _a, _b, _c, _d, _e;
|
|
219
|
+
let content;
|
|
220
|
+
try {
|
|
221
|
+
content = fs.readFileSync(filePath, 'utf-8');
|
|
222
|
+
}
|
|
223
|
+
catch {
|
|
224
|
+
return [];
|
|
225
|
+
}
|
|
226
|
+
const lines = content.split('\n');
|
|
227
|
+
const byKey = new Map();
|
|
228
|
+
const addRoute = (method, routePath, lineNumber) => {
|
|
229
|
+
const key = `${method}:${routePath}`;
|
|
230
|
+
if (!byKey.has(key)) {
|
|
231
|
+
byKey.set(key, { method, path: routePath, sourceFile: filePath, lineNumber, discoveredVia: 'code' });
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
// ── Pass 1: find class-level base path ──────────────────────────────────────
|
|
235
|
+
let basePath = '';
|
|
236
|
+
for (const line of lines) {
|
|
237
|
+
const bm = line.match(SPRING_CLASS_BASE_PATH);
|
|
238
|
+
if (bm) {
|
|
239
|
+
basePath = bm[1].startsWith('/') ? bm[1] : '/' + bm[1];
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// ── Pass 2: find method-level annotations ───────────────────────────────────
|
|
244
|
+
for (let i = 0; i < lines.length; i++) {
|
|
245
|
+
const line = lines[i];
|
|
246
|
+
// @GetMapping / @PostMapping / @PutMapping / @PatchMapping / @DeleteMapping
|
|
247
|
+
const mm = line.match(SPRING_METHOD_MAPPING);
|
|
248
|
+
if (mm) {
|
|
249
|
+
const httpMethod = mm[1].toLowerCase();
|
|
250
|
+
const subPath = (_a = mm[2]) !== null && _a !== void 0 ? _a : '';
|
|
251
|
+
const fullPath = subPath
|
|
252
|
+
? basePath + (subPath.startsWith('/') ? subPath : '/' + subPath)
|
|
253
|
+
: basePath || '/';
|
|
254
|
+
addRoute(httpMethod, fullPath, i + 1);
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
// @RequestMapping(path = "...", method = REQUEST_METHOD_...)
|
|
258
|
+
const em = line.match(SPRING_REQUEST_MAPPING_EXPLICIT);
|
|
259
|
+
if (em) {
|
|
260
|
+
// Two capture group orderings depending on which comes first
|
|
261
|
+
const rawPath = (_c = (_b = em[1]) !== null && _b !== void 0 ? _b : em[4]) !== null && _c !== void 0 ? _c : '';
|
|
262
|
+
const rawMethod = ((_e = (_d = em[2]) !== null && _d !== void 0 ? _d : em[3]) !== null && _e !== void 0 ? _e : '').toLowerCase();
|
|
263
|
+
if (rawPath && rawMethod && exports.HTTP_METHODS.includes(rawMethod)) {
|
|
264
|
+
const fullPath = rawPath.startsWith('/')
|
|
265
|
+
? rawPath
|
|
266
|
+
: basePath + '/' + rawPath;
|
|
267
|
+
addRoute(rawMethod, fullPath, i + 1);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return [...byKey.values()];
|
|
272
|
+
}
|
|
187
273
|
/**
|
|
188
274
|
* Infer routes from a set of service source files.
|
|
189
275
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{as as o,at as s}from"./index-DE34Ncpq.js";const t=(a,r)=>o.lang.round(s.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-BTnP2N-l.js";import{_ as i}from"./index-DE34Ncpq.js";import"./chunk-FMBD7UC4-2n8Ehv6e.js";import"./chunk-55IACEB6-DoDGO_Bn.js";import"./chunk-QN33PNHL-C_ll8qBD.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram};
|