@hawkeyexl/manni 4.26.2 → 4.27.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-4I5S6DXG.js → batch-TFGOULLM.js} +14 -14
- package/dist/build-TOTJTK5K.js +37 -0
- package/dist/{calibrate-U4TQAXXD.js → calibrate-7O4RKGZS.js} +15 -15
- package/dist/{capture-ODSHL2XI.js → capture-K6ZKOSIK.js} +14 -14
- package/dist/check-4LK34QVH.js +34 -0
- package/dist/check-6XN46NLH.js +31 -0
- package/dist/check-JBSRU724.js +58 -0
- package/dist/check-LZQ3PW6G.js +58 -0
- package/dist/{check-YFLWJUZC.js → check-WFJMMSD7.js} +15 -15
- package/dist/{chunk-KHBOMLPS.js → chunk-2E5OBVLC.js} +4 -4
- package/dist/{chunk-Z2JBWLRF.js → chunk-2LLCV66Q.js} +9 -9
- package/dist/{chunk-KLTGAGB6.js → chunk-43KMLS4Y.js} +3 -3
- package/dist/{chunk-BREAC43H.js → chunk-43VLZO4W.js} +2 -2
- package/dist/{chunk-UUGTQUKK.js → chunk-46EEHYA4.js} +64 -11
- package/dist/chunk-46EEHYA4.js.map +1 -0
- package/dist/{chunk-H4JXCWLM.js → chunk-4KK6TVFD.js} +7 -7
- package/dist/{chunk-MMVT3ZP3.js → chunk-4NCNVKZS.js} +5 -5
- package/dist/{chunk-UOZZTK7T.js → chunk-4QOXP5K4.js} +6 -6
- package/dist/{chunk-THFV3YVO.js → chunk-5QPLKYLM.js} +4 -4
- package/dist/{chunk-5KWMVAZZ.js → chunk-5XEZ7FQT.js} +2 -2
- package/dist/{chunk-SHYEKYV4.js → chunk-7BPOYION.js} +2 -2
- package/dist/{chunk-NTQ73IQL.js → chunk-7MKAJCU2.js} +2 -2
- package/dist/{chunk-NTQ73IQL.js.map → chunk-7MKAJCU2.js.map} +1 -1
- package/dist/{chunk-YG4GZXSA.js → chunk-A4DPDPKJ.js} +2 -2
- package/dist/{chunk-VNR7BQBZ.js → chunk-ACTUV3CQ.js} +52 -4
- package/dist/chunk-ACTUV3CQ.js.map +1 -0
- package/dist/{chunk-RZ65VMRW.js → chunk-AONT5QCO.js} +10 -10
- package/dist/{chunk-4DFLLMIM.js → chunk-AXMVISW7.js} +3 -3
- package/dist/{chunk-MC7U5IH4.js → chunk-BCRMMIY5.js} +1 -1
- package/dist/chunk-BCRMMIY5.js.map +1 -0
- package/dist/{chunk-ZR33AQFW.js → chunk-BMPQLKQS.js} +10 -8
- package/dist/chunk-BMPQLKQS.js.map +1 -0
- package/dist/{chunk-SJI7C7FY.js → chunk-BN3SQUXK.js} +14 -14
- package/dist/{chunk-3ZVRGBK6.js → chunk-BTFXOKCP.js} +2 -2
- package/dist/{chunk-JF4BC7ZD.js → chunk-CDX4QK6O.js} +29 -2
- package/dist/chunk-CDX4QK6O.js.map +1 -0
- package/dist/{chunk-JDQFU2U6.js → chunk-CJWFDJEX.js} +9 -9
- package/dist/{chunk-NZ7RO6ZD.js → chunk-D3FJVKE2.js} +3 -3
- package/dist/{chunk-K7UVWJJW.js → chunk-DRMCY64Q.js} +15 -7
- package/dist/chunk-DRMCY64Q.js.map +1 -0
- package/dist/{chunk-HAZQCHO5.js → chunk-DSTEX7SK.js} +3 -3
- package/dist/{chunk-HJHDYROD.js → chunk-DZC2OALR.js} +4 -4
- package/dist/{chunk-GCJPYCOV.js → chunk-FK2FAE3J.js} +4 -4
- package/dist/{chunk-GM5LWEDF.js → chunk-FRAEUYJE.js} +56 -27
- package/dist/chunk-FRAEUYJE.js.map +1 -0
- package/dist/{chunk-QNXNA2BR.js → chunk-H7SFSZ3I.js} +300 -58
- package/dist/chunk-H7SFSZ3I.js.map +1 -0
- package/dist/chunk-HMJZHUCJ.js +337 -0
- package/dist/chunk-HMJZHUCJ.js.map +1 -0
- package/dist/{chunk-GXC7SDLO.js → chunk-HQRXE6QY.js} +354 -51
- package/dist/chunk-HQRXE6QY.js.map +1 -0
- package/dist/{chunk-J7E4XAFG.js → chunk-IFAOEGSU.js} +32 -22
- package/dist/chunk-IFAOEGSU.js.map +1 -0
- package/dist/{chunk-B6YZINES.js → chunk-IQJ4WBJZ.js} +173 -83
- package/dist/chunk-IQJ4WBJZ.js.map +1 -0
- package/dist/{chunk-RVATMGUL.js → chunk-JWS4OKOZ.js} +4 -4
- package/dist/{chunk-4IM6A2WK.js → chunk-K5DKRGUV.js} +6 -6
- package/dist/{chunk-7ODOTGU4.js → chunk-LESYV3TT.js} +3 -3
- package/dist/{chunk-DGN4VVFG.js → chunk-LWWO4C6P.js} +3 -3
- package/dist/{chunk-BAJ23I2H.js → chunk-MABRQ46L.js} +14 -7
- package/dist/chunk-MABRQ46L.js.map +1 -0
- package/dist/{chunk-PWLUQLFH.js → chunk-MMS3I5ZH.js} +7 -7
- package/dist/{chunk-OKLRZM2N.js → chunk-NXJMRIKW.js} +5 -5
- package/dist/{chunk-P7MGBTY3.js → chunk-OBFIWPEB.js} +3 -3
- package/dist/{chunk-TI4DA6DF.js → chunk-OPF3NOKF.js} +1 -1
- package/dist/chunk-OPF3NOKF.js.map +1 -0
- package/dist/{chunk-LHFO4HF7.js → chunk-PBR4TVEL.js} +7 -7
- package/dist/{chunk-PEZP4ZFP.js → chunk-PHZ7VWSL.js} +31 -13
- package/dist/chunk-PHZ7VWSL.js.map +1 -0
- package/dist/{chunk-M6RB342K.js → chunk-Q34NWLGY.js} +2 -2
- package/dist/{chunk-PJ5YJS6L.js → chunk-QFVBBRHW.js} +2 -2
- package/dist/{chunk-QWGAM3T6.js → chunk-QLK6LXSS.js} +3 -3
- package/dist/{chunk-LSH6HPKB.js → chunk-QSABWNXP.js} +4 -4
- package/dist/{chunk-BPVO3OED.js → chunk-R3FCSRTX.js} +6 -6
- package/dist/{chunk-SIDHDT4X.js → chunk-RA3QM7X6.js} +8 -8
- package/dist/{chunk-EXCYL3S7.js → chunk-RCGR4NKY.js} +2 -2
- package/dist/{chunk-VDEE7AUI.js → chunk-S2ZOXAFY.js} +2 -2
- package/dist/{chunk-4X3EH5VC.js → chunk-SYZ75Q5F.js} +65 -47
- package/dist/chunk-SYZ75Q5F.js.map +1 -0
- package/dist/{chunk-KSDAAJJX.js → chunk-TF4VEEDJ.js} +2 -2
- package/dist/{chunk-PX4QZLA2.js → chunk-TNOML4XE.js} +3 -3
- package/dist/{chunk-UT3CPOGN.js → chunk-UVI6JXRM.js} +8 -8
- package/dist/{chunk-P6QJPKZ2.js → chunk-VHAQJ6KU.js} +31 -26
- package/dist/chunk-VHAQJ6KU.js.map +1 -0
- package/dist/{chunk-LURF4MTH.js → chunk-VLPUC4MH.js} +3 -3
- package/dist/{chunk-A6LHTTNO.js → chunk-WJ7IGOBI.js} +21 -12
- package/dist/chunk-WJ7IGOBI.js.map +1 -0
- package/dist/{chunk-QFEEUI2Z.js → chunk-WLN4A2OJ.js} +4 -4
- package/dist/{chunk-NXP3DG4L.js → chunk-WNL2T7LK.js} +4 -4
- package/dist/{chunk-K4X6GJKG.js → chunk-WOPKA4ZB.js} +3 -3
- package/dist/{chunk-KLRTOQN4.js → chunk-X3FSKK53.js} +13 -7
- package/dist/chunk-X3FSKK53.js.map +1 -0
- package/dist/{chunk-A43A335C.js → chunk-Y72JZVMX.js} +3 -3
- package/dist/{chunk-RV2BYDJK.js → chunk-YQ4XWJTB.js} +24 -14
- package/dist/chunk-YQ4XWJTB.js.map +1 -0
- package/dist/{chunk-XD4Z26HJ.js → chunk-YUTRYEDG.js} +3 -3
- package/dist/{chunk-DPQAF2VR.js → chunk-Z66LHZRV.js} +2 -2
- package/dist/{chunk-G5I2JTDK.js → chunk-ZWVYT2G6.js} +2 -2
- package/dist/{chunk-D4BGNAN5.js → chunk-ZZGHTXZ2.js} +159 -23
- package/dist/chunk-ZZGHTXZ2.js.map +1 -0
- package/dist/{cli-RO4TNFXJ.js → cli-4Q22IFXX.js} +16 -15
- package/dist/{cli-RO4TNFXJ.js.map → cli-4Q22IFXX.js.map} +1 -1
- package/dist/{cli-6DOYYCTT.js → cli-6Y2V6OI6.js} +29 -28
- package/dist/{cli-6DOYYCTT.js.map → cli-6Y2V6OI6.js.map} +1 -1
- package/dist/{cli-DKRISKSR.js → cli-A3E4KJ5U.js} +21 -21
- package/dist/{cli-7IPP6ZTQ.js → cli-H4SH5A6M.js} +37 -36
- package/dist/{cli-7IPP6ZTQ.js.map → cli-H4SH5A6M.js.map} +1 -1
- package/dist/{cli-SDW7JOTO.js → cli-ODMYZEFY.js} +56 -55
- package/dist/{cli-SDW7JOTO.js.map → cli-ODMYZEFY.js.map} +1 -1
- package/dist/{cli-C2OATF3N.js → cli-PKCV3N4H.js} +8 -8
- package/dist/{cli-AR6TOW7M.js → cli-QQIIFRKE.js} +20 -19
- package/dist/{cli-AR6TOW7M.js.map → cli-QQIIFRKE.js.map} +1 -1
- package/dist/{cli-XM4F6ZC7.js → cli-SN7N4WCV.js} +26 -25
- package/dist/{cli-XM4F6ZC7.js.map → cli-SN7N4WCV.js.map} +1 -1
- package/dist/{cli-WWNQFDMK.js → cli-WFC3CJOJ.js} +3 -3
- package/dist/{cli-CFDGH5HD.js → cli-YP5KKGZP.js} +30 -29
- package/dist/{cli-CFDGH5HD.js.map → cli-YP5KKGZP.js.map} +1 -1
- package/dist/{cli-3VAVQYQT.js → cli-Z6IVPISQ.js} +24 -42
- package/dist/cli-Z6IVPISQ.js.map +1 -0
- package/dist/cli.js +15 -15
- package/dist/{config-2YJPJ36T.js → config-Z3FYLJ6X.js} +3 -3
- package/dist/docmeta.js +7 -7
- package/dist/github-7MZOPO6F.js +49 -0
- package/dist/github-MERFCTC7.js +29 -0
- package/dist/{github-GU23WNCU.js → github-MQPACOAB.js} +15 -14
- package/dist/index.d.ts +165 -6
- package/dist/index.js +55 -54
- package/dist/index.js.map +1 -1
- package/dist/{json-P4EDSVIC.js → json-7RZPISH3.js} +13 -12
- package/dist/{json-YIZON5LE.js → json-GOM7GQ6C.js} +16 -15
- package/dist/{labels-6RROJOYQ.js → labels-3ZOCWOT6.js} +12 -11
- package/dist/{labels-6RROJOYQ.js.map → labels-3ZOCWOT6.js.map} +1 -1
- package/dist/lint-XQMOP6UX.js +33 -0
- package/dist/{list-UARFGS7C.js → list-5PR56LNP.js} +15 -14
- package/dist/list-AV4DCGP3.js +31 -0
- package/dist/list-PLVWVFAV.js +49 -0
- package/dist/{page-JADAILE3.js → page-7EML6WFG.js} +10 -10
- package/dist/{prepare-B24HTUCX.js → prepare-A7NZ5BPZ.js} +13 -13
- package/dist/{pretty-XAMSAKAR.js → pretty-5QHFDOSO.js} +15 -14
- package/dist/{pretty-NHNYY7CP.js → pretty-E4FJRLZZ.js} +25 -24
- package/dist/{pretty-5V3PWJ6L.js → pretty-Y4UZL35B.js} +13 -12
- package/dist/{reporters-ULSSBAAG.js → reporters-A63SJIY7.js} +12 -12
- package/dist/{reporters-HTJKW7NG.js → reporters-BFST46C2.js} +5 -5
- package/dist/run-2MWSIAGL.js +52 -0
- package/dist/{sarif-LBODGUNE.js → sarif-BBNFOFUZ.js} +9 -9
- package/dist/sarif-MDBTPWQN.js +50 -0
- package/dist/{sarif-SOA76ESJ.js → sarif-MTFYXIRJ.js} +11 -11
- package/dist/{strategy-XI7QTY7T.js → strategy-3EJODC6O.js} +22 -21
- package/dist/{term-UIBQBGMR.js → term-UYCZLVVA.js} +19 -18
- package/dist/{term-UIBQBGMR.js.map → term-UYCZLVVA.js.map} +1 -1
- package/dist/{validate-X257AMWS.js → validate-3C3RWYMR.js} +5 -5
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/hooks/page-metadata.mjs +1 -1
- package/dist/build-OPWHXPXE.js +0 -36
- package/dist/check-4VOOUC5E.js +0 -33
- package/dist/check-M3ORYGTW.js +0 -57
- package/dist/check-QJ35SM3K.js +0 -57
- package/dist/check-UXS5LVFJ.js +0 -30
- package/dist/chunk-4X3EH5VC.js.map +0 -1
- package/dist/chunk-A6LHTTNO.js.map +0 -1
- package/dist/chunk-B6YZINES.js.map +0 -1
- package/dist/chunk-BAJ23I2H.js.map +0 -1
- package/dist/chunk-D4BGNAN5.js.map +0 -1
- package/dist/chunk-GM5LWEDF.js.map +0 -1
- package/dist/chunk-GXC7SDLO.js.map +0 -1
- package/dist/chunk-J7E4XAFG.js.map +0 -1
- package/dist/chunk-JF4BC7ZD.js.map +0 -1
- package/dist/chunk-K7UVWJJW.js.map +0 -1
- package/dist/chunk-KLRTOQN4.js.map +0 -1
- package/dist/chunk-MC7U5IH4.js.map +0 -1
- package/dist/chunk-P6QJPKZ2.js.map +0 -1
- package/dist/chunk-PEZP4ZFP.js.map +0 -1
- package/dist/chunk-QNXNA2BR.js.map +0 -1
- package/dist/chunk-RV2BYDJK.js.map +0 -1
- package/dist/chunk-TI4DA6DF.js.map +0 -1
- package/dist/chunk-UUGTQUKK.js.map +0 -1
- package/dist/chunk-VNR7BQBZ.js.map +0 -1
- package/dist/chunk-ZR33AQFW.js.map +0 -1
- package/dist/cli-3VAVQYQT.js.map +0 -1
- package/dist/github-RPHQGICU.js +0 -48
- package/dist/github-VKUOQE77.js +0 -28
- package/dist/lint-VXM7UKPY.js +0 -32
- package/dist/list-2Y7AM5BW.js +0 -30
- package/dist/list-ILJJM7EL.js +0 -48
- package/dist/run-EVPJ7SDL.js +0 -51
- package/dist/sarif-3PHFVX7D.js +0 -49
- /package/dist/{batch-4I5S6DXG.js.map → batch-TFGOULLM.js.map} +0 -0
- /package/dist/{build-OPWHXPXE.js.map → build-TOTJTK5K.js.map} +0 -0
- /package/dist/{calibrate-U4TQAXXD.js.map → calibrate-7O4RKGZS.js.map} +0 -0
- /package/dist/{capture-ODSHL2XI.js.map → capture-K6ZKOSIK.js.map} +0 -0
- /package/dist/{check-4VOOUC5E.js.map → check-4LK34QVH.js.map} +0 -0
- /package/dist/{check-M3ORYGTW.js.map → check-6XN46NLH.js.map} +0 -0
- /package/dist/{check-QJ35SM3K.js.map → check-JBSRU724.js.map} +0 -0
- /package/dist/{check-UXS5LVFJ.js.map → check-LZQ3PW6G.js.map} +0 -0
- /package/dist/{check-YFLWJUZC.js.map → check-WFJMMSD7.js.map} +0 -0
- /package/dist/{chunk-KHBOMLPS.js.map → chunk-2E5OBVLC.js.map} +0 -0
- /package/dist/{chunk-Z2JBWLRF.js.map → chunk-2LLCV66Q.js.map} +0 -0
- /package/dist/{chunk-KLTGAGB6.js.map → chunk-43KMLS4Y.js.map} +0 -0
- /package/dist/{chunk-BREAC43H.js.map → chunk-43VLZO4W.js.map} +0 -0
- /package/dist/{chunk-H4JXCWLM.js.map → chunk-4KK6TVFD.js.map} +0 -0
- /package/dist/{chunk-MMVT3ZP3.js.map → chunk-4NCNVKZS.js.map} +0 -0
- /package/dist/{chunk-UOZZTK7T.js.map → chunk-4QOXP5K4.js.map} +0 -0
- /package/dist/{chunk-THFV3YVO.js.map → chunk-5QPLKYLM.js.map} +0 -0
- /package/dist/{chunk-5KWMVAZZ.js.map → chunk-5XEZ7FQT.js.map} +0 -0
- /package/dist/{chunk-SHYEKYV4.js.map → chunk-7BPOYION.js.map} +0 -0
- /package/dist/{chunk-YG4GZXSA.js.map → chunk-A4DPDPKJ.js.map} +0 -0
- /package/dist/{chunk-RZ65VMRW.js.map → chunk-AONT5QCO.js.map} +0 -0
- /package/dist/{chunk-4DFLLMIM.js.map → chunk-AXMVISW7.js.map} +0 -0
- /package/dist/{chunk-SJI7C7FY.js.map → chunk-BN3SQUXK.js.map} +0 -0
- /package/dist/{chunk-3ZVRGBK6.js.map → chunk-BTFXOKCP.js.map} +0 -0
- /package/dist/{chunk-JDQFU2U6.js.map → chunk-CJWFDJEX.js.map} +0 -0
- /package/dist/{chunk-NZ7RO6ZD.js.map → chunk-D3FJVKE2.js.map} +0 -0
- /package/dist/{chunk-HAZQCHO5.js.map → chunk-DSTEX7SK.js.map} +0 -0
- /package/dist/{chunk-HJHDYROD.js.map → chunk-DZC2OALR.js.map} +0 -0
- /package/dist/{chunk-GCJPYCOV.js.map → chunk-FK2FAE3J.js.map} +0 -0
- /package/dist/{chunk-RVATMGUL.js.map → chunk-JWS4OKOZ.js.map} +0 -0
- /package/dist/{chunk-4IM6A2WK.js.map → chunk-K5DKRGUV.js.map} +0 -0
- /package/dist/{chunk-7ODOTGU4.js.map → chunk-LESYV3TT.js.map} +0 -0
- /package/dist/{chunk-DGN4VVFG.js.map → chunk-LWWO4C6P.js.map} +0 -0
- /package/dist/{chunk-PWLUQLFH.js.map → chunk-MMS3I5ZH.js.map} +0 -0
- /package/dist/{chunk-OKLRZM2N.js.map → chunk-NXJMRIKW.js.map} +0 -0
- /package/dist/{chunk-P7MGBTY3.js.map → chunk-OBFIWPEB.js.map} +0 -0
- /package/dist/{chunk-LHFO4HF7.js.map → chunk-PBR4TVEL.js.map} +0 -0
- /package/dist/{chunk-M6RB342K.js.map → chunk-Q34NWLGY.js.map} +0 -0
- /package/dist/{chunk-PJ5YJS6L.js.map → chunk-QFVBBRHW.js.map} +0 -0
- /package/dist/{chunk-QWGAM3T6.js.map → chunk-QLK6LXSS.js.map} +0 -0
- /package/dist/{chunk-LSH6HPKB.js.map → chunk-QSABWNXP.js.map} +0 -0
- /package/dist/{chunk-BPVO3OED.js.map → chunk-R3FCSRTX.js.map} +0 -0
- /package/dist/{chunk-SIDHDT4X.js.map → chunk-RA3QM7X6.js.map} +0 -0
- /package/dist/{chunk-EXCYL3S7.js.map → chunk-RCGR4NKY.js.map} +0 -0
- /package/dist/{chunk-VDEE7AUI.js.map → chunk-S2ZOXAFY.js.map} +0 -0
- /package/dist/{chunk-KSDAAJJX.js.map → chunk-TF4VEEDJ.js.map} +0 -0
- /package/dist/{chunk-PX4QZLA2.js.map → chunk-TNOML4XE.js.map} +0 -0
- /package/dist/{chunk-UT3CPOGN.js.map → chunk-UVI6JXRM.js.map} +0 -0
- /package/dist/{chunk-LURF4MTH.js.map → chunk-VLPUC4MH.js.map} +0 -0
- /package/dist/{chunk-QFEEUI2Z.js.map → chunk-WLN4A2OJ.js.map} +0 -0
- /package/dist/{chunk-NXP3DG4L.js.map → chunk-WNL2T7LK.js.map} +0 -0
- /package/dist/{chunk-K4X6GJKG.js.map → chunk-WOPKA4ZB.js.map} +0 -0
- /package/dist/{chunk-A43A335C.js.map → chunk-Y72JZVMX.js.map} +0 -0
- /package/dist/{chunk-XD4Z26HJ.js.map → chunk-YUTRYEDG.js.map} +0 -0
- /package/dist/{chunk-DPQAF2VR.js.map → chunk-Z66LHZRV.js.map} +0 -0
- /package/dist/{chunk-G5I2JTDK.js.map → chunk-ZWVYT2G6.js.map} +0 -0
- /package/dist/{cli-DKRISKSR.js.map → cli-A3E4KJ5U.js.map} +0 -0
- /package/dist/{cli-C2OATF3N.js.map → cli-PKCV3N4H.js.map} +0 -0
- /package/dist/{cli-WWNQFDMK.js.map → cli-WFC3CJOJ.js.map} +0 -0
- /package/dist/{config-2YJPJ36T.js.map → config-Z3FYLJ6X.js.map} +0 -0
- /package/dist/{github-GU23WNCU.js.map → github-7MZOPO6F.js.map} +0 -0
- /package/dist/{github-RPHQGICU.js.map → github-MERFCTC7.js.map} +0 -0
- /package/dist/{github-VKUOQE77.js.map → github-MQPACOAB.js.map} +0 -0
- /package/dist/{json-P4EDSVIC.js.map → json-7RZPISH3.js.map} +0 -0
- /package/dist/{json-YIZON5LE.js.map → json-GOM7GQ6C.js.map} +0 -0
- /package/dist/{lint-VXM7UKPY.js.map → lint-XQMOP6UX.js.map} +0 -0
- /package/dist/{list-2Y7AM5BW.js.map → list-5PR56LNP.js.map} +0 -0
- /package/dist/{list-ILJJM7EL.js.map → list-AV4DCGP3.js.map} +0 -0
- /package/dist/{list-UARFGS7C.js.map → list-PLVWVFAV.js.map} +0 -0
- /package/dist/{page-JADAILE3.js.map → page-7EML6WFG.js.map} +0 -0
- /package/dist/{prepare-B24HTUCX.js.map → prepare-A7NZ5BPZ.js.map} +0 -0
- /package/dist/{pretty-5V3PWJ6L.js.map → pretty-5QHFDOSO.js.map} +0 -0
- /package/dist/{pretty-NHNYY7CP.js.map → pretty-E4FJRLZZ.js.map} +0 -0
- /package/dist/{pretty-XAMSAKAR.js.map → pretty-Y4UZL35B.js.map} +0 -0
- /package/dist/{reporters-HTJKW7NG.js.map → reporters-A63SJIY7.js.map} +0 -0
- /package/dist/{reporters-ULSSBAAG.js.map → reporters-BFST46C2.js.map} +0 -0
- /package/dist/{run-EVPJ7SDL.js.map → run-2MWSIAGL.js.map} +0 -0
- /package/dist/{sarif-3PHFVX7D.js.map → sarif-BBNFOFUZ.js.map} +0 -0
- /package/dist/{sarif-LBODGUNE.js.map → sarif-MDBTPWQN.js.map} +0 -0
- /package/dist/{sarif-SOA76ESJ.js.map → sarif-MTFYXIRJ.js.map} +0 -0
- /package/dist/{strategy-XI7QTY7T.js.map → strategy-3EJODC6O.js.map} +0 -0
- /package/dist/{validate-X257AMWS.js.map → validate-3C3RWYMR.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/key/cli.ts","../src/key/reporters/json.ts","../src/key/reporters/pretty.ts"],"sourcesContent":["/**\n * The `key` domain's commander program. Mounted by `src/cli.ts` under\n * `manni key`; no entry point of its own. Proposal 0045 extends 0034's\n * grammar: a domain is a tool, or a family resource with verbs. `key` is the\n * second kind, with two verbs, `set` and `rotate`, and no default subcommand.\n *\n * clig.dev as every tool has it: the report to stdout, diagnostics to stderr,\n * colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit `0` done,\n * `1` a value that could not be re-encrypted, `2` operational/usage. Nothing\n * this program prints is ever a key.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { collect, explicitFalse, splitList } from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { COMMON_FORMAT_LIST } from \"../meta/internal.js\";\nimport { parseRepoFlags } from \"../cite/index.js\";\nimport { runKeyRotate } from \"./commands/rotate.js\";\nimport { runKeySet } from \"./commands/set.js\";\nimport { KeyError } from \"./errors.js\";\nimport { renderRotateJson } from \"./reporters/json.js\";\nimport { BASELINE_NOTICE, renderRotatePretty, setMessage } from \"./reporters/pretty.js\";\n\nconst ROTATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype RotateFormat = (typeof ROTATE_FORMATS)[number];\n\nfunction isRotateFormat(value: string): value is RotateFormat {\n return (ROTATE_FORMATS as readonly string[]).includes(value);\n}\n\n/** What commander hands `set`'s action. */\ninterface SetCliOptions {\n /** `-c, --config <path>`. */\n config?: string;\n dryRun?: boolean;\n}\n\n/**\n * What commander hands `rotate`'s action. The `--no-<thing>` flags are\n * `boolean` and never `undefined`: commander supplies `true` when the flag is\n * absent, so only the explicit `false` travels to the core (`explicitFalse`).\n */\ninterface RotateCliOptions {\n to?: string;\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n as?: string;\n config?: string;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n root?: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n dryRun?: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"key\")\n .description(\"Set and rotate the family key that encrypted values are encrypted with.\")\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand still\n // calling `process.exit(1)`.\n .exitOverride();\n\n /** This domain's `--no-color`, wherever the domain is mounted. */\n const color = (): boolean =>\n shouldColor({ noColor: program.opts().color === false, isTTY: process.stdout.isTTY });\n\n program\n .command(\"set\")\n .description(\"Write the family encryption key to manni.config.yaml; generate one when no value is given\")\n .argument(\"[value]\", \"the key, at least 32 hex or base64url characters (default: 64 random hex)\")\n .option(\n \"-c, --config <path>\",\n \"the config file to write (default: the nearest manni.config.yaml, else a new one at the git root)\",\n )\n .option(\"--dry-run\", \"say what would be written; write nothing\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni key set # generate 256 bits into manni.config.yaml\",\n \" manni key set --dry-run # name the file, write nothing\",\n \" manni key set -c ops/manni.config.yaml 0123456789abcdef0123456789abcdef\",\n ].join(\"\\n\"),\n )\n .action(async (value: string | undefined, options: SetCliOptions) => {\n try {\n const result = await runKeySet({\n value,\n configPath: options.config,\n dryRun: Boolean(options.dryRun),\n onNotice: notice,\n });\n process.stdout.write(`${setMessage(result)}\\n`);\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"rotate\")\n .description(\"Re-encrypt every encrypted value under a new key, then write the key\")\n .argument(\"[paths...]\", \"files, directories, or globs (default: every collection)\")\n .option(\n \"--to <value>\",\n \"the new key (default: 64 random hex); required for a narrowed run and a key from MANNI_ENCRYPTION_KEY\",\n )\n .option(\"--collection <name>\", \"configured collection to run over; repeatable\", collect, [])\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"include files .gitignore covers\")\n .option(\n \"--root <dir>\",\n \"directory cited sources resolve from (default: cite.root from config, else the git root)\",\n )\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print what would change; write nothing\")\n .option(\"-f, --format <format>\", `output: ${ROTATE_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni key rotate # every collection, then the key\",\n \" manni key rotate --dry-run # see every change first\",\n ' manni key rotate --collection site --to \"$NEW_KEY\" # part of the family',\n ' MANNI_ENCRYPTION_KEY=… manni key rotate --to \"$NEW_KEY\"',\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RotateCliOptions) => {\n try {\n const format = options.format;\n if (!isRotateFormat(format)) {\n throw new KeyError(`Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`);\n }\n const result = await runKeyRotate({\n inputs: paths,\n collection: options.collection,\n to: options.to,\n exts: options.ext ? splitList(options.ext) : undefined,\n exclude: options.exclude,\n as: options.as,\n configPath: options.config,\n // `undefined` rather than `false` when absent.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n root: options.root,\n repos: parseRepoFlags(options.repo, (m) => new KeyError(m)),\n dryRun: Boolean(options.dryRun),\n onNotice: notice,\n });\n if (format === \"json\") {\n process.stdout.write(`${renderRotateJson(result)}\\n`);\n // stdout is the JSON's; the notice is a diagnostic.\n if (result.baselineStale) notice(BASELINE_NOTICE);\n } else {\n process.stdout.write(`${renderRotatePretty(result, { color: color() })}\\n`);\n }\n process.exitCode = result.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * JSON output for `key rotate`: every page and every local external-metadata\n * manifest with something encrypted in it, each value's full ciphertext\n * before and after, and the counts. The key is never in it.\n */\nimport type { KeyRotateResult } from \"../types.js\";\n\nexport function renderRotateJson(result: KeyRotateResult): string {\n return JSON.stringify(\n {\n pages: result.pages,\n manifests: result.manifests,\n reencrypted: result.reencrypted,\n skipped: result.skipped,\n keyWritten: result.keyWritten,\n },\n null,\n 2,\n );\n}\n","/**\n * Pretty output for `key set` and `key rotate`. A ciphertext is shown as `~`\n * and its first four characters, then `…`, with a citation's line suffix\n * after it: `~AQx7…`, `~AQm4…:2`. The full values are in `-f json`; the key\n * is in neither. Colour via `shouldColor`; never under `--no-color`/`NO_COLOR`.\n */\nimport { palette } from \"../../shared/color.js\";\nimport type { KeyRotateResult, KeySetResult, RotatedValue, SkippedValue } from \"../types.js\";\n\nexport interface PrettyOptions {\n color: boolean;\n}\n\n/** Said at the end of a writing rotation when a citation baseline exists. */\nexport const BASELINE_NOTICE =\n \"The citation baseline fingerprints id-less encrypted citations by their pin; re-record it with `manni cite check --write-baseline`.\";\n\nconst NARROWED =\n \"Key not written: this run covered part of the family. Finish with a whole run under the same key: `manni key rotate --to <the same value>`.\";\nconst FROM_ENV =\n \"Key not written: it comes from MANNI_ENCRYPTION_KEY. Update the secret to the value you passed.\";\n\nconst plural = (n: number, one: string, many = `${one}s`): string =>\n `${String(n)} ${n === 1 ? one : many}`;\n\n/** What `set` says: the file, never the key. */\nexport function setMessage(result: KeySetResult): string {\n return result.dryRun\n ? `Would write encryptionKey to ${result.source}.`\n : `Encryption key written to ${result.source}.`;\n}\n\n/** `~AQx7…`, and a citation's line suffix after it: `~AQm4…:2`. */\nexport function shortCiphertext(value: string): string {\n // base64url has no `:`, so the first one starts the line suffix.\n const colon = value.indexOf(\":\");\n const token = colon === -1 ? value : value.slice(0, colon);\n const suffix = colon === -1 ? \"\" : value.slice(colon);\n return `${token.slice(0, 5)}…${suffix}`;\n}\n\n/** A metadata value by its pointer; a citation by its id, else where it sits. */\nfunction nameOf(row: RotatedValue | SkippedValue): string {\n if (row.kind === \"metadata\") return row.pointer;\n if (row.id !== undefined) return row.id;\n if (row.index !== undefined) return `/citations/${String(row.index)}`;\n return `line ${String(row.line ?? 0)}`;\n}\n\nfunction closing(result: KeyRotateResult): string | undefined {\n switch (result.outcome) {\n case \"written\":\n return result.configSource === undefined\n ? undefined\n : `Encryption key written to ${result.configSource}.`;\n case \"finished\":\n // Said before the counts: the key was written by the run that stopped.\n return undefined;\n case \"narrowed\":\n return NARROWED;\n case \"env\":\n return FROM_ENV;\n case \"skipped\":\n return result.skipped === 1\n ? \"Key not written: 1 value could not be re-encrypted. Fix it and rotate again.\"\n : `Key not written: ${String(result.skipped)} values could not be re-encrypted. Fix them and rotate again.`;\n case \"dry-run\":\n return \"Dry run: nothing written.\";\n }\n}\n\nexport function renderRotatePretty(result: KeyRotateResult, opts: PrettyOptions): string {\n const c = palette(opts.color);\n const lines: string[] = [];\n for (const page of result.pages) {\n for (const row of page.rewritten) {\n // A metadata value has no line suffix; two spaces keep its arrow in the\n // column a `:L` suffix would take.\n const gap = row.kind === \"metadata\" ? \" \" : \" \";\n lines.push(\n `${page.file}: ${nameOf(row)} ${c.dim(shortCiphertext(row.from))}${gap}-> ${shortCiphertext(row.to)}`,\n );\n }\n for (const row of page.skipped) {\n lines.push(`${page.file}: ${nameOf(row)} ${c.red(\"skipped:\")} ${row.message}`);\n }\n }\n // A manifest value is named by the entry it belongs to and the pointer\n // inside it, so one line says which document's private half moved.\n for (const manifest of result.manifests) {\n for (const row of manifest.rewritten) {\n lines.push(\n `${manifest.file}: ${row.entry}${row.pointer} ${c.dim(shortCiphertext(row.from))} -> ${shortCiphertext(row.to)}`,\n );\n }\n for (const row of manifest.skipped) {\n lines.push(\n `${manifest.file}: ${row.entry}${row.pointer} ${c.red(\"skipped:\")} ${row.message}`,\n );\n }\n }\n if (result.outcome === \"finished\" && result.configSource !== undefined) {\n lines.push(`Finished the interrupted rotation in ${result.configSource}.`);\n }\n const files =\n result.pages.filter((page) => page.rewritten.length > 0).length +\n result.manifests.filter((manifest) => manifest.rewritten.length > 0).length;\n lines.push(\n `${plural(result.reencrypted, \"value\")} re-encrypted in ${plural(files, \"file\")}, ${String(result.skipped)} skipped`,\n );\n const last = closing(result);\n if (last !== undefined) lines.push(result.outcome === \"skipped\" ? c.red(last) : last);\n if (result.baselineStale) lines.push(BASELINE_NOTICE);\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,eAA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SAAS,QAAQ;AAAA,QACjB,IAAI,QAAQ;AAAA,QACZ,YAAY,QAAQ;AAAA;AAAA,QAEpB,YAAY,QAAQ,aAAa,OAAO;AAAA,QACxC,kBAAkB,cAAc,QAAQ,SAAS;AAAA,QACjD,MAAM,QAAQ;AAAA,QACd,OAAO,eAAe,QAAQ,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;AAAA,QAC1D,QAAQ,QAAQ,QAAQ,MAAM;AAAA,QAC9B,UAAU;AAAA,MACZ,CAAC;AACD,UAAI,WAAW,QAAQ;AACrB,gBAAQ,OAAO,MAAM,GAAG,iBAAiB,MAAM,CAAC;AAAA,CAAI;AAEpD,YAAI,OAAO,cAAe,QAAO,eAAe;AAAA,MAClD,OAAO;AACL,gBAAQ,OAAO,MAAM,GAAG,mBAAmB,QAAQ,EAAE,OAAO,MAAM,EAAE,CAAC,CAAC;AAAA,CAAI;AAAA,MAC5E;AACA,cAAQ,WAAW,OAAO;AAAA,IAC5B,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/key/cli.ts","../src/key/reporters/json.ts","../src/key/reporters/pretty.ts"],"sourcesContent":["/**\n * The `key` domain's commander program. Mounted by `src/cli.ts` under\n * `manni key`; no entry point of its own. Proposal 0045 extends 0034's\n * grammar: a domain is a tool, or a family resource with verbs. `key` is the\n * second kind, with two verbs, `set` and `rotate`, and no default subcommand.\n *\n * clig.dev as every tool has it: the report to stdout, diagnostics to stderr,\n * colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit `0` done,\n * `1` a value that could not be re-encrypted, `2` operational/usage. Nothing\n * this program prints is ever a key.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { collect, explicitFalse, splitList } from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { COMMON_FORMAT_LIST } from \"../meta/internal.js\";\nimport { parseRepoFlags } from \"../cite/index.js\";\nimport { runKeyRotate } from \"./commands/rotate.js\";\nimport { runKeySet } from \"./commands/set.js\";\nimport { KeyError } from \"./errors.js\";\nimport { renderRotateJson } from \"./reporters/json.js\";\nimport { BASELINE_NOTICE, renderRotatePretty, setMessage } from \"./reporters/pretty.js\";\n\nconst ROTATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype RotateFormat = (typeof ROTATE_FORMATS)[number];\n\nfunction isRotateFormat(value: string): value is RotateFormat {\n return (ROTATE_FORMATS as readonly string[]).includes(value);\n}\n\n/** What commander hands `set`'s action. */\ninterface SetCliOptions {\n /** `-c, --config <path>`. */\n config?: string;\n dryRun?: boolean;\n}\n\n/**\n * What commander hands `rotate`'s action. The `--no-<thing>` flags are\n * `boolean` and never `undefined`: commander supplies `true` when the flag is\n * absent, so only the explicit `false` travels to the core (`explicitFalse`).\n */\ninterface RotateCliOptions {\n to?: string;\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n as?: string;\n config?: string;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n root?: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n dryRun?: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"key\")\n .description(\"Set and rotate the family key that encrypted values are encrypted with.\")\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand still\n // calling `process.exit(1)`.\n .exitOverride();\n\n /** This domain's `--no-color`, wherever the domain is mounted. */\n const color = (): boolean =>\n shouldColor({ noColor: program.opts().color === false, isTTY: process.stdout.isTTY });\n\n program\n .command(\"set\")\n .description(\"Write the family encryption key to manni.config.yaml; generate one when no value is given\")\n .argument(\"[value]\", \"the key, at least 32 hex or base64url characters (default: 64 random hex)\")\n .option(\n \"-c, --config <path>\",\n \"the config file to write (default: the nearest manni.config.yaml, else a new one at the git root)\",\n )\n .option(\"--dry-run\", \"say what would be written; write nothing\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni key set # generate 256 bits into manni.config.yaml\",\n \" manni key set --dry-run # name the file, write nothing\",\n \" manni key set -c ops/manni.config.yaml 0123456789abcdef0123456789abcdef\",\n ].join(\"\\n\"),\n )\n .action(async (value: string | undefined, options: SetCliOptions) => {\n try {\n const result = await runKeySet({\n value,\n configPath: options.config,\n dryRun: Boolean(options.dryRun),\n onNotice: notice,\n });\n process.stdout.write(`${setMessage(result)}\\n`);\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"rotate\")\n .description(\"Re-encrypt every encrypted value under a new key, then write the key\")\n .argument(\"[paths...]\", \"files, directories, or globs (default: every collection)\")\n .option(\n \"--to <value>\",\n \"the new key (default: 64 random hex); required for a narrowed run and a key from MANNI_ENCRYPTION_KEY\",\n )\n .option(\"--collection <name>\", \"configured collection to run over; repeatable\", collect, [])\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"include files .gitignore covers\")\n .option(\n \"--root <dir>\",\n \"directory cited sources resolve from (default: cite.root from config, else the git root)\",\n )\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print what would change; write nothing\")\n .option(\"-f, --format <format>\", `output: ${ROTATE_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni key rotate # every collection, then the key\",\n \" manni key rotate --dry-run # see every change first\",\n ' manni key rotate --collection site --to \"$NEW_KEY\" # part of the family',\n ' MANNI_ENCRYPTION_KEY=… manni key rotate --to \"$NEW_KEY\"',\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RotateCliOptions) => {\n try {\n const format = options.format;\n if (!isRotateFormat(format)) {\n throw new KeyError(`Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`);\n }\n const result = await runKeyRotate({\n inputs: paths,\n collection: options.collection,\n to: options.to,\n exts: options.ext ? splitList(options.ext) : undefined,\n exclude: options.exclude,\n as: options.as,\n configPath: options.config,\n // `undefined` rather than `false` when absent.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n root: options.root,\n repos: parseRepoFlags(options.repo, (m) => new KeyError(m)),\n dryRun: Boolean(options.dryRun),\n onNotice: notice,\n });\n if (format === \"json\") {\n process.stdout.write(`${renderRotateJson(result)}\\n`);\n // stdout is the JSON's; the notice is a diagnostic.\n if (result.baselineStale) notice(BASELINE_NOTICE);\n } else {\n process.stdout.write(`${renderRotatePretty(result, { color: color() })}\\n`);\n }\n process.exitCode = result.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * JSON output for `key rotate`: every page and every local external-metadata\n * manifest with something encrypted in it, each value's full ciphertext\n * before and after, and the counts. The key is never in it.\n */\nimport type { KeyRotateResult } from \"../types.js\";\n\nexport function renderRotateJson(result: KeyRotateResult): string {\n return JSON.stringify(\n {\n pages: result.pages,\n manifests: result.manifests,\n reencrypted: result.reencrypted,\n skipped: result.skipped,\n keyWritten: result.keyWritten,\n },\n null,\n 2,\n );\n}\n","/**\n * Pretty output for `key set` and `key rotate`. A ciphertext is shown as `~`\n * and its first four characters, then `…`, with a citation's line suffix\n * after it: `~AQx7…`, `~AQm4…:2`. The full values are in `-f json`; the key\n * is in neither. Colour via `shouldColor`; never under `--no-color`/`NO_COLOR`.\n */\nimport { palette } from \"../../shared/color.js\";\nimport type { KeyRotateResult, KeySetResult, RotatedValue, SkippedValue } from \"../types.js\";\n\nexport interface PrettyOptions {\n color: boolean;\n}\n\n/** Said at the end of a writing rotation when a citation baseline exists. */\nexport const BASELINE_NOTICE =\n \"The citation baseline fingerprints id-less encrypted citations by their pin; re-record it with `manni cite check --write-baseline`.\";\n\nconst NARROWED =\n \"Key not written: this run covered part of the family. Finish with a whole run under the same key: `manni key rotate --to <the same value>`.\";\nconst FROM_ENV =\n \"Key not written: it comes from MANNI_ENCRYPTION_KEY. Update the secret to the value you passed.\";\n\nconst plural = (n: number, one: string, many = `${one}s`): string =>\n `${String(n)} ${n === 1 ? one : many}`;\n\n/** What `set` says: the file, never the key. */\nexport function setMessage(result: KeySetResult): string {\n return result.dryRun\n ? `Would write encryptionKey to ${result.source}.`\n : `Encryption key written to ${result.source}.`;\n}\n\n/** `~AQx7…`, and a citation's line suffix after it: `~AQm4…:2`. */\nexport function shortCiphertext(value: string): string {\n // base64url has no `:`, so the first one starts the line suffix.\n const colon = value.indexOf(\":\");\n const token = colon === -1 ? value : value.slice(0, colon);\n const suffix = colon === -1 ? \"\" : value.slice(colon);\n return `${token.slice(0, 5)}…${suffix}`;\n}\n\n/** A metadata value by its pointer; a citation by its id, else where it sits. */\nfunction nameOf(row: RotatedValue | SkippedValue): string {\n if (row.kind === \"metadata\") return row.pointer;\n if (row.id !== undefined) return row.id;\n if (row.index !== undefined) return `/citations/${String(row.index)}`;\n return `line ${String(row.line ?? 0)}`;\n}\n\nfunction closing(result: KeyRotateResult): string | undefined {\n switch (result.outcome) {\n case \"written\":\n return result.configSource === undefined\n ? undefined\n : `Encryption key written to ${result.configSource}.`;\n case \"finished\":\n // Said before the counts: the key was written by the run that stopped.\n return undefined;\n case \"narrowed\":\n return NARROWED;\n case \"env\":\n return FROM_ENV;\n case \"skipped\":\n return result.skipped === 1\n ? \"Key not written: 1 value could not be re-encrypted. Fix it and rotate again.\"\n : `Key not written: ${String(result.skipped)} values could not be re-encrypted. Fix them and rotate again.`;\n case \"dry-run\":\n return \"Dry run: nothing written.\";\n }\n}\n\nexport function renderRotatePretty(result: KeyRotateResult, opts: PrettyOptions): string {\n const c = palette(opts.color);\n const lines: string[] = [];\n for (const page of result.pages) {\n for (const row of page.rewritten) {\n // A metadata value has no line suffix; two spaces keep its arrow in the\n // column a `:L` suffix would take.\n const gap = row.kind === \"metadata\" ? \" \" : \" \";\n lines.push(\n `${page.file}: ${nameOf(row)} ${c.dim(shortCiphertext(row.from))}${gap}-> ${shortCiphertext(row.to)}`,\n );\n }\n for (const row of page.skipped) {\n lines.push(`${page.file}: ${nameOf(row)} ${c.red(\"skipped:\")} ${row.message}`);\n }\n }\n // A manifest value is named by the entry it belongs to and the pointer\n // inside it, so one line says which document's private half moved.\n for (const manifest of result.manifests) {\n for (const row of manifest.rewritten) {\n lines.push(\n `${manifest.file}: ${row.entry}${row.pointer} ${c.dim(shortCiphertext(row.from))} -> ${shortCiphertext(row.to)}`,\n );\n }\n for (const row of manifest.skipped) {\n lines.push(\n `${manifest.file}: ${row.entry}${row.pointer} ${c.red(\"skipped:\")} ${row.message}`,\n );\n }\n }\n if (result.outcome === \"finished\" && result.configSource !== undefined) {\n lines.push(`Finished the interrupted rotation in ${result.configSource}.`);\n }\n const files =\n result.pages.filter((page) => page.rewritten.length > 0).length +\n result.manifests.filter((manifest) => manifest.rewritten.length > 0).length;\n lines.push(\n `${plural(result.reencrypted, \"value\")} re-encrypted in ${plural(files, \"file\")}, ${String(result.skipped)} skipped`,\n );\n const last = closing(result);\n if (last !== undefined) lines.push(result.outcome === \"skipped\" ? c.red(last) : last);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,YAAM,SAAS,MAAM,aAAa;AAAA,QAChC,QAAQ;AAAA,QACR,YAAY,QAAQ;AAAA,QACpB,IAAI,QAAQ;AAAA,QACZ,MAAM,QAAQ,MAAM,UAAU,QAAQ,GAAG,IAAI;AAAA,QAC7C,SAAS,QAAQ;AAAA,QACjB,IAAI,QAAQ;AAAA,QACZ,YAAY,QAAQ;AAAA;AAAA,QAEpB,YAAY,QAAQ,aAAa,OAAO;AAAA,QACxC,kBAAkB,cAAc,QAAQ,SAAS;AAAA,QACjD,MAAM,QAAQ;AAAA,QACd,OAAO,eAAe,QAAQ,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;AAAA,QAC1D,QAAQ,QAAQ,QAAQ,MAAM;AAAA,QAC9B,UAAU;AAAA,MACZ,CAAC;AACD,UAAI,WAAW,QAAQ;AACrB,gBAAQ,OAAO,MAAM,GAAG,iBAAiB,MAAM,CAAC;AAAA,CAAI;AAEpD,YAAI,OAAO,cAAe,QAAO,eAAe;AAAA,MAClD,OAAO;AACL,gBAAQ,OAAO,MAAM,GAAG,mBAAmB,QAAQ,EAAE,OAAO,MAAM,EAAE,CAAC,CAAC;AAAA,CAAI;AAAA,MAC5E;AACA,cAAQ,WAAW,OAAO;AAAA,IAC5B,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":[]}
|
|
@@ -3,39 +3,41 @@ import {
|
|
|
3
3
|
ANNOTATE_FORMATS,
|
|
4
4
|
renderAnnotate,
|
|
5
5
|
runAnnotate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R3FCSRTX.js";
|
|
7
7
|
import {
|
|
8
8
|
SiteError,
|
|
9
|
+
findOnPath,
|
|
9
10
|
resolvePlan
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-ZZGHTXZ2.js";
|
|
12
|
+
import "./chunk-YUTRYEDG.js";
|
|
13
|
+
import "./chunk-RCGR4NKY.js";
|
|
13
14
|
import {
|
|
14
15
|
launcherCommandLine
|
|
15
16
|
} from "./chunk-ZMECS2IJ.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-FRAEUYJE.js";
|
|
18
|
+
import "./chunk-H7SFSZ3I.js";
|
|
19
|
+
import "./chunk-OPF3NOKF.js";
|
|
20
|
+
import "./chunk-HMJZHUCJ.js";
|
|
21
|
+
import "./chunk-ACTUV3CQ.js";
|
|
22
|
+
import "./chunk-DZC2OALR.js";
|
|
23
|
+
import "./chunk-X3FSKK53.js";
|
|
24
|
+
import "./chunk-JWS4OKOZ.js";
|
|
25
|
+
import "./chunk-OBFIWPEB.js";
|
|
24
26
|
import "./chunk-DSWKBZWW.js";
|
|
25
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-HQRXE6QY.js";
|
|
26
28
|
import "./chunk-QK6VYJHV.js";
|
|
27
29
|
import "./chunk-RNVYGWIC.js";
|
|
28
30
|
import {
|
|
29
31
|
fail
|
|
30
32
|
} from "./chunk-YEUYKR62.js";
|
|
31
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-CDX4QK6O.js";
|
|
32
34
|
import {
|
|
33
35
|
notice
|
|
34
36
|
} from "./chunk-HX44GB4Z.js";
|
|
35
37
|
import "./chunk-NVYDWVXN.js";
|
|
36
38
|
import {
|
|
37
39
|
package_default
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7MKAJCU2.js";
|
|
39
41
|
import "./chunk-OWBRDNRZ.js";
|
|
40
42
|
import {
|
|
41
43
|
errorMessage
|
|
@@ -47,8 +49,6 @@ import { Command } from "commander";
|
|
|
47
49
|
|
|
48
50
|
// src/site/core/run.ts
|
|
49
51
|
import { spawn } from "node:child_process";
|
|
50
|
-
import { accessSync, constants, statSync } from "node:fs";
|
|
51
|
-
import { delimiter, resolve as resolve2 } from "node:path";
|
|
52
52
|
|
|
53
53
|
// src/site/core/static-server.ts
|
|
54
54
|
import { createReadStream } from "node:fs";
|
|
@@ -57,6 +57,7 @@ import { createServer } from "node:http";
|
|
|
57
57
|
import { extname, join, relative, resolve, sep } from "node:path";
|
|
58
58
|
var MIME = {
|
|
59
59
|
".html": "text/html; charset=utf-8",
|
|
60
|
+
".htm": "text/html; charset=utf-8",
|
|
60
61
|
".css": "text/css; charset=utf-8",
|
|
61
62
|
".js": "text/javascript; charset=utf-8",
|
|
62
63
|
".mjs": "text/javascript; charset=utf-8",
|
|
@@ -137,7 +138,11 @@ function handler(root, base) {
|
|
|
137
138
|
redirect(res, 301, `${pathname}/${url.search}`);
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
+
let file = path;
|
|
142
|
+
if (path !== void 0 && kind === "dir") {
|
|
143
|
+
const index = join(path, "index.html");
|
|
144
|
+
file = await kindOf(index) === "file" ? index : join(path, "Default.htm");
|
|
145
|
+
}
|
|
141
146
|
if (file !== void 0 && await kindOf(file) === "file") {
|
|
142
147
|
sendFile(req, res, file);
|
|
143
148
|
} else if (await kindOf(notFound) === "file") {
|
|
@@ -195,29 +200,6 @@ async function serveStatic(opts) {
|
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
// src/site/core/run.ts
|
|
198
|
-
function isExecutable(path) {
|
|
199
|
-
try {
|
|
200
|
-
if (!statSync(path).isFile()) return false;
|
|
201
|
-
if (process.platform !== "win32") accessSync(path, constants.X_OK);
|
|
202
|
-
return true;
|
|
203
|
-
} catch {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function findOnPath(name, cwd) {
|
|
208
|
-
const win = process.platform === "win32";
|
|
209
|
-
const exts = win ? (process.env["PATHEXT"] ?? ".COM;.EXE;.BAT;.CMD").split(";").filter((e) => e !== "") : [];
|
|
210
|
-
const lower = name.toLowerCase();
|
|
211
|
-
const names = win && !exts.some((e) => lower.endsWith(e.toLowerCase())) ? exts.map((e) => name + e) : [name];
|
|
212
|
-
const dirs = /[\\/]/.test(name) ? [cwd] : (process.env["PATH"] ?? "").split(delimiter).filter((d) => d !== "");
|
|
213
|
-
for (const dir of dirs) {
|
|
214
|
-
for (const candidate of names) {
|
|
215
|
-
const path = resolve2(dir, candidate);
|
|
216
|
-
if (isExecutable(path)) return path;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return void 0;
|
|
220
|
-
}
|
|
221
203
|
function startExec(planned, step) {
|
|
222
204
|
const [name, ...args] = step.argv;
|
|
223
205
|
const binary = name === void 0 ? void 0 : findOnPath(name, step.cwd);
|
|
@@ -374,4 +356,4 @@ function buildProgram() {
|
|
|
374
356
|
export {
|
|
375
357
|
buildProgram
|
|
376
358
|
};
|
|
377
|
-
//# sourceMappingURL=cli-
|
|
359
|
+
//# sourceMappingURL=cli-Z6IVPISQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/site/cli.ts","../src/site/core/run.ts","../src/site/core/static-server.ts","../src/site/commands/run.ts"],"sourcesContent":["/**\n * The `site` domain's commander program. Mounted by `src/cli.ts` under\n * `manni site`; no entry point of its own. Like `key` (proposal 0045), `site`\n * is a family resource with verbs: the site every other domain checks\n * (proposal 0082). Four verbs, no default subcommand.\n *\n * `start`, `build` and `preview` print no report: the framework's output is\n * the output, on the inherited stdio. `annotate` (proposal 0095) prints its\n * own. manni's own lines are diagnostics on stderr. Exit `0` done, `2`\n * operational/usage, and never `1`, because nothing here is a finding.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { fail } from \"../shared/run.js\";\nimport { ANNOTATE_FORMATS, renderAnnotate, runAnnotate, type AnnotateFormat } from \"./commands/annotate.js\";\nimport { runSite } from \"./commands/run.js\";\nimport { SiteError } from \"./errors.js\";\nimport type { Verb } from \"./types.js\";\n\n/** What commander hands `annotate`'s action. */\ninterface AnnotateCliOptions {\n out?: string;\n chunks?: string;\n format: string;\n config?: string;\n}\n\nconst isAnnotateFormat = (value: string): value is AnnotateFormat => (ANNOTATE_FORMATS as readonly string[]).includes(value);\n\n/** What commander hands each verb's action. */\ninterface SiteCliOptions {\n /** `-c, --config <file>`. */\n config?: string;\n /** `--port <n>` as typed; `resolvePlan` validates it. start and preview only. */\n port?: string;\n /** `--host <host>`. start and preview only. */\n host?: string;\n}\n\n/**\n * Split a verb's operands into `[dir]` and what came after `--`.\n *\n * Commander drops the `--` itself, at whichever program met it first (here,\n * the umbrella), and hands everything after it on as operands. So `[dir]`\n * alone cannot tell `start -- --open` (no dir) from `start website`. The\n * process argv still has the `--`, and what follows it is the tail of the\n * operands; a tail that does not match (a program parsed from elsewhere) is\n * no passthrough at all.\n * ponytail: an option given `--` as its value (`--host --`) is misread as the\n * separator; nobody binds a host named `--`.\n */\nfunction splitOperands(args: readonly string[]): { dir: string | undefined; passthrough: string[]; extra: number } {\n const at = process.argv.indexOf(\"--\");\n const tail = at === -1 ? [] : process.argv.slice(at + 1);\n const start = args.length - tail.length;\n const passthrough = start >= 0 && tail.every((arg, i) => args[start + i] === arg) ? tail : [];\n const before = args.slice(0, args.length - passthrough.length);\n return { dir: before[0], passthrough, extra: before.length };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"site\")\n .description(\"Start, build and preview the docs site\")\n .version(pkg.version, \"-V, --version\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand still\n // calling `process.exit(1)`.\n .exitOverride();\n\n const verb = (name: Verb, description: string, serves: boolean): void => {\n const cmd = program\n .command(name)\n .description(description)\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n // Everything after `--` arrives as operands; splitOperands sorts them.\n .allowExcessArguments();\n if (serves) {\n cmd\n .option(\"--port <n>\", \"port, an integer from 1 to 65535 (default: a local collection url, else the framework's)\")\n .option(\"--host <host>\", \"host to bind (default: a local collection url, else the framework's)\");\n }\n cmd\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action(async (_dir: string | undefined, options: SiteCliOptions, self: Command) => {\n const { dir, passthrough, extra } = splitOperands(self.args);\n if (extra > 1) {\n self.error(\n `error: too many arguments for '${name}'. Expected 1 argument but got ${String(extra)}.`,\n { code: \"commander.excessArguments\" },\n );\n }\n try {\n process.exitCode = await runSite(name, {\n cwd: process.cwd(),\n dir,\n configPath: options.config,\n port: options.port,\n host: options.host,\n passthrough,\n });\n } catch (err) {\n fail(err);\n }\n });\n };\n\n verb(\"start\", \"Run the docs framework's dev server\", true);\n verb(\"build\", \"Build the docs site\", false);\n verb(\"preview\", \"Build the docs site, then serve the output\", true);\n\n program\n .command(\"annotate\")\n .description(\"Join the graph's pins and statements to the built site, as data attributes\")\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n .option(\"--out <dir>\", \"the built site to annotate (default: site.out, else the framework's output)\")\n .option(\"--chunks <file>\", \"the chunk manifest graph publish writes (default: chunks.json beside graph.out)\")\n .option(\"-f, --format <format>\", `output: ${ANNOTATE_FORMATS.join(\" | \")}`, \"pretty\")\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action((dir: string | undefined, options: AnnotateCliOptions) => {\n try {\n const format = options.format;\n if (!isAnnotateFormat(format)) {\n throw new SiteError(`Unknown --format \"${format}\". Use ${ANNOTATE_FORMATS.join(\" or \")}.`);\n }\n const report = runAnnotate({\n cwd: process.cwd(),\n ...(dir === undefined ? {} : { dir }),\n ...(options.config === undefined ? {} : { configPath: options.config }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.chunks === undefined ? {} : { chunks: options.chunks }),\n });\n process.stdout.write(`${renderAnnotate(report, format)}\n`);\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program.addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni site start # detect the framework, run its dev server\",\n \" manni site build\",\n \" manni site preview --port 4000 # build, then serve the output\",\n \" manni site start website -- --open # arguments after -- go to the framework\",\n \" manni site annotate # join the graph's pins to the built site\",\n ].join(\"\\n\"),\n );\n\n return program;\n}\n","/**\n * The runner: carries out a `Plan` step by step, with the child's stdio\n * inherited so the framework's own output is the output. No timeout, because\n * the last step of `start` and `preview` is a server that runs until Ctrl-C.\n */\nimport { spawn, type ChildProcess } from \"node:child_process\";\nimport { launcherCommandLine } from \"../../shared/batch-launcher.js\";\nimport { findOnPath } from \"../../shared/find-on-path.js\";\nimport { notice } from \"../../shared/warn.js\";\nimport { renderAnnotate, runAnnotate } from \"../commands/annotate.js\";\nimport { SiteError } from \"../errors.js\";\nimport type { Plan, PlannedStep, Step } from \"../types.js\";\nimport { serveStatic } from \"./static-server.js\";\n\nfunction startExec(planned: PlannedStep, step: Extract<Step, { kind: \"exec\" }>): ChildProcess {\n const [name, ...args] = step.argv;\n const binary = name === undefined ? undefined : findOnPath(name, step.cwd);\n if (binary === undefined) throw new SiteError(planned.notFound);\n const line = launcherCommandLine(\n binary,\n args,\n (value) => new SiteError(`${planned.display} cannot be given an argument containing a quote: ${value}`),\n );\n return spawn(line.command, line.argv, {\n cwd: step.cwd,\n stdio: \"inherit\",\n windowsVerbatimArguments: line.verbatim,\n });\n}\n\nfunction exitOf(\n planned: PlannedStep,\n child: ChildProcess,\n): Promise<{ code: number | null; signal: NodeJS.Signals | null }> {\n return new Promise((settle, reject) => {\n child.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n err.code === \"ENOENT\"\n ? new SiteError(planned.notFound)\n : new SiteError(`${planned.display} could not start: ${err.message}`),\n );\n });\n child.once(\"exit\", (code, signal) => {\n settle({ code, signal });\n });\n });\n}\n\n/**\n * One step; resolves true when the user stopped it. While any step runs this\n * process ignores SIGINT itself (the terminal delivers Ctrl-C to the whole\n * process group, child included) and forwards SIGTERM, which reaches this\n * process alone, so a cancelled build is not left running. An exit after\n * either is a stop the user asked for, so it is not a failure whatever code\n * the child chose. Otherwise the step must exit 0.\n */\nasync function runStep(planned: PlannedStep): Promise<boolean> {\n const { step } = planned;\n if (step.kind === \"static\") {\n await serveStatic(step);\n return true;\n }\n if (step.kind === \"annotate\") {\n const { cwd, dir, configPath } = step;\n const report = runAnnotate({ cwd, dir, ...(configPath === undefined ? {} : { configPath }) });\n process.stdout.write(`${renderAnnotate(report, \"pretty\")}\n`);\n return false;\n }\n const child =\n step.kind === \"exec\"\n ? startExec(planned, step)\n : spawn(step.command, { cwd: step.cwd, stdio: \"inherit\", shell: true });\n // An object, not a `let`: TypeScript cannot see the handlers assign it.\n const signal = { received: false };\n const onInt = (): void => {\n signal.received = true;\n };\n const onTerm = (): void => {\n signal.received = true;\n child.kill(\"SIGTERM\");\n };\n process.on(\"SIGINT\", onInt);\n process.on(\"SIGTERM\", onTerm);\n try {\n const exit = await exitOf(planned, child);\n if (signal.received) return true;\n if (exit.code === 0) return false;\n throw new SiteError(\n exit.code === null\n ? `${planned.display} was stopped by ${String(exit.signal)}.`\n : `${planned.display} exited with code ${String(exit.code)}.`,\n );\n } finally {\n process.off(\"SIGINT\", onInt);\n process.off(\"SIGTERM\", onTerm);\n }\n}\n\n/** Run every step in order. Resolves the exit code, 0; a failure throws `SiteError`. */\nexport async function runPlan(plan: Plan): Promise<number> {\n for (const planned of plan.steps) {\n if (planned.announce !== \"\") notice(planned.announce);\n // A stop during the build ends the run there: nothing is served.\n if (await runStep(planned)) break;\n }\n return 0;\n}\n","/**\n * The built-in static server `manni site preview` uses for frameworks whose\n * own CLI has no preview (MkDocs, Zensical, Sphinx, Hugo, Jekyll, Flare). It\n * serves a build output directory, mounted at the collection `url:` path,\n * until the process is stopped. `node:http` and `node:fs` only.\n */\nimport { createReadStream } from \"node:fs\";\nimport { stat } from \"node:fs/promises\";\nimport { createServer, type IncomingMessage, type Server, type ServerResponse } from \"node:http\";\nimport type { AddressInfo } from \"node:net\";\nimport { extname, join, relative, resolve, sep } from \"node:path\";\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { SiteError } from \"../errors.js\";\n\nexport interface StaticOptions {\n root: string;\n host: string;\n port: number;\n /** The URL path the root is mounted at, e.g. `/manni/`. */\n base: string;\n}\n\n// ponytail: the types a static docs build ships. Anything else goes out as\n// application/octet-stream; add a row when a site needs one.\nconst MIME: Record<string, string> = {\n \".html\": \"text/html; charset=utf-8\",\n \".htm\": \"text/html; charset=utf-8\",\n \".css\": \"text/css; charset=utf-8\",\n \".js\": \"text/javascript; charset=utf-8\",\n \".mjs\": \"text/javascript; charset=utf-8\",\n \".json\": \"application/json; charset=utf-8\",\n \".map\": \"application/json; charset=utf-8\",\n \".txt\": \"text/plain; charset=utf-8\",\n \".xml\": \"application/xml; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n \".png\": \"image/png\",\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".gif\": \"image/gif\",\n \".webp\": \"image/webp\",\n \".avif\": \"image/avif\",\n \".ico\": \"image/x-icon\",\n \".woff\": \"font/woff\",\n \".woff2\": \"font/woff2\",\n \".ttf\": \"font/ttf\",\n \".wasm\": \"application/wasm\",\n \".pdf\": \"application/pdf\",\n \".webmanifest\": \"application/manifest+json\",\n};\n\n/** `/manni/` from `manni`, `/manni` or `/manni/`; `/` from `/` or empty. */\nfunction normalizeBase(base: string): string {\n const trimmed = base.replace(/^\\/+|\\/+$/g, \"\");\n return trimmed === \"\" ? \"/\" : `/${trimmed}/`;\n}\n\nasync function kindOf(path: string): Promise<\"file\" | \"dir\" | undefined> {\n try {\n const s = await stat(path);\n if (s.isDirectory()) return \"dir\";\n return s.isFile() ? \"file\" : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction sendFile(req: IncomingMessage, res: ServerResponse, path: string, status = 200): void {\n res.writeHead(status, {\n \"content-type\": MIME[extname(path).toLowerCase()] ?? \"application/octet-stream\",\n });\n if (req.method === \"HEAD\") {\n res.end();\n return;\n }\n createReadStream(path)\n .on(\"error\", () => res.destroy())\n .pipe(res);\n}\n\nfunction redirect(res: ServerResponse, status: 301 | 302, location: string): void {\n res.writeHead(status, { location });\n res.end();\n}\n\n/**\n * The file inside `root` a URL path below the base names, or undefined when it\n * names nothing inside it. The URL parser has already collapsed `..` and\n * `%2e%2e` segments; what it leaves are encoded separators (`..%2f`, `..%5c`),\n * so the decoded path is checked for `..` segments and then for containment.\n * Both layers are needed: the parser normalises before it decodes, so a `..`\n * hidden behind an encoded separator only appears after this decode.\n */\nfunction inside(root: string, rest: string): string | undefined {\n let decoded: string;\n try {\n decoded = decodeURIComponent(rest);\n } catch {\n return undefined;\n }\n if (decoded.includes(\"\\0\") || decoded.split(/[\\\\/]/).includes(\"..\")) return undefined;\n const path = resolve(root, `.${sep}${decoded}`);\n return path === root || path.startsWith(root + sep) ? path : undefined;\n}\n\nfunction handler(root: string, base: string) {\n const notFound = join(root, \"404.html\");\n return async (req: IncomingMessage, res: ServerResponse): Promise<void> => {\n if (req.method !== \"GET\" && req.method !== \"HEAD\") {\n res.writeHead(405, { allow: \"GET, HEAD\" });\n res.end();\n return;\n }\n const url = new URL(req.url ?? \"/\", \"http://localhost\");\n const { pathname } = url;\n if (base !== \"/\" && (pathname === \"/\" || pathname === base.slice(0, -1))) {\n redirect(res, pathname === \"/\" ? 302 : 301, `${base}${url.search}`);\n return;\n }\n const path = pathname.startsWith(base) ? inside(root, pathname.slice(base.length)) : undefined;\n const kind = path === undefined ? undefined : await kindOf(path);\n if (path !== undefined && kind === \"dir\" && !pathname.endsWith(\"/\")) {\n redirect(res, 301, `${pathname}/${url.search}`);\n return;\n }\n // Flare's HTML5 output starts at Default.htm, in a folder with no index.html.\n // The other frameworks served here write index.html in every directory, so\n // in practice the fallback is Flare's alone; nothing gates it by framework.\n let file = path;\n if (path !== undefined && kind === \"dir\") {\n const index = join(path, \"index.html\");\n file = (await kindOf(index)) === \"file\" ? index : join(path, \"Default.htm\");\n }\n if (file !== undefined && (await kindOf(file)) === \"file\") {\n sendFile(req, res, file);\n } else if ((await kindOf(notFound)) === \"file\") {\n sendFile(req, res, notFound, 404);\n } else {\n res.writeHead(404, { \"content-type\": \"text/plain; charset=utf-8\" });\n res.end(\"Not found\\n\");\n }\n };\n}\n\nfunction urlOf(host: string, port: number, base: string): string {\n const shown = host.includes(\":\") ? `[${host}]` : host;\n return `http://${shown}:${String(port)}${base}`;\n}\n\n/**\n * Serve `root` at `base` on `host:port` and print the URL to stdout once\n * listening. Resolves with the listening server; the caller closes it.\n */\nexport async function startStaticServer(opts: StaticOptions): Promise<Server> {\n const root = resolve(opts.root);\n if ((await kindOf(root)) !== \"dir\") {\n const shown = relative(process.cwd(), root).split(sep).join(\"/\") || \".\";\n throw new SiteError(`${shown}/ does not exist.`);\n }\n const base = normalizeBase(opts.base);\n const handle = handler(root, base);\n const server = createServer((req, res) => {\n handle(req, res).catch(() => res.destroy());\n });\n await new Promise<void>((settle, reject) => {\n server.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n new SiteError(\n err.code === \"EADDRINUSE\"\n ? `port ${String(opts.port)} is in use. Pass --port, or stop the process holding it.`\n : `cannot listen on ${urlOf(opts.host, opts.port, \"\")}: ${errorMessage(err)}`,\n ),\n );\n });\n server.listen(opts.port, opts.host, settle);\n });\n const { port } = server.address() as AddressInfo;\n process.stdout.write(`${urlOf(opts.host, port, base)}\\n`);\n return server;\n}\n\n/** Serve until SIGINT or SIGTERM, then close the server and resolve. */\nexport async function serveStatic(opts: StaticOptions): Promise<void> {\n const server = await startStaticServer(opts);\n await new Promise<void>((settle) => {\n const stop = (): void => {\n process.off(\"SIGINT\", stop);\n process.off(\"SIGTERM\", stop);\n server.close(() => {\n settle();\n });\n server.closeAllConnections();\n };\n process.on(\"SIGINT\", stop);\n process.on(\"SIGTERM\", stop);\n });\n}\n","/**\n * The one command core behind `start`, `build` and `preview`: resolve the\n * verb to a plan, then run it. The three verbs differ only in the plan, which\n * `resolvePlan` owns, so they share this core rather than three copies of it.\n */\nimport { resolvePlan, type ResolveOptions } from \"../core/detect.js\";\nimport { runPlan } from \"../core/run.js\";\nimport type { Verb } from \"../types.js\";\n\n/** Resolves the exit code, 0; anything operational throws `SiteError`. */\nexport async function runSite(verb: Verb, opts: ResolveOptions): Promise<number> {\n return runPlan(resolvePlan(verb, opts));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,eAAe;;;ACNxB,SAAS,aAAgC;;;ACCzC,SAAS,wBAAwB;AACjC,SAAS,YAAY;AACrB,SAAS,oBAA4E;AAErF,SAAS,SAAS,MAAM,UAAU,SAAS,WAAW;AActD,IAAM,OAA+B;AAAA,EACnC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,gBAAgB;AAClB;AAGA,SAAS,cAAc,MAAsB;AAC3C,QAAM,UAAU,KAAK,QAAQ,cAAc,EAAE;AAC7C,SAAO,YAAY,KAAK,MAAM,IAAI,OAAO;AAC3C;AAEA,eAAe,OAAO,MAAmD;AACvE,MAAI;AACF,UAAM,IAAI,MAAM,KAAK,IAAI;AACzB,QAAI,EAAE,YAAY,EAAG,QAAO;AAC5B,WAAO,EAAE,OAAO,IAAI,SAAS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";
|
|
12
12
|
import "./chunk-G3T47CFV.js";
|
|
13
13
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -15,13 +15,13 @@ import "./chunk-2H7UOFLK.js";
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import { Command } from "commander";
|
|
17
17
|
registerTermLabelSource(
|
|
18
|
-
async (request) => (await import("./labels-
|
|
18
|
+
async (request) => (await import("./labels-3ZOCWOT6.js")).termLabels(request)
|
|
19
19
|
);
|
|
20
20
|
var DOMAINS = [
|
|
21
21
|
{
|
|
22
22
|
names: ["meta"],
|
|
23
23
|
load: async () => [
|
|
24
|
-
(await import("./cli-
|
|
24
|
+
(await import("./cli-PKCV3N4H.js")).buildProgram().name("meta").description(
|
|
25
25
|
"Validate, read, query and fill document metadata against JSON Schema"
|
|
26
26
|
)
|
|
27
27
|
]
|
|
@@ -29,7 +29,7 @@ var DOMAINS = [
|
|
|
29
29
|
{
|
|
30
30
|
names: ["a11y"],
|
|
31
31
|
load: async () => [
|
|
32
|
-
(await import("./cli-
|
|
32
|
+
(await import("./cli-WFC3CJOJ.js")).buildProgram().name("a11y").description(
|
|
33
33
|
"Crawl a site and check every page for accessibility violations with axe-core"
|
|
34
34
|
)
|
|
35
35
|
]
|
|
@@ -37,7 +37,7 @@ var DOMAINS = [
|
|
|
37
37
|
{
|
|
38
38
|
names: ["cite"],
|
|
39
39
|
load: async () => [
|
|
40
|
-
(await import("./cli-
|
|
40
|
+
(await import("./cli-6Y2V6OI6.js")).buildProgram().name("cite").description(
|
|
41
41
|
"Track citations from doc claims to source lines and check them for drift"
|
|
42
42
|
)
|
|
43
43
|
]
|
|
@@ -45,7 +45,7 @@ var DOMAINS = [
|
|
|
45
45
|
{
|
|
46
46
|
names: ["lint"],
|
|
47
47
|
load: async () => [
|
|
48
|
-
(await import("./cli-
|
|
48
|
+
(await import("./cli-4Q22IFXX.js")).buildProgram().name("lint").description(
|
|
49
49
|
"Validate document structure against doctype templates, routed by a page's type"
|
|
50
50
|
)
|
|
51
51
|
]
|
|
@@ -53,7 +53,7 @@ var DOMAINS = [
|
|
|
53
53
|
{
|
|
54
54
|
names: ["docevals"],
|
|
55
55
|
load: async () => [
|
|
56
|
-
(await import("./cli-
|
|
56
|
+
(await import("./cli-SN7N4WCV.js")).buildProgram().name("docevals").description(
|
|
57
57
|
"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter"
|
|
58
58
|
)
|
|
59
59
|
]
|
|
@@ -61,25 +61,25 @@ var DOMAINS = [
|
|
|
61
61
|
{
|
|
62
62
|
names: ["term"],
|
|
63
63
|
load: async () => [
|
|
64
|
-
(await import("./term-
|
|
64
|
+
(await import("./term-UYCZLVVA.js")).buildProgram().name("term").description("Check, lint and render a docset's terms and the references into them")
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
names: ["strategy"],
|
|
69
69
|
load: async () => [
|
|
70
|
-
(await import("./strategy-
|
|
70
|
+
(await import("./strategy-3EJODC6O.js")).buildProgram().name("strategy").description("Check a docset's pages against its audiences, personas and journeys")
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
names: ["test"],
|
|
75
75
|
load: async () => [
|
|
76
|
-
(await import("./cli-
|
|
76
|
+
(await import("./cli-QQIIFRKE.js")).buildProgram().name("test").description("Run the docs' procedure tests, and have synthetic users attempt tasks in them")
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
names: ["graph"],
|
|
81
81
|
load: async () => [
|
|
82
|
-
(await import("./cli-
|
|
82
|
+
(await import("./cli-H4SH5A6M.js")).buildProgram().name("graph").description(
|
|
83
83
|
"Deterministic knowledge graphs derived from documentation frontmatter and formatting"
|
|
84
84
|
)
|
|
85
85
|
]
|
|
@@ -87,7 +87,7 @@ var DOMAINS = [
|
|
|
87
87
|
{
|
|
88
88
|
names: ["tracevals"],
|
|
89
89
|
load: async () => [
|
|
90
|
-
(await import("./cli-
|
|
90
|
+
(await import("./cli-A3E4KJ5U.js")).buildProgram().name("tracevals").description(
|
|
91
91
|
"Deterministic and LLM-as-judge adherence evals for AI agent session traces"
|
|
92
92
|
)
|
|
93
93
|
]
|
|
@@ -96,14 +96,14 @@ var DOMAINS = [
|
|
|
96
96
|
{
|
|
97
97
|
names: ["key"],
|
|
98
98
|
load: async () => [
|
|
99
|
-
(await import("./cli-
|
|
99
|
+
(await import("./cli-YP5KKGZP.js")).buildProgram().name("key").description("Set and rotate the family key that encrypted values are encrypted with.")
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
102
|
// The docs site, a family resource with verbs like `key` (proposal 0082).
|
|
103
103
|
{
|
|
104
104
|
names: ["site"],
|
|
105
105
|
load: async () => [
|
|
106
|
-
(await import("./cli-
|
|
106
|
+
(await import("./cli-Z6IVPISQ.js")).buildProgram().name("site").description("Start, build and preview the docs site")
|
|
107
107
|
]
|
|
108
108
|
},
|
|
109
109
|
// The two family verbs (proposal 0078), and the only verbs the umbrella
|
|
@@ -111,7 +111,7 @@ var DOMAINS = [
|
|
|
111
111
|
{
|
|
112
112
|
names: ["check", "status"],
|
|
113
113
|
load: async () => {
|
|
114
|
-
const { buildCheck, buildStatus } = await import("./cli-
|
|
114
|
+
const { buildCheck, buildStatus } = await import("./cli-ODMYZEFY.js");
|
|
115
115
|
return [buildCheck(), buildStatus()];
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
discoverConfig,
|
|
6
6
|
loadConfig,
|
|
7
7
|
parseConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BTFXOKCP.js";
|
|
9
9
|
import "./chunk-6WJUZQQX.js";
|
|
10
10
|
import "./chunk-NHOGTAPK.js";
|
|
11
11
|
import "./chunk-ZINZTHWO.js";
|
|
12
12
|
import "./chunk-YNHZHSSM.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CDX4QK6O.js";
|
|
14
14
|
import "./chunk-HX44GB4Z.js";
|
|
15
15
|
import "./chunk-NVYDWVXN.js";
|
|
16
16
|
import "./chunk-OWBRDNRZ.js";
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
loadConfig,
|
|
24
24
|
parseConfig
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=config-
|
|
26
|
+
//# sourceMappingURL=config-Z3FYLJ6X.js.map
|
package/dist/docmeta.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
buildProgram
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4QOXP5K4.js";
|
|
5
|
+
import "./chunk-X3FSKK53.js";
|
|
6
|
+
import "./chunk-JWS4OKOZ.js";
|
|
7
|
+
import "./chunk-OBFIWPEB.js";
|
|
8
8
|
import "./chunk-DSWKBZWW.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-HQRXE6QY.js";
|
|
10
10
|
import "./chunk-QK6VYJHV.js";
|
|
11
11
|
import "./chunk-RNVYGWIC.js";
|
|
12
12
|
import {
|
|
13
13
|
runIfMain
|
|
14
14
|
} from "./chunk-YEUYKR62.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-CDX4QK6O.js";
|
|
16
16
|
import "./chunk-HX44GB4Z.js";
|
|
17
17
|
import "./chunk-NVYDWVXN.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-7MKAJCU2.js";
|
|
19
19
|
import "./chunk-OWBRDNRZ.js";
|
|
20
20
|
import "./chunk-G3T47CFV.js";
|
|
21
21
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
NAMES_ITS_SUBJECT,
|
|
4
|
+
findingMessage,
|
|
5
|
+
renderCheckGithub
|
|
6
|
+
} from "./chunk-LESYV3TT.js";
|
|
7
|
+
import "./chunk-WLN4A2OJ.js";
|
|
8
|
+
import "./chunk-5QPLKYLM.js";
|
|
9
|
+
import "./chunk-4NCNVKZS.js";
|
|
10
|
+
import "./chunk-BN3SQUXK.js";
|
|
11
|
+
import "./chunk-WOPKA4ZB.js";
|
|
12
|
+
import "./chunk-DSTEX7SK.js";
|
|
13
|
+
import "./chunk-43KMLS4Y.js";
|
|
14
|
+
import "./chunk-Z66LHZRV.js";
|
|
15
|
+
import "./chunk-LWWO4C6P.js";
|
|
16
|
+
import "./chunk-TNOML4XE.js";
|
|
17
|
+
import "./chunk-4KK6TVFD.js";
|
|
18
|
+
import "./chunk-FRAEUYJE.js";
|
|
19
|
+
import "./chunk-XTKJNRJ6.js";
|
|
20
|
+
import "./chunk-H7SFSZ3I.js";
|
|
21
|
+
import "./chunk-OPF3NOKF.js";
|
|
22
|
+
import "./chunk-S2ZOXAFY.js";
|
|
23
|
+
import "./chunk-BXQLKOOR.js";
|
|
24
|
+
import "./chunk-JBOXCSTN.js";
|
|
25
|
+
import "./chunk-HMJZHUCJ.js";
|
|
26
|
+
import "./chunk-ACTUV3CQ.js";
|
|
27
|
+
import "./chunk-DZC2OALR.js";
|
|
28
|
+
import "./chunk-X3FSKK53.js";
|
|
29
|
+
import "./chunk-JWS4OKOZ.js";
|
|
30
|
+
import "./chunk-OBFIWPEB.js";
|
|
31
|
+
import "./chunk-DSWKBZWW.js";
|
|
32
|
+
import "./chunk-HQRXE6QY.js";
|
|
33
|
+
import "./chunk-77AINBYM.js";
|
|
34
|
+
import "./chunk-QK6VYJHV.js";
|
|
35
|
+
import "./chunk-RNVYGWIC.js";
|
|
36
|
+
import "./chunk-YEUYKR62.js";
|
|
37
|
+
import "./chunk-CDX4QK6O.js";
|
|
38
|
+
import "./chunk-HX44GB4Z.js";
|
|
39
|
+
import "./chunk-NVYDWVXN.js";
|
|
40
|
+
import "./chunk-7MKAJCU2.js";
|
|
41
|
+
import "./chunk-OWBRDNRZ.js";
|
|
42
|
+
import "./chunk-G3T47CFV.js";
|
|
43
|
+
import "./chunk-2H7UOFLK.js";
|
|
44
|
+
export {
|
|
45
|
+
NAMES_ITS_SUBJECT,
|
|
46
|
+
findingMessage,
|
|
47
|
+
renderCheckGithub
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=github-7MZOPO6F.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
renderFindingsGithub
|
|
4
|
+
} from "./chunk-A4DPDPKJ.js";
|
|
5
|
+
import "./chunk-IQJ4WBJZ.js";
|
|
6
|
+
import "./chunk-BCRMMIY5.js";
|
|
7
|
+
import "./chunk-HMJZHUCJ.js";
|
|
8
|
+
import "./chunk-ACTUV3CQ.js";
|
|
9
|
+
import "./chunk-DZC2OALR.js";
|
|
10
|
+
import "./chunk-X3FSKK53.js";
|
|
11
|
+
import "./chunk-JWS4OKOZ.js";
|
|
12
|
+
import "./chunk-OBFIWPEB.js";
|
|
13
|
+
import "./chunk-DSWKBZWW.js";
|
|
14
|
+
import "./chunk-HQRXE6QY.js";
|
|
15
|
+
import "./chunk-77AINBYM.js";
|
|
16
|
+
import "./chunk-QK6VYJHV.js";
|
|
17
|
+
import "./chunk-RNVYGWIC.js";
|
|
18
|
+
import "./chunk-YEUYKR62.js";
|
|
19
|
+
import "./chunk-CDX4QK6O.js";
|
|
20
|
+
import "./chunk-HX44GB4Z.js";
|
|
21
|
+
import "./chunk-NVYDWVXN.js";
|
|
22
|
+
import "./chunk-7MKAJCU2.js";
|
|
23
|
+
import "./chunk-OWBRDNRZ.js";
|
|
24
|
+
import "./chunk-G3T47CFV.js";
|
|
25
|
+
import "./chunk-2H7UOFLK.js";
|
|
26
|
+
export {
|
|
27
|
+
renderFindingsGithub
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=github-MERFCTC7.js.map
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
renderFindingsGithub
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-Z66LHZRV.js";
|
|
5
|
+
import "./chunk-4KK6TVFD.js";
|
|
6
|
+
import "./chunk-FRAEUYJE.js";
|
|
7
7
|
import "./chunk-XTKJNRJ6.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-H7SFSZ3I.js";
|
|
9
|
+
import "./chunk-OPF3NOKF.js";
|
|
10
10
|
import "./chunk-BXQLKOOR.js";
|
|
11
11
|
import "./chunk-JBOXCSTN.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-HMJZHUCJ.js";
|
|
13
|
+
import "./chunk-ACTUV3CQ.js";
|
|
14
|
+
import "./chunk-DZC2OALR.js";
|
|
15
|
+
import "./chunk-X3FSKK53.js";
|
|
16
|
+
import "./chunk-JWS4OKOZ.js";
|
|
17
|
+
import "./chunk-OBFIWPEB.js";
|
|
17
18
|
import "./chunk-DSWKBZWW.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-HQRXE6QY.js";
|
|
19
20
|
import "./chunk-77AINBYM.js";
|
|
20
21
|
import "./chunk-QK6VYJHV.js";
|
|
21
22
|
import "./chunk-RNVYGWIC.js";
|
|
22
23
|
import "./chunk-YEUYKR62.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-CDX4QK6O.js";
|
|
24
25
|
import "./chunk-HX44GB4Z.js";
|
|
25
26
|
import "./chunk-NVYDWVXN.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-7MKAJCU2.js";
|
|
27
28
|
import "./chunk-OWBRDNRZ.js";
|
|
28
29
|
import "./chunk-G3T47CFV.js";
|
|
29
30
|
import "./chunk-2H7UOFLK.js";
|
|
30
31
|
export {
|
|
31
32
|
renderFindingsGithub
|
|
32
33
|
};
|
|
33
|
-
//# sourceMappingURL=github-
|
|
34
|
+
//# sourceMappingURL=github-MQPACOAB.js.map
|