@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,314 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createCheckpointId,
|
|
3
|
+
loadMutationCheckpoint,
|
|
4
|
+
restoreCheckpointItems,
|
|
5
|
+
writeMutationCheckpoint
|
|
6
|
+
} from "./chunk-XSJCLN2R.js";
|
|
7
|
+
import {
|
|
8
|
+
runRestore
|
|
9
|
+
} from "./chunk-6ER6DXH5.js";
|
|
10
|
+
import {
|
|
11
|
+
resolveAuthor
|
|
12
|
+
} from "./chunk-O7IWB35H.js";
|
|
13
|
+
import "./chunk-PRJCELV4.js";
|
|
14
|
+
import "./chunk-UM2GBHS4.js";
|
|
15
|
+
import {
|
|
16
|
+
runClose
|
|
17
|
+
} from "./chunk-GU2ZJ2VV.js";
|
|
18
|
+
import {
|
|
19
|
+
runList
|
|
20
|
+
} from "./chunk-Q7SPNHLW.js";
|
|
21
|
+
import "./chunk-I6BNFU5X.js";
|
|
22
|
+
import "./chunk-WKY2IBOQ.js";
|
|
23
|
+
import "./chunk-EAOG77HM.js";
|
|
24
|
+
import {
|
|
25
|
+
listAllFrontMatterLight
|
|
26
|
+
} from "./chunk-XTGLRY2Y.js";
|
|
27
|
+
import "./chunk-T3LC5LKB.js";
|
|
28
|
+
import {
|
|
29
|
+
isTerminalStatus
|
|
30
|
+
} from "./chunk-AO442XLN.js";
|
|
31
|
+
import {
|
|
32
|
+
resolveItemTypeRegistry
|
|
33
|
+
} from "./chunk-KJE2FOS4.js";
|
|
34
|
+
import {
|
|
35
|
+
nowIso
|
|
36
|
+
} from "./chunk-QO7EBBOM.js";
|
|
37
|
+
import {
|
|
38
|
+
EXIT_CODE,
|
|
39
|
+
PmCliError,
|
|
40
|
+
getActiveExtensionRegistrations,
|
|
41
|
+
getSettingsPath,
|
|
42
|
+
pathExists,
|
|
43
|
+
readSettings,
|
|
44
|
+
resolvePmRoot,
|
|
45
|
+
resolveRuntimeStatusRegistry,
|
|
46
|
+
toErrorMessage
|
|
47
|
+
} from "./chunk-U5SXYXSY.js";
|
|
48
|
+
|
|
49
|
+
// dist/cli/commands/close-many.js
|
|
50
|
+
!(function() {
|
|
51
|
+
try {
|
|
52
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
53
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2fb69034-d900-5001-9f90-1b7f17b609bc");
|
|
54
|
+
} catch (e2) {
|
|
55
|
+
}
|
|
56
|
+
})();
|
|
57
|
+
var CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
58
|
+
var CLOSE_MANY_CHECKPOINT_SUBDIR = "close-many";
|
|
59
|
+
var CLOSE_MANY_FILTER_GUIDANCE = [
|
|
60
|
+
"--filter-status",
|
|
61
|
+
"--filter-type",
|
|
62
|
+
"--filter-tag",
|
|
63
|
+
"--filter-priority",
|
|
64
|
+
"--filter-sprint",
|
|
65
|
+
"--filter-release",
|
|
66
|
+
"--filter-parent",
|
|
67
|
+
"--filter-assignee",
|
|
68
|
+
"--filter-updated-before",
|
|
69
|
+
"--ids"
|
|
70
|
+
].join(", ");
|
|
71
|
+
function hasCloseManyFilters(list, status) {
|
|
72
|
+
const isActive = (value) => value != null && (typeof value !== "string" || value.split(",").some((entry) => entry.trim().length > 0));
|
|
73
|
+
return isActive(status) || isActive(list?.status) || isActive(list?.type) || isActive(list?.tag) || isActive(list?.priority) || isActive(list?.deadlineBefore) || isActive(list?.deadlineAfter) || isActive(list?.updatedAfter) || isActive(list?.updatedBefore) || isActive(list?.createdAfter) || isActive(list?.createdBefore) || isActive(list?.ids) || isActive(list?.assignee) || isActive(list?.assigneeFilter) || isActive(list?.parent) || isActive(list?.sprint) || isActive(list?.release);
|
|
74
|
+
}
|
|
75
|
+
function hasCloseManyRollbackConflicts(list, status) {
|
|
76
|
+
return hasCloseManyFilters(list, status) || list?.limit != null && String(list.limit).trim().length > 0 || list?.offset != null && String(list.offset).trim().length > 0;
|
|
77
|
+
}
|
|
78
|
+
function rejectBlankIdsFilter(list) {
|
|
79
|
+
if (list?.ids != null && String(list.ids).trim().length === 0) {
|
|
80
|
+
throw new PmCliError("--ids requires at least one non-empty item ID", EXIT_CODE.USAGE);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function activeListOptions(list) {
|
|
84
|
+
const active = {};
|
|
85
|
+
if (!list) {
|
|
86
|
+
return active;
|
|
87
|
+
}
|
|
88
|
+
for (const [key, value] of Object.entries(list)) {
|
|
89
|
+
if (value == null || typeof value === "string" && !value.split(",").some((entry) => entry.trim().length > 0)) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
active[key] = value;
|
|
93
|
+
}
|
|
94
|
+
return active;
|
|
95
|
+
}
|
|
96
|
+
function ensureReason(reason) {
|
|
97
|
+
const trimmed = String(reason ?? "").trim();
|
|
98
|
+
if (trimmed.length === 0) {
|
|
99
|
+
throw new PmCliError("pm close-many requires a shared close reason via --reason. Close mutations are auditable.", EXIT_CODE.USAGE, {
|
|
100
|
+
code: "missing_required_argument",
|
|
101
|
+
examples: [
|
|
102
|
+
'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met"',
|
|
103
|
+
'pm close-many --ids pm-a,pm-b --reason "Superseded by redesign"'
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return trimmed;
|
|
108
|
+
}
|
|
109
|
+
async function buildActiveChildrenByParent(pmRoot, settings) {
|
|
110
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
111
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
112
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
|
|
113
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
114
|
+
const parentByChild = /* @__PURE__ */ new Map();
|
|
115
|
+
for (const item of items) {
|
|
116
|
+
if (typeof item.parent !== "string" || item.parent.length === 0) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
parentByChild.set(item.id, item.parent);
|
|
120
|
+
if (isTerminalStatus(item.status, statusRegistry)) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const existing = childrenByParent.get(item.parent);
|
|
124
|
+
if (existing) {
|
|
125
|
+
existing.push(item.id);
|
|
126
|
+
} else {
|
|
127
|
+
childrenByParent.set(item.parent, [item.id]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for (const ids of childrenByParent.values()) {
|
|
131
|
+
ids.sort((left, right) => left.localeCompare(right));
|
|
132
|
+
}
|
|
133
|
+
return { childrenByParent, parentByChild };
|
|
134
|
+
}
|
|
135
|
+
function hierarchyDepth(id, parentByChild, cache) {
|
|
136
|
+
const cached = cache?.get(id);
|
|
137
|
+
if (cached !== void 0) {
|
|
138
|
+
return cached;
|
|
139
|
+
}
|
|
140
|
+
let depth = 0;
|
|
141
|
+
let current = parentByChild.get(id);
|
|
142
|
+
const path = [];
|
|
143
|
+
const visited = /* @__PURE__ */ new Set();
|
|
144
|
+
let hasCycle = false;
|
|
145
|
+
while (current !== void 0 && !visited.has(current)) {
|
|
146
|
+
const cachedCurrent = cache?.get(current);
|
|
147
|
+
if (cachedCurrent !== void 0) {
|
|
148
|
+
depth += cachedCurrent + 1;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
visited.add(current);
|
|
152
|
+
path.push(current);
|
|
153
|
+
depth += 1;
|
|
154
|
+
current = parentByChild.get(current);
|
|
155
|
+
}
|
|
156
|
+
if (current !== void 0 && visited.has(current)) {
|
|
157
|
+
hasCycle = true;
|
|
158
|
+
}
|
|
159
|
+
if (!hasCycle) {
|
|
160
|
+
cache?.set(id, depth);
|
|
161
|
+
for (const [index, ancestorId] of path.entries()) {
|
|
162
|
+
cache?.set(ancestorId, depth - index - 1);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return depth;
|
|
166
|
+
}
|
|
167
|
+
async function runCloseMany(options, global2) {
|
|
168
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
169
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
170
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
171
|
+
}
|
|
172
|
+
const settings = await readSettings(pmRoot);
|
|
173
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
174
|
+
const dryRun = options.dryRun === true;
|
|
175
|
+
const rollbackId = typeof options.rollback === "string" ? options.rollback : void 0;
|
|
176
|
+
rejectBlankIdsFilter(options.list);
|
|
177
|
+
if (rollbackId) {
|
|
178
|
+
if (dryRun) {
|
|
179
|
+
throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
|
|
180
|
+
}
|
|
181
|
+
if (hasCloseManyRollbackConflicts(options.list, options.status)) {
|
|
182
|
+
throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
|
|
183
|
+
}
|
|
184
|
+
const checkpoint = await loadMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, rollbackId, CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION);
|
|
185
|
+
const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;
|
|
186
|
+
const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) => runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global2));
|
|
187
|
+
return {
|
|
188
|
+
mode: "rollback",
|
|
189
|
+
matched_count: checkpoint.items.length,
|
|
190
|
+
dry_run: false,
|
|
191
|
+
rollback_checkpoint_id: checkpoint.id,
|
|
192
|
+
checkpoint: {
|
|
193
|
+
id: checkpoint.id,
|
|
194
|
+
created_at: checkpoint.created_at,
|
|
195
|
+
path: checkpoint.path,
|
|
196
|
+
rollback_command: `pm close-many --rollback ${checkpoint.id}`
|
|
197
|
+
},
|
|
198
|
+
restored_count: rollback.restored_ids.length,
|
|
199
|
+
failed_count: rollback.failed_count,
|
|
200
|
+
rows: rollback.rows,
|
|
201
|
+
ids: rollback.restored_ids
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
if (!hasCloseManyFilters(options.list, options.status)) {
|
|
205
|
+
throw new PmCliError(`close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`, EXIT_CODE.USAGE);
|
|
206
|
+
}
|
|
207
|
+
const reason = ensureReason(options.reason);
|
|
208
|
+
const validateCloseMode = options.validateClose;
|
|
209
|
+
const force = options.force === true;
|
|
210
|
+
const listOptions = activeListOptions(options.list);
|
|
211
|
+
const listed = await runList(options.status, listOptions, global2);
|
|
212
|
+
const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);
|
|
213
|
+
const depthCache = /* @__PURE__ */ new Map();
|
|
214
|
+
const matched = [...listed.items].sort((left, right) => {
|
|
215
|
+
const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);
|
|
216
|
+
return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);
|
|
217
|
+
});
|
|
218
|
+
const closePlannedIds = new Set(matched.filter((item) => force || !isTerminalStatus(item.status, statusRegistry)).map((item) => item.id));
|
|
219
|
+
const planRows = matched.map((item) => {
|
|
220
|
+
const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);
|
|
221
|
+
const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));
|
|
222
|
+
const willSkip = alreadyTerminal && !force;
|
|
223
|
+
return {
|
|
224
|
+
id: item.id,
|
|
225
|
+
title: typeof item.title === "string" ? item.title : "",
|
|
226
|
+
status: item.status,
|
|
227
|
+
action: willSkip ? "skip" : "close",
|
|
228
|
+
...willSkip ? { skip_reason: "already_terminal" } : {},
|
|
229
|
+
...activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
if (dryRun) {
|
|
233
|
+
return {
|
|
234
|
+
mode: "dry_run",
|
|
235
|
+
matched_count: matched.length,
|
|
236
|
+
dry_run: true,
|
|
237
|
+
reason,
|
|
238
|
+
filters: listed.filters,
|
|
239
|
+
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
240
|
+
item_plans: planRows,
|
|
241
|
+
ids: []
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
const closableIds = new Set(planRows.filter((row) => row.action === "close").map((row) => row.id));
|
|
245
|
+
const nowValue = nowIso();
|
|
246
|
+
const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);
|
|
247
|
+
const checkpointEnabled = options.checkpoint !== false;
|
|
248
|
+
let checkpointInfo;
|
|
249
|
+
if (checkpointEnabled && closableIds.size > 0) {
|
|
250
|
+
const checkpointItems = matched.filter((item) => closableIds.has(item.id)).map((item) => ({ id: item.id, target_updated_at: item.updated_at }));
|
|
251
|
+
const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {
|
|
252
|
+
schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,
|
|
253
|
+
id: checkpointId,
|
|
254
|
+
created_at: nowValue,
|
|
255
|
+
author: resolveAuthor(options.author, "unknown"),
|
|
256
|
+
reason,
|
|
257
|
+
filters: listed.filters,
|
|
258
|
+
items: checkpointItems
|
|
259
|
+
});
|
|
260
|
+
checkpointInfo = {
|
|
261
|
+
id: checkpointId,
|
|
262
|
+
created_at: nowValue,
|
|
263
|
+
path: checkpointPath,
|
|
264
|
+
rollback_command: `pm close-many --rollback ${checkpointId}`
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const closeOptions = {
|
|
268
|
+
author: options.author,
|
|
269
|
+
message: options.message ?? `close-many apply ${checkpointId}`,
|
|
270
|
+
validateClose: validateCloseMode,
|
|
271
|
+
force,
|
|
272
|
+
resolution: options.resolution,
|
|
273
|
+
expectedResult: options.expectedResult,
|
|
274
|
+
actualResult: options.actualResult
|
|
275
|
+
};
|
|
276
|
+
const rows = [];
|
|
277
|
+
const closedIds = [];
|
|
278
|
+
for (const item of matched) {
|
|
279
|
+
if (!closableIds.has(item.id)) {
|
|
280
|
+
rows.push({ id: item.id, status: "skipped", skip_reason: "already_terminal" });
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
try {
|
|
284
|
+
const result = await runClose(item.id, reason, closeOptions, global2);
|
|
285
|
+
rows.push({
|
|
286
|
+
id: item.id,
|
|
287
|
+
status: "closed",
|
|
288
|
+
changed_fields: result.changed_fields,
|
|
289
|
+
...result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}
|
|
290
|
+
});
|
|
291
|
+
closedIds.push(item.id);
|
|
292
|
+
} catch (error) {
|
|
293
|
+
rows.push({ id: item.id, status: "failed", error: toErrorMessage(error) });
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
mode: "apply",
|
|
298
|
+
matched_count: matched.length,
|
|
299
|
+
dry_run: false,
|
|
300
|
+
reason,
|
|
301
|
+
filters: listed.filters,
|
|
302
|
+
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
303
|
+
...checkpointInfo ? { checkpoint: checkpointInfo } : {},
|
|
304
|
+
closed_count: rows.filter((row) => row.status === "closed").length,
|
|
305
|
+
skipped_count: rows.filter((row) => row.status === "skipped").length,
|
|
306
|
+
failed_count: rows.filter((row) => row.status === "failed").length,
|
|
307
|
+
rows,
|
|
308
|
+
ids: closedIds
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
export {
|
|
312
|
+
runCloseMany
|
|
313
|
+
};
|
|
314
|
+
//# sourceMappingURL=close-many-7CGIDPTJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/close-many.ts"],
|
|
4
|
+
"sourcesContent": ["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.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 { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.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 { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n const isActive = (value: unknown): boolean =>\n value != null && (typeof value !== \"string\" || value.split(\",\").some((entry) => entry.trim().length > 0));\n return (\n isActive(status) ||\n isActive(list?.status) ||\n isActive(list?.type) ||\n isActive(list?.tag) ||\n isActive(list?.priority) ||\n isActive(list?.deadlineBefore) ||\n isActive(list?.deadlineAfter) ||\n isActive(list?.updatedAfter) ||\n isActive(list?.updatedBefore) ||\n isActive(list?.createdAfter) ||\n isActive(list?.createdBefore) ||\n isActive(list?.ids) ||\n isActive(list?.assignee) ||\n isActive(list?.assigneeFilter) ||\n isActive(list?.parent) ||\n isActive(list?.sprint) ||\n isActive(list?.release)\n );\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return (\n hasCloseManyFilters(list, status) ||\n (list?.limit != null && String(list.limit).trim().length > 0) ||\n (list?.offset != null && String(list.offset).trim().length > 0)\n );\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction ensureReason(reason: unknown): string {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length === 0) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason. Close mutations are auditable.\",\n EXIT_CODE.USAGE,\n {\n code: \"missing_required_argument\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n },\n );\n }\n return trimmed;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\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 settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n const checkpoint = await loadMutationCheckpoint(\n pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = ensureReason(options.reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows: CloseManyPlanRow[] = matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n reason,\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: checkpointId,\n created_at: nowValue,\n author: resolveAuthor(options.author, \"unknown\"),\n reason,\n filters: listed.filters,\n items: checkpointItems,\n });\n checkpointInfo = {\n id: checkpointId,\n created_at: nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${checkpointId}`,\n };\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of matched) {\n if (!closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, reason, closeOptions, global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n reason,\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
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]="962ecda8-e91c-5375-bcff-db5afb2e4bc7")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
createCheckpointId,
|
|
5
|
+
loadMutationCheckpoint,
|
|
6
|
+
restoreCheckpointItems,
|
|
7
|
+
writeMutationCheckpoint
|
|
8
|
+
} from "./chunk-2HVRUSQA.js";
|
|
9
|
+
import {
|
|
10
|
+
runRestore
|
|
11
|
+
} from "./chunk-2VVCGBNV.js";
|
|
12
|
+
import {
|
|
13
|
+
resolveAuthor
|
|
14
|
+
} from "./chunk-J27KIHTG.js";
|
|
15
|
+
import "./chunk-2RSPZI5H.js";
|
|
16
|
+
import "./chunk-GXSUPCBV.js";
|
|
17
|
+
import {
|
|
18
|
+
runClose
|
|
19
|
+
} from "./chunk-FRAUKRU2.js";
|
|
20
|
+
import {
|
|
21
|
+
runList
|
|
22
|
+
} from "./chunk-W7XABV4H.js";
|
|
23
|
+
import "./chunk-GCOQW437.js";
|
|
24
|
+
import "./chunk-3VAM3NNM.js";
|
|
25
|
+
import "./chunk-XSLQSXAH.js";
|
|
26
|
+
import {
|
|
27
|
+
listAllFrontMatterLight
|
|
28
|
+
} from "./chunk-GGYWB3Y2.js";
|
|
29
|
+
import "./chunk-HZGUAH22.js";
|
|
30
|
+
import {
|
|
31
|
+
isTerminalStatus
|
|
32
|
+
} from "./chunk-LB3RUL2N.js";
|
|
33
|
+
import {
|
|
34
|
+
resolveItemTypeRegistry
|
|
35
|
+
} from "./chunk-2VBQ6ZXS.js";
|
|
36
|
+
import {
|
|
37
|
+
nowIso
|
|
38
|
+
} from "./chunk-TCD3R2PF.js";
|
|
39
|
+
import {
|
|
40
|
+
EXIT_CODE,
|
|
41
|
+
PmCliError,
|
|
42
|
+
getActiveExtensionRegistrations,
|
|
43
|
+
getSettingsPath,
|
|
44
|
+
pathExists,
|
|
45
|
+
readSettings,
|
|
46
|
+
resolvePmRoot,
|
|
47
|
+
resolveRuntimeStatusRegistry,
|
|
48
|
+
toErrorMessage
|
|
49
|
+
} from "./chunk-5SFCOO6B.js";
|
|
50
|
+
|
|
51
|
+
// dist/cli/commands/close-many.js
|
|
52
|
+
var CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
53
|
+
var CLOSE_MANY_CHECKPOINT_SUBDIR = "close-many";
|
|
54
|
+
var CLOSE_MANY_FILTER_GUIDANCE = [
|
|
55
|
+
"--filter-status",
|
|
56
|
+
"--filter-type",
|
|
57
|
+
"--filter-tag",
|
|
58
|
+
"--filter-priority",
|
|
59
|
+
"--filter-sprint",
|
|
60
|
+
"--filter-release",
|
|
61
|
+
"--filter-parent",
|
|
62
|
+
"--filter-assignee",
|
|
63
|
+
"--filter-updated-before",
|
|
64
|
+
"--ids"
|
|
65
|
+
].join(", ");
|
|
66
|
+
function hasCloseManyFilters(list, status) {
|
|
67
|
+
const isActive = (value) => value != null && (typeof value !== "string" || value.split(",").some((entry) => entry.trim().length > 0));
|
|
68
|
+
return isActive(status) || isActive(list?.status) || isActive(list?.type) || isActive(list?.tag) || isActive(list?.priority) || isActive(list?.deadlineBefore) || isActive(list?.deadlineAfter) || isActive(list?.updatedAfter) || isActive(list?.updatedBefore) || isActive(list?.createdAfter) || isActive(list?.createdBefore) || isActive(list?.ids) || isActive(list?.assignee) || isActive(list?.assigneeFilter) || isActive(list?.parent) || isActive(list?.sprint) || isActive(list?.release);
|
|
69
|
+
}
|
|
70
|
+
function hasCloseManyRollbackConflicts(list, status) {
|
|
71
|
+
return hasCloseManyFilters(list, status) || list?.limit != null && String(list.limit).trim().length > 0 || list?.offset != null && String(list.offset).trim().length > 0;
|
|
72
|
+
}
|
|
73
|
+
function rejectBlankIdsFilter(list) {
|
|
74
|
+
if (list?.ids != null && String(list.ids).trim().length === 0) {
|
|
75
|
+
throw new PmCliError("--ids requires at least one non-empty item ID", EXIT_CODE.USAGE);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function activeListOptions(list) {
|
|
79
|
+
const active = {};
|
|
80
|
+
if (!list) {
|
|
81
|
+
return active;
|
|
82
|
+
}
|
|
83
|
+
for (const [key, value] of Object.entries(list)) {
|
|
84
|
+
if (value == null || typeof value === "string" && !value.split(",").some((entry) => entry.trim().length > 0)) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
active[key] = value;
|
|
88
|
+
}
|
|
89
|
+
return active;
|
|
90
|
+
}
|
|
91
|
+
function ensureReason(reason) {
|
|
92
|
+
const trimmed = String(reason ?? "").trim();
|
|
93
|
+
if (trimmed.length === 0) {
|
|
94
|
+
throw new PmCliError("pm close-many requires a shared close reason via --reason. Close mutations are auditable.", EXIT_CODE.USAGE, {
|
|
95
|
+
code: "missing_required_argument",
|
|
96
|
+
examples: [
|
|
97
|
+
'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met"',
|
|
98
|
+
'pm close-many --ids pm-a,pm-b --reason "Superseded by redesign"'
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return trimmed;
|
|
103
|
+
}
|
|
104
|
+
async function buildActiveChildrenByParent(pmRoot, settings) {
|
|
105
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
106
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
107
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
|
|
108
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
109
|
+
const parentByChild = /* @__PURE__ */ new Map();
|
|
110
|
+
for (const item of items) {
|
|
111
|
+
if (typeof item.parent !== "string" || item.parent.length === 0) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
parentByChild.set(item.id, item.parent);
|
|
115
|
+
if (isTerminalStatus(item.status, statusRegistry)) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
const existing = childrenByParent.get(item.parent);
|
|
119
|
+
if (existing) {
|
|
120
|
+
existing.push(item.id);
|
|
121
|
+
} else {
|
|
122
|
+
childrenByParent.set(item.parent, [item.id]);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
for (const ids of childrenByParent.values()) {
|
|
126
|
+
ids.sort((left, right) => left.localeCompare(right));
|
|
127
|
+
}
|
|
128
|
+
return { childrenByParent, parentByChild };
|
|
129
|
+
}
|
|
130
|
+
function hierarchyDepth(id, parentByChild, cache) {
|
|
131
|
+
const cached = cache?.get(id);
|
|
132
|
+
if (cached !== void 0) {
|
|
133
|
+
return cached;
|
|
134
|
+
}
|
|
135
|
+
let depth = 0;
|
|
136
|
+
let current = parentByChild.get(id);
|
|
137
|
+
const path = [];
|
|
138
|
+
const visited = /* @__PURE__ */ new Set();
|
|
139
|
+
let hasCycle = false;
|
|
140
|
+
while (current !== void 0 && !visited.has(current)) {
|
|
141
|
+
const cachedCurrent = cache?.get(current);
|
|
142
|
+
if (cachedCurrent !== void 0) {
|
|
143
|
+
depth += cachedCurrent + 1;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
visited.add(current);
|
|
147
|
+
path.push(current);
|
|
148
|
+
depth += 1;
|
|
149
|
+
current = parentByChild.get(current);
|
|
150
|
+
}
|
|
151
|
+
if (current !== void 0 && visited.has(current)) {
|
|
152
|
+
hasCycle = true;
|
|
153
|
+
}
|
|
154
|
+
if (!hasCycle) {
|
|
155
|
+
cache?.set(id, depth);
|
|
156
|
+
for (const [index, ancestorId] of path.entries()) {
|
|
157
|
+
cache?.set(ancestorId, depth - index - 1);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return depth;
|
|
161
|
+
}
|
|
162
|
+
async function runCloseMany(options, global) {
|
|
163
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
164
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
165
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
166
|
+
}
|
|
167
|
+
const settings = await readSettings(pmRoot);
|
|
168
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
169
|
+
const dryRun = options.dryRun === true;
|
|
170
|
+
const rollbackId = typeof options.rollback === "string" ? options.rollback : void 0;
|
|
171
|
+
rejectBlankIdsFilter(options.list);
|
|
172
|
+
if (rollbackId) {
|
|
173
|
+
if (dryRun) {
|
|
174
|
+
throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
|
|
175
|
+
}
|
|
176
|
+
if (hasCloseManyRollbackConflicts(options.list, options.status)) {
|
|
177
|
+
throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
|
|
178
|
+
}
|
|
179
|
+
const checkpoint = await loadMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, rollbackId, CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION);
|
|
180
|
+
const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;
|
|
181
|
+
const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) => runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global));
|
|
182
|
+
return {
|
|
183
|
+
mode: "rollback",
|
|
184
|
+
matched_count: checkpoint.items.length,
|
|
185
|
+
dry_run: false,
|
|
186
|
+
rollback_checkpoint_id: checkpoint.id,
|
|
187
|
+
checkpoint: {
|
|
188
|
+
id: checkpoint.id,
|
|
189
|
+
created_at: checkpoint.created_at,
|
|
190
|
+
path: checkpoint.path,
|
|
191
|
+
rollback_command: `pm close-many --rollback ${checkpoint.id}`
|
|
192
|
+
},
|
|
193
|
+
restored_count: rollback.restored_ids.length,
|
|
194
|
+
failed_count: rollback.failed_count,
|
|
195
|
+
rows: rollback.rows,
|
|
196
|
+
ids: rollback.restored_ids
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (!hasCloseManyFilters(options.list, options.status)) {
|
|
200
|
+
throw new PmCliError(`close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`, EXIT_CODE.USAGE);
|
|
201
|
+
}
|
|
202
|
+
const reason = ensureReason(options.reason);
|
|
203
|
+
const validateCloseMode = options.validateClose;
|
|
204
|
+
const force = options.force === true;
|
|
205
|
+
const listOptions = activeListOptions(options.list);
|
|
206
|
+
const listed = await runList(options.status, listOptions, global);
|
|
207
|
+
const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);
|
|
208
|
+
const depthCache = /* @__PURE__ */ new Map();
|
|
209
|
+
const matched = [...listed.items].sort((left, right) => {
|
|
210
|
+
const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);
|
|
211
|
+
return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);
|
|
212
|
+
});
|
|
213
|
+
const closePlannedIds = new Set(matched.filter((item) => force || !isTerminalStatus(item.status, statusRegistry)).map((item) => item.id));
|
|
214
|
+
const planRows = matched.map((item) => {
|
|
215
|
+
const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);
|
|
216
|
+
const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));
|
|
217
|
+
const willSkip = alreadyTerminal && !force;
|
|
218
|
+
return {
|
|
219
|
+
id: item.id,
|
|
220
|
+
title: typeof item.title === "string" ? item.title : "",
|
|
221
|
+
status: item.status,
|
|
222
|
+
action: willSkip ? "skip" : "close",
|
|
223
|
+
...willSkip ? { skip_reason: "already_terminal" } : {},
|
|
224
|
+
...activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
if (dryRun) {
|
|
228
|
+
return {
|
|
229
|
+
mode: "dry_run",
|
|
230
|
+
matched_count: matched.length,
|
|
231
|
+
dry_run: true,
|
|
232
|
+
reason,
|
|
233
|
+
filters: listed.filters,
|
|
234
|
+
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
235
|
+
item_plans: planRows,
|
|
236
|
+
ids: []
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const closableIds = new Set(planRows.filter((row) => row.action === "close").map((row) => row.id));
|
|
240
|
+
const nowValue = nowIso();
|
|
241
|
+
const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);
|
|
242
|
+
const checkpointEnabled = options.checkpoint !== false;
|
|
243
|
+
let checkpointInfo;
|
|
244
|
+
if (checkpointEnabled && closableIds.size > 0) {
|
|
245
|
+
const checkpointItems = matched.filter((item) => closableIds.has(item.id)).map((item) => ({ id: item.id, target_updated_at: item.updated_at }));
|
|
246
|
+
const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {
|
|
247
|
+
schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,
|
|
248
|
+
id: checkpointId,
|
|
249
|
+
created_at: nowValue,
|
|
250
|
+
author: resolveAuthor(options.author, "unknown"),
|
|
251
|
+
reason,
|
|
252
|
+
filters: listed.filters,
|
|
253
|
+
items: checkpointItems
|
|
254
|
+
});
|
|
255
|
+
checkpointInfo = {
|
|
256
|
+
id: checkpointId,
|
|
257
|
+
created_at: nowValue,
|
|
258
|
+
path: checkpointPath,
|
|
259
|
+
rollback_command: `pm close-many --rollback ${checkpointId}`
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const closeOptions = {
|
|
263
|
+
author: options.author,
|
|
264
|
+
message: options.message ?? `close-many apply ${checkpointId}`,
|
|
265
|
+
validateClose: validateCloseMode,
|
|
266
|
+
force,
|
|
267
|
+
resolution: options.resolution,
|
|
268
|
+
expectedResult: options.expectedResult,
|
|
269
|
+
actualResult: options.actualResult
|
|
270
|
+
};
|
|
271
|
+
const rows = [];
|
|
272
|
+
const closedIds = [];
|
|
273
|
+
for (const item of matched) {
|
|
274
|
+
if (!closableIds.has(item.id)) {
|
|
275
|
+
rows.push({ id: item.id, status: "skipped", skip_reason: "already_terminal" });
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
try {
|
|
279
|
+
const result = await runClose(item.id, reason, closeOptions, global);
|
|
280
|
+
rows.push({
|
|
281
|
+
id: item.id,
|
|
282
|
+
status: "closed",
|
|
283
|
+
changed_fields: result.changed_fields,
|
|
284
|
+
...result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}
|
|
285
|
+
});
|
|
286
|
+
closedIds.push(item.id);
|
|
287
|
+
} catch (error) {
|
|
288
|
+
rows.push({ id: item.id, status: "failed", error: toErrorMessage(error) });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
mode: "apply",
|
|
293
|
+
matched_count: matched.length,
|
|
294
|
+
dry_run: false,
|
|
295
|
+
reason,
|
|
296
|
+
filters: listed.filters,
|
|
297
|
+
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
298
|
+
...checkpointInfo ? { checkpoint: checkpointInfo } : {},
|
|
299
|
+
closed_count: rows.filter((row) => row.status === "closed").length,
|
|
300
|
+
skipped_count: rows.filter((row) => row.status === "skipped").length,
|
|
301
|
+
failed_count: rows.filter((row) => row.status === "failed").length,
|
|
302
|
+
rows,
|
|
303
|
+
ids: closedIds
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
export {
|
|
307
|
+
runCloseMany
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=close-many-ERFO6LHR.js.map
|
|
310
|
+
|
|
311
|
+
//# debugId=962ecda8-e91c-5375-bcff-db5afb2e4bc7
|