@hawkeyexl/manni 4.13.0 → 4.15.0
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/README.md +1 -1
- package/dist/batch-OMDKRGUE.js +48 -0
- package/dist/build-YCY5MUHA.js +37 -0
- package/dist/calibrate-RN2NJ4FS.js +43 -0
- package/dist/capture-2WYROZKA.js +39 -0
- package/dist/check-KRVWHF7E.js +33 -0
- package/dist/{check-NBN2YK2J.js → check-LVUTWAGR.js} +33 -32
- package/dist/{check-NBN2YK2J.js.map → check-LVUTWAGR.js.map} +1 -1
- package/dist/check-MR7IG7IP.js +36 -0
- package/dist/{check-LU5YC3L4.js → check-OIRJ6OBW.js} +15 -14
- package/dist/{chunk-J5NOWIJ3.js → chunk-3CSEHHKB.js} +14 -8
- package/dist/{chunk-J5NOWIJ3.js.map → chunk-3CSEHHKB.js.map} +1 -1
- package/dist/{chunk-7RNONVHI.js → chunk-3EJVJDMX.js} +9 -9
- package/dist/{chunk-LSFXNAHU.js → chunk-3WQMMLIO.js} +129 -59
- package/dist/chunk-3WQMMLIO.js.map +1 -0
- package/dist/{chunk-OREHJQNN.js → chunk-46OWIAAX.js} +5 -4
- package/dist/{chunk-OREHJQNN.js.map → chunk-46OWIAAX.js.map} +1 -1
- package/dist/{chunk-LNGSE7V2.js → chunk-476DMDJ5.js} +132 -27
- package/dist/chunk-476DMDJ5.js.map +1 -0
- package/dist/{chunk-EQ7E6HMG.js → chunk-4MYW2D2U.js} +14 -16
- package/dist/chunk-4MYW2D2U.js.map +1 -0
- package/dist/{chunk-NTEYYYKL.js → chunk-525KMBZS.js} +16 -22
- package/dist/chunk-525KMBZS.js.map +1 -0
- package/dist/{chunk-HIEGOW7X.js → chunk-57DHX65T.js} +5 -79
- package/dist/chunk-57DHX65T.js.map +1 -0
- package/dist/{chunk-PCE7QHXJ.js → chunk-5D24C6WM.js} +6 -1
- package/dist/chunk-5D24C6WM.js.map +1 -0
- package/dist/{chunk-DQOM3DEU.js → chunk-6DYFWAZA.js} +563 -359
- package/dist/chunk-6DYFWAZA.js.map +1 -0
- package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
- package/dist/chunk-7EKXSSEO.js +81 -0
- package/dist/chunk-7EKXSSEO.js.map +1 -0
- package/dist/{chunk-ULDV2LUI.js → chunk-7SVFBJBE.js} +10 -4
- package/dist/chunk-7SVFBJBE.js.map +1 -0
- package/dist/{chunk-QKT67PFE.js → chunk-7XHW5DZA.js} +9 -9
- package/dist/{chunk-TDCOKKMI.js → chunk-AL4HRKSZ.js} +3 -3
- package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
- package/dist/chunk-B2242FYO.js.map +1 -0
- package/dist/chunk-BREAC43H.js +85 -0
- package/dist/chunk-BREAC43H.js.map +1 -0
- package/dist/{chunk-HKTGHLBA.js → chunk-C37OVJ35.js} +2 -2
- package/dist/{chunk-HKTGHLBA.js.map → chunk-C37OVJ35.js.map} +1 -1
- package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
- package/dist/{chunk-BMBAAPGN.js → chunk-CWGBRWP7.js} +33 -18
- package/dist/chunk-CWGBRWP7.js.map +1 -0
- package/dist/chunk-DN4LCWSA.js +83 -0
- package/dist/chunk-DN4LCWSA.js.map +1 -0
- package/dist/{chunk-JEUFYSFQ.js → chunk-DW22KCLN.js} +118 -75
- package/dist/chunk-DW22KCLN.js.map +1 -0
- package/dist/{chunk-PCGBXHSE.js → chunk-FEEO7ET6.js} +5 -5
- package/dist/{chunk-CODWRUAD.js → chunk-FYWQS35G.js} +7 -5
- package/dist/chunk-FYWQS35G.js.map +1 -0
- package/dist/{chunk-3O6U4ICM.js → chunk-GLQCSDFS.js} +3 -3
- package/dist/{chunk-BQXY76JB.js → chunk-GUTAKJIF.js} +148 -92
- package/dist/chunk-GUTAKJIF.js.map +1 -0
- package/dist/{chunk-WVXCN5DS.js → chunk-GZHBMMDC.js} +78 -14
- package/dist/chunk-GZHBMMDC.js.map +1 -0
- package/dist/{chunk-52WO7ESI.js → chunk-IE5PXI6M.js} +6 -5
- package/dist/chunk-IE5PXI6M.js.map +1 -0
- package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
- package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
- package/dist/{chunk-NSAW7U42.js → chunk-JHE3CYWS.js} +58 -10
- package/dist/chunk-JHE3CYWS.js.map +1 -0
- package/dist/{chunk-6ZFJWUUH.js → chunk-JNMY7KZG.js} +2 -2
- package/dist/chunk-JQPZKWIP.js +76 -0
- package/dist/chunk-JQPZKWIP.js.map +1 -0
- package/dist/{chunk-OBXCJZ6R.js → chunk-JTATFPWB.js} +28 -17
- package/dist/chunk-JTATFPWB.js.map +1 -0
- package/dist/{chunk-3HUCB4Z3.js → chunk-JULE3EU3.js} +10 -7
- package/dist/chunk-JULE3EU3.js.map +1 -0
- package/dist/{chunk-TQ3W6RKG.js → chunk-KCXQXKOL.js} +3 -3
- package/dist/{chunk-VYBYUQIP.js → chunk-KN37BXVY.js} +88 -7
- package/dist/chunk-KN37BXVY.js.map +1 -0
- package/dist/{chunk-OUAH7XF2.js → chunk-MAOX3524.js} +2 -2
- package/dist/chunk-MC7U5IH4.js +126 -0
- package/dist/chunk-MC7U5IH4.js.map +1 -0
- package/dist/{chunk-OYIWF3B2.js → chunk-NIQ2JSZO.js} +29 -20
- package/dist/chunk-NIQ2JSZO.js.map +1 -0
- package/dist/{chunk-HY6ROJTH.js → chunk-OFOIBV5J.js} +86 -10
- package/dist/chunk-OFOIBV5J.js.map +1 -0
- package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
- package/dist/{chunk-N6A6DJUO.js → chunk-Q2VOXKAQ.js} +6 -7
- package/dist/chunk-Q2VOXKAQ.js.map +1 -0
- package/dist/{chunk-GWI6JPTT.js → chunk-Q62Q7CDI.js} +88 -8
- package/dist/chunk-Q62Q7CDI.js.map +1 -0
- package/dist/{chunk-PA7CMQGD.js → chunk-QDO5JFFV.js} +11 -5
- package/dist/chunk-QDO5JFFV.js.map +1 -0
- package/dist/{chunk-VNYXK7TM.js → chunk-QEJ4GH25.js} +8 -8
- package/dist/chunk-QEJ4GH25.js.map +1 -0
- package/dist/chunk-QK6VYJHV.js +26 -0
- package/dist/chunk-QK6VYJHV.js.map +1 -0
- package/dist/chunk-QS2Z3SWL.js +21 -0
- package/dist/chunk-QS2Z3SWL.js.map +1 -0
- package/dist/{chunk-NWUXRV6N.js → chunk-QS3K57OJ.js} +10 -8
- package/dist/chunk-QS3K57OJ.js.map +1 -0
- package/dist/{chunk-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
- package/dist/{chunk-3XGTNN3M.js → chunk-RGRNAQG5.js} +12 -124
- package/dist/chunk-RGRNAQG5.js.map +1 -0
- package/dist/{chunk-E6BVUDGY.js → chunk-SLGCRXHM.js} +4 -4
- package/dist/{chunk-KE2F7QES.js → chunk-SVF3WCC7.js} +6 -6
- package/dist/{chunk-IGQMBHFY.js → chunk-T62SFCQY.js} +88 -12
- package/dist/chunk-T62SFCQY.js.map +1 -0
- package/dist/{chunk-SCLXVTFZ.js → chunk-TKINOTVS.js} +1 -1
- package/dist/chunk-TKINOTVS.js.map +1 -0
- package/dist/{chunk-VOXOBUTX.js → chunk-TXZJESES.js} +5 -5
- package/dist/chunk-UPUJJOKB.js +236 -0
- package/dist/chunk-UPUJJOKB.js.map +1 -0
- package/dist/{chunk-7JPL3CUC.js → chunk-URGALOZY.js} +2 -2
- package/dist/{chunk-X4MPUD4B.js → chunk-UVLQRP6O.js} +53 -13
- package/dist/chunk-UVLQRP6O.js.map +1 -0
- package/dist/{chunk-CWXZ2MRT.js → chunk-VHJ72YCD.js} +4 -3
- package/dist/chunk-VHJ72YCD.js.map +1 -0
- package/dist/{chunk-PAU352SV.js → chunk-W4GTMOJW.js} +2 -2
- package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
- package/dist/chunk-WDENIUC7.js.map +1 -0
- package/dist/{chunk-3BVDFQ6Y.js → chunk-Y3GWQBJP.js} +5 -5
- package/dist/{chunk-YZ4TJLZQ.js → chunk-YT5HKJWV.js} +497 -18
- package/dist/chunk-YT5HKJWV.js.map +1 -0
- package/dist/{chunk-UQMLCIRX.js → chunk-Z6PZKXSP.js} +6 -6
- package/dist/{chunk-JUL2PRQN.js → chunk-ZC2MZZR5.js} +207 -79
- package/dist/chunk-ZC2MZZR5.js.map +1 -0
- package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
- package/dist/chunk-ZINZTHWO.js.map +1 -0
- package/dist/{cli-4JHQCPHU.js → cli-33E3B2FK.js} +3 -3
- package/dist/{cli-G66X7YMP.js → cli-7JV4RM66.js} +23 -22
- package/dist/{cli-G66X7YMP.js.map → cli-7JV4RM66.js.map} +1 -1
- package/dist/{cli-L5B2RVV2.js → cli-B4DTJ2KC.js} +31 -29
- package/dist/{cli-L5B2RVV2.js.map → cli-B4DTJ2KC.js.map} +1 -1
- package/dist/{cli-ECVT4YXR.js → cli-D4WXCDTS.js} +20 -19
- package/dist/{cli-ECVT4YXR.js.map → cli-D4WXCDTS.js.map} +1 -1
- package/dist/{cli-7DETHSNW.js → cli-DDLLZHZW.js} +90 -84
- package/dist/cli-DDLLZHZW.js.map +1 -0
- package/dist/{cli-KYTCJYXK.js → cli-EVACAD7K.js} +317 -28
- package/dist/cli-EVACAD7K.js.map +1 -0
- package/dist/{cli-H5LVGOVT.js → cli-LIKI7WPR.js} +384 -248
- package/dist/cli-LIKI7WPR.js.map +1 -0
- package/dist/{cli-AZKWTCFV.js → cli-MWUFAS2X.js} +11 -11
- package/dist/{cli-DGFLJ2DD.js → cli-OKPRTVG6.js} +69 -26
- package/dist/cli-OKPRTVG6.js.map +1 -0
- package/dist/{cli-RP5E7XHC.js → cli-QEPVGLQ3.js} +20 -18
- package/dist/{cli-RP5E7XHC.js.map → cli-QEPVGLQ3.js.map} +1 -1
- package/dist/{cli-BW5VOFOZ.js → cli-VP6JTPFS.js} +11 -10
- package/dist/{cli-BW5VOFOZ.js.map → cli-VP6JTPFS.js.map} +1 -1
- package/dist/cli.js +14 -14
- package/dist/{config-JJW75SBX.js → config-7I5CHHRZ.js} +6 -6
- package/dist/docmeta.js +10 -10
- package/dist/github-DV57TW5L.js +32 -0
- package/dist/github-SGX2EARO.js +36 -0
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +222 -45
- package/dist/index.js +138 -132
- package/dist/index.js.map +1 -1
- package/dist/{json-7WV7KL6H.js → json-5EQCGVCV.js} +4 -2
- package/dist/{json-LCVPMEAM.js → json-SHPUCD64.js} +15 -13
- package/dist/{labels-OQXBVM4A.js → labels-3GCGYYV3.js} +14 -12
- package/dist/{labels-OQXBVM4A.js.map → labels-3GCGYYV3.js.map} +1 -1
- package/dist/lint-RE4DMI6E.js +35 -0
- package/dist/list-F56MEJXR.js +36 -0
- package/dist/list-ZR3KY556.js +34 -0
- package/dist/{page-XPX5XJZE.js → page-G7XSO4FD.js} +13 -12
- package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
- package/dist/{prepare-VMBIQYAM.js → prepare-WHMWP7BG.js} +21 -20
- package/dist/{prepare-VMBIQYAM.js.map → prepare-WHMWP7BG.js.map} +1 -1
- package/dist/{pretty-KSTZMBUF.js → pretty-VTJVXWRK.js} +15 -13
- package/dist/{pretty-KG6TMOEI.js → pretty-YVRRWBWN.js} +23 -16
- package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
- package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
- package/dist/{reporters-26H3N2KW.js → reporters-FSXJ42EB.js} +6 -5
- package/dist/{reporters-AQU4W3KY.js → reporters-G5R4SURQ.js} +6 -6
- package/dist/{reporters-FBYLPKD4.js → reporters-MHPY4HRA.js} +15 -14
- package/dist/run-FSYOYEPR.js +39 -0
- package/dist/sarif-HBQIDY7T.js +31 -0
- package/dist/sarif-RRUFJZUL.js +37 -0
- package/dist/{term-SI3VM6EM.js → term-ABHGACYE.js} +58 -109
- package/dist/term-ABHGACYE.js.map +1 -0
- package/dist/types-VMOT7RAL.js +12 -0
- package/dist/types-VMOT7RAL.js.map +1 -0
- package/dist/{validate-NQO7TFSN.js → validate-DXYUUGUD.js} +6 -6
- package/dist/validate-DXYUUGUD.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/skills/check/SKILL.md +2 -2
- package/plugin/manni/skills/evals/SKILL.md +1 -1
- package/plugin/manni/skills/fix/SKILL.md +95 -16
- package/plugin/manni/skills/setup/SKILL.md +1 -1
- package/shapes/graph/shapes-1.1.1.ttl +953 -0
- package/dist/batch-OB2FXT47.js +0 -46
- package/dist/build-4BL24BG3.js +0 -36
- package/dist/calibrate-AEDJ7N7G.js +0 -41
- package/dist/capture-TP3P4YNL.js +0 -38
- package/dist/check-5IYH42KS.js +0 -34
- package/dist/check-S55MH66H.js +0 -30
- package/dist/chunk-3HUCB4Z3.js.map +0 -1
- package/dist/chunk-3XGTNN3M.js.map +0 -1
- package/dist/chunk-52WO7ESI.js.map +0 -1
- package/dist/chunk-BMBAAPGN.js.map +0 -1
- package/dist/chunk-BQXY76JB.js.map +0 -1
- package/dist/chunk-CODWRUAD.js.map +0 -1
- package/dist/chunk-CWXZ2MRT.js.map +0 -1
- package/dist/chunk-DQOM3DEU.js.map +0 -1
- package/dist/chunk-EQ7E6HMG.js.map +0 -1
- package/dist/chunk-GWI6JPTT.js.map +0 -1
- package/dist/chunk-HIEGOW7X.js.map +0 -1
- package/dist/chunk-HY6ROJTH.js.map +0 -1
- package/dist/chunk-IGQMBHFY.js.map +0 -1
- package/dist/chunk-JEUFYSFQ.js.map +0 -1
- package/dist/chunk-JUL2PRQN.js.map +0 -1
- package/dist/chunk-LNGSE7V2.js.map +0 -1
- package/dist/chunk-LSFXNAHU.js.map +0 -1
- package/dist/chunk-MNH7QO4Z.js +0 -15
- package/dist/chunk-MNH7QO4Z.js.map +0 -1
- package/dist/chunk-N6A6DJUO.js.map +0 -1
- package/dist/chunk-NSAW7U42.js.map +0 -1
- package/dist/chunk-NTEYYYKL.js.map +0 -1
- package/dist/chunk-NWUXRV6N.js.map +0 -1
- package/dist/chunk-OBXCJZ6R.js.map +0 -1
- package/dist/chunk-OTJOBZJ5.js.map +0 -1
- package/dist/chunk-OYIWF3B2.js.map +0 -1
- package/dist/chunk-PA7CMQGD.js.map +0 -1
- package/dist/chunk-PCE7QHXJ.js.map +0 -1
- package/dist/chunk-SCLXVTFZ.js.map +0 -1
- package/dist/chunk-SE4JN5XN.js.map +0 -1
- package/dist/chunk-UKZNLVJW.js.map +0 -1
- package/dist/chunk-ULDV2LUI.js.map +0 -1
- package/dist/chunk-VNYXK7TM.js.map +0 -1
- package/dist/chunk-VYBYUQIP.js.map +0 -1
- package/dist/chunk-WVXCN5DS.js.map +0 -1
- package/dist/chunk-X4MPUD4B.js.map +0 -1
- package/dist/chunk-Y6M4JFKG.js +0 -117
- package/dist/chunk-Y6M4JFKG.js.map +0 -1
- package/dist/chunk-YZ4TJLZQ.js.map +0 -1
- package/dist/cli-7DETHSNW.js.map +0 -1
- package/dist/cli-DGFLJ2DD.js.map +0 -1
- package/dist/cli-H5LVGOVT.js.map +0 -1
- package/dist/cli-KYTCJYXK.js.map +0 -1
- package/dist/github-DJQ4MWNZ.js +0 -35
- package/dist/github-UWTDM2J2.js +0 -30
- package/dist/lint-O7XRHKFP.js +0 -34
- package/dist/list-OOOCLOAL.js +0 -35
- package/dist/list-OYQ5XPN2.js +0 -32
- package/dist/run-KUGTU3TT.js +0 -37
- package/dist/term-SI3VM6EM.js.map +0 -1
- package/dist/types-Y6TXHM7M.js +0 -10
- /package/dist/{batch-OB2FXT47.js.map → batch-OMDKRGUE.js.map} +0 -0
- /package/dist/{build-4BL24BG3.js.map → build-YCY5MUHA.js.map} +0 -0
- /package/dist/{calibrate-AEDJ7N7G.js.map → calibrate-RN2NJ4FS.js.map} +0 -0
- /package/dist/{capture-TP3P4YNL.js.map → capture-2WYROZKA.js.map} +0 -0
- /package/dist/{check-5IYH42KS.js.map → check-KRVWHF7E.js.map} +0 -0
- /package/dist/{check-LU5YC3L4.js.map → check-MR7IG7IP.js.map} +0 -0
- /package/dist/{check-S55MH66H.js.map → check-OIRJ6OBW.js.map} +0 -0
- /package/dist/{chunk-7RNONVHI.js.map → chunk-3EJVJDMX.js.map} +0 -0
- /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
- /package/dist/{chunk-QKT67PFE.js.map → chunk-7XHW5DZA.js.map} +0 -0
- /package/dist/{chunk-TDCOKKMI.js.map → chunk-AL4HRKSZ.js.map} +0 -0
- /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
- /package/dist/{chunk-PCGBXHSE.js.map → chunk-FEEO7ET6.js.map} +0 -0
- /package/dist/{chunk-3O6U4ICM.js.map → chunk-GLQCSDFS.js.map} +0 -0
- /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
- /package/dist/{chunk-U6IHLEWT.js.map → chunk-JCTHXG33.js.map} +0 -0
- /package/dist/{chunk-6ZFJWUUH.js.map → chunk-JNMY7KZG.js.map} +0 -0
- /package/dist/{chunk-TQ3W6RKG.js.map → chunk-KCXQXKOL.js.map} +0 -0
- /package/dist/{chunk-OUAH7XF2.js.map → chunk-MAOX3524.js.map} +0 -0
- /package/dist/{chunk-TZOYZK2E.js.map → chunk-OZUPJB4J.js.map} +0 -0
- /package/dist/{chunk-OKMTUAWO.js.map → chunk-QSPH4F56.js.map} +0 -0
- /package/dist/{chunk-E6BVUDGY.js.map → chunk-SLGCRXHM.js.map} +0 -0
- /package/dist/{chunk-KE2F7QES.js.map → chunk-SVF3WCC7.js.map} +0 -0
- /package/dist/{chunk-VOXOBUTX.js.map → chunk-TXZJESES.js.map} +0 -0
- /package/dist/{chunk-7JPL3CUC.js.map → chunk-URGALOZY.js.map} +0 -0
- /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
- /package/dist/{chunk-3BVDFQ6Y.js.map → chunk-Y3GWQBJP.js.map} +0 -0
- /package/dist/{chunk-UQMLCIRX.js.map → chunk-Z6PZKXSP.js.map} +0 -0
- /package/dist/{cli-4JHQCPHU.js.map → cli-33E3B2FK.js.map} +0 -0
- /package/dist/{cli-AZKWTCFV.js.map → cli-MWUFAS2X.js.map} +0 -0
- /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
- /package/dist/{github-DJQ4MWNZ.js.map → github-DV57TW5L.js.map} +0 -0
- /package/dist/{github-UWTDM2J2.js.map → github-SGX2EARO.js.map} +0 -0
- /package/dist/{json-7WV7KL6H.js.map → json-5EQCGVCV.js.map} +0 -0
- /package/dist/{json-LCVPMEAM.js.map → json-SHPUCD64.js.map} +0 -0
- /package/dist/{lint-O7XRHKFP.js.map → lint-RE4DMI6E.js.map} +0 -0
- /package/dist/{list-OOOCLOAL.js.map → list-F56MEJXR.js.map} +0 -0
- /package/dist/{list-OYQ5XPN2.js.map → list-ZR3KY556.js.map} +0 -0
- /package/dist/{page-XPX5XJZE.js.map → page-G7XSO4FD.js.map} +0 -0
- /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
- /package/dist/{pretty-KG6TMOEI.js.map → pretty-VTJVXWRK.js.map} +0 -0
- /package/dist/{pretty-KSTZMBUF.js.map → pretty-YVRRWBWN.js.map} +0 -0
- /package/dist/{provider-LBX4IXGX.js.map → provider-JY2I3VLF.js.map} +0 -0
- /package/dist/{release-VV3UTKE5.js.map → release-Z3ASYZ3S.js.map} +0 -0
- /package/dist/{reporters-26H3N2KW.js.map → reporters-FSXJ42EB.js.map} +0 -0
- /package/dist/{reporters-AQU4W3KY.js.map → reporters-G5R4SURQ.js.map} +0 -0
- /package/dist/{reporters-FBYLPKD4.js.map → reporters-MHPY4HRA.js.map} +0 -0
- /package/dist/{run-KUGTU3TT.js.map → run-FSYOYEPR.js.map} +0 -0
- /package/dist/{types-Y6TXHM7M.js.map → sarif-HBQIDY7T.js.map} +0 -0
- /package/dist/{validate-NQO7TFSN.js.map → sarif-RRUFJZUL.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
DocevalsError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WDENIUC7.js";
|
|
5
5
|
|
|
6
6
|
// src/docevals/reporters/format.ts
|
|
7
7
|
var REPORT_FORMATS = [
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
SUMMARY_FORMATS,
|
|
29
29
|
parseFormat
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-IGRXQC3H.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
TracevalsError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZINZTHWO.js";
|
|
5
5
|
import {
|
|
6
6
|
noticeOnce
|
|
7
7
|
} from "./chunk-HX44GB4Z.js";
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
constructProvider,
|
|
144
144
|
makeJudgeProvider
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-JCTHXG33.js.map
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
STDIN_TOKEN,
|
|
9
9
|
notFoundMessage,
|
|
10
10
|
resolveTargetSet
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OFOIBV5J.js";
|
|
12
12
|
import {
|
|
13
13
|
escapeWorkflowCommandMessage,
|
|
14
|
-
escapeWorkflowCommandProperty
|
|
15
|
-
|
|
14
|
+
escapeWorkflowCommandProperty,
|
|
15
|
+
guidanceLines
|
|
16
|
+
} from "./chunk-QK6VYJHV.js";
|
|
16
17
|
import {
|
|
17
18
|
palette
|
|
18
19
|
} from "./chunk-RNVYGWIC.js";
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
findConfigFile,
|
|
22
23
|
readConfigFile,
|
|
23
24
|
selectCollections
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-B2242FYO.js";
|
|
25
26
|
import {
|
|
26
27
|
ToolError
|
|
27
28
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -119,6 +120,25 @@ var realSpawn = async (args, opts) => {
|
|
|
119
120
|
|
|
120
121
|
// src/test/core/results.ts
|
|
121
122
|
import { relative } from "node:path";
|
|
123
|
+
var ACTIONS = /* @__PURE__ */ new Set([
|
|
124
|
+
"checkLink",
|
|
125
|
+
"click",
|
|
126
|
+
"dragAndDrop",
|
|
127
|
+
"find",
|
|
128
|
+
"goTo",
|
|
129
|
+
"httpRequest",
|
|
130
|
+
"loadCookie",
|
|
131
|
+
"loadVariables",
|
|
132
|
+
"record",
|
|
133
|
+
"runCode",
|
|
134
|
+
"runShell",
|
|
135
|
+
"saveCookie",
|
|
136
|
+
"screenshot",
|
|
137
|
+
"stopRecord",
|
|
138
|
+
"type",
|
|
139
|
+
"wait"
|
|
140
|
+
]);
|
|
141
|
+
var ACTIONS_GUIDE = "https://docs.doc-detective.com/docs/actions/";
|
|
122
142
|
var ZERO_COUNTS = { pass: 0, fail: 0, warning: 0, skipped: 0 };
|
|
123
143
|
function isRecord(value) {
|
|
124
144
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -162,6 +182,7 @@ function anyFailed(results) {
|
|
|
162
182
|
function collectFindings(results, cwd) {
|
|
163
183
|
if (results === null) return [];
|
|
164
184
|
const out = [];
|
|
185
|
+
const seen = /* @__PURE__ */ new Set();
|
|
165
186
|
for (const spec of records(results["specs"])) {
|
|
166
187
|
for (const test of records(spec["tests"])) {
|
|
167
188
|
const contentPath = test["contentPath"] ?? spec["contentPath"];
|
|
@@ -172,12 +193,25 @@ function collectFindings(results, cwd) {
|
|
|
172
193
|
if (result !== "FAIL" && result !== "WARNING") continue;
|
|
173
194
|
const location = step["location"];
|
|
174
195
|
const line = isRecord(location) ? location["line"] : void 0;
|
|
175
|
-
const
|
|
196
|
+
const resultDescription = step["resultDescription"];
|
|
197
|
+
const description = typeof resultDescription === "string" ? resultDescription : "";
|
|
198
|
+
const action = Object.keys(step).find((key2) => ACTIONS.has(key2));
|
|
199
|
+
const key = JSON.stringify([file, line, action, result, description]);
|
|
200
|
+
if (seen.has(key)) continue;
|
|
201
|
+
seen.add(key);
|
|
202
|
+
const stated = step["description"];
|
|
176
203
|
out.push({
|
|
177
204
|
file,
|
|
178
205
|
...typeof line === "number" ? { line } : {},
|
|
179
206
|
result,
|
|
180
|
-
description
|
|
207
|
+
description,
|
|
208
|
+
...action === void 0 ? {} : { action },
|
|
209
|
+
guidance: {
|
|
210
|
+
id: "Doc Detective",
|
|
211
|
+
rule: action ?? null,
|
|
212
|
+
description: typeof stated === "string" && stated !== "" ? stated : null,
|
|
213
|
+
guide: action === void 0 ? null : `${ACTIONS_GUIDE}${action.toLowerCase()}`
|
|
214
|
+
}
|
|
181
215
|
});
|
|
182
216
|
}
|
|
183
217
|
}
|
|
@@ -333,6 +367,15 @@ ${outputTail(run)}`);
|
|
|
333
367
|
}
|
|
334
368
|
}
|
|
335
369
|
|
|
370
|
+
// src/test/reporters/finding.ts
|
|
371
|
+
var FAIL_ADVICE = "Fix the step, fix the procedure it documents, or report a product regression.";
|
|
372
|
+
function findingMessage(f) {
|
|
373
|
+
if (f.result !== "FAIL") return f.description;
|
|
374
|
+
if (f.description === "") return FAIL_ADVICE;
|
|
375
|
+
const stop = f.description.endsWith(".") ? "" : ".";
|
|
376
|
+
return `${f.description}${stop} ${FAIL_ADVICE}`;
|
|
377
|
+
}
|
|
378
|
+
|
|
336
379
|
// src/test/reporters/summary.ts
|
|
337
380
|
function summaryLine(tests) {
|
|
338
381
|
const total = tests.pass + tests.fail + tests.warning + tests.skipped;
|
|
@@ -349,7 +392,8 @@ function renderGithub(result) {
|
|
|
349
392
|
...f.line === void 0 ? [] : [`line=${String(f.line)}`],
|
|
350
393
|
"title=Doc Detective"
|
|
351
394
|
].join(",");
|
|
352
|
-
|
|
395
|
+
const message = [findingMessage(f), ...guidanceLines(f.guidance)].join("\n");
|
|
396
|
+
return `::${level} ${props}::${escapeWorkflowCommandMessage(message)}`;
|
|
353
397
|
});
|
|
354
398
|
return [...commands, summaryLine(result.tests)].join("\n");
|
|
355
399
|
}
|
|
@@ -369,13 +413,17 @@ function renderPretty(result, opts) {
|
|
|
369
413
|
else list.push(finding);
|
|
370
414
|
}
|
|
371
415
|
const width = Math.max(0, ...result.findings.map((f) => String(f.line ?? "").length));
|
|
416
|
+
const indent = " ".repeat(2 + width + 2 + 7 + 2);
|
|
372
417
|
const blocks = [...byFile].map(
|
|
373
418
|
([file, findings]) => [
|
|
374
419
|
c.bold(file),
|
|
375
|
-
...findings.
|
|
420
|
+
...findings.flatMap((f) => {
|
|
376
421
|
const label = f.result.padEnd(7);
|
|
377
422
|
const tag = f.result === "FAIL" ? c.red(label) : c.yellow(label);
|
|
378
|
-
return
|
|
423
|
+
return [
|
|
424
|
+
` ${String(f.line ?? "").padStart(width)} ${tag} ${findingMessage(f)}`,
|
|
425
|
+
...guidanceLines(f.guidance).map((line) => c.dim(`${indent}${line}`))
|
|
426
|
+
];
|
|
379
427
|
})
|
|
380
428
|
].join("\n")
|
|
381
429
|
);
|
|
@@ -390,4 +438,4 @@ export {
|
|
|
390
438
|
renderJson,
|
|
391
439
|
renderPretty
|
|
392
440
|
};
|
|
393
|
-
//# sourceMappingURL=chunk-
|
|
441
|
+
//# sourceMappingURL=chunk-JHE3CYWS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/test/errors.ts","../src/test/commands/run.ts","../src/test/core/doc-detective.ts","../src/test/core/results.ts","../src/test/reporters/finding.ts","../src/test/reporters/summary.ts","../src/test/reporters/github.ts","../src/test/reporters/json.ts","../src/test/reporters/pretty.ts"],"sourcesContent":["import { ToolError } from \"../shared/errors.js\";\n\n/** An operational or usage error in the test domain: exit 2. */\nexport class TestError extends ToolError {\n constructor(message: string) {\n super(message);\n this.name = \"TestError\";\n }\n}\n","/**\n * `manni test run`: run Doc Detective and read its verdict from its results.\n *\n * Input precedence is positional paths, then `--collection`, then Doc\n * Detective's own config `input`. Without `--collection`, manni's collections\n * are not read: Doc Detective's config is this tool's default input.\n *\n * Doc Detective exits 0 when tests fail, so the exit code only says whether it\n * ran. The verdict is the results file it writes under `-o`, which is a temp\n * directory removed afterwards.\n */\nimport { existsSync } from \"node:fs\";\nimport { mkdtemp, readdir, readFile, rm } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join, relative, resolve } from \"node:path\";\nimport fg from \"fast-glob\";\nimport picomatch from \"picomatch\";\nimport { selectCollections } from \"../../shared/collections.js\";\nimport { findConfigFile, readConfigFile, type ConfigFile } from \"../../shared/config-file.js\";\nimport { ToolError } from \"../../shared/errors.js\";\nimport { outputTail } from \"../../shared/exec.js\";\nimport { docDetectiveConfigPath } from \"../../shared/tools.js\";\nimport { DEFAULT_IGNORE, notFoundMessage, resolveTargetSet, STDIN_TOKEN } from \"../../meta/internal.js\";\nimport { NOT_ON_PATH, realSpawn, type DocDetectiveSpawn } from \"../core/doc-detective.js\";\nimport {\n anyFailed,\n collectFindings,\n parseResults,\n testCounts,\n type DocDetectiveResults,\n type ResultCounts,\n type TestFinding,\n} from \"../core/results.js\";\nimport { TestError } from \"../errors.js\";\n\nexport interface RunTestOptions {\n /** Positional files, directories and globs. */\n paths?: string[];\n /** `--collection <name>`, repeatable. */\n collection?: string[];\n /** `-c, --config`: a manni config file. */\n configPath?: string;\n cwd?: string;\n /** Finding no tests, or no inputs, is a pass. */\n allowEmpty?: boolean;\n /** Stream Doc Detective's output to stderr as it runs. */\n progress?: boolean;\n /** Test seam: how Doc Detective is started. */\n spawn?: DocDetectiveSpawn;\n}\n\nexport interface TestRunResult {\n /** Doc Detective's results object as it wrote it; `null` when it found no tests. */\n results: DocDetectiveResults | null;\n /** Every FAIL and WARNING step. */\n findings: TestFinding[];\n /** The test-level counts. */\n tests: ResultCounts;\n /** 1 when anything failed. */\n exitCode: 0 | 1;\n}\n\n/** What Doc Detective finds on its own in the working directory. */\nconst DOC_DETECTIVE_CONFIG_NAMES = [\".doc-detective.json\", \".doc-detective.yaml\", \".doc-detective.yml\"];\n\nconst NO_RESULTS = \"Doc Detective wrote no results to read. Run doc-detective directly to see why.\";\n\n/** A run with nothing to report; a fresh object each time, so no caller shares one. */\nfunction empty(results: DocDetectiveResults | null = null): TestRunResult {\n return { results, findings: [], tests: { pass: 0, fail: 0, warning: 0, skipped: 0 }, exitCode: 0 };\n}\n\nconst toError = (message: string): Error => new TestError(message);\n\n/** A sibling's `ToolError` (meta's walk, say) reported as this domain's. */\nasync function asTestError<T>(work: () => Promise<T>): Promise<T> {\n try {\n return await work();\n } catch (err) {\n if (err instanceof ToolError && !(err instanceof TestError)) throw new TestError(err.message);\n throw err;\n }\n}\n\nasync function loadConfig(cwd: string, configPath: string | undefined): Promise<ConfigFile | null> {\n const opts = { section: \"test\", legacyNames: [], toError };\n const file =\n configPath === undefined ? await findConfigFile(cwd, opts) : await readConfigFile(configPath, cwd, opts);\n // The domain has no keys of its own, so a `test:` section is a setting that\n // would otherwise read as configured and do nothing.\n if (file !== null && file.wrapped && file.value !== null) {\n throw new TestError(\n `${file.source}: test has no keys. Doc Detective's settings live under tools.doc-detective.`,\n );\n }\n return file;\n}\n\n/**\n * Positional inputs as Doc Detective takes them. Files and directories go as\n * typed, and Doc Detective walks a directory itself. A glob is expanded here.\n * A name that does not exist is refused, because Doc Detective skips one in\n * silence.\n */\nasync function positionalInputs(paths: string[], cwd: string, allowEmpty: boolean): Promise<string[]> {\n const inputs: string[] = [];\n const missing: string[] = [];\n for (const path of paths) {\n const posix = path.replace(/\\\\/g, \"/\");\n if (existsSync(resolve(cwd, posix))) {\n inputs.push(path);\n } else if (picomatch.scan(posix).isGlob) {\n const found = await fg(posix, { cwd, ignore: DEFAULT_IGNORE, onlyFiles: true, dot: false });\n inputs.push(...found.sort());\n } else {\n missing.push(posix);\n }\n }\n if (missing.length > 0 && !allowEmpty) throw new TestError(notFoundMessage(missing));\n return inputs;\n}\n\n/** The selected collections' files, minus their excludes, relative to `cwd`. */\nasync function collectionInputs(\n file: ConfigFile,\n names: string[],\n cwd: string,\n allowEmpty: boolean,\n): Promise<string[]> {\n const collections = selectCollections(file.collections, names, file.source, toError);\n const { files } = await asTestError(() =>\n resolveTargetSet({\n inputs: collections.flatMap((c) => c.paths),\n exclude: collections.flatMap((c) => c.exclude),\n cwd: file.dir,\n allowEmpty,\n }),\n );\n return files.map((f) => relative(cwd, resolve(file.dir, f)).replace(/\\\\/g, \"/\"));\n}\n\nasync function readResults(outDir: string): Promise<DocDetectiveResults | null> {\n const names = (await readdir(outDir)).filter((n) => /^testResults-.*\\.json$/.test(n)).sort();\n const last = names.at(-1);\n if (last === undefined) throw new TestError(NO_RESULTS);\n const results = parseResults(await readFile(join(outDir, last), \"utf8\"));\n if (results === undefined) throw new TestError(NO_RESULTS);\n return results;\n}\n\nexport async function runTest(opts: RunTestOptions = {}): Promise<TestRunResult> {\n const cwd = resolve(opts.cwd ?? process.cwd());\n const paths = opts.paths ?? [];\n const wanted = opts.collection ?? [];\n const allowEmpty = opts.allowEmpty ?? false;\n\n if (paths.includes(STDIN_TOKEN)) {\n throw new TestError(\"test run reads files; Doc Detective has no stdin. Pass a path.\");\n }\n // lint's two sentences: a collection is a set the operator did not type, so\n // it composes with no typed path, and only a config can define one.\n if (wanted.length > 0 && paths.length > 0) {\n throw new TestError(\n \"--collection selects a configured collection; it cannot be combined with paths.\",\n );\n }\n const file = await loadConfig(cwd, opts.configPath);\n if (wanted.length > 0 && file === null) {\n throw new TestError(\"--collection needs a config file to select from.\");\n }\n\n // The path as written names the file in the refusal; the resolved one is\n // what Doc Detective is given.\n const written = file?.tools[\"doc-detective\"]?.config;\n let ddConfig: string | undefined;\n if (file !== null && written !== undefined) {\n ddConfig = docDetectiveConfigPath(file.tools, file.dir);\n if (ddConfig !== undefined && !existsSync(ddConfig)) {\n throw new TestError(`${file.source}: tools.doc-detective.config \"${written}\" does not exist.`);\n }\n }\n\n let inputs: string[] | undefined;\n if (paths.length > 0) {\n inputs = await positionalInputs(paths, cwd, allowEmpty);\n if (inputs.length === 0) {\n if (allowEmpty) return empty();\n const tried = paths.map((p) => `\"${p}\"`).join(\", \");\n throw new TestError(\n `No files matched. Patterns tried: ${tried}. Pass --allow-empty if that is expected.`,\n );\n }\n } else if (file !== null && wanted.length > 0) {\n inputs = await collectionInputs(file, wanted, cwd, allowEmpty);\n if (inputs.length === 0) {\n if (allowEmpty) return empty();\n throw new TestError(\"--collection matched no files. Pass --allow-empty if that is expected.\");\n }\n } else if (\n ddConfig === undefined &&\n !DOC_DETECTIVE_CONFIG_NAMES.some((name) => existsSync(join(cwd, name)))\n ) {\n throw new TestError(\n \"test run needs paths or a Doc Detective config. Pass paths, or add .doc-detective.json.\",\n );\n }\n\n const outDir = await mkdtemp(join(tmpdir(), \"manni-test-\"));\n try {\n const args = [\n // ponytail: Doc Detective splits -i on commas, so a path holding a comma\n // is two inputs. Upgrade path: a generated config whose input is a list.\n ...(inputs === undefined ? [] : [\"-i\", inputs.join(\",\")]),\n ...(ddConfig === undefined ? [] : [\"-c\", ddConfig]),\n \"-r\",\n \"json\",\n \"-o\",\n outDir,\n ];\n const run = await (opts.spawn ?? realSpawn)(args, { cwd, progress: opts.progress ?? false });\n if (run.spawnError !== undefined) throw new TestError(NOT_ON_PATH);\n if (run.code !== 0) {\n const how = run.code === null ? \"killed before exiting\" : `exit ${String(run.code)}`;\n throw new TestError(`Doc Detective failed (${how}):\\n${outputTail(run)}`);\n }\n\n const results = await readResults(outDir);\n const tests = testCounts(results);\n const total = tests.pass + tests.fail + tests.warning + tests.skipped;\n // A `null` results file counts as zero tests, so `total` covers it.\n if (total === 0) {\n if (allowEmpty) return empty(results);\n throw new TestError(\n \"Doc Detective found no tests in the inputs. Pass --allow-empty if that is expected.\",\n );\n }\n return {\n results,\n findings: collectFindings(results, cwd),\n tests,\n exitCode: anyFailed(results) ? 1 : 0,\n };\n } finally {\n await rm(outDir, { recursive: true, force: true });\n }\n}\n","/**\n * The Doc Detective process seam: the only module that starts `doc-detective`.\n * Unit tests inject a `DocDetectiveSpawn`; the real one is `realSpawn`.\n *\n * On Windows an npm global install puts a `.cmd` shim on PATH, and `cmd.exe`\n * caps the command line it runs at 8191 characters, which a collection of a\n * few hundred pages passes. So the bin script the shim points at is run with\n * node directly. Only when no script sits beside the shim does the shim run,\n * through `realExec`, which knows how to start one without a shell.\n */\nimport { spawn } from \"node:child_process\";\nimport { statSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { ExecResult } from \"@hawkeyexl/inference\";\nimport { realExec } from \"../../shared/exec.js\";\nimport { TestError } from \"../errors.js\";\n\n/**\n * Start Doc Detective with `args` (its own flags, no program name) and wait\n * for it. `progress` streams its output to stderr as it runs; the output is\n * captured either way.\n */\nexport type DocDetectiveSpawn = (\n args: string[],\n opts: { cwd: string; progress: boolean },\n) => Promise<ExecResult>;\n\n/** How Doc Detective is started on this host. */\nexport interface Launch {\n command: string;\n args: string[];\n /** Started through a Windows `.cmd` shim, so `cmd.exe`'s cap applies. */\n viaShim: boolean;\n}\n\nexport const NOT_ON_PATH =\n \"doc-detective is not on PATH. Install Doc Detective (npm install -g doc-detective) to run doc tests.\";\n\nconst COMMAND_LINE_LIMIT =\n \"the selected inputs exceed the command-line limit. Narrow the collection, or set input in the Doc Detective config.\";\n\n/** No timeout: a docs suite runs as long as its tests do. */\nconst NO_TIMEOUT = 2 ** 31 - 1;\n\nexport function launchFor(\n args: string[],\n host: { platform: NodeJS.Platform; path: string; isFile: (path: string) => boolean },\n): Launch {\n if (host.platform !== \"win32\") return { command: \"doc-detective\", args, viaShim: false };\n // Windows lets a PATH entry be quoted, as in \"C:\\Program Files\\nodejs\".\n for (const entry of host.path.split(\";\")) {\n const dir = entry.replace(/^\"(.*)\"$/, \"$1\");\n if (dir === \"\" || !host.isFile(join(dir, \"doc-detective.cmd\"))) continue;\n const script = join(dir, \"node_modules\", \"doc-detective\", \"bin\", \"doc-detective.js\");\n if (host.isFile(script)) {\n return { command: process.execPath, args: [script, ...args], viaShim: false };\n }\n break;\n }\n return { command: \"doc-detective\", args, viaShim: true };\n}\n\n/**\n * Refuse a command line Windows would truncate or reject.\n *\n * ponytail: Windows caps a command line at 32,767 characters, and at 8,191\n * through a `.cmd` shim. Past the cap the run is refused. The upgrade path is\n * running the inputs in batches and merging the results files.\n */\nexport function assertFitsCommandLine(launch: Launch, platform: NodeJS.Platform): void {\n if (platform !== \"win32\") return;\n // Each argument costs its quotes and the space before it.\n const length = [launch.command, ...launch.args].reduce((n, arg) => n + arg.length + 3, 0);\n if (length > (launch.viaShim ? 8_191 : 32_767)) throw new TestError(COMMAND_LINE_LIMIT);\n}\n\nfunction isFile(path: string): boolean {\n try {\n return statSync(path).isFile();\n } catch {\n return false;\n }\n}\n\nfunction streamed(launch: Launch, opts: { cwd: string; progress: boolean }): Promise<ExecResult> {\n return new Promise((settle) => {\n let stdout = \"\";\n let stderr = \"\";\n const child = spawn(launch.command, launch.args, {\n cwd: opts.cwd,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n windowsHide: true,\n });\n child.stdout.setEncoding(\"utf8\");\n child.stderr.setEncoding(\"utf8\");\n child.stdout.on(\"data\", (chunk: string) => {\n stdout += chunk;\n if (opts.progress) process.stderr.write(chunk);\n });\n child.stderr.on(\"data\", (chunk: string) => {\n stderr += chunk;\n if (opts.progress) process.stderr.write(chunk);\n });\n child.on(\"error\", (err) => {\n settle({ code: null, stdout, stderr, timedOut: false, spawnError: err.message });\n });\n child.on(\"close\", (code) => {\n settle({ code, stdout, stderr, timedOut: false });\n });\n });\n}\n\nexport const realSpawn: DocDetectiveSpawn = async (args, opts) => {\n const launch = launchFor(args, {\n platform: process.platform,\n path: process.env[\"PATH\"] ?? \"\",\n isFile,\n });\n assertFitsCommandLine(launch, process.platform);\n if (!launch.viaShim) return streamed(launch, opts);\n // ponytail: the shim path captures and replays rather than streaming live.\n // It runs only when a shim has no bin script beside it.\n const result = await realExec([launch.command, ...launch.args], {\n cwd: opts.cwd,\n timeoutMs: NO_TIMEOUT,\n });\n if (opts.progress) process.stderr.write(result.stdout + result.stderr);\n return result;\n};\n","/**\n * Doc Detective's results file, read across a process boundary.\n *\n * The object is kept as Doc Detective wrote it, because `-f json` prints it\n * verbatim. Only the parts the verdict and the reports need are checked: the\n * test-level counts, and each step's result, description, line and action.\n */\nimport { relative } from \"node:path\";\nimport type { Guidance } from \"../../shared/guidance.js\";\n\n/** One level's counts in Doc Detective's `summary`. */\nexport interface ResultCounts {\n pass: number;\n fail: number;\n warning: number;\n skipped: number;\n}\n\n/** Doc Detective's results object, as it wrote it. */\nexport type DocDetectiveResults = Record<string, unknown>;\n\n/** A step that FAILed or WARNed, named by the page it came from. */\nexport interface TestFinding {\n /** The page, posix and relative to the run's working directory. */\n file: string;\n /** The step's line in the page, when Doc Detective located it. */\n line?: number;\n result: \"FAIL\" | \"WARNING\";\n /** Doc Detective's `resultDescription`, as it wrote it. */\n description: string;\n /** The Doc Detective action the step ran, such as `runShell`, when it is one Doc Detective documents. */\n action?: string;\n /** `Doc Detective`, the action, the step's own `description` and the action's guide. */\n guidance?: Guidance | null;\n}\n\n/** The step actions Doc Detective documents, each on a page of its own under `ACTIONS_GUIDE`. */\nconst ACTIONS = new Set([\n \"checkLink\",\n \"click\",\n \"dragAndDrop\",\n \"find\",\n \"goTo\",\n \"httpRequest\",\n \"loadCookie\",\n \"loadVariables\",\n \"record\",\n \"runCode\",\n \"runShell\",\n \"saveCookie\",\n \"screenshot\",\n \"stopRecord\",\n \"type\",\n \"wait\",\n]);\n\n// Each page is the action name lowercased with nothing between the words:\n// `draganddrop`, `checklink`, `httprequest`. Kebab-case slugs 404 there.\nconst ACTIONS_GUIDE = \"https://docs.doc-detective.com/docs/actions/\";\n\nexport const ZERO_COUNTS: ResultCounts = { pass: 0, fail: 0, warning: 0, skipped: 0 };\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction records(value: unknown): Record<string, unknown>[] {\n return Array.isArray(value) ? value.filter(isRecord) : [];\n}\n\nfunction counts(value: unknown): ResultCounts | undefined {\n if (!isRecord(value)) return undefined;\n const out = { ...ZERO_COUNTS };\n for (const key of Object.keys(out) as (keyof ResultCounts)[]) {\n const n = value[key];\n if (typeof n !== \"number\") return undefined;\n out[key] = n;\n }\n return out;\n}\n\n/**\n * Parse a results file. `null` is what Doc Detective writes when it found no\n * tests. `undefined` is a file that is not a results object at all.\n */\nexport function parseResults(text: string): DocDetectiveResults | null | undefined {\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return undefined;\n }\n if (parsed === null) return null;\n if (!isRecord(parsed) || !isRecord(parsed[\"summary\"])) return undefined;\n if (counts(parsed[\"summary\"][\"tests\"]) === undefined) return undefined;\n if (!Array.isArray(parsed[\"specs\"])) return undefined;\n return parsed;\n}\n\n/** The test-level counts, which the summary line reports. */\nexport function testCounts(results: DocDetectiveResults | null): ResultCounts {\n if (results === null || !isRecord(results[\"summary\"])) return { ...ZERO_COUNTS };\n return counts(results[\"summary\"][\"tests\"]) ?? { ...ZERO_COUNTS };\n}\n\n/** Whether anything failed, at any level Doc Detective counts. */\nexport function anyFailed(results: DocDetectiveResults | null): boolean {\n if (results === null) return false;\n const summary = results[\"summary\"];\n if (!isRecord(summary)) return false;\n return Object.values(summary).some((level) => (counts(level)?.fail ?? 0) > 0);\n}\n\n/**\n * Every FAIL and WARNING step, in the order Doc Detective ran them. A step\n * that fails the same way in several contexts, one per browser or platform,\n * is one finding.\n */\nexport function collectFindings(results: DocDetectiveResults | null, cwd: string): TestFinding[] {\n if (results === null) return [];\n const out: TestFinding[] = [];\n const seen = new Set<string>();\n for (const spec of records(results[\"specs\"])) {\n for (const test of records(spec[\"tests\"])) {\n const contentPath = test[\"contentPath\"] ?? spec[\"contentPath\"];\n // Without a contentPath the file is unknown, and `\"\"` says so: the\n // github reporter then leaves `file=` off the annotation. A URL input\n // is reported as Doc Detective names it; only a file path is relative.\n const file =\n typeof contentPath !== \"string\"\n ? \"\"\n : /^[a-z][a-z0-9+.-]*:\\/\\//i.test(contentPath)\n ? contentPath\n : relative(cwd, contentPath).replace(/\\\\/g, \"/\");\n for (const context of records(test[\"contexts\"])) {\n for (const step of records(context[\"steps\"])) {\n const result = step[\"result\"];\n if (result !== \"FAIL\" && result !== \"WARNING\") continue;\n const location = step[\"location\"];\n const line = isRecord(location) ? location[\"line\"] : undefined;\n const resultDescription = step[\"resultDescription\"];\n const description = typeof resultDescription === \"string\" ? resultDescription : \"\";\n const action = Object.keys(step).find((key) => ACTIONS.has(key));\n const key = JSON.stringify([file, line, action, result, description]);\n if (seen.has(key)) continue;\n seen.add(key);\n const stated = step[\"description\"];\n out.push({\n file,\n ...(typeof line === \"number\" ? { line } : {}),\n result,\n description,\n ...(action === undefined ? {} : { action }),\n guidance: {\n id: \"Doc Detective\",\n rule: action ?? null,\n description: typeof stated === \"string\" && stated !== \"\" ? stated : null,\n guide: action === undefined ? null : `${ACTIONS_GUIDE}${action.toLowerCase()}`,\n },\n });\n }\n }\n }\n }\n return out;\n}\n","import type { TestFinding } from \"../core/results.js\";\n\n/**\n * What a failed step asks of its reader. Doc Detective reports only what the\n * step expected against what happened, so it cannot tell which of the three\n * is wrong, and the sentence says so.\n */\nconst FAIL_ADVICE = \"Fix the step, fix the procedure it documents, or report a product regression.\";\n\n/** Doc Detective's description, and for a FAIL the advice after it. A WARNING is left as written. */\nexport function findingMessage(f: TestFinding): string {\n if (f.result !== \"FAIL\") return f.description;\n if (f.description === \"\") return FAIL_ADVICE;\n const stop = f.description.endsWith(\".\") ? \"\" : \".\";\n return `${f.description}${stop} ${FAIL_ADVICE}`;\n}\n","import type { ResultCounts } from \"../core/results.js\";\n\n/** `2 tests: 1 passed, 1 failed, 0 warnings, 0 skipped`, test-level counts. */\nexport function summaryLine(tests: ResultCounts): string {\n const total = tests.pass + tests.fail + tests.warning + tests.skipped;\n const plural = (n: number, word: string): string => `${String(n)} ${word}${n === 1 ? \"\" : \"s\"}`;\n return `${plural(total, \"test\")}: ${String(tests.pass)} passed, ${String(tests.fail)} failed, ${plural(tests.warning, \"warning\")}, ${String(tests.skipped)} skipped`;\n}\n","import {\n escapeWorkflowCommandMessage,\n escapeWorkflowCommandProperty,\n} from \"../../shared/github.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport type { TestRunResult } from \"../commands/run.js\";\nimport { findingMessage } from \"./finding.js\";\nimport { summaryLine } from \"./summary.js\";\n\n/**\n * One workflow command per FAIL or WARNING step, then the summary line. The\n * step's action and its guide follow the message after `%0A`.\n */\nexport function renderGithub(result: TestRunResult): string {\n const commands = result.findings.map((f) => {\n const level = f.result === \"FAIL\" ? \"error\" : \"warning\";\n const props = [\n ...(f.file === \"\" ? [] : [`file=${escapeWorkflowCommandProperty(f.file)}`]),\n ...(f.line === undefined ? [] : [`line=${String(f.line)}`]),\n \"title=Doc Detective\",\n ].join(\",\");\n const message = [findingMessage(f), ...guidanceLines(f.guidance)].join(\"\\n\");\n return `::${level} ${props}::${escapeWorkflowCommandMessage(message)}`;\n });\n return [...commands, summaryLine(result.tests)].join(\"\\n\");\n}\n","import type { TestRunResult } from \"../commands/run.js\";\n\n/**\n * Doc Detective's results object, verbatim, so a script written against its\n * schema reads manni's output unchanged. `null` when it found no tests.\n */\nexport function renderJson(result: TestRunResult): string {\n return JSON.stringify(result.results, null, 2);\n}\n","import { palette } from \"../../shared/color.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport type { TestRunResult } from \"../commands/run.js\";\nimport type { TestFinding } from \"../core/results.js\";\nimport { findingMessage } from \"./finding.js\";\nimport { summaryLine } from \"./summary.js\";\n\n/**\n * Each FAIL and WARNING step under its page, with its line, then the\n * test-level summary. The step's action and its guide follow, dim, under the\n * message. A run with neither prints the summary alone.\n */\nexport function renderPretty(result: TestRunResult, opts: { color: boolean }): string {\n const c = palette(opts.color);\n const byFile = new Map<string, TestFinding[]>();\n for (const finding of result.findings) {\n const list = byFile.get(finding.file);\n if (list === undefined) byFile.set(finding.file, [finding]);\n else list.push(finding);\n }\n const width = Math.max(0, ...result.findings.map((f) => String(f.line ?? \"\").length));\n // The guidance lines sit under the message column: the line, the result, and their gaps.\n const indent = \" \".repeat(2 + width + 2 + 7 + 2);\n const blocks = [...byFile].map(([file, findings]) =>\n [\n c.bold(file),\n ...findings.flatMap((f) => {\n const label = f.result.padEnd(7);\n const tag = f.result === \"FAIL\" ? c.red(label) : c.yellow(label);\n return [\n ` ${String(f.line ?? \"\").padStart(width)} ${tag} ${findingMessage(f)}`,\n ...guidanceLines(f.guidance).map((line) => c.dim(`${indent}${line}`)),\n ];\n }),\n ].join(\"\\n\"),\n );\n return [...blocks, summaryLine(result.tests)].join(\"\\n\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,YAAN,cAAwB,UAAU;AAAA,EACvC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;;;ACGA,SAAS,kBAAkB;AAC3B,SAAS,SAAS,SAAS,UAAU,UAAU;AAC/C,SAAS,cAAc;AACvB,SAAS,QAAAA,OAAM,YAAAC,WAAU,eAAe;AACxC,OAAO,QAAQ;AACf,OAAO,eAAe;;;ACNtB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAuBd,IAAM,cACX;AAEF,IAAM,qBACJ;AAGF,IAAM,aAAa,KAAK,KAAK;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AAA,MACF,CAAC;AAAA,IACH,EAAE,KAAK,IAAI;AAAA,EACb;AACA,SAAO,CAAC,GAAG,QAAQ,YAAY,OAAO,KAAK,CAAC,EAAE,KAAK,MAAM;AAC3D;","names":["join","relative","key","relative","join"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
LintError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TKINOTVS.js";
|
|
5
5
|
|
|
6
6
|
// src/lint/rules/paragraphs.ts
|
|
7
7
|
function checkParagraphsIn(content, rule, ctx) {
|
|
@@ -1147,4 +1147,4 @@ export {
|
|
|
1147
1147
|
aboutRule,
|
|
1148
1148
|
matchSections
|
|
1149
1149
|
};
|
|
1150
|
-
//# sourceMappingURL=chunk-
|
|
1150
|
+
//# sourceMappingURL=chunk-JNMY7KZG.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
RULE_ID_PREFIX,
|
|
4
|
+
guidanceFor,
|
|
5
|
+
isTermRule
|
|
6
|
+
} from "./chunk-BREAC43H.js";
|
|
7
|
+
import {
|
|
8
|
+
TERM_FIELDS
|
|
9
|
+
} from "./chunk-MC7U5IH4.js";
|
|
10
|
+
import {
|
|
11
|
+
renderSarif
|
|
12
|
+
} from "./chunk-CWGBRWP7.js";
|
|
13
|
+
import {
|
|
14
|
+
guidanceLines
|
|
15
|
+
} from "./chunk-QK6VYJHV.js";
|
|
16
|
+
|
|
17
|
+
// src/term/reporters/sarif.ts
|
|
18
|
+
var INFORMATION_URI = "https://hawkeyexl.github.io/manni/term/";
|
|
19
|
+
var PROSE_PREFIX = `${RULE_ID_PREFIX}/prose/`;
|
|
20
|
+
var FIELD_LABEL = new RegExp(`^(?:\\(root\\)|/(?:${TERM_FIELDS.join("|")})) `);
|
|
21
|
+
function describe(rule, vale) {
|
|
22
|
+
if (rule.id.startsWith(PROSE_PREFIX)) {
|
|
23
|
+
const check = rule.id.slice(PROSE_PREFIX.length);
|
|
24
|
+
const guidance = vale.get(rule.id);
|
|
25
|
+
return {
|
|
26
|
+
id: rule.id,
|
|
27
|
+
shortDescription: { text: `Vale's ${check} rule flagged the prose of an entry's field.` },
|
|
28
|
+
...guidance?.description == null ? {} : { fullDescription: { text: guidance.description } },
|
|
29
|
+
...guidance?.guide == null ? {} : { helpUri: guidance.guide }
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const name = rule.id.slice(RULE_ID_PREFIX.length + 1);
|
|
33
|
+
if (!isTermRule(name)) return rule;
|
|
34
|
+
const { description, guide } = guidanceFor(name);
|
|
35
|
+
const text = description ?? "";
|
|
36
|
+
return {
|
|
37
|
+
id: rule.id,
|
|
38
|
+
shortDescription: { text },
|
|
39
|
+
fullDescription: { text },
|
|
40
|
+
...guide === null ? {} : { helpUri: guide }
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function renderFindingsSarif(report, opts = {}) {
|
|
44
|
+
const log = JSON.parse(
|
|
45
|
+
renderSarif(report.results, {
|
|
46
|
+
frame: report.frame,
|
|
47
|
+
...opts.onNotice === void 0 ? {} : { onNotice: opts.onNotice },
|
|
48
|
+
resultProperties: (error) => {
|
|
49
|
+
const guidance = report.origin.get(error)?.guidance;
|
|
50
|
+
return guidance == null ? void 0 : { guidance };
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
for (const run of log.runs) {
|
|
55
|
+
const vale = /* @__PURE__ */ new Map();
|
|
56
|
+
for (const result of run.results) {
|
|
57
|
+
const guidance = result.properties?.guidance;
|
|
58
|
+
if (guidance !== void 0 && result.ruleId.startsWith(PROSE_PREFIX) && !vale.has(result.ruleId)) {
|
|
59
|
+
vale.set(result.ruleId, guidance);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
run.tool.driver.informationUri = INFORMATION_URI;
|
|
63
|
+
run.tool.driver.rules = run.tool.driver.rules.map((rule) => describe(rule, vale));
|
|
64
|
+
for (const result of run.results) {
|
|
65
|
+
const text = result.message.text.replace(FIELD_LABEL, "");
|
|
66
|
+
result.message.text = [text, ...guidanceLines(result.properties?.guidance)].join("\n");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return JSON.stringify(log, null, 2);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
FIELD_LABEL,
|
|
74
|
+
renderFindingsSarif
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=chunk-JQPZKWIP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/term/reporters/sarif.ts"],"sourcesContent":["/**\n * SARIF for `check` and `lint`. Meta's renderer builds the envelope, the\n * repository-relative uris and the fingerprints the baseline shares, from the\n * adapted results. What it cannot know is what a term rule is: it describes\n * every rule as a schema keyword, links meta's fix page, and prefixes each\n * message with the JSON Pointer of the field, `(root)` for a finding about a\n * whole entry. This renderer replaces those three with the term rule's own\n * description, a link to its section of the rules page, and the finding's own\n * message. Each result also carries the rule's guidance, in its message and\n * in `properties.guidance`.\n */\nimport { renderSarif } from \"../../meta/index.js\";\nimport { guidanceLines, type Guidance } from \"../../shared/guidance.js\";\nimport { RULE_ID_PREFIX, guidanceFor, isTermRule } from \"../core/severity.js\";\nimport type { TermReport } from \"../commands/findings.js\";\nimport { TERM_FIELDS } from \"../types.js\";\n\nconst INFORMATION_URI = \"https://hawkeyexl.github.io/manni/term/\";\n\nconst PROSE_PREFIX = `${RULE_ID_PREFIX}/prose/`;\n\n/**\n * The label meta's reporters put before a message: `(root) ` for a finding\n * about the whole entry, `/<field> ` for one about a field. Nothing else ever\n * opens a term finding's adapted message.\n */\nexport const FIELD_LABEL = new RegExp(`^(?:\\\\(root\\\\)|/(?:${TERM_FIELDS.join(\"|\")})) `);\n\ninterface SarifRule {\n id: string;\n shortDescription: { text: string };\n fullDescription?: { text: string };\n helpUri?: string;\n}\n\ninterface SarifLog {\n runs: {\n tool: { driver: { informationUri: string; rules: SarifRule[] } };\n results: { ruleId: string; message: { text: string }; properties?: { guidance?: Guidance } }[];\n }[];\n}\n\n/**\n * A rule as the term tool describes it. A check rule links its section of the\n * rules page. A Vale rule takes its description and link from the first alert\n * of that check, when Vale gave them.\n */\nfunction describe(rule: SarifRule, vale: ReadonlyMap<string, Guidance>): SarifRule {\n if (rule.id.startsWith(PROSE_PREFIX)) {\n const check = rule.id.slice(PROSE_PREFIX.length);\n const guidance = vale.get(rule.id);\n return {\n id: rule.id,\n shortDescription: { text: `Vale's ${check} rule flagged the prose of an entry's field.` },\n ...(guidance?.description == null ? {} : { fullDescription: { text: guidance.description } }),\n ...(guidance?.guide == null ? {} : { helpUri: guidance.guide }),\n };\n }\n const name = rule.id.slice(RULE_ID_PREFIX.length + 1);\n if (!isTermRule(name)) return rule;\n const { description, guide } = guidanceFor(name);\n const text = description ?? \"\";\n return {\n id: rule.id,\n shortDescription: { text },\n fullDescription: { text },\n ...(guide === null ? {} : { helpUri: guide }),\n };\n}\n\nexport function renderFindingsSarif(report: TermReport, opts: { onNotice?: (message: string) => void } = {}): string {\n const log = JSON.parse(\n renderSarif(report.results, {\n frame: report.frame,\n ...(opts.onNotice === undefined ? {} : { onNotice: opts.onNotice }),\n resultProperties: (error) => {\n const guidance = report.origin.get(error)?.guidance;\n return guidance == null ? undefined : { guidance };\n },\n }),\n ) as SarifLog;\n for (const run of log.runs) {\n // The first alert of each Vale check speaks for its rule.\n const vale = new Map<string, Guidance>();\n for (const result of run.results) {\n const guidance = result.properties?.guidance;\n if (guidance !== undefined && result.ruleId.startsWith(PROSE_PREFIX) && !vale.has(result.ruleId)) {\n vale.set(result.ruleId, guidance);\n }\n }\n run.tool.driver.informationUri = INFORMATION_URI;\n run.tool.driver.rules = run.tool.driver.rules.map((rule) => describe(rule, vale));\n for (const result of run.results) {\n const text = result.message.text.replace(FIELD_LABEL, \"\");\n result.message.text = [text, ...guidanceLines(result.properties?.guidance)].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WAAW,OAAO,OAAO,IAAI,KAAK,GAAG;AAC3C,eAAO,YAAY,OAAO,SAAY,EAAE,SAAS;AAAA,MACnD;AAAA,IACF,CAAC;AAAA,EACH;AACA,aAAW,OAAO,IAAI,MAAM;AAE1B,UAAM,OAAO,oBAAI,IAAsB;AACvC,eAAW,UAAU,IAAI,SAAS;AAChC,YAAM,WAAW,OAAO,YAAY;AACpC,UAAI,aAAa,UAAa,OAAO,OAAO,WAAW,YAAY,KAAK,CAAC,KAAK,IAAI,OAAO,MAAM,GAAG;AAChG,aAAK,IAAI,OAAO,QAAQ,QAAQ;AAAA,MAClC;AAAA,IACF;AACA,QAAI,KAAK,OAAO,iBAAiB;AACjC,QAAI,KAAK,OAAO,QAAQ,IAAI,KAAK,OAAO,MAAM,IAAI,CAAC,SAAS,SAAS,MAAM,IAAI,CAAC;AAChF,eAAW,UAAU,IAAI,SAAS;AAChC,YAAM,OAAO,OAAO,QAAQ,KAAK,QAAQ,aAAa,EAAE;AACxD,aAAO,QAAQ,OAAO,CAAC,MAAM,GAAG,cAAc,OAAO,YAAY,QAAQ,CAAC,EAAE,KAAK,IAAI;AAAA,IACvF;AAAA,EACF;AACA,SAAO,KAAK,UAAU,KAAK,MAAM,CAAC;AACpC;","names":[]}
|
|
@@ -15,33 +15,34 @@ import {
|
|
|
15
15
|
realExec
|
|
16
16
|
} from "./chunk-ZPLVANY2.js";
|
|
17
17
|
import {
|
|
18
|
-
DocevalsError
|
|
19
|
-
|
|
18
|
+
DocevalsError,
|
|
19
|
+
FIX_GUIDE
|
|
20
|
+
} from "./chunk-WDENIUC7.js";
|
|
20
21
|
import {
|
|
21
22
|
declaredAt
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DN4LCWSA.js";
|
|
23
24
|
import {
|
|
24
25
|
metaProvenanceEntries
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MAOX3524.js";
|
|
26
27
|
import {
|
|
27
28
|
familyMarks,
|
|
28
29
|
loadExternalMetadata,
|
|
29
30
|
memberOf,
|
|
30
31
|
mergeWithMarks,
|
|
31
32
|
provenanceEntries
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-476DMDJ5.js";
|
|
33
34
|
import {
|
|
34
35
|
__default,
|
|
35
36
|
classifyRef,
|
|
36
37
|
extractFrontmatter
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OFOIBV5J.js";
|
|
38
39
|
import {
|
|
39
40
|
findConfigFileSync,
|
|
40
41
|
ownsKey,
|
|
41
42
|
parseCollections,
|
|
42
43
|
readConfigFileSync,
|
|
43
44
|
selectCollections
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-B2242FYO.js";
|
|
45
46
|
import {
|
|
46
47
|
warn
|
|
47
48
|
} from "./chunk-HX44GB4Z.js";
|
|
@@ -1204,7 +1205,7 @@ async function gradeOne(ctx, target) {
|
|
|
1204
1205
|
{
|
|
1205
1206
|
evalName: ev.name,
|
|
1206
1207
|
file: plan.page.file,
|
|
1207
|
-
message: "No command to run
|
|
1208
|
+
message: "No command to run, because the script is not generated. Run manni docevals generate, or manni docevals run with a provider configured.",
|
|
1208
1209
|
severity: ev.severity,
|
|
1209
1210
|
diagnostic: true
|
|
1210
1211
|
}
|
|
@@ -1221,7 +1222,7 @@ async function gradeOne(ctx, target) {
|
|
|
1221
1222
|
{
|
|
1222
1223
|
evalName: ev.name,
|
|
1223
1224
|
file: plan.page.file,
|
|
1224
|
-
message: `Failed to run command "${ev.command[0] ?? "(empty)"}": ${result.spawnError}
|
|
1225
|
+
message: `Failed to run command "${ev.command[0] ?? "(empty)"}": ${result.spawnError}. Fix the eval's command.`,
|
|
1225
1226
|
severity: ev.severity,
|
|
1226
1227
|
diagnostic: true
|
|
1227
1228
|
}
|
|
@@ -1232,7 +1233,7 @@ async function gradeOne(ctx, target) {
|
|
|
1232
1233
|
{
|
|
1233
1234
|
evalName: ev.name,
|
|
1234
1235
|
file: plan.page.file,
|
|
1235
|
-
message: `Command timed out after ${ev.timeoutMs ?? ctx.config.scripts.timeoutMs}ms
|
|
1236
|
+
message: `Command timed out after ${ev.timeoutMs ?? ctx.config.scripts.timeoutMs}ms. Fix the command, or raise the eval's timeout-ms if the check is slow by design.`,
|
|
1236
1237
|
severity: ev.severity,
|
|
1237
1238
|
diagnostic: true
|
|
1238
1239
|
}
|
|
@@ -1249,7 +1250,8 @@ async function gradeOne(ctx, target) {
|
|
|
1249
1250
|
// "Exit code N" is the message users and docs already know; only the
|
|
1250
1251
|
// null case — killed by a signal, which is what a timeout produces —
|
|
1251
1252
|
// needs different words, because "Exit code null" describes nothing.
|
|
1252
|
-
|
|
1253
|
+
// The output comes last, so the direction is never cut off by it.
|
|
1254
|
+
message: (result.code === null ? "Killed before exiting." : `Exit code ${result.code}.`) + " Edit the page until the command passes, or fix the command if it is broken." + (tail ? ` Output: ${tail}` : ""),
|
|
1253
1255
|
severity: ev.severity
|
|
1254
1256
|
}
|
|
1255
1257
|
];
|
|
@@ -1392,7 +1394,7 @@ var regexGrader = {
|
|
|
1392
1394
|
evalName: ev.name,
|
|
1393
1395
|
file: plan.page.file,
|
|
1394
1396
|
ruleId: "regex/unreadable-target",
|
|
1395
|
-
message: selected.reason,
|
|
1397
|
+
message: `${selected.reason}. The eval's target is wrong. Fix the eval, or tell its owner.`,
|
|
1396
1398
|
severity: ev.severity,
|
|
1397
1399
|
line: 1
|
|
1398
1400
|
});
|
|
@@ -1407,7 +1409,7 @@ var regexGrader = {
|
|
|
1407
1409
|
evalName: ev.name,
|
|
1408
1410
|
file: plan.page.file,
|
|
1409
1411
|
ruleId: "regex/not-found",
|
|
1410
|
-
message: `Pattern /${pattern}/${flags} not found in ${selected.label}
|
|
1412
|
+
message: `Pattern /${pattern}/${flags} not found in ${selected.label}. Add the text the eval asks for.`,
|
|
1411
1413
|
severity: ev.severity,
|
|
1412
1414
|
line: 1
|
|
1413
1415
|
});
|
|
@@ -1416,7 +1418,7 @@ var regexGrader = {
|
|
|
1416
1418
|
evalName: ev.name,
|
|
1417
1419
|
file: plan.page.file,
|
|
1418
1420
|
ruleId: "regex/found",
|
|
1419
|
-
message: `Pattern /${pattern}/${flags} found in ${selected.label}, expected absent
|
|
1421
|
+
message: `Pattern /${pattern}/${flags} found in ${selected.label}, expected absent. Remove or reword the matching text.`,
|
|
1420
1422
|
severity: ev.severity,
|
|
1421
1423
|
line: offset + lineAt(text, first.index)
|
|
1422
1424
|
});
|
|
@@ -1427,7 +1429,7 @@ var regexGrader = {
|
|
|
1427
1429
|
evalName: ev.name,
|
|
1428
1430
|
file: plan.page.file,
|
|
1429
1431
|
ruleId: "regex/count",
|
|
1430
|
-
message: `Pattern /${pattern}/${flags} matched ${String(all.length)} time(s) in ${selected.label}, expected ${String(want)}
|
|
1432
|
+
message: `Pattern /${pattern}/${flags} matched ${String(all.length)} time(s) in ${selected.label}, expected ${String(want)}. Edit the page so it matches ${String(want)} time(s).`,
|
|
1431
1433
|
severity: ev.severity,
|
|
1432
1434
|
line: first === void 0 ? 1 : offset + lineAt(text, first.index)
|
|
1433
1435
|
});
|
|
@@ -1639,7 +1641,8 @@ function resolvePage(page, config) {
|
|
|
1639
1641
|
if (ev.grader === "ai" && !inline.examples) {
|
|
1640
1642
|
problems.push({
|
|
1641
1643
|
message: `Eval "${inline.id}": ai-graded evals work best with examples.pass/examples.fail`,
|
|
1642
|
-
|
|
1644
|
+
// Advice, not a defect: a notice reports and never fails a run.
|
|
1645
|
+
level: "notice",
|
|
1643
1646
|
...locationOf(page, linePtr)
|
|
1644
1647
|
});
|
|
1645
1648
|
}
|
|
@@ -2305,12 +2308,14 @@ function stampSuites(results, plans) {
|
|
|
2305
2308
|
const suiteOf = /* @__PURE__ */ new Map();
|
|
2306
2309
|
const weightOf = /* @__PURE__ */ new Map();
|
|
2307
2310
|
const locationOf2 = /* @__PURE__ */ new Map();
|
|
2311
|
+
const assertionOf = /* @__PURE__ */ new Map();
|
|
2308
2312
|
for (const plan of plans) {
|
|
2309
2313
|
for (const ev of plan.evals) {
|
|
2310
2314
|
const key = resultKey(plan.page.file, ev.name);
|
|
2311
2315
|
suiteOf.set(key, ev.suite);
|
|
2312
2316
|
weightOf.set(key, ev.weight);
|
|
2313
2317
|
locationOf2.set(key, ev.location);
|
|
2318
|
+
if (ev.assertion !== void 0) assertionOf.set(key, ev.assertion);
|
|
2314
2319
|
}
|
|
2315
2320
|
}
|
|
2316
2321
|
for (const r of results) {
|
|
@@ -2318,6 +2323,12 @@ function stampSuites(results, plans) {
|
|
|
2318
2323
|
r.suite = suiteOf.get(key) ?? "default";
|
|
2319
2324
|
r.weight = weightOf.get(key) ?? 1;
|
|
2320
2325
|
r.location = locationOf2.get(key) ?? { file: r.file };
|
|
2326
|
+
r.guidance = {
|
|
2327
|
+
id: r.location.file,
|
|
2328
|
+
rule: r.evalName,
|
|
2329
|
+
description: assertionOf.get(key) ?? null,
|
|
2330
|
+
guide: FIX_GUIDE
|
|
2331
|
+
};
|
|
2321
2332
|
}
|
|
2322
2333
|
}
|
|
2323
2334
|
function resolveBaseline(results, config, options, cwd, problems) {
|
|
@@ -2960,4 +2971,4 @@ export {
|
|
|
2960
2971
|
applySelection,
|
|
2961
2972
|
runEvals
|
|
2962
2973
|
};
|
|
2963
|
-
//# sourceMappingURL=chunk-
|
|
2974
|
+
//# sourceMappingURL=chunk-JTATFPWB.js.map
|