@hawkeyexl/manni 4.13.0 → 4.14.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-TKNIUBLK.js +48 -0
- package/dist/build-6G7PEAG4.js +37 -0
- package/dist/calibrate-BDCXDZV5.js +43 -0
- package/dist/capture-NQJLZD66.js +39 -0
- package/dist/check-552X5I2J.js +36 -0
- package/dist/{check-LU5YC3L4.js → check-5HMDJOFP.js} +15 -14
- package/dist/check-BSB4FF4L.js +33 -0
- package/dist/{check-NBN2YK2J.js → check-QIZCTAIR.js} +33 -32
- package/dist/{check-NBN2YK2J.js.map → check-QIZCTAIR.js.map} +1 -1
- package/dist/{chunk-NSAW7U42.js → chunk-2A6XYSXO.js} +58 -10
- package/dist/chunk-2A6XYSXO.js.map +1 -0
- package/dist/{chunk-PA7CMQGD.js → chunk-2HQSMZ4N.js} +11 -5
- package/dist/chunk-2HQSMZ4N.js.map +1 -0
- package/dist/{chunk-LNGSE7V2.js → chunk-36FJWJSK.js} +132 -27
- package/dist/chunk-36FJWJSK.js.map +1 -0
- package/dist/{chunk-BMBAAPGN.js → chunk-3BMTCS4H.js} +33 -18
- package/dist/chunk-3BMTCS4H.js.map +1 -0
- package/dist/{chunk-NWUXRV6N.js → chunk-3CCY7M3R.js} +10 -8
- package/dist/chunk-3CCY7M3R.js.map +1 -0
- package/dist/{chunk-TDCOKKMI.js → chunk-3MTZZJKH.js} +3 -3
- package/dist/chunk-4U3X7LYV.js +236 -0
- package/dist/chunk-4U3X7LYV.js.map +1 -0
- package/dist/{chunk-OYIWF3B2.js → chunk-56URKBXQ.js} +17 -17
- package/dist/chunk-56URKBXQ.js.map +1 -0
- package/dist/{chunk-IGQMBHFY.js → chunk-66MKBRTA.js} +88 -12
- package/dist/chunk-66MKBRTA.js.map +1 -0
- package/dist/{chunk-GWI6JPTT.js → chunk-6VT3Z352.js} +24 -7
- package/dist/chunk-6VT3Z352.js.map +1 -0
- package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
- package/dist/{chunk-NTEYYYKL.js → chunk-6XFSZCLT.js} +16 -22
- package/dist/chunk-6XFSZCLT.js.map +1 -0
- package/dist/{chunk-OREHJQNN.js → chunk-742G2QCV.js} +4 -3
- package/dist/{chunk-OREHJQNN.js.map → chunk-742G2QCV.js.map} +1 -1
- package/dist/chunk-7AXJY4FX.js +83 -0
- package/dist/chunk-7AXJY4FX.js.map +1 -0
- package/dist/{chunk-EQ7E6HMG.js → chunk-7KOWE4F4.js} +14 -16
- package/dist/chunk-7KOWE4F4.js.map +1 -0
- package/dist/{chunk-J5NOWIJ3.js → chunk-7PENJOI6.js} +14 -8
- package/dist/{chunk-J5NOWIJ3.js.map → chunk-7PENJOI6.js.map} +1 -1
- package/dist/chunk-7WVWGULD.js +81 -0
- package/dist/chunk-7WVWGULD.js.map +1 -0
- package/dist/{chunk-VYBYUQIP.js → chunk-A7MNH4YI.js} +88 -7
- package/dist/chunk-A7MNH4YI.js.map +1 -0
- package/dist/{chunk-WVXCN5DS.js → chunk-AJYUJ37M.js} +65 -8
- package/dist/chunk-AJYUJ37M.js.map +1 -0
- package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
- package/dist/chunk-B2242FYO.js.map +1 -0
- package/dist/{chunk-YZ4TJLZQ.js → chunk-B6GUSA53.js} +15 -10
- package/dist/chunk-B6GUSA53.js.map +1 -0
- package/dist/{chunk-PCGBXHSE.js → chunk-BA4TCCOO.js} +5 -5
- package/dist/{chunk-TQ3W6RKG.js → chunk-BAWKNF6U.js} +3 -3
- package/dist/{chunk-HY6ROJTH.js → chunk-BIRGZEWO.js} +86 -10
- package/dist/chunk-BIRGZEWO.js.map +1 -0
- package/dist/chunk-BREAC43H.js +85 -0
- package/dist/chunk-BREAC43H.js.map +1 -0
- package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
- package/dist/{chunk-OUAH7XF2.js → chunk-CZJNYHK7.js} +2 -2
- package/dist/{chunk-52WO7ESI.js → chunk-D2TIZOMN.js} +6 -5
- package/dist/chunk-D2TIZOMN.js.map +1 -0
- package/dist/{chunk-VOXOBUTX.js → chunk-EXAZ7K25.js} +5 -5
- package/dist/{chunk-BQXY76JB.js → chunk-GHZAOPGK.js} +148 -92
- package/dist/chunk-GHZAOPGK.js.map +1 -0
- package/dist/{chunk-UQMLCIRX.js → chunk-HGU4FDRY.js} +6 -6
- package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
- package/dist/{chunk-3BVDFQ6Y.js → chunk-IOYEPB27.js} +5 -5
- package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
- package/dist/{chunk-6ZFJWUUH.js → chunk-JNMY7KZG.js} +2 -2
- package/dist/{chunk-OBXCJZ6R.js → chunk-JTEWU4C6.js} +26 -16
- package/dist/chunk-JTEWU4C6.js.map +1 -0
- package/dist/{chunk-VNYXK7TM.js → chunk-JWBS7YDI.js} +8 -8
- package/dist/chunk-JWBS7YDI.js.map +1 -0
- package/dist/{chunk-ULDV2LUI.js → chunk-LCRBR7KW.js} +10 -4
- package/dist/chunk-LCRBR7KW.js.map +1 -0
- package/dist/{chunk-3HUCB4Z3.js → chunk-M43NTWVH.js} +10 -7
- package/dist/chunk-M43NTWVH.js.map +1 -0
- package/dist/chunk-M534DYAJ.js +76 -0
- package/dist/chunk-M534DYAJ.js.map +1 -0
- package/dist/chunk-MC7U5IH4.js +126 -0
- package/dist/chunk-MC7U5IH4.js.map +1 -0
- package/dist/{chunk-7JPL3CUC.js → chunk-MIGFQP5N.js} +2 -2
- package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
- package/dist/{chunk-X4MPUD4B.js → chunk-QEZQ7MGH.js} +53 -13
- package/dist/chunk-QEZQ7MGH.js.map +1 -0
- package/dist/{chunk-DQOM3DEU.js → chunk-QF7EIRMU.js} +29 -23
- package/dist/chunk-QF7EIRMU.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-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
- package/dist/{chunk-JUL2PRQN.js → chunk-STM3G7WJ.js} +207 -79
- package/dist/chunk-STM3G7WJ.js.map +1 -0
- package/dist/{chunk-HKTGHLBA.js → chunk-T3BBNLAT.js} +2 -2
- package/dist/{chunk-HKTGHLBA.js.map → chunk-T3BBNLAT.js.map} +1 -1
- package/dist/{chunk-SCLXVTFZ.js → chunk-TKINOTVS.js} +1 -1
- package/dist/chunk-TKINOTVS.js.map +1 -0
- package/dist/{chunk-E6BVUDGY.js → chunk-USKTLEPZ.js} +4 -4
- package/dist/{chunk-LSFXNAHU.js → chunk-V6OCE4ND.js} +129 -59
- package/dist/chunk-V6OCE4ND.js.map +1 -0
- package/dist/{chunk-N6A6DJUO.js → chunk-VBBJGFME.js} +6 -7
- package/dist/chunk-VBBJGFME.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-JEUFYSFQ.js → chunk-W5DO426O.js} +114 -70
- package/dist/chunk-W5DO426O.js.map +1 -0
- package/dist/{chunk-3O6U4ICM.js → chunk-W6B24IMO.js} +3 -3
- package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
- package/dist/chunk-WDENIUC7.js.map +1 -0
- package/dist/{chunk-KE2F7QES.js → chunk-WIPTWZVH.js} +6 -6
- package/dist/{chunk-7RNONVHI.js → chunk-Y36PNW6J.js} +9 -9
- package/dist/{chunk-QKT67PFE.js → chunk-Y37VJFX2.js} +9 -9
- package/dist/{chunk-3XGTNN3M.js → chunk-YJ3EG2D5.js} +12 -124
- package/dist/chunk-YJ3EG2D5.js.map +1 -0
- package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
- package/dist/chunk-ZINZTHWO.js.map +1 -0
- package/dist/{chunk-CODWRUAD.js → chunk-ZPLIXZZ6.js} +7 -5
- package/dist/chunk-ZPLIXZZ6.js.map +1 -0
- package/dist/{chunk-HIEGOW7X.js → chunk-ZRQUQS7P.js} +5 -79
- package/dist/chunk-ZRQUQS7P.js.map +1 -0
- package/dist/{cli-KYTCJYXK.js → cli-5XKHMRZ5.js} +317 -28
- package/dist/cli-5XKHMRZ5.js.map +1 -0
- package/dist/{cli-DGFLJ2DD.js → cli-7QHJW5GH.js} +69 -26
- package/dist/cli-7QHJW5GH.js.map +1 -0
- package/dist/{cli-7DETHSNW.js → cli-BUV3DRUH.js} +29 -83
- package/dist/cli-BUV3DRUH.js.map +1 -0
- package/dist/{cli-RP5E7XHC.js → cli-IKDX2I5X.js} +20 -18
- package/dist/{cli-RP5E7XHC.js.map → cli-IKDX2I5X.js.map} +1 -1
- package/dist/{cli-H5LVGOVT.js → cli-LOND37OA.js} +383 -247
- package/dist/cli-LOND37OA.js.map +1 -0
- package/dist/{cli-AZKWTCFV.js → cli-O6Y2KVWD.js} +11 -11
- package/dist/{cli-BW5VOFOZ.js → cli-QTLOAVOY.js} +11 -10
- package/dist/{cli-BW5VOFOZ.js.map → cli-QTLOAVOY.js.map} +1 -1
- package/dist/{cli-G66X7YMP.js → cli-SOA2E26G.js} +23 -22
- package/dist/{cli-G66X7YMP.js.map → cli-SOA2E26G.js.map} +1 -1
- package/dist/{cli-ECVT4YXR.js → cli-VQYB3663.js} +19 -18
- package/dist/{cli-ECVT4YXR.js.map → cli-VQYB3663.js.map} +1 -1
- package/dist/{cli-L5B2RVV2.js → cli-X6IWTDFK.js} +31 -29
- package/dist/{cli-L5B2RVV2.js.map → cli-X6IWTDFK.js.map} +1 -1
- package/dist/{cli-4JHQCPHU.js → cli-XAT673VB.js} +3 -3
- 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-IPBOTQBN.js +36 -0
- package/dist/github-XM36D7ZH.js +32 -0
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +92 -20
- package/dist/index.js +137 -131
- package/dist/index.js.map +1 -1
- package/dist/{json-LCVPMEAM.js → json-225TND7K.js} +15 -13
- package/dist/{labels-OQXBVM4A.js → labels-CTLHIRC4.js} +14 -12
- package/dist/{labels-OQXBVM4A.js.map → labels-CTLHIRC4.js.map} +1 -1
- package/dist/lint-NP3PC3SO.js +35 -0
- package/dist/list-JJGNKO6S.js +36 -0
- package/dist/list-Q457TIMA.js +34 -0
- package/dist/{page-XPX5XJZE.js → page-FJW7J2EU.js} +13 -12
- package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
- package/dist/{prepare-VMBIQYAM.js → prepare-RKJEKHAG.js} +21 -20
- package/dist/{prepare-VMBIQYAM.js.map → prepare-RKJEKHAG.js.map} +1 -1
- package/dist/{pretty-KG6TMOEI.js → pretty-ECBO3EVT.js} +15 -14
- package/dist/{pretty-KSTZMBUF.js → pretty-QFEN2SIA.js} +15 -13
- package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
- package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
- package/dist/{reporters-FBYLPKD4.js → reporters-IKKL5RHS.js} +15 -14
- package/dist/{reporters-26H3N2KW.js → reporters-TDQDQHKE.js} +6 -5
- package/dist/{reporters-AQU4W3KY.js → reporters-WGLQKW2Y.js} +6 -6
- package/dist/run-BTETGGLW.js +39 -0
- package/dist/sarif-K4SMB563.js +31 -0
- package/dist/sarif-ZHFK6PZY.js +37 -0
- package/dist/{term-SI3VM6EM.js → term-2M7APX2A.js} +58 -109
- package/dist/term-2M7APX2A.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-GBM5STKS.js} +6 -6
- package/dist/validate-GBM5STKS.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-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-TKNIUBLK.js.map} +0 -0
- /package/dist/{build-4BL24BG3.js.map → build-6G7PEAG4.js.map} +0 -0
- /package/dist/{calibrate-AEDJ7N7G.js.map → calibrate-BDCXDZV5.js.map} +0 -0
- /package/dist/{capture-TP3P4YNL.js.map → capture-NQJLZD66.js.map} +0 -0
- /package/dist/{check-5IYH42KS.js.map → check-552X5I2J.js.map} +0 -0
- /package/dist/{check-LU5YC3L4.js.map → check-5HMDJOFP.js.map} +0 -0
- /package/dist/{check-S55MH66H.js.map → check-BSB4FF4L.js.map} +0 -0
- /package/dist/{chunk-TDCOKKMI.js.map → chunk-3MTZZJKH.js.map} +0 -0
- /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
- /package/dist/{chunk-PCGBXHSE.js.map → chunk-BA4TCCOO.js.map} +0 -0
- /package/dist/{chunk-TQ3W6RKG.js.map → chunk-BAWKNF6U.js.map} +0 -0
- /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
- /package/dist/{chunk-OUAH7XF2.js.map → chunk-CZJNYHK7.js.map} +0 -0
- /package/dist/{chunk-VOXOBUTX.js.map → chunk-EXAZ7K25.js.map} +0 -0
- /package/dist/{chunk-UQMLCIRX.js.map → chunk-HGU4FDRY.js.map} +0 -0
- /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
- /package/dist/{chunk-3BVDFQ6Y.js.map → chunk-IOYEPB27.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-7JPL3CUC.js.map → chunk-MIGFQP5N.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-USKTLEPZ.js.map} +0 -0
- /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
- /package/dist/{chunk-3O6U4ICM.js.map → chunk-W6B24IMO.js.map} +0 -0
- /package/dist/{chunk-KE2F7QES.js.map → chunk-WIPTWZVH.js.map} +0 -0
- /package/dist/{chunk-7RNONVHI.js.map → chunk-Y36PNW6J.js.map} +0 -0
- /package/dist/{chunk-QKT67PFE.js.map → chunk-Y37VJFX2.js.map} +0 -0
- /package/dist/{cli-AZKWTCFV.js.map → cli-O6Y2KVWD.js.map} +0 -0
- /package/dist/{cli-4JHQCPHU.js.map → cli-XAT673VB.js.map} +0 -0
- /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
- /package/dist/{github-DJQ4MWNZ.js.map → github-IPBOTQBN.js.map} +0 -0
- /package/dist/{github-UWTDM2J2.js.map → github-XM36D7ZH.js.map} +0 -0
- /package/dist/{json-LCVPMEAM.js.map → json-225TND7K.js.map} +0 -0
- /package/dist/{lint-O7XRHKFP.js.map → lint-NP3PC3SO.js.map} +0 -0
- /package/dist/{list-OOOCLOAL.js.map → list-JJGNKO6S.js.map} +0 -0
- /package/dist/{list-OYQ5XPN2.js.map → list-Q457TIMA.js.map} +0 -0
- /package/dist/{page-XPX5XJZE.js.map → page-FJW7J2EU.js.map} +0 -0
- /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
- /package/dist/{pretty-KG6TMOEI.js.map → pretty-ECBO3EVT.js.map} +0 -0
- /package/dist/{pretty-KSTZMBUF.js.map → pretty-QFEN2SIA.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-IKKL5RHS.js.map} +0 -0
- /package/dist/{reporters-AQU4W3KY.js.map → reporters-TDQDQHKE.js.map} +0 -0
- /package/dist/{reporters-FBYLPKD4.js.map → reporters-WGLQKW2Y.js.map} +0 -0
- /package/dist/{run-KUGTU3TT.js.map → run-BTETGGLW.js.map} +0 -0
- /package/dist/{types-Y6TXHM7M.js.map → sarif-K4SMB563.js.map} +0 -0
- /package/dist/{validate-NQO7TFSN.js.map → sarif-ZHFK6PZY.js.map} +0 -0
|
@@ -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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,GAAG,IAAI,EAAE,CAAC;AAAA,QACtE;AAAA,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,13 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
TERM_AUX_FIELDS,
|
|
4
|
-
TERM_DESIGNATION_FIELDS,
|
|
5
|
-
TERM_FIELDS,
|
|
6
3
|
displayPath,
|
|
7
4
|
isMultilingual,
|
|
8
5
|
languageOf,
|
|
9
6
|
plural
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YJ3EG2D5.js";
|
|
8
|
+
import {
|
|
9
|
+
TERM_AUX_FIELDS,
|
|
10
|
+
TERM_DESIGNATION_FIELDS,
|
|
11
|
+
TERM_FIELDS
|
|
12
|
+
} from "./chunk-MC7U5IH4.js";
|
|
13
|
+
import {
|
|
14
|
+
guidanceLines
|
|
15
|
+
} from "./chunk-QK6VYJHV.js";
|
|
11
16
|
import {
|
|
12
17
|
palette
|
|
13
18
|
} from "./chunk-RNVYGWIC.js";
|
|
@@ -204,6 +209,7 @@ function renderFindingsPretty(report, opts) {
|
|
|
204
209
|
i === 0 ? ` ${severityText(c, finding.severity)} ${finding.ruleId.padEnd(ruleWidth)}${text}` : `${indent}${text}`
|
|
205
210
|
);
|
|
206
211
|
});
|
|
212
|
+
for (const line of guidanceLines(finding.guidance)) lines.push(`${indent}${c.dim(line)}`);
|
|
207
213
|
}
|
|
208
214
|
lines.push("", `${counts(report.findings)} in ${terms}${baselined}`);
|
|
209
215
|
return lines.join("\n");
|
|
@@ -336,4 +342,4 @@ export {
|
|
|
336
342
|
renderValeWiring,
|
|
337
343
|
renderFormatsPretty
|
|
338
344
|
};
|
|
339
|
-
//# sourceMappingURL=chunk-
|
|
345
|
+
//# sourceMappingURL=chunk-2HQSMZ4N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/term/reporters/pretty.ts"],"sourcesContent":["/**\n * Human output for every `manni term` command, in the shapes the ladder of\n * proposal 0052 prints. Columns are padded to their widest value; prose wraps\n * to 80 columns under its own column, so a long definition or message never\n * runs back to the left edge.\n */\nimport { palette, type Colors } from \"../../shared/color.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport type { TermReport } from \"../commands/findings.js\";\nimport type { FormatRow } from \"../commands/formats.js\";\nimport { displayPath, plural } from \"../commands/run.js\";\nimport type { ValeWiring, WriteReport } from \"../commands/write.js\";\nimport type { Severity } from \"../../shared/severity.js\";\nimport { isMultilingual, languageOf } from \"../core/writers/render-util.js\";\nimport {\n TERM_AUX_FIELDS,\n TERM_DESIGNATION_FIELDS,\n TERM_FIELDS,\n type Term,\n type TermDesignation,\n type TermField,\n type TermFinding,\n type TermLink,\n type TermRecord,\n type TermTransaction,\n} from \"../types.js\";\n\nconst WIDTH = 80;\n\n/** Words packed into lines of at most `width` characters; a longer word stands alone. */\nfunction wrapWords(text: string, width: number): string[] {\n const lines: string[] = [];\n let line = \"\";\n for (const word of text.split(/\\s+/).filter((w) => w !== \"\")) {\n if (line === \"\") line = word;\n else if (line.length + 1 + word.length <= width) line = `${line} ${word}`;\n else {\n lines.push(line);\n line = word;\n }\n }\n if (line !== \"\") lines.push(line);\n return lines.length === 0 ? [\"\"] : lines;\n}\n\n/** Sentences packed into lines of at most `width`; a message that fits stays whole. */\nfunction wrapSentences(text: string, width: number): string[] {\n if (text.length <= width) return [text];\n const lines: string[] = [];\n let line = \"\";\n for (const sentence of text.split(/(?<=\\.)\\s+(?=\\S)/)) {\n if (line === \"\") line = sentence;\n else if (line.length + 1 + sentence.length <= width) line = `${line} ${sentence}`;\n else {\n lines.push(line);\n line = sentence;\n }\n }\n if (line !== \"\") lines.push(line);\n return lines;\n}\n\nfunction hanging(first: string, lines: readonly string[]): string[] {\n const indent = \" \".repeat(first.length);\n return lines.map((line, i) => `${i === 0 ? first : indent}${line}`.trimEnd());\n}\n\n// ---------------------------------------------------------------------------\n// list\n\nexport function renderListPretty(terms: readonly Term[]): string {\n const idWidth = Math.max(0, ...terms.map((t) => t.id.length)) + 3;\n const labelWidth = Math.max(0, ...terms.map((t) => t.record.label.length)) + 3;\n // The language column appears only when it tells the rows apart.\n const multilingual = isMultilingual(terms);\n const languageWidth = Math.max(0, ...terms.map((t) => languageOf(t).length)) + 3;\n const rows = terms.map((t) => {\n const language = multilingual ? languageOf(t).padEnd(languageWidth) : \"\";\n const alts = (t.record[\"alt-labels\"] ?? []).join(\", \");\n return `${t.id.padEnd(idWidth)}${language}${t.record.label.padEnd(labelWidth)}${alts}`.trimEnd();\n });\n return [...rows, plural(terms.length, \"term\")].join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// get\n\n/** A root field `get` shows as one row of text. */\ntype RowField = Exclude<TermField, \"label\" | \"concept-entry\" | \"designations\" | \"tbx-markup\" | \"tbx-elements\">;\n\n/** The order `get` shows root fields in: names first, then what they mean, the definition last. */\nconst GET_FIELDS: readonly RowField[] = [\n \"alt-labels\",\n \"hidden-labels\",\n \"broader\",\n \"narrower\",\n \"related-terms\",\n \"see\",\n \"abstract\",\n \"scope-note\",\n \"notation\",\n \"exact-matches\",\n \"close-matches\",\n \"broad-matches\",\n \"narrow-matches\",\n \"related-matches\",\n \"subject-field\",\n \"contexts\",\n \"notes\",\n \"sources\",\n \"customer-subsets\",\n \"project-subsets\",\n \"cross-references\",\n \"external-cross-references\",\n \"graphics\",\n \"transactions\",\n \"definition\",\n];\n\n/** The aux fields a block's line shows; its `tbx-elements` are counted on a row of their own. */\nconst SHOWN_AUX = TERM_AUX_FIELDS.filter((field) => field !== \"tbx-elements\");\n\n/** The key column's narrowest width: the widest 1.0.0 field, `related-terms`, plus two. */\nconst MIN_KEY_WIDTH = 15;\n\nfunction linkText(link: TermLink): string {\n return link.text === undefined ? link.target : `${link.text} (${link.target})`;\n}\n\nfunction transactionText(transaction: TermTransaction): string {\n return [transaction.type, transaction.date, transaction.responsibility].filter((part) => part !== undefined).join(\" \");\n}\n\n/** One value as `get` prints it: a list joined with commas, a link as its text and target, a transaction as its parts. */\nfunction valueText(value: string | readonly (string | TermLink | TermTransaction)[]): string {\n if (typeof value === \"string\") return value;\n return value\n .map((item) => (typeof item === \"string\" ? item : \"target\" in item ? linkText(item) : transactionText(item)))\n .join(\", \");\n}\n\n/** `progressive lens: part-of-speech noun, term-type fullForm`, or `undefined` when it says nothing but its term. */\nfunction designationLine(designation: TermDesignation): string | undefined {\n const parts: string[] = [];\n for (const key of TERM_DESIGNATION_FIELDS) {\n const value = designation[key];\n if (value !== undefined) parts.push(`${key} ${value}`);\n }\n const comments = designation[\"transfer-comments\"];\n if (comments !== undefined) parts.push(`transfer-comments ${valueText(comments)}`);\n for (const key of SHOWN_AUX) {\n const value = designation[key];\n if (value !== undefined) parts.push(`${key} ${valueText(value)}`);\n }\n return parts.length === 0 ? undefined : `${designation.term}: ${parts.join(\", \")}`;\n}\n\n/** `1 at the root, 1 on PAL, 1 in concept-entry`: where the record keeps elements no named field maps. */\nfunction passThroughText(record: TermRecord): string | undefined {\n const parts: string[] = [];\n const count = (items: readonly string[] | undefined, where: string): void => {\n if (items !== undefined) parts.push(`${String(items.length)} ${where}`);\n };\n count(record[\"tbx-elements\"], \"at the root\");\n for (const designation of record.designations ?? []) count(designation[\"tbx-elements\"], `on ${designation.term}`);\n count(record[\"concept-entry\"]?.[\"tbx-elements\"], \"in concept-entry\");\n return parts.length === 0 ? undefined : parts.join(\", \");\n}\n\nexport interface GetPrettyOptions {\n color: boolean;\n cwd?: string;\n /** The entry in its other languages: the set's other terms with the same id. */\n others?: readonly Term[];\n}\n\nexport function renderGetPretty(term: Term, opts: GetPrettyOptions): string {\n const c = palette(opts.color);\n const { record } = term;\n const where = `${displayPath(term.location.file, opts.cwd ?? process.cwd())}:${String(term.location.line)}`;\n\n // Each row is a key and its lines, collected first so the key column fits the widest key shown.\n const rows: [string, string[]][] = [[\"id\", [term.id]]];\n if (term.language !== undefined) rows.push([\"language\", [term.language]]);\n for (const field of GET_FIELDS) {\n const value = record[field];\n if (value !== undefined) rows.push([field, [valueText(value)]]);\n }\n const concept = record[\"concept-entry\"];\n if (concept !== undefined) {\n const lines = SHOWN_AUX.flatMap((key) => {\n const value = concept[key];\n return value === undefined ? [] : [`${key}: ${valueText(value)}`];\n });\n if (lines.length > 0) rows.push([\"concept-entry\", lines]);\n }\n const designations = (record.designations ?? []).map(designationLine).filter((line) => line !== undefined);\n if (designations.length > 0) rows.push([\"designations\", designations]);\n if (record[\"tbx-markup\"] !== undefined) rows.push([\"tbx-markup\", record[\"tbx-markup\"]]);\n const passThrough = passThroughText(record);\n if (passThrough !== undefined) rows.push([\"tbx-elements\", [passThrough]]);\n const others = opts.others ?? [];\n if (others.length > 0) {\n rows.push([\"other languages\", [others.map((t) => `${languageOf(t)} (${t.record.label})`).join(\", \")]]);\n }\n\n const keyWidth = Math.max(MIN_KEY_WIDTH, ...rows.map(([key]) => key.length + 2));\n const lines = [`${c.bold(record.label.padEnd(40))}${c.dim(where)}`];\n for (const [key, values] of rows) {\n values.forEach((value, i) => {\n const prefix = ` ${(i === 0 ? key : \"\").padEnd(keyWidth)}`;\n lines.push(...hanging(prefix, wrapWords(value, WIDTH - prefix.length)));\n });\n }\n return lines.join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// check and lint\n\nconst RULE_WIDTH = 32;\n\nfunction severityText(c: Colors, severity: Severity): string {\n const padded = severity.padEnd(6);\n if (severity === \"error\") return c.red(padded);\n if (severity === \"warning\") return c.yellow(padded);\n return c.cyan(padded);\n}\n\nfunction counts(findings: readonly TermFinding[]): string {\n const parts: string[] = [];\n const n = (severity: Severity): number => findings.filter((f) => f.severity === severity).length;\n if (n(\"error\") > 0) parts.push(plural(n(\"error\"), \"error\"));\n if (n(\"warning\") > 0) parts.push(plural(n(\"warning\"), \"warning\"));\n if (n(\"notice\") > 0) parts.push(plural(n(\"notice\"), \"notice\"));\n return parts.join(\", \");\n}\n\nexport interface FindingsPrettyOptions {\n color: boolean;\n /** Whether the clean line counts references: `check` reads them, `lint` does not. */\n references?: boolean;\n}\n\nexport function renderFindingsPretty(report: TermReport, opts: FindingsPrettyOptions): string {\n const c = palette(opts.color);\n const { baseline } = report;\n if (baseline?.written === true) {\n return `${c.green(\"✓\")} ${plural(report.found, \"finding\")} recorded in ${baseline.path}`;\n }\n const baselined = baseline !== undefined && baseline.suppressed > 0 ? `, ${String(baseline.suppressed)} baselined` : \"\";\n const terms = plural(report.terms, \"term\");\n\n if (report.findings.length === 0) {\n const references = opts.references === false ? \"\" : `, ${plural(report.references, \"reference\")}`;\n return `${c.green(\"✓\")} ${terms}${references}, no findings${baselined}`;\n }\n\n const ruleWidth = Math.max(RULE_WIDTH, ...report.findings.map((f) => f.ruleId.length + 2));\n const lines: string[] = [];\n let group: string | undefined;\n for (const finding of report.findings) {\n const file = displayPath(finding.file, report.cwd);\n const header = finding.line === undefined ? file : `${file}:${String(finding.line)}`;\n if (header !== group) {\n lines.push(c.bold(header));\n group = header;\n }\n const prefixWidth = 2 + 6 + 1 + ruleWidth;\n const message = wrapSentences(finding.message, WIDTH - prefixWidth);\n const indent = \" \".repeat(prefixWidth);\n message.forEach((text, i) => {\n lines.push(\n i === 0 ? ` ${severityText(c, finding.severity)} ${finding.ruleId.padEnd(ruleWidth)}${text}` : `${indent}${text}`,\n );\n });\n // The rule behind the finding, dim, at the indent the message wraps to.\n for (const line of guidanceLines(finding.guidance)) lines.push(`${indent}${c.dim(line)}`);\n }\n lines.push(\"\", `${counts(report.findings)} in ${terms}${baselined}`);\n return lines.join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// write\n\nfunction changeLine(change: WriteReport[\"changes\"][number]): string {\n switch (change.action) {\n case \"create\":\n return `${change.path} would be created`;\n case \"change\":\n return `${change.path} would change`;\n case \"remove\":\n return `${change.path} would be removed`;\n }\n}\n\n/** A generated Vale rule file's `swap:` entries. */\nfunction swapCount(content: string): number {\n const lines = content.split(/\\r?\\n/);\n const start = lines.indexOf(\"swap:\");\n if (start === -1) return 0;\n return lines.slice(start + 1).filter((line) => line.startsWith(\" \")).length;\n}\n\nfunction baseName(path: string): string {\n return path.split(/[\\\\/]/).pop() ?? path;\n}\n\nconst CASING_RULES = new Set([\"Casing.yml\", \"Lowercase.yml\", \"SentenceStart.yml\"]);\n\n/** What each file of a Vale style holds: rule files by name, the acronym files together. */\nfunction valeLines(report: WriteReport): string[] {\n const rows: [string, string][] = [];\n const acronyms: string[] = [];\n for (const file of report.files) {\n const name = baseName(file.path);\n // A casing rule swaps each label and alt-label, so what it counts is labels.\n if (CASING_RULES.has(name)) rows.push([name, plural(swapCount(file.content), \"label\")]);\n else if (name === \"Deprecated.yml\") rows.push([name, plural(swapCount(file.content), \"swap\")]);\n else acronyms.push(name);\n }\n if (acronyms.length > 0) rows.push([acronyms.join(\", \"), plural(acronyms.length, \"acronym\")]);\n const width = Math.max(0, ...rows.map(([name]) => name.length)) + 2;\n return rows.map(([name, what]) => ` ${name.padEnd(width)}${what}`);\n}\n\n/** ` dropped from a definition list: scope-note on 3 terms, hidden-labels on 12`. */\nfunction droppedLine(report: WriteReport): string | undefined {\n if (report.dropped.length === 0) return undefined;\n // One entry per term per field, so counting entries counts terms: an id in two languages is two terms.\n const counts = new Map<TermField, number>();\n for (const { field } of report.dropped) counts.set(field, (counts.get(field) ?? 0) + 1);\n const fields = [...counts.entries()]\n .map(([field, n]) => ({ field, n }))\n .sort((a, b) => a.n - b.n || TERM_FIELDS.indexOf(a.field) - TERM_FIELDS.indexOf(b.field));\n const parts = fields.map(({ field, n }, i) => `${field} on ${i === 0 ? plural(n, \"term\") : String(n)}`);\n return ` dropped from ${report.droppedFrom ?? report.format ?? \"the render\"}: ${parts.join(\", \")}`;\n}\n\n/** ` dropped from tbx3: the headers of glossary.tbx, <stdin>`. */\nfunction droppedHeadersLine(report: WriteReport): string | undefined {\n const files = report.droppedHeaders ?? [];\n if (files.length === 0) return undefined;\n const what = files.length === 1 ? \"the header of\" : \"the headers of\";\n return ` dropped from ${report.droppedFrom ?? report.format ?? \"the render\"}: ${what} ${files.join(\", \")}`;\n}\n\n/** ` skipped 2 terms a definition list cannot read without a definition: varifocal, bifocal`. */\nfunction skippedLine(report: WriteReport): string | undefined {\n if (report.skipped.length === 0) return undefined;\n const construct = report.droppedFrom ?? report.format ?? \"the render\";\n const count = plural(report.skipped.length, \"term\");\n return ` skipped ${count} ${construct} cannot read without a definition: ${report.skipped.join(\", \")}`;\n}\n\n/** ` skipped 2 terms in another language than en: spectacle-lens (de), progressive-lens (de)`. */\nfunction otherLanguagesLine(report: WriteReport): string | undefined {\n const other = report.otherLanguages;\n if (other === undefined || other.terms.length === 0) return undefined;\n const terms = other.terms.map(({ id, language }) => `${id} (${language})`).join(\", \");\n return ` skipped ${plural(other.terms.length, \"term\")} in another language than ${other.written}: ${terms}`;\n}\n\n/**\n * ` kept the first language's value where languages differ: concept-entry.subject-field on 1 concept`.\n * Fields are counted in concepts, fewest first, as the dropped line counts terms.\n */\nfunction conflictsLine(report: WriteReport): string | undefined {\n const conflicts = report.conflicts ?? [];\n if (conflicts.length === 0) return undefined;\n const ids = new Map<string, Set<string>>();\n for (const { id, field } of conflicts) {\n const set = ids.get(field) ?? new Set<string>();\n set.add(id);\n ids.set(field, set);\n }\n // A stable sort keeps fields of one count in the order they were first reported.\n const fields = [...ids.entries()].map(([field, set]) => ({ field, n: set.size })).sort((a, b) => a.n - b.n);\n const parts = fields.map(({ field, n }, i) => `${field} on ${i === 0 ? plural(n, \"concept\") : String(n)}`);\n return ` kept the first language's value where languages differ: ${parts.join(\", \")}`;\n}\n\n/** The dropped, dropped-header, skipped and conflict lines, which a write and a dry run print alike. */\nfunction renderNotes(report: WriteReport): string[] {\n return [\n droppedLine(report),\n droppedHeadersLine(report),\n skippedLine(report),\n otherLanguagesLine(report),\n conflictsLine(report),\n ].filter(\n (line) => line !== undefined,\n );\n}\n\nfunction unchangedLine(report: WriteReport): string {\n return report.mode === \"in-place\" ? \"Nothing to write\" : `${report.target ?? \"\"} is up to date`;\n}\n\nexport function renderWritePretty(report: WriteReport): string {\n if (report.check) {\n return report.changes.length > 0 ? report.changes.map(changeLine).join(\"\\n\") : unchangedLine(report);\n }\n if (report.dryRun) {\n const changes = report.changes.length > 0 ? report.changes.map(changeLine) : [unchangedLine(report)];\n return [...changes, ...renderNotes(report)].join(\"\\n\");\n }\n if (report.mode === \"in-place\") {\n const wrote = report.changes.length === 0 ? \"Nothing to write\" : `Wrote ${plural(report.changes.length, \"file\")}`;\n return [wrote, ...renderNotes(report)].join(\"\\n\");\n }\n const each = report.shape === \"directory\" && report.format !== \"vale\" ? \", one file each\" : \"\";\n const written = report.terms - report.skipped.length - (report.otherLanguages?.terms.length ?? 0);\n const lines = [`Wrote ${plural(written, \"term\")} to ${report.target ?? \"\"}${each}`];\n if (report.format === \"vale\") lines.push(...valeLines(report));\n lines.push(...renderNotes(report));\n return lines.join(\"\\n\");\n}\n\n/** The notice `write -f vale` prints when no section of Vale's config uses the style, or there is no section. */\nexport function renderValeWiring(wiring: ValeWiring): string {\n return [\n wiring.addSection\n ? `notice: ${wiring.rootIni} has no section with BasedOnStyles. Add one that uses the Terms style:`\n : `notice: no section of ${wiring.rootIni} uses the Terms style. Add it to BasedOnStyles:`,\n ` [${wiring.section}]`,\n ` BasedOnStyles = ${wiring.styles.join(\", \")}`,\n ].join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// formats\n\nexport function renderFormatsPretty(rows: readonly FormatRow[]): string {\n const formatWidth = Math.max(0, ...rows.map((r) => r.format.length)) + 3;\n const labelWidth = Math.max(0, ...rows.map((r) => r.label.length)) + 3;\n return rows\n .map((r) =>\n `${r.format.padEnd(formatWidth)}${r.label.padEnd(labelWidth)}${r.read ? \"read \" : \" \"}${r.write ? \"write\" : \"\"}`.trimEnd(),\n )\n .join(\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AAC,SAAS,OAAO,SAAS,MAAM,CAAC,OAAO,OAAO,UAAU,EAAE,GAAG,IAAI,EAAE;AAClF,MAAI,OAAO,WAAW,OAAQ,OAAM,KAAK,GAAG,UAAU,MAAM,CAAC;AAC7D,QAAM,KAAK,GAAG,YAAY,MAAM,CAAC;AACjC,SAAO,MAAM,KAAK,IAAI;AACxB;AAGO,SAAS,iBAAiB,QAA4B;AAC3D,SAAO;AAAA,IACL,OAAO,aACH,WAAW,OAAO,OAAO,2EACzB,yBAAyB,OAAO,OAAO;AAAA,IAC3C,MAAM,OAAO,OAAO;AAAA,IACpB,qBAAqB,OAAO,OAAO,KAAK,IAAI,CAAC;AAAA,EAC/C,EAAE,KAAK,IAAI;AACb;AAKO,SAAS,oBAAoB,MAAoC;AACtE,QAAM,cAAc,KAAK,IAAI,GAAG,GAAG,KAAK,IAAI,CAAC,MAAM,EAAE,OAAO,MAAM,CAAC,IAAI;AACvE,QAAM,aAAa,KAAK,IAAI,GAAG,GAAG,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC,IAAI;AACrE,SAAO,KACJ;AAAA,IAAI,CAAC,MACJ,GAAG,EAAE,OAAO,OAAO,WAAW,CAAC,GAAG,EAAE,MAAM,OAAO,UAAU,CAAC,GAAG,EAAE,OAAO,WAAW,QAAQ,GAAG,EAAE,QAAQ,UAAU,EAAE,GAAG,QAAQ;AAAA,EACjI,EACC,KAAK,IAAI;AACd;","names":["lines","counts"]}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
STDIN_LABEL,
|
|
9
9
|
STDIN_TOKEN,
|
|
10
10
|
blockLines,
|
|
11
|
+
builtinGuide,
|
|
11
12
|
classifyRef,
|
|
12
13
|
colOf,
|
|
13
14
|
collectSchemaPins,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
schemaLoadOptions,
|
|
43
44
|
schemaTrustRoot,
|
|
44
45
|
writeFileAtomic
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-BIRGZEWO.js";
|
|
46
47
|
import {
|
|
47
48
|
STDIN_LINES_MARKER
|
|
48
49
|
} from "./chunk-YEUYKR62.js";
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
pageManifestPath,
|
|
68
69
|
parseCollections,
|
|
69
70
|
sameFile
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-B2242FYO.js";
|
|
71
72
|
import {
|
|
72
73
|
ToolError,
|
|
73
74
|
errorMessage
|
|
@@ -454,6 +455,10 @@ var VALUE_NAMING = /* @__PURE__ */ new Map([
|
|
|
454
455
|
["unevaluatedProperties", "must NOT have unevaluated properties"],
|
|
455
456
|
["propertyNames", "property name must be valid"]
|
|
456
457
|
]);
|
|
458
|
+
var CANDIDATE_NAMING = /* @__PURE__ */ new Map([
|
|
459
|
+
["enum", "must be one of the values the schema allows"],
|
|
460
|
+
["const", "must be the value the schema allows"]
|
|
461
|
+
]);
|
|
457
462
|
function at(pointer, pos, locate) {
|
|
458
463
|
const located = locate?.(pointer);
|
|
459
464
|
if (located) {
|
|
@@ -473,12 +478,12 @@ function settleFindings(errors, view, pos, locate) {
|
|
|
473
478
|
for (const e of errors) {
|
|
474
479
|
if (hidden.some((p) => isAtOrUnder(e.instancePath, p))) continue;
|
|
475
480
|
const inside = view.decrypted.find((p) => isAtOrUnder(e.instancePath, p));
|
|
476
|
-
const generic = VALUE_NAMING.get(e.keyword);
|
|
481
|
+
const generic = VALUE_NAMING.get(e.keyword) ?? (inside === void 0 ? void 0 : CANDIDATE_NAMING.get(e.keyword));
|
|
477
482
|
if (inside === void 0 || e.instancePath === inside && generic === void 0) {
|
|
478
483
|
out.push(e);
|
|
479
484
|
continue;
|
|
480
485
|
}
|
|
481
|
-
const { subject, file: _file, line: _line, col: _col, ...rest } = e;
|
|
486
|
+
const { subject, file: _file, line: _line, col: _col, guidance, ...rest } = e;
|
|
482
487
|
void _file;
|
|
483
488
|
void _line;
|
|
484
489
|
void _col;
|
|
@@ -487,7 +492,8 @@ function settleFindings(errors, view, pos, locate) {
|
|
|
487
492
|
instancePath: inside,
|
|
488
493
|
message: generic ?? e.message,
|
|
489
494
|
...generic === void 0 && subject !== void 0 ? { subject } : {},
|
|
490
|
-
...at(inside, pos, locate)
|
|
495
|
+
...at(inside, pos, locate),
|
|
496
|
+
...e.instancePath === inside && guidance != null ? { guidance } : {}
|
|
491
497
|
});
|
|
492
498
|
}
|
|
493
499
|
return out;
|
|
@@ -1480,10 +1486,10 @@ function termScheme(terms) {
|
|
|
1480
1486
|
return term === void 0 ? void 0 : fold(term.id);
|
|
1481
1487
|
};
|
|
1482
1488
|
const children = /* @__PURE__ */ new Map();
|
|
1483
|
-
const link = (parent,
|
|
1484
|
-
if (parent === void 0 ||
|
|
1489
|
+
const link = (parent, child2) => {
|
|
1490
|
+
if (parent === void 0 || child2 === void 0) return;
|
|
1485
1491
|
const set = children.get(parent) ?? /* @__PURE__ */ new Set();
|
|
1486
|
-
set.add(
|
|
1492
|
+
set.add(child2);
|
|
1487
1493
|
children.set(parent, set);
|
|
1488
1494
|
};
|
|
1489
1495
|
for (const term of terms) {
|
|
@@ -1530,6 +1536,80 @@ import * as Ajv2020Ns from "ajv/dist/2020.js";
|
|
|
1530
1536
|
import * as AjvDraft04Ns from "ajv-draft-04";
|
|
1531
1537
|
import * as addFormatsNs from "ajv-formats";
|
|
1532
1538
|
import { createRequire } from "node:module";
|
|
1539
|
+
|
|
1540
|
+
// src/meta/core/guidance.ts
|
|
1541
|
+
function isRecord2(value) {
|
|
1542
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1543
|
+
}
|
|
1544
|
+
function firstSentence(text) {
|
|
1545
|
+
const flat = text.trim().replace(/\s+/g, " ");
|
|
1546
|
+
return flat.split(/(?<=[.!?])\s+(?=[A-Z`"'([])/)[0] ?? flat;
|
|
1547
|
+
}
|
|
1548
|
+
function localRef(root, ref) {
|
|
1549
|
+
if (!ref.startsWith("#")) return void 0;
|
|
1550
|
+
const pointer = ref.slice(1);
|
|
1551
|
+
if (pointer === "") return root;
|
|
1552
|
+
if (!pointer.startsWith("/")) return void 0;
|
|
1553
|
+
let at2 = root;
|
|
1554
|
+
for (const raw of pointer.slice(1).split("/")) {
|
|
1555
|
+
const segment = raw.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1556
|
+
if (Array.isArray(at2)) at2 = at2[Number(segment)];
|
|
1557
|
+
else if (isRecord2(at2)) at2 = at2[segment];
|
|
1558
|
+
else return void 0;
|
|
1559
|
+
}
|
|
1560
|
+
return at2;
|
|
1561
|
+
}
|
|
1562
|
+
function expand(root, node, out = [], seen = /* @__PURE__ */ new Set()) {
|
|
1563
|
+
if (!isRecord2(node) || seen.has(node)) return out;
|
|
1564
|
+
seen.add(node);
|
|
1565
|
+
out.push(node);
|
|
1566
|
+
if (typeof node.$ref === "string") expand(root, localRef(root, node.$ref), out, seen);
|
|
1567
|
+
for (const key of ["allOf", "anyOf", "oneOf"]) {
|
|
1568
|
+
const branches = node[key];
|
|
1569
|
+
if (Array.isArray(branches)) for (const b of branches) expand(root, b, out, seen);
|
|
1570
|
+
}
|
|
1571
|
+
expand(root, node.then, out, seen);
|
|
1572
|
+
expand(root, node.else, out, seen);
|
|
1573
|
+
return out;
|
|
1574
|
+
}
|
|
1575
|
+
function child(root, nodes, segment, index) {
|
|
1576
|
+
const out = [];
|
|
1577
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1578
|
+
for (const n of nodes) {
|
|
1579
|
+
if (index) {
|
|
1580
|
+
const prefix = n.prefixItems;
|
|
1581
|
+
const items = Array.isArray(prefix) ? prefix[Number(segment)] ?? n.items : n.items;
|
|
1582
|
+
expand(root, Array.isArray(items) ? items[Number(segment)] : items, out, seen);
|
|
1583
|
+
} else if (isRecord2(n.properties)) {
|
|
1584
|
+
expand(root, n.properties[segment], out, seen);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
return out;
|
|
1588
|
+
}
|
|
1589
|
+
function guidanceFor(root, ref, e) {
|
|
1590
|
+
const guide = builtinGuide(ref);
|
|
1591
|
+
const segments2 = e.instancePath === "" ? [] : e.instancePath.slice(1).split("/").map((s) => s.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
1592
|
+
const missing = e.keyword === "required" ? e.params.missingProperty : void 0;
|
|
1593
|
+
if (typeof missing === "string") segments2.push(missing);
|
|
1594
|
+
let nodes = expand(root, root);
|
|
1595
|
+
const names = [];
|
|
1596
|
+
for (const segment of segments2) {
|
|
1597
|
+
const index = /^\d+$/.test(segment) && nodes.some((n) => n.items !== void 0 || n.prefixItems !== void 0);
|
|
1598
|
+
nodes = child(root, nodes, segment, index);
|
|
1599
|
+
if (nodes.length === 0) return { id: ref, rule: null, description: null, guide };
|
|
1600
|
+
if (!index) names.push(segment);
|
|
1601
|
+
}
|
|
1602
|
+
if (names.length === 0) return { id: ref, rule: null, description: null, guide };
|
|
1603
|
+
const described = nodes.find((n) => typeof n.description === "string")?.description;
|
|
1604
|
+
return {
|
|
1605
|
+
id: ref,
|
|
1606
|
+
rule: names.join("/"),
|
|
1607
|
+
description: typeof described === "string" ? firstSentence(described) : null,
|
|
1608
|
+
guide
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
// src/meta/core/validator.ts
|
|
1533
1613
|
var draft06MetaSchema = createRequire(import.meta.url)(
|
|
1534
1614
|
"ajv/dist/refs/json-schema-draft-06.json"
|
|
1535
1615
|
);
|
|
@@ -1654,12 +1734,12 @@ function marksSchemaExternal(schema) {
|
|
|
1654
1734
|
if (typeof own !== "object" || own === null) return false;
|
|
1655
1735
|
return own[LOCATION_KEYWORD] === "external";
|
|
1656
1736
|
}
|
|
1657
|
-
function
|
|
1737
|
+
function isRecord3(value) {
|
|
1658
1738
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1659
1739
|
}
|
|
1660
1740
|
function definiteMarkConflict(root, keyword, isMark) {
|
|
1661
1741
|
const marks = /* @__PURE__ */ new Map();
|
|
1662
|
-
const
|
|
1742
|
+
const localRef2 = (node, embedded) => {
|
|
1663
1743
|
const ref = node["$ref"];
|
|
1664
1744
|
if (embedded || typeof ref !== "string" || !ref.startsWith("#")) return void 0;
|
|
1665
1745
|
const pointer = ref.slice(1);
|
|
@@ -1674,7 +1754,7 @@ function definiteMarkConflict(root, keyword, isMark) {
|
|
|
1674
1754
|
return void 0;
|
|
1675
1755
|
}
|
|
1676
1756
|
if (Array.isArray(at2)) at2 = at2[Number(segment)];
|
|
1677
|
-
else if (
|
|
1757
|
+
else if (isRecord3(at2)) at2 = at2[segment];
|
|
1678
1758
|
else return void 0;
|
|
1679
1759
|
}
|
|
1680
1760
|
return at2;
|
|
@@ -1682,7 +1762,7 @@ function definiteMarkConflict(root, keyword, isMark) {
|
|
|
1682
1762
|
const isEmbedded = (node, embedded) => embedded || node !== root && typeof node["$id"] === "string";
|
|
1683
1763
|
const allOf = (node) => Array.isArray(node["allOf"]) ? node["allOf"] : [];
|
|
1684
1764
|
const property = (key, node, embedded, visited) => {
|
|
1685
|
-
if (!
|
|
1765
|
+
if (!isRecord3(node) || visited.has(node)) return;
|
|
1686
1766
|
visited.add(node);
|
|
1687
1767
|
const inner = isEmbedded(node, embedded);
|
|
1688
1768
|
const mark = node[keyword];
|
|
@@ -1692,18 +1772,18 @@ function definiteMarkConflict(root, keyword, isMark) {
|
|
|
1692
1772
|
else marks.set(key, /* @__PURE__ */ new Set([mark]));
|
|
1693
1773
|
}
|
|
1694
1774
|
for (const entry of allOf(node)) property(key, entry, inner, visited);
|
|
1695
|
-
property(key,
|
|
1775
|
+
property(key, localRef2(node, inner), inner, visited);
|
|
1696
1776
|
};
|
|
1697
1777
|
const object = (node, embedded, visited) => {
|
|
1698
|
-
if (!
|
|
1778
|
+
if (!isRecord3(node) || visited.has(node)) return;
|
|
1699
1779
|
visited.add(node);
|
|
1700
1780
|
const inner = isEmbedded(node, embedded);
|
|
1701
1781
|
const properties = node["properties"];
|
|
1702
|
-
if (
|
|
1782
|
+
if (isRecord3(properties)) {
|
|
1703
1783
|
for (const [key, sub] of Object.entries(properties)) property(key, sub, inner, /* @__PURE__ */ new Set());
|
|
1704
1784
|
}
|
|
1705
1785
|
for (const entry of allOf(node)) object(entry, inner, visited);
|
|
1706
|
-
object(
|
|
1786
|
+
object(localRef2(node, inner), inner, visited);
|
|
1707
1787
|
};
|
|
1708
1788
|
object(root, false, /* @__PURE__ */ new Set());
|
|
1709
1789
|
for (const [key, seen] of marks) if (seen.size > 1) return key;
|
|
@@ -2044,12 +2124,36 @@ var Validator = class {
|
|
|
2044
2124
|
const ok = fn(subject);
|
|
2045
2125
|
if (ok) continue;
|
|
2046
2126
|
for (const e of fn.errors ?? []) {
|
|
2047
|
-
|
|
2127
|
+
if (isWrapper(e)) continue;
|
|
2128
|
+
errors.push({
|
|
2129
|
+
...toFieldError(ref, e, lineFor, colFor, locate),
|
|
2130
|
+
guidance: guidanceFor(fn.schema, ref, e)
|
|
2131
|
+
});
|
|
2048
2132
|
}
|
|
2049
2133
|
}
|
|
2050
2134
|
return errors;
|
|
2051
2135
|
}
|
|
2052
2136
|
};
|
|
2137
|
+
function isWrapper(e) {
|
|
2138
|
+
if (e.keyword === "if" || e.keyword === "anyOf") return true;
|
|
2139
|
+
return e.keyword === "oneOf" && e.params.passingSchemas === null;
|
|
2140
|
+
}
|
|
2141
|
+
function messageFor(e, fallback) {
|
|
2142
|
+
if (e.keyword === "false schema") return "must not be present";
|
|
2143
|
+
switch (e.keyword) {
|
|
2144
|
+
case "enum":
|
|
2145
|
+
return `must be one of: ${e.params.allowedValues.map((v) => JSON.stringify(v)).join(", ")}`;
|
|
2146
|
+
case "const":
|
|
2147
|
+
return `must be ${JSON.stringify(e.params.allowedValue)}`;
|
|
2148
|
+
case "minLength":
|
|
2149
|
+
case "minItems":
|
|
2150
|
+
return e.params.limit === 1 ? "must not be empty" : fallback;
|
|
2151
|
+
case "type":
|
|
2152
|
+
return `must be ${[e.params.type].flat().join(" or ")}`;
|
|
2153
|
+
default:
|
|
2154
|
+
return fallback;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2053
2157
|
function subjectOf(e) {
|
|
2054
2158
|
switch (e.keyword) {
|
|
2055
2159
|
case "required":
|
|
@@ -2068,7 +2172,7 @@ function toFieldError(schema, e, lineFor, colFor, locate) {
|
|
|
2068
2172
|
const defined = e;
|
|
2069
2173
|
const instancePath = e.instancePath;
|
|
2070
2174
|
const subject = subjectOf(defined);
|
|
2071
|
-
let message = e.message ?? "is invalid";
|
|
2175
|
+
let message = messageFor(defined, e.message ?? "is invalid");
|
|
2072
2176
|
let wantsColumn = true;
|
|
2073
2177
|
if (defined.keyword === "required") {
|
|
2074
2178
|
message = `must have required property '${defined.params.missingProperty}'`;
|
|
@@ -2416,10 +2520,10 @@ function removeManifestKey(text, options) {
|
|
|
2416
2520
|
);
|
|
2417
2521
|
if (after.errors[0]) throw fail(`The result is not valid YAML: ${after.errors[0].message}`);
|
|
2418
2522
|
const was = doc.toJS({ maxAliasCount: 100 });
|
|
2419
|
-
const wasRoot =
|
|
2523
|
+
const wasRoot = isRecord4(was) ? was : {};
|
|
2420
2524
|
const wasEntry = wasRoot[spelled];
|
|
2421
2525
|
const rest = Object.fromEntries(
|
|
2422
|
-
Object.entries(
|
|
2526
|
+
Object.entries(isRecord4(wasEntry) ? wasEntry : {}).filter(([k]) => k !== key)
|
|
2423
2527
|
);
|
|
2424
2528
|
const kept = Object.entries(wasRoot).filter(([k]) => k !== spelled);
|
|
2425
2529
|
if (Object.keys(rest).length > 0) kept.push([spelled, rest]);
|
|
@@ -2485,7 +2589,7 @@ function renameManifestEntry(text, options) {
|
|
|
2485
2589
|
);
|
|
2486
2590
|
if (after.errors[0]) throw fail(`The result is not valid YAML: ${after.errors[0].message}`);
|
|
2487
2591
|
const was = doc.toJS({ maxAliasCount: 100 });
|
|
2488
|
-
const wasRoot =
|
|
2592
|
+
const wasRoot = isRecord4(was) ? was : {};
|
|
2489
2593
|
const expected = Object.fromEntries(
|
|
2490
2594
|
Object.entries(wasRoot).map(([k, v]) => [k === spelled ? to : k, v])
|
|
2491
2595
|
);
|
|
@@ -2535,14 +2639,14 @@ function readBack(before, out, spelled, key, value, fail) {
|
|
|
2535
2639
|
if (problem) throw fail(`The result is not valid YAML: ${problem.message}`);
|
|
2536
2640
|
const was = before.toJS({ maxAliasCount: 100 });
|
|
2537
2641
|
const now = after.toJS({ maxAliasCount: 100 });
|
|
2538
|
-
const wasRoot =
|
|
2642
|
+
const wasRoot = isRecord4(was) ? was : {};
|
|
2539
2643
|
const wasEntry = wasRoot[spelled];
|
|
2540
2644
|
const expected = {
|
|
2541
2645
|
...wasRoot,
|
|
2542
|
-
[spelled]: { ...
|
|
2646
|
+
[spelled]: { ...isRecord4(wasEntry) ? wasEntry : {}, [key]: value }
|
|
2543
2647
|
};
|
|
2544
|
-
const nowEntry =
|
|
2545
|
-
if (!
|
|
2648
|
+
const nowEntry = isRecord4(now) ? now[spelled] : void 0;
|
|
2649
|
+
if (!isRecord4(nowEntry) || !deepEqual(nowEntry[key], value)) {
|
|
2546
2650
|
throw fail(
|
|
2547
2651
|
"The value reads back differently. A Date, an undefined member, or another value YAML cannot hold does not survive the trip."
|
|
2548
2652
|
);
|
|
@@ -2558,7 +2662,7 @@ function readBack(before, out, spelled, key, value, fail) {
|
|
|
2558
2662
|
if (!r) throw fail("The written value could not be found again.");
|
|
2559
2663
|
return lc.linePos(r[0]).line;
|
|
2560
2664
|
}
|
|
2561
|
-
function
|
|
2665
|
+
function isRecord4(x) {
|
|
2562
2666
|
return typeof x === "object" && x !== null && !Array.isArray(x);
|
|
2563
2667
|
}
|
|
2564
2668
|
|
|
@@ -4526,6 +4630,7 @@ export {
|
|
|
4526
4630
|
TERM_FINDING_KEYWORD,
|
|
4527
4631
|
isTermMark,
|
|
4528
4632
|
termScheme,
|
|
4633
|
+
firstSentence,
|
|
4529
4634
|
compileWithFormats,
|
|
4530
4635
|
stringFormatNames,
|
|
4531
4636
|
validatesFormat,
|
|
@@ -4585,4 +4690,4 @@ export {
|
|
|
4585
4690
|
explicitFalse,
|
|
4586
4691
|
reportConfig
|
|
4587
4692
|
};
|
|
4588
|
-
//# sourceMappingURL=chunk-
|
|
4693
|
+
//# sourceMappingURL=chunk-36FJWJSK.js.map
|