@unbrained/pm-cli 2026.5.30 → 2026.6.5
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 +152 -0
- 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 +96 -10
- 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 +241 -27
- 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 +191 -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 +109 -116
- 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/install-sources.d.ts +2 -0
- package/dist/cli/commands/extension/install-sources.js +11 -4
- package/dist/cli/commands/extension/install-sources.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/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +38 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.js +4 -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 +164 -48
- 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 +18 -0
- package/dist/cli/commands/search.js +56 -12
- package/dist/cli/commands/search.js.map +1 -1
- 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 +82 -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 +16 -12
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +217 -47
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +34 -25
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +8 -8
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +35 -5
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/search-refresh.d.ts +2 -0
- package/dist/cli/search-refresh.js +13 -0
- package/dist/cli/search-refresh.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js.map +7 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js +209 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +7 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js +72 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js.map +7 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js +761 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js +634 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js +1891 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js +185 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js +1681 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-BNL6S7QH.js} +28 -70
- package/dist/cli-bundle/chunks/chunk-BNL6S7QH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js +341 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js +349 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js +1714 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js +550 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js +383 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js +342 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -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-JB4RGL4V.js +185 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js +60 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js +221 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js +157 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.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-MISYRLEP.js +80 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js +457 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js +3040 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js +1861 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js +176 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js +233 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js +5705 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-TK633IVD.js} +51 -32
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js +189 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js +1385 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.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-XX5LRINW.js +90 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js +252 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js +3898 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js +132 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js.map +7 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js +103 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js +1688 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js +1471 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js.map +7 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js +1277 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js.map +7 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js +58 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js.map +7 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js +228 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js +34 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js +24 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js.map +7 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js +285 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +181 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +7 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js +197 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js +1261 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js.map +7 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js +196 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js +47 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js.map +7 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js +47 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js +1174 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-AG3XKXWL.js} +25 -18
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-RSMT6DPK.js} +160 -39
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-Q54JQZUN.js} +50 -32
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-YJKIQRKA.js} +21 -13
- package/dist/cli-bundle/chunks/register-setup-YJKIQRKA.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js +1144 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +123 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +7 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js +331 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js +939 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js.map +7 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js +608 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js +269 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js +1123 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
- package/dist/cli-bundle/main.js +615 -121
- 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/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/item-type-definition.js +6 -2
- package/dist/core/item/item-type-definition.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.d.ts +4 -0
- package/dist/core/item/type-registry.js +12 -2
- package/dist/core/item/type-registry.js.map +1 -1
- 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/background-refresh.d.ts +53 -0
- package/dist/core/search/background-refresh.js +286 -0
- package/dist/core/search/background-refresh.js.map +1 -0
- package/dist/core/search/cache.d.ts +23 -2
- package/dist/core/search/cache.js +135 -30
- 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 +69 -15
- 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/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +2 -3
- package/dist/core/shared/constants.js.map +1 -1
- 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-format-migration.js +25 -15
- package/dist/core/store/item-format-migration.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 +22 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +40 -5
- 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 +4 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +10 -0
- package/dist/core/telemetry/runtime.js +86 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +221 -12
- 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 +4 -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 +37 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +19 -1
- package/dist/sdk/cli-contracts.js +211 -18
- 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 +26 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +21 -2
- package/docs/COMMANDS.md +85 -5
- package/docs/CONFIGURATION.md +49 -2
- package/docs/EXTENSIONS.md +118 -6
- package/docs/QUICKSTART.md +2 -0
- package/docs/RELEASING.md +3 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +17 -0
- 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 +12 -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/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runUpdate
|
|
3
|
+
} from "./chunk-D5X7N6FI.js";
|
|
4
|
+
import {
|
|
5
|
+
createCheckpointId,
|
|
6
|
+
loadMutationCheckpoint,
|
|
7
|
+
restoreCheckpointItems,
|
|
8
|
+
writeMutationCheckpoint
|
|
9
|
+
} from "./chunk-TQ3ZK6VD.js";
|
|
10
|
+
import {
|
|
11
|
+
runRestore
|
|
12
|
+
} from "./chunk-GCAVRLGE.js";
|
|
13
|
+
import {
|
|
14
|
+
resolveAuthor
|
|
15
|
+
} from "./chunk-O7IWB35H.js";
|
|
16
|
+
import "./chunk-WIKR7KFL.js";
|
|
17
|
+
import "./chunk-S3CV7JGJ.js";
|
|
18
|
+
import "./chunk-OUF3ARDX.js";
|
|
19
|
+
import "./chunk-Y2AKE2HS.js";
|
|
20
|
+
import {
|
|
21
|
+
applyTagRemovals,
|
|
22
|
+
mergeAdditiveTags,
|
|
23
|
+
parseTags
|
|
24
|
+
} from "./chunk-CJDQB2ED.js";
|
|
25
|
+
import "./chunk-ATBVS6WW.js";
|
|
26
|
+
import "./chunk-XX5LRINW.js";
|
|
27
|
+
import "./chunk-KK6YPGH3.js";
|
|
28
|
+
import "./chunk-HZOS2UG5.js";
|
|
29
|
+
import "./chunk-3HUE7XOF.js";
|
|
30
|
+
import {
|
|
31
|
+
runList
|
|
32
|
+
} from "./chunk-N5YF3VFN.js";
|
|
33
|
+
import "./chunk-RQAWLSUU.js";
|
|
34
|
+
import "./chunk-K47WAYQV.js";
|
|
35
|
+
import "./chunk-EAOG77HM.js";
|
|
36
|
+
import {
|
|
37
|
+
toItemRecord
|
|
38
|
+
} from "./chunk-XG7RJYHV.js";
|
|
39
|
+
import "./chunk-KA24HME7.js";
|
|
40
|
+
import {
|
|
41
|
+
collectRuntimeUpdateFieldValues,
|
|
42
|
+
normalizeStatusInput
|
|
43
|
+
} from "./chunk-HPH6X4ZZ.js";
|
|
44
|
+
import "./chunk-4PJQSECJ.js";
|
|
45
|
+
import {
|
|
46
|
+
nowIso
|
|
47
|
+
} from "./chunk-RANZIID5.js";
|
|
48
|
+
import {
|
|
49
|
+
EXIT_CODE,
|
|
50
|
+
PmCliError,
|
|
51
|
+
getSettingsPath,
|
|
52
|
+
pathExists,
|
|
53
|
+
readSettings,
|
|
54
|
+
resolvePmRoot,
|
|
55
|
+
resolveRuntimeFieldRegistry,
|
|
56
|
+
resolveRuntimeStatusRegistry,
|
|
57
|
+
stableValueEquals,
|
|
58
|
+
toErrorMessage
|
|
59
|
+
} from "./chunk-SRVKTWPR.js";
|
|
60
|
+
|
|
61
|
+
// dist/cli/commands/update-many.js
|
|
62
|
+
!(function() {
|
|
63
|
+
try {
|
|
64
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
65
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4ed301df-2e35-53f0-a282-798a18460142");
|
|
66
|
+
} catch (e2) {
|
|
67
|
+
}
|
|
68
|
+
})();
|
|
69
|
+
var UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
70
|
+
var UPDATE_MANY_CHECKPOINT_SUBDIR = "update-many";
|
|
71
|
+
var NON_MUTATION_UPDATE_OPTION_KEYS = /* @__PURE__ */ new Set([
|
|
72
|
+
"author",
|
|
73
|
+
"message",
|
|
74
|
+
"force",
|
|
75
|
+
"allowAuditUpdate",
|
|
76
|
+
"allowAuditDepUpdate"
|
|
77
|
+
]);
|
|
78
|
+
var UPDATE_MANY_MUTATION_FLAG_GUIDANCE = [
|
|
79
|
+
"--status",
|
|
80
|
+
"--priority",
|
|
81
|
+
"--type",
|
|
82
|
+
"--tags",
|
|
83
|
+
"--description",
|
|
84
|
+
"--body",
|
|
85
|
+
"--deadline",
|
|
86
|
+
"--estimate",
|
|
87
|
+
"--assignee",
|
|
88
|
+
"--dep",
|
|
89
|
+
"--dep-remove",
|
|
90
|
+
"--comment",
|
|
91
|
+
"--note",
|
|
92
|
+
"--learning",
|
|
93
|
+
"--file",
|
|
94
|
+
"--test",
|
|
95
|
+
"--doc",
|
|
96
|
+
"--replace-deps",
|
|
97
|
+
"--replace-tests",
|
|
98
|
+
"--unset",
|
|
99
|
+
"--clear-*"
|
|
100
|
+
].join(", ");
|
|
101
|
+
var UPDATE_OPTION_TO_ITEM_KEY = {
|
|
102
|
+
title: "title",
|
|
103
|
+
description: "description",
|
|
104
|
+
body: "body",
|
|
105
|
+
status: "status",
|
|
106
|
+
closeReason: "close_reason",
|
|
107
|
+
priority: "priority",
|
|
108
|
+
type: "type",
|
|
109
|
+
deadline: "deadline",
|
|
110
|
+
estimatedMinutes: "estimated_minutes",
|
|
111
|
+
acceptanceCriteria: "acceptance_criteria",
|
|
112
|
+
definitionOfReady: "definition_of_ready",
|
|
113
|
+
order: "order",
|
|
114
|
+
goal: "goal",
|
|
115
|
+
objective: "objective",
|
|
116
|
+
value: "value",
|
|
117
|
+
impact: "impact",
|
|
118
|
+
outcome: "outcome",
|
|
119
|
+
whyNow: "why_now",
|
|
120
|
+
assignee: "assignee",
|
|
121
|
+
parent: "parent",
|
|
122
|
+
reviewer: "reviewer",
|
|
123
|
+
risk: "risk",
|
|
124
|
+
confidence: "confidence",
|
|
125
|
+
sprint: "sprint",
|
|
126
|
+
release: "release",
|
|
127
|
+
blockedBy: "blocked_by",
|
|
128
|
+
blockedReason: "blocked_reason",
|
|
129
|
+
unblockNote: "unblock_note",
|
|
130
|
+
reporter: "reporter",
|
|
131
|
+
severity: "severity",
|
|
132
|
+
environment: "environment",
|
|
133
|
+
reproSteps: "repro_steps",
|
|
134
|
+
resolution: "resolution",
|
|
135
|
+
expectedResult: "expected_result",
|
|
136
|
+
actualResult: "actual_result",
|
|
137
|
+
affectedVersion: "affected_version",
|
|
138
|
+
fixedVersion: "fixed_version",
|
|
139
|
+
component: "component",
|
|
140
|
+
regression: "regression",
|
|
141
|
+
customerImpact: "customer_impact"
|
|
142
|
+
};
|
|
143
|
+
var COLLECTION_MUTATION_PLAN_DEFINITIONS = [
|
|
144
|
+
{
|
|
145
|
+
field: "dependencies",
|
|
146
|
+
addKey: "dep",
|
|
147
|
+
removeKey: "depRemove",
|
|
148
|
+
clearKey: "clearDeps",
|
|
149
|
+
replaceKey: "replaceDeps"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
field: "comments",
|
|
153
|
+
addKey: "comment",
|
|
154
|
+
clearKey: "clearComments"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
field: "notes",
|
|
158
|
+
addKey: "note",
|
|
159
|
+
clearKey: "clearNotes"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
field: "learnings",
|
|
163
|
+
addKey: "learning",
|
|
164
|
+
clearKey: "clearLearnings"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
field: "files",
|
|
168
|
+
addKey: "file",
|
|
169
|
+
clearKey: "clearFiles"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
field: "tests",
|
|
173
|
+
addKey: "test",
|
|
174
|
+
clearKey: "clearTests",
|
|
175
|
+
replaceKey: "replaceTests"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
field: "docs",
|
|
179
|
+
addKey: "doc",
|
|
180
|
+
clearKey: "clearDocs"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
field: "reminders",
|
|
184
|
+
addKey: "reminder",
|
|
185
|
+
clearKey: "clearReminders"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
field: "events",
|
|
189
|
+
addKey: "event",
|
|
190
|
+
clearKey: "clearEvents"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
field: "type_options",
|
|
194
|
+
addKey: "typeOption",
|
|
195
|
+
clearKey: "clearTypeOptions"
|
|
196
|
+
}
|
|
197
|
+
];
|
|
198
|
+
var UNSET_FIELD_ALIASES = {
|
|
199
|
+
close_reason: "close_reason",
|
|
200
|
+
"close-reason": "close_reason",
|
|
201
|
+
deadline: "deadline",
|
|
202
|
+
estimate: "estimated_minutes",
|
|
203
|
+
estimated_minutes: "estimated_minutes",
|
|
204
|
+
"estimated-minutes": "estimated_minutes",
|
|
205
|
+
acceptance_criteria: "acceptance_criteria",
|
|
206
|
+
"acceptance-criteria": "acceptance_criteria",
|
|
207
|
+
ac: "acceptance_criteria",
|
|
208
|
+
definition_of_ready: "definition_of_ready",
|
|
209
|
+
"definition-of-ready": "definition_of_ready",
|
|
210
|
+
order: "order",
|
|
211
|
+
rank: "order",
|
|
212
|
+
goal: "goal",
|
|
213
|
+
objective: "objective",
|
|
214
|
+
value: "value",
|
|
215
|
+
impact: "impact",
|
|
216
|
+
outcome: "outcome",
|
|
217
|
+
why_now: "why_now",
|
|
218
|
+
"why-now": "why_now",
|
|
219
|
+
assignee: "assignee",
|
|
220
|
+
parent: "parent",
|
|
221
|
+
reviewer: "reviewer",
|
|
222
|
+
risk: "risk",
|
|
223
|
+
confidence: "confidence",
|
|
224
|
+
sprint: "sprint",
|
|
225
|
+
release: "release",
|
|
226
|
+
blocked_by: "blocked_by",
|
|
227
|
+
"blocked-by": "blocked_by",
|
|
228
|
+
blocked_reason: "blocked_reason",
|
|
229
|
+
"blocked-reason": "blocked_reason",
|
|
230
|
+
unblock_note: "unblock_note",
|
|
231
|
+
"unblock-note": "unblock_note",
|
|
232
|
+
reporter: "reporter",
|
|
233
|
+
severity: "severity",
|
|
234
|
+
environment: "environment",
|
|
235
|
+
repro_steps: "repro_steps",
|
|
236
|
+
"repro-steps": "repro_steps",
|
|
237
|
+
resolution: "resolution",
|
|
238
|
+
expected_result: "expected_result",
|
|
239
|
+
"expected-result": "expected_result",
|
|
240
|
+
actual_result: "actual_result",
|
|
241
|
+
"actual-result": "actual_result",
|
|
242
|
+
affected_version: "affected_version",
|
|
243
|
+
"affected-version": "affected_version",
|
|
244
|
+
fixed_version: "fixed_version",
|
|
245
|
+
"fixed-version": "fixed_version",
|
|
246
|
+
component: "component",
|
|
247
|
+
regression: "regression",
|
|
248
|
+
customer_impact: "customer_impact",
|
|
249
|
+
"customer-impact": "customer_impact",
|
|
250
|
+
type_options: "type_options",
|
|
251
|
+
"type-options": "type_options",
|
|
252
|
+
tags: "tags"
|
|
253
|
+
};
|
|
254
|
+
function sanitizeUpdateOptionsForSummary(options) {
|
|
255
|
+
const summary = {};
|
|
256
|
+
for (const [key, value] of Object.entries(options)) {
|
|
257
|
+
if (NON_MUTATION_UPDATE_OPTION_KEYS.has(key)) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (value === void 0) {
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
summary[key] = value;
|
|
264
|
+
}
|
|
265
|
+
return summary;
|
|
266
|
+
}
|
|
267
|
+
function hasAnyUpdateMutationInput(options) {
|
|
268
|
+
return Object.keys(sanitizeUpdateOptionsForSummary(options)).length > 0;
|
|
269
|
+
}
|
|
270
|
+
function toComparablePreviewValue(optionKey, value) {
|
|
271
|
+
if (value === void 0) {
|
|
272
|
+
return void 0;
|
|
273
|
+
}
|
|
274
|
+
if (optionKey === "priority") {
|
|
275
|
+
const parsed = Number(String(value).trim());
|
|
276
|
+
return Number.isInteger(parsed) ? parsed : String(value).trim();
|
|
277
|
+
}
|
|
278
|
+
if (optionKey === "estimatedMinutes" || optionKey === "order" || optionKey === "rank") {
|
|
279
|
+
const parsed = Number(String(value).trim());
|
|
280
|
+
return Number.isFinite(parsed) ? parsed : String(value).trim();
|
|
281
|
+
}
|
|
282
|
+
if (optionKey === "regression") {
|
|
283
|
+
const normalized = String(value).trim().toLowerCase();
|
|
284
|
+
if (normalized === "true" || normalized === "1") {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
if (normalized === "false" || normalized === "0") {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (typeof value === "string") {
|
|
292
|
+
return value.trim();
|
|
293
|
+
}
|
|
294
|
+
return value;
|
|
295
|
+
}
|
|
296
|
+
function normalizeUnsetField(rawField) {
|
|
297
|
+
const normalized = rawField.trim().toLowerCase().replaceAll("-", "_");
|
|
298
|
+
return UNSET_FIELD_ALIASES[normalized] ?? normalized;
|
|
299
|
+
}
|
|
300
|
+
function areValuesEqual(left, right) {
|
|
301
|
+
return stableValueEquals(left, right);
|
|
302
|
+
}
|
|
303
|
+
function normalizeCollectionBeforeValue(field, value) {
|
|
304
|
+
if (value !== void 0) {
|
|
305
|
+
return value;
|
|
306
|
+
}
|
|
307
|
+
if (field === "type_options") {
|
|
308
|
+
return {};
|
|
309
|
+
}
|
|
310
|
+
return [];
|
|
311
|
+
}
|
|
312
|
+
function collectionValueCount(field, value) {
|
|
313
|
+
if (Array.isArray(value)) {
|
|
314
|
+
return value.length;
|
|
315
|
+
}
|
|
316
|
+
if (field === "type_options" && value && typeof value === "object") {
|
|
317
|
+
return Object.keys(value).length;
|
|
318
|
+
}
|
|
319
|
+
return 0;
|
|
320
|
+
}
|
|
321
|
+
function buildCollectionMutationPlans(row, update) {
|
|
322
|
+
const changes = [];
|
|
323
|
+
for (const definition of COLLECTION_MUTATION_PLAN_DEFINITIONS) {
|
|
324
|
+
const addValues = definition.addKey ? update[definition.addKey] : void 0;
|
|
325
|
+
const removeValues = definition.removeKey ? update[definition.removeKey] : void 0;
|
|
326
|
+
const addCount = Array.isArray(addValues) ? addValues.length : 0;
|
|
327
|
+
const removeCount = Array.isArray(removeValues) ? removeValues.length : 0;
|
|
328
|
+
const clear = definition.clearKey ? update[definition.clearKey] === true : false;
|
|
329
|
+
const replace = definition.replaceKey ? update[definition.replaceKey] === true : false;
|
|
330
|
+
if (!clear && !replace && addCount === 0 && removeCount === 0) {
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
const before = normalizeCollectionBeforeValue(definition.field, row[definition.field]);
|
|
334
|
+
const beforeCount = collectionValueCount(definition.field, before);
|
|
335
|
+
const operation = replace ? "replace" : clear ? "clear_or_reset" : removeCount > 0 ? "merge_remove" : "append";
|
|
336
|
+
changes.push({
|
|
337
|
+
field: definition.field,
|
|
338
|
+
before,
|
|
339
|
+
after: {
|
|
340
|
+
operation,
|
|
341
|
+
clear,
|
|
342
|
+
replace,
|
|
343
|
+
add_count: addCount,
|
|
344
|
+
remove_count: removeCount,
|
|
345
|
+
before_count: beforeCount
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
return changes;
|
|
350
|
+
}
|
|
351
|
+
function normalizeExistingTags(value) {
|
|
352
|
+
if (!Array.isArray(value)) {
|
|
353
|
+
return [];
|
|
354
|
+
}
|
|
355
|
+
return value.filter((tag) => typeof tag === "string");
|
|
356
|
+
}
|
|
357
|
+
function buildTagMutationPlan(row, update) {
|
|
358
|
+
const hasReplace = update.tags !== void 0;
|
|
359
|
+
const hasAdd = Array.isArray(update.addTags) && update.addTags.length > 0;
|
|
360
|
+
const hasRemove = Array.isArray(update.removeTags) && update.removeTags.length > 0;
|
|
361
|
+
if (!hasReplace && !hasAdd && !hasRemove) {
|
|
362
|
+
return void 0;
|
|
363
|
+
}
|
|
364
|
+
const existing = normalizeExistingTags(row.tags);
|
|
365
|
+
const baseTags = hasReplace ? parseTags(update.tags ?? "") : existing;
|
|
366
|
+
const withAdditions = mergeAdditiveTags(baseTags, update.addTags);
|
|
367
|
+
const after = applyTagRemovals(withAdditions, update.removeTags).slice().sort((a, b) => a.localeCompare(b));
|
|
368
|
+
const before = existing.slice().sort((a, b) => a.localeCompare(b));
|
|
369
|
+
if (areValuesEqual(before, after)) {
|
|
370
|
+
return void 0;
|
|
371
|
+
}
|
|
372
|
+
return { field: "tags", before: existing, after };
|
|
373
|
+
}
|
|
374
|
+
function buildPlannedItemDiff(item, update, runtimeFieldRegistry) {
|
|
375
|
+
const safeUpdate = update ?? {};
|
|
376
|
+
const row = toItemRecord(item);
|
|
377
|
+
const changes = [];
|
|
378
|
+
const tagPlan = buildTagMutationPlan(row, safeUpdate);
|
|
379
|
+
if (tagPlan) {
|
|
380
|
+
changes.push(tagPlan);
|
|
381
|
+
}
|
|
382
|
+
for (const [optionKey, itemKey] of Object.entries(UPDATE_OPTION_TO_ITEM_KEY)) {
|
|
383
|
+
const candidate = safeUpdate[optionKey];
|
|
384
|
+
if (candidate === void 0) {
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
const before = row[itemKey];
|
|
388
|
+
const after = toComparablePreviewValue(optionKey, candidate);
|
|
389
|
+
if (areValuesEqual(before, after)) {
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
changes.push({
|
|
393
|
+
field: itemKey,
|
|
394
|
+
before,
|
|
395
|
+
after
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
changes.push(...buildCollectionMutationPlans(row, safeUpdate));
|
|
399
|
+
const runtimeFieldUpdates = collectRuntimeUpdateFieldValues(safeUpdate, runtimeFieldRegistry, ["update_many"]);
|
|
400
|
+
for (const [fieldKey, fieldValue] of Object.entries(runtimeFieldUpdates)) {
|
|
401
|
+
const before = row[fieldKey];
|
|
402
|
+
if (areValuesEqual(before, fieldValue)) {
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
changes.push({
|
|
406
|
+
field: fieldKey,
|
|
407
|
+
before,
|
|
408
|
+
after: fieldValue
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
if (safeUpdate.unset && safeUpdate.unset.length > 0) {
|
|
412
|
+
for (const rawUnsetField of safeUpdate.unset) {
|
|
413
|
+
const field = normalizeUnsetField(rawUnsetField);
|
|
414
|
+
const before = row[field];
|
|
415
|
+
if (before === void 0) {
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
changes.push({
|
|
419
|
+
field,
|
|
420
|
+
before,
|
|
421
|
+
after: null
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return {
|
|
426
|
+
id: item.id,
|
|
427
|
+
changes
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function normalizeStatusFilter(value, statusRegistry) {
|
|
431
|
+
if (value === void 0) {
|
|
432
|
+
return void 0;
|
|
433
|
+
}
|
|
434
|
+
const normalized = normalizeStatusInput(value, statusRegistry);
|
|
435
|
+
if (!normalized) {
|
|
436
|
+
const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);
|
|
437
|
+
throw new PmCliError(`Invalid --filter-status value "${value}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
|
|
438
|
+
}
|
|
439
|
+
return normalized;
|
|
440
|
+
}
|
|
441
|
+
function hasListFilters(list, status) {
|
|
442
|
+
const isActive = (value) => value != null && (typeof value !== "string" || value.split(",").some((entry) => entry.trim().length > 0));
|
|
443
|
+
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) || isActive(list?.limit) || isActive(list?.offset);
|
|
444
|
+
}
|
|
445
|
+
function rejectBlankIdsFilter(list) {
|
|
446
|
+
if (list?.ids != null && String(list.ids).trim().length === 0) {
|
|
447
|
+
throw new PmCliError("--ids requires at least one non-empty item ID", EXIT_CODE.USAGE);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
async function runUpdateMany(options, global2) {
|
|
451
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
452
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
453
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
454
|
+
}
|
|
455
|
+
const settings = await readSettings(pmRoot);
|
|
456
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
457
|
+
const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
|
|
458
|
+
const dryRun = options.dryRun === true;
|
|
459
|
+
const rollbackId = typeof options.rollback === "string" ? options.rollback : void 0;
|
|
460
|
+
const updateSummary = sanitizeUpdateOptionsForSummary(options.update);
|
|
461
|
+
rejectBlankIdsFilter(options.list);
|
|
462
|
+
if (rollbackId) {
|
|
463
|
+
if (dryRun) {
|
|
464
|
+
throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
|
|
465
|
+
}
|
|
466
|
+
if (hasListFilters(options.list, options.status)) {
|
|
467
|
+
throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
|
|
468
|
+
}
|
|
469
|
+
if (Object.keys(updateSummary).length > 0) {
|
|
470
|
+
throw new PmCliError("Rollback mode does not accept update mutation flags", EXIT_CODE.USAGE);
|
|
471
|
+
}
|
|
472
|
+
const checkpoint = await loadMutationCheckpoint(pmRoot, UPDATE_MANY_CHECKPOINT_SUBDIR, rollbackId, UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION);
|
|
473
|
+
const restoreMessage = options.update?.message ?? `Rollback update-many checkpoint ${checkpoint.id}`;
|
|
474
|
+
const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) => runRestore(id, targetUpdatedAt, {
|
|
475
|
+
author: options.update?.author,
|
|
476
|
+
message: restoreMessage,
|
|
477
|
+
force: options.update?.force ?? true
|
|
478
|
+
}, global2));
|
|
479
|
+
return {
|
|
480
|
+
mode: "rollback",
|
|
481
|
+
matched_count: checkpoint.items.length,
|
|
482
|
+
dry_run: false,
|
|
483
|
+
rollback_checkpoint_id: checkpoint.id,
|
|
484
|
+
checkpoint: {
|
|
485
|
+
id: checkpoint.id,
|
|
486
|
+
created_at: checkpoint.created_at,
|
|
487
|
+
path: checkpoint.path,
|
|
488
|
+
rollback_command: `pm update-many --rollback ${checkpoint.id}`
|
|
489
|
+
},
|
|
490
|
+
restored_count: rollback.restored_ids.length,
|
|
491
|
+
failed_count: rollback.failed_count,
|
|
492
|
+
rows: rollback.rows,
|
|
493
|
+
ids: rollback.restored_ids
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
if (!hasAnyUpdateMutationInput(options.update)) {
|
|
497
|
+
throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`, EXIT_CODE.USAGE);
|
|
498
|
+
}
|
|
499
|
+
const statusFilter = normalizeStatusFilter(options.status, statusRegistry);
|
|
500
|
+
const listed = await runList(statusFilter, { ...options.list, includeBody: true }, global2);
|
|
501
|
+
const planned = listed.items.map((item) => buildPlannedItemDiff(item, options.update, runtimeFieldRegistry));
|
|
502
|
+
const actionable = planned.filter((row) => row.changes.length > 0);
|
|
503
|
+
if (dryRun) {
|
|
504
|
+
return {
|
|
505
|
+
mode: "dry_run",
|
|
506
|
+
matched_count: listed.items.length,
|
|
507
|
+
dry_run: true,
|
|
508
|
+
filters: listed.filters,
|
|
509
|
+
planned_update_options: updateSummary,
|
|
510
|
+
item_plans: planned,
|
|
511
|
+
ids: []
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
if (actionable.length === 0) {
|
|
515
|
+
return {
|
|
516
|
+
mode: "apply",
|
|
517
|
+
matched_count: listed.items.length,
|
|
518
|
+
dry_run: false,
|
|
519
|
+
filters: listed.filters,
|
|
520
|
+
planned_update_options: updateSummary,
|
|
521
|
+
updated_count: 0,
|
|
522
|
+
skipped_count: listed.items.length,
|
|
523
|
+
failed_count: 0,
|
|
524
|
+
rows: planned.map((row) => ({
|
|
525
|
+
id: row.id,
|
|
526
|
+
status: "skipped"
|
|
527
|
+
})),
|
|
528
|
+
ids: []
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
const nowValue = nowIso();
|
|
532
|
+
const checkpointId = createCheckpointId(UPDATE_MANY_CHECKPOINT_SUBDIR, nowValue);
|
|
533
|
+
const checkpointEnabled = options.checkpoint !== false;
|
|
534
|
+
const checkpointItems = listed.items.filter((item) => actionable.some((candidate) => candidate.id === item.id)).map((item) => ({
|
|
535
|
+
id: item.id,
|
|
536
|
+
target_updated_at: item.updated_at
|
|
537
|
+
}));
|
|
538
|
+
let checkpointInfo;
|
|
539
|
+
if (checkpointEnabled) {
|
|
540
|
+
const checkpointPayload = {
|
|
541
|
+
schema_version: UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION,
|
|
542
|
+
id: checkpointId,
|
|
543
|
+
created_at: nowValue,
|
|
544
|
+
author: resolveAuthor(options.update.author, "unknown"),
|
|
545
|
+
status_filter: statusFilter ?? null,
|
|
546
|
+
list_filters: listed.filters,
|
|
547
|
+
update_options: updateSummary,
|
|
548
|
+
items: checkpointItems
|
|
549
|
+
};
|
|
550
|
+
const checkpointPath = await writeMutationCheckpoint(pmRoot, UPDATE_MANY_CHECKPOINT_SUBDIR, checkpointId, checkpointPayload);
|
|
551
|
+
checkpointInfo = {
|
|
552
|
+
id: checkpointId,
|
|
553
|
+
created_at: nowValue,
|
|
554
|
+
path: checkpointPath,
|
|
555
|
+
rollback_command: `pm update-many --rollback ${checkpointId}`
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
const applyRows = [];
|
|
559
|
+
const updatedIds = [];
|
|
560
|
+
const updateMessage = options.update.message ?? `update-many apply ${checkpointId}`;
|
|
561
|
+
const actionableById = new Set(actionable.map((row) => row.id));
|
|
562
|
+
for (const item of listed.items) {
|
|
563
|
+
if (!actionableById.has(item.id)) {
|
|
564
|
+
applyRows.push({ id: item.id, status: "skipped" });
|
|
565
|
+
continue;
|
|
566
|
+
}
|
|
567
|
+
try {
|
|
568
|
+
const result = await runUpdate(item.id, {
|
|
569
|
+
...options.update,
|
|
570
|
+
message: updateMessage,
|
|
571
|
+
runtimeFieldCommands: ["update_many"]
|
|
572
|
+
}, global2);
|
|
573
|
+
applyRows.push({
|
|
574
|
+
id: item.id,
|
|
575
|
+
status: "updated",
|
|
576
|
+
changed_fields: result.changed_fields,
|
|
577
|
+
warnings: result.warnings
|
|
578
|
+
});
|
|
579
|
+
updatedIds.push(item.id);
|
|
580
|
+
} catch (error) {
|
|
581
|
+
applyRows.push({
|
|
582
|
+
id: item.id,
|
|
583
|
+
status: "failed",
|
|
584
|
+
error: toErrorMessage(error)
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
const updatedCount = applyRows.filter((row) => row.status === "updated").length;
|
|
589
|
+
const skippedCount = applyRows.filter((row) => row.status === "skipped").length;
|
|
590
|
+
const failedCount = applyRows.filter((row) => row.status === "failed").length;
|
|
591
|
+
return {
|
|
592
|
+
mode: "apply",
|
|
593
|
+
matched_count: listed.items.length,
|
|
594
|
+
dry_run: false,
|
|
595
|
+
filters: listed.filters,
|
|
596
|
+
planned_update_options: updateSummary,
|
|
597
|
+
...checkpointInfo ? { checkpoint: checkpointInfo } : {},
|
|
598
|
+
updated_count: updatedCount,
|
|
599
|
+
skipped_count: skippedCount,
|
|
600
|
+
failed_count: failedCount,
|
|
601
|
+
rows: applyRows,
|
|
602
|
+
ids: updatedIds
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
export {
|
|
606
|
+
runUpdateMany
|
|
607
|
+
};
|
|
608
|
+
//# sourceMappingURL=update-many-322CCH2L.js.map
|