@hawkeyexl/manni 4.9.0 → 4.11.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-W5GXL2P4.js → batch-UAULUMGH.js} +18 -14
- package/dist/{build-Q56FEXR6.js → build-QSPNK5AL.js} +14 -11
- package/dist/calibrate-KXN4URPM.js +40 -0
- package/dist/{capture-GMYH4ATL.js → capture-JHTSUPUC.js} +16 -13
- package/dist/{check-OAJWC3WD.js → check-MDGXEUWL.js} +5 -5
- package/dist/{check-KUBELO5G.js → check-VELUQAUW.js} +17 -14
- package/dist/{check-KUBELO5G.js.map → check-VELUQAUW.js.map} +1 -1
- package/dist/check-WOQRKNZK.js +29 -0
- package/dist/{check-ZE5HIDOW.js → check-YEOYBFST.js} +14 -11
- package/dist/{chunk-FGUXMZXO.js → chunk-2DRHT73U.js} +7 -7
- package/dist/{chunk-XHFHXOQQ.js → chunk-2IAZEB45.js} +8 -8
- package/dist/{chunk-35WTFPQS.js → chunk-2IR4T5PO.js} +2 -2
- package/dist/{chunk-KX5IYIOO.js → chunk-2MJ62AYQ.js} +2 -2
- package/dist/chunk-2MJ62AYQ.js.map +1 -0
- package/dist/{chunk-OWSNXPPX.js → chunk-4CK6ZSOK.js} +6 -6
- package/dist/{chunk-YUZ2ECZY.js → chunk-4D5IZSXM.js} +3 -3
- package/dist/{chunk-RFSGKF4O.js → chunk-4VBSTXN6.js} +4 -4
- package/dist/{chunk-3XMG4CZY.js → chunk-54F74XR3.js} +15 -13
- package/dist/{chunk-3XMG4CZY.js.map → chunk-54F74XR3.js.map} +1 -1
- package/dist/{chunk-IN6DWNVE.js → chunk-6HWBRZIN.js} +47 -191
- package/dist/chunk-6HWBRZIN.js.map +1 -0
- package/dist/{chunk-GEMXGXPR.js → chunk-ADMEPUBT.js} +3 -3
- package/dist/{chunk-23UAGEKP.js → chunk-B7XYNRJQ.js} +2 -2
- package/dist/{chunk-QKE3XS2L.js → chunk-BBT6AVUG.js} +2 -2
- package/dist/{chunk-VKWZCEWB.js → chunk-BKVHX6FU.js} +4 -4
- package/dist/{chunk-X6WLCNKC.js → chunk-D4N2V43Z.js} +4 -4
- package/dist/{chunk-XXDXIIQ4.js → chunk-EFW7CAG4.js} +2 -2
- package/dist/{chunk-UDUHRXJ4.js → chunk-EIFCP6CZ.js} +2 -2
- package/dist/{chunk-KPXOJMQ6.js → chunk-FBMZJEB3.js} +2 -2
- package/dist/{chunk-HRXDM6H6.js → chunk-FQXWVS6J.js} +8 -8
- package/dist/{chunk-76I6I5N2.js → chunk-FUCPZVRY.js} +2 -2
- package/dist/{chunk-DTGIUMZV.js → chunk-GDVZ5VII.js} +4 -4
- package/dist/{chunk-QCCAHV6A.js → chunk-GV56WGL2.js} +321 -3308
- package/dist/chunk-GV56WGL2.js.map +1 -0
- package/dist/{chunk-TKTRIZT4.js → chunk-HA6MQMOY.js} +6 -6
- package/dist/{chunk-ECVQNGTH.js → chunk-HQR2ZBHW.js} +3 -3
- package/dist/{chunk-MHAYLDBK.js → chunk-IGSHYP74.js} +4 -4
- package/dist/{chunk-YEUQ7OKT.js → chunk-J6IDQGJL.js} +4 -4
- package/dist/{chunk-5LBEQ4ZU.js → chunk-JPQDNYXH.js} +2 -2
- package/dist/{chunk-6KKZXB2O.js → chunk-JROBZ7JA.js} +2 -2
- package/dist/{chunk-TMI2YF6D.js → chunk-KGEQJ5CC.js} +15 -26
- package/dist/{chunk-TMI2YF6D.js.map → chunk-KGEQJ5CC.js.map} +1 -1
- package/dist/{chunk-2EHDJ47Y.js → chunk-LBSCW232.js} +4 -4
- package/dist/{chunk-M6GH3FGJ.js → chunk-LKP7QDFN.js} +4 -4
- package/dist/{chunk-5EB6RIXJ.js → chunk-LPIF5LIE.js} +2 -2
- package/dist/chunk-M42DZCOU.js +164 -0
- package/dist/chunk-M42DZCOU.js.map +1 -0
- package/dist/{chunk-ND2S5BXB.js → chunk-MSRU4D4P.js} +2 -2
- package/dist/{chunk-BSTXARMY.js → chunk-NSBXVPZL.js} +11 -11
- package/dist/{chunk-Q45PZX2D.js → chunk-ODRPL3WB.js} +2 -2
- package/dist/{chunk-FSBIPCWE.js → chunk-OPXWPJDA.js} +10 -10
- package/dist/chunk-PCQ7ELJH.js +3081 -0
- package/dist/chunk-PCQ7ELJH.js.map +1 -0
- package/dist/{chunk-QAKJNPY3.js → chunk-PCS4VJBV.js} +6 -6
- package/dist/{chunk-GRILZZGS.js → chunk-PWBH7DCQ.js} +3 -3
- package/dist/{chunk-XKBEHKWO.js → chunk-QLWC7MKD.js} +34 -32
- package/dist/chunk-QLWC7MKD.js.map +1 -0
- package/dist/{chunk-XTAHZTES.js → chunk-R4WXQIOZ.js} +6 -6
- package/dist/{chunk-3CDZWY6M.js → chunk-RLT5SEML.js} +5 -5
- package/dist/{chunk-XG6PVB5S.js → chunk-SSQZB5SQ.js} +1 -11
- package/dist/chunk-SSQZB5SQ.js.map +1 -0
- package/dist/chunk-T7JAOYE5.js +393 -0
- package/dist/chunk-T7JAOYE5.js.map +1 -0
- package/dist/chunk-TU2WUBVZ.js +2 -0
- package/dist/{chunk-Q2H7J3FF.js → chunk-U7CTFN2J.js} +12 -10
- package/dist/{chunk-Q2H7J3FF.js.map → chunk-U7CTFN2J.js.map} +1 -1
- package/dist/{chunk-3XGGF5JW.js → chunk-VSEBFHAY.js} +10 -7
- package/dist/{chunk-3XGGF5JW.js.map → chunk-VSEBFHAY.js.map} +1 -1
- package/dist/{chunk-OVOYKWCM.js → chunk-WDWXAYVH.js} +4 -4
- package/dist/{chunk-5WME4CB6.js → chunk-Y6DOMTQD.js} +10 -8
- package/dist/{chunk-5WME4CB6.js.map → chunk-Y6DOMTQD.js.map} +1 -1
- package/dist/chunk-ZMECS2IJ.js +27 -0
- package/dist/chunk-ZMECS2IJ.js.map +1 -0
- package/dist/chunk-ZPLVANY2.js +15 -0
- package/dist/chunk-ZPLVANY2.js.map +1 -0
- package/dist/{cli-MEPJTS2V.js → cli-3BTCK4AB.js} +18 -15
- package/dist/{cli-MEPJTS2V.js.map → cli-3BTCK4AB.js.map} +1 -1
- package/dist/{cli-EMQXRN6E.js → cli-4MF37HAQ.js} +16 -12
- package/dist/{cli-EMQXRN6E.js.map → cli-4MF37HAQ.js.map} +1 -1
- package/dist/{cli-YDMMIL2U.js → cli-6KZTHWGP.js} +17 -14
- package/dist/{cli-YDMMIL2U.js.map → cli-6KZTHWGP.js.map} +1 -1
- package/dist/{cli-ZJRHU7MO.js → cli-DRMZBZLB.js} +39 -34
- package/dist/cli-DRMZBZLB.js.map +1 -0
- package/dist/{cli-J35OPSTP.js → cli-I62SRH3R.js} +10 -8
- package/dist/cli-JJMOVIKS.js +83 -0
- package/dist/cli-JJMOVIKS.js.map +1 -0
- package/dist/{cli-TPONWND4.js → cli-O4ABTN4Z.js} +25 -21
- package/dist/{cli-TPONWND4.js.map → cli-O4ABTN4Z.js.map} +1 -1
- package/dist/{cli-URNPOMOH.js → cli-ONTC5PKT.js} +3 -3
- package/dist/{cli-BJ7JXJ2U.js → cli-RORDPAPE.js} +17 -14
- package/dist/{cli-BJ7JXJ2U.js.map → cli-RORDPAPE.js.map} +1 -1
- package/dist/{cli-B7SFJDZA.js → cli-VID7PJS3.js} +17 -13
- package/dist/{cli-B7SFJDZA.js.map → cli-VID7PJS3.js.map} +1 -1
- package/dist/cli-VUKMWSSF.js +839 -0
- package/dist/cli-VUKMWSSF.js.map +1 -0
- package/dist/cli.js +24 -11
- package/dist/cli.js.map +1 -1
- package/dist/{config-YWSNBFEE.js → config-XDA42RJL.js} +3 -3
- package/dist/docmeta.js +9 -7
- package/dist/docmeta.js.map +1 -1
- package/dist/github-RY3FRA6P.js +29 -0
- package/dist/github-YKQSH7FS.js +34 -0
- package/dist/index.d.ts +1023 -915
- package/dist/index.js +107 -81
- package/dist/index.js.map +1 -1
- package/dist/{json-JIUPGOUQ.js → json-BXY44ED7.js} +13 -10
- package/dist/lint-YJ2L22BW.js +33 -0
- package/dist/list-NSG24VVX.js +31 -0
- package/dist/list-V6EGCSHX.js +34 -0
- package/dist/{page-WQ3GQF76.js → page-EV7OUBAU.js} +12 -9
- package/dist/{prepare-ZUTYXTUZ.js → prepare-JHJDJB6I.js} +17 -14
- package/dist/{prepare-ZUTYXTUZ.js.map → prepare-JHJDJB6I.js.map} +1 -1
- package/dist/{pretty-Q3C433DW.js → pretty-Q5Y2PA64.js} +14 -11
- package/dist/{pretty-CBV5XSMZ.js → pretty-SCRK66M5.js} +13 -10
- package/dist/{reporters-DH5HPFXJ.js → reporters-A5ADKDYR.js} +12 -9
- package/dist/{reporters-TTYGOUAF.js → reporters-RBYTASMI.js} +5 -5
- package/dist/run-BUE2DDXN.js +36 -0
- package/dist/{term-DL3YFL43.js → term-CQAGNG3Q.js} +17 -14
- package/dist/{term-DL3YFL43.js.map → term-CQAGNG3Q.js.map} +1 -1
- package/dist/{validate-UVDMC5LT.js → validate-ZBW44RHT.js} +6 -5
- package/dist/validate-ZBW44RHT.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/dist/calibrate-XFE56P4M.js +0 -36
- package/dist/check-HBRX4FOR.js +0 -26
- package/dist/chunk-IN6DWNVE.js.map +0 -1
- package/dist/chunk-KX5IYIOO.js.map +0 -1
- package/dist/chunk-QCCAHV6A.js.map +0 -1
- package/dist/chunk-XG6PVB5S.js.map +0 -1
- package/dist/chunk-XKBEHKWO.js.map +0 -1
- package/dist/cli-ZJRHU7MO.js.map +0 -1
- package/dist/github-63CZJGZS.js +0 -31
- package/dist/github-IYOVHWHG.js +0 -26
- package/dist/lint-TBE35CCW.js +0 -29
- package/dist/list-IZ4RIM72.js +0 -30
- package/dist/list-TNEJ3J77.js +0 -28
- package/dist/run-LZXKVTM7.js +0 -32
- /package/dist/{batch-W5GXL2P4.js.map → batch-UAULUMGH.js.map} +0 -0
- /package/dist/{build-Q56FEXR6.js.map → build-QSPNK5AL.js.map} +0 -0
- /package/dist/{calibrate-XFE56P4M.js.map → calibrate-KXN4URPM.js.map} +0 -0
- /package/dist/{capture-GMYH4ATL.js.map → capture-JHTSUPUC.js.map} +0 -0
- /package/dist/{check-HBRX4FOR.js.map → check-MDGXEUWL.js.map} +0 -0
- /package/dist/{check-OAJWC3WD.js.map → check-WOQRKNZK.js.map} +0 -0
- /package/dist/{check-ZE5HIDOW.js.map → check-YEOYBFST.js.map} +0 -0
- /package/dist/{chunk-FGUXMZXO.js.map → chunk-2DRHT73U.js.map} +0 -0
- /package/dist/{chunk-XHFHXOQQ.js.map → chunk-2IAZEB45.js.map} +0 -0
- /package/dist/{chunk-35WTFPQS.js.map → chunk-2IR4T5PO.js.map} +0 -0
- /package/dist/{chunk-OWSNXPPX.js.map → chunk-4CK6ZSOK.js.map} +0 -0
- /package/dist/{chunk-YUZ2ECZY.js.map → chunk-4D5IZSXM.js.map} +0 -0
- /package/dist/{chunk-RFSGKF4O.js.map → chunk-4VBSTXN6.js.map} +0 -0
- /package/dist/{chunk-GEMXGXPR.js.map → chunk-ADMEPUBT.js.map} +0 -0
- /package/dist/{chunk-23UAGEKP.js.map → chunk-B7XYNRJQ.js.map} +0 -0
- /package/dist/{chunk-QKE3XS2L.js.map → chunk-BBT6AVUG.js.map} +0 -0
- /package/dist/{chunk-VKWZCEWB.js.map → chunk-BKVHX6FU.js.map} +0 -0
- /package/dist/{chunk-X6WLCNKC.js.map → chunk-D4N2V43Z.js.map} +0 -0
- /package/dist/{chunk-XXDXIIQ4.js.map → chunk-EFW7CAG4.js.map} +0 -0
- /package/dist/{chunk-UDUHRXJ4.js.map → chunk-EIFCP6CZ.js.map} +0 -0
- /package/dist/{chunk-KPXOJMQ6.js.map → chunk-FBMZJEB3.js.map} +0 -0
- /package/dist/{chunk-HRXDM6H6.js.map → chunk-FQXWVS6J.js.map} +0 -0
- /package/dist/{chunk-76I6I5N2.js.map → chunk-FUCPZVRY.js.map} +0 -0
- /package/dist/{chunk-DTGIUMZV.js.map → chunk-GDVZ5VII.js.map} +0 -0
- /package/dist/{chunk-TKTRIZT4.js.map → chunk-HA6MQMOY.js.map} +0 -0
- /package/dist/{chunk-ECVQNGTH.js.map → chunk-HQR2ZBHW.js.map} +0 -0
- /package/dist/{chunk-MHAYLDBK.js.map → chunk-IGSHYP74.js.map} +0 -0
- /package/dist/{chunk-YEUQ7OKT.js.map → chunk-J6IDQGJL.js.map} +0 -0
- /package/dist/{chunk-5LBEQ4ZU.js.map → chunk-JPQDNYXH.js.map} +0 -0
- /package/dist/{chunk-6KKZXB2O.js.map → chunk-JROBZ7JA.js.map} +0 -0
- /package/dist/{chunk-2EHDJ47Y.js.map → chunk-LBSCW232.js.map} +0 -0
- /package/dist/{chunk-M6GH3FGJ.js.map → chunk-LKP7QDFN.js.map} +0 -0
- /package/dist/{chunk-5EB6RIXJ.js.map → chunk-LPIF5LIE.js.map} +0 -0
- /package/dist/{chunk-ND2S5BXB.js.map → chunk-MSRU4D4P.js.map} +0 -0
- /package/dist/{chunk-BSTXARMY.js.map → chunk-NSBXVPZL.js.map} +0 -0
- /package/dist/{chunk-Q45PZX2D.js.map → chunk-ODRPL3WB.js.map} +0 -0
- /package/dist/{chunk-FSBIPCWE.js.map → chunk-OPXWPJDA.js.map} +0 -0
- /package/dist/{chunk-QAKJNPY3.js.map → chunk-PCS4VJBV.js.map} +0 -0
- /package/dist/{chunk-GRILZZGS.js.map → chunk-PWBH7DCQ.js.map} +0 -0
- /package/dist/{chunk-XTAHZTES.js.map → chunk-R4WXQIOZ.js.map} +0 -0
- /package/dist/{chunk-3CDZWY6M.js.map → chunk-RLT5SEML.js.map} +0 -0
- /package/dist/{cli-J35OPSTP.js.map → chunk-TU2WUBVZ.js.map} +0 -0
- /package/dist/{chunk-OVOYKWCM.js.map → chunk-WDWXAYVH.js.map} +0 -0
- /package/dist/{config-YWSNBFEE.js.map → cli-I62SRH3R.js.map} +0 -0
- /package/dist/{cli-URNPOMOH.js.map → cli-ONTC5PKT.js.map} +0 -0
- /package/dist/{github-63CZJGZS.js.map → config-XDA42RJL.js.map} +0 -0
- /package/dist/{github-IYOVHWHG.js.map → github-RY3FRA6P.js.map} +0 -0
- /package/dist/{json-JIUPGOUQ.js.map → github-YKQSH7FS.js.map} +0 -0
- /package/dist/{lint-TBE35CCW.js.map → json-BXY44ED7.js.map} +0 -0
- /package/dist/{list-IZ4RIM72.js.map → lint-YJ2L22BW.js.map} +0 -0
- /package/dist/{list-TNEJ3J77.js.map → list-NSG24VVX.js.map} +0 -0
- /package/dist/{page-WQ3GQF76.js.map → list-V6EGCSHX.js.map} +0 -0
- /package/dist/{pretty-CBV5XSMZ.js.map → page-EV7OUBAU.js.map} +0 -0
- /package/dist/{pretty-Q3C433DW.js.map → pretty-Q5Y2PA64.js.map} +0 -0
- /package/dist/{reporters-DH5HPFXJ.js.map → pretty-SCRK66M5.js.map} +0 -0
- /package/dist/{reporters-TTYGOUAF.js.map → reporters-A5ADKDYR.js.map} +0 -0
- /package/dist/{run-LZXKVTM7.js.map → reporters-RBYTASMI.js.map} +0 -0
- /package/dist/{validate-UVDMC5LT.js.map → run-BUE2DDXN.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cite/cli.ts","../src/cite/reporters/sarif.ts","../src/cite/reporters/junit.ts"],"sourcesContent":["/**\n * The `cite` domain's commander program. Mounted by `src/cli.ts` under\n * `manni cite`; no entry point of its own. Grammar per proposal 0034: verbs are\n * `check`, `add`, `update`, `remove`; there is no default subcommand.\n *\n * Follows clig.dev as meta's does: primary output to stdout, diagnostics to\n * stderr, colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit\n * `0` clean, `1` an error-severity finding, `2` operational/usage.\n */\nimport { Command, Option } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { splitPageArgument as splitSharedPageArgument } from \"../shared/pin.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n COMMON_FORMAT_LIST,\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n isMachineFormat,\n} from \"../meta/internal.js\";\nimport { REPORT_FORMATS, isReportFormat } from \"../meta/index.js\";\nimport { runAdd } from \"./commands/add.js\";\nimport { runCheck } from \"./commands/check.js\";\nimport { runRemove } from \"./commands/remove.js\";\nimport { runUpdate } from \"./commands/update.js\";\nimport { CiteError, asCiteError } from \"./errors.js\";\nimport { spellSource } from \"./core/range.js\";\nimport { shortCommit, shortLine, shortPin, shortSrc } from \"./core/spell.js\";\nimport { renderCheckGithub } from \"./reporters/github.js\";\nimport { renderCheckJson, renderRemoveJson, renderUpdateJson } from \"./reporters/json.js\";\nimport { renderCheckJunit } from \"./reporters/junit.js\";\nimport { renderCheckPretty, renderRemovePretty, renderUpdatePretty } from \"./reporters/pretty.js\";\nimport { renderCheckSarif } from \"./reporters/sarif.js\";\nimport type { AddResult, PageLines } from \"./types.js\";\n\nconst UPDATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype UpdateFormat = (typeof UPDATE_FORMATS)[number];\n/** The same two `update` has: a removal is a write, and writes report alike. */\nconst REMOVE_FORMATS = UPDATE_FORMATS;\ntype RemoveFormat = UpdateFormat;\n\n/**\n * Whether `command`'s output gets colour: this domain's `--no-color` and\n * `NO_COLOR` turn it off, and otherwise only a TTY turns it on\n * (`shouldColor`). `isTTY` is passed uncoerced: Node leaves it undefined off\n * a terminal, never false, and `shouldColor` reads a missing one as \"not a\n * terminal\".\n */\nexport function colorFor(\n command: Command,\n isTTY: boolean | undefined,\n env?: NodeJS.ProcessEnv,\n): boolean {\n // commander maps --no-color to opts.color === false, on the command that\n // declares it.\n const noColor = colorOwner(command).opts().color === false;\n return shouldColor({ noColor, isTTY, env });\n}\n\n/**\n * The nearest command, this one or an ancestor, that declares `--no-color`:\n * the `cite` program, wherever it is mounted. Not the root: under the\n * umbrella that is `manni`, which has no `--no-color` of its own.\n */\nfunction colorOwner(command: Command): Command {\n for (let c: Command | null = command; c !== null; c = c.parent) {\n if (c.options.some((o) => o.long === \"--no-color\")) return c;\n }\n return command;\n}\n\nfunction isUpdateFormat(value: string): value is UpdateFormat {\n return (UPDATE_FORMATS as readonly string[]).includes(value);\n}\n\nfunction isRemoveFormat(value: string): value is RemoveFormat {\n return (REMOVE_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Commander hands an `.action()` callback an untyped bag of option values, so\n * each subcommand declares the shape it actually reads. The `--no-<thing>`\n * flags are `boolean` and never `undefined`: commander supplies `true` when\n * the flag is absent, which is its default and not a choice, so only the\n * explicit `false` travels to the core (`explicitFalse`).\n */\ninterface InputCliOptions {\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 <format>`: force an extractor. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `--root <dir>`: where `src:` paths resolve from. */\n root?: string;\n}\n\ninterface CheckCliOptions extends InputCliOptions {\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n quiet?: boolean;\n /**\n * `--baseline [path]` / `--no-baseline`, the same three-state split as\n * `config`: absent leaves the config in charge, a string names a file, `true`\n * is a bare `--baseline` (the default path), `false` is `--no-baseline`.\n */\n baseline?: string | boolean;\n /** `--write-baseline [path]`; `true` for the bare flag. */\n writeBaseline?: string | boolean;\n /** `--no-check-sources`. */\n checkSources: boolean;\n showDiff?: boolean;\n reveal?: boolean;\n}\n\ninterface AddCliOptions {\n id?: string;\n marker?: boolean;\n quote?: boolean;\n /** `--encrypt`. */\n encrypt?: boolean;\n /** `--no-commit-sha`. */\n commitSha: boolean;\n dryRun?: boolean;\n as?: string;\n root?: string;\n config?: string | boolean;\n}\n\ninterface RemoveCliOptions extends Omit<InputCliOptions, \"root\"> {\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\ninterface UpdateCliOptions extends InputCliOptions {\n /** `--no-check-sources`: declared so the refusal names the flag rather than commander rejecting it. */\n checkSources: boolean;\n accept?: boolean;\n recommit?: boolean;\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\n/**\n * Split `docs/limits.md:9` or `docs/limits.md:14-18` into the page and the\n * claim's lines, under cite's error contract. The parsing is the shared pin\n * engine's (`splitPageArgument` in `src/shared/pin.ts`).\n */\nexport function splitPageArgument(arg: string): { page: string; lines?: PageLines } {\n return asCiteError(() => splitSharedPageArgument(arg));\n}\n\n/** `line 9`, or `lines 14-18` for a range. */\nfunction spellAt(lines: PageLines, noun = \"line\"): string {\n return lines.start === lines.end\n ? `${noun} ${String(lines.start)}`\n : `${noun}s ${String(lines.start)}-${String(lines.end)}`;\n}\n\n/**\n * What `add` says on success. One sentence composed from the result: what was\n * added, where it went, and what each end is pinned to. Lines are the page's\n * own, after the write. The source is spelled as it was written to the page,\n * abbreviated when it is a ciphertext, and quoted with its first pinned line\n * where the result carries one.\n */\nexport function addMessage(result: AddResult): string {\n const { citation, claimLines } = result;\n const claim = citation.claim;\n const name = citation.id ?? (claim === undefined ? \"a bare pin\" : \"an entry\");\n const src = shortSrc(spellSource(citation.source));\n const commit = citation.source[\"commit-sha\"];\n const quoted = result.sourceLine === undefined ? \"\" : shortLine(result.sourceLine);\n const line = quoted === \"\" ? \"\" : ` \"${quoted}\"`;\n const pin = `${src}${line}, ${shortPin(citation.source.integrity)}, ${commit === undefined ? \"no commit\" : shortCommit(commit)}`;\n // Where it went: the page's own frontmatter, or the manifest that owns the\n // page's citations, at the line the entry now sits on.\n const where =\n result.manifest === undefined\n ? \"frontmatter\"\n : `${result.manifest.file}:${String(result.manifest.line)}`;\n const head = `${result.file}: added ${name} to ${where}`;\n\n if (result.markerLine !== undefined) {\n const at =\n claimLines === undefined ? \"\" : `, claim pinned at ${spellAt(claimLines)}`;\n const wrote = result.markerJoined === true ? \"joined the marker at line\" : \"marker at line\";\n const marked = `${head}; ${wrote} ${String(result.markerLine)}${at}`;\n if (claim === undefined) return marked;\n if (citation.quote === true) return `${marked} (a block that reproduces ${src})`;\n return `${marked} (${shortPin(claim.integrity)}; source ${pin})`;\n }\n if (claim === undefined || claimLines === undefined) {\n return `${head} (source ${pin})`;\n }\n if (citation.quote === true) {\n return `${head} (claim ${spellAt(claimLines, \"line\")}, a block that reproduces ${src})`;\n }\n return `${head} (claim at ${spellAt(claimLines)}, ${shortPin(claim.integrity)}; source ${pin})`;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift.\",\n )\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 program\n .command(\"check\")\n .description(\"Check every citation in the given pages against its source\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to check (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"-q, --quiet\", \"in pretty output, hide current citations and clean files\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"check files .gitignore covers\")\n // No `defaultValue` and no `.preset()`, for the reasons meta's validate\n // gives: a bare flag must stay distinguishable from a typed path.\n .addOption(\n new Option(\n \"--baseline [path]\",\n \"compare against a baseline; fail only on findings not in it\",\n ),\n )\n .addOption(\n new Option(\n \"--write-baseline [path]\",\n \"record current findings as the baseline, then exit 0\",\n ),\n )\n .option(\"--no-baseline\", \"ignore a baseline configured by `baseline:`\")\n .option(\"--no-check-sources\", \"page-side rules only; every source status is skipped\")\n .option(\n \"--root <dir>\",\n \"directory src: paths resolve from (default: cite.root from config, else the git root, else the current directory)\",\n )\n .option(\"--show-diff\", \"in pretty output, print the diff and commit subjects for changed\")\n .option(\"--reveal\", \"in pretty output, print the decrypted path beside an encrypted source\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite check docs/ # walk a directory\",\n \" manni cite check --collection guides # one configured collection\",\n ' manni cite check \"docs/**/*.md\" -f github # CI annotations',\n \" manni cite check --show-diff docs/limits.md # see what changed\",\n \" manni cite check --baseline # fail only on new findings\",\n \" cat page.md | manni cite check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: CheckCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isReportFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runCheck({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(!isMachineFormat(format), cwd),\n stdinContent,\n // `undefined` rather than `false` when absent, so config still wins.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n baseline: options.baseline,\n writeBaseline: options.writeBaseline,\n checkSources: explicitFalse(options.checkSources),\n // Only so the run can say git is not there to give diffs; the diffs\n // themselves are the pretty reporter's.\n showDiff: options.showDiff ? true : undefined,\n root: options.root,\n });\n\n let text: string;\n switch (format) {\n case \"pretty\":\n text = renderCheckPretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n quiet: Boolean(options.quiet),\n showDiff: Boolean(options.showDiff),\n reveal: Boolean(options.reveal),\n });\n break;\n case \"json\":\n text = renderCheckJson(run);\n break;\n case \"github\":\n text = renderCheckGithub(run);\n break;\n case \"sarif\":\n text = renderCheckSarif(run, { onNotice: notice });\n break;\n case \"junit\":\n text = renderCheckJunit(run);\n break;\n }\n // Only `github` may say nothing on a clean run; every other format\n // owes its envelope even when empty.\n if (text.length > 0 || !OMITTED_WHEN_CLEAN.has(format)) {\n process.stdout.write(`${text}\\n`);\n }\n // `failed` counts files with an unbaselined error-severity finding;\n // warnings never move it.\n process.exitCode = run.summary.failed > 0 ? 1 : 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"add\")\n .description(\"Mint a citation for a source range and write it to a page\")\n .argument(\n \"<page>\",\n \"the page to cite from, with the claim's lines: page:L or page:L1-L2 (use - for stdin, with --as)\",\n )\n .argument(\n \"<src>\",\n \"path, path:L or path:L1-L2 relative to --root, or an encrypted ~source with the same line forms\",\n )\n .option(\"--id <id>\", \"kebab-case id, unique on the page; required with --marker\")\n .option(\"--marker\", \"write a cite <id> marker above the paragraph holding the page lines and pin the text it anchors\")\n .option(\"--quote\", \"the page lines are a fenced block that reproduces the source\")\n .option(\n \"--encrypt\",\n \"write source.file encrypted, with an hmac-sha256- pin; with no key, offer to create one (an available key encrypts without the flag)\",\n )\n .option(\"--no-commit-sha\", \"do not record HEAD\")\n .option(\"--dry-run\", \"print the diff; write nothing\")\n .option(\"--as <format>\", \"force the page format\")\n .option(\"--root <dir>\", \"directory source paths resolve from (as check)\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite add docs/limits.md:9 lib/limits.ts:2 --id fetch-timeout\",\n \" manni cite add docs/limits.md:30 lib/limits.ts:8-12 --id timeouts --marker\",\n \" manni cite add docs/limits.md:14-18 lib/limits.ts:1-3 --quote\",\n \" manni cite add docs/limits.md lib/limits.ts --dry-run\",\n \" cat page.md | manni cite add -:9 lib/limits.ts:2 --as markdown > out.md\",\n ].join(\"\\n\"),\n )\n .action(async (pageArgument: string, src: string, options: AddCliOptions) => {\n try {\n const { page, lines } = splitPageArgument(pageArgument);\n const usingStdin = page === STDIN_TOKEN;\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n const cwd = process.cwd();\n\n const result = await runAdd({\n page,\n pageLines: lines,\n src,\n id: options.id,\n marker: options.marker ? true : undefined,\n quote: options.quote ? true : undefined,\n // `undefined` when absent, so the key decides: an available one\n // encrypts without the flag.\n encrypt: options.encrypt ? true : undefined,\n commitSha: explicitFalse(options.commitSha),\n dryRun,\n as: options.as,\n ...configOption(options.config),\n // With `-` the page owns stdout; so does the diff under --dry-run.\n onConfigLoaded: reportConfig(!usingStdin && !dryRun, cwd),\n stdinContent,\n root: options.root,\n onNotice: notice,\n // Only on a terminal: off one, a missing key is a refusal, not a\n // question nobody can answer. With `-` stdin is the page, so no\n // question is put either.\n confirm: terminalConfirm(),\n });\n\n const message = addMessage(result);\n // A dry run prints every diff the write would make: the page's, and\n // the manifest's when the entry goes there.\n const diffs = [result.diff, result.manifest?.diff ?? \"\"].filter((d) => d.length > 0);\n if (usingStdin) {\n // The rewritten page owns stdout; everything else is a diagnostic.\n process.stdout.write(result.content);\n if (dryRun) for (const diff of diffs) process.stderr.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else if (dryRun) {\n for (const diff of diffs) process.stdout.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else {\n process.stdout.write(`${message}\\n`);\n }\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"update\")\n .description(\"Rewrite moved citations in place; with --accept, re-mint changed ones\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to update (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"update files .gitignore covers\")\n .option(\"--no-check-sources\", \"refused: update needs the sources\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\"--accept\", \"re-mint changed and never-true entries at HEAD; prints old and new pins\")\n .option(\n \"--recommit\",\n \"re-record commit-sha where the recorded commit does not contain the pinned lines, or is outside HEAD's history\",\n )\n .option(\"--only <id>\", \"limit to entries with this id; repeatable\", collect, [])\n .option(\"--dry-run\", \"print the diffs; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${UPDATE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite update docs/ # rewrite moved entries\",\n \" manni cite update --accept --only fetch-timeout docs/limits.md\",\n \" manni cite update --dry-run docs/ # see the diffs first\",\n \" manni cite update --recommit docs/ # repair unsupported commit-sha\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: UpdateCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isUpdateFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n if (!options.checkSources) {\n throw new CiteError(\n \"update needs the sources: drop --no-check-sources (or `checkSources: false`).\",\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, as it does for `add -`; a\n // dry run prints the diffs instead, so the report keeps stdout.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runUpdate({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n accept: options.accept ? true : undefined,\n recommit: options.recommit ? true : undefined,\n only: options.only.length > 0 ? options.only : undefined,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderUpdateJson(run)\n : renderUpdatePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it rewrote and leaves the file to say the rest.\n showDiff: dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Exit 1 when something was skipped with an error-severity finding:\n // work left undone, `fill`'s precedent.\n process.exitCode = run.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"remove\")\n .description(\"Remove the named citations from the given pages, markers and all\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to remove from (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"remove from files .gitignore covers\")\n .option(\n \"--only <id>\",\n \"the entry to remove, by id or by pointer (/citations/N); required, and repeatable\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print the diffs and the report; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${REMOVE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite remove docs/limits.md --only fetch-timeout\",\n \" manni cite remove docs/ --only fetch-timeout --only retries --dry-run\",\n \" manni cite remove --collection site --only /citations/3 -f json\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RemoveCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isRemoveFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, exactly as on `update -`.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runRemove({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n only: options.only,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderRemoveJson(run)\n : renderRemovePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it removed and leaves the file to say the rest.\n showDiff: dryRun,\n dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Everything named was removed, or previewed: there is no exit 1.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * SARIF for `check`. Meta's renderer builds the envelope, the\n * repository-relative uris and the fingerprints the baseline shares, from the\n * adapted results. What it cannot know is what a cite rule is: it describes\n * every rule as a schema keyword, links meta's fix page, and prefixes each\n * message with the JSON Pointer of the entry, `(root)` for a finding about no\n * entry. This renderer replaces those three with the cite rule's own\n * description, a link to its row of the citations reference, and the message\n * the github annotation carries, which names the citation the pointer only\n * numbered. A message is no part of a fingerprint, so the baseline is\n * unaffected.\n */\nimport { renderSarif, type ValidationResult } from \"../../meta/index.js\";\nimport { errorSite } from \"../core/adapt.js\";\nimport { RULE_ID_PREFIX, isCiteRule } from \"../core/severity.js\";\nimport type { CheckRun, CiteRule } from \"../types.js\";\nimport { findingMessage } from \"./github.js\";\n\nconst INFORMATION_URI = \"https://hawkeyexl.github.io/manni/cite/\";\n\n/** The citations reference, whose rule tables anchor each row by rule name. */\nconst RULES_URI = \"https://hawkeyexl.github.io/manni/cite/reference/citations/\";\n\n/** What each rule is, as the citations reference's tables say it. */\nconst RULE_DESCRIPTIONS: Readonly<Record<CiteRule, string>> = {\n \"source-moved\": \"The cited source lines moved to one other place in the file.\",\n \"source-moved-ambiguous\": \"The cited source lines now match at several places in the file.\",\n \"source-changed\": \"The cited source lines changed since the citation pinned them.\",\n \"source-never-true\": \"The pin never matched the source at the recorded commit.\",\n \"source-missing\": \"The cited source file is not tracked under the root, or cannot be decrypted.\",\n \"claim-moved\": \"The cited sentence moved to other lines of the page.\",\n \"claim-moved-ambiguous\": \"The cited sentence now appears at several places on the page.\",\n \"claim-reanchored\": \"The cited sentence's words are unchanged since the claim's baseline, and only its layout moved.\",\n \"claim-changed\": \"The cited sentence was edited since the citation pinned it.\",\n \"marker-orphan\": \"A marker names an id no citation has.\",\n \"marker-invalid\": \"A marker is malformed, or the page has too many markers.\",\n \"marker-repeated\": \"Two markers name the same citation id.\",\n \"marker-misplaced\": \"A marker line sits inside the paragraph it anchors, and splits it.\",\n \"anchor-invalid\": \"A citation's anchor cannot work.\",\n \"entry-invalid\": \"A citation entry is malformed.\",\n \"quote-drift\": \"A quoted block no longer reproduces its source.\",\n};\n\n/**\n * The label meta's reporters put before a message: `(root) ` for a finding\n * about no entry, `/citations/N ` for one about an entry. Nothing else ever\n * opens a cite finding's adapted message.\n */\nexport const ENTRY_LABEL = /^(?:\\(root\\)|\\/citations\\/\\d+) /;\n\nexport interface SarifRule {\n id: string;\n shortDescription: { text: string };\n helpUri?: string;\n}\n\n/** As much of meta's SARIF as this renderer and its tests read back. */\nexport interface SarifLog {\n runs: {\n tool: { driver: { informationUri: string; rules: SarifRule[] } };\n results: { ruleId: string; message: { text: string } }[];\n }[];\n}\n\n/**\n * The adapted results with each message rewritten as the github annotation\n * says it. An error is paired with its finding by rule, entry, line and\n * message, as the baseline split pairs them; the baseline has already\n * dropped the errors it forgives.\n */\nexport function withFindingMessages(run: CheckRun): ValidationResult[] {\n return run.results.map((result) => {\n const page = run.pages.find((p) => p.file === result.file);\n if (page === undefined) return result;\n const errors = result.errors.map((error) => {\n const finding = page.findings.find(\n (f) =>\n f.rule === error.keyword &&\n (f.index === undefined ? \"\" : `/citations/${String(f.index)}`) === error.instancePath &&\n f.message === error.message &&\n (errorSite(f).line ?? null) === (error.line ?? null),\n );\n return finding === undefined ? error : { ...error, message: findingMessage(finding) };\n });\n return { ...result, errors };\n });\n}\n\n/** A rule as the citation tool describes it. */\nfunction describe(rule: SarifRule): SarifRule {\n const name = rule.id.slice(RULE_ID_PREFIX.length + 1);\n if (!isCiteRule(name)) return rule;\n return { id: rule.id, shortDescription: { text: RULE_DESCRIPTIONS[name] }, helpUri: `${RULES_URI}#${name}` };\n}\n\nexport function renderCheckSarif(run: CheckRun, opts: { onNotice?: (message: string) => void } = {}): string {\n const log = JSON.parse(\n renderSarif(withFindingMessages(run), {\n frame: run.frame,\n ...(opts.onNotice === undefined ? {} : { onNotice: opts.onNotice }),\n }),\n ) as SarifLog;\n for (const sarifRun of log.runs) {\n sarifRun.tool.driver.informationUri = INFORMATION_URI;\n sarifRun.tool.driver.rules = sarifRun.tool.driver.rules.map(describe);\n for (const result of sarifRun.results) result.message.text = result.message.text.replace(ENTRY_LABEL, \"\");\n }\n return JSON.stringify(log, null, 2);\n}\n","/**\n * JUnit for `check`: meta's renderer over the adapted results, under the\n * `manni.cite` classname, with each failure's message the one the github\n * annotation carries.\n * Meta's renderer opens every message with the entry's JSON Pointer, `(root)`\n * for a finding about no entry, which says nothing about a citation. The\n * failure's `type` is already the rule id.\n */\nimport { renderJunit } from \"../../meta/index.js\";\nimport type { CheckRun } from \"../types.js\";\nimport { ENTRY_LABEL, withFindingMessages } from \"./sarif.js\";\n\n/** JUnit `classname` for the citation tool's findings. */\nexport const JUNIT_CLASSNAME = \"manni.cite\";\n\n/** A `message=\"` attribute's opening label. The value is escaped, so `message=\"` opens nothing else. */\nconst MESSAGE_LABEL = new RegExp(`message=\"${ENTRY_LABEL.source.replace(/^\\^/, \"\")}`, \"g\");\n\nexport function renderCheckJunit(run: CheckRun): string {\n return renderJunit(withFindingMessages(run), { frame: run.frame, classname: JUNIT_CLASSNAME }).replace(\n MESSAGE_LABEL,\n 'message=\"',\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,SAAS,cAAc;;;ACShC,IAAM,kBAAkB;AAGxB,IAAM,YAAY;AAGlB,IAAM,oBAAwD;AAA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ACjB,IAAI,QAAQ;AAAA,QACZ,GAAG,aAAa,QAAQ,MAAM;AAAA,QAC9B,gBAAgB,aAAa,WAAW,YAAY,CAAC,cAAc,GAAG;AAAA,QACtE;AAAA,QACA,YAAY,QAAQ,aAAa,OAAO;AAAA,QACxC,kBAAkB,cAAc,QAAQ,SAAS;AAAA,QACjD,UAAU;AAAA,QACV,MAAM,QAAQ;AAAA,QACd;AAAA,MACF,CAAC;AAED,YAAM,OACJ,WAAW,SACP,iBAAiB,GAAG,IACpB,mBAAmB,KAAK;AAAA,QACtB,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK;AAAA;AAAA;AAAA,QAG7C,UAAU;AAAA,QACV;AAAA,MACF,CAAC;AACP,YAAM,YAAY,eAAe,IAAI,MAAM,KAAK,CAAC,SAAS,KAAK,YAAY,MAAS,IAAI;AACxF,UAAI,WAAW,YAAY,QAAW;AACpC,gBAAQ,OAAO,MAAM,UAAU,OAAO;AACtC,gBAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAAA,MAClC,OAAO;AACL,gBAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAAA,MAClC;AAEA,cAAQ,WAAW;AAAA,IACrB,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":["splitPageArgument"]}
|
|
1
|
+
{"version":3,"sources":["../src/cite/cli.ts","../src/cite/reporters/sarif.ts","../src/cite/reporters/junit.ts"],"sourcesContent":["/**\n * The `cite` domain's commander program. Mounted by `src/cli.ts` under\n * `manni cite`; no entry point of its own. Grammar per proposal 0034: verbs are\n * `check`, `add`, `update`, `remove`; there is no default subcommand.\n *\n * Follows clig.dev as meta's does: primary output to stdout, diagnostics to\n * stderr, colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit\n * `0` clean, `1` an error-severity finding, `2` operational/usage.\n */\nimport { Command, Option } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { splitPageArgument as splitSharedPageArgument } from \"../shared/pin.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n COMMON_FORMAT_LIST,\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n isMachineFormat,\n} from \"../meta/internal.js\";\nimport { REPORT_FORMATS, isReportFormat } from \"../meta/index.js\";\nimport { runAdd } from \"./commands/add.js\";\nimport { runCheck } from \"./commands/check.js\";\nimport { runRemove } from \"./commands/remove.js\";\nimport { runUpdate } from \"./commands/update.js\";\nimport { CiteError, asCiteError } from \"./errors.js\";\nimport { spellSource } from \"./core/range.js\";\nimport { shortCommit, shortLine, shortPin, shortSrc } from \"./core/spell.js\";\nimport { renderCheckGithub } from \"./reporters/github.js\";\nimport { renderCheckJson, renderRemoveJson, renderUpdateJson } from \"./reporters/json.js\";\nimport { renderCheckJunit } from \"./reporters/junit.js\";\nimport { renderCheckPretty, renderRemovePretty, renderUpdatePretty } from \"./reporters/pretty.js\";\nimport { renderCheckSarif } from \"./reporters/sarif.js\";\nimport type { AddResult, PageLines } from \"./types.js\";\n\nconst UPDATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype UpdateFormat = (typeof UPDATE_FORMATS)[number];\n/** The same two `update` has: a removal is a write, and writes report alike. */\nconst REMOVE_FORMATS = UPDATE_FORMATS;\ntype RemoveFormat = UpdateFormat;\n\n/**\n * Whether `command`'s output gets colour: this domain's `--no-color` and\n * `NO_COLOR` turn it off, and otherwise only a TTY turns it on\n * (`shouldColor`). `isTTY` is passed uncoerced: Node leaves it undefined off\n * a terminal, never false, and `shouldColor` reads a missing one as \"not a\n * terminal\".\n */\nexport function colorFor(\n command: Command,\n isTTY: boolean | undefined,\n env?: NodeJS.ProcessEnv,\n): boolean {\n // commander maps --no-color to opts.color === false, on the command that\n // declares it.\n const noColor = colorOwner(command).opts().color === false;\n return shouldColor({ noColor, isTTY, env });\n}\n\n/**\n * The nearest command, this one or an ancestor, that declares `--no-color`:\n * the `cite` program, wherever it is mounted. Not the root: under the\n * umbrella that is `manni`, which has no `--no-color` of its own.\n */\nfunction colorOwner(command: Command): Command {\n for (let c: Command | null = command; c !== null; c = c.parent) {\n if (c.options.some((o) => o.long === \"--no-color\")) return c;\n }\n return command;\n}\n\nfunction isUpdateFormat(value: string): value is UpdateFormat {\n return (UPDATE_FORMATS as readonly string[]).includes(value);\n}\n\nfunction isRemoveFormat(value: string): value is RemoveFormat {\n return (REMOVE_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Commander hands an `.action()` callback an untyped bag of option values, so\n * each subcommand declares the shape it actually reads. The `--no-<thing>`\n * flags are `boolean` and never `undefined`: commander supplies `true` when\n * the flag is absent, which is its default and not a choice, so only the\n * explicit `false` travels to the core (`explicitFalse`).\n */\ninterface InputCliOptions {\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 <format>`: force an extractor. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `--root <dir>`: where `src:` paths resolve from. */\n root?: string;\n}\n\ninterface CheckCliOptions extends InputCliOptions {\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n quiet?: boolean;\n /**\n * `--baseline [path]` / `--no-baseline`, the same three-state split as\n * `config`: absent leaves the config in charge, a string names a file, `true`\n * is a bare `--baseline` (the default path), `false` is `--no-baseline`.\n */\n baseline?: string | boolean;\n /** `--write-baseline [path]`; `true` for the bare flag. */\n writeBaseline?: string | boolean;\n /** `--no-check-sources`. */\n checkSources: boolean;\n showDiff?: boolean;\n reveal?: boolean;\n}\n\ninterface AddCliOptions {\n id?: string;\n marker?: boolean;\n quote?: boolean;\n /** `--encrypt`. */\n encrypt?: boolean;\n /** `--no-commit-sha`. */\n commitSha: boolean;\n dryRun?: boolean;\n as?: string;\n root?: string;\n config?: string | boolean;\n}\n\ninterface RemoveCliOptions extends Omit<InputCliOptions, \"root\"> {\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\ninterface UpdateCliOptions extends InputCliOptions {\n /** `--no-check-sources`: declared so the refusal names the flag rather than commander rejecting it. */\n checkSources: boolean;\n accept?: boolean;\n recommit?: boolean;\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\n/**\n * Split `docs/limits.md:9` or `docs/limits.md:14-18` into the page and the\n * claim's lines, under cite's error contract. The parsing is the shared pin\n * engine's (`splitPageArgument` in `src/shared/pin.ts`).\n */\nexport function splitPageArgument(arg: string): { page: string; lines?: PageLines } {\n return asCiteError(() => splitSharedPageArgument(arg));\n}\n\n/** `line 9`, or `lines 14-18` for a range. */\nfunction spellAt(lines: PageLines, noun = \"line\"): string {\n return lines.start === lines.end\n ? `${noun} ${String(lines.start)}`\n : `${noun}s ${String(lines.start)}-${String(lines.end)}`;\n}\n\n/**\n * What `add` says on success. One sentence composed from the result: what was\n * added, where it went, and what each end is pinned to. Lines are the page's\n * own, after the write. The source is spelled as it was written to the page,\n * abbreviated when it is a ciphertext, and quoted with its first pinned line\n * where the result carries one.\n */\nexport function addMessage(result: AddResult): string {\n const { citation, claimLines } = result;\n const claim = citation.claim;\n const name = citation.id ?? (claim === undefined ? \"a bare pin\" : \"an entry\");\n const src = shortSrc(spellSource(citation.source));\n const commit = citation.source[\"commit-sha\"];\n const quoted = result.sourceLine === undefined ? \"\" : shortLine(result.sourceLine);\n const line = quoted === \"\" ? \"\" : ` \"${quoted}\"`;\n const pin = `${src}${line}, ${shortPin(citation.source.integrity)}, ${commit === undefined ? \"no commit\" : shortCommit(commit)}`;\n // Where it went: the page's own frontmatter, or the manifest that owns the\n // page's citations, at the line the entry now sits on.\n const where =\n result.manifest === undefined\n ? \"frontmatter\"\n : `${result.manifest.file}:${String(result.manifest.line)}`;\n const head = `${result.file}: added ${name} to ${where}`;\n\n if (result.markerLine !== undefined) {\n const at =\n claimLines === undefined ? \"\" : `, claim pinned at ${spellAt(claimLines)}`;\n const wrote = result.markerJoined === true ? \"joined the marker at line\" : \"marker at line\";\n const marked = `${head}; ${wrote} ${String(result.markerLine)}${at}`;\n if (claim === undefined) return marked;\n if (citation.quote === true) return `${marked} (a block that reproduces ${src})`;\n return `${marked} (${shortPin(claim.integrity)}; source ${pin})`;\n }\n if (claim === undefined || claimLines === undefined) {\n return `${head} (source ${pin})`;\n }\n if (citation.quote === true) {\n return `${head} (claim ${spellAt(claimLines, \"line\")}, a block that reproduces ${src})`;\n }\n return `${head} (claim at ${spellAt(claimLines)}, ${shortPin(claim.integrity)}; source ${pin})`;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift.\",\n )\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 program\n .command(\"check\")\n .description(\"Check every citation in the given pages against its source\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to check (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"-q, --quiet\", \"in pretty output, hide current citations and clean files\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"check files .gitignore covers\")\n // No `defaultValue` and no `.preset()`, for the reasons meta's validate\n // gives: a bare flag must stay distinguishable from a typed path.\n .addOption(\n new Option(\n \"--baseline [path]\",\n \"compare against a baseline; fail only on findings not in it\",\n ),\n )\n .addOption(\n new Option(\n \"--write-baseline [path]\",\n \"record current findings as the baseline, then exit 0\",\n ),\n )\n .option(\"--no-baseline\", \"ignore a baseline configured by `baseline:`\")\n .option(\"--no-check-sources\", \"page-side rules only; every source status is skipped\")\n .option(\n \"--root <dir>\",\n \"directory src: paths resolve from (default: cite.root from config, else the git root, else the current directory)\",\n )\n .option(\"--show-diff\", \"in pretty output, print the diff and commit subjects for changed\")\n .option(\"--reveal\", \"in pretty output, print the decrypted path beside an encrypted source\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite check docs/ # walk a directory\",\n \" manni cite check --collection guides # one configured collection\",\n ' manni cite check \"docs/**/*.md\" -f github # CI annotations',\n \" manni cite check --show-diff docs/limits.md # see what changed\",\n \" manni cite check --baseline # fail only on new findings\",\n \" cat page.md | manni cite check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: CheckCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isReportFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runCheck({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(!isMachineFormat(format), cwd),\n stdinContent,\n // `undefined` rather than `false` when absent, so config still wins.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n baseline: options.baseline,\n writeBaseline: options.writeBaseline,\n checkSources: explicitFalse(options.checkSources),\n // Only so the run can say git is not there to give diffs; the diffs\n // themselves are the pretty reporter's.\n showDiff: options.showDiff ? true : undefined,\n root: options.root,\n });\n\n let text: string;\n switch (format) {\n case \"pretty\":\n text = renderCheckPretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n quiet: Boolean(options.quiet),\n showDiff: Boolean(options.showDiff),\n reveal: Boolean(options.reveal),\n });\n break;\n case \"json\":\n text = renderCheckJson(run);\n break;\n case \"github\":\n text = renderCheckGithub(run);\n break;\n case \"sarif\":\n text = renderCheckSarif(run, { onNotice: notice });\n break;\n case \"junit\":\n text = renderCheckJunit(run);\n break;\n }\n // Only `github` may say nothing on a clean run; every other format\n // owes its envelope even when empty.\n if (text.length > 0 || !OMITTED_WHEN_CLEAN.has(format)) {\n process.stdout.write(`${text}\\n`);\n }\n // `failed` counts files with an unbaselined error-severity finding;\n // warnings never move it.\n process.exitCode = run.summary.failed > 0 ? 1 : 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"add\")\n .description(\"Mint a citation for a source range and write it to a page\")\n .argument(\n \"<page>\",\n \"the page to cite from, with the claim's lines: page:L or page:L1-L2 (use - for stdin, with --as)\",\n )\n .argument(\n \"<src>\",\n \"path, path:L or path:L1-L2 relative to --root, or an encrypted ~source with the same line forms\",\n )\n .option(\"--id <id>\", \"kebab-case id, unique on the page; required with --marker\")\n .option(\"--marker\", \"write a cite <id> marker above the paragraph holding the page lines and pin the text it anchors\")\n .option(\"--quote\", \"the page lines are a fenced block that reproduces the source\")\n .option(\n \"--encrypt\",\n \"write source.file encrypted, with an hmac-sha256- pin; with no key, offer to create one (an available key encrypts without the flag)\",\n )\n .option(\"--no-commit-sha\", \"do not record HEAD\")\n .option(\"--dry-run\", \"print the diff; write nothing\")\n .option(\"--as <format>\", \"force the page format\")\n .option(\"--root <dir>\", \"directory source paths resolve from (as check)\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite add docs/limits.md:9 lib/limits.ts:2 --id fetch-timeout\",\n \" manni cite add docs/limits.md:30 lib/limits.ts:8-12 --id timeouts --marker\",\n \" manni cite add docs/limits.md:14-18 lib/limits.ts:1-3 --quote\",\n \" manni cite add docs/limits.md lib/limits.ts --dry-run\",\n \" cat page.md | manni cite add -:9 lib/limits.ts:2 --as markdown > out.md\",\n ].join(\"\\n\"),\n )\n .action(async (pageArgument: string, src: string, options: AddCliOptions) => {\n try {\n const { page, lines } = splitPageArgument(pageArgument);\n const usingStdin = page === STDIN_TOKEN;\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n const cwd = process.cwd();\n\n const result = await runAdd({\n page,\n pageLines: lines,\n src,\n id: options.id,\n marker: options.marker ? true : undefined,\n quote: options.quote ? true : undefined,\n // `undefined` when absent, so the key decides: an available one\n // encrypts without the flag.\n encrypt: options.encrypt ? true : undefined,\n commitSha: explicitFalse(options.commitSha),\n dryRun,\n as: options.as,\n ...configOption(options.config),\n // With `-` the page owns stdout; so does the diff under --dry-run.\n onConfigLoaded: reportConfig(!usingStdin && !dryRun, cwd),\n stdinContent,\n root: options.root,\n onNotice: notice,\n // Only on a terminal: off one, a missing key is a refusal, not a\n // question nobody can answer. With `-` stdin is the page, so no\n // question is put either.\n confirm: terminalConfirm(),\n });\n\n const message = addMessage(result);\n // A dry run prints every diff the write would make: the page's, and\n // the manifest's when the entry goes there.\n const diffs = [result.diff, result.manifest?.diff ?? \"\"].filter((d) => d.length > 0);\n if (usingStdin) {\n // The rewritten page owns stdout; everything else is a diagnostic.\n process.stdout.write(result.content);\n if (dryRun) for (const diff of diffs) process.stderr.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else if (dryRun) {\n for (const diff of diffs) process.stdout.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else {\n process.stdout.write(`${message}\\n`);\n }\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"update\")\n .description(\"Rewrite moved citations in place; with --accept, re-mint changed ones\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to update (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"update files .gitignore covers\")\n .option(\"--no-check-sources\", \"refused: update needs the sources\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\"--accept\", \"re-mint changed and never-true entries at HEAD; prints old and new pins\")\n .option(\n \"--recommit\",\n \"re-record commit-sha where the recorded commit does not contain the pinned lines, or is outside HEAD's history\",\n )\n .option(\"--only <id>\", \"limit to entries with this id; repeatable\", collect, [])\n .option(\"--dry-run\", \"print the diffs; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${UPDATE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite update docs/ # rewrite moved entries\",\n \" manni cite update --accept --only fetch-timeout docs/limits.md\",\n \" manni cite update --dry-run docs/ # see the diffs first\",\n \" manni cite update --recommit docs/ # repair unsupported commit-sha\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: UpdateCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isUpdateFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n if (!options.checkSources) {\n throw new CiteError(\n \"update needs the sources: drop --no-check-sources (or `checkSources: false`).\",\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, as it does for `add -`; a\n // dry run prints the diffs instead, so the report keeps stdout.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runUpdate({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n accept: options.accept ? true : undefined,\n recommit: options.recommit ? true : undefined,\n only: options.only.length > 0 ? options.only : undefined,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderUpdateJson(run)\n : renderUpdatePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it rewrote and leaves the file to say the rest.\n showDiff: dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Exit 1 when something was skipped with an error-severity finding:\n // work left undone, `fill`'s precedent.\n process.exitCode = run.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"remove\")\n .description(\"Remove the named citations from the given pages, markers and all\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to remove from (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\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(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"remove from files .gitignore covers\")\n .option(\n \"--only <id>\",\n \"the entry to remove, by id or by pointer (/citations/N); required, and repeatable\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print the diffs and the report; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${REMOVE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite remove docs/limits.md --only fetch-timeout\",\n \" manni cite remove docs/ --only fetch-timeout --only retries --dry-run\",\n \" manni cite remove --collection site --only /citations/3 -f json\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RemoveCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isRemoveFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, exactly as on `update -`.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runRemove({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n only: options.only,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderRemoveJson(run)\n : renderRemovePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it removed and leaves the file to say the rest.\n showDiff: dryRun,\n dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Everything named was removed, or previewed: there is no exit 1.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * SARIF for `check`. Meta's renderer builds the envelope, the\n * repository-relative uris and the fingerprints the baseline shares, from the\n * adapted results. What it cannot know is what a cite rule is: it describes\n * every rule as a schema keyword, links meta's fix page, and prefixes each\n * message with the JSON Pointer of the entry, `(root)` for a finding about no\n * entry. This renderer replaces those three with the cite rule's own\n * description, a link to its row of the citations reference, and the message\n * the github annotation carries, which names the citation the pointer only\n * numbered. A message is no part of a fingerprint, so the baseline is\n * unaffected.\n */\nimport { renderSarif, type ValidationResult } from \"../../meta/index.js\";\nimport { errorSite } from \"../core/adapt.js\";\nimport { RULE_ID_PREFIX, isCiteRule } from \"../core/severity.js\";\nimport type { CheckRun, CiteRule } from \"../types.js\";\nimport { findingMessage } from \"./github.js\";\n\nconst INFORMATION_URI = \"https://hawkeyexl.github.io/manni/cite/\";\n\n/** The citations reference, whose rule tables anchor each row by rule name. */\nconst RULES_URI = \"https://hawkeyexl.github.io/manni/cite/reference/citations/\";\n\n/** What each rule is, as the citations reference's tables say it. */\nconst RULE_DESCRIPTIONS: Readonly<Record<CiteRule, string>> = {\n \"source-moved\": \"The cited source lines moved to one other place in the file.\",\n \"source-moved-ambiguous\": \"The cited source lines now match at several places in the file.\",\n \"source-changed\": \"The cited source lines changed since the citation pinned them.\",\n \"source-never-true\": \"The pin never matched the source at the recorded commit.\",\n \"source-missing\": \"The cited source file is not tracked under the root, or cannot be decrypted.\",\n \"claim-moved\": \"The cited sentence moved to other lines of the page.\",\n \"claim-moved-ambiguous\": \"The cited sentence now appears at several places on the page.\",\n \"claim-reanchored\": \"The cited sentence's words are unchanged since the claim's baseline, and only its layout moved.\",\n \"claim-changed\": \"The cited sentence was edited since the citation pinned it.\",\n \"marker-orphan\": \"A marker names an id no citation has.\",\n \"marker-invalid\": \"A marker is malformed, or the page has too many markers.\",\n \"marker-repeated\": \"Two markers name the same citation id.\",\n \"marker-misplaced\": \"A marker line sits inside the paragraph it anchors, and splits it.\",\n \"anchor-invalid\": \"A citation's anchor cannot work.\",\n \"entry-invalid\": \"A citation entry is malformed.\",\n \"quote-drift\": \"A quoted block no longer reproduces its source.\",\n};\n\n/**\n * The label meta's reporters put before a message: `(root) ` for a finding\n * about no entry, `/citations/N ` for one about an entry. Nothing else ever\n * opens a cite finding's adapted message.\n */\nexport const ENTRY_LABEL = /^(?:\\(root\\)|\\/citations\\/\\d+) /;\n\nexport interface SarifRule {\n id: string;\n shortDescription: { text: string };\n helpUri?: string;\n}\n\n/** As much of meta's SARIF as this renderer and its tests read back. */\nexport interface SarifLog {\n runs: {\n tool: { driver: { informationUri: string; rules: SarifRule[] } };\n results: { ruleId: string; message: { text: string } }[];\n }[];\n}\n\n/**\n * The adapted results with each message rewritten as the github annotation\n * says it. An error is paired with its finding by rule, entry, line and\n * message, as the baseline split pairs them; the baseline has already\n * dropped the errors it forgives.\n */\nexport function withFindingMessages(run: CheckRun): ValidationResult[] {\n return run.results.map((result) => {\n const page = run.pages.find((p) => p.file === result.file);\n if (page === undefined) return result;\n const errors = result.errors.map((error) => {\n const finding = page.findings.find(\n (f) =>\n f.rule === error.keyword &&\n (f.index === undefined ? \"\" : `/citations/${String(f.index)}`) === error.instancePath &&\n f.message === error.message &&\n (errorSite(f).line ?? null) === (error.line ?? null),\n );\n return finding === undefined ? error : { ...error, message: findingMessage(finding) };\n });\n return { ...result, errors };\n });\n}\n\n/** A rule as the citation tool describes it. */\nfunction describe(rule: SarifRule): SarifRule {\n const name = rule.id.slice(RULE_ID_PREFIX.length + 1);\n if (!isCiteRule(name)) return rule;\n return { id: rule.id, shortDescription: { text: RULE_DESCRIPTIONS[name] }, helpUri: `${RULES_URI}#${name}` };\n}\n\nexport function renderCheckSarif(run: CheckRun, opts: { onNotice?: (message: string) => void } = {}): string {\n const log = JSON.parse(\n renderSarif(withFindingMessages(run), {\n frame: run.frame,\n ...(opts.onNotice === undefined ? {} : { onNotice: opts.onNotice }),\n }),\n ) as SarifLog;\n for (const sarifRun of log.runs) {\n sarifRun.tool.driver.informationUri = INFORMATION_URI;\n sarifRun.tool.driver.rules = sarifRun.tool.driver.rules.map(describe);\n for (const result of sarifRun.results) result.message.text = result.message.text.replace(ENTRY_LABEL, \"\");\n }\n return JSON.stringify(log, null, 2);\n}\n","/**\n * JUnit for `check`: meta's renderer over the adapted results, under the\n * `manni.cite` classname, with each failure's message the one the github\n * annotation carries.\n * Meta's renderer opens every message with the entry's JSON Pointer, `(root)`\n * for a finding about no entry, which says nothing about a citation. The\n * failure's `type` is already the rule id.\n */\nimport { renderJunit } from \"../../meta/index.js\";\nimport type { CheckRun } from \"../types.js\";\nimport { ENTRY_LABEL, withFindingMessages } from \"./sarif.js\";\n\n/** JUnit `classname` for the citation tool's findings. */\nexport const JUNIT_CLASSNAME = \"manni.cite\";\n\n/** A `message=\"` attribute's opening label. The value is escaped, so `message=\"` opens nothing else. */\nconst MESSAGE_LABEL = new RegExp(`message=\"${ENTRY_LABEL.source.replace(/^\\^/, \"\")}`, \"g\");\n\nexport function renderCheckJunit(run: CheckRun): string {\n return renderJunit(withFindingMessages(run), { frame: run.frame, classname: JUNIT_CLASSNAME }).replace(\n MESSAGE_LABEL,\n 'message=\"',\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,QAAQ,IAAI;AAExB,YAAM,MAAM,MAAM,UAAU;AAAA,QAC1B,QAAQ;AAAA,QACR,YAAY,QAAQ;AAAA,QACpB;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,IAAI,QAAQ;AAAA,QACZ,GAAG,aAAa,QAAQ,MAAM;AAAA,QAC9B,gBAAgB,aAAa,WAAW,YAAY,CAAC,cAAc,GAAG;AAAA,QACtE;AAAA,QACA,YAAY,QAAQ,aAAa,OAAO;AAAA,QACxC,kBAAkB,cAAc,QAAQ,SAAS;AAAA,QACjD,UAAU;AAAA,QACV,MAAM,QAAQ;AAAA,QACd;AAAA,MACF,CAAC;AAED,YAAM,OACJ,WAAW,SACP,iBAAiB,GAAG,IACpB,mBAAmB,KAAK;AAAA,QACtB,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK;AAAA;AAAA;AAAA,QAG7C,UAAU;AAAA,QACV;AAAA,MACF,CAAC;AACP,YAAM,YAAY,eAAe,IAAI,MAAM,KAAK,CAAC,SAAS,KAAK,YAAY,MAAS,IAAI;AACxF,UAAI,WAAW,YAAY,QAAW;AACpC,gBAAQ,OAAO,MAAM,UAAU,OAAO;AACtC,gBAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAAA,MAClC,OAAO;AACL,gBAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAAA,MAClC;AAEA,cAAQ,WAAW;AAAA,IACrB,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":["splitPageArgument"]}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
idHash
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BBT6AVUG.js";
|
|
5
|
+
import "./chunk-4CK6ZSOK.js";
|
|
6
|
+
import "./chunk-CWXZ2MRT.js";
|
|
6
7
|
import {
|
|
7
8
|
readStdin
|
|
8
9
|
} from "./chunk-TZOYZK2E.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-XTAHZTES.js";
|
|
11
|
-
import "./chunk-4TSWU2SU.js";
|
|
10
|
+
import "./chunk-R4WXQIOZ.js";
|
|
12
11
|
import {
|
|
13
12
|
DEFAULT_CAPTURE_DIR
|
|
14
13
|
} from "./chunk-CU57HT2E.js";
|
|
14
|
+
import "./chunk-4TSWU2SU.js";
|
|
15
15
|
import "./chunk-UKZNLVJW.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-TU2WUBVZ.js";
|
|
17
|
+
import "./chunk-LKP7QDFN.js";
|
|
18
|
+
import "./chunk-6HWBRZIN.js";
|
|
19
|
+
import "./chunk-M42DZCOU.js";
|
|
20
|
+
import "./chunk-PCQ7ELJH.js";
|
|
18
21
|
import {
|
|
19
22
|
memberOf,
|
|
20
23
|
retainMembers
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-GV56WGL2.js";
|
|
25
|
+
import "./chunk-D4N2V43Z.js";
|
|
23
26
|
import {
|
|
24
27
|
extractorForExtension,
|
|
25
28
|
resolveTargetSet,
|
|
26
29
|
supportedExtensions,
|
|
27
30
|
withSharedWalks
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VSEBFHAY.js";
|
|
29
32
|
import {
|
|
30
33
|
fail
|
|
31
34
|
} from "./chunk-YEUYKR62.js";
|
|
@@ -36,7 +39,7 @@ import "./chunk-MNH7QO4Z.js";
|
|
|
36
39
|
import {
|
|
37
40
|
findFamilyConfigFile,
|
|
38
41
|
readFamilyConfigFile
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QLWC7MKD.js";
|
|
40
43
|
import {
|
|
41
44
|
notice,
|
|
42
45
|
warn
|
|
@@ -44,7 +47,7 @@ import {
|
|
|
44
47
|
import "./chunk-QCHVR4ZM.js";
|
|
45
48
|
import {
|
|
46
49
|
package_default
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-2MJ62AYQ.js";
|
|
48
51
|
import {
|
|
49
52
|
programName
|
|
50
53
|
} from "./chunk-OWBRDNRZ.js";
|
|
@@ -150,7 +153,9 @@ var NOT_SET_UP = {
|
|
|
150
153
|
};
|
|
151
154
|
var META_DEFAULTS_ONLY = "only the built-in default schemas cover these files";
|
|
152
155
|
var NOT_CHECKED = [
|
|
153
|
-
["a11y", "run manni
|
|
156
|
+
["a11y", "run manni site preview, then manni a11y check"],
|
|
157
|
+
// Doc Detective runs the shell steps pages carry, so a hook never starts it.
|
|
158
|
+
["test", "run manni test run with Doc Detective installed"],
|
|
154
159
|
["tracevals", "run manni tracevals run over sessions"]
|
|
155
160
|
];
|
|
156
161
|
function plural(n, one, many = `${one}s`) {
|
|
@@ -261,8 +266,8 @@ async function runDomain(domain, ctx) {
|
|
|
261
266
|
switch (domain) {
|
|
262
267
|
case "meta": {
|
|
263
268
|
const [{ runValidate }, { render: renderMeta }] = await Promise.all([
|
|
264
|
-
import("./validate-
|
|
265
|
-
import("./reporters-
|
|
269
|
+
import("./validate-ZBW44RHT.js"),
|
|
270
|
+
import("./reporters-RBYTASMI.js")
|
|
266
271
|
]);
|
|
267
272
|
const run2 = await runValidate({ inputs, configPath, cwd, skipDefaultOnly: true, onNotice });
|
|
268
273
|
if (run2.results.length === 0) {
|
|
@@ -275,10 +280,10 @@ async function runDomain(domain, ctx) {
|
|
|
275
280
|
}
|
|
276
281
|
case "cite": {
|
|
277
282
|
const [{ runCheck: runCite }, { renderCheckPretty: citePretty }, { renderCheckJson: citeJson }, { renderCheckGithub: citeGithub }] = await Promise.all([
|
|
278
|
-
import("./check-
|
|
279
|
-
import("./pretty-
|
|
283
|
+
import("./check-YEOYBFST.js"),
|
|
284
|
+
import("./pretty-Q5Y2PA64.js"),
|
|
280
285
|
import("./json-7WV7KL6H.js"),
|
|
281
|
-
import("./github-
|
|
286
|
+
import("./github-YKQSH7FS.js")
|
|
282
287
|
]);
|
|
283
288
|
const run2 = await runCite({ inputs, configPath, cwd, onNotice });
|
|
284
289
|
if (!run2.pages.some((p) => p.citations.length > 0 || p.findings.length > 0)) {
|
|
@@ -292,8 +297,8 @@ async function runDomain(domain, ctx) {
|
|
|
292
297
|
case "lint": {
|
|
293
298
|
if (!family.sections.has("lint")) return { skipped: NOT_SET_UP.lint };
|
|
294
299
|
const [{ runLint }, { render: renderLint }] = await Promise.all([
|
|
295
|
-
import("./lint-
|
|
296
|
-
import("./reporters-
|
|
300
|
+
import("./lint-YJ2L22BW.js"),
|
|
301
|
+
import("./reporters-A5ADKDYR.js")
|
|
297
302
|
]);
|
|
298
303
|
const run2 = await runLint({ inputs, configPath, cwd, onNotice });
|
|
299
304
|
return {
|
|
@@ -303,7 +308,7 @@ async function runDomain(domain, ctx) {
|
|
|
303
308
|
}
|
|
304
309
|
case "docevals": {
|
|
305
310
|
const [{ runRun: runDocevals }, { render: renderDocevals }, { DocevalsError }] = await Promise.all([
|
|
306
|
-
import("./run-
|
|
311
|
+
import("./run-BUE2DDXN.js"),
|
|
307
312
|
import("./reporters-M6LJ2IYU.js"),
|
|
308
313
|
import("./types-Y6TXHM7M.js")
|
|
309
314
|
]);
|
|
@@ -330,10 +335,10 @@ async function runDomain(domain, ctx) {
|
|
|
330
335
|
}
|
|
331
336
|
case "term": {
|
|
332
337
|
const [{ runCheck: runTerm }, { renderFindingsPretty: termPretty }, { renderFindingsJson: termJson }, { renderFindingsGithub: termGithub }] = await Promise.all([
|
|
333
|
-
import("./check-
|
|
334
|
-
import("./pretty-
|
|
335
|
-
import("./json-
|
|
336
|
-
import("./github-
|
|
338
|
+
import("./check-WOQRKNZK.js"),
|
|
339
|
+
import("./pretty-SCRK66M5.js"),
|
|
340
|
+
import("./json-BXY44ED7.js"),
|
|
341
|
+
import("./github-RY3FRA6P.js")
|
|
337
342
|
]);
|
|
338
343
|
const report = await runTerm({ inputs, configPath, cwd, allowEmpty: true, onNotice });
|
|
339
344
|
if (report.terms === 0) return { skipped: NOT_SET_UP.term };
|
|
@@ -345,8 +350,8 @@ async function runDomain(domain, ctx) {
|
|
|
345
350
|
case "graph": {
|
|
346
351
|
if (!family.sections.has("graph")) return { skipped: NOT_SET_UP.graph };
|
|
347
352
|
const [{ buildGraph }, { runCheck: runGraph, renderCheck: renderGraph }] = await Promise.all([
|
|
348
|
-
import("./build-
|
|
349
|
-
import("./check-
|
|
353
|
+
import("./build-QSPNK5AL.js"),
|
|
354
|
+
import("./check-MDGXEUWL.js")
|
|
350
355
|
]);
|
|
351
356
|
const built = await buildGraph({ config: configPath, cwd });
|
|
352
357
|
for (const warning of built.warnings) onNotice(warning);
|
|
@@ -559,7 +564,7 @@ async function runTurnCheck(envelope, cwd, seams = {}) {
|
|
|
559
564
|
let renderTurn;
|
|
560
565
|
try {
|
|
561
566
|
const [{ checkTurn }, reporters] = await Promise.all([
|
|
562
|
-
import("./check-
|
|
567
|
+
import("./check-VELUQAUW.js"),
|
|
563
568
|
import("./runtime-7QE3DW6S.js")
|
|
564
569
|
]);
|
|
565
570
|
renderTurn = reporters.renderCheck;
|
|
@@ -612,7 +617,7 @@ async function tracevalsRow(cwd, opts) {
|
|
|
612
617
|
{ assertProviderSelection, resolveSelectionIdentity, selectHookProvider, selectProvider },
|
|
613
618
|
{ hostStatus }
|
|
614
619
|
] = await Promise.all([
|
|
615
|
-
import("./config-
|
|
620
|
+
import("./config-XDA42RJL.js"),
|
|
616
621
|
import("./provider-527CO4DM.js"),
|
|
617
622
|
import("./host-6GURH5HE.js")
|
|
618
623
|
]);
|
|
@@ -654,8 +659,8 @@ function ownSchemaCount(cwd, members) {
|
|
|
654
659
|
return n;
|
|
655
660
|
}
|
|
656
661
|
async function citedPages(cwd, configPath) {
|
|
657
|
-
const { prepareRun, readTarget } = await import("./check-
|
|
658
|
-
const { readPage } = await import("./page-
|
|
662
|
+
const { prepareRun, readTarget } = await import("./check-YEOYBFST.js");
|
|
663
|
+
const { readPage } = await import("./page-EV7OUBAU.js");
|
|
659
664
|
const prepared = await prepareRun({ inputs: [], configPath, cwd, checkSources: false }, "checked", "check");
|
|
660
665
|
let n = 0;
|
|
661
666
|
for (const file of prepared.files) {
|
|
@@ -682,14 +687,14 @@ async function row(domain, family, cwd, members) {
|
|
|
682
687
|
return n > 0 ? inPlay(pages(n, "carries citations", "carry citations")) : notSetUp;
|
|
683
688
|
}
|
|
684
689
|
case "docevals": {
|
|
685
|
-
const { runList: listEvals } = await import("./list-
|
|
690
|
+
const { runList: listEvals } = await import("./list-V6EGCSHX.js");
|
|
686
691
|
const { plans } = await listEvals([], { config: configPath, cwd });
|
|
687
692
|
const n = plans.filter((p) => !p.skip && p.evals.length > 0).length;
|
|
688
693
|
if (n === 0) return notSetUp;
|
|
689
694
|
return inPlay(section ? "docevals: section" : pages(n, "declares evals", "declare evals"));
|
|
690
695
|
}
|
|
691
696
|
case "term": {
|
|
692
|
-
const { runList: listTerms } = await import("./list-
|
|
697
|
+
const { runList: listTerms } = await import("./list-NSG24VVX.js");
|
|
693
698
|
const { terms } = await listTerms({ inputs: [], configPath, cwd, allowEmpty: true });
|
|
694
699
|
return terms.length > 0 ? inPlay(plural(terms.length, "term")) : notSetUp;
|
|
695
700
|
}
|
|
@@ -904,4 +909,4 @@ export {
|
|
|
904
909
|
buildStatus,
|
|
905
910
|
hookScope
|
|
906
911
|
};
|
|
907
|
-
//# sourceMappingURL=cli-
|
|
912
|
+
//# sourceMappingURL=cli-DRMZBZLB.js.map
|