@unbrained/pm-cli 2026.5.31 → 2026.6.6
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/CHANGELOG.md +167 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +12 -4
- package/dist/cli/argv-utils.js +7 -3
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +1 -0
- package/dist/cli/bootstrap-args.js +23 -3
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +17 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +63 -0
- package/dist/cli/commands/close-many.js +302 -0
- package/dist/cli/commands/close-many.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +1 -0
- package/dist/cli/commands/completion.js +260 -32
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/config.js +115 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +193 -162
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +77 -114
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +12 -0
- package/dist/cli/commands/extension/doctor.js +97 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +49 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +51 -23
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +8 -1
- package/dist/cli/commands/gc.js +26 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +51 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.d.ts +4 -1
- package/dist/cli/commands/history.js +12 -24
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +107 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +58 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +163 -47
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
- package/dist/cli/commands/restore.js +25 -4
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +122 -1
- package/dist/cli/commands/schema.js +536 -6
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +18 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +8 -1
- package/dist/cli/commands/stats.js +18 -17
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +253 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +69 -140
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +138 -119
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -0
- package/dist/cli/commands/validate.js +63 -33
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -3
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +91 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +377 -23
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +14 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +200 -28
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +31 -6
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +31 -4
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +16 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js +20 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js → aggregate-VNAHUNNF.js} +11 -11
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js → append-7H5N64R2.js} +8 -9
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js.map → append-7H5N64R2.js.map} +1 -1
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js +69 -0
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3M73P3G6.js → chunk-23YFZ3IG.js} +210 -132
- package/dist/cli-bundle/chunks/chunk-23YFZ3IG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js +128 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js +266 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js +631 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js +380 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6HT2F4TK.js → chunk-3FI4SEFT.js} +175 -54
- package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JULRTHJQ.js → chunk-3LB74A67.js} +119 -6
- package/dist/cli-bundle/chunks/chunk-3LB74A67.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js +57 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js +422 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js +5622 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-U7FMKRXH.js → chunk-6ER6DXH5.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-6ER6DXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js +218 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js +80 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MD7K4JYF.js → chunk-AO442XLN.js} +26 -15
- package/dist/cli-bundle/chunks/chunk-AO442XLN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js +751 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js → chunk-BQHUILZS.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGZEG5TT.js → chunk-ECCMVXGM.js} +164 -53
- package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js +182 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js +130 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js → chunk-GU2ZJ2VV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js +231 -0
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js +76 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js +346 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js +140 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JTWRXG4B.js → chunk-IJGCZSIQ.js} +251 -251
- package/dist/cli-bundle/chunks/chunk-IJGCZSIQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js +1491 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js → chunk-KAG77BY3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js → chunk-KJ33AOCY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WDPXDQFG.js → chunk-KJE2FOS4.js} +6 -4
- package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js +3883 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5HSEP75M.js → chunk-LCM63IXU.js} +18 -6
- package/dist/cli-bundle/chunks/chunk-LCM63IXU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js +182 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js → chunk-N7ACFE26.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js +332 -0
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7Y53ZJIQ.js → chunk-OVQCEJPG.js} +22 -3
- package/dist/cli-bundle/chunks/chunk-OVQCEJPG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PXUAZUUY.js → chunk-OZ7NSQHL.js} +12 -11
- package/dist/cli-bundle/chunks/chunk-OZ7NSQHL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-P53TN6IA.js → chunk-PDDFYW4X.js} +35 -8
- package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js → chunk-PIU6RSL3.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js.map → chunk-PIU6RSL3.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js +338 -0
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js → chunk-PRJCELV4.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-PRJCELV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GN7IJPCD.js → chunk-PROOHX4K.js} +332 -32
- package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FQE6XZDB.js → chunk-Q7SPNHLW.js} +54 -32
- package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js → chunk-QO7EBBOM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js → chunk-R6UFP2GE.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js +154 -0
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js +119 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js +1501 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js → chunk-T3LC5LKB.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LSXGH6NE.js → chunk-U5SXYXSY.js} +821 -200
- package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js +540 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js → chunk-UM2GBHS4.js} +5 -4
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js +454 -0
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js → chunk-WKY2IBOQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js +698 -0
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js → chunk-XLTD2HN3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js +131 -0
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BUPWJ3IJ.js → chunk-XTGLRY2Y.js} +484 -49
- package/dist/cli-bundle/chunks/chunk-XTGLRY2Y.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js → chunk-YL2DJGYS.js} +7 -7
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js → claim-4DBF6RVG.js} +10 -11
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js.map → claim-4DBF6RVG.js.map} +1 -1
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js +129 -0
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js.map +1 -0
- package/dist/cli-bundle/chunks/close-3HDWDA3L.js +13 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js +17 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js +314 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js +311 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +1 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js +100 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js → comments-QKBYCWKD.js} +10 -11
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js.map → comments-QKBYCWKD.js.map} +1 -1
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js +1671 -0
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-V3FZOKLI.js → config-U4RZ4CQB.js} +121 -10
- package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js → context-FYYJGFWS.js} +32 -19
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js.map → context-FYYJGFWS.js.map} +2 -2
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js +1461 -0
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js +1278 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-YLMH33VU.js → contracts-RFSPGVVJ.js} +198 -162
- package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +7 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js +31 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js.map +1 -0
- package/dist/cli-bundle/chunks/create-JTZNCTQC.js +27 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js +55 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js → delete-VXUPH5RS.js} +7 -8
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js.map → delete-VXUPH5RS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js → deps-JSRRWC3Z.js} +7 -8
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js.map → deps-JSRRWC3Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js +225 -0
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js.map +1 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js +31 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js → docs-WW4N3MBM.js} +9 -10
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js.map → docs-WW4N3MBM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js → extension-J7IBMFTD.js} +4 -5
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js +28 -0
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js.map +1 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js +282 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js → files-WKOD326U.js} +9 -10
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js.map → files-WKOD326U.js.map} +1 -1
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js +362 -0
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js +372 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +7 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js +194 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-LTK3HOCQ.js → get-WXU6WI5P.js} +16 -17
- package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-TCWL55KM.js → health-6L6EH4WR.js} +57 -16
- package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +7 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js +1271 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +1 -0
- package/dist/cli-bundle/chunks/history-2BA3T5AE.js +20 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js +24 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js → history-repair-HIBCBIKK.js} +12 -14
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js.map → history-repair-HIBCBIKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js.map +1 -0
- package/dist/cli-bundle/chunks/init-HIVSNX3O.js +16 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js +20 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js.map +1 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js +44 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js.map +1 -0
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js → learnings-MIXSESLK.js} +10 -11
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js.map → learnings-MIXSESLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js +24 -0
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js.map +1 -0
- package/dist/cli-bundle/chunks/list-MUSQNMTD.js +20 -0
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js → notes-4XVSH2AZ.js} +10 -11
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js.map → notes-4XVSH2AZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js +44 -0
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js +1171 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js → plan-SLMODHWX.js} +13 -14
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js.map → plan-SLMODHWX.js.map} +1 -1
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js +229 -0
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-UP3VRUFS.js → register-list-query-WST76HSQ.js} +26 -26
- package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +7 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-YWSBF545.js → register-mutation-OA675SOU.js} +154 -43
- package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js +383 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-3BDTGSDH.js → register-operations-N3PMHXH5.js} +49 -37
- package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js → register-setup-ZHJI2DI3.js} +18 -19
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js.map → register-setup-ZHJI2DI3.js.map} +2 -2
- package/dist/cli-bundle/chunks/restore-D4RGNX33.js +17 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js +21 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js +780 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js +770 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js.map +1 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js +1127 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-HENBL456.js → search-OA6JX27A.js} +25 -16
- package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js +202 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js +212 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-MXX3E5JL.js +31 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js +35 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js +328 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js → test-all-NTOZ7C3M.js} +13 -14
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js.map → test-all-NTOZ7C3M.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js → test-runs-WMVTQU3Y.js} +5 -5
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js +25 -0
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js.map +1 -0
- package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +21 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js +605 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-46HRSP2Q.js → update-many-KGGEYABR.js} +78 -146
- package/dist/cli-bundle/chunks/update-many-KGGEYABR.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js → upgrade-BLI7XBAJ.js} +5 -7
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js.map → upgrade-BLI7XBAJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-TMCVKIGZ.js → validate-AGOAUOVW.js} +61 -48
- package/dist/cli-bundle/chunks/validate-AGOAUOVW.js.map +7 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js.map +1 -0
- package/dist/cli-bundle/main.js +534 -1505
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
- package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
- package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.d.ts +73 -0
- package/dist/core/diagnostics/remediation.js +328 -0
- package/dist/core/diagnostics/remediation.js.map +1 -0
- package/dist/core/extensions/extension-hook-runtime.js +9 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +60 -4
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +5 -1
- package/dist/core/extensions/index.js +61 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.d.ts +5 -1
- package/dist/core/extensions/item-fields.js +126 -4
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +283 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-diff.d.ts +47 -0
- package/dist/core/history/history-diff.js +152 -0
- package/dist/core/history/history-diff.js.map +1 -0
- package/dist/core/history/history-storage-stats.d.ts +31 -0
- package/dist/core/history/history-storage-stats.js +101 -0
- package/dist/core/history/history-storage-stats.js.map +1 -0
- package/dist/core/item/item-format.d.ts +3 -2
- package/dist/core/item/item-format.js +15 -10
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +29 -0
- package/dist/core/item/status-filter.js +97 -0
- package/dist/core/item/status-filter.js.map +1 -0
- package/dist/core/item/type-registry.js +4 -2
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +46 -0
- package/dist/core/lock/lock-gc.js +194 -0
- package/dist/core/lock/lock-gc.js.map +1 -0
- package/dist/core/output/output.js +17 -5
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +15 -0
- package/dist/core/schema/item-types-file.js +27 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +4 -3
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.d.ts +1 -1
- package/dist/core/schema/runtime-field-values.js +10 -4
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +75 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.d.ts +113 -0
- package/dist/core/schema/status-defs-file.js +260 -0
- package/dist/core/schema/status-defs-file.js.map +1 -0
- package/dist/core/schema/type-workflows.d.ts +64 -0
- package/dist/core/schema/type-workflows.js +98 -0
- package/dist/core/schema/type-workflows.js.map +1 -0
- package/dist/core/search/cache.d.ts +3 -1
- package/dist/core/search/cache.js +104 -28
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/http-client.d.ts +2 -2
- package/dist/core/search/http-client.js +2 -2
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -0
- package/dist/core/search/vector-stores.js +64 -14
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/search/vectorization-metadata.d.ts +13 -0
- package/dist/core/search/vectorization-metadata.js +65 -0
- package/dist/core/search/vectorization-metadata.js.map +1 -0
- package/dist/core/shared/serial-queue.d.ts +12 -0
- package/dist/core/shared/serial-queue.js +43 -0
- package/dist/core/shared/serial-queue.js.map +1 -0
- package/dist/core/shared/serialization.d.ts +1 -0
- package/dist/core/shared/serialization.js +86 -2
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +14 -5
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +61 -6
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.js +18 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +19 -1
- package/dist/core/store/settings.js +130 -10
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.js +5 -4
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +16 -4
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +372 -45
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +7 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +42 -10
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +42 -1
- package/dist/sdk/cli-contracts.js +225 -19
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +22 -0
- package/dist/sdk/errors.js +46 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +14 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +77 -0
- package/dist/sdk/testing.js +239 -0
- package/dist/sdk/testing.js.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +22 -3
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +118 -7
- package/docs/CONFIGURATION.md +57 -2
- package/docs/EXTENSIONS.md +125 -6
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +3 -1
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +38 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +36 -1
- package/docs/examples/policy-restricted-extension/manifest.json +1 -0
- package/docs/examples/starter-extension/index.js +9 -1
- package/docs/examples/starter-extension/manifest.json +1 -0
- package/package.json +16 -7
- package/packages/pm-beads/extensions/beads/index.js +2 -4
- package/packages/pm-beads/extensions/beads/index.ts +43 -33
- package/packages/pm-beads/extensions/beads/manifest.json +12 -1
- package/packages/pm-calendar/README.md +6 -0
- package/packages/pm-calendar/extensions/calendar/index.js +6 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
- package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
- package/packages/pm-guide-shell/README.md +4 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
- package/packages/pm-lifecycle-hooks/README.md +29 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
- package/packages/pm-lifecycle-hooks/package.json +52 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
- package/packages/pm-templates/extensions/templates/manifest.json +6 -1
- package/packages/pm-todos/extensions/todos/index.js +3 -7
- package/packages/pm-todos/extensions/todos/index.ts +55 -42
- package/packages/pm-todos/extensions/todos/manifest.json +13 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -4
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +0 -17
- package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +0 -189
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +0 -47
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +0 -56
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +0 -141
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +0 -7
- package/dist/cli-bundle/chunks/close-XY4CSAYF.js +0 -14
- package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +0 -7
- package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +0 -28
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js +0 -181
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +0 -7
- package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-A2JUDXUE.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +0 -20
- package/dist/cli-bundle/chunks/init-M2WUB4YH.js +0 -16
- package/dist/cli-bundle/chunks/list-OGWQPC26.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-MB2ISME7.js +0 -18
- package/dist/cli-bundle/chunks/schema-Q622KC46.js +0 -119
- package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +0 -7
- package/dist/cli-bundle/chunks/search-HENBL456.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +0 -124
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +0 -7
- package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +0 -32
- package/dist/cli-bundle/chunks/update-H6SCWNMA.js +0 -22
- package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-OWYSUZOY.js.map → activity-CVXTCHYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js.map → aggregate-VNAHUNNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js.map → chunk-BQHUILZS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js.map → chunk-GU2ZJ2VV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js.map → chunk-KAG77BY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js.map → chunk-KJ33AOCY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js.map → chunk-N7ACFE26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js.map → chunk-QO7EBBOM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js.map → chunk-R6UFP2GE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js.map → chunk-T3LC5LKB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js.map → chunk-UM2GBHS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js.map → chunk-WKY2IBOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js.map → chunk-XLTD2HN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js.map → chunk-YL2DJGYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-XY4CSAYF.js.map → close-3HDWDA3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PZVHRIZQ.js.map → create-JTZNCTQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js.map → extension-J7IBMFTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-A2JUDXUE.js.map → history-2BA3T5AE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ED6RFCPL.js.map → history-redact-JBZNXHGR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-M2WUB4YH.js.map → init-HIVSNX3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-OGWQPC26.js.map → list-MUSQNMTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-MB2ISME7.js.map → restore-D4RGNX33.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-VNBDRJ4Z.js.map → test-MXX3E5JL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js.map → test-runs-WMVTQU3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-H6SCWNMA.js.map → update-YRXSUGYQ.js.map} +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6da7beb3-25f2-5c8f-9186-6c5066ef02c8")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
listAllFrontMatterLight
|
|
5
|
+
} from "./chunk-GGYWB3Y2.js";
|
|
6
|
+
import "./chunk-HZGUAH22.js";
|
|
7
|
+
import "./chunk-LB3RUL2N.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveItemTypeRegistry
|
|
10
|
+
} from "./chunk-2VBQ6ZXS.js";
|
|
11
|
+
import "./chunk-TCD3R2PF.js";
|
|
12
|
+
import {
|
|
13
|
+
EXIT_CODE,
|
|
14
|
+
PmCliError,
|
|
15
|
+
getActiveExtensionRegistrations,
|
|
16
|
+
getSettingsPath,
|
|
17
|
+
pathExists,
|
|
18
|
+
readSettings,
|
|
19
|
+
resolvePmRoot
|
|
20
|
+
} from "./chunk-5SFCOO6B.js";
|
|
21
|
+
|
|
22
|
+
// dist/cli/commands/deps.js
|
|
23
|
+
var DEPS_FORMAT_VALUES = ["tree", "graph"];
|
|
24
|
+
var DEPS_COLLAPSE_VALUES = ["none", "repeated"];
|
|
25
|
+
function parseFormat(raw) {
|
|
26
|
+
const candidate = raw?.trim().toLowerCase() ?? "tree";
|
|
27
|
+
if (DEPS_FORMAT_VALUES.includes(candidate)) {
|
|
28
|
+
return candidate;
|
|
29
|
+
}
|
|
30
|
+
throw new PmCliError(`Invalid --format value "${raw}". Use "tree" or "graph".`, EXIT_CODE.USAGE);
|
|
31
|
+
}
|
|
32
|
+
function parseMaxDepth(raw) {
|
|
33
|
+
if (raw === void 0) {
|
|
34
|
+
return void 0;
|
|
35
|
+
}
|
|
36
|
+
const normalized = typeof raw === "number" ? raw : Number(raw.trim());
|
|
37
|
+
if (!Number.isInteger(normalized) || normalized < 0) {
|
|
38
|
+
throw new PmCliError(`Invalid --max-depth value "${raw}". Use a non-negative integer.`, EXIT_CODE.USAGE);
|
|
39
|
+
}
|
|
40
|
+
return normalized;
|
|
41
|
+
}
|
|
42
|
+
function parseCollapse(raw) {
|
|
43
|
+
const candidate = raw?.trim().toLowerCase() ?? "none";
|
|
44
|
+
if (DEPS_COLLAPSE_VALUES.includes(candidate)) {
|
|
45
|
+
return candidate;
|
|
46
|
+
}
|
|
47
|
+
throw new PmCliError(`Invalid --collapse value "${raw}". Use "none" or "repeated".`, EXIT_CODE.USAGE);
|
|
48
|
+
}
|
|
49
|
+
function normalizeDependencies(dependencies) {
|
|
50
|
+
if (!dependencies || dependencies.length === 0) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const sorted = [...dependencies].sort((left, right) => {
|
|
54
|
+
const byKind = left.kind.localeCompare(right.kind);
|
|
55
|
+
if (byKind !== 0)
|
|
56
|
+
return byKind;
|
|
57
|
+
const byId = left.id.localeCompare(right.id);
|
|
58
|
+
if (byId !== 0)
|
|
59
|
+
return byId;
|
|
60
|
+
return left.created_at.localeCompare(right.created_at);
|
|
61
|
+
});
|
|
62
|
+
const deduped = /* @__PURE__ */ new Map();
|
|
63
|
+
for (const dependency of sorted) {
|
|
64
|
+
const key = `${dependency.kind}::${dependency.id}`;
|
|
65
|
+
if (!deduped.has(key)) {
|
|
66
|
+
deduped.set(key, dependency);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return [...deduped.values()];
|
|
70
|
+
}
|
|
71
|
+
function toIndexedItem(item) {
|
|
72
|
+
return {
|
|
73
|
+
id: item.id,
|
|
74
|
+
title: item.title,
|
|
75
|
+
type: item.type,
|
|
76
|
+
status: item.status,
|
|
77
|
+
dependencies: normalizeDependencies(item.dependencies)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function toTreeNode(id, index, lineage, maxDepth, collapse, expanded, depth = 0, via) {
|
|
81
|
+
const item = index.get(id);
|
|
82
|
+
const baseNode = {
|
|
83
|
+
id,
|
|
84
|
+
title: item?.title,
|
|
85
|
+
type: item?.type,
|
|
86
|
+
status: item?.status,
|
|
87
|
+
via,
|
|
88
|
+
missing: !item,
|
|
89
|
+
cycle: lineage.has(id),
|
|
90
|
+
dependencies: []
|
|
91
|
+
};
|
|
92
|
+
if (!item || baseNode.cycle) {
|
|
93
|
+
return baseNode;
|
|
94
|
+
}
|
|
95
|
+
if (maxDepth !== void 0 && depth >= maxDepth) {
|
|
96
|
+
if (item.dependencies.length > 0) {
|
|
97
|
+
baseNode.truncated = true;
|
|
98
|
+
}
|
|
99
|
+
return baseNode;
|
|
100
|
+
}
|
|
101
|
+
if (collapse === "repeated" && expanded.has(id)) {
|
|
102
|
+
baseNode.collapsed = true;
|
|
103
|
+
return baseNode;
|
|
104
|
+
}
|
|
105
|
+
if (collapse === "repeated") {
|
|
106
|
+
expanded.add(id);
|
|
107
|
+
}
|
|
108
|
+
const nextLineage = new Set(lineage);
|
|
109
|
+
nextLineage.add(id);
|
|
110
|
+
baseNode.dependencies = item.dependencies.map((dependency) => toTreeNode(dependency.id, index, nextLineage, maxDepth, collapse, expanded, depth + 1, dependency.kind));
|
|
111
|
+
return baseNode;
|
|
112
|
+
}
|
|
113
|
+
function mergeGraphNode(existing, candidate) {
|
|
114
|
+
if (!existing) {
|
|
115
|
+
return candidate;
|
|
116
|
+
}
|
|
117
|
+
if (existing.missing && !candidate.missing) {
|
|
118
|
+
return candidate;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
...existing,
|
|
122
|
+
title: existing.title ?? candidate.title,
|
|
123
|
+
type: existing.type ?? candidate.type,
|
|
124
|
+
status: existing.status ?? candidate.status
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function toGraph(root) {
|
|
128
|
+
const nodesById = /* @__PURE__ */ new Map();
|
|
129
|
+
const edgesByKey = /* @__PURE__ */ new Map();
|
|
130
|
+
const visit = (node) => {
|
|
131
|
+
nodesById.set(node.id, mergeGraphNode(nodesById.get(node.id), {
|
|
132
|
+
id: node.id,
|
|
133
|
+
title: node.title,
|
|
134
|
+
type: node.type,
|
|
135
|
+
status: node.status,
|
|
136
|
+
missing: node.missing
|
|
137
|
+
}));
|
|
138
|
+
for (const child of node.dependencies) {
|
|
139
|
+
nodesById.set(child.id, mergeGraphNode(nodesById.get(child.id), {
|
|
140
|
+
id: child.id,
|
|
141
|
+
title: child.title,
|
|
142
|
+
type: child.type,
|
|
143
|
+
status: child.status,
|
|
144
|
+
missing: child.missing
|
|
145
|
+
}));
|
|
146
|
+
const relationKind = child.via ?? "related";
|
|
147
|
+
const edgeKey = `${node.id}::${child.id}::${relationKind}`;
|
|
148
|
+
if (!edgesByKey.has(edgeKey)) {
|
|
149
|
+
edgesByKey.set(edgeKey, {
|
|
150
|
+
from: node.id,
|
|
151
|
+
to: child.id,
|
|
152
|
+
kind: relationKind
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
if (!child.cycle) {
|
|
156
|
+
visit(child);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
visit(root);
|
|
161
|
+
const nodes = [...nodesById.values()].sort((left, right) => left.id.localeCompare(right.id));
|
|
162
|
+
const edges = [...edgesByKey.values()].sort((left, right) => {
|
|
163
|
+
const byFrom = left.from.localeCompare(right.from);
|
|
164
|
+
if (byFrom !== 0)
|
|
165
|
+
return byFrom;
|
|
166
|
+
const byTo = left.to.localeCompare(right.to);
|
|
167
|
+
if (byTo !== 0)
|
|
168
|
+
return byTo;
|
|
169
|
+
return left.kind.localeCompare(right.kind);
|
|
170
|
+
});
|
|
171
|
+
const missingIds = nodes.filter((node) => node.missing).map((node) => node.id);
|
|
172
|
+
return {
|
|
173
|
+
root_id: root.id,
|
|
174
|
+
nodes,
|
|
175
|
+
edges,
|
|
176
|
+
missing_ids: missingIds
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
async function runDeps(id, options, global) {
|
|
180
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
181
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
182
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
183
|
+
}
|
|
184
|
+
const format = parseFormat(options.format);
|
|
185
|
+
const maxDepth = parseMaxDepth(options.maxDepth);
|
|
186
|
+
const collapse = parseCollapse(options.collapse);
|
|
187
|
+
const summaryOnly = options.summary === true;
|
|
188
|
+
const settings = await readSettings(pmRoot);
|
|
189
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
190
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
|
|
191
|
+
const index = new Map(items.map((item) => [item.id, toIndexedItem(item)]));
|
|
192
|
+
if (!index.has(id)) {
|
|
193
|
+
throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);
|
|
194
|
+
}
|
|
195
|
+
const tree = toTreeNode(id, index, /* @__PURE__ */ new Set(), maxDepth, collapse, /* @__PURE__ */ new Set());
|
|
196
|
+
const graph = toGraph(tree);
|
|
197
|
+
const baseResult = {
|
|
198
|
+
id,
|
|
199
|
+
format,
|
|
200
|
+
node_count: graph.nodes.length,
|
|
201
|
+
edge_count: graph.edges.length,
|
|
202
|
+
missing_count: graph.missing_ids.length
|
|
203
|
+
};
|
|
204
|
+
if (summaryOnly) {
|
|
205
|
+
return baseResult;
|
|
206
|
+
}
|
|
207
|
+
if (format === "tree") {
|
|
208
|
+
return {
|
|
209
|
+
...baseResult,
|
|
210
|
+
tree
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
...baseResult,
|
|
215
|
+
graph
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
export {
|
|
219
|
+
DEPS_COLLAPSE_VALUES,
|
|
220
|
+
DEPS_FORMAT_VALUES,
|
|
221
|
+
runDeps
|
|
222
|
+
};
|
|
223
|
+
//# sourceMappingURL=deps-SCZIFK2Z.js.map
|
|
224
|
+
|
|
225
|
+
//# debugId=6da7beb3-25f2-5c8f-9186-6c5066ef02c8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/deps.ts"],"sourcesContent":["import { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { Dependency, ItemFrontMatter, ItemStatus, ItemType } from \"../../types/index.js\";\n\nexport const DEPS_FORMAT_VALUES = [\"tree\", \"graph\"] as const;\nexport type DepsFormat = (typeof DEPS_FORMAT_VALUES)[number];\nexport const DEPS_COLLAPSE_VALUES = [\"none\", \"repeated\"] as const;\nexport type DepsCollapseMode = (typeof DEPS_COLLAPSE_VALUES)[number];\n\nexport interface DepsCommandOptions {\n format?: string;\n maxDepth?: string | number;\n collapse?: string;\n summary?: boolean;\n}\n\ninterface IndexedItem {\n id: string;\n title: string;\n type: ItemType;\n status: ItemStatus;\n dependencies: Dependency[];\n}\n\nexport interface DepsTreeNode {\n id: string;\n title?: string;\n type?: ItemType;\n status?: ItemStatus;\n via?: string;\n missing: boolean;\n cycle: boolean;\n truncated?: boolean;\n collapsed?: boolean;\n dependencies: DepsTreeNode[];\n}\n\nexport interface DepsGraphNode {\n id: string;\n title?: string;\n type?: ItemType;\n status?: ItemStatus;\n missing: boolean;\n}\n\nexport interface DepsGraphEdge {\n from: string;\n to: string;\n kind: string;\n}\n\nexport interface DepsGraphResult {\n root_id: string;\n nodes: DepsGraphNode[];\n edges: DepsGraphEdge[];\n missing_ids: string[];\n}\n\nexport interface DepsResult {\n id: string;\n format: DepsFormat;\n node_count: number;\n edge_count: number;\n missing_count: number;\n tree?: DepsTreeNode;\n graph?: DepsGraphResult;\n}\n\nfunction parseFormat(raw: string | undefined): DepsFormat {\n const candidate = raw?.trim().toLowerCase() ?? \"tree\";\n if ((DEPS_FORMAT_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsFormat;\n }\n throw new PmCliError(`Invalid --format value \"${raw}\". Use \"tree\" or \"graph\".`, EXIT_CODE.USAGE);\n}\n\nfunction parseMaxDepth(raw: string | number | undefined): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = typeof raw === \"number\" ? raw : Number(raw.trim());\n if (!Number.isInteger(normalized) || normalized < 0) {\n throw new PmCliError(`Invalid --max-depth value \"${raw}\". Use a non-negative integer.`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseCollapse(raw: string | undefined): DepsCollapseMode {\n const candidate = raw?.trim().toLowerCase() ?? \"none\";\n if ((DEPS_COLLAPSE_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsCollapseMode;\n }\n throw new PmCliError(`Invalid --collapse value \"${raw}\". Use \"none\" or \"repeated\".`, EXIT_CODE.USAGE);\n}\n\nfunction normalizeDependencies(dependencies: Dependency[] | undefined): Dependency[] {\n if (!dependencies || dependencies.length === 0) {\n return [];\n }\n const sorted = [...dependencies].sort((left, right) => {\n const byKind = left.kind.localeCompare(right.kind);\n if (byKind !== 0) return byKind;\n const byId = left.id.localeCompare(right.id);\n if (byId !== 0) return byId;\n return left.created_at.localeCompare(right.created_at);\n });\n const deduped = new Map<string, Dependency>();\n for (const dependency of sorted) {\n const key = `${dependency.kind}::${dependency.id}`;\n if (!deduped.has(key)) {\n deduped.set(key, dependency);\n }\n }\n return [...deduped.values()];\n}\n\nfunction toIndexedItem(item: ItemFrontMatter): IndexedItem {\n return {\n id: item.id,\n title: item.title,\n type: item.type,\n status: item.status,\n dependencies: normalizeDependencies(item.dependencies),\n };\n}\n\nfunction toTreeNode(\n id: string,\n index: Map<string, IndexedItem>,\n lineage: Set<string>,\n maxDepth: number | undefined,\n collapse: DepsCollapseMode,\n expanded: Set<string>,\n depth = 0,\n via?: string,\n): DepsTreeNode {\n const item = index.get(id);\n const baseNode: DepsTreeNode = {\n id,\n title: item?.title,\n type: item?.type,\n status: item?.status,\n via,\n missing: !item,\n cycle: lineage.has(id),\n dependencies: [],\n };\n if (!item || baseNode.cycle) {\n return baseNode;\n }\n if (maxDepth !== undefined && depth >= maxDepth) {\n if (item.dependencies.length > 0) {\n baseNode.truncated = true;\n }\n return baseNode;\n }\n if (collapse === \"repeated\" && expanded.has(id)) {\n baseNode.collapsed = true;\n return baseNode;\n }\n if (collapse === \"repeated\") {\n expanded.add(id);\n }\n const nextLineage = new Set(lineage);\n nextLineage.add(id);\n baseNode.dependencies = item.dependencies.map((dependency) =>\n toTreeNode(dependency.id, index, nextLineage, maxDepth, collapse, expanded, depth + 1, dependency.kind),\n );\n return baseNode;\n}\n\nfunction mergeGraphNode(existing: DepsGraphNode | undefined, candidate: DepsGraphNode): DepsGraphNode {\n if (!existing) {\n return candidate;\n }\n if (existing.missing && !candidate.missing) {\n return candidate;\n }\n return {\n ...existing,\n title: existing.title ?? candidate.title,\n type: existing.type ?? candidate.type,\n status: existing.status ?? candidate.status,\n };\n}\n\nfunction toGraph(root: DepsTreeNode): DepsGraphResult {\n const nodesById = new Map<string, DepsGraphNode>();\n const edgesByKey = new Map<string, DepsGraphEdge>();\n\n const visit = (node: DepsTreeNode): void => {\n nodesById.set(\n node.id,\n mergeGraphNode(nodesById.get(node.id), {\n id: node.id,\n title: node.title,\n type: node.type,\n status: node.status,\n missing: node.missing,\n }),\n );\n for (const child of node.dependencies) {\n nodesById.set(\n child.id,\n mergeGraphNode(nodesById.get(child.id), {\n id: child.id,\n title: child.title,\n type: child.type,\n status: child.status,\n missing: child.missing,\n }),\n );\n const relationKind = child.via ?? \"related\";\n const edgeKey = `${node.id}::${child.id}::${relationKind}`;\n if (!edgesByKey.has(edgeKey)) {\n edgesByKey.set(edgeKey, {\n from: node.id,\n to: child.id,\n kind: relationKind,\n });\n }\n if (!child.cycle) {\n visit(child);\n }\n }\n };\n\n visit(root);\n\n const nodes = [...nodesById.values()].sort((left, right) => left.id.localeCompare(right.id));\n const edges = [...edgesByKey.values()].sort((left, right) => {\n const byFrom = left.from.localeCompare(right.from);\n if (byFrom !== 0) return byFrom;\n const byTo = left.to.localeCompare(right.to);\n if (byTo !== 0) return byTo;\n return left.kind.localeCompare(right.kind);\n });\n const missingIds = nodes.filter((node) => node.missing).map((node) => node.id);\n return {\n root_id: root.id,\n nodes,\n edges,\n missing_ids: missingIds,\n };\n}\n\nexport async function runDeps(id: string, options: DepsCommandOptions, global: GlobalOptions): Promise<DepsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const format = parseFormat(options.format);\n const maxDepth = parseMaxDepth(options.maxDepth);\n const collapse = parseCollapse(options.collapse);\n const summaryOnly = options.summary === true;\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n const index = new Map(items.map((item) => [item.id, toIndexedItem(item)]));\n if (!index.has(id)) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n\n const tree = toTreeNode(id, index, new Set<string>(), maxDepth, collapse, new Set<string>());\n const graph = toGraph(tree);\n const baseResult = {\n id,\n format,\n node_count: graph.nodes.length,\n edge_count: graph.edges.length,\n missing_count: graph.missing_ids.length,\n };\n if (summaryOnly) {\n return baseResult;\n }\n if (format === \"tree\") {\n return {\n ...baseResult,\n tree,\n };\n }\n return {\n ...baseResult,\n graph,\n };\n}\n"],"names":[],"mappings":"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","debugId":"6da7beb3-25f2-5c8f-9186-6c5066ef02c8"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="339a5d11-6712-52d2-9904-0960437e7557")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
renameArtifactsResultKey,
|
|
5
|
+
runLinkedArtifacts
|
|
6
|
+
} from "./chunk-I2HSTRJF.js";
|
|
7
|
+
import "./chunk-J27KIHTG.js";
|
|
8
|
+
import "./chunk-PO3GSVFV.js";
|
|
9
|
+
import "./chunk-GGYWB3Y2.js";
|
|
10
|
+
import "./chunk-HZGUAH22.js";
|
|
11
|
+
import "./chunk-LB3RUL2N.js";
|
|
12
|
+
import "./chunk-2VBQ6ZXS.js";
|
|
13
|
+
import "./chunk-TCD3R2PF.js";
|
|
14
|
+
import "./chunk-5SFCOO6B.js";
|
|
15
|
+
|
|
16
|
+
// dist/cli/commands/docs.js
|
|
17
|
+
async function runDocs(id, options, global) {
|
|
18
|
+
const result = await runLinkedArtifacts(id, options, global, {
|
|
19
|
+
metadataKey: "docs",
|
|
20
|
+
op: "docs_add",
|
|
21
|
+
bareNoun: "doc",
|
|
22
|
+
supportsAppendStable: false
|
|
23
|
+
});
|
|
24
|
+
return renameArtifactsResultKey(result, "docs");
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
runDocs
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=docs-GJK6K4VP.js.map
|
|
30
|
+
|
|
31
|
+
//# debugId=339a5d11-6712-52d2-9904-0960437e7557
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/docs.ts"],"sourcesContent":["import type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiCA,eAAsB,QAAQ,IAAY,SAA6B,QAAqB;AAC1F,QAAM,SAA+B,MAAM,mBAAmB,IAAI,SAAS,QAAQ;IACjF,aAAa;IACb,IAAI;IACJ,UAAU;IACV,sBAAsB;GACvB;AACD,SAAO,yBAAyB,QAAQ,MAAM;AAChD","debugId":"339a5d11-6712-52d2-9904-0960437e7557"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renameArtifactsResultKey,
|
|
3
3
|
runLinkedArtifacts
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BQHUILZS.js";
|
|
5
5
|
import "./chunk-O7IWB35H.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-LSXGH6NE.js";
|
|
6
|
+
import "./chunk-XLTD2HN3.js";
|
|
7
|
+
import "./chunk-XTGLRY2Y.js";
|
|
8
|
+
import "./chunk-T3LC5LKB.js";
|
|
9
|
+
import "./chunk-AO442XLN.js";
|
|
10
|
+
import "./chunk-KJE2FOS4.js";
|
|
11
|
+
import "./chunk-QO7EBBOM.js";
|
|
12
|
+
import "./chunk-U5SXYXSY.js";
|
|
14
13
|
|
|
15
14
|
// dist/cli/commands/docs.js
|
|
16
15
|
!(function() {
|
|
@@ -32,4 +31,4 @@ async function runDocs(id, options, global2) {
|
|
|
32
31
|
export {
|
|
33
32
|
runDocs
|
|
34
33
|
};
|
|
35
|
-
//# sourceMappingURL=docs-
|
|
34
|
+
//# sourceMappingURL=docs-WW4N3MBM.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/docs.ts"],
|
|
4
4
|
"sourcesContent": ["import type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAiCA,eAAsB,QAAQ,IAAY,SAA6BA,SAAqB;AAC1F,QAAM,SAA+B,MAAM,mBAAmB,IAAI,SAASA,SAAQ;IACjF,aAAa;IACb,IAAI;IACJ,UAAU;IACV,sBAAsB;GACvB;AACD,SAAO,yBAAyB,QAAQ,MAAM;AAChD;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -7,11 +7,10 @@ import {
|
|
|
7
7
|
runExtension,
|
|
8
8
|
validateExtensionDirectory,
|
|
9
9
|
writeManagedExtensionState
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-EGUGFSNX.js";
|
|
10
|
+
} from "./chunk-ECCMVXGM.js";
|
|
12
11
|
import "./chunk-3HUE7XOF.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-QO7EBBOM.js";
|
|
13
|
+
import "./chunk-U5SXYXSY.js";
|
|
15
14
|
export {
|
|
16
15
|
copyExtensionDirectoryForInstall,
|
|
17
16
|
parseExtensionInstallSource,
|
|
@@ -22,4 +21,4 @@ export {
|
|
|
22
21
|
validateExtensionDirectory,
|
|
23
22
|
writeManagedExtensionState
|
|
24
23
|
};
|
|
25
|
-
//# sourceMappingURL=extension-
|
|
24
|
+
//# sourceMappingURL=extension-J7IBMFTD.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
copyExtensionDirectoryForInstall,
|
|
5
|
+
parseExtensionInstallSource,
|
|
6
|
+
parseExtensionManifest,
|
|
7
|
+
readManagedExtensionState,
|
|
8
|
+
resolveManagedExtensionStatePath,
|
|
9
|
+
runExtension,
|
|
10
|
+
validateExtensionDirectory,
|
|
11
|
+
writeManagedExtensionState
|
|
12
|
+
} from "./chunk-TPH5XEVD.js";
|
|
13
|
+
import "./chunk-LXYVKYMQ.js";
|
|
14
|
+
import "./chunk-TCD3R2PF.js";
|
|
15
|
+
import "./chunk-5SFCOO6B.js";
|
|
16
|
+
export {
|
|
17
|
+
copyExtensionDirectoryForInstall,
|
|
18
|
+
parseExtensionInstallSource,
|
|
19
|
+
parseExtensionManifest,
|
|
20
|
+
readManagedExtensionState,
|
|
21
|
+
resolveManagedExtensionStatePath,
|
|
22
|
+
runExtension,
|
|
23
|
+
validateExtensionDirectory,
|
|
24
|
+
writeManagedExtensionState
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=extension-VDY2U33M.js.map
|
|
27
|
+
|
|
28
|
+
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","debugId":"45eac7fa-f181-5cca-93b7-cfb58909dbb3"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2fdc8a3e-c4aa-531a-bd76-1570005b876f")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
dedupeLinkedArtifacts,
|
|
5
|
+
normalizeLinkedPath,
|
|
6
|
+
renameArtifactsResultKey,
|
|
7
|
+
runLinkedArtifacts,
|
|
8
|
+
sortLinkedArtifacts
|
|
9
|
+
} from "./chunk-I2HSTRJF.js";
|
|
10
|
+
import {
|
|
11
|
+
resolveAuthor
|
|
12
|
+
} from "./chunk-J27KIHTG.js";
|
|
13
|
+
import "./chunk-PO3GSVFV.js";
|
|
14
|
+
import {
|
|
15
|
+
locateItem,
|
|
16
|
+
mutateItem,
|
|
17
|
+
readLocatedItem
|
|
18
|
+
} from "./chunk-GGYWB3Y2.js";
|
|
19
|
+
import "./chunk-HZGUAH22.js";
|
|
20
|
+
import "./chunk-LB3RUL2N.js";
|
|
21
|
+
import {
|
|
22
|
+
resolveItemTypeRegistry
|
|
23
|
+
} from "./chunk-2VBQ6ZXS.js";
|
|
24
|
+
import "./chunk-TCD3R2PF.js";
|
|
25
|
+
import {
|
|
26
|
+
EXIT_CODE,
|
|
27
|
+
PmCliError,
|
|
28
|
+
getActiveExtensionRegistrations,
|
|
29
|
+
getSettingsPath,
|
|
30
|
+
isPathWithinDirectory,
|
|
31
|
+
pathExists,
|
|
32
|
+
readSettings,
|
|
33
|
+
resolvePmRoot
|
|
34
|
+
} from "./chunk-5SFCOO6B.js";
|
|
35
|
+
|
|
36
|
+
// dist/cli/commands/files.js
|
|
37
|
+
import fs from "node:fs/promises";
|
|
38
|
+
import path from "node:path";
|
|
39
|
+
function normalizeCandidatePathForOutput(value) {
|
|
40
|
+
return normalizeLinkedPath(path.normalize(value));
|
|
41
|
+
}
|
|
42
|
+
async function realpathForContainment(inputPath) {
|
|
43
|
+
try {
|
|
44
|
+
return await fs.realpath(inputPath);
|
|
45
|
+
} catch {
|
|
46
|
+
return path.resolve(inputPath);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function linkedFileResolvedKey(linkedFile, projectRoot) {
|
|
50
|
+
const resolvedPath = path.isAbsolute(linkedFile.path) ? path.resolve(linkedFile.path) : path.resolve(projectRoot, linkedFile.path);
|
|
51
|
+
return `${normalizeCandidatePathForOutput(resolvedPath)}::${linkedFile.scope}`;
|
|
52
|
+
}
|
|
53
|
+
function collectTextReferences(value, fieldPath, references) {
|
|
54
|
+
if (typeof value === "string") {
|
|
55
|
+
const trimmed = value.trim();
|
|
56
|
+
if (trimmed.length > 0) {
|
|
57
|
+
references.push({ field: fieldPath, value: trimmed });
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (Array.isArray(value)) {
|
|
62
|
+
value.forEach((entry, index) => collectTextReferences(entry, `${fieldPath}[${index}]`, references));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (typeof value === "object" && value !== null) {
|
|
66
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
67
|
+
collectTextReferences(nested, fieldPath ? `${fieldPath}.${key}` : key, references);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function collectItemTextReferences(document) {
|
|
72
|
+
const references = [];
|
|
73
|
+
collectTextReferences(document.metadata, "metadata", references);
|
|
74
|
+
collectTextReferences(document.body, "body", references);
|
|
75
|
+
return references;
|
|
76
|
+
}
|
|
77
|
+
function cleanupPathToken(value) {
|
|
78
|
+
let next = value.trim();
|
|
79
|
+
next = next.replace(/^[`"'<([{]+/u, "");
|
|
80
|
+
next = next.replace(/[`"'>)\]},;!?]+$/u, "");
|
|
81
|
+
next = next.replace(/[.]+$/u, "");
|
|
82
|
+
next = next.replace(/:(?:\d+)(?::\d+)?$/u, "");
|
|
83
|
+
next = next.replace(/[.]+$/u, "");
|
|
84
|
+
return next;
|
|
85
|
+
}
|
|
86
|
+
function extractRawPathReferences(references) {
|
|
87
|
+
const rawReferences = [];
|
|
88
|
+
const absolutePattern = /(?:[A-Za-z]:[\\/]|\/)[^\s"'`<>()\[\]{},;]+/gu;
|
|
89
|
+
const relativePattern = /(?:\.{1,2}[\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;
|
|
90
|
+
for (const reference of references) {
|
|
91
|
+
const seenInField = /* @__PURE__ */ new Set();
|
|
92
|
+
for (const pattern of [absolutePattern, relativePattern]) {
|
|
93
|
+
pattern.lastIndex = 0;
|
|
94
|
+
for (const match of reference.value.matchAll(pattern)) {
|
|
95
|
+
const token = cleanupPathToken(match[0] ?? "");
|
|
96
|
+
if (!token || seenInField.has(token)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
seenInField.add(token);
|
|
100
|
+
rawReferences.push({ field: reference.field, value: token });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return rawReferences;
|
|
105
|
+
}
|
|
106
|
+
async function resolveDiscoveredFile(rawPath, projectRoot) {
|
|
107
|
+
const absolutePath = path.isAbsolute(rawPath) ? path.resolve(rawPath) : path.resolve(projectRoot, rawPath);
|
|
108
|
+
let stats;
|
|
109
|
+
try {
|
|
110
|
+
stats = await fs.stat(absolutePath);
|
|
111
|
+
} catch {
|
|
112
|
+
return void 0;
|
|
113
|
+
}
|
|
114
|
+
if (!stats.isFile()) {
|
|
115
|
+
return void 0;
|
|
116
|
+
}
|
|
117
|
+
const [canonicalProjectRoot, canonicalAbsolutePath] = await Promise.all([
|
|
118
|
+
realpathForContainment(projectRoot),
|
|
119
|
+
realpathForContainment(absolutePath)
|
|
120
|
+
]);
|
|
121
|
+
if (isPathWithinDirectory(canonicalProjectRoot, canonicalAbsolutePath)) {
|
|
122
|
+
const relativePath = path.relative(canonicalProjectRoot, canonicalAbsolutePath);
|
|
123
|
+
if (!relativePath || relativePath.startsWith("..") || path.isAbsolute(relativePath)) {
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
path: normalizeCandidatePathForOutput(relativePath),
|
|
128
|
+
scope: "project"
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
path: normalizeCandidatePathForOutput(absolutePath),
|
|
133
|
+
scope: "global"
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async function discoverReferencedFiles(document, projectRoot) {
|
|
137
|
+
const existingResolvedKeys = new Set((document.metadata.files ?? []).map((entry) => linkedFileResolvedKey(entry, projectRoot)));
|
|
138
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
139
|
+
const rawReferences = extractRawPathReferences(collectItemTextReferences(document));
|
|
140
|
+
for (const reference of rawReferences) {
|
|
141
|
+
const resolved = await resolveDiscoveredFile(reference.value, projectRoot);
|
|
142
|
+
if (!resolved) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const key = linkedFileResolvedKey(resolved, projectRoot);
|
|
146
|
+
const existing = grouped.get(key) ?? {
|
|
147
|
+
path: resolved.path,
|
|
148
|
+
scope: resolved.scope,
|
|
149
|
+
sourceFields: /* @__PURE__ */ new Set(),
|
|
150
|
+
originalPaths: /* @__PURE__ */ new Set(),
|
|
151
|
+
sourceCount: 0
|
|
152
|
+
};
|
|
153
|
+
existing.sourceFields.add(reference.field);
|
|
154
|
+
existing.originalPaths.add(reference.value);
|
|
155
|
+
existing.sourceCount += 1;
|
|
156
|
+
grouped.set(key, existing);
|
|
157
|
+
}
|
|
158
|
+
return [...grouped.entries()].map(([key, entry]) => ({
|
|
159
|
+
path: entry.path,
|
|
160
|
+
scope: entry.scope,
|
|
161
|
+
status: existingResolvedKeys.has(key) ? "already_linked" : "addable",
|
|
162
|
+
source_count: entry.sourceCount,
|
|
163
|
+
source_fields: [...entry.sourceFields].sort((left, right) => left.localeCompare(right)),
|
|
164
|
+
original_paths: [...entry.originalPaths].sort((left, right) => left.localeCompare(right))
|
|
165
|
+
})).sort((left, right) => {
|
|
166
|
+
const byStatus = left.status.localeCompare(right.status);
|
|
167
|
+
if (byStatus !== 0)
|
|
168
|
+
return byStatus;
|
|
169
|
+
const byPath = left.path.localeCompare(right.path);
|
|
170
|
+
if (byPath !== 0)
|
|
171
|
+
return byPath;
|
|
172
|
+
return left.scope.localeCompare(right.scope);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async function runFiles(id, options, global) {
|
|
176
|
+
const result = await runLinkedArtifacts(id, options, global, {
|
|
177
|
+
metadataKey: "files",
|
|
178
|
+
op: "files_add",
|
|
179
|
+
bareNoun: "file",
|
|
180
|
+
supportsAppendStable: true
|
|
181
|
+
});
|
|
182
|
+
return renameArtifactsResultKey(result, "files");
|
|
183
|
+
}
|
|
184
|
+
async function runFilesDiscover(id, options, global) {
|
|
185
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
186
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
187
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
188
|
+
}
|
|
189
|
+
const settings = await readSettings(pmRoot);
|
|
190
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
191
|
+
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
192
|
+
if (!located) {
|
|
193
|
+
throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);
|
|
194
|
+
}
|
|
195
|
+
const loaded = await readLocatedItem(located, { schema: settings.schema });
|
|
196
|
+
const candidates = await discoverReferencedFiles(loaded.document, process.cwd());
|
|
197
|
+
const addableCandidates = candidates.filter((candidate) => candidate.status === "addable");
|
|
198
|
+
const skippedExisting = candidates.filter((candidate) => candidate.status === "already_linked");
|
|
199
|
+
const requestedApply = options.apply === true;
|
|
200
|
+
const note = options.note?.trim() || "discovered from item text";
|
|
201
|
+
if (!requestedApply || addableCandidates.length === 0) {
|
|
202
|
+
const files2 = loaded.document.metadata.files ?? [];
|
|
203
|
+
return {
|
|
204
|
+
id: located.id,
|
|
205
|
+
files: files2,
|
|
206
|
+
changed: false,
|
|
207
|
+
apply: requestedApply,
|
|
208
|
+
count: files2.length,
|
|
209
|
+
candidate_count: candidates.length,
|
|
210
|
+
addable_count: addableCandidates.length,
|
|
211
|
+
added_count: 0,
|
|
212
|
+
skipped_existing_count: skippedExisting.length,
|
|
213
|
+
candidates,
|
|
214
|
+
added: [],
|
|
215
|
+
skipped_existing: skippedExisting
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const author = resolveAuthor(options.author, settings.author_default);
|
|
219
|
+
const discoveredAdds = addableCandidates.map((candidate) => ({
|
|
220
|
+
path: candidate.path,
|
|
221
|
+
scope: candidate.scope,
|
|
222
|
+
note
|
|
223
|
+
}));
|
|
224
|
+
const result = await mutateItem({
|
|
225
|
+
pmRoot,
|
|
226
|
+
settings,
|
|
227
|
+
id,
|
|
228
|
+
op: "files_discover",
|
|
229
|
+
author,
|
|
230
|
+
message: options.message ?? "Discover referenced file links",
|
|
231
|
+
force: options.force,
|
|
232
|
+
mutate(document) {
|
|
233
|
+
const next = [...document.metadata.files ?? []];
|
|
234
|
+
const existingResolvedKeys = new Set(next.map((entry) => linkedFileResolvedKey(entry, process.cwd())));
|
|
235
|
+
const appliedAdds = [];
|
|
236
|
+
for (const add of discoveredAdds) {
|
|
237
|
+
const resolvedKey = linkedFileResolvedKey(add, process.cwd());
|
|
238
|
+
if (existingResolvedKeys.has(resolvedKey)) {
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
next.push(add);
|
|
242
|
+
existingResolvedKeys.add(resolvedKey);
|
|
243
|
+
appliedAdds.push(add);
|
|
244
|
+
}
|
|
245
|
+
const deduped = dedupeLinkedArtifacts(next);
|
|
246
|
+
const normalized = options.appendStable ? deduped : sortLinkedArtifacts(deduped);
|
|
247
|
+
if (normalized.length > 0) {
|
|
248
|
+
document.metadata.files = normalized;
|
|
249
|
+
} else {
|
|
250
|
+
delete document.metadata.files;
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
changedFields: appliedAdds.length > 0 ? ["files"] : [],
|
|
254
|
+
warnings: appliedAdds.length !== discoveredAdds.length ? [`files_discover_skipped_existing:${discoveredAdds.length - appliedAdds.length}`] : []
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
const files = result.item.files ?? [];
|
|
259
|
+
const addedResolvedKeys = new Set(discoveredAdds.map((entry) => linkedFileResolvedKey(entry, process.cwd())));
|
|
260
|
+
const added = files.filter((entry) => addedResolvedKeys.has(linkedFileResolvedKey(entry, process.cwd())));
|
|
261
|
+
return {
|
|
262
|
+
id: result.item.id,
|
|
263
|
+
files,
|
|
264
|
+
changed: added.length > 0,
|
|
265
|
+
apply: true,
|
|
266
|
+
count: files.length,
|
|
267
|
+
candidate_count: candidates.length,
|
|
268
|
+
addable_count: addableCandidates.length,
|
|
269
|
+
added_count: added.length,
|
|
270
|
+
skipped_existing_count: skippedExisting.length,
|
|
271
|
+
candidates,
|
|
272
|
+
added,
|
|
273
|
+
skipped_existing: skippedExisting
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
export {
|
|
277
|
+
runFiles,
|
|
278
|
+
runFilesDiscover
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=files-ISZJGILQ.js.map
|
|
281
|
+
|
|
282
|
+
//# debugId=2fdc8a3e-c4aa-531a-bd76-1570005b876f
|