@hawkeyexl/manni 4.17.1 → 4.18.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 +1 -1
- package/dist/{batch-SAW4E46C.js → batch-XVUPHNWT.js} +13 -13
- package/dist/{build-F6S3W77I.js → build-GU7M5EC6.js} +14 -14
- package/dist/{calibrate-3DW2VV7F.js → calibrate-YODCJAEA.js} +14 -14
- package/dist/{capture-PKEYY2VO.js → capture-TZ42LHNK.js} +13 -13
- package/dist/{check-EZN7YNVF.js → check-AOGJBQR4.js} +15 -13
- package/dist/{check-LRX2YFDF.js → check-I72HPJNA.js} +12 -12
- package/dist/{check-7PUIHLFM.js → check-KBDIV35E.js} +14 -14
- package/dist/check-OIL3CZ4N.js +47 -0
- package/dist/{chunk-XWUIFSWK.js → chunk-2EAUZVO2.js} +3 -3
- package/dist/{chunk-WP5EKWTU.js → chunk-2G42VA4H.js} +5 -5
- package/dist/{chunk-WBXVQW57.js → chunk-34PGSNS5.js} +3 -3
- package/dist/{chunk-M6DNOHJO.js → chunk-3H7M5MXE.js} +3 -3
- package/dist/{chunk-KAWS7H4C.js → chunk-4CMNCP5O.js} +8 -8
- package/dist/{chunk-DU6CXY5R.js → chunk-4VQVJOIK.js} +6 -6
- package/dist/{chunk-OZL5M764.js → chunk-4VR2UFEO.js} +29 -13
- package/dist/chunk-4VR2UFEO.js.map +1 -0
- package/dist/{chunk-LDIUA4ZG.js → chunk-72OTCIYQ.js} +2 -2
- package/dist/{chunk-64EDFJ5S.js → chunk-7JDWLMOT.js} +5 -5
- package/dist/{chunk-ZIXU7A4C.js → chunk-7MU47MZM.js} +168 -80
- package/dist/chunk-7MU47MZM.js.map +1 -0
- package/dist/{chunk-6J2ED4ED.js → chunk-AL46P5H6.js} +6 -6
- package/dist/{chunk-3446DW4W.js → chunk-C4MNHJXP.js} +2 -2
- package/dist/{chunk-AIZBZYQM.js → chunk-CYMA4O2F.js} +77 -75
- package/dist/{chunk-AIZBZYQM.js.map → chunk-CYMA4O2F.js.map} +1 -1
- package/dist/{chunk-2LCJNH73.js → chunk-EEJFXYFO.js} +2 -2
- package/dist/{chunk-KB4MNUKC.js → chunk-ES7PJMHM.js} +2 -2
- package/dist/{chunk-XRWQQHBR.js → chunk-FGGDLZUU.js} +2 -2
- package/dist/{chunk-5D24C6WM.js → chunk-GMOAW2EG.js} +6 -2
- package/dist/chunk-GMOAW2EG.js.map +1 -0
- package/dist/{chunk-DSJTYRI5.js → chunk-GRRSOAAS.js} +3 -3
- package/dist/{chunk-KUXAHHDE.js → chunk-GSLXJSGT.js} +4 -4
- package/dist/{chunk-YJHHXM5B.js → chunk-GWCITMHN.js} +2 -2
- package/dist/{chunk-TNYIXIYV.js → chunk-HH327OEQ.js} +5 -5
- package/dist/{chunk-ZEYNLKOH.js → chunk-HUCZKEDF.js} +4 -4
- package/dist/{chunk-HEVYEI6O.js → chunk-J33NBVBX.js} +2 -2
- package/dist/{chunk-U5NSIZRS.js → chunk-J7MZRF3J.js} +3 -3
- package/dist/{chunk-MDXDTO7E.js → chunk-JBB22HPK.js} +6 -6
- package/dist/{chunk-W7IEP7IG.js → chunk-LFKYNDG4.js} +2 -2
- package/dist/{chunk-W7XOMNYC.js → chunk-MHLCZBW2.js} +2 -2
- package/dist/{chunk-WZSL7KF2.js → chunk-MQG4ONTU.js} +2 -2
- package/dist/{chunk-XPGK4ECA.js → chunk-N4KY3WLM.js} +7 -7
- package/dist/{chunk-ABAFKOQF.js → chunk-N74QH6XJ.js} +3 -3
- package/dist/{chunk-Q7E43SXN.js → chunk-O3PRYQCW.js} +5 -5
- package/dist/{chunk-FEURGKJC.js → chunk-O7OJWMP5.js} +2 -2
- package/dist/{chunk-D3AO2PMV.js → chunk-PJILKN4Z.js} +142 -23
- package/dist/chunk-PJILKN4Z.js.map +1 -0
- package/dist/{chunk-5QOTR53S.js → chunk-PRF44AAC.js} +4 -4
- package/dist/{chunk-VRMQSP7O.js → chunk-PZAHBJ56.js} +3 -3
- package/dist/{chunk-FAS3SRQB.js → chunk-QRQVOEAH.js} +379 -21
- package/dist/chunk-QRQVOEAH.js.map +1 -0
- package/dist/{chunk-QIKCIREY.js → chunk-RBNZI6YG.js} +4 -4
- package/dist/{chunk-XCEEJEVA.js → chunk-S5JFWUNK.js} +4 -4
- package/dist/{chunk-5VNFO2RT.js → chunk-SGV5U4NE.js} +23 -13
- package/dist/chunk-SGV5U4NE.js.map +1 -0
- package/dist/{chunk-B5R5BWMY.js → chunk-SJLEHQKY.js} +32 -11
- package/dist/chunk-SJLEHQKY.js.map +1 -0
- package/dist/{chunk-2TLNAGVJ.js → chunk-T363DMEJ.js} +5 -5
- package/dist/{chunk-FPPHEHPZ.js → chunk-UE6IYEKA.js} +2 -2
- package/dist/{chunk-WRSWZEVU.js → chunk-UT6SVXUQ.js} +5 -5
- package/dist/{chunk-2A5OIZHT.js → chunk-UVUMFFZ6.js} +7 -7
- package/dist/{chunk-4GGADKTU.js → chunk-UXEICZKX.js} +5 -5
- package/dist/{chunk-QIWSEKA6.js → chunk-W5STNXKP.js} +2 -2
- package/dist/{chunk-KCNBM42T.js → chunk-WIHQJSO3.js} +4 -4
- package/dist/{chunk-JK56UPNQ.js → chunk-WMOQXWHB.js} +10 -10
- package/dist/{chunk-PS4Y7EPP.js → chunk-WRWPOXVG.js} +3 -3
- package/dist/{chunk-TUMR35B3.js → chunk-YBWU4JGX.js} +3 -3
- package/dist/{chunk-3UYSONT4.js → chunk-YMDASDGR.js} +20 -10
- package/dist/chunk-YMDASDGR.js.map +1 -0
- package/dist/{chunk-IGE6CIKZ.js → chunk-Z2LHEYK5.js} +2 -2
- package/dist/{chunk-IGE6CIKZ.js.map → chunk-Z2LHEYK5.js.map} +1 -1
- package/dist/{chunk-MBLVLQWI.js → chunk-ZI5JHYPT.js} +2 -2
- package/dist/{cli-VC3BXCVR.js → cli-2JZEYVTI.js} +27 -19
- package/dist/cli-2JZEYVTI.js.map +1 -0
- package/dist/{cli-RKYIZ6KU.js → cli-4P4FWT6C.js} +26 -26
- package/dist/{cli-NJC3H3CW.js → cli-4YURODFH.js} +14 -14
- package/dist/{cli-5ZQXVWWC.js → cli-DK55ACQR.js} +41 -22
- package/dist/cli-DK55ACQR.js.map +1 -0
- package/dist/{cli-LRKBCQRS.js → cli-HGZ7XTDU.js} +9 -9
- package/dist/{cli-LQRHK23G.js → cli-MRH5QXW5.js} +9 -9
- package/dist/{cli-FCGGNZ5C.js → cli-NCJZTOWR.js} +2 -2
- package/dist/{cli-OHKWCJIJ.js → cli-NUP7KAW3.js} +20 -20
- package/dist/{cli-D5WYQVUF.js → cli-OD7SXNLX.js} +14 -14
- package/dist/{cli-TJDQ5GUW.js → cli-TDCMZ7HV.js} +14 -14
- package/dist/{cli-FNX4LXMI.js → cli-WQNWAMDL.js} +35 -35
- package/dist/cli.js +14 -14
- package/dist/docmeta.js +8 -8
- package/dist/{github-7ZT4KYQU.js → github-FX4WWY7N.js} +14 -14
- package/dist/{github-6PV2JTZ7.js → github-TOQ4AJIU.js} +12 -12
- package/dist/index.d.ts +185 -94
- package/dist/index.js +41 -41
- package/dist/{json-VWXLDTXR.js → json-SIPVIBNW.js} +12 -12
- package/dist/{json-5EQCGVCV.js → json-YTKUFNO3.js} +2 -2
- package/dist/{labels-ZJK27RL3.js → labels-UXKTDM5A.js} +11 -11
- package/dist/{lint-5OERIERT.js → lint-UUVMFRPB.js} +12 -12
- package/dist/{list-MANBRF7Z.js → list-6Q7VGKIG.js} +12 -12
- package/dist/{list-SEEANTU6.js → list-FLNHGIML.js} +12 -12
- package/dist/{page-O4M65KMJ.js → page-FPLKY53Q.js} +11 -11
- package/dist/{prepare-3WULLZER.js → prepare-VUHZQTJ4.js} +12 -12
- package/dist/{pretty-D3M366JD.js → pretty-JDZSGZCR.js} +13 -13
- package/dist/{pretty-5FRBLTXU.js → pretty-WKPQD3UU.js} +12 -12
- package/dist/{reporters-4WWZRHKI.js → reporters-E53V7UXY.js} +4 -4
- package/dist/{reporters-GDCZ5P7C.js → reporters-RAWZONQ3.js} +11 -11
- package/dist/{run-TZDLG6EN.js → run-2BDAM2LA.js} +12 -12
- package/dist/{sarif-PUZAMEFQ.js → sarif-7F6EJA3K.js} +15 -15
- package/dist/{sarif-SSSPOUCK.js → sarif-Q3FX4ODM.js} +10 -10
- package/dist/{term-DHWMUL5N.js → term-5CCU7VDU.js} +17 -17
- package/dist/{validate-4AW7KIIY.js → validate-A2R6KXAH.js} +5 -5
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/dist/check-NW7GHSX6.js +0 -47
- package/dist/chunk-3UYSONT4.js.map +0 -1
- package/dist/chunk-5D24C6WM.js.map +0 -1
- package/dist/chunk-5VNFO2RT.js.map +0 -1
- package/dist/chunk-B5R5BWMY.js.map +0 -1
- package/dist/chunk-D3AO2PMV.js.map +0 -1
- package/dist/chunk-FAS3SRQB.js.map +0 -1
- package/dist/chunk-OZL5M764.js.map +0 -1
- package/dist/chunk-ZIXU7A4C.js.map +0 -1
- package/dist/cli-5ZQXVWWC.js.map +0 -1
- package/dist/cli-VC3BXCVR.js.map +0 -1
- /package/dist/{batch-SAW4E46C.js.map → batch-XVUPHNWT.js.map} +0 -0
- /package/dist/{build-F6S3W77I.js.map → build-GU7M5EC6.js.map} +0 -0
- /package/dist/{calibrate-3DW2VV7F.js.map → calibrate-YODCJAEA.js.map} +0 -0
- /package/dist/{capture-PKEYY2VO.js.map → capture-TZ42LHNK.js.map} +0 -0
- /package/dist/{check-EZN7YNVF.js.map → check-AOGJBQR4.js.map} +0 -0
- /package/dist/{check-LRX2YFDF.js.map → check-I72HPJNA.js.map} +0 -0
- /package/dist/{check-7PUIHLFM.js.map → check-KBDIV35E.js.map} +0 -0
- /package/dist/{check-NW7GHSX6.js.map → check-OIL3CZ4N.js.map} +0 -0
- /package/dist/{chunk-XWUIFSWK.js.map → chunk-2EAUZVO2.js.map} +0 -0
- /package/dist/{chunk-WP5EKWTU.js.map → chunk-2G42VA4H.js.map} +0 -0
- /package/dist/{chunk-WBXVQW57.js.map → chunk-34PGSNS5.js.map} +0 -0
- /package/dist/{chunk-M6DNOHJO.js.map → chunk-3H7M5MXE.js.map} +0 -0
- /package/dist/{chunk-KAWS7H4C.js.map → chunk-4CMNCP5O.js.map} +0 -0
- /package/dist/{chunk-DU6CXY5R.js.map → chunk-4VQVJOIK.js.map} +0 -0
- /package/dist/{chunk-LDIUA4ZG.js.map → chunk-72OTCIYQ.js.map} +0 -0
- /package/dist/{chunk-64EDFJ5S.js.map → chunk-7JDWLMOT.js.map} +0 -0
- /package/dist/{chunk-6J2ED4ED.js.map → chunk-AL46P5H6.js.map} +0 -0
- /package/dist/{chunk-3446DW4W.js.map → chunk-C4MNHJXP.js.map} +0 -0
- /package/dist/{chunk-2LCJNH73.js.map → chunk-EEJFXYFO.js.map} +0 -0
- /package/dist/{chunk-KB4MNUKC.js.map → chunk-ES7PJMHM.js.map} +0 -0
- /package/dist/{chunk-XRWQQHBR.js.map → chunk-FGGDLZUU.js.map} +0 -0
- /package/dist/{chunk-DSJTYRI5.js.map → chunk-GRRSOAAS.js.map} +0 -0
- /package/dist/{chunk-KUXAHHDE.js.map → chunk-GSLXJSGT.js.map} +0 -0
- /package/dist/{chunk-YJHHXM5B.js.map → chunk-GWCITMHN.js.map} +0 -0
- /package/dist/{chunk-TNYIXIYV.js.map → chunk-HH327OEQ.js.map} +0 -0
- /package/dist/{chunk-ZEYNLKOH.js.map → chunk-HUCZKEDF.js.map} +0 -0
- /package/dist/{chunk-HEVYEI6O.js.map → chunk-J33NBVBX.js.map} +0 -0
- /package/dist/{chunk-U5NSIZRS.js.map → chunk-J7MZRF3J.js.map} +0 -0
- /package/dist/{chunk-MDXDTO7E.js.map → chunk-JBB22HPK.js.map} +0 -0
- /package/dist/{chunk-W7IEP7IG.js.map → chunk-LFKYNDG4.js.map} +0 -0
- /package/dist/{chunk-W7XOMNYC.js.map → chunk-MHLCZBW2.js.map} +0 -0
- /package/dist/{chunk-WZSL7KF2.js.map → chunk-MQG4ONTU.js.map} +0 -0
- /package/dist/{chunk-XPGK4ECA.js.map → chunk-N4KY3WLM.js.map} +0 -0
- /package/dist/{chunk-ABAFKOQF.js.map → chunk-N74QH6XJ.js.map} +0 -0
- /package/dist/{chunk-Q7E43SXN.js.map → chunk-O3PRYQCW.js.map} +0 -0
- /package/dist/{chunk-FEURGKJC.js.map → chunk-O7OJWMP5.js.map} +0 -0
- /package/dist/{chunk-5QOTR53S.js.map → chunk-PRF44AAC.js.map} +0 -0
- /package/dist/{chunk-VRMQSP7O.js.map → chunk-PZAHBJ56.js.map} +0 -0
- /package/dist/{chunk-QIKCIREY.js.map → chunk-RBNZI6YG.js.map} +0 -0
- /package/dist/{chunk-XCEEJEVA.js.map → chunk-S5JFWUNK.js.map} +0 -0
- /package/dist/{chunk-2TLNAGVJ.js.map → chunk-T363DMEJ.js.map} +0 -0
- /package/dist/{chunk-FPPHEHPZ.js.map → chunk-UE6IYEKA.js.map} +0 -0
- /package/dist/{chunk-WRSWZEVU.js.map → chunk-UT6SVXUQ.js.map} +0 -0
- /package/dist/{chunk-2A5OIZHT.js.map → chunk-UVUMFFZ6.js.map} +0 -0
- /package/dist/{chunk-4GGADKTU.js.map → chunk-UXEICZKX.js.map} +0 -0
- /package/dist/{chunk-QIWSEKA6.js.map → chunk-W5STNXKP.js.map} +0 -0
- /package/dist/{chunk-KCNBM42T.js.map → chunk-WIHQJSO3.js.map} +0 -0
- /package/dist/{chunk-JK56UPNQ.js.map → chunk-WMOQXWHB.js.map} +0 -0
- /package/dist/{chunk-PS4Y7EPP.js.map → chunk-WRWPOXVG.js.map} +0 -0
- /package/dist/{chunk-TUMR35B3.js.map → chunk-YBWU4JGX.js.map} +0 -0
- /package/dist/{chunk-MBLVLQWI.js.map → chunk-ZI5JHYPT.js.map} +0 -0
- /package/dist/{cli-RKYIZ6KU.js.map → cli-4P4FWT6C.js.map} +0 -0
- /package/dist/{cli-NJC3H3CW.js.map → cli-4YURODFH.js.map} +0 -0
- /package/dist/{cli-LRKBCQRS.js.map → cli-HGZ7XTDU.js.map} +0 -0
- /package/dist/{cli-LQRHK23G.js.map → cli-MRH5QXW5.js.map} +0 -0
- /package/dist/{cli-FCGGNZ5C.js.map → cli-NCJZTOWR.js.map} +0 -0
- /package/dist/{cli-OHKWCJIJ.js.map → cli-NUP7KAW3.js.map} +0 -0
- /package/dist/{cli-D5WYQVUF.js.map → cli-OD7SXNLX.js.map} +0 -0
- /package/dist/{cli-TJDQ5GUW.js.map → cli-TDCMZ7HV.js.map} +0 -0
- /package/dist/{cli-FNX4LXMI.js.map → cli-WQNWAMDL.js.map} +0 -0
- /package/dist/{github-6PV2JTZ7.js.map → github-FX4WWY7N.js.map} +0 -0
- /package/dist/{github-7ZT4KYQU.js.map → github-TOQ4AJIU.js.map} +0 -0
- /package/dist/{json-5EQCGVCV.js.map → json-SIPVIBNW.js.map} +0 -0
- /package/dist/{json-VWXLDTXR.js.map → json-YTKUFNO3.js.map} +0 -0
- /package/dist/{labels-ZJK27RL3.js.map → labels-UXKTDM5A.js.map} +0 -0
- /package/dist/{lint-5OERIERT.js.map → lint-UUVMFRPB.js.map} +0 -0
- /package/dist/{list-MANBRF7Z.js.map → list-6Q7VGKIG.js.map} +0 -0
- /package/dist/{list-SEEANTU6.js.map → list-FLNHGIML.js.map} +0 -0
- /package/dist/{page-O4M65KMJ.js.map → page-FPLKY53Q.js.map} +0 -0
- /package/dist/{prepare-3WULLZER.js.map → prepare-VUHZQTJ4.js.map} +0 -0
- /package/dist/{pretty-5FRBLTXU.js.map → pretty-JDZSGZCR.js.map} +0 -0
- /package/dist/{pretty-D3M366JD.js.map → pretty-WKPQD3UU.js.map} +0 -0
- /package/dist/{reporters-4WWZRHKI.js.map → reporters-E53V7UXY.js.map} +0 -0
- /package/dist/{reporters-GDCZ5P7C.js.map → reporters-RAWZONQ3.js.map} +0 -0
- /package/dist/{run-TZDLG6EN.js.map → run-2BDAM2LA.js.map} +0 -0
- /package/dist/{sarif-PUZAMEFQ.js.map → sarif-7F6EJA3K.js.map} +0 -0
- /package/dist/{sarif-SSSPOUCK.js.map → sarif-Q3FX4ODM.js.map} +0 -0
- /package/dist/{term-DHWMUL5N.js.map → term-5CCU7VDU.js.map} +0 -0
- /package/dist/{validate-4AW7KIIY.js.map → validate-A2R6KXAH.js.map} +0 -0
|
@@ -14,10 +14,11 @@ import {
|
|
|
14
14
|
toValidationResult,
|
|
15
15
|
unitText,
|
|
16
16
|
withRemedy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SGV5U4NE.js";
|
|
18
18
|
import {
|
|
19
19
|
CITE_RULES,
|
|
20
20
|
CiteError,
|
|
21
|
+
REPO_PATTERN,
|
|
21
22
|
SRC_PATTERN,
|
|
22
23
|
formatSrc,
|
|
23
24
|
guidanceFor,
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
sliceLines,
|
|
31
32
|
sourceRange,
|
|
32
33
|
spellSource
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YMDASDGR.js";
|
|
34
35
|
import {
|
|
35
36
|
ANY_FENCE,
|
|
36
37
|
MAX_RANGE_LINES,
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
spellLines,
|
|
58
59
|
splitLines,
|
|
59
60
|
toBodyLines
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CYMA4O2F.js";
|
|
61
62
|
import {
|
|
62
63
|
STDIN_LABEL,
|
|
63
64
|
STDIN_TOKEN,
|
|
@@ -71,7 +72,7 @@ import {
|
|
|
71
72
|
resolveTargetSet,
|
|
72
73
|
settleBaseline,
|
|
73
74
|
supportedExtensions
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-QRQVOEAH.js";
|
|
75
76
|
import {
|
|
76
77
|
SEVERITIES
|
|
77
78
|
} from "./chunk-77AINBYM.js";
|
|
@@ -450,10 +451,20 @@ function isEnoent(error) {
|
|
|
450
451
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
451
452
|
}
|
|
452
453
|
async function sourceIndexFor(root, client) {
|
|
454
|
+
return indexOr(root, client, `Root directory not found: ${root}. Fix --root, or cite.root in manni.config.yaml.`);
|
|
455
|
+
}
|
|
456
|
+
async function repoIndexFor(name, dir, client) {
|
|
457
|
+
return indexOr(
|
|
458
|
+
dir,
|
|
459
|
+
client,
|
|
460
|
+
`Repo directory not found: ${dir} (${name}). Fix --repo ${name}=<dir>, or cite.repos.${name} in manni.config.yaml.`
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
async function indexOr(dir, client, notFound) {
|
|
453
464
|
try {
|
|
454
|
-
return await buildSourceIndex(
|
|
465
|
+
return await buildSourceIndex(dir, { gitClient: client });
|
|
455
466
|
} catch (error) {
|
|
456
|
-
if (isEnoent(error)) throw new CiteError(
|
|
467
|
+
if (isEnoent(error)) throw new CiteError(notFound);
|
|
457
468
|
throw error;
|
|
458
469
|
}
|
|
459
470
|
}
|
|
@@ -657,7 +668,13 @@ async function classifyCitation(entry, opts) {
|
|
|
657
668
|
if (baseline !== void 0) result.baselineSha = baseline;
|
|
658
669
|
const spellAt = (at, start, end) => {
|
|
659
670
|
const written = range.encrypted && opts.key !== void 0 ? encryptSourcePath(at, opts.key) : at;
|
|
660
|
-
return formatSrc({
|
|
671
|
+
return formatSrc({
|
|
672
|
+
path: written,
|
|
673
|
+
encrypted: range.encrypted,
|
|
674
|
+
// A move stays inside the entry's checkout, so it keeps the repo (0100).
|
|
675
|
+
...range.repo === void 0 ? {} : { repo: range.repo },
|
|
676
|
+
...start === void 0 ? {} : { start, end }
|
|
677
|
+
});
|
|
661
678
|
};
|
|
662
679
|
if (lines !== void 0 && range.start !== void 0) {
|
|
663
680
|
const start = range.start;
|
|
@@ -856,6 +873,9 @@ var PAGE_HISTORY_UNAVAILABLE = "the page history ends before the pin held; use f
|
|
|
856
873
|
var SOURCE_HISTORY_UNAVAILABLE = "the source history ends before the pin held; use fetch-depth: 0 to tell never-true from changed";
|
|
857
874
|
var SHALLOW_RECOMMIT = "this clone is shallow, so --recommit re-recorded only commits that do not contain their lines. Fetch full history to check the rest.";
|
|
858
875
|
var GIT_UNAVAILABLE_COMMIT = "git is not available here, so the citation records no commit.";
|
|
876
|
+
function checkoutNotice(repo, text) {
|
|
877
|
+
return repo === void 0 ? text : `${repo}: ${text}`;
|
|
878
|
+
}
|
|
859
879
|
function noGit() {
|
|
860
880
|
return {
|
|
861
881
|
available: () => Promise.resolve(false),
|
|
@@ -1121,13 +1141,13 @@ async function checkCitations(page, opts) {
|
|
|
1121
1141
|
if (kept !== void 0) findings.push(kept);
|
|
1122
1142
|
}
|
|
1123
1143
|
const index = checkSources ? opts.sourceIndex ?? await buildSourceIndex(opts.root, { gitClient: client }) : void 0;
|
|
1144
|
+
const rootCheckout = index === void 0 ? void 0 : { root: opts.root, index, git: client };
|
|
1145
|
+
const checkoutOf = async (repo) => repo === void 0 ? rootCheckout : opts.checkouts?.(repo);
|
|
1124
1146
|
const classifyOpts = index === void 0 ? void 0 : {
|
|
1125
|
-
root: opts.root,
|
|
1126
|
-
index,
|
|
1127
|
-
git: client,
|
|
1128
1147
|
...opts.key === void 0 ? {} : { key: opts.key },
|
|
1129
1148
|
...opts.sourceCache === void 0 ? {} : { cache: opts.sourceCache }
|
|
1130
1149
|
};
|
|
1150
|
+
const used = /* @__PURE__ */ new Map();
|
|
1131
1151
|
const quoteInput = {
|
|
1132
1152
|
page: read,
|
|
1133
1153
|
lines,
|
|
@@ -1145,7 +1165,21 @@ async function checkCitations(page, opts) {
|
|
|
1145
1165
|
{ page: read, entry, claim: claimEnd(read, entry, lines, split), lines },
|
|
1146
1166
|
{ path: read.file, git: pageGit, ...opts.pageCommitCap === void 0 ? {} : { cap: opts.pageCommitCap }, ...opts.owned === void 0 ? {} : { manifest: opts.owned.file } }
|
|
1147
1167
|
);
|
|
1148
|
-
const
|
|
1168
|
+
const repo = entry.citation.source.repo;
|
|
1169
|
+
const checkout = classifyOpts === void 0 ? void 0 : await checkoutOf(repo);
|
|
1170
|
+
if (checkout !== void 0) used.set(repo, checkout);
|
|
1171
|
+
let source;
|
|
1172
|
+
if (classifyOpts === void 0) source = skippedSource(entry);
|
|
1173
|
+
else if (checkout === void 0) source = unknownRepo(entry);
|
|
1174
|
+
else {
|
|
1175
|
+
source = await classifyCitation(entry, {
|
|
1176
|
+
...classifyOpts,
|
|
1177
|
+
root: checkout.root,
|
|
1178
|
+
index: checkout.index,
|
|
1179
|
+
git: checkout.git
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
if (repo !== void 0) source.repo = repo;
|
|
1149
1183
|
const result = {
|
|
1150
1184
|
citation: entry.citation,
|
|
1151
1185
|
origin: entry.origin,
|
|
@@ -1155,7 +1189,8 @@ async function checkCitations(page, opts) {
|
|
|
1155
1189
|
source
|
|
1156
1190
|
};
|
|
1157
1191
|
results.push(result);
|
|
1158
|
-
|
|
1192
|
+
const quoteFrom = checkout === void 0 ? quoteInput : { ...quoteInput, root: checkout.root, index: checkout.index };
|
|
1193
|
+
for (const found of await quoteFindings(quoteFrom, entry, result)) {
|
|
1159
1194
|
const level = severity[found.rule];
|
|
1160
1195
|
if (level === "off") continue;
|
|
1161
1196
|
const finding = {
|
|
@@ -1199,18 +1234,27 @@ async function checkCitations(page, opts) {
|
|
|
1199
1234
|
}
|
|
1200
1235
|
findings.push(...findingsFor(results, severity));
|
|
1201
1236
|
for (const finding of findings) finding.guidance = guidanceFor(finding.rule);
|
|
1202
|
-
const wantsSourceHistory = checkSources
|
|
1237
|
+
const wantsSourceHistory = checkSources ? new Set(
|
|
1238
|
+
results.filter((r) => r.citation.source["commit-sha"] !== void 0 || r.source.status !== "current").map((r) => r.citation.source.repo)
|
|
1239
|
+
) : /* @__PURE__ */ new Set();
|
|
1240
|
+
let rootSaid = false;
|
|
1241
|
+
for (const repo of wantsSourceHistory) {
|
|
1242
|
+
const checkout = used.get(repo);
|
|
1243
|
+
if (checkout === void 0 || await checkout.git.available()) continue;
|
|
1244
|
+
notices.push(checkoutNotice(repo, GIT_UNAVAILABLE_HISTORY));
|
|
1245
|
+
if (repo === void 0) rootSaid = true;
|
|
1246
|
+
}
|
|
1203
1247
|
const wantsClaimHistory = results.some((r) => r.claim?.status === "changed");
|
|
1204
|
-
if (
|
|
1205
|
-
else if (wantsClaimHistory && !await pageGit.available()) {
|
|
1248
|
+
if (!rootSaid && wantsClaimHistory && !await pageGit.available()) {
|
|
1206
1249
|
notices.push(GIT_UNAVAILABLE_HISTORY);
|
|
1207
1250
|
}
|
|
1208
1251
|
if (results.some((r) => r.claim?.historyAvailable === false)) {
|
|
1209
1252
|
notices.push(PAGE_HISTORY_UNAVAILABLE);
|
|
1210
1253
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1254
|
+
const cutShort = new Set(
|
|
1255
|
+
results.filter((r) => r.source.historyAvailable === false).map((r) => r.citation.source.repo)
|
|
1256
|
+
);
|
|
1257
|
+
for (const repo of cutShort) notices.push(checkoutNotice(repo, SOURCE_HISTORY_UNAVAILABLE));
|
|
1214
1258
|
const budget = String(MOVE_BUDGET_BYTES / (1024 * 1024));
|
|
1215
1259
|
if (results.some((r) => r.source.truncatedSearch === true && r.source.truncatedAcross !== true)) {
|
|
1216
1260
|
notices.push(
|
|
@@ -1238,6 +1282,12 @@ async function withClaimHistory(now, read) {
|
|
|
1238
1282
|
const history = await claimHistory(input);
|
|
1239
1283
|
return refineClaim({ ...input, lines: now.lines, history });
|
|
1240
1284
|
}
|
|
1285
|
+
function unknownRepo(entry) {
|
|
1286
|
+
const { source } = entry.citation;
|
|
1287
|
+
const out = { src: spellSource(source), status: "missing", missingReason: "unknown-repo" };
|
|
1288
|
+
if (source["commit-sha"] !== void 0) out.commitSha = source["commit-sha"];
|
|
1289
|
+
return out;
|
|
1290
|
+
}
|
|
1241
1291
|
function skippedSource(entry) {
|
|
1242
1292
|
const { source } = entry.citation;
|
|
1243
1293
|
const out = { src: spellSource(source), status: "skipped" };
|
|
@@ -1254,6 +1304,7 @@ var CONFIG_KEYS = [
|
|
|
1254
1304
|
"allowEmpty",
|
|
1255
1305
|
"respectGitignore",
|
|
1256
1306
|
"root",
|
|
1307
|
+
"repos",
|
|
1257
1308
|
"baseline",
|
|
1258
1309
|
"checkSources",
|
|
1259
1310
|
"severity"
|
|
@@ -1304,6 +1355,34 @@ function asString(value, key, source) {
|
|
|
1304
1355
|
function isMapping(value) {
|
|
1305
1356
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1306
1357
|
}
|
|
1358
|
+
var REPO_NAME_RULE = "must be lowercase letters, digits and hyphens, starting with a letter or digit";
|
|
1359
|
+
function parseRepos(value, source) {
|
|
1360
|
+
if (!isMapping(value)) throw wrongType("repos", "a mapping", source);
|
|
1361
|
+
const repos = {};
|
|
1362
|
+
for (const [name, dir] of Object.entries(value)) {
|
|
1363
|
+
if (!REPO_PATTERN.test(name)) {
|
|
1364
|
+
throw new CiteError(`cite.repos key "${name}" in ${source} ${REPO_NAME_RULE}.`);
|
|
1365
|
+
}
|
|
1366
|
+
repos[name] = asString(dir, `repos.${name}`, source);
|
|
1367
|
+
}
|
|
1368
|
+
return repos;
|
|
1369
|
+
}
|
|
1370
|
+
function parseRepoFlags(values, toError) {
|
|
1371
|
+
const repos = {};
|
|
1372
|
+
for (const value of values) {
|
|
1373
|
+
const eq = value.indexOf("=");
|
|
1374
|
+
const name = eq === -1 ? "" : value.slice(0, eq);
|
|
1375
|
+
const dir = eq === -1 ? "" : value.slice(eq + 1);
|
|
1376
|
+
if (name === "" || dir === "") {
|
|
1377
|
+
const hint = REPO_PATTERN.test(value) ? `${value}=../${value}` : `<name>=${value}`;
|
|
1378
|
+
throw toError(`--repo "${value}" is not name=dir. Use --repo ${hint}.`);
|
|
1379
|
+
}
|
|
1380
|
+
if (!REPO_PATTERN.test(name)) throw toError(`--repo name "${name}" ${REPO_NAME_RULE}.`);
|
|
1381
|
+
if (Object.hasOwn(repos, name)) throw toError(`--repo names ${name} twice.`);
|
|
1382
|
+
repos[name] = dir;
|
|
1383
|
+
}
|
|
1384
|
+
return repos;
|
|
1385
|
+
}
|
|
1307
1386
|
function parseSeverity(value, source) {
|
|
1308
1387
|
if (!isMapping(value)) throw wrongType("severity", "a mapping", source);
|
|
1309
1388
|
rejectUnknownKeys(value, CITE_RULES, "cite.severity", source);
|
|
@@ -1334,6 +1413,7 @@ function parseCiteConfig(raw, source) {
|
|
|
1334
1413
|
if (raw.respectGitignore !== void 0)
|
|
1335
1414
|
config.respectGitignore = asBoolean(raw.respectGitignore, "respectGitignore", source);
|
|
1336
1415
|
if (raw.root !== void 0) config.root = asString(raw.root, "root", source);
|
|
1416
|
+
if (raw.repos !== void 0) config.repos = parseRepos(raw.repos, source);
|
|
1337
1417
|
if (raw.baseline !== void 0)
|
|
1338
1418
|
config.baseline = asString(raw.baseline, "baseline", source);
|
|
1339
1419
|
if (raw.checkSources !== void 0)
|
|
@@ -1396,6 +1476,11 @@ async function resolveCiteRun(opts) {
|
|
|
1396
1476
|
}
|
|
1397
1477
|
}
|
|
1398
1478
|
}
|
|
1479
|
+
const repos = {};
|
|
1480
|
+
if (loaded && config?.repos !== void 0) {
|
|
1481
|
+
for (const [name, dir] of Object.entries(config.repos)) repos[name] = resolve(loaded.dir, dir);
|
|
1482
|
+
}
|
|
1483
|
+
for (const [name, dir] of Object.entries(opts.repos ?? {})) repos[name] = resolve(cwd, dir);
|
|
1399
1484
|
const { key, source: keySource } = resolveEncryptionKey({
|
|
1400
1485
|
env,
|
|
1401
1486
|
file,
|
|
@@ -1409,6 +1494,7 @@ async function resolveCiteRun(opts) {
|
|
|
1409
1494
|
fromCollections,
|
|
1410
1495
|
...loaded ? { configDir: loaded.dir, configPath: loaded.path, configSource: loaded.source } : {},
|
|
1411
1496
|
root,
|
|
1497
|
+
repos,
|
|
1412
1498
|
key,
|
|
1413
1499
|
keySource,
|
|
1414
1500
|
...file === null ? {} : { configFile: file }
|
|
@@ -1633,6 +1719,7 @@ async function prepareRun(opts, action, verb, sources = {}) {
|
|
|
1633
1719
|
inputs: opts.inputs,
|
|
1634
1720
|
collection: opts.collection,
|
|
1635
1721
|
root: opts.root,
|
|
1722
|
+
...opts.repos === void 0 ? {} : { repos: opts.repos },
|
|
1636
1723
|
onConfigLoaded: opts.onConfigLoaded,
|
|
1637
1724
|
onNotice: opts.onNotice,
|
|
1638
1725
|
env: opts.env,
|
|
@@ -1691,7 +1778,11 @@ async function prepareRun(opts, action, verb, sources = {}) {
|
|
|
1691
1778
|
pageRoot: run2.base,
|
|
1692
1779
|
pageGitClient: pageGit
|
|
1693
1780
|
};
|
|
1694
|
-
if (checkSources)
|
|
1781
|
+
if (checkSources) {
|
|
1782
|
+
const index = await sourceIndexFor(run2.root, git);
|
|
1783
|
+
pageOptions.sourceIndex = index;
|
|
1784
|
+
pageOptions.checkouts = checkoutResolver({ root: run2.root, index, git }, run2.repos);
|
|
1785
|
+
}
|
|
1695
1786
|
const sidecars2 = await sidecarsFor(run2, { pages: files.map((file) => resolve3(base, file)) });
|
|
1696
1787
|
const setupFor = async (label, content) => {
|
|
1697
1788
|
const page = await sidecars2?.forPage(label, content, forced?.name);
|
|
@@ -1727,6 +1818,21 @@ async function prepareRun(opts, action, verb, sources = {}) {
|
|
|
1727
1818
|
...covered === void 0 ? {} : { covered }
|
|
1728
1819
|
};
|
|
1729
1820
|
}
|
|
1821
|
+
function checkoutResolver(root, repos) {
|
|
1822
|
+
const opened = /* @__PURE__ */ new Map();
|
|
1823
|
+
return (repo) => {
|
|
1824
|
+
if (repo === void 0) return Promise.resolve(root);
|
|
1825
|
+
const dir = Object.hasOwn(repos, repo) ? repos[repo] : void 0;
|
|
1826
|
+
if (dir === void 0) return Promise.resolve(void 0);
|
|
1827
|
+
let held = opened.get(repo);
|
|
1828
|
+
if (held === void 0) {
|
|
1829
|
+
const git = gitClient(dir);
|
|
1830
|
+
held = repoIndexFor(repo, dir, git).then((index) => ({ root: dir, index, git, repo }));
|
|
1831
|
+
opened.set(repo, held);
|
|
1832
|
+
}
|
|
1833
|
+
return held;
|
|
1834
|
+
};
|
|
1835
|
+
}
|
|
1730
1836
|
async function assertNoOrphans(prepared) {
|
|
1731
1837
|
const { sidecars: sidecars2 } = prepared;
|
|
1732
1838
|
if (sidecars2 === null || prepared.scopedByFlags) return;
|
|
@@ -1754,7 +1860,7 @@ function sayNotices(pages, onNotice, also = []) {
|
|
|
1754
1860
|
}
|
|
1755
1861
|
async function runCheck(opts) {
|
|
1756
1862
|
const prepared = await prepareRun(opts, "checked", "check");
|
|
1757
|
-
const { cwd, run: run2, files, gitignoreSkipped, usingStdin, forced, pageOptions
|
|
1863
|
+
const { cwd, run: run2, files, gitignoreSkipped, usingStdin, forced, pageOptions } = prepared;
|
|
1758
1864
|
await assertNoOrphans(prepared);
|
|
1759
1865
|
const hits = joinHits();
|
|
1760
1866
|
pageOptions.sourceCache = createSourceCache();
|
|
@@ -1767,8 +1873,18 @@ async function runCheck(opts) {
|
|
|
1767
1873
|
if (usingStdin) await checkOne(STDIN_LABEL, opts.stdinContent ?? "");
|
|
1768
1874
|
for (const file of files) await checkOne(file, await readTarget(run2, file));
|
|
1769
1875
|
assertNoOrphanJoins(prepared, hits);
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1876
|
+
const also = [];
|
|
1877
|
+
const { checkouts } = pageOptions;
|
|
1878
|
+
if (opts.showDiff === true && checkouts !== void 0) {
|
|
1879
|
+
const named = pages.flatMap((page) => page.citations.map((c) => c.source.repo));
|
|
1880
|
+
for (const repo of /* @__PURE__ */ new Set([void 0, ...named])) {
|
|
1881
|
+
const checkout = await checkouts(repo);
|
|
1882
|
+
if (checkout !== void 0 && !await checkout.git.available()) {
|
|
1883
|
+
also.push(checkoutNotice(repo, GIT_UNAVAILABLE_HISTORY));
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
sayNotices(pages, opts.onNotice, also);
|
|
1772
1888
|
const results = pages.map(toValidationResult);
|
|
1773
1889
|
const frame = { cwd, base: run2.configDir ?? cwd, runBase: run2.base };
|
|
1774
1890
|
const request = resolveBaselineRequest(opts, run2.config?.baseline, run2.configDir, cwd, {
|
|
@@ -1802,6 +1918,7 @@ async function runCheck(opts) {
|
|
|
1802
1918
|
export {
|
|
1803
1919
|
CITE_SECTION,
|
|
1804
1920
|
DEFAULT_CITE_BASELINE_PATH,
|
|
1921
|
+
parseRepoFlags,
|
|
1805
1922
|
parseCiteConfig,
|
|
1806
1923
|
readCiteConfigFile,
|
|
1807
1924
|
loadCiteConfig,
|
|
@@ -1812,6 +1929,7 @@ export {
|
|
|
1812
1929
|
SOURCE_HISTORY_UNAVAILABLE,
|
|
1813
1930
|
SHALLOW_RECOMMIT,
|
|
1814
1931
|
GIT_UNAVAILABLE_COMMIT,
|
|
1932
|
+
checkoutNotice,
|
|
1815
1933
|
noGit,
|
|
1816
1934
|
firstParentLog,
|
|
1817
1935
|
topLevel,
|
|
@@ -1850,10 +1968,11 @@ export {
|
|
|
1850
1968
|
checkCitations,
|
|
1851
1969
|
joinHits,
|
|
1852
1970
|
prepareRun,
|
|
1971
|
+
checkoutResolver,
|
|
1853
1972
|
assertNoOrphans,
|
|
1854
1973
|
assertNoOrphanJoins,
|
|
1855
1974
|
readTarget,
|
|
1856
1975
|
sayNotices,
|
|
1857
1976
|
runCheck
|
|
1858
1977
|
};
|
|
1859
|
-
//# sourceMappingURL=chunk-
|
|
1978
|
+
//# sourceMappingURL=chunk-PJILKN4Z.js.map
|