@hawkeyexl/manni 4.4.1 → 4.5.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.
Files changed (163) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-GFNLTGOH.js → batch-GOE3UXOD.js} +11 -11
  3. package/dist/{build-COYIQ25L.js → build-M7BMEHL2.js} +13 -11
  4. package/dist/{calibrate-MDBLJKEE.js → calibrate-6RRAILUY.js} +12 -12
  5. package/dist/{capture-LRML2PKV.js → capture-RJPQ6B4N.js} +12 -12
  6. package/dist/{check-EDLBYL5N.js → check-BQD64X3N.js} +11 -11
  7. package/dist/{check-HYNGXYJV.js → check-ESNS7ZBC.js} +4 -4
  8. package/dist/{check-ASPIHA6B.js → check-RQIIIURI.js} +12 -12
  9. package/dist/{chunk-NXV7WE2D.js → chunk-3R5Y3XOL.js} +3 -3
  10. package/dist/{chunk-A5ULMVHQ.js → chunk-3YHAYXBC.js} +2 -2
  11. package/dist/{chunk-57NEQRVO.js → chunk-527HHQPS.js} +4 -4
  12. package/dist/{chunk-57NEQRVO.js.map → chunk-527HHQPS.js.map} +1 -1
  13. package/dist/{chunk-6OYEI2VV.js → chunk-52PDIZKV.js} +3 -3
  14. package/dist/{chunk-UJCVAWP7.js → chunk-6XTQDFGP.js} +2 -2
  15. package/dist/{chunk-UJCVAWP7.js.map → chunk-6XTQDFGP.js.map} +1 -1
  16. package/dist/{chunk-3VK37OR2.js → chunk-7OQAU4EA.js} +5 -5
  17. package/dist/{chunk-4IUC2MNL.js → chunk-7ZUCEMCY.js} +8 -8
  18. package/dist/{chunk-M2JCK5F6.js → chunk-B7XUEQF3.js} +13 -2
  19. package/dist/chunk-B7XUEQF3.js.map +1 -0
  20. package/dist/{chunk-MYMBCTDE.js → chunk-BOIF2XGG.js} +2 -2
  21. package/dist/{chunk-YJOGUXGP.js → chunk-C3KI45RF.js} +8 -6
  22. package/dist/{chunk-YJOGUXGP.js.map → chunk-C3KI45RF.js.map} +1 -1
  23. package/dist/{chunk-MMTSSTG7.js → chunk-C6HZ6C5T.js} +2 -2
  24. package/dist/{chunk-QQUKGCAJ.js → chunk-CP4ZM43V.js} +2 -2
  25. package/dist/chunk-DE7JSWXV.js +2462 -0
  26. package/dist/chunk-DE7JSWXV.js.map +1 -0
  27. package/dist/{chunk-YB4IBW3M.js → chunk-DX32P2DT.js} +2 -2
  28. package/dist/{chunk-RL5XWQOL.js → chunk-EL2BZTDL.js} +137 -50
  29. package/dist/chunk-EL2BZTDL.js.map +1 -0
  30. package/dist/{chunk-WB3QM6PP.js → chunk-ELZ2IIOF.js} +332 -2522
  31. package/dist/chunk-ELZ2IIOF.js.map +1 -0
  32. package/dist/{chunk-MWJLZMBL.js → chunk-F2OVHJNC.js} +10 -10
  33. package/dist/{chunk-I2AH3CJJ.js → chunk-FLF6AECQ.js} +7 -7
  34. package/dist/{chunk-GCQRPUSB.js → chunk-GAZFKZHM.js} +4 -4
  35. package/dist/{chunk-QZ6LRSNV.js → chunk-HQFVJDEN.js} +7 -7
  36. package/dist/{chunk-M3W7J6MU.js → chunk-HVFR66GQ.js} +2 -2
  37. package/dist/{chunk-2B7ZNTPV.js → chunk-IA7BMIPE.js} +2 -2
  38. package/dist/{chunk-PIKOVN6W.js → chunk-JQU7FHYH.js} +6 -6
  39. package/dist/{chunk-NLXTXE5Y.js → chunk-K3U5F2QT.js} +183 -31
  40. package/dist/chunk-K3U5F2QT.js.map +1 -0
  41. package/dist/{chunk-JCDXE76J.js → chunk-MZC62HPZ.js} +2 -2
  42. package/dist/{chunk-TK3FC4RF.js → chunk-NAZRLJAK.js} +3 -3
  43. package/dist/{chunk-JXLTXMJ7.js → chunk-NGK3N6F2.js} +3 -3
  44. package/dist/{chunk-PU6DFJMY.js → chunk-NN4ASVTY.js} +3 -3
  45. package/dist/{chunk-C4SQM22E.js → chunk-OIZ3XMKB.js} +13 -11
  46. package/dist/chunk-OIZ3XMKB.js.map +1 -0
  47. package/dist/{chunk-6JSSEWBG.js → chunk-QCBICNKC.js} +6 -6
  48. package/dist/chunk-QCBICNKC.js.map +1 -0
  49. package/dist/{chunk-DXNZS72W.js → chunk-QLUMKWQQ.js} +3 -3
  50. package/dist/{chunk-EPH54CAY.js → chunk-QY3DOZMS.js} +4 -4
  51. package/dist/{chunk-FBEQCK47.js → chunk-SJO2FTPG.js} +6 -6
  52. package/dist/{chunk-PNPQTHBT.js → chunk-SNEHX4VE.js} +2 -2
  53. package/dist/{chunk-SKSDRUUK.js → chunk-TA42STP7.js} +4 -4
  54. package/dist/{chunk-CK7SKVHR.js → chunk-TBAMBLF3.js} +3 -12
  55. package/dist/chunk-TBAMBLF3.js.map +1 -0
  56. package/dist/{chunk-IDV6HJCB.js → chunk-TCC737IS.js} +3 -3
  57. package/dist/{chunk-QRWGPQKO.js → chunk-TVIX653Q.js} +3 -3
  58. package/dist/{chunk-YTURO7SI.js → chunk-UK2I3ACY.js} +3 -3
  59. package/dist/{chunk-7UKO3ASZ.js → chunk-XWFNO5PO.js} +3 -3
  60. package/dist/{chunk-37LP5HMZ.js → chunk-YA63PVWI.js} +5 -5
  61. package/dist/chunk-YGFIQ6Y5.js +17 -0
  62. package/dist/chunk-YGFIQ6Y5.js.map +1 -0
  63. package/dist/{chunk-UQISLDAV.js → chunk-ZX43SRZR.js} +3 -3
  64. package/dist/{cli-MN7PYMBI.js → cli-6PGVHP7Y.js} +15 -15
  65. package/dist/{cli-6UB5N6CU.js → cli-AAG3N4NB.js} +16 -16
  66. package/dist/{cli-6HIDIFVT.js → cli-E3H6ZP4I.js} +2 -2
  67. package/dist/{cli-RPM5PELX.js → cli-HUIMNJT6.js} +20 -15
  68. package/dist/cli-HUIMNJT6.js.map +1 -0
  69. package/dist/{cli-VI7VHWNZ.js → cli-MHTYPVOD.js} +16 -16
  70. package/dist/{cli-LFP5ZGYS.js → cli-PRZHQ3QB.js} +15 -13
  71. package/dist/{cli-LFP5ZGYS.js.map → cli-PRZHQ3QB.js.map} +1 -1
  72. package/dist/{cli-3BIBYHFK.js → cli-QKIJOXGW.js} +13 -13
  73. package/dist/{cli-PYPX6O6E.js → cli-TYGOHJOJ.js} +25 -25
  74. package/dist/{cli-673OTRGE.js → cli-YW6VWBHX.js} +9 -9
  75. package/dist/cli.js +11 -11
  76. package/dist/docmeta.js +8 -8
  77. package/dist/{github-SXPGP5DB.js → github-3WMSTNTK.js} +13 -13
  78. package/dist/{github-6QMYOHC3.js → github-OXSJQ4PS.js} +11 -11
  79. package/dist/index.d.ts +30 -8
  80. package/dist/index.js +42 -38
  81. package/dist/index.js.map +1 -1
  82. package/dist/{json-SY7KLNC7.js → json-4DCKDGUV.js} +11 -11
  83. package/dist/lint-YDHVVZHT.js +30 -0
  84. package/dist/{list-KZNVTNVC.js → list-3ZO2NIYO.js} +11 -11
  85. package/dist/{list-Q57YTFUQ.js → list-EJH6VAOW.js} +11 -11
  86. package/dist/{page-KSGV5RD4.js → page-QEDB7EVU.js} +10 -10
  87. package/dist/{pretty-A5EGTN35.js → pretty-5DGEBZSV.js} +11 -11
  88. package/dist/{pretty-CXSDXNAS.js → pretty-SQX33UM2.js} +12 -12
  89. package/dist/{reporters-HUY7UXFS.js → reporters-OHSI3RMV.js} +12 -11
  90. package/dist/{reporters-K2VUKSAK.js → reporters-YELDDYJD.js} +4 -4
  91. package/dist/{run-3DYJNRIG.js → run-IP6NZHAG.js} +11 -11
  92. package/dist/{term-BIQUPMOR.js → term-2WMDZ4PY.js} +15 -15
  93. package/dist/{validate-53RKM2XG.js → validate-G6HH3YXL.js} +5 -5
  94. package/package.json +1 -1
  95. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  96. package/dist/chunk-6JSSEWBG.js.map +0 -1
  97. package/dist/chunk-C4SQM22E.js.map +0 -1
  98. package/dist/chunk-CK7SKVHR.js.map +0 -1
  99. package/dist/chunk-M2JCK5F6.js.map +0 -1
  100. package/dist/chunk-NLXTXE5Y.js.map +0 -1
  101. package/dist/chunk-RL5XWQOL.js.map +0 -1
  102. package/dist/chunk-WB3QM6PP.js.map +0 -1
  103. package/dist/cli-RPM5PELX.js.map +0 -1
  104. package/dist/lint-ASMJLLPA.js +0 -28
  105. /package/dist/{batch-GFNLTGOH.js.map → batch-GOE3UXOD.js.map} +0 -0
  106. /package/dist/{build-COYIQ25L.js.map → build-M7BMEHL2.js.map} +0 -0
  107. /package/dist/{calibrate-MDBLJKEE.js.map → calibrate-6RRAILUY.js.map} +0 -0
  108. /package/dist/{capture-LRML2PKV.js.map → capture-RJPQ6B4N.js.map} +0 -0
  109. /package/dist/{check-ASPIHA6B.js.map → check-BQD64X3N.js.map} +0 -0
  110. /package/dist/{check-EDLBYL5N.js.map → check-ESNS7ZBC.js.map} +0 -0
  111. /package/dist/{check-HYNGXYJV.js.map → check-RQIIIURI.js.map} +0 -0
  112. /package/dist/{chunk-NXV7WE2D.js.map → chunk-3R5Y3XOL.js.map} +0 -0
  113. /package/dist/{chunk-A5ULMVHQ.js.map → chunk-3YHAYXBC.js.map} +0 -0
  114. /package/dist/{chunk-6OYEI2VV.js.map → chunk-52PDIZKV.js.map} +0 -0
  115. /package/dist/{chunk-3VK37OR2.js.map → chunk-7OQAU4EA.js.map} +0 -0
  116. /package/dist/{chunk-4IUC2MNL.js.map → chunk-7ZUCEMCY.js.map} +0 -0
  117. /package/dist/{chunk-MYMBCTDE.js.map → chunk-BOIF2XGG.js.map} +0 -0
  118. /package/dist/{chunk-MMTSSTG7.js.map → chunk-C6HZ6C5T.js.map} +0 -0
  119. /package/dist/{chunk-QQUKGCAJ.js.map → chunk-CP4ZM43V.js.map} +0 -0
  120. /package/dist/{chunk-YB4IBW3M.js.map → chunk-DX32P2DT.js.map} +0 -0
  121. /package/dist/{chunk-MWJLZMBL.js.map → chunk-F2OVHJNC.js.map} +0 -0
  122. /package/dist/{chunk-I2AH3CJJ.js.map → chunk-FLF6AECQ.js.map} +0 -0
  123. /package/dist/{chunk-GCQRPUSB.js.map → chunk-GAZFKZHM.js.map} +0 -0
  124. /package/dist/{chunk-QZ6LRSNV.js.map → chunk-HQFVJDEN.js.map} +0 -0
  125. /package/dist/{chunk-M3W7J6MU.js.map → chunk-HVFR66GQ.js.map} +0 -0
  126. /package/dist/{chunk-2B7ZNTPV.js.map → chunk-IA7BMIPE.js.map} +0 -0
  127. /package/dist/{chunk-PIKOVN6W.js.map → chunk-JQU7FHYH.js.map} +0 -0
  128. /package/dist/{chunk-JCDXE76J.js.map → chunk-MZC62HPZ.js.map} +0 -0
  129. /package/dist/{chunk-TK3FC4RF.js.map → chunk-NAZRLJAK.js.map} +0 -0
  130. /package/dist/{chunk-JXLTXMJ7.js.map → chunk-NGK3N6F2.js.map} +0 -0
  131. /package/dist/{chunk-PU6DFJMY.js.map → chunk-NN4ASVTY.js.map} +0 -0
  132. /package/dist/{chunk-DXNZS72W.js.map → chunk-QLUMKWQQ.js.map} +0 -0
  133. /package/dist/{chunk-EPH54CAY.js.map → chunk-QY3DOZMS.js.map} +0 -0
  134. /package/dist/{chunk-FBEQCK47.js.map → chunk-SJO2FTPG.js.map} +0 -0
  135. /package/dist/{chunk-PNPQTHBT.js.map → chunk-SNEHX4VE.js.map} +0 -0
  136. /package/dist/{chunk-SKSDRUUK.js.map → chunk-TA42STP7.js.map} +0 -0
  137. /package/dist/{chunk-IDV6HJCB.js.map → chunk-TCC737IS.js.map} +0 -0
  138. /package/dist/{chunk-QRWGPQKO.js.map → chunk-TVIX653Q.js.map} +0 -0
  139. /package/dist/{chunk-YTURO7SI.js.map → chunk-UK2I3ACY.js.map} +0 -0
  140. /package/dist/{chunk-7UKO3ASZ.js.map → chunk-XWFNO5PO.js.map} +0 -0
  141. /package/dist/{chunk-37LP5HMZ.js.map → chunk-YA63PVWI.js.map} +0 -0
  142. /package/dist/{chunk-UQISLDAV.js.map → chunk-ZX43SRZR.js.map} +0 -0
  143. /package/dist/{cli-MN7PYMBI.js.map → cli-6PGVHP7Y.js.map} +0 -0
  144. /package/dist/{cli-6UB5N6CU.js.map → cli-AAG3N4NB.js.map} +0 -0
  145. /package/dist/{cli-6HIDIFVT.js.map → cli-E3H6ZP4I.js.map} +0 -0
  146. /package/dist/{cli-VI7VHWNZ.js.map → cli-MHTYPVOD.js.map} +0 -0
  147. /package/dist/{cli-3BIBYHFK.js.map → cli-QKIJOXGW.js.map} +0 -0
  148. /package/dist/{cli-PYPX6O6E.js.map → cli-TYGOHJOJ.js.map} +0 -0
  149. /package/dist/{cli-673OTRGE.js.map → cli-YW6VWBHX.js.map} +0 -0
  150. /package/dist/{github-6QMYOHC3.js.map → github-3WMSTNTK.js.map} +0 -0
  151. /package/dist/{github-SXPGP5DB.js.map → github-OXSJQ4PS.js.map} +0 -0
  152. /package/dist/{json-SY7KLNC7.js.map → json-4DCKDGUV.js.map} +0 -0
  153. /package/dist/{lint-ASMJLLPA.js.map → lint-YDHVVZHT.js.map} +0 -0
  154. /package/dist/{list-KZNVTNVC.js.map → list-3ZO2NIYO.js.map} +0 -0
  155. /package/dist/{list-Q57YTFUQ.js.map → list-EJH6VAOW.js.map} +0 -0
  156. /package/dist/{page-KSGV5RD4.js.map → page-QEDB7EVU.js.map} +0 -0
  157. /package/dist/{pretty-A5EGTN35.js.map → pretty-5DGEBZSV.js.map} +0 -0
  158. /package/dist/{pretty-CXSDXNAS.js.map → pretty-SQX33UM2.js.map} +0 -0
  159. /package/dist/{reporters-HUY7UXFS.js.map → reporters-OHSI3RMV.js.map} +0 -0
  160. /package/dist/{reporters-K2VUKSAK.js.map → reporters-YELDDYJD.js.map} +0 -0
  161. /package/dist/{run-3DYJNRIG.js.map → run-IP6NZHAG.js.map} +0 -0
  162. /package/dist/{term-BIQUPMOR.js.map → term-2WMDZ4PY.js.map} +0 -0
  163. /package/dist/{validate-53RKM2XG.js.map → validate-G6HH3YXL.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lint/core/infer.ts","../src/lint/commands/templates.ts","../src/lint/commands/tools.ts"],"sourcesContent":["/**\n * Write a first template from a page that already has the shape its author\n * wants.\n *\n * The format is strict by default: every rule is one occurrence, and a section\n * no rule describes is a finding. A new author's first run against a\n * hand-written template is therefore a screen of unexpected sections, and this\n * is the escape. Proposal 0061's stress test 5 records it, and says the two\n * ship together.\n *\n * Two rules govern everything here.\n *\n * **The output must lint its input clean.** That is the whole contract, and it\n * is why each inference below is the weakest claim that still describes the\n * page. `contains:` lists only the kinds that are there, at `min: 1`, so a\n * section holding more of something still passes. A table's `columns:` is\n * claimed only where every table in that section agrees about them, and a code\n * block's `language:` only where every block in that section declares one -\n * both rules report per offending node, so a claim drawn from one node would\n * fail on its neighbour. A template that fails the page it was inferred from is\n * worse than no template: it hands a new author findings about the very\n * document they pointed at.\n *\n * **Nothing is optional and nothing repeats.** One page cannot show what\n * varies, so no `min: 0`, no `max`, no `repeat` and no `pattern` is invented.\n * Two sections with one heading are two rules. Loosening a heading into a list\n * or a pattern, marking a rule optional, and adding a trailing wildcard are the\n * author's edits, and the reference page says so.\n */\nimport { stringify as stringifyYaml } from \"yaml\";\nimport { LintError } from \"../types.js\";\nimport type {\n CodeNode,\n ContentKind,\n ContentNode,\n DocumentTree,\n Position,\n SectionNode,\n TableNode,\n} from \"../types.js\";\nimport { BLOCK_KINDS, BLOCK_KIND_NODE } from \"./template.js\";\nimport type {\n BlockKind,\n BlockRule,\n HeadingRule,\n Rule,\n Template,\n TemplateFile,\n} from \"./template.js\";\n\n/** How an inferred template is written out. */\nexport const INFER_FORMATS = [\"yaml\", \"json\"] as const;\nexport type InferFormat = (typeof INFER_FORMATS)[number];\n\nexport function isInferFormat(value: string): value is InferFormat {\n return (INFER_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Template names the schema's `templates` map accepts.\n *\n * Checked here rather than left to Ajv. `templates` is `additionalProperties:\n * false` beside a `patternProperties` key, so a name outside the pattern is\n * reported as an unexpected property - which names the offending key and says\n * nothing whatsoever about what is wrong with it.\n */\nconst TEMPLATE_NAME = /^[A-Za-z][A-Za-z0-9\\-_]*$/;\n\n/** The node each block-rule key counts, inverted: `codeBlock` -> `codeBlocks`. */\nconst KIND_KEY = new Map<ContentKind, BlockKind>(\n BLOCK_KINDS.map((key) => [BLOCK_KIND_NODE[key], key]),\n);\n\n/* -------------------------------------------------------------------------- *\n * The page as the template's subject\n * -------------------------------------------------------------------------- */\n\n/** A zero-width span at the top of a file, for a document with no sections. */\nfunction origin(): Position {\n return {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 },\n };\n}\n\n/** First section's start through the last one's end. */\nfunction span(sections: SectionNode[]): Position {\n const first = sections[0];\n const last = sections[sections.length - 1];\n if (!first || !last) return origin();\n return { start: { ...first.position.start }, end: { ...last.position.end } };\n}\n\n/**\n * The section the template describes: the page itself.\n *\n * Deliberately the same reading `validator.ts` applies, because the template\n * this produces is checked by that one. A page whose body is a single `# Title`\n * *is* that section; anything else - several top-level headings, or a body that\n * starts at `##` with no lead content - has no section standing for the page,\n * so one is synthesised with no heading of its own. The duplication is small\n * and the alternative is worse: an inference that read the page differently\n * from the checker would produce templates that fail their own source.\n */\nfunction pageSection(tree: DocumentTree): SectionNode {\n const [only] = tree.sections;\n if (tree.sections.length === 1 && only && only.level <= 1) return only;\n return {\n slug: \"\",\n title: \"\",\n level: 0,\n order: 0,\n parentSlug: null,\n titlePosition: null,\n position: span(tree.sections),\n children: [],\n sections: tree.sections,\n };\n}\n\n/* -------------------------------------------------------------------------- *\n * Content\n * -------------------------------------------------------------------------- */\n\n/** The header row's cells, in order, or none where the table has no header. */\nfunction headerCells(table: TableNode): string[] {\n const header = table.children.find((row) => row.header);\n return header ? header.children.map((cell) => cell.text) : [];\n}\n\n/**\n * `columns:` for a run of tables, where they all agree about it.\n *\n * `tables.columns` reports once per table whose header differs, so a claim\n * taken from the first of two unlike tables fails on the second - in the very\n * page it was drawn from. Where the tables disagree, or any of them has no\n * header row, the count alone is what the page can honestly be said to show.\n */\nfunction columnsOf(tables: TableNode[]): { columns?: string[] } {\n const headers = tables.map(headerCells);\n const [first] = headers;\n if (first === undefined || first.length === 0) return {};\n const same = (cells: string[]): boolean =>\n cells.length === first.length && cells.every((c, i) => c === first[i]);\n return headers.every(same) ? { columns: [...first] } : {};\n}\n\n/**\n * `language:` for a run of code blocks, where every one of them declares one.\n *\n * `codeBlocks.language` holds every block in the run to the accepted set, so a\n * section mixing a tagged fence with a bare one can claim nothing: the bare one\n * would fail. Where the tags differ the list form says what the page shows,\n * which is what \"one of these\" is for.\n */\nfunction languageOf(blocks: CodeNode[]): { language?: string | string[] } {\n const declared: string[] = [];\n for (const block of blocks) {\n if (block.language === undefined || block.language.length === 0) return {};\n declared.push(block.language);\n }\n const distinct = [...new Set(declared)];\n const [only] = distinct;\n if (only === undefined) return {};\n return { language: distinct.length === 1 ? only : distinct };\n}\n\n/**\n * What a section holds, as a `contains:` rule, or nothing where it holds none\n * of the kinds a template can count.\n *\n * `contains` rather than `sequence`: the page shows one order, and asserting it\n * would make moving a paragraph below a list a finding. Order is a claim its\n * author makes deliberately.\n */\nfunction inferContains(children: ContentNode[]): BlockRule | undefined {\n const byKey = new Map<BlockKind, ContentNode[]>();\n for (const node of children) {\n const key = KIND_KEY.get(node.kind);\n if (key === undefined) continue;\n const bucket = byKey.get(key);\n if (bucket) bucket.push(node);\n else byKey.set(key, [node]);\n }\n\n const rule: BlockRule = {};\n let any = false;\n // In `BLOCK_KINDS` order, not the order the page happens to put them in, so\n // two pages holding the same kinds produce byte-identical rules.\n for (const key of BLOCK_KINDS) {\n const nodes = byKey.get(key);\n if (nodes === undefined) continue;\n any = true;\n if (key === \"tables\") {\n rule.tables = { min: 1, ...columnsOf(nodes as TableNode[]) };\n } else if (key === \"codeBlocks\") {\n rule.codeBlocks = { min: 1, ...languageOf(nodes as CodeNode[]) };\n } else {\n // A computed key, as `validator.ts` does it: every other block rule is a\n // bare count, and nine near-identical branches would say less.\n Object.assign(rule, { [key]: { min: 1 } });\n }\n }\n return any ? rule : undefined;\n}\n\n/* -------------------------------------------------------------------------- *\n * Rules\n * -------------------------------------------------------------------------- */\n\n/**\n * A section's heading, as a rule about it.\n *\n * Exact text, because that is what the page shows; a one-of list or a pattern\n * is a generalisation only its author can make. `false` for a section with no\n * heading of its own - the implicit lead section, and the synthesised page -\n * because that is as specific a claim as naming one.\n *\n * An empty title is the one case with no spelling: the schema's `heading`\n * requires a non-empty string, and `false` would be a lie about a section that\n * does have a heading. The key is omitted, which matches any heading.\n */\nfunction inferHeading(section: SectionNode): HeadingRule | undefined {\n if (section.titlePosition === null) return false;\n return section.title.length > 0 ? section.title : undefined;\n}\n\n/** One section, and every section under it. */\nfunction inferRule(section: SectionNode): Rule {\n const rule: Rule = {};\n const heading = inferHeading(section);\n if (heading !== undefined) rule.heading = heading;\n const contains = inferContains(section.children);\n if (contains) rule.contains = contains;\n // Omitted, never `[]`. An absent `sections:` says nothing about the\n // subsections; an empty list says none are permitted.\n if (section.sections.length > 0) {\n rule.sections = section.sections.map(inferRule);\n }\n return rule;\n}\n\n/** The template one page describes: the page rule, with its sections under it. */\nexport function inferTemplate(tree: DocumentTree): Template {\n return inferRule(pageSection(tree));\n}\n\n/* -------------------------------------------------------------------------- *\n * The file\n * -------------------------------------------------------------------------- */\n\n/** Refuse a name the `templates` map cannot hold, in words that name the rule. */\nexport function assertTemplateName(name: string): string {\n if (TEMPLATE_NAME.test(name)) return name;\n throw new LintError(\n `\"${name}\" is not a usable template name. A name starts with a letter and ` +\n `holds only letters, digits, \"-\" and \"_\". Pass --name <name>.`,\n );\n}\n\n/** A one-template file, ready to serialize. */\nexport function inferTemplateFile(\n tree: DocumentTree,\n name: string,\n): TemplateFile {\n return { templates: { [assertTemplateName(name)]: inferTemplate(tree) } };\n}\n\n/**\n * Serialize a template file.\n *\n * `lineWidth: 0` turns off YAML's folding. A folded heading still parses back\n * to the same string, but a template is read and edited by hand, and a heading\n * broken across two lines is the one thing in this output a reader would\n * mistrust.\n */\nexport function renderTemplateFile(\n file: TemplateFile,\n format: InferFormat,\n): string {\n const text =\n format === \"json\"\n ? JSON.stringify(file, null, 2)\n : stringifyYaml(file, { lineWidth: 0 });\n return text.endsWith(\"\\n\") ? text : `${text}\\n`;\n}\n","/**\n * `templates` command cores.\n *\n * `runTemplates` reports the templates a run could resolve: the built-ins, plus\n * the named templates in any files given by `--templates` or by\n * `lint.templates` in the config, with the doctypes each serves.\n *\n * The `types` column is the part worth printing. It is what frontmatter\n * routing will match a page against, so seeing it is how someone works out\n * which `type:` value to write in a page - or that no template claims the one\n * they already wrote.\n *\n * `runTemplatesInfer` writes a first template from a page that already has the\n * shape its author wants. The inference itself is `../core/infer.ts`; what\n * lives here is the plumbing around it - which parser reads the page, what the\n * template is called, and where the file goes.\n *\n * Both return data; `src/lint/reporters/index.ts` renders the listing, and an\n * inferred template is already the text it will be written as.\n */\nimport { existsSync } from \"node:fs\";\nimport { mkdir, readFile } from \"node:fs/promises\";\nimport { basename, dirname, extname, resolve } from \"node:path\";\nimport { errorMessage, ToolError } from \"../../shared/errors.js\";\nimport { writeTextAtomic } from \"../../shared/write-file.js\";\nimport { LintError } from \"../types.js\";\nimport type { DocumentParser, DocumentTree } from \"../types.js\";\nimport {\n parserByName,\n parserForExtension,\n unsupportedFormatMessage,\n} from \"../parsers/index.js\";\nimport {\n assertTemplateName,\n inferTemplateFile,\n isInferFormat,\n renderTemplateFile,\n type InferFormat,\n} from \"../core/infer.js\";\nimport type { TemplateFile } from \"../core/template.js\";\nimport { resolveLintRun } from \"../core/config.js\";\nimport {\n listBuiltins,\n loadTemplateFile,\n} from \"../core/template-registry.js\";\n\n/** `TemplateInfo.source` for a template that ships with the tool. */\nexport const BUILTIN_SOURCE = \"builtin\";\n\nexport interface TemplateInfo {\n /** The ref to pass to `--template`. */\n id: string;\n /**\n * Human-readable title. Empty for templates read from a user file: the\n * template DSL has no title field, only the built-in registry carries one.\n */\n title: string;\n /** Doctypes the template serves, matched against a page `type`. */\n types: string[];\n /** `builtin`, or the template file this entry came from. */\n source: string;\n}\n\nexport interface TemplatesInfo {\n templates: TemplateInfo[];\n}\n\nexport interface TemplatesOptions {\n /** Template files whose entries join the built-ins. */\n templates?: string | string[];\n}\n\nexport async function runTemplates(\n opts: TemplatesOptions = {},\n): Promise<TemplatesInfo> {\n const templates: TemplateInfo[] = listBuiltins().map((builtin) => ({\n id: builtin.id,\n title: builtin.title,\n types: builtin.types,\n source: BUILTIN_SOURCE,\n }));\n\n // Listed after the built-ins, in the order supplied - the same order\n // `buildTypeIndex` applies them in, so a later entry claiming the same\n // doctype is the one that would win.\n const paths =\n opts.templates == null\n ? []\n : Array.isArray(opts.templates)\n ? opts.templates\n : [opts.templates];\n\n for (const path of paths) {\n const file = await loadTemplateFile(path);\n for (const [id, template] of Object.entries(file.templates ?? {})) {\n templates.push({\n id,\n title: \"\",\n types: template.types ?? [],\n source: path,\n });\n }\n }\n\n return { templates };\n}\n\n/* -------------------------------------------------------------------------- *\n * infer\n * -------------------------------------------------------------------------- */\n\n/** The token that means stdin, in every command of the family. */\nconst STDIN = \"-\";\n\n/** What a page read from stdin is called when nothing else names it. */\nconst STDIN_NAME = \"stdin\";\n\nexport interface TemplatesInferOptions {\n /** The one page to infer from: a path, or `-` for stdin. */\n page: string;\n /** `--as`: force an input format, by parser name. */\n as?: string;\n /** `--name`: what to call the template. Defaults to the page's own doctype. */\n name?: string;\n /** `-f/--format`: how the file is written. Defaults to `yaml`. */\n format?: InferFormat;\n /** `-o/--out`: write here instead of returning text for stdout. */\n out?: string;\n /** `--force`: replace an existing `--out`. */\n force?: boolean;\n cwd?: string;\n /** Content for the `-` page, injected by the CLI and by tests. */\n stdinContent?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: skip discovery. */\n noConfig?: boolean;\n /** Told which config governed the run, and where it came from. */\n onConfigLoaded?: (info: { path: string; dir: string }) => void;\n}\n\nexport interface TemplatesInferResult {\n /** The name the template was written under. */\n name: string;\n /** The inferred file, for a caller that wants the data rather than the text. */\n file: TemplateFile;\n /** The serialized template file, exactly as written. */\n text: string;\n /** Where it was written. Absent without `--out`. */\n written?: string;\n}\n\n/**\n * The parser that reads this page.\n *\n * Resolved before anything is read, as `runLint` does it: a typo in `--as`\n * should fail immediately rather than after a file was opened it was going to\n * mis-parse anyway. A name no parser answers to is unknown whatever it was\n * meant to name, so the message points at the one command that lists them.\n */\nfunction parserFor(page: string, as: string | undefined): DocumentParser {\n if (as !== undefined) {\n const forced = parserByName(as);\n if (forced) return forced;\n throw new LintError(\n `Unknown format \"${as}\". Run \"manni lint tools\" to see the formats manni lint reads.`,\n );\n }\n if (page === STDIN) {\n throw new LintError(\n \"Reading from stdin (-) requires --as <format> to choose a parser.\",\n );\n }\n const ext = extname(page);\n const parser = parserForExtension(ext);\n if (parser) return parser;\n throw new LintError(unsupportedFormatMessage(ext || page));\n}\n\n/**\n * What the template is called: `--name`, else the page's own doctype, else the\n * file's stem.\n *\n * The doctype first because that is the handle the page already carries, and\n * the one `types:` will route on once the author adds it. A file read from\n * stdin has no stem, so it falls back to a word rather than to `-`.\n */\nfunction defaultName(tree: DocumentTree, page: string): string {\n const declared = tree.frontmatter?.[\"type\"];\n if (typeof declared === \"string\" && declared.trim().length > 0) {\n return declared.trim();\n }\n if (page === STDIN) return STDIN_NAME;\n return basename(page, extname(page)) || STDIN_NAME;\n}\n\n/**\n * Infer a template from one page.\n *\n * One page, never a set. A template is a generalisation, and this makes exactly\n * the generalisation one exemplar supports; inferring from several would mean\n * deciding which differences are variation and which are mistakes, which is the\n * author's judgment and not the tool's.\n */\nexport async function runTemplatesInfer(\n opts: TemplatesInferOptions,\n): Promise<TemplatesInferResult> {\n const format = opts.format ?? \"yaml\";\n if (!isInferFormat(format)) {\n throw new LintError(\n `Unknown --format \"${String(format)}\". Use yaml or json.`,\n );\n }\n\n // Which config governs the run, said once, the way every other lint verb\n // says it. With a page typed on the command line the base stays the working\n // directory, so the path means what it looked like it meant.\n const run = await resolveLintRun({\n cwd: opts.cwd ?? process.cwd(),\n ...(opts.configPath === undefined ? {} : { configPath: opts.configPath }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n inputs: [opts.page],\n ...(opts.onConfigLoaded === undefined\n ? {}\n : { onConfigLoaded: opts.onConfigLoaded }),\n });\n const cwd = run.base;\n\n const parser = parserFor(opts.page, opts.as);\n // A name the schema cannot hold is refused before the page is read, beside\n // the other refusals: a run that is going to fail should leave the working\n // tree, and the reader's terminal, exactly as it found them.\n if (opts.name !== undefined) assertTemplateName(opts.name);\n\n // Every refusal happens before the write, and the `--out` guard happens\n // before the read - the ordering `meta schemas infer` established. The path\n // is echoed as it was typed, because that is the string the reader will edit.\n let absOut: string | undefined;\n if (opts.out !== undefined) {\n absOut = resolve(cwd, opts.out);\n if (opts.force !== true && existsSync(absOut)) {\n throw new LintError(`${opts.out} exists. Pass --force to overwrite it.`);\n }\n }\n\n let content: string;\n if (opts.page === STDIN) {\n content = opts.stdinContent ?? \"\";\n } else {\n try {\n content = await readFile(resolve(cwd, opts.page), \"utf8\");\n } catch (err) {\n // The OS message travels verbatim: \"permission denied\" and \"no such\n // file\" send the reader to different places, and this cannot tell which.\n throw new LintError(\n `\"${opts.page}\" could not be read: ${errorMessage(err)}`,\n );\n }\n }\n\n let tree: DocumentTree;\n try {\n tree = parser.parse(content, opts.page === STDIN ? \"<stdin>\" : opts.page);\n } catch (err) {\n // A page that will not parse has no shape to infer, and the parser's own\n // message already names the file and the syntax it choked on.\n if (err instanceof ToolError) throw new LintError(err.message);\n throw err;\n }\n\n const name = opts.name ?? defaultName(tree, opts.page);\n const file = inferTemplateFile(tree, name);\n const text = renderTemplateFile(file, format);\n\n if (absOut === undefined) return { name, file, text };\n\n await mkdir(dirname(absOut), { recursive: true });\n await writeTextAtomic(absOut, text);\n return { name, file, text, written: opts.out };\n}\n","/**\n * `tools` command core. One row per lint job: which tool performs it, whether\n * this checkout can run it, what it read its settings from, and the input\n * formats it understands.\n *\n * It replaces `formats`, which reported the parser registry alone. Proposal\n * 0050 records the rename. The registry is here as one column of the job that\n * reads it, because the formats belong to the tool performing that job.\n *\n * The column lists exactly the formats the tool reads, so a row carries no\n * state: a listed format is one that is read, and `--as` accepts every name in\n * it.\n *\n * Returns data; `src/lint/reporters/index.ts` renders it.\n */\nimport type { ContentKind } from \"../types.js\";\nimport { BLOCK_KIND_NODE } from \"../core/template.js\";\nimport { resolveStructureTool } from \"../tools/index.js\";\nimport {\n LINT_JOBS,\n resolveLintRun,\n type LintConfig,\n type LintJob,\n type LintTool,\n} from \"../core/config.js\";\n\n/**\n * The content kinds a template rule can actually name - `BLOCK_KIND_NODE`'s\n * values, the nine block-rule keys map onto. `manni lint tools` lists this\n * column to answer \"can my rule run against this format\", and a rule can\n * never ask about `listItem`, `tableRow`, `tableCell`, or `definitionItem`:\n * those are structural kinds a parser reports so the content model can\n * describe a list's items or a table's cells, not kinds a `sections:` rule\n * counts on its own. What a parser *declares* (`DocumentParser.kinds`, read by\n * the pruner in `validator.ts`) is untouched - this is a display decision, so\n * it belongs here rather than trimming the declaration itself.\n */\nconst REPORTABLE_KINDS = new Set<ContentKind>(Object.values(BLOCK_KIND_NODE));\n\nexport interface FormatInfo {\n /** Parser name, also what `--as` accepts. */\n name: string;\n label: string;\n extensions: string[];\n /** The content kinds this format's parser actually emits today. */\n kinds: ContentKind[];\n}\n\n/** One job, and the tool that would perform it on this run. */\nexport interface ToolInfo {\n job: LintJob;\n tool: LintTool;\n /** Whether the config declares this job, or anything the job's tool reads. */\n configured: boolean;\n /** Whether the tool can run here, as its own probe reported it. */\n available: boolean;\n /**\n * The version the probe reported, or null when it reported none.\n *\n * Null rather than a placeholder string, because this is the shape\n * `-f json` emits: a consumer can test for an absent version, where a dash\n * would be a value it has to know to recognize. The pretty reporter renders\n * the dash.\n */\n version: string | null;\n /** Where the tool read its settings: the config file, or the defaults. */\n config: string;\n /** The input formats the tool reads. */\n formats: FormatInfo[];\n}\n\nexport interface ToolsOptions {\n cwd?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: ignore any discovered config file. */\n noConfig?: boolean;\n}\n\n/** What a run with no config file to read reports in the `config` column. */\nexport const BUILT_IN_DEFAULTS = \"built-in defaults\";\n\n/**\n * Whether the config says anything about this job.\n *\n * The job's own mapping counts, and so does every key its tool reads: a repo\n * that has written `templates:` and `overrides:` has configured the structure\n * job whether or not it also spelled `structure:` out. Saying otherwise would\n * report \"not configured\" beside a run those keys visibly govern.\n */\nfunction isConfigured(job: LintJob, config: LintConfig): boolean {\n if (config[job] !== undefined) return true;\n return (\n config.templates !== undefined ||\n config.template !== undefined ||\n config.types !== undefined ||\n config.overrides !== undefined\n );\n}\n\nexport async function runTools(opts: ToolsOptions = {}): Promise<ToolInfo[]> {\n // The same resolution every other command does, so a config this command\n // cannot read is the same exit 2 with the same message, rather than a row\n // saying \"built-in defaults\" over a file that is really there and broken.\n const cwd = opts.cwd ?? process.cwd();\n const run = await resolveLintRun({\n cwd,\n configPath: opts.configPath,\n noConfig: opts.noConfig,\n inputs: [],\n });\n\n return await Promise.all(\n LINT_JOBS.map(async (job) => {\n const tool: LintTool = run.config[job]?.tool ?? \"manni\";\n // The row is the tool's own answer about itself. It used to be two\n // literals that happened to be right while manni was the only tool:\n // \"available\" was hard-coded true, and the version was this package's\n // whatever performed the job.\n const descriptor = resolveStructureTool(tool);\n // The family's `tools:` travels with the probe: a tool outside the\n // package is found where its own `tools.<tool>` says it is, so probing\n // without it would report \"not available\" over the very installation the\n // run would go on to use.\n const probed = await descriptor.probe({\n cwd,\n tools: run.tools,\n ...(run.configDir === undefined ? {} : { configDir: run.configDir }),\n });\n return {\n job,\n tool,\n configured: isConfigured(job, run.config),\n available: probed.available,\n version: probed.version,\n config: run.configSource ?? BUILT_IN_DEFAULTS,\n formats: descriptor.formats().map((format) => ({\n ...format,\n kinds: format.kinds.filter((kind) => REPORTABLE_KINDS.has(kind)),\n })),\n };\n }),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,aAAa,qBAAqB;AAsBpC,IAAM,gBAAgB,CAAC,QAA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CAAC,IAAI,EAAE,WAAW,IAAI,UAAU;AAAA,MACpE,CAAC;AACD,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,YAAY,aAAa,KAAK,IAAI,MAAM;AAAA,QACxC,WAAW,OAAO;AAAA,QAClB,SAAS,OAAO;AAAA,QAChB,QAAQ,IAAI,gBAAgB;AAAA,QAC5B,SAAS,WAAW,QAAQ,EAAE,IAAI,CAAC,YAAY;AAAA,UAC7C,GAAG;AAAA,UACH,OAAO,OAAO,MAAM,OAAO,CAAC,SAAS,iBAAiB,IAAI,IAAI,CAAC;AAAA,QACjE,EAAE;AAAA,MACJ;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -5,7 +5,7 @@ import {
5
5
  manifestKeyLine,
6
6
  mergeMetaProvenance,
7
7
  offerExternalHomes
8
- } from "./chunk-A5ULMVHQ.js";
8
+ } from "./chunk-3YHAYXBC.js";
9
9
  import {
10
10
  DERIVED_ROWS,
11
11
  DERIVED_VIEW,
@@ -29,7 +29,7 @@ import {
29
29
  readerManifests,
30
30
  readerPlace,
31
31
  stampManifests
32
- } from "./chunk-TK3FC4RF.js";
32
+ } from "./chunk-NAZRLJAK.js";
33
33
  import {
34
34
  ENCRYPTED_PLACEHOLDER,
35
35
  ENCRYPTION_KEY_ENV,
@@ -106,11 +106,11 @@ import {
106
106
  valueAt,
107
107
  withValueAt,
108
108
  writeEncryptionKey
109
- } from "./chunk-M3W7J6MU.js";
109
+ } from "./chunk-HVFR66GQ.js";
110
110
  import {
111
111
  formatList,
112
112
  render
113
- } from "./chunk-IDV6HJCB.js";
113
+ } from "./chunk-TCC737IS.js";
114
114
  import {
115
115
  DERIVABLE_FIELDS,
116
116
  DERIVE_SOURCES,
@@ -164,7 +164,7 @@ import {
164
164
  urlManifestMessage,
165
165
  urlManifestOwning,
166
166
  writeFileAtomic
167
- } from "./chunk-57NEQRVO.js";
167
+ } from "./chunk-527HHQPS.js";
168
168
  import {
169
169
  palette
170
170
  } from "./chunk-RNVYGWIC.js";
@@ -6734,4 +6734,4 @@ export {
6734
6734
  renderQuery,
6735
6735
  renderQueryCsv
6736
6736
  };
6737
- //# sourceMappingURL=chunk-6JSSEWBG.js.map
6737
+ //# sourceMappingURL=chunk-QCBICNKC.js.map