@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
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
acquireLock
|
|
3
|
-
} from "./chunk-4AEZR5EJ.js";
|
|
4
1
|
import {
|
|
5
2
|
normalizeItemId,
|
|
6
3
|
normalizeRawItemId
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T3LC5LKB.js";
|
|
8
5
|
import {
|
|
9
6
|
canonicalDocument,
|
|
10
7
|
parseItemDocument,
|
|
11
8
|
serializeItemDocument
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AO442XLN.js";
|
|
13
10
|
import {
|
|
14
11
|
resolveItemTypeRegistry
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KJE2FOS4.js";
|
|
16
13
|
import {
|
|
17
14
|
nowIso
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QO7EBBOM.js";
|
|
19
16
|
import {
|
|
20
17
|
EMPTY_CANONICAL_DOCUMENT,
|
|
21
18
|
EXIT_CODE,
|
|
@@ -29,17 +26,217 @@ import {
|
|
|
29
26
|
getHistoryPath,
|
|
30
27
|
getItemFormatFromPath,
|
|
31
28
|
getItemPath,
|
|
29
|
+
getLockPath,
|
|
32
30
|
hasActiveOnReadHooks,
|
|
33
31
|
orderObject,
|
|
34
32
|
pathExists,
|
|
33
|
+
projectAfterCommandItemSnapshot,
|
|
34
|
+
recordAfterCommandAffectedItem,
|
|
35
35
|
resolveGovernanceKnobs,
|
|
36
36
|
runActiveOnReadHooks,
|
|
37
37
|
runActiveOnWriteHooks,
|
|
38
38
|
runActiveServiceOverride,
|
|
39
39
|
sha256Hex,
|
|
40
40
|
stableStringify,
|
|
41
|
+
toErrorMessage,
|
|
41
42
|
writeFileAtomic
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-U5SXYXSY.js";
|
|
44
|
+
|
|
45
|
+
// dist/core/extensions/item-fields.js
|
|
46
|
+
!(function() {
|
|
47
|
+
try {
|
|
48
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
49
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "60ed024d-4341-5166-bd9e-abed9b240b11");
|
|
50
|
+
} catch (e2) {
|
|
51
|
+
}
|
|
52
|
+
})();
|
|
53
|
+
var RESERVED_ITEM_FIELD_NAMES = new Set(FRONT_MATTER_KEY_ORDER);
|
|
54
|
+
function normalizeFieldName(value) {
|
|
55
|
+
if (typeof value !== "string") {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
const normalized = value.trim();
|
|
59
|
+
return normalized.length > 0 ? normalized : null;
|
|
60
|
+
}
|
|
61
|
+
function normalizeFieldType(value) {
|
|
62
|
+
if (typeof value !== "string") {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
const normalized = value.trim().toLowerCase();
|
|
66
|
+
if (normalized === "string" || normalized === "number" || normalized === "boolean" || normalized === "array" || normalized === "object") {
|
|
67
|
+
return normalized;
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
function cloneFieldValue(value) {
|
|
72
|
+
try {
|
|
73
|
+
return structuredClone(value);
|
|
74
|
+
} catch {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function parseFieldAssignment(raw) {
|
|
79
|
+
const trimmed = raw.trim();
|
|
80
|
+
const separatorIndex = trimmed.indexOf("=");
|
|
81
|
+
if (separatorIndex <= 0) {
|
|
82
|
+
throw new PmCliError(`--field entries must use name=value syntax, received: ${raw}`, EXIT_CODE.USAGE);
|
|
83
|
+
}
|
|
84
|
+
const key = trimmed.slice(0, separatorIndex).trim();
|
|
85
|
+
const value = trimmed.slice(separatorIndex + 1);
|
|
86
|
+
if (key.length === 0) {
|
|
87
|
+
throw new PmCliError("--field entries require a non-empty field name", EXIT_CODE.USAGE);
|
|
88
|
+
}
|
|
89
|
+
return { key, value };
|
|
90
|
+
}
|
|
91
|
+
function parseJsonFieldValue(raw, fieldName, expectedType) {
|
|
92
|
+
try {
|
|
93
|
+
const parsed = JSON.parse(raw);
|
|
94
|
+
if (expectedType === "array" && Array.isArray(parsed)) {
|
|
95
|
+
return parsed;
|
|
96
|
+
}
|
|
97
|
+
if (expectedType === "object" && typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
98
|
+
return parsed;
|
|
99
|
+
}
|
|
100
|
+
} catch {
|
|
101
|
+
}
|
|
102
|
+
throw new PmCliError(`--field ${fieldName}=... must be valid JSON ${expectedType}`, EXIT_CODE.USAGE);
|
|
103
|
+
}
|
|
104
|
+
function coerceRegisteredFieldValue(fieldName, fieldType, raw) {
|
|
105
|
+
if (fieldType === "string") {
|
|
106
|
+
return raw;
|
|
107
|
+
}
|
|
108
|
+
if (fieldType === "number") {
|
|
109
|
+
const trimmed = raw.trim();
|
|
110
|
+
if (trimmed.length === 0) {
|
|
111
|
+
throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
|
|
112
|
+
}
|
|
113
|
+
const parsed = Number(trimmed);
|
|
114
|
+
if (!Number.isFinite(parsed)) {
|
|
115
|
+
throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
|
|
116
|
+
}
|
|
117
|
+
return parsed;
|
|
118
|
+
}
|
|
119
|
+
if (fieldType === "boolean") {
|
|
120
|
+
const normalized = raw.trim().toLowerCase();
|
|
121
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
throw new PmCliError(`--field ${fieldName}=... must be one of true|false|1|0|yes|no`, EXIT_CODE.USAGE);
|
|
128
|
+
}
|
|
129
|
+
return parseJsonFieldValue(raw, fieldName, fieldType);
|
|
130
|
+
}
|
|
131
|
+
function collectRegisteredFieldDefinitions(registrations) {
|
|
132
|
+
const definitions = /* @__PURE__ */ new Map();
|
|
133
|
+
if (!registrations) {
|
|
134
|
+
return definitions;
|
|
135
|
+
}
|
|
136
|
+
for (const registration of registrations.item_fields) {
|
|
137
|
+
for (const definition of registration.fields) {
|
|
138
|
+
const fieldName = normalizeFieldName(definition.name);
|
|
139
|
+
const fieldType = normalizeFieldType(definition.type);
|
|
140
|
+
if (!fieldName || !fieldType) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const existing = definitions.get(fieldName);
|
|
144
|
+
if (existing && existing.type !== fieldType) {
|
|
145
|
+
throw new PmCliError(`Extension item field "${fieldName}" is declared with conflicting types: ${existing.type}, ${fieldType}`, EXIT_CODE.USAGE, {
|
|
146
|
+
code: "extension_item_field_type_conflict",
|
|
147
|
+
nextSteps: ["Make every active extension declaration for this field use the same type."]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
definitions.set(fieldName, { name: fieldName, type: fieldType });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return definitions;
|
|
154
|
+
}
|
|
155
|
+
function assertNotReservedItemFieldName(fieldName) {
|
|
156
|
+
if (!RESERVED_ITEM_FIELD_NAMES.has(fieldName)) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
throw new PmCliError(`Extension item field "${fieldName}" collides with reserved item metadata`, EXIT_CODE.USAGE, {
|
|
160
|
+
code: "extension_item_field_reserved",
|
|
161
|
+
nextSteps: ["Rename the extension item field, preferably with an extension-specific prefix."]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function collectRegisteredItemFieldNames(registrations) {
|
|
165
|
+
return [...collectRegisteredFieldDefinitions(registrations).keys()].sort((left, right) => left.localeCompare(right));
|
|
166
|
+
}
|
|
167
|
+
function parseRegisteredItemFieldAssignments(rawFields, registrations) {
|
|
168
|
+
if (!rawFields || rawFields.length === 0) {
|
|
169
|
+
return {};
|
|
170
|
+
}
|
|
171
|
+
const definitions = collectRegisteredFieldDefinitions(registrations);
|
|
172
|
+
const values = {};
|
|
173
|
+
for (const raw of rawFields) {
|
|
174
|
+
const { key, value } = parseFieldAssignment(raw);
|
|
175
|
+
const definition = definitions.get(key);
|
|
176
|
+
if (!definition) {
|
|
177
|
+
const known = [...definitions.keys()].sort((left, right) => left.localeCompare(right));
|
|
178
|
+
throw new PmCliError(`--field ${key} is not declared by an active extension item-field registration`, EXIT_CODE.USAGE, {
|
|
179
|
+
code: "extension_item_field_unknown",
|
|
180
|
+
recovery: { provided_fields: known },
|
|
181
|
+
nextSteps: known.length > 0 ? [`Use one of the declared fields: ${known.join(", ")}`] : ["Activate an extension that calls registerItemFields before setting extension fields."]
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
assertNotReservedItemFieldName(definition.name);
|
|
185
|
+
values[definition.name] = coerceRegisteredFieldValue(definition.name, definition.type, value);
|
|
186
|
+
}
|
|
187
|
+
return values;
|
|
188
|
+
}
|
|
189
|
+
function isValidFieldType(value, expectedType) {
|
|
190
|
+
if (expectedType === "string") {
|
|
191
|
+
return typeof value === "string";
|
|
192
|
+
}
|
|
193
|
+
if (expectedType === "number") {
|
|
194
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
195
|
+
}
|
|
196
|
+
if (expectedType === "boolean") {
|
|
197
|
+
return typeof value === "boolean";
|
|
198
|
+
}
|
|
199
|
+
if (expectedType === "array") {
|
|
200
|
+
return Array.isArray(value);
|
|
201
|
+
}
|
|
202
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
203
|
+
}
|
|
204
|
+
function isAllowedFieldValue(value, allowed) {
|
|
205
|
+
if (!allowed || allowed.length === 0) {
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
return allowed.some((candidate) => Object.is(candidate, value));
|
|
209
|
+
}
|
|
210
|
+
function applyRegisteredItemFieldDefaultsAndValidation(frontMatter, registrations, options = {}) {
|
|
211
|
+
if (!registrations) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
collectRegisteredFieldDefinitions(registrations);
|
|
215
|
+
for (const registration of registrations.item_fields) {
|
|
216
|
+
for (const definition of registration.fields) {
|
|
217
|
+
const fieldName = normalizeFieldName(definition.name);
|
|
218
|
+
if (!fieldName) {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
assertNotReservedItemFieldName(fieldName);
|
|
222
|
+
if (!(fieldName in frontMatter) && !options.skipDefaultFields?.has(fieldName) && Object.prototype.hasOwnProperty.call(definition, "default")) {
|
|
223
|
+
frontMatter[fieldName] = cloneFieldValue(definition.default);
|
|
224
|
+
}
|
|
225
|
+
const currentValue = frontMatter[fieldName];
|
|
226
|
+
if (currentValue === void 0) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const expectedType = normalizeFieldType(definition.type);
|
|
230
|
+
if (expectedType && !isValidFieldType(currentValue, expectedType)) {
|
|
231
|
+
throw new TypeError(`Item field "${fieldName}" must be of type ${expectedType}`);
|
|
232
|
+
}
|
|
233
|
+
const allowedValues = Array.isArray(definition.values) ? definition.values : void 0;
|
|
234
|
+
if (!isAllowedFieldValue(currentValue, allowedValues)) {
|
|
235
|
+
throw new TypeError(`Item field "${fieldName}" must match one of the configured allowed values`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
43
240
|
|
|
44
241
|
// dist/core/item/item-record.js
|
|
45
242
|
!(function() {
|
|
@@ -66,17 +263,17 @@ var EMPTY_LEGACY_HASH_DOCUMENT = {
|
|
|
66
263
|
front_matter: {},
|
|
67
264
|
body: ""
|
|
68
265
|
};
|
|
69
|
-
function decodeJsonPointer(
|
|
70
|
-
if (!
|
|
266
|
+
function decodeJsonPointer(path5) {
|
|
267
|
+
if (!path5 || path5 === "/") {
|
|
71
268
|
return [];
|
|
72
269
|
}
|
|
73
|
-
if (!
|
|
270
|
+
if (!path5.startsWith("/")) {
|
|
74
271
|
return [];
|
|
75
272
|
}
|
|
76
|
-
return
|
|
273
|
+
return path5.slice(1).split("/").map((segment) => segment.replaceAll("~1", "/").replaceAll("~0", "~"));
|
|
77
274
|
}
|
|
78
|
-
function isDefinedPointerPath(document,
|
|
79
|
-
const segments = decodeJsonPointer(
|
|
275
|
+
function isDefinedPointerPath(document, path5) {
|
|
276
|
+
const segments = decodeJsonPointer(path5);
|
|
80
277
|
if (segments.length === 0) {
|
|
81
278
|
return true;
|
|
82
279
|
}
|
|
@@ -261,14 +458,186 @@ async function enforceHistoryStreamPolicyForItems(params) {
|
|
|
261
458
|
};
|
|
262
459
|
}
|
|
263
460
|
|
|
264
|
-
// dist/core/
|
|
461
|
+
// dist/core/lock/lock.js
|
|
265
462
|
import fs2 from "node:fs/promises";
|
|
266
463
|
import path2 from "node:path";
|
|
464
|
+
!(function() {
|
|
465
|
+
try {
|
|
466
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
467
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5747034b-5b93-59ff-8764-7594ff8c0617");
|
|
468
|
+
} catch (e2) {
|
|
469
|
+
}
|
|
470
|
+
})();
|
|
471
|
+
function parseLockInfo(raw) {
|
|
472
|
+
let parsed;
|
|
473
|
+
try {
|
|
474
|
+
parsed = JSON.parse(raw);
|
|
475
|
+
} catch {
|
|
476
|
+
return {
|
|
477
|
+
info: null,
|
|
478
|
+
warnings: ["lock_info_invalid_json"]
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
482
|
+
return {
|
|
483
|
+
info: null,
|
|
484
|
+
warnings: ["lock_info_invalid_shape"]
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
const candidate = parsed;
|
|
488
|
+
const id = candidate.id;
|
|
489
|
+
const pid = candidate.pid;
|
|
490
|
+
const owner = candidate.owner;
|
|
491
|
+
const createdAt = candidate.created_at;
|
|
492
|
+
const ttlSeconds = candidate.ttl_seconds;
|
|
493
|
+
if (typeof id !== "string" || typeof pid !== "number" || !Number.isFinite(pid) || typeof owner !== "string" || typeof createdAt !== "string" || typeof ttlSeconds !== "number" || !Number.isFinite(ttlSeconds)) {
|
|
494
|
+
return {
|
|
495
|
+
info: null,
|
|
496
|
+
warnings: ["lock_info_invalid_shape"]
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
return {
|
|
500
|
+
info: {
|
|
501
|
+
id,
|
|
502
|
+
pid,
|
|
503
|
+
owner,
|
|
504
|
+
created_at: createdAt,
|
|
505
|
+
ttl_seconds: ttlSeconds
|
|
506
|
+
},
|
|
507
|
+
warnings: []
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
async function readLockInfo(lockPath) {
|
|
511
|
+
try {
|
|
512
|
+
const raw = await fs2.readFile(lockPath, "utf8");
|
|
513
|
+
await runActiveOnReadHooks({
|
|
514
|
+
path: lockPath,
|
|
515
|
+
scope: "project"
|
|
516
|
+
});
|
|
517
|
+
return parseLockInfo(raw);
|
|
518
|
+
} catch (error) {
|
|
519
|
+
if (isErrno(error, "ENOENT")) {
|
|
520
|
+
return {
|
|
521
|
+
info: null,
|
|
522
|
+
warnings: []
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
return {
|
|
526
|
+
info: null,
|
|
527
|
+
warnings: ["lock_info_read_failed"]
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function isErrno(error, code) {
|
|
532
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
533
|
+
}
|
|
534
|
+
async function emitLockWriteHook(lockPath, op) {
|
|
535
|
+
await runActiveOnWriteHooks({
|
|
536
|
+
path: lockPath,
|
|
537
|
+
scope: "project",
|
|
538
|
+
op
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
function buildLockPayload(id, owner, ttlSeconds) {
|
|
542
|
+
return {
|
|
543
|
+
id,
|
|
544
|
+
pid: process.pid,
|
|
545
|
+
owner,
|
|
546
|
+
created_at: nowIso(),
|
|
547
|
+
ttl_seconds: ttlSeconds
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
async function createLockFile(lockPath, id, owner, ttlSeconds) {
|
|
551
|
+
await fs2.mkdir(path2.dirname(lockPath), { recursive: true });
|
|
552
|
+
const handle = await fs2.open(lockPath, "wx");
|
|
553
|
+
try {
|
|
554
|
+
await handle.writeFile(`${JSON.stringify(buildLockPayload(id, owner, ttlSeconds), null, 2)}
|
|
555
|
+
`, "utf8");
|
|
556
|
+
} finally {
|
|
557
|
+
await handle.close();
|
|
558
|
+
}
|
|
559
|
+
await emitLockWriteHook(lockPath, "lock:create");
|
|
560
|
+
}
|
|
561
|
+
async function unlinkLockWithHook(lockPath, op) {
|
|
562
|
+
try {
|
|
563
|
+
await fs2.unlink(lockPath);
|
|
564
|
+
await emitLockWriteHook(lockPath, op);
|
|
565
|
+
} catch {
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function isStaleLock(info, ttlSeconds) {
|
|
569
|
+
const createdAtMs = info?.created_at ? Date.parse(info.created_at) : Number.NaN;
|
|
570
|
+
const ageMs = Number.isFinite(createdAtMs) ? Date.now() - createdAtMs : Number.POSITIVE_INFINITY;
|
|
571
|
+
return ageMs > ttlSeconds * 1e3;
|
|
572
|
+
}
|
|
573
|
+
function lockOwnerSuffix(info) {
|
|
574
|
+
return info?.owner ? ` (owner ${info.owner})` : "";
|
|
575
|
+
}
|
|
576
|
+
async function handleExistingLock(lockPath, id, ttlSeconds, force, forceRequiredForStaleLock) {
|
|
577
|
+
const lockInfo = await readLockInfo(lockPath);
|
|
578
|
+
if (!isStaleLock(lockInfo.info, ttlSeconds)) {
|
|
579
|
+
throw new PmCliError(`Item ${id} is locked${lockOwnerSuffix(lockInfo.info)}`, EXIT_CODE.CONFLICT);
|
|
580
|
+
}
|
|
581
|
+
if (!force && forceRequiredForStaleLock) {
|
|
582
|
+
const warningSuffix = lockInfo.warnings.length > 0 ? ` (${lockInfo.warnings.join(",")})` : "";
|
|
583
|
+
throw new PmCliError(`Item ${id} lock is stale${warningSuffix}; rerun with --force when supported for this command`, EXIT_CODE.CONFLICT);
|
|
584
|
+
}
|
|
585
|
+
await unlinkLockWithHook(lockPath, "lock:stale_remove");
|
|
586
|
+
}
|
|
587
|
+
async function acquireLock(pmRoot, id, ttlSeconds, owner, force = false, forceRequiredForStaleLock = true) {
|
|
588
|
+
const lockOverride = await runActiveServiceOverride("lock_acquire", {
|
|
589
|
+
pm_root: pmRoot,
|
|
590
|
+
id,
|
|
591
|
+
ttl_seconds: ttlSeconds,
|
|
592
|
+
owner,
|
|
593
|
+
force,
|
|
594
|
+
force_required_for_stale_lock: forceRequiredForStaleLock
|
|
595
|
+
});
|
|
596
|
+
if (lockOverride.handled) {
|
|
597
|
+
const releaseFromFunction = typeof lockOverride.result === "function" ? lockOverride.result : null;
|
|
598
|
+
const releaseFromObject = typeof lockOverride.result === "object" && lockOverride.result !== null && "release" in lockOverride.result && typeof lockOverride.result.release === "function" ? lockOverride.result.release : null;
|
|
599
|
+
const release = releaseFromFunction ?? releaseFromObject;
|
|
600
|
+
if (release) {
|
|
601
|
+
return async () => {
|
|
602
|
+
await Promise.resolve(release());
|
|
603
|
+
await runActiveServiceOverride("lock_release", {
|
|
604
|
+
pm_root: pmRoot,
|
|
605
|
+
id,
|
|
606
|
+
owner
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
const lockPath = getLockPath(pmRoot, id);
|
|
612
|
+
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
613
|
+
try {
|
|
614
|
+
await createLockFile(lockPath, id, owner, ttlSeconds);
|
|
615
|
+
return async () => {
|
|
616
|
+
await unlinkLockWithHook(lockPath, "lock:release");
|
|
617
|
+
await runActiveServiceOverride("lock_release", {
|
|
618
|
+
pm_root: pmRoot,
|
|
619
|
+
id,
|
|
620
|
+
owner
|
|
621
|
+
});
|
|
622
|
+
};
|
|
623
|
+
} catch (error) {
|
|
624
|
+
if (!isErrno(error, "EEXIST")) {
|
|
625
|
+
throw new PmCliError(`Failed to acquire lock for ${id}: ${toErrorMessage(error)}`, EXIT_CODE.GENERIC_FAILURE);
|
|
626
|
+
}
|
|
627
|
+
await handleExistingLock(lockPath, id, ttlSeconds, force, forceRequiredForStaleLock);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
throw new PmCliError(`Failed to acquire lock for ${id}`, EXIT_CODE.CONFLICT);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// dist/core/store/front-matter-cache.js
|
|
634
|
+
import fs3 from "node:fs/promises";
|
|
635
|
+
import path3 from "node:path";
|
|
267
636
|
import { createHash } from "node:crypto";
|
|
268
637
|
!(function() {
|
|
269
638
|
try {
|
|
270
639
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
271
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
640
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0b313ee5-78cb-5aa7-a288-d41e3ad6ecf8");
|
|
272
641
|
} catch (e2) {
|
|
273
642
|
}
|
|
274
643
|
})();
|
|
@@ -285,6 +654,9 @@ var HEAVY_METADATA_KEYS = [
|
|
|
285
654
|
"test_runs",
|
|
286
655
|
"docs"
|
|
287
656
|
];
|
|
657
|
+
function resolveActiveExtensionFieldNames() {
|
|
658
|
+
return collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
|
|
659
|
+
}
|
|
288
660
|
function splitHeavyMetadata(metadata) {
|
|
289
661
|
const light = { ...metadata };
|
|
290
662
|
const heavy = {};
|
|
@@ -302,7 +674,7 @@ function mergeHeavyMetadata(light, heavy) {
|
|
|
302
674
|
}
|
|
303
675
|
return { ...light, ...heavy };
|
|
304
676
|
}
|
|
305
|
-
function computeContextFingerprint(preferredFormat, typeToFolder, schema) {
|
|
677
|
+
function computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames) {
|
|
306
678
|
const hash = createHash("sha256");
|
|
307
679
|
hash.update(`format:${preferredFormat ?? "default"}`);
|
|
308
680
|
const sortedTypes = Object.entries(typeToFolder).sort(([a], [b]) => a.localeCompare(b)).map(([type, folder]) => `${type}=${folder}`).join(",");
|
|
@@ -310,20 +682,23 @@ function computeContextFingerprint(preferredFormat, typeToFolder, schema) {
|
|
|
310
682
|
if (schema) {
|
|
311
683
|
hash.update(`|schema:${JSON.stringify(schema)}`);
|
|
312
684
|
}
|
|
685
|
+
if (extensionFieldNames.length > 0) {
|
|
686
|
+
hash.update(`|extension_fields:${extensionFieldNames.join(",")}`);
|
|
687
|
+
}
|
|
313
688
|
return hash.digest("hex").slice(0, 16);
|
|
314
689
|
}
|
|
315
690
|
function getCachePath(pmRoot) {
|
|
316
|
-
return
|
|
691
|
+
return path3.join(pmRoot, "runtime", CACHE_FILENAME);
|
|
317
692
|
}
|
|
318
693
|
function getBodyCachePath(pmRoot) {
|
|
319
|
-
return
|
|
694
|
+
return path3.join(pmRoot, "runtime", BODY_CACHE_FILENAME);
|
|
320
695
|
}
|
|
321
696
|
function getCollectionsCachePath(pmRoot) {
|
|
322
|
-
return
|
|
697
|
+
return path3.join(pmRoot, "runtime", COLLECTIONS_CACHE_FILENAME);
|
|
323
698
|
}
|
|
324
699
|
async function loadCache(pmRoot) {
|
|
325
700
|
try {
|
|
326
|
-
const raw = await
|
|
701
|
+
const raw = await fs3.readFile(getCachePath(pmRoot), "utf8");
|
|
327
702
|
const parsed = JSON.parse(raw);
|
|
328
703
|
if (parsed.version !== CACHE_VERSION || typeof parsed.entries !== "object" || parsed.entries === null) {
|
|
329
704
|
return null;
|
|
@@ -335,7 +710,7 @@ async function loadCache(pmRoot) {
|
|
|
335
710
|
}
|
|
336
711
|
async function loadBodyCache(pmRoot) {
|
|
337
712
|
try {
|
|
338
|
-
const raw = await
|
|
713
|
+
const raw = await fs3.readFile(getBodyCachePath(pmRoot), "utf8");
|
|
339
714
|
const parsed = JSON.parse(raw);
|
|
340
715
|
if (parsed.version !== CACHE_VERSION || typeof parsed.bodies !== "object" || parsed.bodies === null) {
|
|
341
716
|
return null;
|
|
@@ -347,7 +722,7 @@ async function loadBodyCache(pmRoot) {
|
|
|
347
722
|
}
|
|
348
723
|
async function loadCollectionsCache(pmRoot) {
|
|
349
724
|
try {
|
|
350
|
-
const raw = await
|
|
725
|
+
const raw = await fs3.readFile(getCollectionsCachePath(pmRoot), "utf8");
|
|
351
726
|
const parsed = JSON.parse(raw);
|
|
352
727
|
if (parsed.version !== CACHE_VERSION || typeof parsed.collections !== "object" || parsed.collections === null) {
|
|
353
728
|
return null;
|
|
@@ -358,7 +733,7 @@ async function loadCollectionsCache(pmRoot) {
|
|
|
358
733
|
}
|
|
359
734
|
}
|
|
360
735
|
async function persistCache(cachePath, envelope) {
|
|
361
|
-
await
|
|
736
|
+
await fs3.mkdir(path3.dirname(cachePath), { recursive: true });
|
|
362
737
|
await writeFileAtomic(cachePath, JSON.stringify(envelope));
|
|
363
738
|
}
|
|
364
739
|
function appendWarning(warnings, warning) {
|
|
@@ -372,7 +747,8 @@ function statMatches(signature, mtimeMs, ctimeMs, size) {
|
|
|
372
747
|
async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, options = {}) {
|
|
373
748
|
const includeBody = options.includeBody !== false;
|
|
374
749
|
const includeCollections = options.includeCollections !== false;
|
|
375
|
-
const
|
|
750
|
+
const extensionFieldNames = resolveActiveExtensionFieldNames();
|
|
751
|
+
const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames);
|
|
376
752
|
const existingCache = await loadCache(pmRoot);
|
|
377
753
|
const previousEntries = existingCache && existingCache.context_fingerprint === contextFingerprint ? existingCache.entries : {};
|
|
378
754
|
const existingBodyCache = includeBody ? await loadBodyCache(pmRoot) : null;
|
|
@@ -381,9 +757,9 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
|
|
|
381
757
|
const previousCollections = existingCollectionsCache && existingCollectionsCache.context_fingerprint === contextFingerprint ? existingCollectionsCache.collections : {};
|
|
382
758
|
const entries = Object.entries(typeToFolder);
|
|
383
759
|
const dirResults = await Promise.all(entries.map(async ([, folder]) => {
|
|
384
|
-
const dirPath =
|
|
760
|
+
const dirPath = path3.join(pmRoot, folder);
|
|
385
761
|
try {
|
|
386
|
-
const files = await
|
|
762
|
+
const files = await fs3.readdir(dirPath);
|
|
387
763
|
return { folder, dirPath, files };
|
|
388
764
|
} catch (error) {
|
|
389
765
|
if (typeof error === "object" && error !== null && "code" in error && error.code !== "ENOENT") {
|
|
@@ -406,11 +782,11 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
|
|
|
406
782
|
if (!ITEM_FILE_EXTENSIONS.some((ext) => file.toLowerCase().endsWith(ext))) {
|
|
407
783
|
continue;
|
|
408
784
|
}
|
|
409
|
-
const filePath =
|
|
410
|
-
const relativePath =
|
|
785
|
+
const filePath = path3.join(dirPath, file);
|
|
786
|
+
const relativePath = path3.relative(pmRoot, filePath);
|
|
411
787
|
parseTasks.push((async () => {
|
|
412
788
|
try {
|
|
413
|
-
const stat = await
|
|
789
|
+
const stat = await fs3.stat(filePath);
|
|
414
790
|
const mtimeMs = stat.mtimeMs;
|
|
415
791
|
const ctimeMs = stat.ctimeMs;
|
|
416
792
|
const { size } = stat;
|
|
@@ -432,10 +808,11 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
|
|
|
432
808
|
let bodyLength;
|
|
433
809
|
let body;
|
|
434
810
|
if (needRead) {
|
|
435
|
-
const raw = await
|
|
811
|
+
const raw = await fs3.readFile(filePath, "utf8");
|
|
436
812
|
const parsed = parseItemDocument(raw, {
|
|
437
813
|
format: itemFormat,
|
|
438
814
|
schema,
|
|
815
|
+
extensionFieldNames,
|
|
439
816
|
onWarning: (w) => appendWarning(warnings, w)
|
|
440
817
|
});
|
|
441
818
|
const split = splitHeavyMetadata(parsed.metadata);
|
|
@@ -550,18 +927,18 @@ async function listAllDocumentsCachedLight(pmRoot, preferredFormat, typeToFolder
|
|
|
550
927
|
}
|
|
551
928
|
|
|
552
929
|
// dist/core/store/item-store.js
|
|
553
|
-
import
|
|
554
|
-
import
|
|
930
|
+
import fs4 from "node:fs/promises";
|
|
931
|
+
import path4 from "node:path";
|
|
555
932
|
!(function() {
|
|
556
933
|
try {
|
|
557
934
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
558
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
935
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "88895950-2871-5fe9-9c4e-04db3aada937");
|
|
559
936
|
} catch (e2) {
|
|
560
937
|
}
|
|
561
938
|
})();
|
|
562
939
|
async function fileExists(targetPath) {
|
|
563
940
|
try {
|
|
564
|
-
await
|
|
941
|
+
await fs4.access(targetPath);
|
|
565
942
|
return true;
|
|
566
943
|
} catch {
|
|
567
944
|
return false;
|
|
@@ -575,6 +952,9 @@ function appendWarning2(warnings, warning) {
|
|
|
575
952
|
warnings.push(warning);
|
|
576
953
|
}
|
|
577
954
|
}
|
|
955
|
+
function resolveActiveExtensionFieldNames2(explicit) {
|
|
956
|
+
return explicit ?? collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
|
|
957
|
+
}
|
|
578
958
|
function resolveItemFormatSearchOrder(preferredFormat) {
|
|
579
959
|
if (preferredFormat === "toon") {
|
|
580
960
|
return ["toon", "json_markdown"];
|
|
@@ -608,7 +988,7 @@ async function locateItem(pmRoot, rawId, idPrefix, preferredFormat, typeToFolder
|
|
|
608
988
|
return null;
|
|
609
989
|
}
|
|
610
990
|
async function readLocatedItem(item, options = {}) {
|
|
611
|
-
const raw = await
|
|
991
|
+
const raw = await fs4.readFile(item.itemPath, "utf8");
|
|
612
992
|
await runActiveOnReadHooks({
|
|
613
993
|
path: item.itemPath,
|
|
614
994
|
scope: "project"
|
|
@@ -616,6 +996,7 @@ async function readLocatedItem(item, options = {}) {
|
|
|
616
996
|
const document = parseItemDocument(raw, {
|
|
617
997
|
format: item.item_format,
|
|
618
998
|
schema: options.schema,
|
|
999
|
+
extensionFieldNames: resolveActiveExtensionFieldNames2(options.extensionFieldNames),
|
|
619
1000
|
onWarning: (warning) => appendWarning2(options.warnings, warning)
|
|
620
1001
|
});
|
|
621
1002
|
return { raw, document };
|
|
@@ -640,7 +1021,7 @@ async function listKnownItemIds(pmRoot, typeToFolder) {
|
|
|
640
1021
|
const allIds = [];
|
|
641
1022
|
await Promise.all([...folders].map(async (folder) => {
|
|
642
1023
|
try {
|
|
643
|
-
const entries = await
|
|
1024
|
+
const entries = await fs4.readdir(path4.join(pmRoot, folder));
|
|
644
1025
|
for (const entry of entries) {
|
|
645
1026
|
for (const ext of ITEM_FILE_EXTENSIONS) {
|
|
646
1027
|
if (entry.toLowerCase().endsWith(ext)) {
|
|
@@ -702,6 +1083,7 @@ async function prepareLockedItem(params) {
|
|
|
702
1083
|
const warnings = [];
|
|
703
1084
|
const { raw: originalRaw, document } = await readLocatedItem(located, {
|
|
704
1085
|
schema: params.settings.schema,
|
|
1086
|
+
extensionFieldNames: params.extensionFieldNames,
|
|
705
1087
|
warnings
|
|
706
1088
|
});
|
|
707
1089
|
const assigned = document.metadata.assignee?.trim();
|
|
@@ -737,6 +1119,7 @@ async function mutateItem(params) {
|
|
|
737
1119
|
author: params.author,
|
|
738
1120
|
force: params.force,
|
|
739
1121
|
bypassAssigneeConflict: params.bypassAssigneeConflict,
|
|
1122
|
+
extensionFieldNames: params.extensionFieldNames,
|
|
740
1123
|
typeToFolder: params.typeToFolder
|
|
741
1124
|
});
|
|
742
1125
|
const { typeToFolder, located, originalRaw, document, warnings: parseWarnings, releaseLock } = prepared;
|
|
@@ -747,15 +1130,25 @@ async function mutateItem(params) {
|
|
|
747
1130
|
itemId: located.id,
|
|
748
1131
|
commandLabel: params.op
|
|
749
1132
|
});
|
|
750
|
-
const beforeDocument = canonicalDocument(document, {
|
|
751
|
-
|
|
1133
|
+
const beforeDocument = canonicalDocument(document, {
|
|
1134
|
+
schema: params.settings.schema,
|
|
1135
|
+
extensionFieldNames: params.extensionFieldNames
|
|
1136
|
+
});
|
|
1137
|
+
const mutableDocument = canonicalDocument(structuredClone(document), {
|
|
1138
|
+
schema: params.settings.schema,
|
|
1139
|
+
extensionFieldNames: params.extensionFieldNames
|
|
1140
|
+
});
|
|
752
1141
|
const mutation = params.mutate(mutableDocument);
|
|
753
1142
|
mutableDocument.metadata.updated_at = nowIso();
|
|
754
|
-
const afterDocument = canonicalDocument(mutableDocument, {
|
|
1143
|
+
const afterDocument = canonicalDocument(mutableDocument, {
|
|
1144
|
+
schema: params.settings.schema,
|
|
1145
|
+
extensionFieldNames: params.extensionFieldNames
|
|
1146
|
+
});
|
|
755
1147
|
const targetItemFormat = "toon";
|
|
756
1148
|
const serializedAfter = serializeItemDocument(afterDocument, {
|
|
757
1149
|
format: targetItemFormat,
|
|
758
|
-
schema: params.settings.schema
|
|
1150
|
+
schema: params.settings.schema,
|
|
1151
|
+
extensionFieldNames: params.extensionFieldNames
|
|
759
1152
|
});
|
|
760
1153
|
const targetItemPath = getItemPath(params.pmRoot, afterDocument.metadata.type, located.id, targetItemFormat, typeToFolder);
|
|
761
1154
|
const historyPath = getHistoryPath(params.pmRoot, located.id);
|
|
@@ -790,7 +1183,7 @@ async function mutateItem(params) {
|
|
|
790
1183
|
await writeFileAtomic(effectiveTargetItemPath, effectiveSerializedAfter);
|
|
791
1184
|
}
|
|
792
1185
|
if (!skipItemWrite && effectiveTargetItemPath !== located.itemPath) {
|
|
793
|
-
await
|
|
1186
|
+
await fs4.rm(located.itemPath);
|
|
794
1187
|
}
|
|
795
1188
|
const entry = createHistoryEntry({
|
|
796
1189
|
nowIso: afterDocument.metadata.updated_at,
|
|
@@ -805,7 +1198,7 @@ async function mutateItem(params) {
|
|
|
805
1198
|
} catch (error) {
|
|
806
1199
|
if (!skipItemWrite && effectiveTargetItemPath !== located.itemPath) {
|
|
807
1200
|
await writeFileAtomic(located.itemPath, originalRaw);
|
|
808
|
-
await
|
|
1201
|
+
await fs4.rm(effectiveTargetItemPath, { force: true });
|
|
809
1202
|
} else if (!skipItemWrite) {
|
|
810
1203
|
await writeFileAtomic(located.itemPath, originalRaw);
|
|
811
1204
|
}
|
|
@@ -815,14 +1208,34 @@ async function mutateItem(params) {
|
|
|
815
1208
|
...await runActiveOnWriteHooks({
|
|
816
1209
|
path: effectiveTargetItemPath,
|
|
817
1210
|
scope: "project",
|
|
818
|
-
op: params.op
|
|
1211
|
+
op: params.op,
|
|
1212
|
+
item_id: afterDocument.metadata.id,
|
|
1213
|
+
item_type: afterDocument.metadata.type,
|
|
1214
|
+
before: beforeDocument,
|
|
1215
|
+
after: afterDocument,
|
|
1216
|
+
changed_fields: mutation.changedFields
|
|
819
1217
|
}),
|
|
820
1218
|
...await runActiveOnWriteHooks({
|
|
821
1219
|
path: historyPath,
|
|
822
1220
|
scope: "project",
|
|
823
|
-
op: `${params.op}:history
|
|
1221
|
+
op: `${params.op}:history`,
|
|
1222
|
+
item_id: afterDocument.metadata.id,
|
|
1223
|
+
item_type: afterDocument.metadata.type,
|
|
1224
|
+
before: beforeDocument,
|
|
1225
|
+
after: afterDocument,
|
|
1226
|
+
changed_fields: mutation.changedFields
|
|
824
1227
|
})
|
|
825
1228
|
];
|
|
1229
|
+
recordAfterCommandAffectedItem({
|
|
1230
|
+
id: afterDocument.metadata.id,
|
|
1231
|
+
op: params.op,
|
|
1232
|
+
item_type: afterDocument.metadata.type,
|
|
1233
|
+
previous_status: beforeDocument.metadata.status,
|
|
1234
|
+
status: afterDocument.metadata.status,
|
|
1235
|
+
previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, mutation.changedFields),
|
|
1236
|
+
current: projectAfterCommandItemSnapshot(afterDocument.metadata, mutation.changedFields),
|
|
1237
|
+
changed_fields: mutation.changedFields
|
|
1238
|
+
});
|
|
826
1239
|
return {
|
|
827
1240
|
item: afterDocument.metadata,
|
|
828
1241
|
body: afterDocument.body,
|
|
@@ -896,7 +1309,7 @@ async function deleteItem(params) {
|
|
|
896
1309
|
};
|
|
897
1310
|
}
|
|
898
1311
|
if (!skipDelete) {
|
|
899
|
-
await
|
|
1312
|
+
await fs4.rm(effectiveItemPath);
|
|
900
1313
|
}
|
|
901
1314
|
try {
|
|
902
1315
|
await appendHistoryEntry(historyPath, historyEntry);
|
|
@@ -910,14 +1323,32 @@ async function deleteItem(params) {
|
|
|
910
1323
|
...await runActiveOnWriteHooks({
|
|
911
1324
|
path: effectiveItemPath,
|
|
912
1325
|
scope: "project",
|
|
913
|
-
op: "delete"
|
|
1326
|
+
op: "delete",
|
|
1327
|
+
item_id: beforeDocument.metadata.id,
|
|
1328
|
+
item_type: beforeDocument.metadata.type,
|
|
1329
|
+
before: beforeDocument,
|
|
1330
|
+
after: tombstoneDocument,
|
|
1331
|
+
changed_fields: ["deleted"]
|
|
914
1332
|
}),
|
|
915
1333
|
...await runActiveOnWriteHooks({
|
|
916
1334
|
path: historyPath,
|
|
917
1335
|
scope: "project",
|
|
918
|
-
op: "delete:history"
|
|
1336
|
+
op: "delete:history",
|
|
1337
|
+
item_id: beforeDocument.metadata.id,
|
|
1338
|
+
item_type: beforeDocument.metadata.type,
|
|
1339
|
+
before: beforeDocument,
|
|
1340
|
+
after: tombstoneDocument,
|
|
1341
|
+
changed_fields: ["deleted"]
|
|
919
1342
|
})
|
|
920
1343
|
];
|
|
1344
|
+
recordAfterCommandAffectedItem({
|
|
1345
|
+
id: beforeDocument.metadata.id,
|
|
1346
|
+
op: "delete",
|
|
1347
|
+
item_type: beforeDocument.metadata.type,
|
|
1348
|
+
previous_status: beforeDocument.metadata.status,
|
|
1349
|
+
previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, Object.keys(beforeDocument.metadata)),
|
|
1350
|
+
changed_fields: ["deleted"]
|
|
1351
|
+
});
|
|
921
1352
|
return {
|
|
922
1353
|
item: beforeDocument.metadata,
|
|
923
1354
|
changedFields: ["deleted"],
|
|
@@ -929,6 +1360,9 @@ async function deleteItem(params) {
|
|
|
929
1360
|
}
|
|
930
1361
|
|
|
931
1362
|
export {
|
|
1363
|
+
collectRegisteredItemFieldNames,
|
|
1364
|
+
parseRegisteredItemFieldAssignments,
|
|
1365
|
+
applyRegisteredItemFieldDefaultsAndValidation,
|
|
932
1366
|
toItemRecord,
|
|
933
1367
|
hashDocument,
|
|
934
1368
|
hashEmptyDocument,
|
|
@@ -936,6 +1370,7 @@ export {
|
|
|
936
1370
|
appendHistoryEntry,
|
|
937
1371
|
enforceHistoryStreamPolicyForItem,
|
|
938
1372
|
enforceHistoryStreamPolicyForItems,
|
|
1373
|
+
acquireLock,
|
|
939
1374
|
HEAVY_METADATA_KEYS,
|
|
940
1375
|
listAllDocumentCandidatesCached,
|
|
941
1376
|
locateItem,
|
|
@@ -947,4 +1382,4 @@ export {
|
|
|
947
1382
|
mutateItem,
|
|
948
1383
|
deleteItem
|
|
949
1384
|
};
|
|
950
|
-
//# sourceMappingURL=chunk-
|
|
1385
|
+
//# sourceMappingURL=chunk-XTGLRY2Y.js.map
|