@hawkeyexl/manni 4.17.1 → 4.18.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-SAW4E46C.js → batch-5TPNK5BQ.js} +13 -13
- package/dist/{build-F6S3W77I.js → build-GGKCRWKH.js} +14 -14
- package/dist/{calibrate-3DW2VV7F.js → calibrate-OGOLLGXY.js} +14 -14
- package/dist/{capture-PKEYY2VO.js → capture-CNHRHTA7.js} +13 -13
- package/dist/{check-EZN7YNVF.js → check-BAMOJMOJ.js} +15 -13
- package/dist/{check-LRX2YFDF.js → check-XLIS5A7G.js} +12 -12
- package/dist/check-XYGABPXI.js +47 -0
- package/dist/{check-7PUIHLFM.js → check-ZFI7H7LS.js} +14 -14
- package/dist/{chunk-DU6CXY5R.js → chunk-27FP4KKD.js} +6 -6
- package/dist/{chunk-B5R5BWMY.js → chunk-2QZCPPVE.js} +32 -11
- package/dist/chunk-2QZCPPVE.js.map +1 -0
- package/dist/{chunk-VRMQSP7O.js → chunk-327CWO33.js} +3 -3
- package/dist/{chunk-JK56UPNQ.js → chunk-33FIOHJ4.js} +10 -10
- package/dist/{chunk-QIWSEKA6.js → chunk-3COYAAR7.js} +2 -2
- package/dist/{chunk-3446DW4W.js → chunk-3LZ6AYB4.js} +2 -2
- package/dist/{chunk-ABAFKOQF.js → chunk-4A445ALG.js} +3 -3
- package/dist/{chunk-M6DNOHJO.js → chunk-4KY2RUXQ.js} +3 -3
- package/dist/{chunk-PS4Y7EPP.js → chunk-5VA3ZOB7.js} +3 -3
- package/dist/{chunk-XPGK4ECA.js → chunk-6E6Z6UQL.js} +7 -7
- package/dist/{chunk-TUMR35B3.js → chunk-6ZYXK3JT.js} +3 -3
- package/dist/{chunk-KUXAHHDE.js → chunk-7RZQAMA2.js} +4 -4
- package/dist/{chunk-ZEYNLKOH.js → chunk-CWVL7XZR.js} +4 -4
- package/dist/{chunk-FEURGKJC.js → chunk-E3YXGLEU.js} +2 -2
- package/dist/{chunk-W7XOMNYC.js → chunk-E76WPNYO.js} +2 -2
- package/dist/{chunk-Q7E43SXN.js → chunk-EITEHOSX.js} +5 -5
- package/dist/{chunk-U5NSIZRS.js → chunk-EU5QLSNN.js} +3 -3
- package/dist/{chunk-TNYIXIYV.js → chunk-F7GYY373.js} +5 -5
- package/dist/{chunk-WBXVQW57.js → chunk-FE3US7FR.js} +3 -3
- package/dist/{chunk-YJHHXM5B.js → chunk-FNQE3RAW.js} +2 -2
- package/dist/{chunk-WRSWZEVU.js → chunk-FO6MNXOF.js} +5 -5
- package/dist/{chunk-5D24C6WM.js → chunk-GMOAW2EG.js} +6 -2
- package/dist/chunk-GMOAW2EG.js.map +1 -0
- package/dist/{chunk-OZL5M764.js → chunk-GNZKLUZW.js} +29 -13
- package/dist/chunk-GNZKLUZW.js.map +1 -0
- package/dist/{chunk-2A5OIZHT.js → chunk-ICRYIYMJ.js} +7 -7
- package/dist/{chunk-KCNBM42T.js → chunk-IIBVQCCR.js} +4 -4
- package/dist/{chunk-KB4MNUKC.js → chunk-JFB45L7D.js} +2 -2
- package/dist/{chunk-HEVYEI6O.js → chunk-JFPCDIES.js} +2 -2
- package/dist/{chunk-5VNFO2RT.js → chunk-JHUEACRT.js} +23 -13
- package/dist/chunk-JHUEACRT.js.map +1 -0
- package/dist/{chunk-2TLNAGVJ.js → chunk-JS5NCZYC.js} +5 -5
- package/dist/{chunk-QIKCIREY.js → chunk-KRQTN5KE.js} +4 -4
- package/dist/{chunk-AIZBZYQM.js → chunk-MH5MX4B3.js} +2 -2
- package/dist/{chunk-MBLVLQWI.js → chunk-NUAVQQMC.js} +2 -2
- package/dist/{chunk-WP5EKWTU.js → chunk-O2TE5X25.js} +5 -5
- package/dist/{chunk-LDIUA4ZG.js → chunk-OVQDZOMU.js} +2 -2
- package/dist/{chunk-FAS3SRQB.js → chunk-OZWV27SE.js} +379 -21
- package/dist/chunk-OZWV27SE.js.map +1 -0
- package/dist/{chunk-IGE6CIKZ.js → chunk-PCTJ7P6U.js} +2 -2
- package/dist/{chunk-IGE6CIKZ.js.map → chunk-PCTJ7P6U.js.map} +1 -1
- package/dist/{chunk-DSJTYRI5.js → chunk-PLN2LJDM.js} +3 -3
- package/dist/{chunk-XWUIFSWK.js → chunk-QGJA43DX.js} +3 -3
- package/dist/{chunk-64EDFJ5S.js → chunk-QWYE3S3U.js} +5 -5
- package/dist/{chunk-XCEEJEVA.js → chunk-QXTL5MGT.js} +4 -4
- package/dist/{chunk-XRWQQHBR.js → chunk-RCWP63XT.js} +2 -2
- package/dist/{chunk-W7IEP7IG.js → chunk-RMKMJ43W.js} +2 -2
- package/dist/{chunk-FPPHEHPZ.js → chunk-RVSUMNCR.js} +2 -2
- package/dist/{chunk-4GGADKTU.js → chunk-SVB45M54.js} +5 -5
- package/dist/{chunk-MDXDTO7E.js → chunk-T3VFO2LO.js} +6 -6
- package/dist/{chunk-2LCJNH73.js → chunk-TFTGMYDR.js} +2 -2
- package/dist/{chunk-WZSL7KF2.js → chunk-V2IP2ZMD.js} +2 -2
- package/dist/{chunk-ZIXU7A4C.js → chunk-V5QTIP2M.js} +168 -80
- package/dist/chunk-V5QTIP2M.js.map +1 -0
- package/dist/{chunk-KAWS7H4C.js → chunk-VV4YM6VM.js} +8 -8
- package/dist/{chunk-3UYSONT4.js → chunk-XKZZRG3Z.js} +20 -10
- package/dist/chunk-XKZZRG3Z.js.map +1 -0
- package/dist/{chunk-D3AO2PMV.js → chunk-XTQTA262.js} +142 -23
- package/dist/chunk-XTQTA262.js.map +1 -0
- package/dist/{chunk-6J2ED4ED.js → chunk-YLU4H2H3.js} +6 -6
- package/dist/{chunk-5QOTR53S.js → chunk-ZLOLC6WD.js} +4 -4
- package/dist/{cli-LRKBCQRS.js → cli-6UQ3QV2G.js} +9 -9
- package/dist/{cli-5ZQXVWWC.js → cli-GH42HLFK.js} +41 -22
- package/dist/cli-GH42HLFK.js.map +1 -0
- package/dist/{cli-D5WYQVUF.js → cli-GND6TVRG.js} +14 -14
- package/dist/{cli-FCGGNZ5C.js → cli-JHULEOH2.js} +2 -2
- package/dist/{cli-TJDQ5GUW.js → cli-LVHZCC2O.js} +14 -14
- package/dist/{cli-NJC3H3CW.js → cli-NWU77YRZ.js} +14 -14
- package/dist/{cli-OHKWCJIJ.js → cli-PUO75R3L.js} +20 -20
- package/dist/{cli-VC3BXCVR.js → cli-Q2RJMCVE.js} +27 -19
- package/dist/cli-Q2RJMCVE.js.map +1 -0
- package/dist/{cli-FNX4LXMI.js → cli-RUNYBUIV.js} +35 -35
- package/dist/{cli-RKYIZ6KU.js → cli-T7UJF3BF.js} +26 -26
- package/dist/{cli-LQRHK23G.js → cli-WUFQGIUG.js} +9 -9
- package/dist/cli.js +14 -14
- package/dist/docmeta.js +8 -8
- package/dist/{github-6PV2JTZ7.js → github-BV42LSW2.js} +12 -12
- package/dist/{github-7ZT4KYQU.js → github-XZ7OLATY.js} +14 -14
- package/dist/index.d.ts +172 -87
- package/dist/index.js +41 -41
- package/dist/{json-VWXLDTXR.js → json-LEEXKSGP.js} +12 -12
- package/dist/{json-5EQCGVCV.js → json-YTKUFNO3.js} +2 -2
- package/dist/{labels-ZJK27RL3.js → labels-E256WRAI.js} +11 -11
- package/dist/{lint-5OERIERT.js → lint-W4CM3EIO.js} +12 -12
- package/dist/{list-MANBRF7Z.js → list-TB4R6AP4.js} +12 -12
- package/dist/{list-SEEANTU6.js → list-UDDGL2OI.js} +12 -12
- package/dist/{page-O4M65KMJ.js → page-L64NO57W.js} +11 -11
- package/dist/{prepare-3WULLZER.js → prepare-GFTAYDTP.js} +12 -12
- package/dist/{pretty-D3M366JD.js → pretty-HYCYKYHB.js} +13 -13
- package/dist/{pretty-5FRBLTXU.js → pretty-Q43TCD6D.js} +12 -12
- package/dist/{reporters-4WWZRHKI.js → reporters-4HRBSMUF.js} +4 -4
- package/dist/{reporters-GDCZ5P7C.js → reporters-E3FUVBQ6.js} +11 -11
- package/dist/{run-TZDLG6EN.js → run-UDX2C54M.js} +12 -12
- package/dist/{sarif-SSSPOUCK.js → sarif-WL353VTA.js} +10 -10
- package/dist/{sarif-PUZAMEFQ.js → sarif-XZFJ5VIJ.js} +15 -15
- package/dist/{term-DHWMUL5N.js → term-OZ7ZR5KB.js} +17 -17
- package/dist/{validate-4AW7KIIY.js → validate-CR3TI7GP.js} +5 -5
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/dist/check-NW7GHSX6.js +0 -47
- package/dist/chunk-3UYSONT4.js.map +0 -1
- package/dist/chunk-5D24C6WM.js.map +0 -1
- package/dist/chunk-5VNFO2RT.js.map +0 -1
- package/dist/chunk-B5R5BWMY.js.map +0 -1
- package/dist/chunk-D3AO2PMV.js.map +0 -1
- package/dist/chunk-FAS3SRQB.js.map +0 -1
- package/dist/chunk-OZL5M764.js.map +0 -1
- package/dist/chunk-ZIXU7A4C.js.map +0 -1
- package/dist/cli-5ZQXVWWC.js.map +0 -1
- package/dist/cli-VC3BXCVR.js.map +0 -1
- /package/dist/{batch-SAW4E46C.js.map → batch-5TPNK5BQ.js.map} +0 -0
- /package/dist/{build-F6S3W77I.js.map → build-GGKCRWKH.js.map} +0 -0
- /package/dist/{calibrate-3DW2VV7F.js.map → calibrate-OGOLLGXY.js.map} +0 -0
- /package/dist/{capture-PKEYY2VO.js.map → capture-CNHRHTA7.js.map} +0 -0
- /package/dist/{check-EZN7YNVF.js.map → check-BAMOJMOJ.js.map} +0 -0
- /package/dist/{check-LRX2YFDF.js.map → check-XLIS5A7G.js.map} +0 -0
- /package/dist/{check-NW7GHSX6.js.map → check-XYGABPXI.js.map} +0 -0
- /package/dist/{check-7PUIHLFM.js.map → check-ZFI7H7LS.js.map} +0 -0
- /package/dist/{chunk-DU6CXY5R.js.map → chunk-27FP4KKD.js.map} +0 -0
- /package/dist/{chunk-VRMQSP7O.js.map → chunk-327CWO33.js.map} +0 -0
- /package/dist/{chunk-JK56UPNQ.js.map → chunk-33FIOHJ4.js.map} +0 -0
- /package/dist/{chunk-QIWSEKA6.js.map → chunk-3COYAAR7.js.map} +0 -0
- /package/dist/{chunk-3446DW4W.js.map → chunk-3LZ6AYB4.js.map} +0 -0
- /package/dist/{chunk-ABAFKOQF.js.map → chunk-4A445ALG.js.map} +0 -0
- /package/dist/{chunk-M6DNOHJO.js.map → chunk-4KY2RUXQ.js.map} +0 -0
- /package/dist/{chunk-PS4Y7EPP.js.map → chunk-5VA3ZOB7.js.map} +0 -0
- /package/dist/{chunk-XPGK4ECA.js.map → chunk-6E6Z6UQL.js.map} +0 -0
- /package/dist/{chunk-TUMR35B3.js.map → chunk-6ZYXK3JT.js.map} +0 -0
- /package/dist/{chunk-KUXAHHDE.js.map → chunk-7RZQAMA2.js.map} +0 -0
- /package/dist/{chunk-ZEYNLKOH.js.map → chunk-CWVL7XZR.js.map} +0 -0
- /package/dist/{chunk-FEURGKJC.js.map → chunk-E3YXGLEU.js.map} +0 -0
- /package/dist/{chunk-W7XOMNYC.js.map → chunk-E76WPNYO.js.map} +0 -0
- /package/dist/{chunk-Q7E43SXN.js.map → chunk-EITEHOSX.js.map} +0 -0
- /package/dist/{chunk-U5NSIZRS.js.map → chunk-EU5QLSNN.js.map} +0 -0
- /package/dist/{chunk-TNYIXIYV.js.map → chunk-F7GYY373.js.map} +0 -0
- /package/dist/{chunk-WBXVQW57.js.map → chunk-FE3US7FR.js.map} +0 -0
- /package/dist/{chunk-YJHHXM5B.js.map → chunk-FNQE3RAW.js.map} +0 -0
- /package/dist/{chunk-WRSWZEVU.js.map → chunk-FO6MNXOF.js.map} +0 -0
- /package/dist/{chunk-2A5OIZHT.js.map → chunk-ICRYIYMJ.js.map} +0 -0
- /package/dist/{chunk-KCNBM42T.js.map → chunk-IIBVQCCR.js.map} +0 -0
- /package/dist/{chunk-KB4MNUKC.js.map → chunk-JFB45L7D.js.map} +0 -0
- /package/dist/{chunk-HEVYEI6O.js.map → chunk-JFPCDIES.js.map} +0 -0
- /package/dist/{chunk-2TLNAGVJ.js.map → chunk-JS5NCZYC.js.map} +0 -0
- /package/dist/{chunk-QIKCIREY.js.map → chunk-KRQTN5KE.js.map} +0 -0
- /package/dist/{chunk-AIZBZYQM.js.map → chunk-MH5MX4B3.js.map} +0 -0
- /package/dist/{chunk-MBLVLQWI.js.map → chunk-NUAVQQMC.js.map} +0 -0
- /package/dist/{chunk-WP5EKWTU.js.map → chunk-O2TE5X25.js.map} +0 -0
- /package/dist/{chunk-LDIUA4ZG.js.map → chunk-OVQDZOMU.js.map} +0 -0
- /package/dist/{chunk-DSJTYRI5.js.map → chunk-PLN2LJDM.js.map} +0 -0
- /package/dist/{chunk-XWUIFSWK.js.map → chunk-QGJA43DX.js.map} +0 -0
- /package/dist/{chunk-64EDFJ5S.js.map → chunk-QWYE3S3U.js.map} +0 -0
- /package/dist/{chunk-XCEEJEVA.js.map → chunk-QXTL5MGT.js.map} +0 -0
- /package/dist/{chunk-XRWQQHBR.js.map → chunk-RCWP63XT.js.map} +0 -0
- /package/dist/{chunk-W7IEP7IG.js.map → chunk-RMKMJ43W.js.map} +0 -0
- /package/dist/{chunk-FPPHEHPZ.js.map → chunk-RVSUMNCR.js.map} +0 -0
- /package/dist/{chunk-4GGADKTU.js.map → chunk-SVB45M54.js.map} +0 -0
- /package/dist/{chunk-MDXDTO7E.js.map → chunk-T3VFO2LO.js.map} +0 -0
- /package/dist/{chunk-2LCJNH73.js.map → chunk-TFTGMYDR.js.map} +0 -0
- /package/dist/{chunk-WZSL7KF2.js.map → chunk-V2IP2ZMD.js.map} +0 -0
- /package/dist/{chunk-KAWS7H4C.js.map → chunk-VV4YM6VM.js.map} +0 -0
- /package/dist/{chunk-6J2ED4ED.js.map → chunk-YLU4H2H3.js.map} +0 -0
- /package/dist/{chunk-5QOTR53S.js.map → chunk-ZLOLC6WD.js.map} +0 -0
- /package/dist/{cli-LRKBCQRS.js.map → cli-6UQ3QV2G.js.map} +0 -0
- /package/dist/{cli-D5WYQVUF.js.map → cli-GND6TVRG.js.map} +0 -0
- /package/dist/{cli-FCGGNZ5C.js.map → cli-JHULEOH2.js.map} +0 -0
- /package/dist/{cli-TJDQ5GUW.js.map → cli-LVHZCC2O.js.map} +0 -0
- /package/dist/{cli-NJC3H3CW.js.map → cli-NWU77YRZ.js.map} +0 -0
- /package/dist/{cli-OHKWCJIJ.js.map → cli-PUO75R3L.js.map} +0 -0
- /package/dist/{cli-FNX4LXMI.js.map → cli-RUNYBUIV.js.map} +0 -0
- /package/dist/{cli-RKYIZ6KU.js.map → cli-T7UJF3BF.js.map} +0 -0
- /package/dist/{cli-LQRHK23G.js.map → cli-WUFQGIUG.js.map} +0 -0
- /package/dist/{github-6PV2JTZ7.js.map → github-BV42LSW2.js.map} +0 -0
- /package/dist/{github-7ZT4KYQU.js.map → github-XZ7OLATY.js.map} +0 -0
- /package/dist/{json-5EQCGVCV.js.map → json-LEEXKSGP.js.map} +0 -0
- /package/dist/{json-VWXLDTXR.js.map → json-YTKUFNO3.js.map} +0 -0
- /package/dist/{labels-ZJK27RL3.js.map → labels-E256WRAI.js.map} +0 -0
- /package/dist/{lint-5OERIERT.js.map → lint-W4CM3EIO.js.map} +0 -0
- /package/dist/{list-MANBRF7Z.js.map → list-TB4R6AP4.js.map} +0 -0
- /package/dist/{list-SEEANTU6.js.map → list-UDDGL2OI.js.map} +0 -0
- /package/dist/{page-O4M65KMJ.js.map → page-L64NO57W.js.map} +0 -0
- /package/dist/{prepare-3WULLZER.js.map → prepare-GFTAYDTP.js.map} +0 -0
- /package/dist/{pretty-5FRBLTXU.js.map → pretty-HYCYKYHB.js.map} +0 -0
- /package/dist/{pretty-D3M366JD.js.map → pretty-Q43TCD6D.js.map} +0 -0
- /package/dist/{reporters-4WWZRHKI.js.map → reporters-4HRBSMUF.js.map} +0 -0
- /package/dist/{reporters-GDCZ5P7C.js.map → reporters-E3FUVBQ6.js.map} +0 -0
- /package/dist/{run-TZDLG6EN.js.map → run-UDX2C54M.js.map} +0 -0
- /package/dist/{sarif-PUZAMEFQ.js.map → sarif-WL353VTA.js.map} +0 -0
- /package/dist/{sarif-SSSPOUCK.js.map → sarif-XZFJ5VIJ.js.map} +0 -0
- /package/dist/{term-DHWMUL5N.js.map → term-OZ7ZR5KB.js.map} +0 -0
- /package/dist/{validate-4AW7KIIY.js.map → validate-CR3TI7GP.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/key/errors.ts","../src/key/commands/rotate.ts","../src/key/core/config.ts","../src/key/commands/set.ts"],"sourcesContent":["import { ToolError } from \"../shared/errors.js\";\n\n/** An operational or usage error in the key domain: exit 2. */\nexport class KeyError extends ToolError {\n constructor(message: string) {\n super(message);\n this.name = \"KeyError\";\n }\n}\n","/**\n * `manni key rotate [paths...]`: re-encrypt every encrypted value under a new\n * key, then write the key (proposal 0045).\n *\n * Values are found by their ciphertext, never through schema marks: meta's\n * `reencryptMetadata` takes every string of the ciphertext shape in a page's\n * metadata, and cite's `reencryptCitations` every encrypted `source.file` with its\n * keyed pin. A value already under the new key counts as done, so a run can\n * always be repeated.\n *\n * A value does not have to sit in a page. An external-metadata manifest\n * (proposal 0037) holds the private half of the same documents, which is\n * where an encrypted value most often lives, so the local manifests of the\n * collections a run covers are re-encrypted with the pages. See\n * `planManifests`.\n *\n * Input resolution is `cite check`'s: positional paths from `cwd`, else the\n * selected collections' `paths:` from the config's directory, `--exclude`\n * added to a collection's own `exclude:`, and zero files an error unless\n * `--allow-empty`.\n *\n * Every page and manifest is re-encrypted in memory first. One skip and\n * nothing is written (exit 1). Otherwise a whole run whose key comes from the\n * config writes in three steps, so that an interruption at any point leaves\n * every value readable by the next run:\n *\n * 1. the config: `encryptionKey:` the new key, `encryptionKeyPrevious:` the\n * old one, in one atomic write;\n * 2. the pages, then the manifests;\n * 3. the config again, without `encryptionKeyPrevious:`.\n *\n * A run that finds `encryptionKeyPrevious:` finishes that rotation: from the\n * previous key to the current one. A narrowed run (paths or `--collection`)\n * and a run whose key comes from `MANNI_ENCRYPTION_KEY` write pages and\n * manifests and never the config. `--dry-run` writes nothing at all.\n */\nimport { existsSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { isAbsolute, join, relative, resolve, sep } from \"node:path\";\nimport { parse as parseYaml } from \"yaml\";\nimport {\n DEFAULT_CITE_BASELINE_PATH,\n GIT_UNAVAILABLE_HISTORY,\n ManifestSet,\n buildSourceIndex,\n checkoutResolver,\n gitClient,\n loadCitationSidecars,\n parseCiteConfig,\n readPage,\n sourceRange,\n reencryptCitationEntries,\n reencryptCitations,\n type CiteConfig,\n type CheckoutResolver,\n type CitationSidecars,\n type GitClient,\n type ReencryptCitationsResult,\n type SourceIndex,\n} from \"../../cite/index.js\";\nimport {\n PATH_JOIN,\n classifyRef,\n externalMetadataJoin,\n loadExternalMetadata,\n reencryptMetadata,\n supportedExtensions,\n writeFileAtomic,\n type ExternalMetadataEntry,\n type ExternalMetadataIndex,\n type ExternalMetadataValue,\n} from \"../../meta/index.js\";\nimport {\n STDIN_TOKEN,\n assertNonEmpty,\n configMarks,\n extractorByName,\n gitignoreOptions,\n reencryptData,\n resolveTargetSet,\n spliceManifestValue,\n} from \"../../meta/internal.js\";\nimport { isMember, selectCollections, type CollectionConfig } from \"../../shared/collections.js\";\nimport type { ConfigFile } from \"../../shared/config-file.js\";\nimport { resolveEncryptionKey, writeEncryptionKey } from \"../../shared/encryption-key.js\";\nimport { generateEncryptionKey, isValidEncryptionKey } from \"../../shared/encryption.js\";\nimport { findGitRoot } from \"../../shared/git-root.js\";\nimport {\n findPageManifests,\n hasPagePlaceholder,\n pageManifestPath,\n} from \"../../shared/page-manifest.js\";\nimport { readRotateConfig, toKeyError, unfinishedRotation } from \"../core/config.js\";\nimport { KeyError } from \"../errors.js\";\nimport type {\n KeyRotateOptions,\n KeyRotateResult,\n RotateManifest,\n RotateOutcome,\n RotatePage,\n RotatedValue,\n SkippedValue,\n} from \"../types.js\";\n\nconst BAD_TO = \"--to must be at least 32 hex or base64url characters.\";\nconst NO_STDIN =\n \"key rotate reads and writes files, so it takes no stdin (`-`). Name the files instead.\";\nconst WITH_PATHS =\n \"--collection selects a configured collection; it cannot be combined with paths.\";\nconst NEEDS_CONFIG = \"--collection needs a config file to select from.\";\nconst NO_KEY =\n \"No encryption key is available, so nothing can be re-encrypted. Run `manni key set` first.\";\nconst ENV_NEEDS_TO =\n \"The key comes from MANNI_ENCRYPTION_KEY; pass --to <value>, re-encrypt with it, then update the secret. Nothing is written to config.\";\nconst NARROWED_NEEDS_TO = \"A run over part of the family needs --to, and never writes the key.\";\nconst NO_FILES =\n \"No files to re-encrypt. Pass paths/globs, or declare a collection under `collections:` in manni.config.yaml.\";\n\n/**\n * Any ciphertext at all. A page without one has nothing to rotate, so it costs\n * no parse; with one, the page is parsed and the tag decides.\n */\nconst ANY_CIPHERTEXT = /~[A-Za-z0-9_-]{82,}/;\n\n/** The `cite:` section of the file, for `root:`, `repos:` and `baseline:`; `{}` without one. */\nfunction citeSection(file: ConfigFile | null): CiteConfig {\n if (file === null) return {};\n const doc: unknown = parseYaml(file.text);\n if (typeof doc !== \"object\" || doc === null || !(\"cite\" in doc)) return {};\n return parseCiteConfig(doc.cite, file.source);\n}\n\n/**\n * Where cited sources resolve from, as `cite` resolves it: `--root` (cwd\n * relative) > `cite.root` (config relative) > the git root > `cwd`.\n */\nfunction rootFor(\n flag: string | undefined,\n cite: CiteConfig,\n file: ConfigFile | null,\n cwd: string,\n): { root: string; fellBack: boolean } {\n if (flag !== undefined) return { root: resolve(cwd, flag), fellBack: false };\n if (file !== null && cite.root !== undefined) {\n return { root: resolve(file.dir, cite.root), fellBack: false };\n }\n const gitRoot = findGitRoot(cwd);\n return gitRoot === null ? { root: cwd, fellBack: true } : { root: gitRoot, fellBack: false };\n}\n\n/**\n * The checkouts an entry's `source.repo` may name, as `cite` resolves them:\n * `cite.repos` from the config's directory, then `--repo` from `cwd`, the\n * flag winning per name.\n */\nfunction reposFor(\n flags: Readonly<Record<string, string>> | undefined,\n cite: CiteConfig,\n file: ConfigFile | null,\n cwd: string,\n): Record<string, string> {\n const repos: Record<string, string> = {};\n // `cite` is `{}` without a file, so a config repo always has a directory to sit beside.\n if (file !== null) for (const [name, dir] of Object.entries(cite.repos ?? {})) repos[name] = resolve(file.dir, dir);\n for (const [name, dir] of Object.entries(flags ?? {})) repos[name] = resolve(cwd, dir);\n return repos;\n}\n\nfunction isEnoent(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && error.code === \"ENOENT\";\n}\n\nasync function indexFor(root: string, client: GitClient): Promise<SourceIndex> {\n try {\n return await buildSourceIndex(root, { gitClient: client });\n } catch (error) {\n if (isEnoent(error)) throw new KeyError(`Root directory not found: ${root}. Fix --root, or cite.root in manni.config.yaml.`);\n throw error;\n }\n}\n\n/**\n * The page's encrypted citations, the only ones a rotation reads sources\n * for: whether it has any, and whether one carries a commit (its own or the\n * page's), which is when history would be read.\n */\nfunction encryptedCitations(\n file: string,\n content: string,\n format: string | undefined,\n): { any: boolean; withCommit: boolean } {\n const read = readPage(file, content, format === undefined ? undefined : { format });\n const encrypted = read.citations.filter(({ citation }) => sourceRange(citation.source).encrypted);\n return {\n any: encrypted.length > 0,\n withCommit: encrypted.some(({ citation }) => citation.source[\"commit-sha\"] !== undefined),\n };\n}\n\ninterface Planned {\n page: RotatePage;\n path: string;\n content: string;\n changed: boolean;\n}\n\n/**\n * The citations of one page that a manifest owns (proposal 0044). They are\n * re-encrypted exactly as a page's own are — a citation counts as done only\n * when its `source.file` decrypts under the new key *and* its pin holds —\n * and written back as one value per page, each manifest written once.\n *\n * Kept in its own function, and reached from one place in the loop below, so\n * nothing about how *meta* values are rotated changes.\n */\nasync function rotateManifestCitations(\n sidecars: CitationSidecars | null,\n manifests: ManifestSet,\n page: { file: string; content: string; format?: string },\n opts: {\n root: string;\n fromKey: string;\n toKey: string;\n gitClient: GitClient;\n sourceIndex: () => Promise<SourceIndex>;\n checkouts: () => Promise<CheckoutResolver>;\n },\n): Promise<{ rewritten: RotatedValue[]; skipped: SkippedValue[]; wantsHistory: boolean }> {\n const none = { rewritten: [], skipped: [], wantsHistory: false };\n if (sidecars === null) return none;\n const sidecar = await sidecars.forPage(page.file, page.content, page.format);\n const owner = sidecar.owner;\n if (owner === undefined || sidecar.citations === undefined) return none;\n // Only a manifest entry that actually holds a ciphertext costs an index.\n if (!sidecar.citations.some((input) => ANY_CIPHERTEXT.test(JSON.stringify(input.entry)))) {\n return none;\n }\n const result = await reencryptCitationEntries(\n { ...page, citations: sidecar.citations },\n {\n root: opts.root,\n fromKey: opts.fromKey,\n toKey: opts.toKey,\n gitClient: opts.gitClient,\n sourceIndex: await opts.sourceIndex(),\n checkouts: await opts.checkouts(),\n },\n );\n if (result.changed && sidecar.entry !== undefined) {\n await manifests.write(owner, sidecar.entry, result.entries, 0);\n }\n return {\n rewritten: result.rewritten.map((r) => ({ kind: \"citation\" as const, ...r })),\n skipped: result.skipped.map((s) => ({ kind: \"citation\" as const, ...s })),\n // A pin that no longer holds is re-keyed from the lines at its commit.\n wantsHistory: sidecar.citations.some((input) =>\n /\"commit-sha\"\\s*:/.test(JSON.stringify(input.entry)),\n ),\n };\n}\n\ninterface PlannedManifest {\n manifest: RotateManifest;\n path: string;\n /** The manifest's text, with every rewritten value spliced into it. */\n text: string;\n changed: boolean;\n}\n\n/** How a run spells a manifest: relative to its base, like every file label. */\nfunction reportedPath(abs: string, base: string): string {\n const rel = relative(base, abs);\n return rel === \"\" ? \".\" : rel.split(sep).join(\"/\");\n}\n\n/**\n * The collections whose manifests this run covers. A run over every\n * collection, and one narrowed by `--collection`, covers the collections it\n * selected. A run over positional paths covers the collections those files\n * belong to, so the private half of a page a run re-encrypts moves with it.\n */\nfunction manifestCollections(\n collections: readonly CollectionConfig[],\n opts: {\n fromCollections: boolean;\n files: readonly string[];\n base: string;\n configDir: string;\n },\n): CollectionConfig[] {\n if (opts.fromCollections) return [...collections];\n const rels = opts.files.map((rel) =>\n reportedPath(resolve(opts.base, rel), opts.configDir),\n );\n return collections.filter((c) => rels.some((rel) => isMember(c, rel)));\n}\n\n/** The owned values one manifest entry supplies, or an empty map. */\nfunction valuesOf(\n index: ExternalMetadataIndex,\n entry: ExternalMetadataEntry,\n): ReadonlyMap<string, ExternalMetadataValue> {\n const empty = new Map<string, ExternalMetadataValue>();\n if (entry.join === PATH_JOIN) {\n return entry.abs === undefined ? empty : (index.byPath.get(entry.abs) ?? empty);\n }\n return index.byField.get(entry.join)?.get(entry.spelled) ?? empty;\n}\n\n/**\n * Re-encrypt the metadata values that live in the selected collections' local\n * manifests (proposals 0037, 0039 and 0041).\n *\n * A manifest is private by construction, so it is where an encrypted value is\n * most likely to sit. Rotation would otherwise leave it under the old key and\n * `meta validate` would report `encrypted:unreadable` on every page the\n * manifest feeds.\n *\n * Two things are left alone. A URL manifest is somebody else's file and\n * read-only (0038), so it is never loaded, and a rotation reaches no network.\n * The `citations` key is cite's: it re-keys a citation's source together with\n * its pin, under its own context, and re-encrypting the source alone would\n * break the pin. `reencryptData` skips it for the same reason\n * `reencryptMetadata` does on a page.\n *\n * Text in, text out. Each value is spliced into the manifest by\n * `spliceManifestValue`, which replaces that value's range and keeps every\n * other byte: the comments, the key order, the quoting and the line endings.\n * Nothing is written here; the caller writes when every value could be\n * re-encrypted.\n */\nasync function planManifests(opts: {\n collections: readonly CollectionConfig[];\n configDir: string;\n base: string;\n fromKey: string;\n toKey: string;\n /** The run's pages, as absolute paths, which a `{page}` manifest (0058) is read for. */\n pages: readonly string[];\n /** A run over the whole family: no paths and no `--collection`. */\n whole: boolean;\n}): Promise<PlannedManifest[]> {\n const local = opts.collections\n .map((c) => ({\n ...c,\n externalMetadata: c.externalMetadata.filter(\n (m) => classifyRef(m.file).kind !== \"url\",\n ),\n }))\n .filter((c) => c.externalMetadata.length > 0);\n if (local.length === 0) return [];\n\n // A `{page}` entry (proposal 0058) is one manifest per page, so its files\n // are enumerated rather than named: each page of the run resolves its own,\n // and a whole run adds every file the pattern's glob finds, so a manifest\n // whose page is gone is re-encrypted too (0058 stress test 12). The pages\n // those files name are handed to the loader like the run's own.\n const pages = new Set(opts.pages);\n if (opts.whole) {\n for (const c of local) {\n for (const m of c.externalMetadata) {\n if (!hasPagePlaceholder(m.file)) continue;\n for (const found of findPageManifests(m.file, opts.configDir, (rel) => isMember(c, rel))) {\n for (const entry of found.entries) pages.add(entry.pageAbs);\n }\n }\n }\n }\n\n const index = await loadExternalMetadata(local, {\n configDir: opts.configDir,\n base: opts.base,\n pages: [...pages],\n });\n if (index === null) return [];\n\n // One plan per manifest file, so a manifest two collections declare is read\n // once and spliced once. Its reported path and collection identify it the\n // way `index.entries` does. A plan is made when an entry first names its\n // file, and only a plan with a value to report is kept.\n const plans = new Map<string, PlannedManifest>();\n const located = new Map<string, { abs: string; collection: string }>();\n const locate = (collection: string, abs: string, join: string): void => {\n located.set(`${collection}\\u0000${reportedPath(abs, opts.base)}\\u0000${join}`, { abs, collection });\n };\n for (const c of local) {\n for (const m of c.externalMetadata) {\n const join = externalMetadataJoin(m);\n if (!hasPagePlaceholder(m.file)) {\n locate(c.name, isAbsolute(m.file) ? m.file : resolve(opts.configDir, m.file), join);\n continue;\n }\n for (const page of pages) {\n const resolved = pageManifestPath(m.file, opts.configDir, page);\n if (!(\"outside\" in resolved)) locate(c.name, resolved.abs, join);\n }\n }\n }\n const planFor = async (key: string): Promise<PlannedManifest | undefined> => {\n const where = located.get(key);\n if (where === undefined) return undefined;\n const known = plans.get(where.abs);\n if (known !== undefined) return known;\n const plan: PlannedManifest = {\n manifest: {\n file: reportedPath(where.abs, opts.base),\n collection: where.collection,\n rewritten: [],\n skipped: [],\n written: false,\n },\n path: where.abs,\n text: await readFile(where.abs, \"utf8\"),\n changed: false,\n };\n plans.set(where.abs, plan);\n return plan;\n };\n\n for (const entry of index.entries) {\n const plan = await planFor(`${entry.collection}\\u0000${entry.file}\\u0000${entry.join}`);\n if (plan === undefined) continue;\n const data: Record<string, unknown> = {};\n for (const [key, supplied] of valuesOf(index, entry)) {\n if (supplied.file === entry.file && supplied.collection === entry.collection) {\n data[key] = supplied.value;\n }\n }\n const done = reencryptData(data, { fromKey: opts.fromKey, toKey: opts.toKey });\n for (const r of done.rewritten) {\n plan.manifest.rewritten.push({ entry: entry.spelled, ...r });\n }\n for (const s of done.skipped) {\n plan.manifest.skipped.push({ entry: entry.spelled, ...s });\n }\n for (const key of done.keys) {\n plan.text = spliceManifestValue(plan.text, {\n entry: entry.spelled,\n key,\n value: done.data[key],\n join: entry.join,\n file: plan.manifest.file,\n }).text;\n plan.changed = true;\n }\n }\n\n return [...plans.values()].filter(\n (p) => p.manifest.rewritten.length > 0 || p.manifest.skipped.length > 0,\n );\n}\n\nexport async function runKeyRotate(opts: KeyRotateOptions): Promise<KeyRotateResult> {\n const cwd = resolve(opts.cwd ?? process.cwd());\n const env = opts.env ?? process.env;\n if (opts.to !== undefined && !isValidEncryptionKey(opts.to)) throw new KeyError(BAD_TO);\n if (opts.inputs.includes(STDIN_TOKEN)) throw new KeyError(NO_STDIN);\n const wanted = opts.collection ?? [];\n if (wanted.length > 0 && opts.inputs.length > 0) throw new KeyError(WITH_PATHS);\n\n const file = await readRotateConfig(opts.configPath, cwd);\n if (wanted.length > 0 && file === null) throw new KeyError(NEEDS_CONFIG);\n const { key: current, source: keySource } = resolveEncryptionKey({\n env,\n file,\n toError: toKeyError,\n });\n if (current === undefined) throw new KeyError(NO_KEY);\n const narrowed = opts.inputs.length > 0 || wanted.length > 0;\n\n // Only a key from the config has a config a rotation can be finished in.\n const keyFile = keySource === \"config\" ? file : null;\n const previous = keyFile?.encryptionKeyPrevious;\n if (\n keyFile !== null &&\n previous !== undefined &&\n (narrowed || (opts.to !== undefined && opts.to !== current))\n ) {\n throw new KeyError(unfinishedRotation(keyFile.source));\n }\n if (keySource === \"env\" && opts.to === undefined) throw new KeyError(ENV_NEEDS_TO);\n if (narrowed && opts.to === undefined) throw new KeyError(NARROWED_NEEDS_TO);\n\n // Finishing an interrupted rotation goes from the key it replaced to the one\n // the config already holds; otherwise from the current key to the new one.\n const fromKey = previous ?? current;\n const toKey = previous === undefined ? (opts.to ?? generateEncryptionKey()) : current;\n\n const collections =\n file === null ? [] : selectCollections(file.collections, wanted, file.source, toKeyError);\n const fromCollections = opts.inputs.length === 0;\n const inputs = fromCollections ? collections.flatMap((c) => c.paths) : opts.inputs;\n if (inputs.length === 0) throw new KeyError(NO_FILES);\n // One base per run, as in cite and meta: typed paths from cwd, a\n // collection's `paths:` from the config's directory.\n const base = fromCollections && file !== null ? file.dir : cwd;\n\n const forced = opts.as === undefined ? undefined : extractorByName(opts.as);\n if (opts.as !== undefined && forced === undefined) {\n throw new KeyError(\n `Unknown format \"${opts.as}\". Supported extensions: ${supportedExtensions().join(\", \")}.`,\n );\n }\n const format = forced?.name;\n const exts = opts.exts ?? forced?.extensions;\n const exclude = [\n ...new Set([\n ...(opts.exclude ?? []),\n ...(fromCollections ? collections.flatMap((c) => c.exclude) : []),\n ]),\n ];\n const { files, gitignoreSkipped } = await resolveTargetSet({\n inputs,\n exts,\n exclude,\n cwd: base,\n allowEmpty: opts.allowEmpty,\n ...gitignoreOptions({ flag: opts.respectGitignore, onNotice: opts.onNotice }),\n });\n assertNonEmpty({\n files,\n inputs,\n usingStdin: false,\n allowEmpty: opts.allowEmpty,\n exclude,\n exts,\n gitignoreSkipped,\n action: \"re-encrypted\",\n });\n\n const cite = citeSection(file);\n const { root, fellBack } = rootFor(opts.root, cite, file, cwd);\n const client = opts.gitClient ?? gitClient(root);\n // Built once, and only when a page cites an encrypted source.\n let index: Promise<SourceIndex> | undefined;\n const sourceIndex = (): Promise<SourceIndex> => {\n if (index === undefined) {\n if (fellBack) opts.onNotice?.(`No git root found; resolving src: paths from ${cwd}`);\n index = indexFor(root, client);\n }\n return index;\n };\n // The root's checkout and the declared ones, opened as an entry names them.\n const repos = reposFor(opts.repos, cite, file, cwd);\n let resolver: Promise<CheckoutResolver> | undefined;\n const checkouts = (): Promise<CheckoutResolver> =>\n (resolver ??= sourceIndex().then((rootIndex) =>\n checkoutResolver({ root, index: rootIndex, git: client }, repos),\n ));\n\n // The manifests that own `citations` (proposal 0044): a page whose entries\n // live in one carries no ciphertext of its own, so they are read for every\n // page of the run, not only the ones the shortcut below lets through.\n const sidecars =\n file === null\n ? null\n : await loadCitationSidecars({\n collections: file.collections,\n configDir: file.dir,\n base,\n configSource: file.source,\n key: current,\n toError: toKeyError,\n // A keyless manifest (proposal 0068) keeps what a page's schemas mark.\n marks: () => configMarks(file.path, file.dir),\n // A `{page}` manifest (0058) is read for exactly the pages rotated.\n pages: files.map((rel) => resolve(base, rel)),\n });\n const manifests = new ManifestSet();\n\n const planned: Planned[] = [];\n let wantsHistory = false;\n for (const rel of files) {\n const path = resolve(base, rel);\n const before = await readFile(path, \"utf8\");\n const page = { file: rel, content: before, ...(format === undefined ? {} : { format }) };\n // A page's own values first, then the entries its manifest holds.\n const sidecarWork = await rotateManifestCitations(sidecars, manifests, page, {\n root,\n fromKey,\n toKey,\n gitClient: client,\n sourceIndex,\n checkouts,\n });\n if (sidecarWork.wantsHistory) wantsHistory = true;\n if (!ANY_CIPHERTEXT.test(before)) {\n if (sidecarWork.rewritten.length === 0 && sidecarWork.skipped.length === 0) continue;\n planned.push({\n page: { file: rel, rewritten: sidecarWork.rewritten, skipped: sidecarWork.skipped, written: false },\n path,\n content: before,\n changed: false,\n });\n continue;\n }\n const meta = reencryptMetadata(page, { fromKey, toKey });\n const encrypted = encryptedCitations(rel, meta.content, format);\n if (encrypted.withCommit) wantsHistory = true;\n const cited: ReencryptCitationsResult = encrypted.any\n ? await reencryptCitations(\n { ...page, content: meta.content },\n {\n root,\n fromKey,\n toKey,\n gitClient: client,\n sourceIndex: await sourceIndex(),\n checkouts: await checkouts(),\n },\n )\n : { content: meta.content, rewritten: [], skipped: [] };\n const rewritten: RotatedValue[] = [\n ...meta.rewritten.map((r) => ({ kind: \"metadata\" as const, ...r })),\n ...cited.rewritten.map((r) => ({ kind: \"citation\" as const, ...r })),\n ...sidecarWork.rewritten,\n ];\n const skipped: SkippedValue[] = [\n ...meta.skipped.map((s) => ({ kind: \"metadata\" as const, ...s })),\n ...cited.skipped.map((s) => ({ kind: \"citation\" as const, ...s })),\n ...sidecarWork.skipped,\n ];\n if (rewritten.length === 0 && skipped.length === 0) continue;\n planned.push({\n page: { file: rel, rewritten, skipped, written: false },\n path,\n content: cited.content,\n changed: cited.content !== before,\n });\n }\n\n // A pin that no longer holds is re-keyed from the lines at its commit, so a\n // citation with one wants git. Where git is not there, said once.\n if (wantsHistory && !(await client.available())) opts.onNotice?.(GIT_UNAVAILABLE_HISTORY);\n\n // The private half of the same documents: every local manifest of the\n // collections this run covers. Planned in memory like the pages, and\n // counted with them, so one unreadable value anywhere stops the whole run.\n const valueManifests =\n file === null\n ? []\n : await planManifests({\n collections: manifestCollections(collections, {\n fromCollections,\n files,\n base,\n configDir: file.dir,\n }),\n configDir: file.dir,\n base,\n fromKey,\n toKey,\n pages: files.map((rel) => resolve(base, rel)),\n whole: !narrowed,\n });\n\n const reencrypted =\n planned.reduce((n, p) => n + p.page.rewritten.length, 0) +\n valueManifests.reduce((n, m) => n + m.manifest.rewritten.length, 0);\n const skipped =\n planned.reduce((n, p) => n + p.page.skipped.length, 0) +\n valueManifests.reduce((n, m) => n + m.manifest.skipped.length, 0);\n const writePage = opts.writePage ?? ((path: string, content: string) => writeFileAtomic(path, content));\n\n let outcome: RotateOutcome;\n if (skipped > 0) {\n // The new key is never written beside a value it cannot decrypt, and no\n // page is written without the key: nothing at all.\n outcome = \"skipped\";\n } else if (opts.dryRun === true) {\n outcome = \"dry-run\";\n } else {\n const writesKey = !narrowed && keyFile !== null;\n // (1) The new key, with the old one beside it. A rotation being finished\n // already has both.\n if (!narrowed && keyFile !== null && previous === undefined) {\n await writeEncryptionKey({ file: keyFile, key: toKey, previous: fromKey, cwd, toError: toKeyError });\n }\n // (2) The pages, then the manifests: the citations one owns, and the\n // encrypted values another holds. Each manifest is written once,\n // however many pages it keeps entries for.\n for (const p of planned) {\n if (!p.changed) continue;\n await writePage(p.path, p.content);\n p.page.written = true;\n }\n for (const changed of manifests.changed()) await writePage(changed.path, changed.text);\n for (const m of valueManifests) {\n if (!m.changed) continue;\n await writePage(m.path, m.text);\n m.manifest.written = true;\n }\n // (3) The old key goes, now that nothing is under it.\n if (!narrowed && keyFile !== null) {\n await writeEncryptionKey({ file: keyFile, key: toKey, previous: null, cwd, toError: toKeyError });\n }\n if (narrowed) outcome = \"narrowed\";\n else if (!writesKey) outcome = \"env\";\n else outcome = previous === undefined ? \"written\" : \"finished\";\n }\n\n const wrote = outcome !== \"skipped\" && outcome !== \"dry-run\";\n const baseline =\n file !== null && cite.baseline !== undefined\n ? resolve(file.dir, cite.baseline)\n : join(file?.dir ?? cwd, DEFAULT_CITE_BASELINE_PATH);\n\n return {\n pages: planned.map((p) => p.page),\n manifests: valueManifests.map((m) => m.manifest),\n reencrypted,\n skipped,\n keyWritten: outcome === \"written\" || outcome === \"finished\",\n outcome,\n ...(keyFile === null ? {} : { configSource: keyFile.source }),\n baselineStale: wrote && existsSync(baseline),\n exitCode: skipped > 0 ? 1 : 0,\n };\n}\n","/**\n * Which config file `manni key` reads and writes. `key` has no section of its\n * own (proposal 0045): the key it manages sits at the top of the family file,\n * beside `collections:`.\n *\n * - `set` writes the nearest family file whatever it carries, or the one `-c`\n * names, read as a family file (`findFamilyConfigFile`,\n * `readFamilyConfigFile`).\n * - `rotate` reads its key and collections from the file every sibling\n * without a section there would read them from: the nearest family file\n * carrying `collections:` or `encryptionKey:`. That is discovery with a\n * section name nothing uses.\n */\nimport {\n findConfigFile,\n findFamilyConfigFile,\n readConfigFile,\n readFamilyConfigFile,\n type ConfigFile,\n type ConfigFileOptions,\n} from \"../../shared/config-file.js\";\nimport { KeyError } from \"../errors.js\";\n\nexport const toKeyError = (message: string): KeyError => new KeyError(message);\n\nconst KEY_CONFIG: ConfigFileOptions = {\n section: \"key\",\n // The key never had a file of its own.\n legacyNames: [],\n toError: toKeyError,\n};\n\n/** The config `rotate` reads the current key and the collections from. */\nexport function readRotateConfig(\n configPath: string | undefined,\n cwd: string,\n): Promise<ConfigFile | null> {\n return configPath === undefined\n ? findConfigFile(cwd, KEY_CONFIG)\n : readConfigFile(configPath, cwd, KEY_CONFIG);\n}\n\n/** The config `set` writes to; `null` when discovery finds no family file. */\nexport function readSetConfig(\n configPath: string | undefined,\n cwd: string,\n): Promise<ConfigFile | null> {\n return configPath === undefined\n ? findFamilyConfigFile(cwd, toKeyError)\n : readFamilyConfigFile(configPath, cwd, toKeyError);\n}\n\n/** The refusal while `encryptionKeyPrevious:` says a rotation is unfinished. */\nexport const unfinishedRotation = (source: string): string =>\n `A rotation is unfinished in ${source}. Run \\`manni key rotate\\` with no --to to finish it.`;\n","/**\n * `manni key set [value]`: write the family encryption key (proposal 0045).\n *\n * Refusals, each exit 2 and none echoing a value: a value of the wrong shape;\n * `MANNI_ENCRYPTION_KEY` set, because it wins and the written key would never\n * be read; a rotation left unfinished; a key already configured, because\n * replacing one in place strands every value encrypted under it (`rotate` is\n * what replaces a key); and a new `manni.config.yaml` beside a legacy\n * `docmeta.config.yaml`, which the new file would hide from `manni meta`.\n *\n * It warns, and still writes, when git would publish the file.\n */\nimport { existsSync } from \"node:fs\";\nimport { basename, dirname, join, relative, resolve } from \"node:path\";\nimport { LEGACY_CONFIG_NAMES } from \"../../meta/internal.js\";\nimport {\n ENCRYPTION_KEY_ENV,\n committedKeyWarning,\n isIgnoredByGit,\n writeEncryptionKey,\n} from \"../../shared/encryption-key.js\";\nimport { generateEncryptionKey, isValidEncryptionKey } from \"../../shared/encryption.js\";\nimport { readSetConfig, toKeyError, unfinishedRotation } from \"../core/config.js\";\nimport { KeyError } from \"../errors.js\";\nimport type { KeySetOptions, KeySetResult } from \"../types.js\";\n\nconst BAD_VALUE =\n \"The key must be at least 32 hex or base64url characters. Run `manni key set` with no value to generate one.\";\nconst ENV_SET = `${ENCRYPTION_KEY_ENV} is set, so a key written to config would never be read. Unset it, or keep the key in the secret.`;\n\nconst alreadyConfigured = (source: string): string =>\n `An encryption key is already configured in ${source}. Run \\`manni key rotate\\` to replace it and re-encrypt every value.`;\n\n/**\n * A new family file beside a legacy per-tool file hides it: discovery reads\n * the family file first in a directory, and one holding only a key is every\n * tool's config, so `manni meta` would stop reading the options it had.\n */\nfunction refuseBesideLegacy(path: string, cwd: string): void {\n const dir = dirname(path);\n const name = basename(path);\n for (const legacy of LEGACY_CONFIG_NAMES) {\n const found = join(dir, legacy);\n if (!existsSync(found)) continue;\n const source = relative(cwd, found).replace(/\\\\/g, \"/\");\n throw new KeyError(\n `${source} is a single-tool config; a ${name} beside it would hide it. Move its keys under meta: in ${name} first.`,\n );\n }\n}\n\nexport async function runKeySet(opts: KeySetOptions): Promise<KeySetResult> {\n const cwd = resolve(opts.cwd ?? process.cwd());\n const env = opts.env ?? process.env;\n if (opts.value !== undefined && !isValidEncryptionKey(opts.value)) {\n throw new KeyError(BAD_VALUE);\n }\n // Empty counts as unset, as `resolveEncryptionKey` has it.\n const fromEnv = env[ENCRYPTION_KEY_ENV];\n if (fromEnv !== undefined && fromEnv !== \"\") throw new KeyError(ENV_SET);\n\n const file = await readSetConfig(opts.configPath, cwd);\n if (file?.encryptionKeyPrevious !== undefined) {\n throw new KeyError(unfinishedRotation(file.source));\n }\n if (file?.encryptionKey !== undefined) {\n throw new KeyError(alreadyConfigured(file.source));\n }\n\n const generated = opts.value === undefined;\n const key = opts.value ?? generateEncryptionKey();\n const dryRun = opts.dryRun === true;\n // Name the target before writing to it: the legacy check and the git\n // warning are both about the file the key is about to land in.\n const target = await writeEncryptionKey({ file, key, cwd, toError: toKeyError, dryRun: true });\n if (target.created) refuseBesideLegacy(target.path, cwd);\n if (isIgnoredByGit(target.path) === false) {\n opts.onNotice?.(committedKeyWarning(target.source));\n }\n if (!dryRun) await writeEncryptionKey({ file, key, cwd, toError: toKeyError });\n return { path: target.path, source: target.source, created: target.created, generated, dryRun };\n}\n"],"mappings":";;;;;;;;;;;;;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,EACpD;AACA,MAAI,CAAC,OAAQ,OAAM,mBAAmB,EAAE,MAAM,KAAK,KAAK,SAAS,WAAW,CAAC;AAC7E,SAAO,EAAE,MAAM,OAAO,MAAM,QAAQ,OAAO,QAAQ,SAAS,OAAO,SAAS,WAAW,OAAO;AAChG;","names":["join","skipped","existsSync","join","relative","resolve","join","existsSync","relative","resolve"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resultFor,
|
|
4
4
|
splitBaselined
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5VA3ZOB7.js";
|
|
6
6
|
import {
|
|
7
7
|
errorSite
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JHUEACRT.js";
|
|
9
9
|
import {
|
|
10
10
|
escapeWorkflowCommandMessage,
|
|
11
11
|
escapeWorkflowCommandProperty,
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
findingMessage,
|
|
52
52
|
renderCheckGithub
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-327CWO33.js.map
|
|
@@ -23,16 +23,16 @@ import {
|
|
|
23
23
|
partitionByLanguage,
|
|
24
24
|
storeToQuads,
|
|
25
25
|
validateGraph
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VV4YM6VM.js";
|
|
27
27
|
import {
|
|
28
28
|
GraphIndex,
|
|
29
29
|
encodeVectorIndex
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JFPCDIES.js";
|
|
31
31
|
import {
|
|
32
32
|
canonicalLanguage,
|
|
33
33
|
deriveGraph,
|
|
34
34
|
termIndex
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JS5NCZYC.js";
|
|
36
36
|
import {
|
|
37
37
|
COPIED_SHARE,
|
|
38
38
|
copiedPairs,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
questionKey,
|
|
43
43
|
readQuestionFile,
|
|
44
44
|
withExternalMetadata
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-7RZQAMA2.js";
|
|
46
46
|
import {
|
|
47
47
|
COVERAGE_FIELDS,
|
|
48
48
|
GRAPH_NOT_APPLICABLE_TO_VARIANT,
|
|
@@ -99,13 +99,13 @@ import {
|
|
|
99
99
|
routesFrom,
|
|
100
100
|
searchIndexFilename,
|
|
101
101
|
vectorIndexFilename
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-SVB45M54.js";
|
|
103
103
|
import {
|
|
104
104
|
splitBody
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-27FP4KKD.js";
|
|
106
106
|
import {
|
|
107
107
|
mergeMetaProvenance
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-JFB45L7D.js";
|
|
109
109
|
import {
|
|
110
110
|
findWindows,
|
|
111
111
|
isMissing,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
pinOfLines,
|
|
115
115
|
spellLines,
|
|
116
116
|
spliceManifestValue
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-MH5MX4B3.js";
|
|
118
118
|
import {
|
|
119
119
|
termLabelSource
|
|
120
120
|
} from "./chunk-DSWKBZWW.js";
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
DocmetaError,
|
|
123
123
|
urlManifestMessage,
|
|
124
124
|
writeFileAtomic
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-OZWV27SE.js";
|
|
126
126
|
import {
|
|
127
127
|
noticeOnce,
|
|
128
128
|
warn
|
|
@@ -3298,4 +3298,4 @@ export {
|
|
|
3298
3298
|
runStats,
|
|
3299
3299
|
renderStats
|
|
3300
3300
|
};
|
|
3301
|
-
//# sourceMappingURL=chunk-
|
|
3301
|
+
//# sourceMappingURL=chunk-33FIOHJ4.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
renderCalibration,
|
|
4
4
|
resolveBatchTraces,
|
|
5
5
|
runBatch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6E6Z6UQL.js";
|
|
7
7
|
import {
|
|
8
8
|
discoverConfig,
|
|
9
9
|
labelKey,
|
|
@@ -378,4 +378,4 @@ export {
|
|
|
378
378
|
score,
|
|
379
379
|
runCalibrate
|
|
380
380
|
};
|
|
381
|
-
//# sourceMappingURL=chunk-
|
|
381
|
+
//# sourceMappingURL=chunk-3COYAAR7.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractFrontmatter,
|
|
7
7
|
extractorForExtension,
|
|
8
8
|
locateFrontmatter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OZWV27SE.js";
|
|
10
10
|
import {
|
|
11
11
|
errorMessage
|
|
12
12
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -3247,4 +3247,4 @@ export {
|
|
|
3247
3247
|
unsupportedFormatMessage,
|
|
3248
3248
|
listFormats
|
|
3249
3249
|
};
|
|
3250
|
-
//# sourceMappingURL=chunk-
|
|
3250
|
+
//# sourceMappingURL=chunk-3LZ6AYB4.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
listInTree,
|
|
11
11
|
resolveArtifacts,
|
|
12
12
|
safeRead
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6ZYXK3JT.js";
|
|
14
14
|
import {
|
|
15
15
|
makeRedactor
|
|
16
16
|
} from "./chunk-6WJUZQQX.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-4TSWU2SU.js";
|
|
20
20
|
import {
|
|
21
21
|
extractFrontmatter
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OZWV27SE.js";
|
|
23
23
|
|
|
24
24
|
// src/tracevals/rules/turn.ts
|
|
25
25
|
var INJECTED = /<(system-reminder|task-notification|ci-monitor-event|local-command-stdout|local-command-stderr|local-command-caveat)>[\s\S]*?<\/\1>/g;
|
|
@@ -671,4 +671,4 @@ export {
|
|
|
671
671
|
resolveTurnSources,
|
|
672
672
|
pathKey
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-4A445ALG.js.map
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
mergeWithMarks,
|
|
9
9
|
pageMarks,
|
|
10
10
|
pageSchemaSet
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MH5MX4B3.js";
|
|
12
12
|
import {
|
|
13
13
|
loadMetaSection,
|
|
14
14
|
rebaseConfigSchemaRefs,
|
|
15
15
|
schemaTrustRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OZWV27SE.js";
|
|
17
17
|
|
|
18
18
|
// src/meta/core/page-view.ts
|
|
19
19
|
async function metaPageView(opts) {
|
|
@@ -80,4 +80,4 @@ export {
|
|
|
80
80
|
metaPageView,
|
|
81
81
|
declaredAt
|
|
82
82
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-4KY2RUXQ.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
shortPin,
|
|
8
8
|
shortSrc,
|
|
9
9
|
spellAt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JHUEACRT.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSrc
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XKZZRG3Z.js";
|
|
14
14
|
import {
|
|
15
15
|
guidanceLines
|
|
16
16
|
} from "./chunk-QK6VYJHV.js";
|
|
@@ -532,4 +532,4 @@ export {
|
|
|
532
532
|
releasesCell,
|
|
533
533
|
renderHistoryPretty
|
|
534
534
|
};
|
|
535
|
-
//# sourceMappingURL=chunk-
|
|
535
|
+
//# sourceMappingURL=chunk-5VA3ZOB7.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
parseTraceFile,
|
|
4
4
|
renderTrace
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NUAVQQMC.js";
|
|
6
6
|
import {
|
|
7
7
|
evaluateWhen,
|
|
8
8
|
matchesGlob,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
extractEvals,
|
|
31
31
|
findManifest,
|
|
32
32
|
resolveArtifacts
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6ZYXK3JT.js";
|
|
34
34
|
import {
|
|
35
35
|
discoverConfig
|
|
36
36
|
} from "./chunk-QSPH4F56.js";
|
|
@@ -74,10 +74,10 @@ import {
|
|
|
74
74
|
} from "./chunk-QS2Z3SWL.js";
|
|
75
75
|
import {
|
|
76
76
|
declaredAt
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-4KY2RUXQ.js";
|
|
78
78
|
import {
|
|
79
79
|
xmlEscape
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-FE3US7FR.js";
|
|
81
81
|
import {
|
|
82
82
|
PATH_JOIN,
|
|
83
83
|
externalMetadataJoin,
|
|
@@ -85,12 +85,12 @@ import {
|
|
|
85
85
|
loadExternalMetadata,
|
|
86
86
|
memberOf,
|
|
87
87
|
mergeWithMarks
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-MH5MX4B3.js";
|
|
89
89
|
import {
|
|
90
90
|
DocmetaError,
|
|
91
91
|
classifyRef,
|
|
92
92
|
extractFrontmatter
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-OZWV27SE.js";
|
|
94
94
|
import {
|
|
95
95
|
escapeWorkflowCommandMessage,
|
|
96
96
|
escapeWorkflowCommandProperty,
|
|
@@ -3204,4 +3204,4 @@ export {
|
|
|
3204
3204
|
resolveBatchTraces,
|
|
3205
3205
|
runBatch
|
|
3206
3206
|
};
|
|
3207
|
-
//# sourceMappingURL=chunk-
|
|
3207
|
+
//# sourceMappingURL=chunk-6E6Z6UQL.js.map
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "./chunk-4TSWU2SU.js";
|
|
8
8
|
import {
|
|
9
9
|
metaProvenanceEntries
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JFB45L7D.js";
|
|
11
11
|
import {
|
|
12
12
|
__default3 as __default,
|
|
13
13
|
extractFrontmatter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OZWV27SE.js";
|
|
15
15
|
|
|
16
16
|
// src/tracevals/capture/manifest.ts
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
@@ -1168,4 +1168,4 @@ export {
|
|
|
1168
1168
|
ARTIFACT_EVALS_SCHEMA_ID,
|
|
1169
1169
|
extractEvals
|
|
1170
1170
|
};
|
|
1171
|
-
//# sourceMappingURL=chunk-
|
|
1171
|
+
//# sourceMappingURL=chunk-6ZYXK3JT.js.map
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
GraphError,
|
|
4
4
|
STDIN_PATH
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SVB45M54.js";
|
|
6
6
|
import {
|
|
7
7
|
metaPageView
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4KY2RUXQ.js";
|
|
9
9
|
import {
|
|
10
10
|
parseLines
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MH5MX4B3.js";
|
|
12
12
|
import {
|
|
13
13
|
errorMessage
|
|
14
14
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
mergePage,
|
|
312
312
|
withExternalMetadata
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-7RZQAMA2.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
parserForExtension,
|
|
12
12
|
supportedExtensions,
|
|
13
13
|
unsupportedFormatMessage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3LZ6AYB4.js";
|
|
15
15
|
import {
|
|
16
16
|
BLOCK_KINDS,
|
|
17
17
|
BLOCK_KIND_NODE,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
gitignoreOptions,
|
|
35
35
|
isErrorSeverity,
|
|
36
36
|
resolveTargetSet
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OZWV27SE.js";
|
|
38
38
|
import {
|
|
39
39
|
ditaOtHome,
|
|
40
40
|
findConfigFile,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
} from "./chunk-HX44GB4Z.js";
|
|
47
47
|
import {
|
|
48
48
|
package_default
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PCTJ7P6U.js";
|
|
50
50
|
import {
|
|
51
51
|
ToolError,
|
|
52
52
|
errorMessage
|
|
@@ -2477,4 +2477,4 @@ export {
|
|
|
2477
2477
|
STDIN_LABEL,
|
|
2478
2478
|
runLint
|
|
2479
2479
|
};
|
|
2480
|
-
//# sourceMappingURL=chunk-
|
|
2480
|
+
//# sourceMappingURL=chunk-CWVL7XZR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
displayPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZLOLC6WD.js";
|
|
5
5
|
import {
|
|
6
6
|
escapeWorkflowCommandMessage,
|
|
7
7
|
escapeWorkflowCommandProperty,
|
|
@@ -22,4 +22,4 @@ function renderFindingsGithub(report) {
|
|
|
22
22
|
export {
|
|
23
23
|
renderFindingsGithub
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-E3YXGLEU.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
STDIN_TOKEN,
|
|
9
9
|
notFoundMessage,
|
|
10
10
|
resolveTargetSet
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OZWV27SE.js";
|
|
12
12
|
import {
|
|
13
13
|
escapeWorkflowCommandMessage,
|
|
14
14
|
escapeWorkflowCommandProperty,
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
renderJson,
|
|
439
439
|
renderPretty
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
441
|
+
//# sourceMappingURL=chunk-E76WPNYO.js.map
|
|
@@ -20,23 +20,23 @@ import {
|
|
|
20
20
|
} from "./chunk-MDZXRHIJ.js";
|
|
21
21
|
import {
|
|
22
22
|
declaredAt
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4KY2RUXQ.js";
|
|
24
24
|
import {
|
|
25
25
|
metaProvenanceEntries
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JFB45L7D.js";
|
|
27
27
|
import {
|
|
28
28
|
familyMarks,
|
|
29
29
|
loadExternalMetadata,
|
|
30
30
|
memberOf,
|
|
31
31
|
mergeWithMarks,
|
|
32
32
|
provenanceEntries
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MH5MX4B3.js";
|
|
34
34
|
import {
|
|
35
35
|
__default,
|
|
36
36
|
classifyRef,
|
|
37
37
|
extractFrontmatter,
|
|
38
38
|
integrityOf
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OZWV27SE.js";
|
|
40
40
|
import {
|
|
41
41
|
findConfigFileSync,
|
|
42
42
|
ownsKey,
|
|
@@ -2976,4 +2976,4 @@ export {
|
|
|
2976
2976
|
applySelection,
|
|
2977
2977
|
runEvals
|
|
2978
2978
|
};
|
|
2979
|
-
//# sourceMappingURL=chunk-
|
|
2979
|
+
//# sourceMappingURL=chunk-EITEHOSX.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-OZUPJB4J.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverArtifacts
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FNQE3RAW.js";
|
|
9
9
|
import {
|
|
10
10
|
hashFile,
|
|
11
11
|
manifestPathFor,
|
|
12
12
|
relPosix,
|
|
13
13
|
sha256Hex,
|
|
14
14
|
writeManifest
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6ZYXK3JT.js";
|
|
16
16
|
import {
|
|
17
17
|
loadConfig
|
|
18
18
|
} from "./chunk-QSPH4F56.js";
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
runCapture,
|
|
213
213
|
renderCapture
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-EU5QLSNN.js.map
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
sha256,
|
|
20
20
|
splitBody,
|
|
21
21
|
urlManifestRefusal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EITEHOSX.js";
|
|
23
23
|
import {
|
|
24
24
|
turnBudgetSkipReason
|
|
25
25
|
} from "./chunk-SSQZB5SQ.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
externalWriteWarnings,
|
|
35
35
|
offerExternalHomes
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JFB45L7D.js";
|
|
37
37
|
import {
|
|
38
38
|
LOCATION_KEYWORD,
|
|
39
39
|
Validator,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
readManifestOrEmpty,
|
|
42
42
|
readManifestValue,
|
|
43
43
|
spliceManifestValue
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MH5MX4B3.js";
|
|
45
45
|
import {
|
|
46
46
|
writeFileAtomic
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-OZWV27SE.js";
|
|
48
48
|
import {
|
|
49
49
|
noticeOnce,
|
|
50
50
|
warn
|
|
@@ -1041,4 +1041,4 @@ export {
|
|
|
1041
1041
|
makeGenerateScripts,
|
|
1042
1042
|
runRun
|
|
1043
1043
|
};
|
|
1044
|
-
//# sourceMappingURL=chunk-
|
|
1044
|
+
//# sourceMappingURL=chunk-F7GYY373.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
canonicalSchemaRef,
|
|
7
7
|
fingerprint,
|
|
8
8
|
isErrorSeverity
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OZWV27SE.js";
|
|
10
10
|
import {
|
|
11
11
|
escapeWorkflowCommandMessage,
|
|
12
12
|
escapeWorkflowCommandProperty,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-B2242FYO.js";
|
|
21
21
|
import {
|
|
22
22
|
package_default
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PCTJ7P6U.js";
|
|
24
24
|
|
|
25
25
|
// src/meta/reporters/rule-id.ts
|
|
26
26
|
var SYNTHETIC_SCHEMA = "(parse)";
|
|
@@ -407,4 +407,4 @@ export {
|
|
|
407
407
|
renderGithub,
|
|
408
408
|
render
|
|
409
409
|
};
|
|
410
|
-
//# sourceMappingURL=chunk-
|
|
410
|
+
//# sourceMappingURL=chunk-FE3US7FR.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
listInTree,
|
|
6
6
|
safeRead,
|
|
7
7
|
segments
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6ZYXK3JT.js";
|
|
9
9
|
import {
|
|
10
10
|
TracevalsError
|
|
11
11
|
} from "./chunk-ZINZTHWO.js";
|
|
@@ -171,4 +171,4 @@ async function discoverArtifacts(options) {
|
|
|
171
171
|
export {
|
|
172
172
|
discoverArtifacts
|
|
173
173
|
};
|
|
174
|
-
//# sourceMappingURL=chunk-
|
|
174
|
+
//# sourceMappingURL=chunk-FNQE3RAW.js.map
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
parseChunkRows,
|
|
8
8
|
parseChunksManifest,
|
|
9
9
|
range
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JFPCDIES.js";
|
|
11
11
|
import {
|
|
12
12
|
documentBase,
|
|
13
13
|
formatOf,
|
|
14
14
|
loadRunConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SVB45M54.js";
|
|
16
16
|
import {
|
|
17
17
|
bodyLineOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MH5MX4B3.js";
|
|
19
19
|
import {
|
|
20
20
|
integrityOf,
|
|
21
21
|
locateFrontmatter
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OZWV27SE.js";
|
|
23
23
|
import {
|
|
24
24
|
notice,
|
|
25
25
|
warn
|
|
@@ -577,4 +577,4 @@ export {
|
|
|
577
577
|
runAnnotate,
|
|
578
578
|
renderAnnotate
|
|
579
579
|
};
|
|
580
|
-
//# sourceMappingURL=chunk-
|
|
580
|
+
//# sourceMappingURL=chunk-FO6MNXOF.js.map
|
|
@@ -7,7 +7,11 @@ function publicCitation(result) {
|
|
|
7
7
|
file: result.origin.file
|
|
8
8
|
};
|
|
9
9
|
if (result.origin.line !== void 0) origin.line = result.origin.line;
|
|
10
|
-
const source = {
|
|
10
|
+
const source = {
|
|
11
|
+
src: result.source.src,
|
|
12
|
+
...result.source.repo === void 0 ? {} : { repo: result.source.repo },
|
|
13
|
+
status: result.source.status
|
|
14
|
+
};
|
|
11
15
|
if (result.source.newLines !== void 0) source.newLines = result.source.newLines;
|
|
12
16
|
if (result.source.newSrc !== void 0) source.newSrc = result.source.newSrc;
|
|
13
17
|
if (result.source.candidates !== void 0) source.candidates = result.source.candidates;
|
|
@@ -70,4 +74,4 @@ export {
|
|
|
70
74
|
renderHistoryJson,
|
|
71
75
|
renderUpdateJson
|
|
72
76
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-GMOAW2EG.js.map
|