@hawkeyexl/manni 4.15.0 → 4.17.1
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 +11 -7
- package/dist/{batch-OMDKRGUE.js → batch-SAW4E46C.js} +14 -14
- package/dist/{build-YCY5MUHA.js → build-F6S3W77I.js} +15 -14
- package/dist/{calibrate-RN2NJ4FS.js → calibrate-3DW2VV7F.js} +15 -15
- package/dist/{capture-2WYROZKA.js → capture-PKEYY2VO.js} +14 -14
- package/dist/{check-LVUTWAGR.js → check-7PUIHLFM.js} +15 -15
- package/dist/{check-OIRJ6OBW.js → check-EZN7YNVF.js} +14 -15
- package/dist/{check-KRVWHF7E.js → check-LRX2YFDF.js} +13 -14
- package/dist/check-NW7GHSX6.js +47 -0
- package/dist/{cli-33E3B2FK.js → chunk-245W2Q7C.js} +133 -365
- package/dist/chunk-245W2Q7C.js.map +1 -0
- package/dist/{chunk-KN37BXVY.js → chunk-2A5OIZHT.js} +7 -7
- package/dist/{chunk-KCXQXKOL.js → chunk-2LCJNH73.js} +2 -2
- package/dist/{chunk-Q2VOXKAQ.js → chunk-2TLNAGVJ.js} +187 -159
- package/dist/chunk-2TLNAGVJ.js.map +1 -0
- package/dist/{chunk-AL4HRKSZ.js → chunk-3446DW4W.js} +2 -2
- package/dist/{chunk-UVLQRP6O.js → chunk-3UYSONT4.js} +7 -453
- package/dist/chunk-3UYSONT4.js.map +1 -0
- package/dist/{chunk-3CSEHHKB.js → chunk-4GGADKTU.js} +82 -238
- package/dist/chunk-4GGADKTU.js.map +1 -0
- package/dist/{chunk-RGRNAQG5.js → chunk-5QOTR53S.js} +7 -7
- package/dist/{chunk-GZHBMMDC.js → chunk-5VNFO2RT.js} +12 -38
- package/dist/chunk-5VNFO2RT.js.map +1 -0
- package/dist/{chunk-7EKXSSEO.js → chunk-64EDFJ5S.js} +5 -5
- package/dist/chunk-6J2ED4ED.js +545 -0
- package/dist/chunk-6J2ED4ED.js.map +1 -0
- package/dist/{chunk-FEEO7ET6.js → chunk-ABAFKOQF.js} +3 -3
- package/dist/{chunk-476DMDJ5.js → chunk-AIZBZYQM.js} +1311 -18
- package/dist/chunk-AIZBZYQM.js.map +1 -0
- package/dist/{chunk-NIQ2JSZO.js → chunk-B5R5BWMY.js} +14 -429
- package/dist/chunk-B5R5BWMY.js.map +1 -0
- package/dist/{chunk-6DYFWAZA.js → chunk-D3AO2PMV.js} +9 -9
- package/dist/{chunk-57DHX65T.js → chunk-DSJTYRI5.js} +3 -3
- package/dist/{chunk-T62SFCQY.js → chunk-DU6CXY5R.js} +47 -10
- package/dist/chunk-DU6CXY5R.js.map +1 -0
- package/dist/{chunk-OFOIBV5J.js → chunk-FAS3SRQB.js} +927 -99
- package/dist/chunk-FAS3SRQB.js.map +1 -0
- package/dist/{chunk-FYWQS35G.js → chunk-FEURGKJC.js} +2 -2
- package/dist/{chunk-46OWIAAX.js → chunk-FPPHEHPZ.js} +3 -3
- package/dist/chunk-HEVYEI6O.js +1338 -0
- package/dist/chunk-HEVYEI6O.js.map +1 -0
- package/dist/{chunk-C37OVJ35.js → chunk-IGE6CIKZ.js} +11 -2
- package/dist/chunk-IGE6CIKZ.js.map +1 -0
- package/dist/{chunk-4MYW2D2U.js → chunk-JK56UPNQ.js} +252 -425
- package/dist/chunk-JK56UPNQ.js.map +1 -0
- package/dist/{chunk-ZC2MZZR5.js → chunk-KAWS7H4C.js} +2385 -2061
- package/dist/chunk-KAWS7H4C.js.map +1 -0
- package/dist/{chunk-MAOX3524.js → chunk-KB4MNUKC.js} +2 -2
- package/dist/{chunk-Z6PZKXSP.js → chunk-KCNBM42T.js} +4 -4
- package/dist/chunk-KUXAHHDE.js +314 -0
- package/dist/chunk-KUXAHHDE.js.map +1 -0
- package/dist/{chunk-7SVFBJBE.js → chunk-LDIUA4ZG.js} +2 -2
- package/dist/{chunk-DN4LCWSA.js → chunk-M6DNOHJO.js} +3 -3
- package/dist/{chunk-TXZJESES.js → chunk-MBLVLQWI.js} +2 -2
- package/dist/{chunk-3EJVJDMX.js → chunk-MDXDTO7E.js} +6 -6
- package/dist/{chunk-WDENIUC7.js → chunk-MDZXRHIJ.js} +1 -1
- package/dist/chunk-MDZXRHIJ.js.map +1 -0
- package/dist/{chunk-IGRXQC3H.js → chunk-N25KDXOV.js} +2 -2
- package/dist/{chunk-DW22KCLN.js → chunk-NPZWOPOH.js} +3 -3
- package/dist/chunk-OZL5M764.js +443 -0
- package/dist/chunk-OZL5M764.js.map +1 -0
- package/dist/{chunk-Q62Q7CDI.js → chunk-PS4Y7EPP.js} +3 -3
- package/dist/{chunk-JTATFPWB.js → chunk-Q7E43SXN.js} +12 -7
- package/dist/{chunk-JTATFPWB.js.map → chunk-Q7E43SXN.js.map} +1 -1
- package/dist/{chunk-GUTAKJIF.js → chunk-QIKCIREY.js} +4 -4
- package/dist/{chunk-Y3GWQBJP.js → chunk-QIWSEKA6.js} +2 -2
- package/dist/{chunk-SVF3WCC7.js → chunk-TNYIXIYV.js} +6 -6
- package/dist/{chunk-SLGCRXHM.js → chunk-TUMR35B3.js} +4 -4
- package/dist/{chunk-7XHW5DZA.js → chunk-U5NSIZRS.js} +3 -3
- package/dist/chunk-UP6NBQ62.js +2 -0
- package/dist/{chunk-QEJ4GH25.js → chunk-VRMQSP7O.js} +3 -3
- package/dist/{chunk-URGALOZY.js → chunk-W7IEP7IG.js} +2 -2
- package/dist/{chunk-JHE3CYWS.js → chunk-W7XOMNYC.js} +2 -2
- package/dist/{chunk-CWGBRWP7.js → chunk-WBXVQW57.js} +6 -5
- package/dist/{chunk-CWGBRWP7.js.map → chunk-WBXVQW57.js.map} +1 -1
- package/dist/{chunk-JULE3EU3.js → chunk-WP5EKWTU.js} +7 -7
- package/dist/chunk-WRSWZEVU.js +580 -0
- package/dist/chunk-WRSWZEVU.js.map +1 -0
- package/dist/{chunk-JQPZKWIP.js → chunk-WZSL7KF2.js} +2 -2
- package/dist/{chunk-525KMBZS.js → chunk-XCEEJEVA.js} +4 -4
- package/dist/{chunk-3WQMMLIO.js → chunk-XPGK4ECA.js} +7 -7
- package/dist/{chunk-QDO5JFFV.js → chunk-XRWQQHBR.js} +2 -2
- package/dist/{chunk-IE5PXI6M.js → chunk-XWUIFSWK.js} +20 -6
- package/dist/chunk-XWUIFSWK.js.map +1 -0
- package/dist/{chunk-GLQCSDFS.js → chunk-YJHHXM5B.js} +2 -2
- package/dist/{chunk-QS3K57OJ.js → chunk-ZEYNLKOH.js} +4 -4
- package/dist/{chunk-YT5HKJWV.js → chunk-ZIXU7A4C.js} +21 -21
- package/dist/{cli-DDLLZHZW.js → cli-5ZQXVWWC.js} +18 -19
- package/dist/{cli-DDLLZHZW.js.map → cli-5ZQXVWWC.js.map} +1 -1
- package/dist/{cli-QEPVGLQ3.js → cli-D5WYQVUF.js} +18 -18
- package/dist/{cli-OKPRTVG6.js → cli-FCGGNZ5C.js} +2 -2
- package/dist/{cli-LIKI7WPR.js → cli-FNX4LXMI.js} +37 -37
- package/dist/{cli-VP6JTPFS.js → cli-LQRHK23G.js} +9 -9
- package/dist/{cli-MWUFAS2X.js → cli-LRKBCQRS.js} +9 -9
- package/dist/{cli-7JV4RM66.js → cli-NJC3H3CW.js} +15 -15
- package/dist/{cli-B4DTJ2KC.js → cli-OHKWCJIJ.js} +21 -21
- package/dist/{cli-EVACAD7K.js → cli-RKYIZ6KU.js} +634 -36
- package/dist/cli-RKYIZ6KU.js.map +1 -0
- package/dist/cli-TJDQ5GUW.js +379 -0
- package/dist/cli-TJDQ5GUW.js.map +1 -0
- package/dist/{cli-D4WXCDTS.js → cli-VC3BXCVR.js} +19 -19
- package/dist/cli.js +14 -14
- package/dist/docmeta.js +8 -8
- package/dist/{github-DV57TW5L.js → github-6PV2JTZ7.js} +13 -14
- package/dist/github-7ZT4KYQU.js +35 -0
- package/dist/graph/runtime.d.ts +633 -217
- package/dist/graph/runtime.js +1001 -370
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +2617 -1945
- package/dist/index.js +108 -64
- package/dist/index.js.map +1 -1
- package/dist/{json-SHPUCD64.js → json-VWXLDTXR.js} +13 -14
- package/dist/{labels-3GCGYYV3.js → labels-ZJK27RL3.js} +12 -13
- package/dist/{labels-3GCGYYV3.js.map → labels-ZJK27RL3.js.map} +1 -1
- package/dist/{lint-RE4DMI6E.js → lint-5OERIERT.js} +13 -13
- package/dist/{list-ZR3KY556.js → list-MANBRF7Z.js} +13 -14
- package/dist/{list-F56MEJXR.js → list-SEEANTU6.js} +15 -15
- package/dist/{page-G7XSO4FD.js → page-O4M65KMJ.js} +13 -14
- package/dist/{prepare-WHMWP7BG.js → prepare-3WULLZER.js} +13 -13
- package/dist/{pretty-VTJVXWRK.js → pretty-5FRBLTXU.js} +13 -14
- package/dist/{pretty-YVRRWBWN.js → pretty-D3M366JD.js} +14 -15
- package/dist/{reporters-G5R4SURQ.js → reporters-4WWZRHKI.js} +4 -4
- package/dist/{reporters-FSXJ42EB.js → reporters-6TEJDXXO.js} +4 -4
- package/dist/{reporters-MHPY4HRA.js → reporters-GDCZ5P7C.js} +12 -12
- package/dist/{run-FSYOYEPR.js → run-TZDLG6EN.js} +16 -16
- package/dist/sarif-PUZAMEFQ.js +36 -0
- package/dist/{sarif-HBQIDY7T.js → sarif-SSSPOUCK.js} +11 -11
- package/dist/site/rehype.d.ts +33 -0
- package/dist/site/rehype.js +49 -0
- package/dist/site/rehype.js.map +1 -0
- package/dist/{term-ABHGACYE.js → term-DHWMUL5N.js} +18 -19
- package/dist/{term-ABHGACYE.js.map → term-DHWMUL5N.js.map} +1 -1
- package/dist/{types-VMOT7RAL.js → types-7N7ETP3W.js} +2 -2
- package/dist/{validate-DXYUUGUD.js → validate-4AW7KIIY.js} +5 -5
- package/package.json +10 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/shapes/graph/shapes-1.2.0.ttl +1161 -0
- package/dist/check-MR7IG7IP.js +0 -36
- package/dist/chunk-3CSEHHKB.js.map +0 -1
- package/dist/chunk-476DMDJ5.js.map +0 -1
- package/dist/chunk-4MYW2D2U.js.map +0 -1
- package/dist/chunk-C37OVJ35.js.map +0 -1
- package/dist/chunk-GZHBMMDC.js.map +0 -1
- package/dist/chunk-IE5PXI6M.js.map +0 -1
- package/dist/chunk-IKEWBMCN.js +0 -98
- package/dist/chunk-IKEWBMCN.js.map +0 -1
- package/dist/chunk-NIQ2JSZO.js.map +0 -1
- package/dist/chunk-OFOIBV5J.js.map +0 -1
- package/dist/chunk-Q2VOXKAQ.js.map +0 -1
- package/dist/chunk-T62SFCQY.js.map +0 -1
- package/dist/chunk-UPUJJOKB.js +0 -236
- package/dist/chunk-UPUJJOKB.js.map +0 -1
- package/dist/chunk-UVLQRP6O.js.map +0 -1
- package/dist/chunk-WDENIUC7.js.map +0 -1
- package/dist/chunk-YUTVAMWW.js +0 -2
- package/dist/chunk-ZC2MZZR5.js.map +0 -1
- package/dist/cli-33E3B2FK.js.map +0 -1
- package/dist/cli-EVACAD7K.js.map +0 -1
- package/dist/github-SGX2EARO.js +0 -36
- package/dist/sarif-RRUFJZUL.js +0 -37
- /package/dist/{batch-OMDKRGUE.js.map → batch-SAW4E46C.js.map} +0 -0
- /package/dist/{build-YCY5MUHA.js.map → build-F6S3W77I.js.map} +0 -0
- /package/dist/{calibrate-RN2NJ4FS.js.map → calibrate-3DW2VV7F.js.map} +0 -0
- /package/dist/{capture-2WYROZKA.js.map → capture-PKEYY2VO.js.map} +0 -0
- /package/dist/{check-LVUTWAGR.js.map → check-7PUIHLFM.js.map} +0 -0
- /package/dist/{check-KRVWHF7E.js.map → check-EZN7YNVF.js.map} +0 -0
- /package/dist/{check-MR7IG7IP.js.map → check-LRX2YFDF.js.map} +0 -0
- /package/dist/{check-OIRJ6OBW.js.map → check-NW7GHSX6.js.map} +0 -0
- /package/dist/{chunk-KN37BXVY.js.map → chunk-2A5OIZHT.js.map} +0 -0
- /package/dist/{chunk-KCXQXKOL.js.map → chunk-2LCJNH73.js.map} +0 -0
- /package/dist/{chunk-AL4HRKSZ.js.map → chunk-3446DW4W.js.map} +0 -0
- /package/dist/{chunk-RGRNAQG5.js.map → chunk-5QOTR53S.js.map} +0 -0
- /package/dist/{chunk-7EKXSSEO.js.map → chunk-64EDFJ5S.js.map} +0 -0
- /package/dist/{chunk-FEEO7ET6.js.map → chunk-ABAFKOQF.js.map} +0 -0
- /package/dist/{chunk-6DYFWAZA.js.map → chunk-D3AO2PMV.js.map} +0 -0
- /package/dist/{chunk-57DHX65T.js.map → chunk-DSJTYRI5.js.map} +0 -0
- /package/dist/{chunk-FYWQS35G.js.map → chunk-FEURGKJC.js.map} +0 -0
- /package/dist/{chunk-46OWIAAX.js.map → chunk-FPPHEHPZ.js.map} +0 -0
- /package/dist/{chunk-MAOX3524.js.map → chunk-KB4MNUKC.js.map} +0 -0
- /package/dist/{chunk-Z6PZKXSP.js.map → chunk-KCNBM42T.js.map} +0 -0
- /package/dist/{chunk-7SVFBJBE.js.map → chunk-LDIUA4ZG.js.map} +0 -0
- /package/dist/{chunk-DN4LCWSA.js.map → chunk-M6DNOHJO.js.map} +0 -0
- /package/dist/{chunk-TXZJESES.js.map → chunk-MBLVLQWI.js.map} +0 -0
- /package/dist/{chunk-3EJVJDMX.js.map → chunk-MDXDTO7E.js.map} +0 -0
- /package/dist/{chunk-IGRXQC3H.js.map → chunk-N25KDXOV.js.map} +0 -0
- /package/dist/{chunk-DW22KCLN.js.map → chunk-NPZWOPOH.js.map} +0 -0
- /package/dist/{chunk-Q62Q7CDI.js.map → chunk-PS4Y7EPP.js.map} +0 -0
- /package/dist/{chunk-GUTAKJIF.js.map → chunk-QIKCIREY.js.map} +0 -0
- /package/dist/{chunk-Y3GWQBJP.js.map → chunk-QIWSEKA6.js.map} +0 -0
- /package/dist/{chunk-SVF3WCC7.js.map → chunk-TNYIXIYV.js.map} +0 -0
- /package/dist/{chunk-SLGCRXHM.js.map → chunk-TUMR35B3.js.map} +0 -0
- /package/dist/{chunk-7XHW5DZA.js.map → chunk-U5NSIZRS.js.map} +0 -0
- /package/dist/{chunk-YUTVAMWW.js.map → chunk-UP6NBQ62.js.map} +0 -0
- /package/dist/{chunk-QEJ4GH25.js.map → chunk-VRMQSP7O.js.map} +0 -0
- /package/dist/{chunk-URGALOZY.js.map → chunk-W7IEP7IG.js.map} +0 -0
- /package/dist/{chunk-JHE3CYWS.js.map → chunk-W7XOMNYC.js.map} +0 -0
- /package/dist/{chunk-JULE3EU3.js.map → chunk-WP5EKWTU.js.map} +0 -0
- /package/dist/{chunk-JQPZKWIP.js.map → chunk-WZSL7KF2.js.map} +0 -0
- /package/dist/{chunk-525KMBZS.js.map → chunk-XCEEJEVA.js.map} +0 -0
- /package/dist/{chunk-3WQMMLIO.js.map → chunk-XPGK4ECA.js.map} +0 -0
- /package/dist/{chunk-QDO5JFFV.js.map → chunk-XRWQQHBR.js.map} +0 -0
- /package/dist/{chunk-GLQCSDFS.js.map → chunk-YJHHXM5B.js.map} +0 -0
- /package/dist/{chunk-QS3K57OJ.js.map → chunk-ZEYNLKOH.js.map} +0 -0
- /package/dist/{chunk-YT5HKJWV.js.map → chunk-ZIXU7A4C.js.map} +0 -0
- /package/dist/{cli-QEPVGLQ3.js.map → cli-D5WYQVUF.js.map} +0 -0
- /package/dist/{cli-OKPRTVG6.js.map → cli-FCGGNZ5C.js.map} +0 -0
- /package/dist/{cli-LIKI7WPR.js.map → cli-FNX4LXMI.js.map} +0 -0
- /package/dist/{cli-VP6JTPFS.js.map → cli-LQRHK23G.js.map} +0 -0
- /package/dist/{cli-MWUFAS2X.js.map → cli-LRKBCQRS.js.map} +0 -0
- /package/dist/{cli-7JV4RM66.js.map → cli-NJC3H3CW.js.map} +0 -0
- /package/dist/{cli-B4DTJ2KC.js.map → cli-OHKWCJIJ.js.map} +0 -0
- /package/dist/{cli-D4WXCDTS.js.map → cli-VC3BXCVR.js.map} +0 -0
- /package/dist/{github-DV57TW5L.js.map → github-6PV2JTZ7.js.map} +0 -0
- /package/dist/{github-SGX2EARO.js.map → github-7ZT4KYQU.js.map} +0 -0
- /package/dist/{json-SHPUCD64.js.map → json-VWXLDTXR.js.map} +0 -0
- /package/dist/{lint-RE4DMI6E.js.map → lint-5OERIERT.js.map} +0 -0
- /package/dist/{list-F56MEJXR.js.map → list-MANBRF7Z.js.map} +0 -0
- /package/dist/{list-ZR3KY556.js.map → list-SEEANTU6.js.map} +0 -0
- /package/dist/{page-G7XSO4FD.js.map → page-O4M65KMJ.js.map} +0 -0
- /package/dist/{prepare-WHMWP7BG.js.map → prepare-3WULLZER.js.map} +0 -0
- /package/dist/{pretty-VTJVXWRK.js.map → pretty-5FRBLTXU.js.map} +0 -0
- /package/dist/{pretty-YVRRWBWN.js.map → pretty-D3M366JD.js.map} +0 -0
- /package/dist/{reporters-FSXJ42EB.js.map → reporters-4WWZRHKI.js.map} +0 -0
- /package/dist/{reporters-G5R4SURQ.js.map → reporters-6TEJDXXO.js.map} +0 -0
- /package/dist/{reporters-MHPY4HRA.js.map → reporters-GDCZ5P7C.js.map} +0 -0
- /package/dist/{run-FSYOYEPR.js.map → run-TZDLG6EN.js.map} +0 -0
- /package/dist/{sarif-HBQIDY7T.js.map → sarif-PUZAMEFQ.js.map} +0 -0
- /package/dist/{sarif-RRUFJZUL.js.map → sarif-SSSPOUCK.js.map} +0 -0
- /package/dist/{types-VMOT7RAL.js.map → types-7N7ETP3W.js.map} +0 -0
- /package/dist/{validate-DXYUUGUD.js.map → validate-4AW7KIIY.js.map} +0 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ANNOTATE_FORMATS,
|
|
4
|
+
renderAnnotate,
|
|
5
|
+
runAnnotate
|
|
6
|
+
} from "./chunk-WRSWZEVU.js";
|
|
7
|
+
import {
|
|
8
|
+
SiteError,
|
|
9
|
+
resolvePlan
|
|
10
|
+
} from "./chunk-245W2Q7C.js";
|
|
11
|
+
import "./chunk-HEVYEI6O.js";
|
|
12
|
+
import "./chunk-4GGADKTU.js";
|
|
13
|
+
import {
|
|
14
|
+
launcherCommandLine
|
|
15
|
+
} from "./chunk-ZMECS2IJ.js";
|
|
16
|
+
import "./chunk-3446DW4W.js";
|
|
17
|
+
import "./chunk-TKINOTVS.js";
|
|
18
|
+
import "./chunk-UP6NBQ62.js";
|
|
19
|
+
import "./chunk-M6DNOHJO.js";
|
|
20
|
+
import "./chunk-DSJTYRI5.js";
|
|
21
|
+
import "./chunk-DU6CXY5R.js";
|
|
22
|
+
import "./chunk-KB4MNUKC.js";
|
|
23
|
+
import "./chunk-WBXVQW57.js";
|
|
24
|
+
import "./chunk-XWUIFSWK.js";
|
|
25
|
+
import "./chunk-AIZBZYQM.js";
|
|
26
|
+
import "./chunk-DSWKBZWW.js";
|
|
27
|
+
import "./chunk-FAS3SRQB.js";
|
|
28
|
+
import "./chunk-QK6VYJHV.js";
|
|
29
|
+
import "./chunk-RNVYGWIC.js";
|
|
30
|
+
import {
|
|
31
|
+
fail
|
|
32
|
+
} from "./chunk-YEUYKR62.js";
|
|
33
|
+
import "./chunk-B2242FYO.js";
|
|
34
|
+
import {
|
|
35
|
+
notice
|
|
36
|
+
} from "./chunk-HX44GB4Z.js";
|
|
37
|
+
import "./chunk-VM7VAFJW.js";
|
|
38
|
+
import {
|
|
39
|
+
package_default
|
|
40
|
+
} from "./chunk-IGE6CIKZ.js";
|
|
41
|
+
import "./chunk-OWBRDNRZ.js";
|
|
42
|
+
import {
|
|
43
|
+
errorMessage
|
|
44
|
+
} from "./chunk-G3T47CFV.js";
|
|
45
|
+
import "./chunk-2H7UOFLK.js";
|
|
46
|
+
|
|
47
|
+
// src/site/cli.ts
|
|
48
|
+
import { Command } from "commander";
|
|
49
|
+
|
|
50
|
+
// src/site/core/run.ts
|
|
51
|
+
import { spawn } from "node:child_process";
|
|
52
|
+
import { accessSync, constants, statSync } from "node:fs";
|
|
53
|
+
import { delimiter, resolve as resolve2 } from "node:path";
|
|
54
|
+
|
|
55
|
+
// src/site/core/static-server.ts
|
|
56
|
+
import { createReadStream } from "node:fs";
|
|
57
|
+
import { stat } from "node:fs/promises";
|
|
58
|
+
import { createServer } from "node:http";
|
|
59
|
+
import { extname, join, relative, resolve, sep } from "node:path";
|
|
60
|
+
var MIME = {
|
|
61
|
+
".html": "text/html; charset=utf-8",
|
|
62
|
+
".css": "text/css; charset=utf-8",
|
|
63
|
+
".js": "text/javascript; charset=utf-8",
|
|
64
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
65
|
+
".json": "application/json; charset=utf-8",
|
|
66
|
+
".map": "application/json; charset=utf-8",
|
|
67
|
+
".txt": "text/plain; charset=utf-8",
|
|
68
|
+
".xml": "application/xml; charset=utf-8",
|
|
69
|
+
".svg": "image/svg+xml",
|
|
70
|
+
".png": "image/png",
|
|
71
|
+
".jpg": "image/jpeg",
|
|
72
|
+
".jpeg": "image/jpeg",
|
|
73
|
+
".gif": "image/gif",
|
|
74
|
+
".webp": "image/webp",
|
|
75
|
+
".avif": "image/avif",
|
|
76
|
+
".ico": "image/x-icon",
|
|
77
|
+
".woff": "font/woff",
|
|
78
|
+
".woff2": "font/woff2",
|
|
79
|
+
".ttf": "font/ttf",
|
|
80
|
+
".wasm": "application/wasm",
|
|
81
|
+
".pdf": "application/pdf",
|
|
82
|
+
".webmanifest": "application/manifest+json"
|
|
83
|
+
};
|
|
84
|
+
function normalizeBase(base) {
|
|
85
|
+
const trimmed = base.replace(/^\/+|\/+$/g, "");
|
|
86
|
+
return trimmed === "" ? "/" : `/${trimmed}/`;
|
|
87
|
+
}
|
|
88
|
+
async function kindOf(path) {
|
|
89
|
+
try {
|
|
90
|
+
const s = await stat(path);
|
|
91
|
+
if (s.isDirectory()) return "dir";
|
|
92
|
+
return s.isFile() ? "file" : void 0;
|
|
93
|
+
} catch {
|
|
94
|
+
return void 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function sendFile(req, res, path, status = 200) {
|
|
98
|
+
res.writeHead(status, {
|
|
99
|
+
"content-type": MIME[extname(path).toLowerCase()] ?? "application/octet-stream"
|
|
100
|
+
});
|
|
101
|
+
if (req.method === "HEAD") {
|
|
102
|
+
res.end();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
createReadStream(path).on("error", () => res.destroy()).pipe(res);
|
|
106
|
+
}
|
|
107
|
+
function redirect(res, status, location) {
|
|
108
|
+
res.writeHead(status, { location });
|
|
109
|
+
res.end();
|
|
110
|
+
}
|
|
111
|
+
function inside(root, rest) {
|
|
112
|
+
let decoded;
|
|
113
|
+
try {
|
|
114
|
+
decoded = decodeURIComponent(rest);
|
|
115
|
+
} catch {
|
|
116
|
+
return void 0;
|
|
117
|
+
}
|
|
118
|
+
if (decoded.includes("\0") || decoded.split(/[\\/]/).includes("..")) return void 0;
|
|
119
|
+
const path = resolve(root, `.${sep}${decoded}`);
|
|
120
|
+
return path === root || path.startsWith(root + sep) ? path : void 0;
|
|
121
|
+
}
|
|
122
|
+
function handler(root, base) {
|
|
123
|
+
const notFound = join(root, "404.html");
|
|
124
|
+
return async (req, res) => {
|
|
125
|
+
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
126
|
+
res.writeHead(405, { allow: "GET, HEAD" });
|
|
127
|
+
res.end();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const url = new URL(req.url ?? "/", "http://localhost");
|
|
131
|
+
const { pathname } = url;
|
|
132
|
+
if (base !== "/" && (pathname === "/" || pathname === base.slice(0, -1))) {
|
|
133
|
+
redirect(res, pathname === "/" ? 302 : 301, `${base}${url.search}`);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const path = pathname.startsWith(base) ? inside(root, pathname.slice(base.length)) : void 0;
|
|
137
|
+
const kind = path === void 0 ? void 0 : await kindOf(path);
|
|
138
|
+
if (path !== void 0 && kind === "dir" && !pathname.endsWith("/")) {
|
|
139
|
+
redirect(res, 301, `${pathname}/${url.search}`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const file = path !== void 0 && kind === "dir" ? join(path, "index.html") : path;
|
|
143
|
+
if (file !== void 0 && await kindOf(file) === "file") {
|
|
144
|
+
sendFile(req, res, file);
|
|
145
|
+
} else if (await kindOf(notFound) === "file") {
|
|
146
|
+
sendFile(req, res, notFound, 404);
|
|
147
|
+
} else {
|
|
148
|
+
res.writeHead(404, { "content-type": "text/plain; charset=utf-8" });
|
|
149
|
+
res.end("Not found\n");
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function urlOf(host, port, base) {
|
|
154
|
+
const shown = host.includes(":") ? `[${host}]` : host;
|
|
155
|
+
return `http://${shown}:${String(port)}${base}`;
|
|
156
|
+
}
|
|
157
|
+
async function startStaticServer(opts) {
|
|
158
|
+
const root = resolve(opts.root);
|
|
159
|
+
if (await kindOf(root) !== "dir") {
|
|
160
|
+
const shown = relative(process.cwd(), root).split(sep).join("/") || ".";
|
|
161
|
+
throw new SiteError(`${shown}/ does not exist.`);
|
|
162
|
+
}
|
|
163
|
+
const base = normalizeBase(opts.base);
|
|
164
|
+
const handle = handler(root, base);
|
|
165
|
+
const server = createServer((req, res) => {
|
|
166
|
+
handle(req, res).catch(() => res.destroy());
|
|
167
|
+
});
|
|
168
|
+
await new Promise((settle, reject) => {
|
|
169
|
+
server.once("error", (err) => {
|
|
170
|
+
reject(
|
|
171
|
+
new SiteError(
|
|
172
|
+
err.code === "EADDRINUSE" ? `port ${String(opts.port)} is in use. Pass --port, or stop the process holding it.` : `cannot listen on ${urlOf(opts.host, opts.port, "")}: ${errorMessage(err)}`
|
|
173
|
+
)
|
|
174
|
+
);
|
|
175
|
+
});
|
|
176
|
+
server.listen(opts.port, opts.host, settle);
|
|
177
|
+
});
|
|
178
|
+
const { port } = server.address();
|
|
179
|
+
process.stdout.write(`${urlOf(opts.host, port, base)}
|
|
180
|
+
`);
|
|
181
|
+
return server;
|
|
182
|
+
}
|
|
183
|
+
async function serveStatic(opts) {
|
|
184
|
+
const server = await startStaticServer(opts);
|
|
185
|
+
await new Promise((settle) => {
|
|
186
|
+
const stop = () => {
|
|
187
|
+
process.off("SIGINT", stop);
|
|
188
|
+
process.off("SIGTERM", stop);
|
|
189
|
+
server.close(() => {
|
|
190
|
+
settle();
|
|
191
|
+
});
|
|
192
|
+
server.closeAllConnections();
|
|
193
|
+
};
|
|
194
|
+
process.on("SIGINT", stop);
|
|
195
|
+
process.on("SIGTERM", stop);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// src/site/core/run.ts
|
|
200
|
+
function isExecutable(path) {
|
|
201
|
+
try {
|
|
202
|
+
if (!statSync(path).isFile()) return false;
|
|
203
|
+
if (process.platform !== "win32") accessSync(path, constants.X_OK);
|
|
204
|
+
return true;
|
|
205
|
+
} catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function findOnPath(name, cwd) {
|
|
210
|
+
const win = process.platform === "win32";
|
|
211
|
+
const exts = win ? (process.env["PATHEXT"] ?? ".COM;.EXE;.BAT;.CMD").split(";").filter((e) => e !== "") : [];
|
|
212
|
+
const lower = name.toLowerCase();
|
|
213
|
+
const names = win && !exts.some((e) => lower.endsWith(e.toLowerCase())) ? exts.map((e) => name + e) : [name];
|
|
214
|
+
const dirs = /[\\/]/.test(name) ? [cwd] : (process.env["PATH"] ?? "").split(delimiter).filter((d) => d !== "");
|
|
215
|
+
for (const dir of dirs) {
|
|
216
|
+
for (const candidate of names) {
|
|
217
|
+
const path = resolve2(dir, candidate);
|
|
218
|
+
if (isExecutable(path)) return path;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return void 0;
|
|
222
|
+
}
|
|
223
|
+
function startExec(planned, step) {
|
|
224
|
+
const [name, ...args] = step.argv;
|
|
225
|
+
const binary = name === void 0 ? void 0 : findOnPath(name, step.cwd);
|
|
226
|
+
if (binary === void 0) throw new SiteError(planned.notFound);
|
|
227
|
+
const line = launcherCommandLine(
|
|
228
|
+
binary,
|
|
229
|
+
args,
|
|
230
|
+
(value) => new SiteError(`${planned.display} cannot be given an argument containing a quote: ${value}`)
|
|
231
|
+
);
|
|
232
|
+
return spawn(line.command, line.argv, {
|
|
233
|
+
cwd: step.cwd,
|
|
234
|
+
stdio: "inherit",
|
|
235
|
+
windowsVerbatimArguments: line.verbatim
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
function exitOf(planned, child) {
|
|
239
|
+
return new Promise((settle, reject) => {
|
|
240
|
+
child.once("error", (err) => {
|
|
241
|
+
reject(
|
|
242
|
+
err.code === "ENOENT" ? new SiteError(planned.notFound) : new SiteError(`${planned.display} could not start: ${err.message}`)
|
|
243
|
+
);
|
|
244
|
+
});
|
|
245
|
+
child.once("exit", (code, signal) => {
|
|
246
|
+
settle({ code, signal });
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
async function runStep(planned) {
|
|
251
|
+
const { step } = planned;
|
|
252
|
+
if (step.kind === "static") {
|
|
253
|
+
await serveStatic(step);
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
if (step.kind === "annotate") {
|
|
257
|
+
const { cwd, dir, configPath } = step;
|
|
258
|
+
const report = runAnnotate({ cwd, dir, ...configPath === void 0 ? {} : { configPath } });
|
|
259
|
+
process.stdout.write(`${renderAnnotate(report, "pretty")}
|
|
260
|
+
`);
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
const child = step.kind === "exec" ? startExec(planned, step) : spawn(step.command, { cwd: step.cwd, stdio: "inherit", shell: true });
|
|
264
|
+
const signal = { received: false };
|
|
265
|
+
const onInt = () => {
|
|
266
|
+
signal.received = true;
|
|
267
|
+
};
|
|
268
|
+
const onTerm = () => {
|
|
269
|
+
signal.received = true;
|
|
270
|
+
child.kill("SIGTERM");
|
|
271
|
+
};
|
|
272
|
+
process.on("SIGINT", onInt);
|
|
273
|
+
process.on("SIGTERM", onTerm);
|
|
274
|
+
try {
|
|
275
|
+
const exit = await exitOf(planned, child);
|
|
276
|
+
if (signal.received) return true;
|
|
277
|
+
if (exit.code === 0) return false;
|
|
278
|
+
throw new SiteError(
|
|
279
|
+
exit.code === null ? `${planned.display} was stopped by ${String(exit.signal)}.` : `${planned.display} exited with code ${String(exit.code)}.`
|
|
280
|
+
);
|
|
281
|
+
} finally {
|
|
282
|
+
process.off("SIGINT", onInt);
|
|
283
|
+
process.off("SIGTERM", onTerm);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
async function runPlan(plan) {
|
|
287
|
+
for (const planned of plan.steps) {
|
|
288
|
+
if (planned.announce !== "") notice(planned.announce);
|
|
289
|
+
if (await runStep(planned)) break;
|
|
290
|
+
}
|
|
291
|
+
return 0;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// src/site/commands/run.ts
|
|
295
|
+
async function runSite(verb, opts) {
|
|
296
|
+
return runPlan(resolvePlan(verb, opts));
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// src/site/cli.ts
|
|
300
|
+
var isAnnotateFormat = (value) => ANNOTATE_FORMATS.includes(value);
|
|
301
|
+
function splitOperands(args) {
|
|
302
|
+
const at = process.argv.indexOf("--");
|
|
303
|
+
const tail = at === -1 ? [] : process.argv.slice(at + 1);
|
|
304
|
+
const start = args.length - tail.length;
|
|
305
|
+
const passthrough = start >= 0 && tail.every((arg, i) => args[start + i] === arg) ? tail : [];
|
|
306
|
+
const before = args.slice(0, args.length - passthrough.length);
|
|
307
|
+
return { dir: before[0], passthrough, extra: before.length };
|
|
308
|
+
}
|
|
309
|
+
function buildProgram() {
|
|
310
|
+
const program = new Command();
|
|
311
|
+
program.name("site").description("Start, build and preview the docs site").version(package_default.version, "-V, --version").showHelpAfterError("(add --help for usage)").exitOverride();
|
|
312
|
+
const verb = (name, description, serves) => {
|
|
313
|
+
const cmd = program.command(name).description(description).argument("[dir]", "the site's directory (default: site.dir, else found by search)").allowExcessArguments();
|
|
314
|
+
if (serves) {
|
|
315
|
+
cmd.option("--port <n>", "port, an integer from 1 to 65535 (default: a local collection url, else the framework's)").option("--host <host>", "host to bind (default: a local collection url, else the framework's)");
|
|
316
|
+
}
|
|
317
|
+
cmd.option("-c, --config <file>", "path to a manni config file").action(async (_dir, options, self) => {
|
|
318
|
+
const { dir, passthrough, extra } = splitOperands(self.args);
|
|
319
|
+
if (extra > 1) {
|
|
320
|
+
self.error(
|
|
321
|
+
`error: too many arguments for '${name}'. Expected 1 argument but got ${String(extra)}.`,
|
|
322
|
+
{ code: "commander.excessArguments" }
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
try {
|
|
326
|
+
process.exitCode = await runSite(name, {
|
|
327
|
+
cwd: process.cwd(),
|
|
328
|
+
dir,
|
|
329
|
+
configPath: options.config,
|
|
330
|
+
port: options.port,
|
|
331
|
+
host: options.host,
|
|
332
|
+
passthrough
|
|
333
|
+
});
|
|
334
|
+
} catch (err) {
|
|
335
|
+
fail(err);
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
verb("start", "Run the docs framework's dev server", true);
|
|
340
|
+
verb("build", "Build the docs site", false);
|
|
341
|
+
verb("preview", "Build the docs site, then serve the output", true);
|
|
342
|
+
program.command("annotate").description("Join the graph's pins and statements to the built site, as data attributes").argument("[dir]", "the site's directory (default: site.dir, else found by search)").option("--out <dir>", "the built site to annotate (default: site.out, else the framework's output)").option("--chunks <file>", "the chunk manifest graph publish writes (default: chunks.json beside graph.out)").option("-f, --format <format>", `output: ${ANNOTATE_FORMATS.join(" | ")}`, "pretty").option("-c, --config <file>", "path to a manni config file").action((dir, options) => {
|
|
343
|
+
try {
|
|
344
|
+
const format = options.format;
|
|
345
|
+
if (!isAnnotateFormat(format)) {
|
|
346
|
+
throw new SiteError(`Unknown --format "${format}". Use ${ANNOTATE_FORMATS.join(" or ")}.`);
|
|
347
|
+
}
|
|
348
|
+
const report = runAnnotate({
|
|
349
|
+
cwd: process.cwd(),
|
|
350
|
+
...dir === void 0 ? {} : { dir },
|
|
351
|
+
...options.config === void 0 ? {} : { configPath: options.config },
|
|
352
|
+
...options.out === void 0 ? {} : { out: options.out },
|
|
353
|
+
...options.chunks === void 0 ? {} : { chunks: options.chunks }
|
|
354
|
+
});
|
|
355
|
+
process.stdout.write(`${renderAnnotate(report, format)}
|
|
356
|
+
`);
|
|
357
|
+
process.exitCode = 0;
|
|
358
|
+
} catch (err) {
|
|
359
|
+
fail(err);
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
program.addHelpText(
|
|
363
|
+
"after",
|
|
364
|
+
[
|
|
365
|
+
"",
|
|
366
|
+
"Examples:",
|
|
367
|
+
" manni site start # detect the framework, run its dev server",
|
|
368
|
+
" manni site build",
|
|
369
|
+
" manni site preview --port 4000 # build, then serve the output",
|
|
370
|
+
" manni site start website -- --open # arguments after -- go to the framework",
|
|
371
|
+
" manni site annotate # join the graph's pins to the built site"
|
|
372
|
+
].join("\n")
|
|
373
|
+
);
|
|
374
|
+
return program;
|
|
375
|
+
}
|
|
376
|
+
export {
|
|
377
|
+
buildProgram
|
|
378
|
+
};
|
|
379
|
+
//# sourceMappingURL=cli-TJDQ5GUW.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 { accessSync, constants, statSync } from \"node:fs\";\nimport { delimiter, resolve } from \"node:path\";\nimport { launcherCommandLine } from \"../../shared/batch-launcher.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 isExecutable(path: string): boolean {\n try {\n if (!statSync(path).isFile()) return false;\n if (process.platform !== \"win32\") accessSync(path, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Where `name` resolves, the way the OS would find it: a name with a separator\n * against `cwd`, a bare one along PATH. On Windows a name without one of\n * PATHEXT's extensions is tried with each in turn, so `npm` finds `npm.cmd`.\n */\nfunction findOnPath(name: string, cwd: string): string | undefined {\n const win = process.platform === \"win32\";\n const exts = win\n ? (process.env[\"PATHEXT\"] ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((e) => e !== \"\")\n : [];\n const lower = name.toLowerCase();\n const names =\n win && !exts.some((e) => lower.endsWith(e.toLowerCase())) ? exts.map((e) => name + e) : [name];\n const dirs = /[\\\\/]/.test(name)\n ? [cwd]\n : (process.env[\"PATH\"] ?? \"\").split(delimiter).filter((d) => d !== \"\");\n for (const dir of dirs) {\n for (const candidate of names) {\n const path = resolve(dir, candidate);\n if (isExecutable(path)) return path;\n }\n }\n return undefined;\n}\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). It serves a\n * build output directory, mounted at the collection `url:` path, until the\n * 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 \".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 const file = path !== undefined && kind === \"dir\" ? join(path, \"index.html\") : path;\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;AACzC,SAAS,YAAY,WAAW,gBAAgB;AAChD,SAAS,WAAW,WAAAA,gBAAe;;;ACDnC,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,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,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./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-B5R5BWMY.js";
|
|
7
|
+
import "./chunk-OZL5M764.js";
|
|
8
|
+
import "./chunk-ZIXU7A4C.js";
|
|
9
|
+
import "./chunk-D3AO2PMV.js";
|
|
9
10
|
import "./chunk-5D24C6WM.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-MAOX3524.js";
|
|
11
|
+
import "./chunk-VRMQSP7O.js";
|
|
12
|
+
import "./chunk-PS4Y7EPP.js";
|
|
13
|
+
import "./chunk-5VNFO2RT.js";
|
|
14
|
+
import "./chunk-3UYSONT4.js";
|
|
15
|
+
import "./chunk-UP6NBQ62.js";
|
|
16
|
+
import "./chunk-M6DNOHJO.js";
|
|
17
|
+
import "./chunk-DSJTYRI5.js";
|
|
18
|
+
import "./chunk-DU6CXY5R.js";
|
|
19
|
+
import "./chunk-KB4MNUKC.js";
|
|
20
20
|
import {
|
|
21
21
|
COMMON_FORMAT_LIST
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-WBXVQW57.js";
|
|
23
|
+
import "./chunk-XWUIFSWK.js";
|
|
24
24
|
import {
|
|
25
25
|
collect,
|
|
26
26
|
explicitFalse,
|
|
27
27
|
splitList
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AIZBZYQM.js";
|
|
29
29
|
import "./chunk-DSWKBZWW.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-FAS3SRQB.js";
|
|
31
31
|
import "./chunk-77AINBYM.js";
|
|
32
32
|
import "./chunk-QK6VYJHV.js";
|
|
33
33
|
import {
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import "./chunk-VM7VAFJW.js";
|
|
45
45
|
import {
|
|
46
46
|
package_default
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-IGE6CIKZ.js";
|
|
48
48
|
import "./chunk-OWBRDNRZ.js";
|
|
49
49
|
import "./chunk-G3T47CFV.js";
|
|
50
50
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -233,4 +233,4 @@ function buildProgram() {
|
|
|
233
233
|
export {
|
|
234
234
|
buildProgram
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=cli-
|
|
236
|
+
//# sourceMappingURL=cli-VC3BXCVR.js.map
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-YEUYKR62.js";
|
|
8
8
|
import {
|
|
9
9
|
package_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGE6CIKZ.js";
|
|
11
11
|
import "./chunk-OWBRDNRZ.js";
|
|
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-ZJK27RL3.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-LRKBCQRS.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-FCGGNZ5C.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-5ZQXVWWC.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-NJC3H3CW.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-D5WYQVUF.js")).buildProgram().name("docevals").description(
|
|
57
57
|
"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter"
|
|
58
58
|
)
|
|
59
59
|
]
|
|
@@ -61,19 +61,19 @@ var DOMAINS = [
|
|
|
61
61
|
{
|
|
62
62
|
names: ["term"],
|
|
63
63
|
load: async () => [
|
|
64
|
-
(await import("./term-
|
|
64
|
+
(await import("./term-DHWMUL5N.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: ["test"],
|
|
69
69
|
load: async () => [
|
|
70
|
-
(await import("./cli-
|
|
70
|
+
(await import("./cli-LQRHK23G.js")).buildProgram().name("test").description("Run the docs' procedure tests with Doc Detective and report in the family contract")
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
names: ["graph"],
|
|
75
75
|
load: async () => [
|
|
76
|
-
(await import("./cli-
|
|
76
|
+
(await import("./cli-RKYIZ6KU.js")).buildProgram().name("graph").description(
|
|
77
77
|
"Deterministic knowledge graphs derived from documentation frontmatter and formatting"
|
|
78
78
|
)
|
|
79
79
|
]
|
|
@@ -81,7 +81,7 @@ var DOMAINS = [
|
|
|
81
81
|
{
|
|
82
82
|
names: ["tracevals"],
|
|
83
83
|
load: async () => [
|
|
84
|
-
(await import("./cli-
|
|
84
|
+
(await import("./cli-OHKWCJIJ.js")).buildProgram().name("tracevals").description(
|
|
85
85
|
"Deterministic and LLM-as-judge adherence evals for AI agent session traces"
|
|
86
86
|
)
|
|
87
87
|
]
|
|
@@ -90,14 +90,14 @@ var DOMAINS = [
|
|
|
90
90
|
{
|
|
91
91
|
names: ["key"],
|
|
92
92
|
load: async () => [
|
|
93
|
-
(await import("./cli-
|
|
93
|
+
(await import("./cli-VC3BXCVR.js")).buildProgram().name("key").description("Set and rotate the family key that encrypted values are encrypted with.")
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
96
|
// The docs site, a family resource with verbs like `key` (proposal 0082).
|
|
97
97
|
{
|
|
98
98
|
names: ["site"],
|
|
99
99
|
load: async () => [
|
|
100
|
-
(await import("./cli-
|
|
100
|
+
(await import("./cli-TJDQ5GUW.js")).buildProgram().name("site").description("Start, build and preview the docs site")
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
103
|
// The two family verbs (proposal 0078), and the only verbs the umbrella
|
|
@@ -105,7 +105,7 @@ var DOMAINS = [
|
|
|
105
105
|
{
|
|
106
106
|
names: ["check", "status"],
|
|
107
107
|
load: async () => {
|
|
108
|
-
const { buildCheck, buildStatus } = await import("./cli-
|
|
108
|
+
const { buildCheck, buildStatus } = await import("./cli-FNX4LXMI.js");
|
|
109
109
|
return [buildCheck(), buildStatus()];
|
|
110
110
|
}
|
|
111
111
|
}
|
package/dist/docmeta.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
buildProgram
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-2A5OIZHT.js";
|
|
5
|
+
import "./chunk-DU6CXY5R.js";
|
|
6
|
+
import "./chunk-KB4MNUKC.js";
|
|
7
|
+
import "./chunk-WBXVQW57.js";
|
|
8
|
+
import "./chunk-XWUIFSWK.js";
|
|
9
|
+
import "./chunk-AIZBZYQM.js";
|
|
10
10
|
import "./chunk-DSWKBZWW.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-FAS3SRQB.js";
|
|
12
12
|
import "./chunk-QK6VYJHV.js";
|
|
13
13
|
import "./chunk-RNVYGWIC.js";
|
|
14
14
|
import {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import "./chunk-B2242FYO.js";
|
|
18
18
|
import "./chunk-HX44GB4Z.js";
|
|
19
19
|
import "./chunk-VM7VAFJW.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-IGE6CIKZ.js";
|
|
21
21
|
import "./chunk-OWBRDNRZ.js";
|
|
22
22
|
import "./chunk-G3T47CFV.js";
|
|
23
23
|
import "./chunk-2H7UOFLK.js";
|