@hawkeyexl/manni 4.10.0 → 4.12.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-EFSFG6GC.js +46 -0
- package/dist/build-NIO3UIWJ.js +36 -0
- package/dist/calibrate-6VO7URRV.js +41 -0
- package/dist/capture-NMBVJO3C.js +38 -0
- package/dist/check-SHOYX2B5.js +30 -0
- package/dist/check-XMJKH3KV.js +34 -0
- package/dist/{check-NLL4NRYA.js → check-Y62BJNC4.js} +35 -31
- package/dist/{check-NLL4NRYA.js.map → check-Y62BJNC4.js.map} +1 -1
- package/dist/{check-7B77ZD2N.js → check-ZMO3ZLMW.js} +19 -15
- package/dist/{chunk-PK7EKJ5T.js → chunk-24AJK2RG.js} +5 -10
- package/dist/chunk-24AJK2RG.js.map +1 -0
- package/dist/chunk-2OZF2VUB.js +164 -0
- package/dist/chunk-2OZF2VUB.js.map +1 -0
- package/dist/chunk-2UJZXVHR.js +1868 -0
- package/dist/chunk-2UJZXVHR.js.map +1 -0
- package/dist/{chunk-DNZUBCGZ.js → chunk-3BRJCQPY.js} +36 -7
- package/dist/chunk-3BRJCQPY.js.map +1 -0
- package/dist/{chunk-D2UW3ZCK.js → chunk-42VFJOAF.js} +13 -11
- package/dist/{chunk-D2UW3ZCK.js.map → chunk-42VFJOAF.js.map} +1 -1
- package/dist/{chunk-LQZQ5KGG.js → chunk-4Q24OYI3.js} +7 -7
- package/dist/{chunk-XU73V5XT.js → chunk-4WJTURRO.js} +15 -15
- package/dist/{chunk-WN47MNSK.js → chunk-5SID2SVL.js} +4 -4
- package/dist/{chunk-5REEVKGH.js → chunk-AANUY4BH.js} +2 -2
- package/dist/chunk-ANPIIYRH.js +2272 -0
- package/dist/chunk-ANPIIYRH.js.map +1 -0
- package/dist/{chunk-RZVCWX5R.js → chunk-AYVKN3PG.js} +4 -4
- package/dist/{chunk-2UCC26MO.js → chunk-CH6IOGXV.js} +9 -9
- package/dist/{chunk-RODZ7MB7.js → chunk-D5Z6B4M7.js} +6 -6
- package/dist/{chunk-IJ62BB2T.js → chunk-D6SELXQ2.js} +7 -7
- package/dist/{chunk-2JV7C4YV.js → chunk-DDILEF5F.js} +890 -1399
- package/dist/chunk-DDILEF5F.js.map +1 -0
- package/dist/{chunk-3E2X2RBU.js → chunk-DGRLHDM4.js} +9 -9
- package/dist/{chunk-2BV4FBC7.js → chunk-DHGB4JBG.js} +4 -3
- package/dist/chunk-DHGB4JBG.js.map +1 -0
- package/dist/{chunk-6LR73NMO.js → chunk-DLU5FCFT.js} +30 -28
- package/dist/chunk-DLU5FCFT.js.map +1 -0
- package/dist/chunk-DSWKBZWW.js +16 -0
- package/dist/chunk-DSWKBZWW.js.map +1 -0
- package/dist/{chunk-BD7IXBWE.js → chunk-F564FHMQ.js} +8 -8
- package/dist/{chunk-ABHG6I3G.js → chunk-FKAZUZQU.js} +469 -85
- package/dist/chunk-FKAZUZQU.js.map +1 -0
- package/dist/{chunk-DFCQ6BMI.js → chunk-G3MBUL5M.js} +4 -4
- package/dist/{chunk-SUTMSDQ2.js → chunk-GQ3KRY3B.js} +3 -3
- package/dist/chunk-HDPN46JP.js +393 -0
- package/dist/chunk-HDPN46JP.js.map +1 -0
- package/dist/{chunk-EAUIQADY.js → chunk-IQQAJROD.js} +6 -6
- package/dist/{chunk-ZHRPH52H.js → chunk-IZXN3WI6.js} +2 -2
- package/dist/{chunk-NCPWXHDO.js → chunk-JEUFYSFQ.js} +4 -4
- package/dist/{chunk-G6FNWRAI.js → chunk-JSSM7VVV.js} +4 -4
- package/dist/{chunk-CCWMACJL.js → chunk-KFGZPVFA.js} +229 -821
- package/dist/chunk-KFGZPVFA.js.map +1 -0
- package/dist/{chunk-H26VDFDS.js → chunk-KGFSPJLD.js} +2 -2
- package/dist/{chunk-AO5TSDKT.js → chunk-KMORGMCW.js} +7 -7
- package/dist/{chunk-WQWKYAAK.js → chunk-NUQF5F5J.js} +2 -2
- package/dist/{chunk-2YJ5H5E6.js → chunk-NZ6KSHFD.js} +23 -21
- package/dist/{chunk-2YJ5H5E6.js.map → chunk-NZ6KSHFD.js.map} +1 -1
- package/dist/{chunk-7Y3N4Y72.js → chunk-OHUDZRLK.js} +3 -3
- package/dist/{chunk-GCKHSBEN.js → chunk-OKMTUAWO.js} +4 -4
- package/dist/{chunk-6M5VJOC2.js → chunk-OTJOBZJ5.js} +167 -166
- package/dist/chunk-OTJOBZJ5.js.map +1 -0
- package/dist/{chunk-2W34HX2U.js → chunk-PS257NIU.js} +288 -373
- package/dist/chunk-PS257NIU.js.map +1 -0
- package/dist/chunk-QDC7JPFG.js +685 -0
- package/dist/chunk-QDC7JPFG.js.map +1 -0
- package/dist/chunk-QEAGL4V5.js +3185 -0
- package/dist/chunk-QEAGL4V5.js.map +1 -0
- package/dist/{chunk-GB2XPITA.js → chunk-QMY57PVW.js} +2 -2
- package/dist/{chunk-55GMOVKW.js → chunk-QNDDPXFR.js} +2 -2
- package/dist/{chunk-GXN7RRHR.js → chunk-QSIXNTRV.js} +4 -4
- package/dist/{chunk-G7XD4QH5.js → chunk-RGLFV4KO.js} +11372 -10218
- package/dist/chunk-RGLFV4KO.js.map +1 -0
- package/dist/{chunk-QBVP3SQP.js → chunk-SGR7ZAVE.js} +13 -7
- package/dist/chunk-SGR7ZAVE.js.map +1 -0
- package/dist/{chunk-KBG463UK.js → chunk-SMHAYK6I.js} +2409 -5243
- package/dist/chunk-SMHAYK6I.js.map +1 -0
- package/dist/{chunk-XG6PVB5S.js → chunk-SSQZB5SQ.js} +1 -11
- package/dist/chunk-SSQZB5SQ.js.map +1 -0
- package/dist/{chunk-GDLHTI5R.js → chunk-STPGIKPY.js} +8 -2
- package/dist/chunk-STPGIKPY.js.map +1 -0
- package/dist/{chunk-QJRQ4BRC.js → chunk-U22TOL5Y.js} +17 -17
- package/dist/{chunk-NGTVREIH.js → chunk-U6IHLEWT.js} +2 -2
- package/dist/{chunk-Z5YHMRLF.js → chunk-UUCCV3SI.js} +2 -2
- package/dist/{chunk-ZXXFP2LA.js → chunk-UXMCHBOJ.js} +2 -2
- package/dist/{chunk-VZVEP2OZ.js → chunk-VFAKGIDG.js} +2 -2
- package/dist/{chunk-QCHVR4ZM.js → chunk-VM7VAFJW.js} +33 -7
- package/dist/chunk-VM7VAFJW.js.map +1 -0
- package/dist/{chunk-VQK4VHLF.js → chunk-YQV75FIL.js} +2 -2
- package/dist/chunk-YUTVAMWW.js +2 -0
- package/dist/chunk-ZPLVANY2.js +15 -0
- package/dist/chunk-ZPLVANY2.js.map +1 -0
- package/dist/{cli-BIIUKPTE.js → cli-4CR7QIOK.js} +26 -22
- package/dist/{cli-BIIUKPTE.js.map → cli-4CR7QIOK.js.map} +1 -1
- package/dist/{cli-V2DI3K2R.js → cli-6R4W3HAH.js} +37 -33
- package/dist/{cli-V2DI3K2R.js.map → cli-6R4W3HAH.js.map} +1 -1
- package/dist/{cli-HO62TOM2.js → cli-BOMA2FMP.js} +14 -11
- package/dist/{cli-EH3I4IUX.js → cli-EDQPQOCE.js} +47 -41
- package/dist/cli-EDQPQOCE.js.map +1 -0
- package/dist/{cli-P2X7PNY6.js → cli-GBF76EXT.js} +25 -20
- package/dist/{cli-P2X7PNY6.js.map → cli-GBF76EXT.js.map} +1 -1
- package/dist/{cli-4YYC6LCY.js → cli-MQYCF3SR.js} +27 -23
- package/dist/{cli-4YYC6LCY.js.map → cli-MQYCF3SR.js.map} +1 -1
- package/dist/{cli-UETKXHJN.js → cli-OJKFXQOM.js} +9 -9
- package/dist/{cli-LWST5FQH.js → cli-PHZAO4LZ.js} +4 -4
- package/dist/{cli-TELPAMJO.js → cli-PTKFFNOW.js} +59 -35
- package/dist/cli-PTKFFNOW.js.map +1 -0
- package/dist/{cli-SGVFZOAW.js → cli-UW2K5Z5J.js} +34 -29
- package/dist/{cli-SGVFZOAW.js.map → cli-UW2K5Z5J.js.map} +1 -1
- package/dist/cli-XXTNPPKB.js +83 -0
- package/dist/cli-XXTNPPKB.js.map +1 -0
- package/dist/cli.js +24 -12
- package/dist/cli.js.map +1 -1
- package/dist/{config-TYXYQK3I.js → config-JJW75SBX.js} +5 -5
- package/dist/docmeta.js +13 -10
- package/dist/docmeta.js.map +1 -1
- package/dist/github-6VQKSB67.js +35 -0
- package/dist/github-RBSEM7ZK.js +30 -0
- package/dist/graph/runtime.d.ts +4 -1
- package/dist/graph/runtime.js +20 -9
- package/dist/graph/runtime.js.map +1 -1
- package/dist/{host-6GURH5HE.js → host-YSTYO5DX.js} +3 -3
- package/dist/index.d.ts +1214 -940
- package/dist/index.js +190 -160
- package/dist/index.js.map +1 -1
- package/dist/{json-QR4G35KA.js → json-PU2HLHDQ.js} +18 -14
- package/dist/labels-SJNSOPBI.js +73 -0
- package/dist/labels-SJNSOPBI.js.map +1 -0
- package/dist/lint-KIVTHLGU.js +34 -0
- package/dist/list-RDEJDDJF.js +32 -0
- package/dist/list-SUTDWL2J.js +35 -0
- package/dist/{page-FSXDXCDD.js → page-UMAA3NCM.js} +18 -13
- package/dist/{prepare-UPIBTFNS.js → prepare-3I3LOXXD.js} +24 -20
- package/dist/{prepare-UPIBTFNS.js.map → prepare-3I3LOXXD.js.map} +1 -1
- package/dist/{pretty-4IONWSEP.js → pretty-ANLRHU4O.js} +18 -14
- package/dist/{pretty-R4BQD2VH.js → pretty-Q3ZFKOR7.js} +18 -14
- package/dist/{provider-527CO4DM.js → provider-LBX4IXGX.js} +3 -3
- package/dist/{release-3D5PK6M7.js → release-VV3UTKE5.js} +3 -3
- package/dist/{reporters-M6LJ2IYU.js → reporters-26H3N2KW.js} +3 -3
- package/dist/{reporters-DHO2BXAD.js → reporters-ILT36CIH.js} +7 -7
- package/dist/{reporters-FPP6JNDP.js → reporters-PNDLWT6K.js} +16 -12
- package/dist/run-QXCK33Z4.js +37 -0
- package/dist/{term-ASM4LVYC.js → term-D2N7UN4P.js} +981 -138
- package/dist/term-D2N7UN4P.js.map +1 -0
- package/dist/validate-BRUCOT2O.js +19 -0
- package/dist/validate-BRUCOT2O.js.map +1 -0
- package/package.json +3 -2
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/shapes/graph/shapes-1.1.0.ttl +785 -0
- package/dist/batch-6NICDKRE.js +0 -41
- package/dist/build-3KP2K3XN.js +0 -32
- package/dist/calibrate-LUA3DWKD.js +0 -36
- package/dist/capture-NETOHCB4.js +0 -34
- package/dist/check-E4QCB7LS.js +0 -20
- package/dist/check-PTECPIIB.js +0 -26
- package/dist/chunk-2BV4FBC7.js.map +0 -1
- package/dist/chunk-2JV7C4YV.js.map +0 -1
- package/dist/chunk-2W34HX2U.js.map +0 -1
- package/dist/chunk-4DLF5SA4.js +0 -392
- package/dist/chunk-4DLF5SA4.js.map +0 -1
- package/dist/chunk-6AGESHHM.js +0 -387
- package/dist/chunk-6AGESHHM.js.map +0 -1
- package/dist/chunk-6LR73NMO.js.map +0 -1
- package/dist/chunk-6M5VJOC2.js.map +0 -1
- package/dist/chunk-ABHG6I3G.js.map +0 -1
- package/dist/chunk-CCWMACJL.js.map +0 -1
- package/dist/chunk-DNZUBCGZ.js.map +0 -1
- package/dist/chunk-G7XD4QH5.js.map +0 -1
- package/dist/chunk-GDLHTI5R.js.map +0 -1
- package/dist/chunk-KBG463UK.js.map +0 -1
- package/dist/chunk-PK7EKJ5T.js.map +0 -1
- package/dist/chunk-QBVP3SQP.js.map +0 -1
- package/dist/chunk-QCHVR4ZM.js.map +0 -1
- package/dist/chunk-VVVKBUBO.js +0 -818
- package/dist/chunk-VVVKBUBO.js.map +0 -1
- package/dist/chunk-XG6PVB5S.js.map +0 -1
- package/dist/cli-EH3I4IUX.js.map +0 -1
- package/dist/cli-TELPAMJO.js.map +0 -1
- package/dist/github-ESK45CEZ.js +0 -26
- package/dist/github-WER7JUTN.js +0 -31
- package/dist/lint-QTI7XK2A.js +0 -30
- package/dist/list-JO4G3TS3.js +0 -30
- package/dist/list-O2MJUP5V.js +0 -28
- package/dist/run-YH5Z7RJ7.js +0 -32
- package/dist/term-ASM4LVYC.js.map +0 -1
- package/dist/validate-7JI3H57P.js +0 -17
- /package/dist/{batch-6NICDKRE.js.map → batch-EFSFG6GC.js.map} +0 -0
- /package/dist/{build-3KP2K3XN.js.map → build-NIO3UIWJ.js.map} +0 -0
- /package/dist/{calibrate-LUA3DWKD.js.map → calibrate-6VO7URRV.js.map} +0 -0
- /package/dist/{capture-NETOHCB4.js.map → capture-NMBVJO3C.js.map} +0 -0
- /package/dist/{check-7B77ZD2N.js.map → check-SHOYX2B5.js.map} +0 -0
- /package/dist/{check-E4QCB7LS.js.map → check-XMJKH3KV.js.map} +0 -0
- /package/dist/{check-PTECPIIB.js.map → check-ZMO3ZLMW.js.map} +0 -0
- /package/dist/{chunk-LQZQ5KGG.js.map → chunk-4Q24OYI3.js.map} +0 -0
- /package/dist/{chunk-XU73V5XT.js.map → chunk-4WJTURRO.js.map} +0 -0
- /package/dist/{chunk-WN47MNSK.js.map → chunk-5SID2SVL.js.map} +0 -0
- /package/dist/{chunk-5REEVKGH.js.map → chunk-AANUY4BH.js.map} +0 -0
- /package/dist/{chunk-RZVCWX5R.js.map → chunk-AYVKN3PG.js.map} +0 -0
- /package/dist/{chunk-2UCC26MO.js.map → chunk-CH6IOGXV.js.map} +0 -0
- /package/dist/{chunk-RODZ7MB7.js.map → chunk-D5Z6B4M7.js.map} +0 -0
- /package/dist/{chunk-IJ62BB2T.js.map → chunk-D6SELXQ2.js.map} +0 -0
- /package/dist/{chunk-3E2X2RBU.js.map → chunk-DGRLHDM4.js.map} +0 -0
- /package/dist/{chunk-BD7IXBWE.js.map → chunk-F564FHMQ.js.map} +0 -0
- /package/dist/{chunk-DFCQ6BMI.js.map → chunk-G3MBUL5M.js.map} +0 -0
- /package/dist/{chunk-SUTMSDQ2.js.map → chunk-GQ3KRY3B.js.map} +0 -0
- /package/dist/{chunk-EAUIQADY.js.map → chunk-IQQAJROD.js.map} +0 -0
- /package/dist/{chunk-ZHRPH52H.js.map → chunk-IZXN3WI6.js.map} +0 -0
- /package/dist/{chunk-NCPWXHDO.js.map → chunk-JEUFYSFQ.js.map} +0 -0
- /package/dist/{chunk-G6FNWRAI.js.map → chunk-JSSM7VVV.js.map} +0 -0
- /package/dist/{chunk-H26VDFDS.js.map → chunk-KGFSPJLD.js.map} +0 -0
- /package/dist/{chunk-AO5TSDKT.js.map → chunk-KMORGMCW.js.map} +0 -0
- /package/dist/{chunk-WQWKYAAK.js.map → chunk-NUQF5F5J.js.map} +0 -0
- /package/dist/{chunk-7Y3N4Y72.js.map → chunk-OHUDZRLK.js.map} +0 -0
- /package/dist/{chunk-GCKHSBEN.js.map → chunk-OKMTUAWO.js.map} +0 -0
- /package/dist/{chunk-GB2XPITA.js.map → chunk-QMY57PVW.js.map} +0 -0
- /package/dist/{chunk-55GMOVKW.js.map → chunk-QNDDPXFR.js.map} +0 -0
- /package/dist/{chunk-GXN7RRHR.js.map → chunk-QSIXNTRV.js.map} +0 -0
- /package/dist/{chunk-QJRQ4BRC.js.map → chunk-U22TOL5Y.js.map} +0 -0
- /package/dist/{chunk-NGTVREIH.js.map → chunk-U6IHLEWT.js.map} +0 -0
- /package/dist/{chunk-Z5YHMRLF.js.map → chunk-UUCCV3SI.js.map} +0 -0
- /package/dist/{chunk-ZXXFP2LA.js.map → chunk-UXMCHBOJ.js.map} +0 -0
- /package/dist/{chunk-VZVEP2OZ.js.map → chunk-VFAKGIDG.js.map} +0 -0
- /package/dist/{chunk-VQK4VHLF.js.map → chunk-YQV75FIL.js.map} +0 -0
- /package/dist/{cli-HO62TOM2.js.map → chunk-YUTVAMWW.js.map} +0 -0
- /package/dist/{config-TYXYQK3I.js.map → cli-BOMA2FMP.js.map} +0 -0
- /package/dist/{cli-UETKXHJN.js.map → cli-OJKFXQOM.js.map} +0 -0
- /package/dist/{cli-LWST5FQH.js.map → cli-PHZAO4LZ.js.map} +0 -0
- /package/dist/{github-ESK45CEZ.js.map → config-JJW75SBX.js.map} +0 -0
- /package/dist/{github-WER7JUTN.js.map → github-6VQKSB67.js.map} +0 -0
- /package/dist/{host-6GURH5HE.js.map → github-RBSEM7ZK.js.map} +0 -0
- /package/dist/{json-QR4G35KA.js.map → host-YSTYO5DX.js.map} +0 -0
- /package/dist/{lint-QTI7XK2A.js.map → json-PU2HLHDQ.js.map} +0 -0
- /package/dist/{list-JO4G3TS3.js.map → lint-KIVTHLGU.js.map} +0 -0
- /package/dist/{list-O2MJUP5V.js.map → list-RDEJDDJF.js.map} +0 -0
- /package/dist/{page-FSXDXCDD.js.map → list-SUTDWL2J.js.map} +0 -0
- /package/dist/{pretty-4IONWSEP.js.map → page-UMAA3NCM.js.map} +0 -0
- /package/dist/{pretty-R4BQD2VH.js.map → pretty-ANLRHU4O.js.map} +0 -0
- /package/dist/{provider-527CO4DM.js.map → pretty-Q3ZFKOR7.js.map} +0 -0
- /package/dist/{reporters-DHO2BXAD.js.map → provider-LBX4IXGX.js.map} +0 -0
- /package/dist/{release-3D5PK6M7.js.map → release-VV3UTKE5.js.map} +0 -0
- /package/dist/{reporters-FPP6JNDP.js.map → reporters-26H3N2KW.js.map} +0 -0
- /package/dist/{reporters-M6LJ2IYU.js.map → reporters-ILT36CIH.js.map} +0 -0
- /package/dist/{run-YH5Z7RJ7.js.map → reporters-PNDLWT6K.js.map} +0 -0
- /package/dist/{validate-7JI3H57P.js.map → run-QXCK33Z4.js.map} +0 -0
|
@@ -1,54 +1,75 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
externalWriteWarning,
|
|
4
|
+
externalWriteWarnings,
|
|
5
|
+
manifestKeyLine,
|
|
6
|
+
mergeMetaProvenance,
|
|
7
|
+
offerExternalHomes
|
|
8
|
+
} from "./chunk-2OZF2VUB.js";
|
|
9
|
+
import {
|
|
10
|
+
formatList,
|
|
11
|
+
render
|
|
12
|
+
} from "./chunk-SGR7ZAVE.js";
|
|
2
13
|
import {
|
|
3
14
|
DERIVED_ROWS,
|
|
4
15
|
DERIVED_VIEW,
|
|
16
|
+
RESOLVED_VIEW,
|
|
17
|
+
assertSourcesAvailable,
|
|
18
|
+
commandsOf,
|
|
19
|
+
createDerivedView,
|
|
20
|
+
createResolvedView,
|
|
21
|
+
deriveForTable,
|
|
22
|
+
deriveMetadata,
|
|
23
|
+
derivedColumns,
|
|
24
|
+
fieldsForSql,
|
|
25
|
+
machinesOf,
|
|
26
|
+
mapConcurrent,
|
|
27
|
+
mentionsDerived,
|
|
28
|
+
mentionsResolved,
|
|
29
|
+
provenanceFenced,
|
|
30
|
+
provenanceManifests,
|
|
31
|
+
provenancePlace,
|
|
32
|
+
readerManifests,
|
|
33
|
+
readerPlace,
|
|
34
|
+
stampManifests
|
|
35
|
+
} from "./chunk-QEAGL4V5.js";
|
|
36
|
+
import {
|
|
5
37
|
ENCRYPTED_PLACEHOLDER,
|
|
6
38
|
ENCRYPTION_KEY_ENV,
|
|
7
39
|
EncryptionRefusal,
|
|
8
40
|
META_CONTEXT,
|
|
9
41
|
PATH_JOIN,
|
|
10
42
|
RESERVED,
|
|
11
|
-
RESOLVED_VIEW,
|
|
12
43
|
STDIN_REQUIRES_AS,
|
|
13
44
|
SYSTEM_COLUMNS,
|
|
45
|
+
TERM_KEYWORD,
|
|
14
46
|
Validator,
|
|
15
47
|
applyRelocation,
|
|
16
48
|
assertSingleStatement,
|
|
17
|
-
assertSourcesAvailable,
|
|
18
49
|
bindValue,
|
|
19
50
|
collectCollections,
|
|
20
51
|
collectNamedParameters,
|
|
21
52
|
collectionNames,
|
|
22
|
-
commandsOf,
|
|
23
53
|
committedKeyWarning,
|
|
24
54
|
compareProvenance,
|
|
25
55
|
compileWithFormats,
|
|
26
56
|
corpusDataColumns,
|
|
27
57
|
createCollectionViews,
|
|
28
|
-
createDerivedView,
|
|
29
58
|
createDocsTable,
|
|
30
|
-
createResolvedView,
|
|
31
|
-
deriveForTable,
|
|
32
|
-
deriveMetadata,
|
|
33
|
-
derivedColumns,
|
|
34
59
|
encryptionView,
|
|
35
60
|
externalMetadataJoin,
|
|
36
|
-
fieldsForSql,
|
|
37
61
|
heldManifest,
|
|
38
62
|
isAtOrUnder,
|
|
39
63
|
isIgnoredByGit,
|
|
40
64
|
isMissing,
|
|
65
|
+
isTermMark,
|
|
41
66
|
keyHome,
|
|
42
67
|
lazyKey,
|
|
43
68
|
lineSpec,
|
|
44
69
|
loadExternalMetadata,
|
|
45
70
|
loadSqlite,
|
|
46
|
-
machinesOf,
|
|
47
|
-
mapConcurrent,
|
|
48
71
|
marksValidator,
|
|
49
72
|
memberOf,
|
|
50
|
-
mentionsDerived,
|
|
51
|
-
mentionsResolved,
|
|
52
73
|
mergeExternalMetadata,
|
|
53
74
|
mergeWithMarks,
|
|
54
75
|
offerPrompt,
|
|
@@ -61,22 +82,16 @@ import {
|
|
|
61
82
|
planRelocation,
|
|
62
83
|
pointerOf,
|
|
63
84
|
provenanceEntries,
|
|
64
|
-
provenanceFenced,
|
|
65
85
|
provenanceFindings,
|
|
66
|
-
provenanceManifests,
|
|
67
|
-
provenancePlace,
|
|
68
86
|
rangeResults,
|
|
69
87
|
readManifestValue,
|
|
70
88
|
readProvenancePage,
|
|
71
|
-
readerManifests,
|
|
72
|
-
readerPlace,
|
|
73
89
|
rebaseable,
|
|
74
90
|
rebaseline,
|
|
75
91
|
redactForModel,
|
|
76
92
|
redactedDerived,
|
|
77
93
|
registerLineFor,
|
|
78
94
|
relocationContext,
|
|
79
|
-
relocationOffers,
|
|
80
95
|
removeManifestKey,
|
|
81
96
|
renameManifestEntry,
|
|
82
97
|
renderProvenanceValue,
|
|
@@ -87,22 +102,21 @@ import {
|
|
|
87
102
|
skipComment,
|
|
88
103
|
skipStringOrIdent,
|
|
89
104
|
spliceManifestValue,
|
|
90
|
-
stampManifests,
|
|
91
105
|
startsComment,
|
|
92
106
|
startsStringOrIdent,
|
|
93
107
|
stringFormatNames,
|
|
94
108
|
stripLeadingTrivia,
|
|
109
|
+
termScheme,
|
|
95
110
|
topLevelKeyOf,
|
|
96
111
|
unreadableMessage,
|
|
97
112
|
validatesFormat,
|
|
98
113
|
valueAt,
|
|
99
114
|
withValueAt,
|
|
100
115
|
writeEncryptionKey
|
|
101
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-SMHAYK6I.js";
|
|
102
117
|
import {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
} from "./chunk-QBVP3SQP.js";
|
|
118
|
+
termLabelSource
|
|
119
|
+
} from "./chunk-DSWKBZWW.js";
|
|
106
120
|
import {
|
|
107
121
|
DERIVABLE_FIELDS,
|
|
108
122
|
DERIVE_SOURCES,
|
|
@@ -156,21 +170,21 @@ import {
|
|
|
156
170
|
urlManifestMessage,
|
|
157
171
|
urlManifestOwning,
|
|
158
172
|
writeFileAtomic
|
|
159
|
-
} from "./chunk-
|
|
160
|
-
import {
|
|
161
|
-
palette
|
|
162
|
-
} from "./chunk-RNVYGWIC.js";
|
|
173
|
+
} from "./chunk-RGLFV4KO.js";
|
|
163
174
|
import {
|
|
164
175
|
escapeWorkflowCommandMessage,
|
|
165
176
|
escapeWorkflowCommandProperty
|
|
166
177
|
} from "./chunk-MNH7QO4Z.js";
|
|
178
|
+
import {
|
|
179
|
+
palette
|
|
180
|
+
} from "./chunk-RNVYGWIC.js";
|
|
167
181
|
import {
|
|
168
182
|
decryptValue,
|
|
169
183
|
encryptValue,
|
|
170
184
|
generateEncryptionKey,
|
|
171
185
|
isEncryptedValue,
|
|
172
186
|
isMember
|
|
173
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-OTJOBZJ5.js";
|
|
174
188
|
import {
|
|
175
189
|
warn
|
|
176
190
|
} from "./chunk-HX44GB4Z.js";
|
|
@@ -179,69 +193,16 @@ import {
|
|
|
179
193
|
assertLocalFlag,
|
|
180
194
|
assertModelHasProvider,
|
|
181
195
|
localNotice,
|
|
196
|
+
noOfflineModel,
|
|
197
|
+
offlineIdentity,
|
|
182
198
|
providerSpecFor,
|
|
183
199
|
resolveIdentity,
|
|
184
200
|
selectProvider
|
|
185
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-VM7VAFJW.js";
|
|
186
202
|
import {
|
|
187
203
|
errorMessage
|
|
188
204
|
} from "./chunk-G3T47CFV.js";
|
|
189
205
|
|
|
190
|
-
// src/shared/prompt.ts
|
|
191
|
-
import { createInterface } from "node:readline";
|
|
192
|
-
function readlineConfirm(input, output) {
|
|
193
|
-
return (question) => new Promise((resolvePromise) => {
|
|
194
|
-
const rl = createInterface({ input, output });
|
|
195
|
-
let settled = false;
|
|
196
|
-
const finish2 = (answer, endLine) => {
|
|
197
|
-
if (settled) return;
|
|
198
|
-
settled = true;
|
|
199
|
-
if (endLine) output.write("\n");
|
|
200
|
-
rl.close();
|
|
201
|
-
resolvePromise(answer);
|
|
202
|
-
};
|
|
203
|
-
rl.on("close", () => {
|
|
204
|
-
finish2(false, true);
|
|
205
|
-
});
|
|
206
|
-
rl.on("SIGINT", () => {
|
|
207
|
-
finish2(false, true);
|
|
208
|
-
});
|
|
209
|
-
rl.question(`${question}[y/N] `, (answer) => {
|
|
210
|
-
finish2(/^y(?:es)?$/i.test(answer.trim()), false);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
function terminalConfirm() {
|
|
215
|
-
if (!process.stdin.isTTY || !process.stderr.isTTY) {
|
|
216
|
-
return void 0;
|
|
217
|
-
}
|
|
218
|
-
return readlineConfirm(process.stdin, process.stderr);
|
|
219
|
-
}
|
|
220
|
-
async function ensureEncryptionKey(opts) {
|
|
221
|
-
const { subject, cwd, file, confirm, notice, toError } = opts;
|
|
222
|
-
const resolved = resolveEncryptionKey({ env: opts.env, file, toError });
|
|
223
|
-
if (resolved.key !== void 0) return { key: resolved.key };
|
|
224
|
-
const missing = `${subject} must be encrypted, and no encryption key is available.`;
|
|
225
|
-
const refusal = `${missing} Run \`manni key set\`, or set ${ENCRYPTION_KEY_ENV}.`;
|
|
226
|
-
if (confirm === void 0) throw toError(refusal);
|
|
227
|
-
notice(missing);
|
|
228
|
-
const key = generateEncryptionKey();
|
|
229
|
-
const target = await writeEncryptionKey({ file, key, cwd, toError, dryRun: true });
|
|
230
|
-
if (isIgnoredByGit(target.path) === false) {
|
|
231
|
-
notice(committedKeyWarning(target.source));
|
|
232
|
-
}
|
|
233
|
-
if (!await confirm(`Generate a key and write it to ${target.source}? `)) {
|
|
234
|
-
throw toError(refusal);
|
|
235
|
-
}
|
|
236
|
-
const written = await writeEncryptionKey({ file, key, cwd, toError });
|
|
237
|
-
process.stderr.write(
|
|
238
|
-
written.created ? `Created ${written.source} with an encryption key.
|
|
239
|
-
` : `Encryption key written to ${written.source}.
|
|
240
|
-
`
|
|
241
|
-
);
|
|
242
|
-
return { key, written: { source: written.source, created: written.created } };
|
|
243
|
-
}
|
|
244
|
-
|
|
245
206
|
// src/meta/commands/get.ts
|
|
246
207
|
import { readFile } from "node:fs/promises";
|
|
247
208
|
import { resolve, extname } from "node:path";
|
|
@@ -518,10 +479,10 @@ import { existsSync } from "node:fs";
|
|
|
518
479
|
import { mkdir, readFile as readFile2 } from "node:fs/promises";
|
|
519
480
|
import { dirname, extname as extname2, isAbsolute, join, relative, resolve as resolve2, sep } from "node:path";
|
|
520
481
|
import { parseDocument, parse as parseYaml, stringify } from "yaml";
|
|
521
|
-
function getSchemasInfo(
|
|
482
|
+
function getSchemasInfo(registered) {
|
|
522
483
|
return {
|
|
523
484
|
builtins: listBuiltins(),
|
|
524
|
-
registered: [...
|
|
485
|
+
registered: [...registered?.values() ?? []].map(({ id, file }) => ({ id, file })),
|
|
525
486
|
formats: listFormats()
|
|
526
487
|
};
|
|
527
488
|
}
|
|
@@ -955,115 +916,67 @@ async function runInferSchema(opts) {
|
|
|
955
916
|
};
|
|
956
917
|
}
|
|
957
918
|
|
|
958
|
-
// src/
|
|
959
|
-
import {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
if (w.home.kind !== "collection") continue;
|
|
974
|
-
const group = groups.get(w.home.collection) ?? [];
|
|
975
|
-
group.push(w);
|
|
976
|
-
groups.set(w.home.collection, group);
|
|
977
|
-
}
|
|
978
|
-
for (const [collection, group] of groups) {
|
|
979
|
-
const require2 = /* @__PURE__ */ new Map();
|
|
980
|
-
for (const w of group) {
|
|
981
|
-
const keys = require2.get(w.label) ?? [];
|
|
982
|
-
if (!keys.includes(w.key)) keys.push(w.key);
|
|
983
|
-
require2.set(w.label, keys);
|
|
984
|
-
}
|
|
985
|
-
const plan = await planRelocation(ctx, {
|
|
986
|
-
files: [...require2.keys()],
|
|
987
|
-
fields: dedupe(group.map((w) => w.key)),
|
|
988
|
-
require: require2
|
|
919
|
+
// src/shared/prompt.ts
|
|
920
|
+
import { createInterface } from "node:readline";
|
|
921
|
+
function readlineConfirm(input, output) {
|
|
922
|
+
return (question) => new Promise((resolvePromise) => {
|
|
923
|
+
const rl = createInterface({ input, output });
|
|
924
|
+
let settled = false;
|
|
925
|
+
const finish2 = (answer, endLine) => {
|
|
926
|
+
if (settled) return;
|
|
927
|
+
settled = true;
|
|
928
|
+
if (endLine) output.write("\n");
|
|
929
|
+
rl.close();
|
|
930
|
+
resolvePromise(answer);
|
|
931
|
+
};
|
|
932
|
+
rl.on("close", () => {
|
|
933
|
+
finish2(false, true);
|
|
989
934
|
});
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
yes = false;
|
|
998
|
-
break;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
if (!yes) continue;
|
|
1002
|
-
const result = await applyRelocation(ctx, plan);
|
|
1003
|
-
hooks.onRelocated?.(result);
|
|
1004
|
-
applied.add(collection);
|
|
1005
|
-
}
|
|
1006
|
-
return applied;
|
|
935
|
+
rl.on("SIGINT", () => {
|
|
936
|
+
finish2(false, true);
|
|
937
|
+
});
|
|
938
|
+
rl.question(`${question}[y/N] `, (answer) => {
|
|
939
|
+
finish2(/^y(?:es)?$/i.test(answer.trim()), false);
|
|
940
|
+
});
|
|
941
|
+
});
|
|
1007
942
|
}
|
|
1008
|
-
function
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
const groupOf = (w) => w.home.kind === "collection" ? `c:${w.home.collection}` : `n:${w.home.reason}`;
|
|
1012
|
-
for (const w of writes) {
|
|
1013
|
-
const id = groupOf(w);
|
|
1014
|
-
groups.set(id, [...groups.get(id) ?? [], w]);
|
|
1015
|
-
}
|
|
1016
|
-
const out = [];
|
|
1017
|
-
for (const group of groups.values()) {
|
|
1018
|
-
const [first] = group;
|
|
1019
|
-
if (first === void 0) continue;
|
|
1020
|
-
out.push(
|
|
1021
|
-
externalWriteWarning({
|
|
1022
|
-
verb,
|
|
1023
|
-
keys: dedupe(group.map((w) => w.key)),
|
|
1024
|
-
pages: new Set(group.map((w) => w.label)).size,
|
|
1025
|
-
home: first.home,
|
|
1026
|
-
createsHome: group.some(
|
|
1027
|
-
(w) => w.home.kind === "collection" && (w.home.createsCollection || w.home.addsPath !== void 0)
|
|
1028
|
-
)
|
|
1029
|
-
})
|
|
1030
|
-
);
|
|
943
|
+
function terminalConfirm() {
|
|
944
|
+
if (!process.stdin.isTTY || !process.stderr.isTTY) {
|
|
945
|
+
return void 0;
|
|
1031
946
|
}
|
|
1032
|
-
return
|
|
947
|
+
return readlineConfirm(process.stdin, process.stderr);
|
|
1033
948
|
}
|
|
1034
|
-
function
|
|
1035
|
-
const {
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1038
|
-
const
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
return home.reason === "no-config" ? `${head}; ${prefer}, and --no-config leaves ${them} no manifest.` : `${head} that ${line.pages === 1 ? "is" : "are"} in none of the ${String(home.collections)} collections; ${prefer}, and only a collection has a manifest.`;
|
|
1047
|
-
}
|
|
1048
|
-
function manifestKeyLine(text, entry, key, join3) {
|
|
1049
|
-
const norm = (e) => join3 === PATH_JOIN ? e.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+/g, "/") : e;
|
|
1050
|
-
const lc = new LineCounter();
|
|
1051
|
-
const doc = parseDocument2(text, { lineCounter: lc, uniqueKeys: false });
|
|
1052
|
-
const root = doc.contents;
|
|
1053
|
-
if (!isMap(root)) return void 0;
|
|
1054
|
-
for (const pair of root.items) {
|
|
1055
|
-
const spelled = isScalar(pair.key) ? String(pair.key.value) : String(pair.key);
|
|
1056
|
-
if (norm(spelled) !== norm(entry) || !isMap(pair.value)) continue;
|
|
1057
|
-
for (const kv of pair.value.items) {
|
|
1058
|
-
const name = isScalar(kv.key) ? String(kv.key.value) : String(kv.key);
|
|
1059
|
-
const range = isNode(kv.key) ? kv.key.range : void 0;
|
|
1060
|
-
if (name === key && range) return lc.linePos(range[0]).line;
|
|
1061
|
-
}
|
|
949
|
+
async function ensureEncryptionKey(opts) {
|
|
950
|
+
const { subject, cwd, file, confirm, notice, toError } = opts;
|
|
951
|
+
const resolved = resolveEncryptionKey({ env: opts.env, file, toError });
|
|
952
|
+
if (resolved.key !== void 0) return { key: resolved.key };
|
|
953
|
+
const missing = `${subject} must be encrypted, and no encryption key is available.`;
|
|
954
|
+
const refusal = `${missing} Run \`manni key set\`, or set ${ENCRYPTION_KEY_ENV}.`;
|
|
955
|
+
if (confirm === void 0) throw toError(refusal);
|
|
956
|
+
notice(missing);
|
|
957
|
+
const key = generateEncryptionKey();
|
|
958
|
+
const target = await writeEncryptionKey({ file, key, cwd, toError, dryRun: true });
|
|
959
|
+
if (isIgnoredByGit(target.path) === false) {
|
|
960
|
+
notice(committedKeyWarning(target.source));
|
|
1062
961
|
}
|
|
1063
|
-
|
|
962
|
+
if (!await confirm(`Generate a key and write it to ${target.source}? `)) {
|
|
963
|
+
throw toError(refusal);
|
|
964
|
+
}
|
|
965
|
+
const written = await writeEncryptionKey({ file, key, cwd, toError });
|
|
966
|
+
process.stderr.write(
|
|
967
|
+
written.created ? `Created ${written.source} with an encryption key.
|
|
968
|
+
` : `Encryption key written to ${written.source}.
|
|
969
|
+
`
|
|
970
|
+
);
|
|
971
|
+
return { key, written: { source: written.source, created: written.created } };
|
|
1064
972
|
}
|
|
1065
973
|
|
|
1066
974
|
// src/meta/commands/query.ts
|
|
975
|
+
import { randomBytes } from "node:crypto";
|
|
976
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
977
|
+
import { mkdir as mkdir2, open, readFile as readFile3, rename, rm } from "node:fs/promises";
|
|
978
|
+
import { dirname as dirname2, isAbsolute as isAbsolute2, resolve as resolve3, extname as extname3, sep as sep2 } from "node:path";
|
|
979
|
+
import { parseDocument as parseDocument2, isMap, isSeq, isScalar } from "yaml";
|
|
1067
980
|
async function runQuery(opts) {
|
|
1068
981
|
const cwd = opts.cwd ?? process.cwd();
|
|
1069
982
|
const sql = opts.sql.trim();
|
|
@@ -1894,8 +1807,8 @@ async function loadSetMembers(refs, ctx) {
|
|
|
1894
1807
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
1895
1808
|
const seenBuiltins = /* @__PURE__ */ new Set();
|
|
1896
1809
|
for (const ref of refs) {
|
|
1897
|
-
const
|
|
1898
|
-
const { kind } =
|
|
1810
|
+
const registered = ctx.config?.registered?.get(ref);
|
|
1811
|
+
const { kind } = registered !== void 0 ? { kind: "file" } : classifyRef(ref);
|
|
1899
1812
|
if (kind === "url" && !isPublishedBuiltinUrl(ref)) {
|
|
1900
1813
|
throw new DocmetaError(
|
|
1901
1814
|
`"${ref}" in the resolved schema set is a URL \u2014 DDL edits local schemas only. Vendor it first (manni meta schemas vendor), then evolve the local copy.`
|
|
@@ -1913,7 +1826,7 @@ async function loadSetMembers(refs, ctx) {
|
|
|
1913
1826
|
});
|
|
1914
1827
|
continue;
|
|
1915
1828
|
}
|
|
1916
|
-
const abs =
|
|
1829
|
+
const abs = registered?.path ?? resolve3(ctx.cwd, ref);
|
|
1917
1830
|
const canon = foldPath(abs);
|
|
1918
1831
|
if (seenFiles.has(canon)) continue;
|
|
1919
1832
|
seenFiles.add(canon);
|
|
@@ -2277,11 +2190,11 @@ async function planConfigEdit(ctx, edit, runRefs) {
|
|
|
2277
2190
|
return { changes: [], repointed: false };
|
|
2278
2191
|
}
|
|
2279
2192
|
const text = await readFile3(configPath, "utf8");
|
|
2280
|
-
const doc =
|
|
2193
|
+
const doc = parseDocument2(stripBom(text));
|
|
2281
2194
|
const display = displayPath(ctx, configPath);
|
|
2282
2195
|
const rawRefOf = (item) => {
|
|
2283
|
-
if (
|
|
2284
|
-
if (
|
|
2196
|
+
if (isScalar(item) && typeof item.value === "string") return item.value;
|
|
2197
|
+
if (isMap(item)) {
|
|
2285
2198
|
const ref = item.get("ref");
|
|
2286
2199
|
if (typeof ref === "string") return ref;
|
|
2287
2200
|
}
|
|
@@ -2303,10 +2216,10 @@ async function planConfigEdit(ctx, edit, runRefs) {
|
|
|
2303
2216
|
for (const item of node.items) {
|
|
2304
2217
|
const raw = rawRefOf(item);
|
|
2305
2218
|
if (raw === void 0 || !wants(raw)) continue;
|
|
2306
|
-
if (
|
|
2219
|
+
if (isScalar(item)) {
|
|
2307
2220
|
item.value = spec.newRef;
|
|
2308
2221
|
n += 1;
|
|
2309
|
-
} else if (
|
|
2222
|
+
} else if (isMap(item)) {
|
|
2310
2223
|
item.set("ref", spec.newRef);
|
|
2311
2224
|
n += 1;
|
|
2312
2225
|
}
|
|
@@ -2314,13 +2227,13 @@ async function planConfigEdit(ctx, edit, runRefs) {
|
|
|
2314
2227
|
return n;
|
|
2315
2228
|
};
|
|
2316
2229
|
const root = ctx.configSection === void 0 ? doc : doc.get(ctx.configSection, true);
|
|
2317
|
-
const keyOf2 = (key) => root === doc ? doc.get(key, true) :
|
|
2230
|
+
const keyOf2 = (key) => root === doc ? doc.get(key, true) : isMap(root) ? root.get(key, true) : void 0;
|
|
2318
2231
|
const topSeq = keyOf2("schemas");
|
|
2319
2232
|
let repointCount = repoint(topSeq);
|
|
2320
2233
|
const overrides = keyOf2("overrides");
|
|
2321
2234
|
if (isSeq(overrides)) {
|
|
2322
2235
|
for (const entry of overrides.items) {
|
|
2323
|
-
if (
|
|
2236
|
+
if (isMap(entry)) repointCount += repoint(entry.get("schemas", true));
|
|
2324
2237
|
}
|
|
2325
2238
|
}
|
|
2326
2239
|
const repointed = repointCount > 0;
|
|
@@ -2329,7 +2242,7 @@ async function planConfigEdit(ctx, edit, runRefs) {
|
|
|
2329
2242
|
if (edit.integrity && isSeq(topSeq)) {
|
|
2330
2243
|
const wantPath = foldPath(edit.integrity.path);
|
|
2331
2244
|
for (const item of topSeq.items) {
|
|
2332
|
-
if (!
|
|
2245
|
+
if (!isMap(item)) continue;
|
|
2333
2246
|
const raw = rawRefOf(item);
|
|
2334
2247
|
if (raw === void 0 || classifyRef(raw).kind !== "file") continue;
|
|
2335
2248
|
const abs = isAbsolute2(raw) ? raw : resolve3(configDir, raw);
|
|
@@ -3874,22 +3787,67 @@ function fieldHints(candidates, offer) {
|
|
|
3874
3787
|
add(PAGE_FIELDS, "page", offer.pages);
|
|
3875
3788
|
return hints;
|
|
3876
3789
|
}
|
|
3790
|
+
function termMarksIn(candidate, defs) {
|
|
3791
|
+
const out = [];
|
|
3792
|
+
const marked = /* @__PURE__ */ new Set();
|
|
3793
|
+
const stack = /* @__PURE__ */ new Set();
|
|
3794
|
+
const walk = (node, path) => {
|
|
3795
|
+
if (typeof node !== "object" || node === null || Array.isArray(node) || stack.has(node)) return;
|
|
3796
|
+
stack.add(node);
|
|
3797
|
+
const schema = node;
|
|
3798
|
+
const mark = schema[TERM_KEYWORD];
|
|
3799
|
+
if (isTermMark(mark)) {
|
|
3800
|
+
const key = JSON.stringify([path, mark.under ?? null]);
|
|
3801
|
+
if (!marked.has(key)) {
|
|
3802
|
+
marked.add(key);
|
|
3803
|
+
out.push({ path, ...mark.under === void 0 ? {} : { under: mark.under } });
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
if (typeof schema.$ref === "string") walk(resolvePointer(schema.$ref, defs), path);
|
|
3807
|
+
for (const keyword of ["allOf", "anyOf", "oneOf"]) {
|
|
3808
|
+
const branches = schema[keyword];
|
|
3809
|
+
if (Array.isArray(branches)) for (const branch of branches) walk(branch, path);
|
|
3810
|
+
}
|
|
3811
|
+
walk(schema.items, path);
|
|
3812
|
+
const properties = schema.properties;
|
|
3813
|
+
if (typeof properties === "object" && properties !== null) {
|
|
3814
|
+
for (const [key, sub] of Object.entries(properties)) walk(sub, [...path, key]);
|
|
3815
|
+
}
|
|
3816
|
+
stack.delete(node);
|
|
3817
|
+
};
|
|
3818
|
+
walk(candidate.subschema, [candidate.key]);
|
|
3819
|
+
return out;
|
|
3820
|
+
}
|
|
3821
|
+
function termMarkHints(marks, index, schemas) {
|
|
3822
|
+
return marks.flatMap(({ path, under }) => {
|
|
3823
|
+
const branch = under === void 0 ? void 0 : index.scheme.below(under);
|
|
3824
|
+
if (under !== void 0 && branch === void 0) {
|
|
3825
|
+
throw new DocmetaError(`${schemas}: ${TERM_KEYWORD} under "${under}" names no term.`);
|
|
3826
|
+
}
|
|
3827
|
+
const labels = branch === void 0 ? index.labels : index.scheme.labels(branch);
|
|
3828
|
+
const values = offered(labels);
|
|
3829
|
+
if (values === void 0) return [];
|
|
3830
|
+
const accepts = [...labels, ...branch === void 0 ? index.ids : branch];
|
|
3831
|
+
return [{ path, kind: "term", values, accepts, ...under === void 0 ? {} : { under } }];
|
|
3832
|
+
});
|
|
3833
|
+
}
|
|
3877
3834
|
function termValueCheck(hints, index) {
|
|
3878
3835
|
const fold = (value) => value.toLowerCase();
|
|
3879
3836
|
const labels = new Set(index.labels.map(fold));
|
|
3880
3837
|
const either = /* @__PURE__ */ new Set([...labels, ...index.ids.map(fold)]);
|
|
3881
3838
|
const terms = hints.filter((hint) => hint.kind === "term");
|
|
3882
3839
|
return (key, value) => terms.filter((hint) => hint.path[0] === key).flatMap((hint) => {
|
|
3883
|
-
const accepted = CONCEPT_FIELDS.some((path) => samePath(path, hint.path)) ? labels : either;
|
|
3840
|
+
const accepted = hint.accepts !== void 0 ? new Set(hint.accepts.map(fold)) : CONCEPT_FIELDS.some((path) => samePath(path, hint.path)) ? labels : either;
|
|
3841
|
+
const refusal = hint.under === void 0 ? NOT_A_TERM : `${NOT_A_TERM} under "${hint.under}"`;
|
|
3884
3842
|
const pointer = fieldPointer(hint.path);
|
|
3885
3843
|
const held = valueAt2(value, hint.path.slice(1));
|
|
3886
3844
|
if (typeof held === "string") {
|
|
3887
|
-
return accepted.has(fold(held)) ? [] : [`${pointer}: ${
|
|
3845
|
+
return accepted.has(fold(held)) ? [] : [`${pointer}: ${refusal}`];
|
|
3888
3846
|
}
|
|
3889
3847
|
if (!Array.isArray(held)) return [];
|
|
3890
3848
|
const items = held;
|
|
3891
3849
|
return items.flatMap(
|
|
3892
|
-
(item, i) => typeof item === "string" && !accepted.has(fold(item)) ? [`${pointer}/${String(i)}: ${
|
|
3850
|
+
(item, i) => typeof item === "string" && !accepted.has(fold(item)) ? [`${pointer}/${String(i)}: ${refusal}`] : []
|
|
3893
3851
|
);
|
|
3894
3852
|
});
|
|
3895
3853
|
}
|
|
@@ -3940,15 +3898,6 @@ async function readIds(collection, opts) {
|
|
|
3940
3898
|
return ids;
|
|
3941
3899
|
}
|
|
3942
3900
|
|
|
3943
|
-
// src/shared/term-labels.ts
|
|
3944
|
-
var registered;
|
|
3945
|
-
function registerTermLabelSource(source) {
|
|
3946
|
-
registered = source;
|
|
3947
|
-
}
|
|
3948
|
-
function termLabelSource() {
|
|
3949
|
-
return registered;
|
|
3950
|
-
}
|
|
3951
|
-
|
|
3952
3901
|
// src/meta/core/manifest-writes.ts
|
|
3953
3902
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
3954
3903
|
var manifestCodec = {
|
|
@@ -4140,51 +4089,6 @@ function buildUserPrompt(params, before = []) {
|
|
|
4140
4089
|
].join("\n");
|
|
4141
4090
|
}
|
|
4142
4091
|
|
|
4143
|
-
// src/meta/core/meta-provenance.ts
|
|
4144
|
-
function isPlainRecord(value) {
|
|
4145
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4146
|
-
}
|
|
4147
|
-
function mergeMetaProvenance(held, model, key, proposed) {
|
|
4148
|
-
if (held !== void 0 && !Array.isArray(held)) return void 0;
|
|
4149
|
-
const list = held === void 0 ? [] : [...held];
|
|
4150
|
-
const at = list.findIndex((e) => isPlainRecord(e) && e["generated-by"] === model);
|
|
4151
|
-
const prior = list[at];
|
|
4152
|
-
const kept = isPlainRecord(prior) ? prior : {};
|
|
4153
|
-
const priorNames = kept[key];
|
|
4154
|
-
const names = Array.isArray(priorNames) ? priorNames.filter((p) => typeof p === "string") : [];
|
|
4155
|
-
const confidence = {};
|
|
4156
|
-
if (isPlainRecord(kept.confidence)) {
|
|
4157
|
-
for (const [k, v] of Object.entries(kept.confidence)) {
|
|
4158
|
-
if (typeof v === "number") confidence[k] = v;
|
|
4159
|
-
}
|
|
4160
|
-
}
|
|
4161
|
-
for (const p of proposed) {
|
|
4162
|
-
if (!names.includes(p.name)) names.push(p.name);
|
|
4163
|
-
confidence[p.name] = p.confidence;
|
|
4164
|
-
}
|
|
4165
|
-
const entry = {
|
|
4166
|
-
...kept,
|
|
4167
|
-
"generated-by": model,
|
|
4168
|
-
[key]: names,
|
|
4169
|
-
confidence
|
|
4170
|
-
};
|
|
4171
|
-
if (at === -1) list.push(entry);
|
|
4172
|
-
else list[at] = entry;
|
|
4173
|
-
return { list, entry, names };
|
|
4174
|
-
}
|
|
4175
|
-
function metaProvenanceEntries(value) {
|
|
4176
|
-
if (!Array.isArray(value)) return [];
|
|
4177
|
-
const strings = (list) => Array.isArray(list) ? list.filter((s) => typeof s === "string") : [];
|
|
4178
|
-
const out = [];
|
|
4179
|
-
for (const item of value) {
|
|
4180
|
-
if (!isPlainRecord(item)) continue;
|
|
4181
|
-
const machine = item["generated-by"];
|
|
4182
|
-
if (typeof machine !== "string" || machine === "") continue;
|
|
4183
|
-
out.push({ "generated-by": machine, fields: strings(item.fields), evals: strings(item.evals) });
|
|
4184
|
-
}
|
|
4185
|
-
return out;
|
|
4186
|
-
}
|
|
4187
|
-
|
|
4188
4092
|
// src/meta/commands/fill.ts
|
|
4189
4093
|
var META_PROVENANCE_KEY = "meta-provenance";
|
|
4190
4094
|
var PROVENANCE_KEYS = /* @__PURE__ */ new Set(["provenance", META_PROVENANCE_KEY]);
|
|
@@ -4270,7 +4174,8 @@ async function runFill(opts) {
|
|
|
4270
4174
|
const dryRun = Boolean(opts.dryRun);
|
|
4271
4175
|
const only = opts.fields != null ? new Set(opts.fields) : void 0;
|
|
4272
4176
|
const managed = new Set(managedFields(config?.derive));
|
|
4273
|
-
const
|
|
4177
|
+
const offline = opts.offline ?? config?.offline ?? false;
|
|
4178
|
+
const flags = { provider: opts.provider, model: opts.model, local: opts.local, offline };
|
|
4274
4179
|
assertLocalFlag(flags, toDocmetaError);
|
|
4275
4180
|
const family = configFile?.providers ?? {};
|
|
4276
4181
|
const selection = selectProvider(flags, [
|
|
@@ -4280,7 +4185,7 @@ async function runFill(opts) {
|
|
|
4280
4185
|
const { provider: providerName, model } = selection;
|
|
4281
4186
|
assertKnownProvider2(providerName);
|
|
4282
4187
|
assertModelHasProvider2(providerName, model);
|
|
4283
|
-
const replaced = localNotice(selection);
|
|
4188
|
+
const replaced = localNotice(selection, flags);
|
|
4284
4189
|
if (replaced !== void 0) opts.onNotice?.(replaced);
|
|
4285
4190
|
const spec = providerSpecFor(family, { provider: providerName, model: model ?? null });
|
|
4286
4191
|
const fileInputs = inputs.filter((i) => i !== STDIN_TOKEN);
|
|
@@ -4313,12 +4218,16 @@ async function runFill(opts) {
|
|
|
4313
4218
|
});
|
|
4314
4219
|
let identity;
|
|
4315
4220
|
let construct;
|
|
4221
|
+
const offlineResolved = offline ? await offlineIdentity(spec, toDocmetaError) : void 0;
|
|
4222
|
+
if (offline && offlineResolved === void 0) {
|
|
4223
|
+
throw new DocmetaError(noOfflineModel("fill cannot propose values"));
|
|
4224
|
+
}
|
|
4316
4225
|
if (opts.inferenceProvider) {
|
|
4317
4226
|
const injected = opts.inferenceProvider;
|
|
4318
4227
|
identity = { provider: injected.provider(), model: injected.modelName() };
|
|
4319
4228
|
construct = () => injected;
|
|
4320
4229
|
} else {
|
|
4321
|
-
const resolved = await resolveIdentity2(spec);
|
|
4230
|
+
const resolved = offlineResolved ?? await resolveIdentity2(spec);
|
|
4322
4231
|
identity = resolved;
|
|
4323
4232
|
const concrete = providerSpecFor(family, resolved);
|
|
4324
4233
|
construct = () => makeProvider(concrete);
|
|
@@ -4370,7 +4279,10 @@ async function runFill(opts) {
|
|
|
4370
4279
|
let externalMetadata = await loadManifests();
|
|
4371
4280
|
let termbase;
|
|
4372
4281
|
const readTermbase = async () => {
|
|
4373
|
-
if (opts.termLabels !== void 0)
|
|
4282
|
+
if (opts.termLabels !== void 0) {
|
|
4283
|
+
const labels = [...opts.termLabels];
|
|
4284
|
+
return { labels, ids: [], scheme: termScheme(labels.map((label) => ({ label, id: label }))) };
|
|
4285
|
+
}
|
|
4374
4286
|
const source = termLabelSource();
|
|
4375
4287
|
if (source === void 0) return void 0;
|
|
4376
4288
|
try {
|
|
@@ -4379,7 +4291,8 @@ async function runFill(opts) {
|
|
|
4379
4291
|
...opts.configPath === void 0 ? {} : { configPath: opts.configPath },
|
|
4380
4292
|
...opts.noConfig === true ? { noConfig: true } : {}
|
|
4381
4293
|
});
|
|
4382
|
-
|
|
4294
|
+
if (terms.length === 0) return void 0;
|
|
4295
|
+
return { labels: terms.map((t) => t.label), ids: terms.map((t) => t.id), scheme: termScheme(terms) };
|
|
4383
4296
|
} catch (err) {
|
|
4384
4297
|
opts.onNotice?.(
|
|
4385
4298
|
`The termbase could not be read, so fill offers no glossary labels: ${errorMessage(err)}`
|
|
@@ -4393,15 +4306,20 @@ async function runFill(opts) {
|
|
|
4393
4306
|
configDir: configDir ?? cwd,
|
|
4394
4307
|
...respectGitignore === void 0 ? {} : { respectGitignore }
|
|
4395
4308
|
});
|
|
4396
|
-
const hintsFor = async (label, candidates) => {
|
|
4309
|
+
const hintsFor = async (label, candidates, schemas, schemaSet) => {
|
|
4397
4310
|
const keys = new Set(candidates.map((c) => c.key));
|
|
4398
4311
|
const wants = (fields) => fields.some(([key]) => key !== void 0 && keys.has(key));
|
|
4399
|
-
const
|
|
4400
|
-
const
|
|
4401
|
-
const
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4312
|
+
const defs = collectDefs(schemas);
|
|
4313
|
+
const marks2 = candidates.flatMap((c) => termMarksIn(c, defs));
|
|
4314
|
+
const termIndex = wants(TERM_FIELDS) || marks2.length > 0 ? await (termbase ??= readTermbase()) : void 0;
|
|
4315
|
+
const pages = wants(PAGE_FIELDS) ? await pageIds(resolve5(base, label), mergeMembersFor(label)) : [];
|
|
4316
|
+
const hints = [
|
|
4317
|
+
...fieldHints(candidates, {
|
|
4318
|
+
terms: termIndex === void 0 ? void 0 : offered(termIndex.labels),
|
|
4319
|
+
pages: offered(pages)
|
|
4320
|
+
}),
|
|
4321
|
+
...termIndex === void 0 ? [] : termMarkHints(marks2, termIndex, schemaSet.join(", "))
|
|
4322
|
+
];
|
|
4405
4323
|
return { hints, termIndex };
|
|
4406
4324
|
};
|
|
4407
4325
|
const noticed = /* @__PURE__ */ new Set();
|
|
@@ -4696,7 +4614,7 @@ async function runFill(opts) {
|
|
|
4696
4614
|
} = ready;
|
|
4697
4615
|
const firstSealed = inPlace[0]?.pointer ?? (sealedCandidates[0] === void 0 ? void 0 : pointerOf(sealedCandidates[0].key));
|
|
4698
4616
|
if (firstSealed !== void 0 && !dryRun) await writeKey(firstSealed);
|
|
4699
|
-
const { hints, termIndex } = candidates.length > 0 ? await hintsFor(label, candidates) : { hints: [], termIndex: void 0 };
|
|
4617
|
+
const { hints, termIndex } = candidates.length > 0 ? await hintsFor(label, candidates, schemas, schemaSet) : { hints: [], termIndex: void 0 };
|
|
4700
4618
|
const cacheKey = buildCacheKey([
|
|
4701
4619
|
identity.provider,
|
|
4702
4620
|
identity.model,
|
|
@@ -5694,7 +5612,7 @@ async function runDerive(opts) {
|
|
|
5694
5612
|
runFields = union2;
|
|
5695
5613
|
}
|
|
5696
5614
|
const provenanceRoot = configDir ?? cwd;
|
|
5697
|
-
const
|
|
5615
|
+
const pages = files.map((label) => resolve6(base, label));
|
|
5698
5616
|
const manifests = runFields.includes(PROVENANCE_FIELD) ? provenanceManifests(declaredCollections, provenanceRoot, base) : [];
|
|
5699
5617
|
const provenanceCollections = declaredCollections.map((c) => ({
|
|
5700
5618
|
...c,
|
|
@@ -5702,7 +5620,7 @@ async function runDerive(opts) {
|
|
|
5702
5620
|
(m) => m.keys === void 0 ? classifyRef(m.file).kind !== "url" : m.keys.includes(PROVENANCE_FIELD)
|
|
5703
5621
|
)
|
|
5704
5622
|
})).filter((c) => c.externalMetadata.length > 0);
|
|
5705
|
-
const provenanceIndex = manifests.length === 0 ? null : await loadExternalMetadata(provenanceCollections, { configDir: provenanceRoot, base, pages
|
|
5623
|
+
const provenanceIndex = manifests.length === 0 ? null : await loadExternalMetadata(provenanceCollections, { configDir: provenanceRoot, base, pages });
|
|
5706
5624
|
const places2 = /* @__PURE__ */ new Map();
|
|
5707
5625
|
for (const doc of loaded2.values()) {
|
|
5708
5626
|
const dated = fieldsOf(doc.label).filter((f) => f === "created" || f === "last-updated");
|
|
@@ -5744,7 +5662,7 @@ async function runDerive(opts) {
|
|
|
5744
5662
|
(m.keys === void 0 || m.keys.some((k) => k !== PROVENANCE_FIELD && runFields.includes(k)))
|
|
5745
5663
|
)
|
|
5746
5664
|
})).filter((c) => c.externalMetadata.length > 0);
|
|
5747
|
-
const ownedIndex = ownedCollections.length === 0 ? null : await loadExternalMetadata(ownedCollections, { configDir: provenanceRoot, base, pages
|
|
5665
|
+
const ownedIndex = ownedCollections.length === 0 ? null : await loadExternalMetadata(ownedCollections, { configDir: provenanceRoot, base, pages });
|
|
5748
5666
|
const derived2 = await deriveMetadata([...loaded2.values()], {
|
|
5749
5667
|
cwd,
|
|
5750
5668
|
base,
|
|
@@ -6282,6 +6200,94 @@ function shiftEntries(entries, shift) {
|
|
|
6282
6200
|
});
|
|
6283
6201
|
}
|
|
6284
6202
|
|
|
6203
|
+
// src/meta/commands/relocate.ts
|
|
6204
|
+
async function runRelocate(opts) {
|
|
6205
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
6206
|
+
if (opts.inputs.includes(STDIN_TOKEN)) {
|
|
6207
|
+
throw new DocmetaError(
|
|
6208
|
+
"relocate moves values between documents and a collection's manifest, and stdin is not a document on disk."
|
|
6209
|
+
);
|
|
6210
|
+
}
|
|
6211
|
+
if (opts.noConfig === true) {
|
|
6212
|
+
throw new DocmetaError(
|
|
6213
|
+
"relocate writes collections: and externalMetadata: to the config file, and --no-config rules one out."
|
|
6214
|
+
);
|
|
6215
|
+
}
|
|
6216
|
+
const run = await resolveRunConfig({
|
|
6217
|
+
cwd,
|
|
6218
|
+
...opts.configPath !== void 0 ? { configPath: opts.configPath } : {},
|
|
6219
|
+
inputs: opts.inputs,
|
|
6220
|
+
...opts.collections !== void 0 ? { collections: opts.collections } : {},
|
|
6221
|
+
...opts.onConfigLoaded !== void 0 ? { onConfigLoaded: opts.onConfigLoaded } : {}
|
|
6222
|
+
});
|
|
6223
|
+
const { config, inputs, base, configDir, collections, fromCollections } = run;
|
|
6224
|
+
if (inputs.length === 0) {
|
|
6225
|
+
throw new DocmetaError(
|
|
6226
|
+
"No files to relocate. Pass paths/globs, or declare a collection under `collections:` in manni.config.yaml."
|
|
6227
|
+
);
|
|
6228
|
+
}
|
|
6229
|
+
const forced = opts.as !== void 0 ? extractorByName(opts.as) : void 0;
|
|
6230
|
+
if (opts.as !== void 0 && forced === void 0) {
|
|
6231
|
+
throw new DocmetaError(
|
|
6232
|
+
`Unknown format "${opts.as}". Known formats: ${listFormats().map((f) => f.name).join(", ")}.`
|
|
6233
|
+
);
|
|
6234
|
+
}
|
|
6235
|
+
const allowEmpty = opts.allowEmpty ?? config?.allowEmpty;
|
|
6236
|
+
const exts = opts.exts ?? forced?.extensions;
|
|
6237
|
+
const exclude = opts.exclude ?? [];
|
|
6238
|
+
const membersFor = (label) => memberOf(collections, configDir ?? cwd, base, label);
|
|
6239
|
+
const { files: walked, gitignoreSkipped } = await resolveTargetSet({
|
|
6240
|
+
inputs,
|
|
6241
|
+
...exts !== void 0 ? { exts } : {},
|
|
6242
|
+
exclude,
|
|
6243
|
+
cwd: base,
|
|
6244
|
+
...allowEmpty !== void 0 ? { allowEmpty } : {},
|
|
6245
|
+
...gitignoreOptions({
|
|
6246
|
+
...opts.respectGitignore !== void 0 ? { flag: opts.respectGitignore } : {},
|
|
6247
|
+
...config?.respectGitignore !== void 0 ? { configured: config.respectGitignore } : {},
|
|
6248
|
+
...opts.onNotice !== void 0 ? { onNotice: opts.onNotice } : {}
|
|
6249
|
+
})
|
|
6250
|
+
});
|
|
6251
|
+
const files = fromCollections ? retainMembers(walked, membersFor) : walked;
|
|
6252
|
+
assertNonEmpty({
|
|
6253
|
+
files,
|
|
6254
|
+
inputs,
|
|
6255
|
+
usingStdin: false,
|
|
6256
|
+
...allowEmpty !== void 0 ? { allowEmpty } : {},
|
|
6257
|
+
exclude,
|
|
6258
|
+
...exts !== void 0 ? { exts } : {},
|
|
6259
|
+
gitignoreSkipped,
|
|
6260
|
+
action: "relocated"
|
|
6261
|
+
});
|
|
6262
|
+
const validator = new Validator(
|
|
6263
|
+
schemaLoadOptions({
|
|
6264
|
+
root: configDir ?? cwd,
|
|
6265
|
+
fileBase: cwd,
|
|
6266
|
+
ttlHours: config?.schemaCache?.ttlHours,
|
|
6267
|
+
offline: config?.offline,
|
|
6268
|
+
pins: collectSchemaPins(config),
|
|
6269
|
+
registered: config?.registered
|
|
6270
|
+
})
|
|
6271
|
+
);
|
|
6272
|
+
const ctx = relocationContext(run, {
|
|
6273
|
+
cwd,
|
|
6274
|
+
// A config-fallback run named no targets: its pages are already members.
|
|
6275
|
+
targets: fromCollections ? [] : opts.inputs,
|
|
6276
|
+
validator,
|
|
6277
|
+
...opts.cliSchemas !== void 0 && opts.cliSchemas.length > 0 ? { cliSchemas: opts.cliSchemas } : {},
|
|
6278
|
+
...opts.as !== void 0 ? { as: opts.as } : {},
|
|
6279
|
+
...opts.respectGitignore !== void 0 ? { respectGitignore: opts.respectGitignore } : {},
|
|
6280
|
+
...opts.env !== void 0 ? { env: opts.env } : {},
|
|
6281
|
+
...opts.onNotice !== void 0 ? { onNotice: opts.onNotice } : {}
|
|
6282
|
+
});
|
|
6283
|
+
const plan = await planRelocation(ctx, {
|
|
6284
|
+
files,
|
|
6285
|
+
...opts.fields !== void 0 ? { fields: opts.fields } : {}
|
|
6286
|
+
});
|
|
6287
|
+
if (opts.dryRun === true) return plan.result;
|
|
6288
|
+
return applyRelocation(ctx, plan);
|
|
6289
|
+
}
|
|
6290
|
+
|
|
6285
6291
|
// src/meta/reporters/fill.ts
|
|
6286
6292
|
var FILL_FORMATS = ["pretty", "json", "github"];
|
|
6287
6293
|
var FILL_FORMAT_LIST = formatList(FILL_FORMATS);
|
|
@@ -6594,94 +6600,6 @@ function fmt(value) {
|
|
|
6594
6600
|
return toJsonText(value) ?? String(value);
|
|
6595
6601
|
}
|
|
6596
6602
|
|
|
6597
|
-
// src/meta/commands/relocate.ts
|
|
6598
|
-
async function runRelocate(opts) {
|
|
6599
|
-
const cwd = opts.cwd ?? process.cwd();
|
|
6600
|
-
if (opts.inputs.includes(STDIN_TOKEN)) {
|
|
6601
|
-
throw new DocmetaError(
|
|
6602
|
-
"relocate moves values between documents and a collection's manifest, and stdin is not a document on disk."
|
|
6603
|
-
);
|
|
6604
|
-
}
|
|
6605
|
-
if (opts.noConfig === true) {
|
|
6606
|
-
throw new DocmetaError(
|
|
6607
|
-
"relocate writes collections: and externalMetadata: to the config file, and --no-config rules one out."
|
|
6608
|
-
);
|
|
6609
|
-
}
|
|
6610
|
-
const run = await resolveRunConfig({
|
|
6611
|
-
cwd,
|
|
6612
|
-
...opts.configPath !== void 0 ? { configPath: opts.configPath } : {},
|
|
6613
|
-
inputs: opts.inputs,
|
|
6614
|
-
...opts.collections !== void 0 ? { collections: opts.collections } : {},
|
|
6615
|
-
...opts.onConfigLoaded !== void 0 ? { onConfigLoaded: opts.onConfigLoaded } : {}
|
|
6616
|
-
});
|
|
6617
|
-
const { config, inputs, base, configDir, collections, fromCollections } = run;
|
|
6618
|
-
if (inputs.length === 0) {
|
|
6619
|
-
throw new DocmetaError(
|
|
6620
|
-
"No files to relocate. Pass paths/globs, or declare a collection under `collections:` in manni.config.yaml."
|
|
6621
|
-
);
|
|
6622
|
-
}
|
|
6623
|
-
const forced = opts.as !== void 0 ? extractorByName(opts.as) : void 0;
|
|
6624
|
-
if (opts.as !== void 0 && forced === void 0) {
|
|
6625
|
-
throw new DocmetaError(
|
|
6626
|
-
`Unknown format "${opts.as}". Known formats: ${listFormats().map((f) => f.name).join(", ")}.`
|
|
6627
|
-
);
|
|
6628
|
-
}
|
|
6629
|
-
const allowEmpty = opts.allowEmpty ?? config?.allowEmpty;
|
|
6630
|
-
const exts = opts.exts ?? forced?.extensions;
|
|
6631
|
-
const exclude = opts.exclude ?? [];
|
|
6632
|
-
const membersFor = (label) => memberOf(collections, configDir ?? cwd, base, label);
|
|
6633
|
-
const { files: walked, gitignoreSkipped } = await resolveTargetSet({
|
|
6634
|
-
inputs,
|
|
6635
|
-
...exts !== void 0 ? { exts } : {},
|
|
6636
|
-
exclude,
|
|
6637
|
-
cwd: base,
|
|
6638
|
-
...allowEmpty !== void 0 ? { allowEmpty } : {},
|
|
6639
|
-
...gitignoreOptions({
|
|
6640
|
-
...opts.respectGitignore !== void 0 ? { flag: opts.respectGitignore } : {},
|
|
6641
|
-
...config?.respectGitignore !== void 0 ? { configured: config.respectGitignore } : {},
|
|
6642
|
-
...opts.onNotice !== void 0 ? { onNotice: opts.onNotice } : {}
|
|
6643
|
-
})
|
|
6644
|
-
});
|
|
6645
|
-
const files = fromCollections ? retainMembers(walked, membersFor) : walked;
|
|
6646
|
-
assertNonEmpty({
|
|
6647
|
-
files,
|
|
6648
|
-
inputs,
|
|
6649
|
-
usingStdin: false,
|
|
6650
|
-
...allowEmpty !== void 0 ? { allowEmpty } : {},
|
|
6651
|
-
exclude,
|
|
6652
|
-
...exts !== void 0 ? { exts } : {},
|
|
6653
|
-
gitignoreSkipped,
|
|
6654
|
-
action: "relocated"
|
|
6655
|
-
});
|
|
6656
|
-
const validator = new Validator(
|
|
6657
|
-
schemaLoadOptions({
|
|
6658
|
-
root: configDir ?? cwd,
|
|
6659
|
-
fileBase: cwd,
|
|
6660
|
-
ttlHours: config?.schemaCache?.ttlHours,
|
|
6661
|
-
offline: config?.offline,
|
|
6662
|
-
pins: collectSchemaPins(config),
|
|
6663
|
-
registered: config?.registered
|
|
6664
|
-
})
|
|
6665
|
-
);
|
|
6666
|
-
const ctx = relocationContext(run, {
|
|
6667
|
-
cwd,
|
|
6668
|
-
// A config-fallback run named no targets: its pages are already members.
|
|
6669
|
-
targets: fromCollections ? [] : opts.inputs,
|
|
6670
|
-
validator,
|
|
6671
|
-
...opts.cliSchemas !== void 0 && opts.cliSchemas.length > 0 ? { cliSchemas: opts.cliSchemas } : {},
|
|
6672
|
-
...opts.as !== void 0 ? { as: opts.as } : {},
|
|
6673
|
-
...opts.respectGitignore !== void 0 ? { respectGitignore: opts.respectGitignore } : {},
|
|
6674
|
-
...opts.env !== void 0 ? { env: opts.env } : {},
|
|
6675
|
-
...opts.onNotice !== void 0 ? { onNotice: opts.onNotice } : {}
|
|
6676
|
-
});
|
|
6677
|
-
const plan = await planRelocation(ctx, {
|
|
6678
|
-
files,
|
|
6679
|
-
...opts.fields !== void 0 ? { fields: opts.fields } : {}
|
|
6680
|
-
});
|
|
6681
|
-
if (opts.dryRun === true) return plan.result;
|
|
6682
|
-
return applyRelocation(ctx, plan);
|
|
6683
|
-
}
|
|
6684
|
-
|
|
6685
6603
|
// src/meta/reporters/get.ts
|
|
6686
6604
|
function stringifyValue(value) {
|
|
6687
6605
|
if (value === void 0) return "(unset)";
|
|
@@ -6846,27 +6764,25 @@ function cellFrom(value) {
|
|
|
6846
6764
|
}
|
|
6847
6765
|
|
|
6848
6766
|
export {
|
|
6849
|
-
|
|
6850
|
-
|
|
6767
|
+
CONCEPT_FIELDS,
|
|
6768
|
+
TERM_RELATION_FIELDS,
|
|
6769
|
+
fieldPointer,
|
|
6770
|
+
valueAt2 as valueAt,
|
|
6851
6771
|
runGet,
|
|
6852
6772
|
getSchemasInfo,
|
|
6853
6773
|
DEFAULT_VENDOR_DIR,
|
|
6854
6774
|
vendorFileName,
|
|
6855
6775
|
runVendorSchema,
|
|
6856
6776
|
runInferSchema,
|
|
6857
|
-
|
|
6858
|
-
|
|
6777
|
+
terminalConfirm,
|
|
6778
|
+
ensureEncryptionKey,
|
|
6859
6779
|
runQuery,
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
fieldPointer,
|
|
6863
|
-
valueAt2 as valueAt,
|
|
6864
|
-
registerTermLabelSource,
|
|
6865
|
-
mergeMetaProvenance,
|
|
6866
|
-
metaProvenanceEntries,
|
|
6780
|
+
DEFAULT_CHUNK_CHARS,
|
|
6781
|
+
splitBody,
|
|
6867
6782
|
runFill,
|
|
6868
6783
|
runDerive,
|
|
6869
6784
|
deriveFailed,
|
|
6785
|
+
runRelocate,
|
|
6870
6786
|
FILL_FORMATS,
|
|
6871
6787
|
FILL_FORMAT_LIST,
|
|
6872
6788
|
isFillFormat,
|
|
@@ -6876,10 +6792,9 @@ export {
|
|
|
6876
6792
|
DERIVE_FORMAT_LIST,
|
|
6877
6793
|
isDeriveFormat,
|
|
6878
6794
|
renderDerive,
|
|
6879
|
-
runRelocate,
|
|
6880
6795
|
stringifyValue,
|
|
6881
6796
|
renderGet,
|
|
6882
6797
|
renderQuery,
|
|
6883
6798
|
renderQueryCsv
|
|
6884
6799
|
};
|
|
6885
|
-
//# sourceMappingURL=chunk-
|
|
6800
|
+
//# sourceMappingURL=chunk-PS257NIU.js.map
|