@unbrained/pm-cli 2026.7.1 → 2026.7.2
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 +6 -0
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +58 -47
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +102 -79
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +278 -243
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +89 -68
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +157 -129
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +50 -42
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +2 -0
- package/dist/cli/commands/config.js +443 -879
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +365 -287
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +352 -238
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +46 -39
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/dedupe-merge.js +88 -69
- package/dist/cli/commands/dedupe-merge.js.map +1 -1
- package/dist/cli/commands/get.js +114 -81
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +17 -0
- package/dist/cli/commands/health.js +446 -307
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +209 -140
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.js +162 -119
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +120 -85
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init.d.ts +8 -2
- package/dist/cli/commands/init.js +263 -162
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.js +152 -102
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.js +49 -32
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.js +373 -298
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.js +43 -25
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +21 -5
- package/dist/cli/commands/reindex.js +345 -205
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +8 -7
- package/dist/cli/commands/restore.js +105 -69
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +33 -30
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +10 -2
- package/dist/cli/commands/search.js +503 -470
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +424 -344
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +738 -671
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +18 -1
- package/dist/cli/commands/validate.js +466 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +399 -357
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +428 -341
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +22 -45
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +94 -105
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +400 -416
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +86 -66
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +120 -101
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-CUC4JY3U.js} +9 -9
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-DKUTRY6R.js} +108 -84
- package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-SW5PNGCS.js} +107 -83
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-SW5PNGCS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-H32VOR2Y.js} +6 -6
- package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-UBM632FK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-2227673O.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-2ASNV4DH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-2CHRYUXL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-2KWL5NPW.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-36UGKF4O.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-3AZUFQK6.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-3LCUASYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-3Q2HBMTI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-4NUOWFBT.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-55XRYWEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-5GVTFFTC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-5PGBHRY3.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-66Z3X7ZG.js} +261 -161
- package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-6ITZLD4T.js} +712 -612
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-6YCYF2AI.js} +262 -162
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-6ZMBJRDJ.js} +492 -403
- package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-7MYWF4ZX.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-7NSPKJUS.js} +356 -285
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-7TH5NMVB.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-7W4H4K26.js} +713 -613
- package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-A6VOGKBA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AIAIXG7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-AJEBCRIY.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-BTX5MIQF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-BVZZN2LH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-CYBDUHNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-CZPVDLD2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-EMPGXBUF.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-EUKTMRN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-FFOQHGNH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-GFMSLORL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-GRRG3MCT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-H4GRLYJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-HQTPRV4D.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-I66WE2HE.js} +354 -283
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-IEEJQCZ4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-IG5JYZGU.js} +390 -312
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-IG5JYZGU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-JMK5GCK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-JXAUVO6X.js} +258 -169
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js.map → chunk-JXAUVO6X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-K2VYLVX4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KCO2EAN5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-KIYCOJ63.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-KLXF7NCC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-KN3URLKS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-LRKMWUUV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-LTRAF2D7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-MNBPX5JS.js} +55 -36
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-MRD4T5LF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-N2JSWVWG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-N3QCJS4M.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-NRZS637N.js} +258 -169
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-OTUJZKGI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-Q6K2OACU.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-Q6NXOHS6.js} +391 -313
- package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-QH3FSKRJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-RM37OPYK.js} +56 -37
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-S62UANU7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-SPM2XLWI.js} +37 -28
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-SYNKD3ZG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-SYVUU7EK.js} +493 -404
- package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-TPOFWBMY.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-TTHCEV5Q.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-U2BEEM2X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-UGLU6Q2I.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UT73HUPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-UTSH5GWX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-UWKEJMZU.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-W47SML5B.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WJAMWAHZ.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-XCHUVHKU.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-XEWQKDYZ.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-XTHQWXVC.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-XWGEMNBR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-Y4NRKBFW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-YLZZ6T54.js} +38 -29
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-YPKFV2JR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-ZNHEYCDD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-ZNT7KEWE.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-SENTPZBN.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-Z7MEQCBT.js} +8 -8
- package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-424MX4CU.js} +7 -7
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
- package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-2IV4J2TR.js} +102 -81
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-SWY34BII.js} +101 -80
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-4FGNTSNV.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-7YS5MY5X.js} +8 -8
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-LHVKJSPJ.js} +12 -12
- package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-ZQY54JNS.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-CP2EZJC7.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-FIZLMP7O.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-GYNQQPW2.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-TLW7JTQT.js} +5 -5
- package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-VSKYSOCD.js} +12 -12
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
- package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-4W5JYCEG.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-ANTOTI2I.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-HPPE6MJN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-ZQZN54EZ.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-RPOVFMP3.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-XJNYBJGE.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-DM6JBZTS.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-RFBI5FGS.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-B3YY4WY5.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-TTSEFQTS.js} +11 -11
- package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-5D65CHGE.js} +7 -7
- package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-GPIG77EN.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-C3PEJV2C.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-ZHN7WIGX.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-D4JQ6OWN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-VZIXDL32.js} +3 -3
- package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-GIBRUUOP.js} +121 -81
- package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-IOVAN6RU.js} +120 -80
- package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-L2U3AFKV.js} +437 -265
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-MM7AWXYF.js} +436 -264
- package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
- package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
- package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-IL7XCEX2.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-HALOTOU7.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-MV25P7DM.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-VYCWQFK7.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-44MODPQF.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-CPNAOCNF.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-F27NHENZ.js} +12 -12
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-HJVDQIGY.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-XSFSUUWK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-HPMEKCAA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-VMPWTURB.js} +8 -8
- package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-ETXF2ZCN.js} +59 -37
- package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
- package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-QM6YJIIS.js} +60 -38
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-GDZIKGR6.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-WDDBPC4D.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-BGDR73Z6.js} +373 -279
- package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-C5IMM335.js} +372 -278
- package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-CCOKZ2IQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-HUCENIEQ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-7LV46VAU.js → register-list-query-ROSNIL52.js} +80 -83
- package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-SNG5PGA4.js → register-list-query-XN4ZRHSV.js} +79 -82
- package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-CFSB2MS3.js} +403 -382
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-KRLAHEL2.js} +402 -381
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-4PASGJDB.js} +112 -93
- package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-C6OWLDSH.js → register-operations-MBN4KGUM.js} +113 -94
- package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-VIAWYFP5.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-ZCGKHDKL.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-4CBWUMCX.js} +9 -9
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-TDGK6N3I.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-UE5KKAUX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-FP7MEU4S.js} +10 -10
- package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-K4CFLQ5S.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-NJJCALEZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-XT6QRKQY.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-5SQ5UDXC.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-HVXFZA2U.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-UFSJ5YIO.js} +15 -15
- package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-YCDAUBWF.js} +15 -15
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-FK5E75AA.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-H4TGWGRN.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
- package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-Y5WQVT5O.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-6YAYYRLE.js} +82 -67
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-6YAYYRLE.js.map} +2 -2
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-JTKKSA7Y.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-JTKKSA7Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-DTAHZ236.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-JUDU7YL4.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-732RWS5W.js} +440 -320
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-W7H5TEDC.js} +441 -321
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
- package/dist/cli-bundle/main.js +945 -812
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +87 -82
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/mutation-projection.js +42 -26
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +34 -28
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +64 -37
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +32 -17
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +31 -28
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +54 -43
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +239 -153
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.js +33 -26
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +247 -203
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/background-runs.js +189 -160
- package/dist/core/test/background-runs.js.map +1 -1
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
- package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4DSGXSBL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UYUYDGIB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
- package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
- package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
- package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
- package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
- package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-CUC4JY3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-WEIEMM73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-H32VOR2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-UBM632FK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-2ASNV4DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-2CHRYUXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-3AZUFQK6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-3LCUASYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-3Q2HBMTI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-55XRYWEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js.map → chunk-5GVTFFTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-A6VOGKBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js.map → chunk-AIAIXG7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js.map → chunk-AJEBCRIY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-BTX5MIQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-BVZZN2LH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-CYBDUHNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-CZPVDLD2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-EUKTMRN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-FFOQHGNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js.map → chunk-GFMSLORL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-GRRG3MCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-H4GRLYJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-HQTPRV4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-IEEJQCZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-JMK5GCK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js.map → chunk-K2VYLVX4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KCO2EAN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-KIYCOJ63.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-KLXF7NCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-KN3URLKS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-LRKMWUUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-LTRAF2D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-MRD4T5LF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-N2JSWVWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-N3QCJS4M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-OTUJZKGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-QH3FSKRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-S62UANU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js.map → chunk-SYNKD3ZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-U2BEEM2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UT73HUPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-UTSH5GWX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js.map → chunk-XWGEMNBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-Y4NRKBFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js.map → chunk-YPKFV2JR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-ZNHEYCDD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-SENTPZBN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-Z7MEQCBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-424MX4CU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-YCWQQPDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-4FGNTSNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-7YS5MY5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-LHVKJSPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-ZQY54JNS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-GYNQQPW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-TLW7JTQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-VSKYSOCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-XTMAPS7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-4W5JYCEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-ANTOTI2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-HPPE6MJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-ZQZN54EZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-RPOVFMP3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-XJNYBJGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-DM6JBZTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-RFBI5FGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-B3YY4WY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-TTSEFQTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-5D65CHGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-GPIG77EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-C3PEJV2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-ZHN7WIGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-D4JQ6OWN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-VZIXDL32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-DD7L7BNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-IL7XCEX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-IX4YEWMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-VYCWQFK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-F27NHENZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-HHVQQP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-HJVDQIGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-XSFSUUWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-HPMEKCAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-VMPWTURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-GDZIKGR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-WDDBPC4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-QLER5ENE.js.map → profile-CCOKZ2IQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-4OMM32CD.js.map → profile-HUCENIEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-4CBWUMCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-5UEAGG3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-TDGK6N3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-UE5KKAUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-FP7MEU4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-K4CFLQ5S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-NJJCALEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-XT6QRKQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-UFSJ5YIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-YCDAUBWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-MTCFES6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-Y5WQVT5O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-DTAHZ236.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-JUDU7YL4.js.map} +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="636bc41a-f03b-528f-84cb-5ab89ae42c00")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
describeAllowedTransitions,
|
|
5
5
|
evaluateTransition,
|
|
6
6
|
resolveTypeWorkflows
|
|
7
7
|
} from "./chunk-YJIEJRZB.js";
|
|
8
|
+
import {
|
|
9
|
+
runClose
|
|
10
|
+
} from "./chunk-XTHQWXVC.js";
|
|
8
11
|
import {
|
|
9
12
|
COMMON_UNSET_FIELD_DEFINITIONS_AFTER_AUTHOR,
|
|
10
13
|
COMMON_UNSET_FIELD_DEFINITIONS_AFTER_CLOSE_REASON_BEFORE_AUTHOR,
|
|
@@ -27,7 +30,7 @@ import {
|
|
|
27
30
|
parseTypeOptionEntries,
|
|
28
31
|
resolvePriority,
|
|
29
32
|
resolveRuntimeUnsetFieldDefinition
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RM37OPYK.js";
|
|
31
34
|
import {
|
|
32
35
|
applyTagRemovals,
|
|
33
36
|
assertNoUnknownCsvKeys,
|
|
@@ -37,18 +40,15 @@ import {
|
|
|
37
40
|
parseCsvKv,
|
|
38
41
|
parseOptionalNumber,
|
|
39
42
|
parseTags
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import {
|
|
42
|
-
runClose
|
|
43
|
-
} from "./chunk-TP5Q5ZD3.js";
|
|
43
|
+
} from "./chunk-KLXF7NCC.js";
|
|
44
44
|
import {
|
|
45
45
|
normalizeParentReferenceValue,
|
|
46
46
|
validateMissingParentReference,
|
|
47
47
|
validateSprintOrReleaseValue
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-QH3FSKRJ.js";
|
|
49
49
|
import {
|
|
50
50
|
buildInvalidTypeError
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-ZNT7KEWE.js";
|
|
52
52
|
import {
|
|
53
53
|
applyRegisteredItemFieldDefaultsAndValidation,
|
|
54
54
|
buildItemNotFoundError,
|
|
@@ -59,14 +59,14 @@ import {
|
|
|
59
59
|
parseRegisteredItemFieldAssignments,
|
|
60
60
|
readLocatedItem,
|
|
61
61
|
toItemRecord
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-NRZS637N.js";
|
|
63
63
|
import {
|
|
64
64
|
collectRuntimeUpdateFieldValues,
|
|
65
65
|
normalizeStatusInput
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-KN3URLKS.js";
|
|
67
67
|
import {
|
|
68
68
|
resolveIsoOrRelative
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-K2VYLVX4.js";
|
|
70
70
|
import {
|
|
71
71
|
DEPENDENCY_KIND_VALUES,
|
|
72
72
|
EXIT_CODE,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
resolveTypeName,
|
|
90
90
|
stableValueEquals,
|
|
91
91
|
validateTypeOptions
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-I66WE2HE.js";
|
|
93
93
|
|
|
94
94
|
// dist/cli/commands/update.js
|
|
95
95
|
var UPDATE_UNSET_FIELD_DEFINITIONS = [
|
|
@@ -572,7 +572,7 @@ function normalizeUpdatePolicyOptionKey(raw, typeName) {
|
|
|
572
572
|
}
|
|
573
573
|
return canonical;
|
|
574
574
|
}
|
|
575
|
-
function collectProvidedUpdatePolicyOptions(options, extensionFieldNames) {
|
|
575
|
+
function collectProvidedUpdatePolicyOptions(options, runtimeFieldRegistry, extensionFieldNames) {
|
|
576
576
|
const provided = /* @__PURE__ */ new Set();
|
|
577
577
|
const mark = (optionKey, isProvided) => {
|
|
578
578
|
if (isProvided) {
|
|
@@ -649,14 +649,14 @@ function collectProvidedUpdatePolicyOptions(options, extensionFieldNames) {
|
|
|
649
649
|
mark("event", options.clearEvents === true);
|
|
650
650
|
mark("typeOption", options.clearTypeOptions === true);
|
|
651
651
|
if (options.unset && options.unset.length > 0) {
|
|
652
|
-
const unsetTargets = parseUpdateUnsetTargets(options.unset,
|
|
652
|
+
const unsetTargets = parseUpdateUnsetTargets(options.unset, runtimeFieldRegistry, extensionFieldNames);
|
|
653
653
|
for (const optionKey of unsetTargets.optionKeys) {
|
|
654
654
|
mark(optionKey, true);
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
return provided;
|
|
658
658
|
}
|
|
659
|
-
function enforceUpdateOptionsByType(typeName, options, typeRegistry, extensionFieldNames) {
|
|
659
|
+
function enforceUpdateOptionsByType(typeName, options, typeRegistry, runtimeFieldRegistry, extensionFieldNames) {
|
|
660
660
|
const typeDefinition = resolveTypeDefinition(typeName, typeRegistry);
|
|
661
661
|
if (!typeDefinition) {
|
|
662
662
|
throw new PmCliError(`Invalid type value "${typeName}"`, EXIT_CODE.USAGE);
|
|
@@ -665,7 +665,7 @@ function enforceUpdateOptionsByType(typeName, options, typeRegistry, extensionFi
|
|
|
665
665
|
if (policyState.errors.length > 0) {
|
|
666
666
|
throw new PmCliError(policyState.errors.join("; "), EXIT_CODE.CONFLICT);
|
|
667
667
|
}
|
|
668
|
-
const provided = collectProvidedUpdatePolicyOptions(options, extensionFieldNames);
|
|
668
|
+
const provided = collectProvidedUpdatePolicyOptions(options, runtimeFieldRegistry, extensionFieldNames);
|
|
669
669
|
for (const disabled of policyState.disabled) {
|
|
670
670
|
if (provided.has(normalizeUpdatePolicyOptionKey(disabled, typeName))) {
|
|
671
671
|
throw new PmCliError(`Option ${commandOptionFlagLabel("update", disabled)} is disabled for type "${typeName}" by command_option_policies`, EXIT_CODE.USAGE);
|
|
@@ -677,6 +677,95 @@ function enforceUpdateOptionsByType(typeName, options, typeRegistry, extensionFi
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
+
var UPDATE_LEGACY_SCALAR_OPTION_KEYS = [
|
|
681
|
+
"tags",
|
|
682
|
+
"closeReason",
|
|
683
|
+
"deadline",
|
|
684
|
+
"estimatedMinutes",
|
|
685
|
+
"acceptanceCriteria",
|
|
686
|
+
"definitionOfReady",
|
|
687
|
+
"goal",
|
|
688
|
+
"objective",
|
|
689
|
+
"value",
|
|
690
|
+
"impact",
|
|
691
|
+
"outcome",
|
|
692
|
+
"whyNow",
|
|
693
|
+
"assignee",
|
|
694
|
+
"parent",
|
|
695
|
+
"reviewer",
|
|
696
|
+
"risk",
|
|
697
|
+
"confidence",
|
|
698
|
+
"sprint",
|
|
699
|
+
"release",
|
|
700
|
+
"blockedBy",
|
|
701
|
+
"blockedReason",
|
|
702
|
+
"unblockNote",
|
|
703
|
+
"reporter",
|
|
704
|
+
"severity",
|
|
705
|
+
"environment",
|
|
706
|
+
"reproSteps",
|
|
707
|
+
"resolution",
|
|
708
|
+
"expectedResult",
|
|
709
|
+
"actualResult",
|
|
710
|
+
"affectedVersion",
|
|
711
|
+
"fixedVersion",
|
|
712
|
+
"component",
|
|
713
|
+
"regression",
|
|
714
|
+
"customerImpact"
|
|
715
|
+
];
|
|
716
|
+
var UPDATE_SIMPLE_FIELD_FLAG_KEYS = [
|
|
717
|
+
"title",
|
|
718
|
+
"description",
|
|
719
|
+
"body",
|
|
720
|
+
"status",
|
|
721
|
+
"closeReason",
|
|
722
|
+
"priority",
|
|
723
|
+
"type",
|
|
724
|
+
"deadline",
|
|
725
|
+
"estimatedMinutes",
|
|
726
|
+
"acceptanceCriteria",
|
|
727
|
+
"definitionOfReady",
|
|
728
|
+
"goal",
|
|
729
|
+
"objective",
|
|
730
|
+
"value",
|
|
731
|
+
"impact",
|
|
732
|
+
"outcome",
|
|
733
|
+
"whyNow",
|
|
734
|
+
"assignee",
|
|
735
|
+
"parent",
|
|
736
|
+
"reviewer",
|
|
737
|
+
"risk",
|
|
738
|
+
"confidence",
|
|
739
|
+
"sprint",
|
|
740
|
+
"release",
|
|
741
|
+
"blockedBy",
|
|
742
|
+
"blockedReason",
|
|
743
|
+
"unblockNote",
|
|
744
|
+
"reporter",
|
|
745
|
+
"severity",
|
|
746
|
+
"environment",
|
|
747
|
+
"reproSteps",
|
|
748
|
+
"resolution",
|
|
749
|
+
"expectedResult",
|
|
750
|
+
"actualResult",
|
|
751
|
+
"affectedVersion",
|
|
752
|
+
"fixedVersion",
|
|
753
|
+
"component",
|
|
754
|
+
"regression",
|
|
755
|
+
"customerImpact",
|
|
756
|
+
"dep",
|
|
757
|
+
"depRemove",
|
|
758
|
+
"comment",
|
|
759
|
+
"note",
|
|
760
|
+
"learning",
|
|
761
|
+
"file",
|
|
762
|
+
"test",
|
|
763
|
+
"doc",
|
|
764
|
+
"reminder",
|
|
765
|
+
"event",
|
|
766
|
+
"typeOption",
|
|
767
|
+
"field"
|
|
768
|
+
];
|
|
680
769
|
var UPDATE_POST_TAG_SCALAR_MUTATIONS = [
|
|
681
770
|
{
|
|
682
771
|
optionKey: "deadline",
|
|
@@ -741,9 +830,9 @@ function applyUpdateScalarMutations(definitions, options, context) {
|
|
|
741
830
|
context.changedFields.push(definition.metadataKey);
|
|
742
831
|
}
|
|
743
832
|
}
|
|
744
|
-
async function
|
|
833
|
+
async function resolveStdinUpdateOptions(options) {
|
|
745
834
|
const stdinResolver = createStdinTokenResolver();
|
|
746
|
-
|
|
835
|
+
return normalizeLegacyNoneUpdateOptions({
|
|
747
836
|
...options,
|
|
748
837
|
body: await stdinResolver.resolveValue(options.body, "--body"),
|
|
749
838
|
dep: await stdinResolver.resolveList(options.dep, "--dep"),
|
|
@@ -759,24 +848,9 @@ async function runUpdate(id, options, global) {
|
|
|
759
848
|
typeOption: await stdinResolver.resolveList(options.typeOption, "--type-option"),
|
|
760
849
|
field: await stdinResolver.resolveList(options.field, "--field")
|
|
761
850
|
});
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
const settings = await readSettings(pmRoot);
|
|
767
|
-
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
768
|
-
const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
|
|
769
|
-
const extensionRegistrations = getActiveExtensionRegistrations();
|
|
770
|
-
const extensionFieldNames = collectRegisteredItemFieldNames(extensionRegistrations);
|
|
771
|
-
const typeRegistry = resolveItemTypeRegistry(settings, extensionRegistrations);
|
|
772
|
-
const workflowEnforcement = settings.governance.workflow_enforcement ?? "off";
|
|
773
|
-
const typeWorkflows = workflowEnforcement === "off" ? [] : resolveTypeWorkflows(settings.schema);
|
|
774
|
-
const parentReferencePolicy = settings.validation.parent_reference;
|
|
775
|
-
const sprintReleasePolicy = settings.validation.sprint_release_format;
|
|
776
|
-
const unsetTargets = parseUpdateUnsetTargets(options.unset, runtimeFieldRegistry, extensionFieldNames);
|
|
777
|
-
const clearOptionKeys = new Set(unsetTargets.optionKeys);
|
|
778
|
-
const clearFrontMatterKeys = new Set(unsetTargets.frontMatterKeys);
|
|
779
|
-
const clearCollectionDefinitions = [
|
|
851
|
+
}
|
|
852
|
+
function buildClearCollectionDefinitions(options) {
|
|
853
|
+
return [
|
|
780
854
|
{
|
|
781
855
|
enabled: options.clearDeps || options.replaceDeps,
|
|
782
856
|
optionKey: "dep",
|
|
@@ -858,6 +932,8 @@ async function runUpdate(id, options, global) {
|
|
|
858
932
|
frontMatterKey: "type_options"
|
|
859
933
|
}
|
|
860
934
|
];
|
|
935
|
+
}
|
|
936
|
+
function validateReplaceOptions(options) {
|
|
861
937
|
if (options.replaceDeps === true && (options.dep === void 0 || options.dep.length === 0)) {
|
|
862
938
|
throw new PmCliError("--replace-deps requires at least one --dep entry", EXIT_CODE.USAGE);
|
|
863
939
|
}
|
|
@@ -870,54 +946,30 @@ async function runUpdate(id, options, global) {
|
|
|
870
946
|
if (options.replaceTests === true && options.clearTests === true) {
|
|
871
947
|
throw new PmCliError("--replace-tests cannot be combined with --clear-tests", EXIT_CODE.USAGE);
|
|
872
948
|
}
|
|
873
|
-
|
|
949
|
+
}
|
|
950
|
+
function applyClearCollectionDefinitions(params) {
|
|
951
|
+
for (const definition of params.definitions) {
|
|
874
952
|
if (!definition.enabled) {
|
|
875
953
|
continue;
|
|
876
954
|
}
|
|
877
|
-
|
|
955
|
+
const isReplacement = definition.optionKey === "dep" && params.options.replaceDeps === true || definition.optionKey === "test" && params.options.replaceTests === true;
|
|
956
|
+
if (definition.values && definition.values.length > 0 && !isReplacement) {
|
|
878
957
|
throw new PmCliError(`Cannot combine ${definition.clearFlag} with ${definition.valueFlag}`, EXIT_CODE.USAGE);
|
|
879
958
|
}
|
|
880
|
-
clearOptionKeys.add(definition.optionKey);
|
|
881
|
-
clearFrontMatterKeys.add(definition.frontMatterKey);
|
|
959
|
+
params.clearOptionKeys.add(definition.optionKey);
|
|
960
|
+
params.clearFrontMatterKeys.add(definition.frontMatterKey);
|
|
882
961
|
}
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
value: options.value !== void 0,
|
|
895
|
-
impact: options.impact !== void 0,
|
|
896
|
-
outcome: options.outcome !== void 0,
|
|
897
|
-
whyNow: options.whyNow !== void 0,
|
|
898
|
-
assignee: options.assignee !== void 0,
|
|
899
|
-
parent: options.parent !== void 0,
|
|
900
|
-
reviewer: options.reviewer !== void 0,
|
|
901
|
-
risk: options.risk !== void 0,
|
|
902
|
-
confidence: options.confidence !== void 0,
|
|
903
|
-
sprint: options.sprint !== void 0,
|
|
904
|
-
release: options.release !== void 0,
|
|
905
|
-
blockedBy: options.blockedBy !== void 0,
|
|
906
|
-
blockedReason: options.blockedReason !== void 0,
|
|
907
|
-
unblockNote: options.unblockNote !== void 0,
|
|
908
|
-
reporter: options.reporter !== void 0,
|
|
909
|
-
severity: options.severity !== void 0,
|
|
910
|
-
environment: options.environment !== void 0,
|
|
911
|
-
reproSteps: options.reproSteps !== void 0,
|
|
912
|
-
resolution: options.resolution !== void 0,
|
|
913
|
-
expectedResult: options.expectedResult !== void 0,
|
|
914
|
-
actualResult: options.actualResult !== void 0,
|
|
915
|
-
affectedVersion: options.affectedVersion !== void 0,
|
|
916
|
-
fixedVersion: options.fixedVersion !== void 0,
|
|
917
|
-
component: options.component !== void 0,
|
|
918
|
-
regression: options.regression !== void 0,
|
|
919
|
-
customerImpact: options.customerImpact !== void 0
|
|
920
|
-
};
|
|
962
|
+
}
|
|
963
|
+
function buildScalarOptionPresence(options) {
|
|
964
|
+
const presence = {};
|
|
965
|
+
for (const key of UPDATE_LEGACY_SCALAR_OPTION_KEYS) {
|
|
966
|
+
presence[String(key)] = options[key] !== void 0;
|
|
967
|
+
}
|
|
968
|
+
presence.order = options.order !== void 0 || options.rank !== void 0;
|
|
969
|
+
return presence;
|
|
970
|
+
}
|
|
971
|
+
function rejectUnsetScalarConflicts(options, unsetTargets) {
|
|
972
|
+
const scalarOptionPresence = buildScalarOptionPresence(options);
|
|
921
973
|
for (const [optionKey, hasValue] of Object.entries(scalarOptionPresence)) {
|
|
922
974
|
if (!hasValue || !unsetTargets.optionKeys.has(optionKey)) {
|
|
923
975
|
continue;
|
|
@@ -925,56 +977,539 @@ async function runUpdate(id, options, global) {
|
|
|
925
977
|
const unsetField = UPDATE_OPTION_KEY_TO_UNSET_CANONICAL.get(optionKey) ?? optionKey;
|
|
926
978
|
throw new PmCliError(`Cannot combine --unset ${unsetField} with ${commandOptionFlagLabel("update", optionKey)}`, EXIT_CODE.USAGE);
|
|
927
979
|
}
|
|
928
|
-
if (
|
|
929
|
-
|
|
930
|
-
throw new PmCliError("Cannot combine --unset tags with --add-tags", EXIT_CODE.USAGE);
|
|
931
|
-
}
|
|
932
|
-
if (Array.isArray(options.removeTags) && options.removeTags.length > 0) {
|
|
933
|
-
throw new PmCliError("Cannot combine --unset tags with --remove-tags", EXIT_CODE.USAGE);
|
|
934
|
-
}
|
|
980
|
+
if (!unsetTargets.frontMatterKeys.has("tags")) {
|
|
981
|
+
return;
|
|
935
982
|
}
|
|
983
|
+
if (Array.isArray(options.addTags) && options.addTags.length > 0) {
|
|
984
|
+
throw new PmCliError("Cannot combine --unset tags with --add-tags", EXIT_CODE.USAGE);
|
|
985
|
+
}
|
|
986
|
+
if (Array.isArray(options.removeTags) && options.removeTags.length > 0) {
|
|
987
|
+
throw new PmCliError("Cannot combine --unset tags with --remove-tags", EXIT_CODE.USAGE);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
function rejectLegacyScalarTokens(options) {
|
|
936
991
|
const assertNoLegacyScalarToken = (value, optionKey) => {
|
|
937
992
|
const unsetField = UPDATE_OPTION_KEY_TO_UNSET_CANONICAL.get(optionKey);
|
|
938
993
|
const hint = unsetField ? `Use --unset ${unsetField} to clear this field.` : void 0;
|
|
939
994
|
assertNoLegacyNoneToken(value, commandOptionFlagLabel("update", optionKey), hint);
|
|
940
995
|
};
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
assertNoLegacyScalarToken(options.estimatedMinutes, "estimatedMinutes");
|
|
945
|
-
assertNoLegacyScalarToken(options.acceptanceCriteria, "acceptanceCriteria");
|
|
946
|
-
assertNoLegacyScalarToken(options.definitionOfReady, "definitionOfReady");
|
|
996
|
+
for (const key of UPDATE_LEGACY_SCALAR_OPTION_KEYS) {
|
|
997
|
+
assertNoLegacyScalarToken(options[key], String(key));
|
|
998
|
+
}
|
|
947
999
|
assertNoLegacyScalarToken(options.order ?? options.rank, "order");
|
|
948
|
-
assertNoLegacyScalarToken(options.goal, "goal");
|
|
949
|
-
assertNoLegacyScalarToken(options.objective, "objective");
|
|
950
|
-
assertNoLegacyScalarToken(options.value, "value");
|
|
951
|
-
assertNoLegacyScalarToken(options.impact, "impact");
|
|
952
|
-
assertNoLegacyScalarToken(options.outcome, "outcome");
|
|
953
|
-
assertNoLegacyScalarToken(options.whyNow, "whyNow");
|
|
954
|
-
assertNoLegacyScalarToken(options.assignee, "assignee");
|
|
955
|
-
assertNoLegacyScalarToken(options.parent, "parent");
|
|
956
|
-
assertNoLegacyScalarToken(options.reviewer, "reviewer");
|
|
957
|
-
assertNoLegacyScalarToken(options.risk, "risk");
|
|
958
|
-
assertNoLegacyScalarToken(options.confidence, "confidence");
|
|
959
|
-
assertNoLegacyScalarToken(options.sprint, "sprint");
|
|
960
|
-
assertNoLegacyScalarToken(options.release, "release");
|
|
961
|
-
assertNoLegacyScalarToken(options.blockedBy, "blockedBy");
|
|
962
|
-
assertNoLegacyScalarToken(options.blockedReason, "blockedReason");
|
|
963
|
-
assertNoLegacyScalarToken(options.unblockNote, "unblockNote");
|
|
964
|
-
assertNoLegacyScalarToken(options.reporter, "reporter");
|
|
965
|
-
assertNoLegacyScalarToken(options.severity, "severity");
|
|
966
|
-
assertNoLegacyScalarToken(options.environment, "environment");
|
|
967
|
-
assertNoLegacyScalarToken(options.reproSteps, "reproSteps");
|
|
968
|
-
assertNoLegacyScalarToken(options.resolution, "resolution");
|
|
969
|
-
assertNoLegacyScalarToken(options.expectedResult, "expectedResult");
|
|
970
|
-
assertNoLegacyScalarToken(options.actualResult, "actualResult");
|
|
971
|
-
assertNoLegacyScalarToken(options.affectedVersion, "affectedVersion");
|
|
972
|
-
assertNoLegacyScalarToken(options.fixedVersion, "fixedVersion");
|
|
973
|
-
assertNoLegacyScalarToken(options.component, "component");
|
|
974
|
-
assertNoLegacyScalarToken(options.regression, "regression");
|
|
975
|
-
assertNoLegacyScalarToken(options.customerImpact, "customerImpact");
|
|
976
1000
|
assertNoLegacyNoneTokens(options.reminder, "--reminder", "Use --clear-reminders to clear reminders.");
|
|
977
1001
|
assertNoLegacyNoneTokens(options.event, "--event", "Use --clear-events to clear linked events.");
|
|
1002
|
+
}
|
|
1003
|
+
function buildUpdateFieldFlags(options, runtimeFieldUpdates) {
|
|
1004
|
+
const flags = {};
|
|
1005
|
+
for (const key of UPDATE_SIMPLE_FIELD_FLAG_KEYS) {
|
|
1006
|
+
flags[String(key)] = options[key] !== void 0;
|
|
1007
|
+
}
|
|
1008
|
+
flags.tags = options.tags !== void 0;
|
|
1009
|
+
flags.addTags = Array.isArray(options.addTags) && options.addTags.length > 0;
|
|
1010
|
+
flags.removeTags = Array.isArray(options.removeTags) && options.removeTags.length > 0;
|
|
1011
|
+
flags.order = options.order !== void 0;
|
|
1012
|
+
flags.rank = options.rank !== void 0;
|
|
1013
|
+
flags.replaceDeps = options.replaceDeps === true;
|
|
1014
|
+
flags.replaceTests = options.replaceTests === true;
|
|
1015
|
+
flags.unset = options.unset !== void 0 && options.unset.length > 0;
|
|
1016
|
+
flags.clearDeps = options.clearDeps === true;
|
|
1017
|
+
flags.clearComments = options.clearComments === true;
|
|
1018
|
+
flags.clearNotes = options.clearNotes === true;
|
|
1019
|
+
flags.clearLearnings = options.clearLearnings === true;
|
|
1020
|
+
flags.clearFiles = options.clearFiles === true;
|
|
1021
|
+
flags.clearTests = options.clearTests === true;
|
|
1022
|
+
flags.clearDocs = options.clearDocs === true;
|
|
1023
|
+
flags.clearReminders = options.clearReminders === true;
|
|
1024
|
+
flags.clearEvents = options.clearEvents === true;
|
|
1025
|
+
flags.clearTypeOptions = options.clearTypeOptions === true;
|
|
1026
|
+
flags.runtimeFields = Object.keys(runtimeFieldUpdates).length > 0;
|
|
1027
|
+
return flags;
|
|
1028
|
+
}
|
|
1029
|
+
async function buildNoopUpdateResult(params) {
|
|
1030
|
+
const located = await locateItem(params.pmRoot, params.id, params.settings.id_prefix, params.settings.item_format, params.typeRegistry.type_to_folder);
|
|
1031
|
+
if (!located) {
|
|
1032
|
+
throw await buildItemNotFoundError(params.pmRoot, params.id, params.settings.id_prefix, params.typeRegistry.type_to_folder);
|
|
1033
|
+
}
|
|
1034
|
+
const { document } = await readLocatedItem(located, { schema: params.settings.schema });
|
|
1035
|
+
return {
|
|
1036
|
+
item: toItemRecord(document.metadata),
|
|
1037
|
+
changed_fields: [],
|
|
1038
|
+
warnings: ["noop_no_update_fields"]
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
async function assertUpdateTrackerInitialized(pmRoot) {
|
|
1042
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
1043
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
function assertMatchingOrderRank(options) {
|
|
1047
|
+
if (options.order !== void 0 && options.rank !== void 0 && options.order !== options.rank) {
|
|
1048
|
+
throw new PmCliError("--order and --rank must match when both are provided", EXIT_CODE.USAGE);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
async function resolveParentReferenceForUpdate(params) {
|
|
1052
|
+
if (params.options.parent === void 0 || params.unsetTargets.frontMatterKeys.has("parent")) {
|
|
1053
|
+
return { resolvedParentValue: void 0, warnings: [] };
|
|
1054
|
+
}
|
|
1055
|
+
const resolvedParentValue = normalizeParentReferenceValue(params.options.parent);
|
|
1056
|
+
const parentLocated = await locateItem(params.pmRoot, resolvedParentValue, params.settings.id_prefix, params.settings.item_format, params.typeRegistry.type_to_folder);
|
|
1057
|
+
if (parentLocated) {
|
|
1058
|
+
return { resolvedParentValue, warnings: [] };
|
|
1059
|
+
}
|
|
1060
|
+
const normalizedParentId = normalizeItemId(resolvedParentValue, params.settings.id_prefix);
|
|
1061
|
+
return {
|
|
1062
|
+
resolvedParentValue,
|
|
1063
|
+
warnings: validateMissingParentReference(normalizedParentId, params.parentReferencePolicy).warnings
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
function blockedByResolutionWarnings(resolution) {
|
|
1067
|
+
return resolution.unresolved === void 0 ? [] : [`blocked_by_unresolved:${resolution.unresolved}`];
|
|
1068
|
+
}
|
|
1069
|
+
async function collectWorkflowTransitionWarnings(params) {
|
|
1070
|
+
if (params.workflowEnforcement === "off" || params.typeWorkflows.length === 0 || !params.fieldFlags.status || params.options.status === void 0) {
|
|
1071
|
+
return [];
|
|
1072
|
+
}
|
|
1073
|
+
const located = await locateItem(params.pmRoot, params.id, params.settings.id_prefix, params.settings.item_format, params.typeRegistry.type_to_folder);
|
|
1074
|
+
if (!located) {
|
|
1075
|
+
throw await buildItemNotFoundError(params.pmRoot, params.id, params.settings.id_prefix, params.typeRegistry.type_to_folder);
|
|
1076
|
+
}
|
|
1077
|
+
const { document } = await readLocatedItem(located, { schema: params.settings.schema });
|
|
1078
|
+
const effectiveType = params.options.type !== void 0 ? resolveTypeName(params.options.type, params.typeRegistry) ?? params.options.type : document.metadata?.type ?? "";
|
|
1079
|
+
const warning = enforceTypeWorkflowTransition({
|
|
1080
|
+
enforcement: params.workflowEnforcement,
|
|
1081
|
+
typeWorkflows: params.typeWorkflows,
|
|
1082
|
+
statusRegistry: params.statusRegistry,
|
|
1083
|
+
typeName: effectiveType,
|
|
1084
|
+
fromStatus: document.metadata?.status ?? "",
|
|
1085
|
+
toStatus: params.options.status
|
|
1086
|
+
});
|
|
1087
|
+
return warning ? [warning] : [];
|
|
1088
|
+
}
|
|
1089
|
+
async function routeCloseStatusUpdate(context) {
|
|
1090
|
+
if (!context.fieldFlags.status) {
|
|
1091
|
+
return void 0;
|
|
1092
|
+
}
|
|
1093
|
+
const targetStatus = normalizeStatusInput(context.options.status, context.statusRegistry);
|
|
1094
|
+
if (targetStatus !== context.statusRegistry.close_status) {
|
|
1095
|
+
return void 0;
|
|
1096
|
+
}
|
|
1097
|
+
const otherFieldKeys = Object.entries(context.fieldFlags).filter(([key, value]) => value && key !== "status" && key !== "closeReason").map(([key]) => key);
|
|
1098
|
+
const routeWarnings = [];
|
|
1099
|
+
let preChangedFields = [];
|
|
1100
|
+
if (otherFieldKeys.length > 0) {
|
|
1101
|
+
const preUpdate = await runUpdate(context.id, { ...context.options, status: void 0, closeReason: void 0, message: void 0 }, context.global);
|
|
1102
|
+
preChangedFields = preUpdate.changed_fields;
|
|
1103
|
+
routeWarnings.push(...preUpdate.warnings);
|
|
1104
|
+
}
|
|
1105
|
+
const explicitReason = typeof context.options.closeReason === "string" ? context.options.closeReason.trim() : "";
|
|
1106
|
+
const fallbackMessage = typeof context.options.message === "string" ? context.options.message.trim() : "";
|
|
1107
|
+
const closeReason = explicitReason || fallbackMessage || "Closed via pm update";
|
|
1108
|
+
const closeResult = await runClose(context.id, closeReason, {
|
|
1109
|
+
author: context.options.author,
|
|
1110
|
+
message: context.options.message,
|
|
1111
|
+
force: context.options.force
|
|
1112
|
+
}, context.global);
|
|
1113
|
+
const warnings = [
|
|
1114
|
+
...context.workflowTransitionWarnings,
|
|
1115
|
+
...routeWarnings,
|
|
1116
|
+
...closeResult.warnings,
|
|
1117
|
+
"auto_routed_from_update_to_close"
|
|
1118
|
+
];
|
|
1119
|
+
if (explicitReason.length === 0 && fallbackMessage.length === 0) {
|
|
1120
|
+
warnings.push("close_reason_defaulted");
|
|
1121
|
+
}
|
|
1122
|
+
return {
|
|
1123
|
+
item: closeResult.item,
|
|
1124
|
+
changed_fields: [...preChangedFields, ...closeResult.changed_fields],
|
|
1125
|
+
warnings
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
function applySimpleItemMutations(document, options, statusRegistry, changedFields) {
|
|
1129
|
+
if (options.title !== void 0) {
|
|
1130
|
+
document.metadata.title = options.title;
|
|
1131
|
+
changedFields.push("title");
|
|
1132
|
+
}
|
|
1133
|
+
if (options.description !== void 0) {
|
|
1134
|
+
document.metadata.description = options.description;
|
|
1135
|
+
changedFields.push("description");
|
|
1136
|
+
}
|
|
1137
|
+
if (options.body !== void 0) {
|
|
1138
|
+
document.body = options.body;
|
|
1139
|
+
changedFields.push("body");
|
|
1140
|
+
}
|
|
1141
|
+
return normalizeStatusInput(document.metadata.status, statusRegistry) ?? document.metadata.status;
|
|
1142
|
+
}
|
|
1143
|
+
function applyStatusAndCloseReasonMutations(document, context, previousStatusNormalized, changedFields) {
|
|
1144
|
+
if (context.options.status !== void 0) {
|
|
1145
|
+
const status = parseStatus(context.options.status, context.statusRegistry);
|
|
1146
|
+
document.metadata.status = status;
|
|
1147
|
+
changedFields.push("status");
|
|
1148
|
+
}
|
|
1149
|
+
if (context.options.closeReason !== void 0 || context.clearFrontMatterKeys.has("close_reason")) {
|
|
1150
|
+
if (context.clearFrontMatterKeys.has("close_reason")) {
|
|
1151
|
+
delete document.metadata.close_reason;
|
|
1152
|
+
} else {
|
|
1153
|
+
const closeReason = context.options.closeReason?.trim() ?? "";
|
|
1154
|
+
if (closeReason.length === 0) {
|
|
1155
|
+
throw new PmCliError("--close-reason must not be empty", EXIT_CODE.USAGE);
|
|
1156
|
+
}
|
|
1157
|
+
document.metadata.close_reason = closeReason;
|
|
1158
|
+
}
|
|
1159
|
+
changedFields.push("close_reason");
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
if (context.options.status !== void 0 && previousStatusNormalized === context.statusRegistry.close_status && document.metadata.status !== context.statusRegistry.canceled_status && document.metadata.close_reason !== void 0) {
|
|
1163
|
+
delete document.metadata.close_reason;
|
|
1164
|
+
changedFields.push("close_reason");
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
function applyPriorityTypeAndOptions(document, context, changedFields) {
|
|
1168
|
+
let activeTypeName = resolveTypeName(document.metadata.type, context.typeRegistry) ?? document.metadata.type;
|
|
1169
|
+
if (context.options.priority !== void 0) {
|
|
1170
|
+
document.metadata.priority = ensurePriority(context.options.priority);
|
|
1171
|
+
changedFields.push("priority");
|
|
1172
|
+
}
|
|
1173
|
+
if (context.options.type !== void 0) {
|
|
1174
|
+
const resolvedTypeName = resolveTypeName(context.options.type, context.typeRegistry);
|
|
1175
|
+
if (!resolvedTypeName) {
|
|
1176
|
+
throw new PmCliError(buildInvalidTypeError(context.options.type, context.typeRegistry.types, resolveItemTypesFilePath(context.pmRoot, context.settings.schema)), EXIT_CODE.USAGE);
|
|
1177
|
+
}
|
|
1178
|
+
document.metadata.type = resolvedTypeName;
|
|
1179
|
+
activeTypeName = resolvedTypeName;
|
|
1180
|
+
changedFields.push("type");
|
|
1181
|
+
}
|
|
1182
|
+
enforceUpdateOptionsByType(activeTypeName, context.options, context.typeRegistry, context.runtimeFieldRegistry, context.extensionFieldNames);
|
|
1183
|
+
applyTypeOptionMutation(document, context, activeTypeName, changedFields);
|
|
1184
|
+
return activeTypeName;
|
|
1185
|
+
}
|
|
1186
|
+
function applyTypeOptionMutation(document, context, activeTypeName, changedFields) {
|
|
1187
|
+
if (context.options.typeOption !== void 0 || context.clearFrontMatterKeys.has("type_options")) {
|
|
1188
|
+
if (context.clearFrontMatterKeys.has("type_options")) {
|
|
1189
|
+
delete document.metadata.type_options;
|
|
1190
|
+
} else {
|
|
1191
|
+
const parsedTypeOptions = parseTypeOptionEntries(context.options.typeOption ?? []);
|
|
1192
|
+
const validation2 = validateTypeOptions(activeTypeName, parsedTypeOptions, context.typeRegistry);
|
|
1193
|
+
if (validation2.errors.length > 0) {
|
|
1194
|
+
throw new PmCliError(validation2.errors.join("; "), EXIT_CODE.USAGE);
|
|
1195
|
+
}
|
|
1196
|
+
document.metadata.type_options = validation2.normalized;
|
|
1197
|
+
}
|
|
1198
|
+
changedFields.push("type_options");
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
if (context.options.type === void 0 || document.metadata.type_options === void 0) {
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
const validation = validateTypeOptions(activeTypeName, document.metadata.type_options, context.typeRegistry);
|
|
1205
|
+
if (validation.errors.length > 0) {
|
|
1206
|
+
throw new PmCliError(`Current type options are incompatible with type "${activeTypeName}". ${validation.errors.join("; ")}. Use --clear-type-options to clear them.`, EXIT_CODE.USAGE);
|
|
1207
|
+
}
|
|
1208
|
+
document.metadata.type_options = validation.normalized;
|
|
1209
|
+
}
|
|
1210
|
+
function applyDependencyMutations(document, context, changedFields) {
|
|
1211
|
+
if (context.options.dep === void 0 && context.options.depRemove === void 0 && !context.clearFrontMatterKeys.has("dependencies")) {
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
let nextDependencies = context.clearFrontMatterKeys.has("dependencies") ? [] : [...document.metadata.dependencies ?? []];
|
|
1215
|
+
if (context.dependencyUpdates.additions.length > 0) {
|
|
1216
|
+
const seen = new Set(nextDependencies.map((entry) => dependencyKey(entry)));
|
|
1217
|
+
for (const addition of context.dependencyUpdates.additions) {
|
|
1218
|
+
const key = dependencyKey(addition);
|
|
1219
|
+
if (!seen.has(key)) {
|
|
1220
|
+
nextDependencies.push(addition);
|
|
1221
|
+
seen.add(key);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
if (context.dependencyRemovals.length > 0) {
|
|
1226
|
+
nextDependencies = nextDependencies.filter((entry) => !context.dependencyRemovals.some((selector) => matchesDependencySelector(entry, selector)));
|
|
1227
|
+
}
|
|
1228
|
+
if (nextDependencies.length === 0) {
|
|
1229
|
+
delete document.metadata.dependencies;
|
|
1230
|
+
} else {
|
|
1231
|
+
document.metadata.dependencies = nextDependencies;
|
|
1232
|
+
}
|
|
1233
|
+
changedFields.push("dependencies");
|
|
1234
|
+
}
|
|
1235
|
+
function applyLogCollectionMutations(document, context, changedFields) {
|
|
1236
|
+
applyLogCollectionMutation(document, "comments", context.options.comment, context.commentUpdates.values, context.clearFrontMatterKeys, changedFields);
|
|
1237
|
+
applyLogCollectionMutation(document, "notes", context.options.note, context.noteUpdates.values, context.clearFrontMatterKeys, changedFields);
|
|
1238
|
+
applyLogCollectionMutation(document, "learnings", context.options.learning, context.learningUpdates.values, context.clearFrontMatterKeys, changedFields);
|
|
1239
|
+
}
|
|
1240
|
+
function applyLogCollectionMutation(document, key, optionValue, values, clearFrontMatterKeys, changedFields) {
|
|
1241
|
+
if (optionValue === void 0 && !clearFrontMatterKeys.has(key)) {
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
if (clearFrontMatterKeys.has(key) || !values || values.length === 0) {
|
|
1245
|
+
delete document.metadata[key];
|
|
1246
|
+
} else {
|
|
1247
|
+
document.metadata[key] = [...document.metadata[key] ?? [], ...values];
|
|
1248
|
+
}
|
|
1249
|
+
changedFields.push(key);
|
|
1250
|
+
}
|
|
1251
|
+
function applyEvidenceCollectionMutations(document, context, changedFields) {
|
|
1252
|
+
applyUniqueLinkedCollectionMutation(document, "files", context.options.file, context.fileUpdates.values, fileKey, context.clearFrontMatterKeys, changedFields);
|
|
1253
|
+
applyTestCollectionMutation(document, context, changedFields);
|
|
1254
|
+
applyUniqueLinkedCollectionMutation(document, "docs", context.options.doc, context.docUpdates.values, docKey, context.clearFrontMatterKeys, changedFields);
|
|
1255
|
+
}
|
|
1256
|
+
function applyUniqueLinkedCollectionMutation(document, key, optionValue, values, keyOf, clearFrontMatterKeys, changedFields) {
|
|
1257
|
+
if (optionValue === void 0 && !clearFrontMatterKeys.has(key)) {
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
if (clearFrontMatterKeys.has(key) || !values || values.length === 0) {
|
|
1261
|
+
delete document.metadata[key];
|
|
1262
|
+
} else {
|
|
1263
|
+
const next = [...document.metadata[key] ?? []];
|
|
1264
|
+
const seen = new Set(next.map((entry) => keyOf(entry)));
|
|
1265
|
+
for (const entry of values) {
|
|
1266
|
+
const keyValue = keyOf(entry);
|
|
1267
|
+
if (!seen.has(keyValue)) {
|
|
1268
|
+
next.push(entry);
|
|
1269
|
+
seen.add(keyValue);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
document.metadata[key] = next;
|
|
1273
|
+
}
|
|
1274
|
+
changedFields.push(key);
|
|
1275
|
+
}
|
|
1276
|
+
function applyTestCollectionMutation(document, context, changedFields) {
|
|
1277
|
+
if (context.options.test === void 0 && !context.clearFrontMatterKeys.has("tests")) {
|
|
1278
|
+
return;
|
|
1279
|
+
}
|
|
1280
|
+
if (context.clearFrontMatterKeys.has("tests") && context.options.replaceTests === true) {
|
|
1281
|
+
document.metadata.tests = dedupeLinkedTests(context.testUpdates.values) ?? [];
|
|
1282
|
+
} else if (context.clearFrontMatterKeys.has("tests") || !context.testUpdates.values || context.testUpdates.values.length === 0) {
|
|
1283
|
+
delete document.metadata.tests;
|
|
1284
|
+
} else {
|
|
1285
|
+
document.metadata.tests = dedupeLinkedTests([...document.metadata.tests ?? [], ...context.testUpdates.values]);
|
|
1286
|
+
}
|
|
1287
|
+
if (document.metadata.tests !== void 0 && document.metadata.tests.length === 0) {
|
|
1288
|
+
delete document.metadata.tests;
|
|
1289
|
+
}
|
|
1290
|
+
changedFields.push("tests");
|
|
1291
|
+
}
|
|
1292
|
+
function dedupeLinkedTests(values) {
|
|
1293
|
+
if (!values || values.length === 0) {
|
|
1294
|
+
return void 0;
|
|
1295
|
+
}
|
|
1296
|
+
const next = [];
|
|
1297
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1298
|
+
for (const entry of values) {
|
|
1299
|
+
const key = testKey(entry);
|
|
1300
|
+
if (!seen.has(key)) {
|
|
1301
|
+
next.push(entry);
|
|
1302
|
+
seen.add(key);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
return next;
|
|
1306
|
+
}
|
|
1307
|
+
function applyTagsAndPlanningMutations(document, context, scalarMutationContext) {
|
|
1308
|
+
const addTagsValues = context.options.addTags;
|
|
1309
|
+
const removeTagsValues = context.options.removeTags;
|
|
1310
|
+
const hasAdditiveTagMutation = Array.isArray(addTagsValues) && addTagsValues.length > 0 || Array.isArray(removeTagsValues) && removeTagsValues.length > 0;
|
|
1311
|
+
if (context.options.tags !== void 0 || context.clearFrontMatterKeys.has("tags") || hasAdditiveTagMutation) {
|
|
1312
|
+
const baseTags = context.clearFrontMatterKeys.has("tags") ? [] : context.options.tags !== void 0 ? parseTags(context.options.tags) : Array.isArray(document.metadata.tags) ? [...document.metadata.tags] : [];
|
|
1313
|
+
document.metadata.tags = applyTagRemovals(mergeAdditiveTags(baseTags, addTagsValues), removeTagsValues);
|
|
1314
|
+
scalarMutationContext.changedFields.push("tags");
|
|
1315
|
+
}
|
|
1316
|
+
applyUpdateScalarMutations(UPDATE_POST_TAG_SCALAR_MUTATIONS, context.options, scalarMutationContext);
|
|
1317
|
+
applyOrderMutation(document, context, scalarMutationContext.changedFields);
|
|
1318
|
+
}
|
|
1319
|
+
function applyOrderMutation(document, context, changedFields) {
|
|
1320
|
+
const orderRaw = context.options.order ?? context.options.rank;
|
|
1321
|
+
if (orderRaw === void 0 && !context.clearFrontMatterKeys.has("order")) {
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
if (context.clearFrontMatterKeys.has("order")) {
|
|
1325
|
+
delete document.metadata.order;
|
|
1326
|
+
} else {
|
|
1327
|
+
const parsedOrder = parseOptionalNumber(orderRaw ?? "", "order");
|
|
1328
|
+
if (!Number.isInteger(parsedOrder)) {
|
|
1329
|
+
throw new PmCliError("Order must be an integer", EXIT_CODE.USAGE);
|
|
1330
|
+
}
|
|
1331
|
+
document.metadata.order = parsedOrder;
|
|
1332
|
+
}
|
|
1333
|
+
changedFields.push("order");
|
|
1334
|
+
}
|
|
1335
|
+
function applyOwnershipAndIssueMutations(document, context, scalarMutationContext, warnings) {
|
|
1336
|
+
applyAssigneeMutation(document, context, scalarMutationContext.changedFields);
|
|
1337
|
+
applyParentMutation(document, context, scalarMutationContext.changedFields);
|
|
1338
|
+
applyUpdateScalarMutations(UPDATE_STAKEHOLDER_SCALAR_MUTATIONS, context.options, scalarMutationContext);
|
|
1339
|
+
applySprintReleaseMutation(document, context, "sprint", warnings, scalarMutationContext.changedFields);
|
|
1340
|
+
applySprintReleaseMutation(document, context, "release", warnings, scalarMutationContext.changedFields);
|
|
1341
|
+
applyBlockedByMutation(document, context, scalarMutationContext.changedFields);
|
|
1342
|
+
applyUpdateScalarMutations(UPDATE_ISSUE_SCALAR_MUTATIONS, context.options, scalarMutationContext);
|
|
1343
|
+
}
|
|
1344
|
+
function applyAssigneeMutation(document, context, changedFields) {
|
|
1345
|
+
if (context.options.assignee === void 0 && !context.clearFrontMatterKeys.has("assignee")) {
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
if (context.clearFrontMatterKeys.has("assignee")) {
|
|
1349
|
+
delete document.metadata.assignee;
|
|
1350
|
+
} else {
|
|
1351
|
+
const assignee = context.options.assignee?.trim() ?? "";
|
|
1352
|
+
if (assignee === "") {
|
|
1353
|
+
throw new PmCliError("--assignee must not be empty. Use --unset assignee to clear it.", EXIT_CODE.USAGE);
|
|
1354
|
+
}
|
|
1355
|
+
document.metadata.assignee = assignee;
|
|
1356
|
+
}
|
|
1357
|
+
changedFields.push("assignee");
|
|
1358
|
+
}
|
|
1359
|
+
function applyParentMutation(document, context, changedFields) {
|
|
1360
|
+
if (context.options.parent === void 0 && !context.clearFrontMatterKeys.has("parent")) {
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
if (context.clearFrontMatterKeys.has("parent")) {
|
|
1364
|
+
delete document.metadata.parent;
|
|
1365
|
+
} else {
|
|
1366
|
+
document.metadata.parent = context.resolvedParentValue ?? "";
|
|
1367
|
+
}
|
|
1368
|
+
changedFields.push("parent");
|
|
1369
|
+
}
|
|
1370
|
+
function applySprintReleaseMutation(document, context, key, warnings, changedFields) {
|
|
1371
|
+
if (context.options[key] === void 0 && !context.clearFrontMatterKeys.has(key)) {
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
if (context.clearFrontMatterKeys.has(key)) {
|
|
1375
|
+
delete document.metadata[key];
|
|
1376
|
+
} else {
|
|
1377
|
+
const validation = validateSprintOrReleaseValue(key, context.options[key] ?? "", context.settings.validation.sprint_release_format);
|
|
1378
|
+
document.metadata[key] = validation.value;
|
|
1379
|
+
warnings.push(...validation.warnings);
|
|
1380
|
+
}
|
|
1381
|
+
changedFields.push(key);
|
|
1382
|
+
}
|
|
1383
|
+
function applyBlockedByMutation(document, context, changedFields) {
|
|
1384
|
+
if (context.options.blockedBy === void 0 && !context.clearFrontMatterKeys.has("blocked_by")) {
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
if (context.clearFrontMatterKeys.has("blocked_by")) {
|
|
1388
|
+
delete document.metadata.blocked_by;
|
|
1389
|
+
} else {
|
|
1390
|
+
document.metadata.blocked_by = context.options.blockedBy?.trim() ?? "";
|
|
1391
|
+
}
|
|
1392
|
+
changedFields.push("blocked_by");
|
|
1393
|
+
applyBlockedByDependencyEdge(document.metadata, context.resolvedBlockedByDependencyId, context.nowIso, context.author, changedFields);
|
|
1394
|
+
}
|
|
1395
|
+
function applyScheduleMutations(document, context, changedFields) {
|
|
1396
|
+
if (context.options.reminder !== void 0 || context.clearFrontMatterKeys.has("reminders")) {
|
|
1397
|
+
if (context.clearFrontMatterKeys.has("reminders")) {
|
|
1398
|
+
delete document.metadata.reminders;
|
|
1399
|
+
} else {
|
|
1400
|
+
document.metadata.reminders = parseReminderEntries(context.options.reminder ?? [], context.nowValue, { valueMode: "trimmed" });
|
|
1401
|
+
}
|
|
1402
|
+
changedFields.push("reminders");
|
|
1403
|
+
}
|
|
1404
|
+
if (context.options.event !== void 0 || context.clearFrontMatterKeys.has("events")) {
|
|
1405
|
+
if (context.clearFrontMatterKeys.has("events")) {
|
|
1406
|
+
delete document.metadata.events;
|
|
1407
|
+
} else {
|
|
1408
|
+
document.metadata.events = parseEventEntries(context.options.event ?? [], context.nowValue, {
|
|
1409
|
+
allDayEmptyGuard: "truthy",
|
|
1410
|
+
recurrenceEmptyNumericGuard: "truthy"
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
changedFields.push("events");
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
function applyRuntimeAndRegisteredFieldMutations(metadataRecord, context, changedFields) {
|
|
1417
|
+
clearDynamicFields(metadataRecord, context.runtimeFieldRegistry.definitions.map((definition) => definition.metadata_key), context.clearFrontMatterKeys, changedFields);
|
|
1418
|
+
clearDynamicFields(metadataRecord, context.extensionFieldNames, context.clearFrontMatterKeys, changedFields);
|
|
1419
|
+
for (const [fieldKey, fieldValue] of Object.entries(context.runtimeFieldUpdates)) {
|
|
1420
|
+
if (context.clearFrontMatterKeys.has(fieldKey)) {
|
|
1421
|
+
const fieldFlag = fieldKey.replaceAll("_", "-");
|
|
1422
|
+
const definition = context.runtimeFieldRegistry.definitions.find((candidate) => candidate.metadata_key === fieldKey);
|
|
1423
|
+
const updateFlag = definition?.cli_flag ?? fieldFlag;
|
|
1424
|
+
throw new PmCliError(`Cannot combine --unset ${fieldFlag} with --${updateFlag}`, EXIT_CODE.USAGE);
|
|
1425
|
+
}
|
|
1426
|
+
if (stableValueEquals(metadataRecord[fieldKey], fieldValue)) {
|
|
1427
|
+
continue;
|
|
1428
|
+
}
|
|
1429
|
+
metadataRecord[fieldKey] = fieldValue;
|
|
1430
|
+
changedFields.push(fieldKey);
|
|
1431
|
+
}
|
|
1432
|
+
const registeredItemFieldUpdates = parseRegisteredItemFieldAssignments(context.options.field, context.extensionRegistrations);
|
|
1433
|
+
for (const fieldKey of Object.keys(registeredItemFieldUpdates)) {
|
|
1434
|
+
if (context.clearFrontMatterKeys.has(fieldKey)) {
|
|
1435
|
+
throw new PmCliError(`Cannot combine --unset ${fieldKey.replaceAll("_", "-")} with --field ${fieldKey}=...`, EXIT_CODE.USAGE);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
for (const [fieldKey, fieldValue] of Object.entries(registeredItemFieldUpdates)) {
|
|
1439
|
+
if (!stableValueEquals(metadataRecord[fieldKey], fieldValue)) {
|
|
1440
|
+
metadataRecord[fieldKey] = fieldValue;
|
|
1441
|
+
changedFields.push(fieldKey);
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
function clearDynamicFields(metadataRecord, fieldKeys, clearFrontMatterKeys, changedFields) {
|
|
1446
|
+
for (const fieldKey of fieldKeys) {
|
|
1447
|
+
if (!clearFrontMatterKeys.has(fieldKey) || metadataRecord[fieldKey] === void 0) {
|
|
1448
|
+
continue;
|
|
1449
|
+
}
|
|
1450
|
+
delete metadataRecord[fieldKey];
|
|
1451
|
+
changedFields.push(fieldKey);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
function mutateUpdateDocument(document, context) {
|
|
1455
|
+
const changedFields = [];
|
|
1456
|
+
const warnings = [];
|
|
1457
|
+
const previousStatusNormalized = applySimpleItemMutations(document, context.options, context.statusRegistry, changedFields);
|
|
1458
|
+
const metadataRecord = toItemRecord(document.metadata);
|
|
1459
|
+
const scalarMutationContext = {
|
|
1460
|
+
metadataRecord,
|
|
1461
|
+
clearFrontMatterKeys: context.clearFrontMatterKeys,
|
|
1462
|
+
changedFields,
|
|
1463
|
+
nowValue: context.nowValue
|
|
1464
|
+
};
|
|
1465
|
+
applyStatusAndCloseReasonMutations(document, context, previousStatusNormalized, changedFields);
|
|
1466
|
+
applyPriorityTypeAndOptions(document, context, changedFields);
|
|
1467
|
+
applyDependencyMutations(document, context, changedFields);
|
|
1468
|
+
applyLogCollectionMutations(document, context, changedFields);
|
|
1469
|
+
applyEvidenceCollectionMutations(document, context, changedFields);
|
|
1470
|
+
applyTagsAndPlanningMutations(document, context, scalarMutationContext);
|
|
1471
|
+
applyOwnershipAndIssueMutations(document, context, scalarMutationContext, warnings);
|
|
1472
|
+
if (normalizeStatusInput(document.metadata.status, context.statusRegistry) === context.statusRegistry.canceled_status && document.metadata.assignee !== void 0) {
|
|
1473
|
+
delete document.metadata.assignee;
|
|
1474
|
+
if (!changedFields.includes("assignee")) {
|
|
1475
|
+
changedFields.push("assignee");
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
applyScheduleMutations(document, context, changedFields);
|
|
1479
|
+
applyRuntimeAndRegisteredFieldMutations(metadataRecord, context, changedFields);
|
|
1480
|
+
try {
|
|
1481
|
+
applyRegisteredItemFieldDefaultsAndValidation(metadataRecord, context.extensionRegistrations, { skipDefaultFields: context.clearFrontMatterKeys });
|
|
1482
|
+
} catch (error) {
|
|
1483
|
+
throw new PmCliError(error instanceof Error ? error.message : "Invalid extension item field values", EXIT_CODE.USAGE);
|
|
1484
|
+
}
|
|
1485
|
+
return { changedFields, warnings };
|
|
1486
|
+
}
|
|
1487
|
+
async function runUpdate(id, options, global) {
|
|
1488
|
+
options = await resolveStdinUpdateOptions(options);
|
|
1489
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
1490
|
+
await assertUpdateTrackerInitialized(pmRoot);
|
|
1491
|
+
const settings = await readSettings(pmRoot);
|
|
1492
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
1493
|
+
const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
|
|
1494
|
+
const extensionRegistrations = getActiveExtensionRegistrations();
|
|
1495
|
+
const extensionFieldNames = collectRegisteredItemFieldNames(extensionRegistrations);
|
|
1496
|
+
const typeRegistry = resolveItemTypeRegistry(settings, extensionRegistrations);
|
|
1497
|
+
const workflowEnforcement = settings.governance.workflow_enforcement ?? "off";
|
|
1498
|
+
const typeWorkflows = workflowEnforcement === "off" ? [] : resolveTypeWorkflows(settings.schema);
|
|
1499
|
+
const parentReferencePolicy = settings.validation.parent_reference;
|
|
1500
|
+
const unsetTargets = parseUpdateUnsetTargets(options.unset, runtimeFieldRegistry, extensionFieldNames);
|
|
1501
|
+
const clearOptionKeys = new Set(unsetTargets.optionKeys);
|
|
1502
|
+
const clearFrontMatterKeys = new Set(unsetTargets.frontMatterKeys);
|
|
1503
|
+
validateReplaceOptions(options);
|
|
1504
|
+
applyClearCollectionDefinitions({
|
|
1505
|
+
definitions: buildClearCollectionDefinitions(options),
|
|
1506
|
+
options,
|
|
1507
|
+
clearOptionKeys,
|
|
1508
|
+
clearFrontMatterKeys
|
|
1509
|
+
});
|
|
1510
|
+
enforceAllowAuditUpdateScope(id, options, clearFrontMatterKeys);
|
|
1511
|
+
rejectUnsetScalarConflicts(options, unsetTargets);
|
|
1512
|
+
rejectLegacyScalarTokens(options);
|
|
978
1513
|
const author = toAuthor(options.author, settings.author_default);
|
|
979
1514
|
const nowValue = /* @__PURE__ */ new Date();
|
|
980
1515
|
const nowIso = nowValue.toISOString();
|
|
@@ -990,166 +1525,47 @@ async function runUpdate(id, options, global) {
|
|
|
990
1525
|
const fileUpdates = parseFiles(options.file);
|
|
991
1526
|
const testUpdates = parseTests(options.test);
|
|
992
1527
|
const docUpdates = parseDocs(options.doc);
|
|
993
|
-
const parentReferenceWarnings = [];
|
|
994
1528
|
const workflowTransitionWarnings = [];
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
}
|
|
1529
|
+
const parentReference = await resolveParentReferenceForUpdate({
|
|
1530
|
+
options,
|
|
1531
|
+
unsetTargets,
|
|
1532
|
+
pmRoot,
|
|
1533
|
+
settings,
|
|
1534
|
+
typeRegistry,
|
|
1535
|
+
parentReferencePolicy
|
|
1536
|
+
});
|
|
1004
1537
|
const blockedByResolution = await resolveBlockedByDependencyTarget(options.blockedBy, clearFrontMatterKeys.has("blocked_by"), pmRoot, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
1005
1538
|
const resolvedBlockedByDependencyId = blockedByResolution.id;
|
|
1006
|
-
|
|
1007
|
-
parentReferenceWarnings.push(`blocked_by_unresolved:${blockedByResolution.unresolved}`);
|
|
1008
|
-
}
|
|
1539
|
+
const parentReferenceWarnings = [...parentReference.warnings, ...blockedByResolutionWarnings(blockedByResolution)];
|
|
1009
1540
|
const runtimeFieldUpdates = collectRuntimeUpdateFieldValues(options, runtimeFieldRegistry, options.runtimeFieldCommands);
|
|
1010
|
-
const fieldFlags =
|
|
1011
|
-
title: options.title !== void 0,
|
|
1012
|
-
description: options.description !== void 0,
|
|
1013
|
-
body: options.body !== void 0,
|
|
1014
|
-
status: options.status !== void 0,
|
|
1015
|
-
closeReason: options.closeReason !== void 0,
|
|
1016
|
-
priority: options.priority !== void 0,
|
|
1017
|
-
type: options.type !== void 0,
|
|
1018
|
-
tags: options.tags !== void 0,
|
|
1019
|
-
addTags: Array.isArray(options.addTags) && options.addTags.length > 0,
|
|
1020
|
-
removeTags: Array.isArray(options.removeTags) && options.removeTags.length > 0,
|
|
1021
|
-
deadline: options.deadline !== void 0,
|
|
1022
|
-
estimatedMinutes: options.estimatedMinutes !== void 0,
|
|
1023
|
-
acceptanceCriteria: options.acceptanceCriteria !== void 0,
|
|
1024
|
-
definitionOfReady: options.definitionOfReady !== void 0,
|
|
1025
|
-
order: options.order !== void 0,
|
|
1026
|
-
rank: options.rank !== void 0,
|
|
1027
|
-
goal: options.goal !== void 0,
|
|
1028
|
-
objective: options.objective !== void 0,
|
|
1029
|
-
value: options.value !== void 0,
|
|
1030
|
-
impact: options.impact !== void 0,
|
|
1031
|
-
outcome: options.outcome !== void 0,
|
|
1032
|
-
whyNow: options.whyNow !== void 0,
|
|
1033
|
-
assignee: options.assignee !== void 0,
|
|
1034
|
-
parent: options.parent !== void 0,
|
|
1035
|
-
reviewer: options.reviewer !== void 0,
|
|
1036
|
-
risk: options.risk !== void 0,
|
|
1037
|
-
confidence: options.confidence !== void 0,
|
|
1038
|
-
sprint: options.sprint !== void 0,
|
|
1039
|
-
release: options.release !== void 0,
|
|
1040
|
-
blockedBy: options.blockedBy !== void 0,
|
|
1041
|
-
blockedReason: options.blockedReason !== void 0,
|
|
1042
|
-
unblockNote: options.unblockNote !== void 0,
|
|
1043
|
-
reporter: options.reporter !== void 0,
|
|
1044
|
-
severity: options.severity !== void 0,
|
|
1045
|
-
environment: options.environment !== void 0,
|
|
1046
|
-
reproSteps: options.reproSteps !== void 0,
|
|
1047
|
-
resolution: options.resolution !== void 0,
|
|
1048
|
-
expectedResult: options.expectedResult !== void 0,
|
|
1049
|
-
actualResult: options.actualResult !== void 0,
|
|
1050
|
-
affectedVersion: options.affectedVersion !== void 0,
|
|
1051
|
-
fixedVersion: options.fixedVersion !== void 0,
|
|
1052
|
-
component: options.component !== void 0,
|
|
1053
|
-
regression: options.regression !== void 0,
|
|
1054
|
-
customerImpact: options.customerImpact !== void 0,
|
|
1055
|
-
dep: options.dep !== void 0,
|
|
1056
|
-
depRemove: options.depRemove !== void 0,
|
|
1057
|
-
replaceDeps: options.replaceDeps === true,
|
|
1058
|
-
comment: options.comment !== void 0,
|
|
1059
|
-
note: options.note !== void 0,
|
|
1060
|
-
learning: options.learning !== void 0,
|
|
1061
|
-
file: options.file !== void 0,
|
|
1062
|
-
test: options.test !== void 0,
|
|
1063
|
-
replaceTests: options.replaceTests === true,
|
|
1064
|
-
doc: options.doc !== void 0,
|
|
1065
|
-
reminder: options.reminder !== void 0,
|
|
1066
|
-
event: options.event !== void 0,
|
|
1067
|
-
typeOption: options.typeOption !== void 0,
|
|
1068
|
-
field: options.field !== void 0,
|
|
1069
|
-
unset: options.unset !== void 0 && options.unset.length > 0,
|
|
1070
|
-
clearDeps: options.clearDeps === true,
|
|
1071
|
-
clearComments: options.clearComments === true,
|
|
1072
|
-
clearNotes: options.clearNotes === true,
|
|
1073
|
-
clearLearnings: options.clearLearnings === true,
|
|
1074
|
-
clearFiles: options.clearFiles === true,
|
|
1075
|
-
clearTests: options.clearTests === true,
|
|
1076
|
-
clearDocs: options.clearDocs === true,
|
|
1077
|
-
clearReminders: options.clearReminders === true,
|
|
1078
|
-
clearEvents: options.clearEvents === true,
|
|
1079
|
-
clearTypeOptions: options.clearTypeOptions === true,
|
|
1080
|
-
runtimeFields: Object.keys(runtimeFieldUpdates).length > 0
|
|
1081
|
-
};
|
|
1541
|
+
const fieldFlags = buildUpdateFieldFlags(options, runtimeFieldUpdates);
|
|
1082
1542
|
const changedFlags = Object.values(fieldFlags).some(Boolean);
|
|
1083
1543
|
if (!changedFlags) {
|
|
1084
|
-
|
|
1085
|
-
if (!located) {
|
|
1086
|
-
throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);
|
|
1087
|
-
}
|
|
1088
|
-
const { document } = await readLocatedItem(located, { schema: settings.schema });
|
|
1089
|
-
return {
|
|
1090
|
-
item: toItemRecord(document.metadata),
|
|
1091
|
-
changed_fields: [],
|
|
1092
|
-
warnings: ["noop_no_update_fields"]
|
|
1093
|
-
};
|
|
1094
|
-
}
|
|
1095
|
-
if (workflowEnforcement !== "off" && typeWorkflows.length > 0 && fieldFlags.status && options.status !== void 0) {
|
|
1096
|
-
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
1097
|
-
if (!located) {
|
|
1098
|
-
throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);
|
|
1099
|
-
}
|
|
1100
|
-
const { document } = await readLocatedItem(located, { schema: settings.schema });
|
|
1101
|
-
const effectiveType = options.type !== void 0 ? resolveTypeName(options.type, typeRegistry) ?? options.type : document.metadata?.type ?? "";
|
|
1102
|
-
const warning = enforceTypeWorkflowTransition({
|
|
1103
|
-
enforcement: workflowEnforcement,
|
|
1104
|
-
typeWorkflows,
|
|
1105
|
-
statusRegistry,
|
|
1106
|
-
typeName: effectiveType,
|
|
1107
|
-
fromStatus: document.metadata?.status ?? "",
|
|
1108
|
-
toStatus: options.status ?? ""
|
|
1109
|
-
});
|
|
1110
|
-
if (warning) {
|
|
1111
|
-
workflowTransitionWarnings.push(warning);
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
if (fieldFlags.status) {
|
|
1115
|
-
const targetStatus = normalizeStatusInput(options.status, statusRegistry);
|
|
1116
|
-
if (targetStatus === statusRegistry.close_status) {
|
|
1117
|
-
const otherFieldKeys = Object.entries(fieldFlags).filter(([key, value]) => value && key !== "status" && key !== "closeReason").map(([key]) => key);
|
|
1118
|
-
const routeWarnings = [];
|
|
1119
|
-
let preChangedFields = [];
|
|
1120
|
-
if (otherFieldKeys.length > 0) {
|
|
1121
|
-
const preUpdate = await runUpdate(id, { ...options, status: void 0, closeReason: void 0, message: void 0 }, global);
|
|
1122
|
-
preChangedFields = preUpdate.changed_fields;
|
|
1123
|
-
routeWarnings.push(...preUpdate.warnings);
|
|
1124
|
-
}
|
|
1125
|
-
const explicitReason = typeof options.closeReason === "string" ? options.closeReason.trim() : "";
|
|
1126
|
-
const fallbackMessage = typeof options.message === "string" ? options.message.trim() : "";
|
|
1127
|
-
const closeReason = explicitReason || fallbackMessage || "Closed via pm update";
|
|
1128
|
-
const reasonDefaulted = explicitReason.length === 0 && fallbackMessage.length === 0;
|
|
1129
|
-
const closeResult = await runClose(id, closeReason, {
|
|
1130
|
-
author: options.author,
|
|
1131
|
-
message: options.message,
|
|
1132
|
-
force: options.force
|
|
1133
|
-
}, global);
|
|
1134
|
-
const warnings = [
|
|
1135
|
-
...workflowTransitionWarnings,
|
|
1136
|
-
...routeWarnings,
|
|
1137
|
-
...closeResult.warnings,
|
|
1138
|
-
"auto_routed_from_update_to_close"
|
|
1139
|
-
];
|
|
1140
|
-
if (reasonDefaulted) {
|
|
1141
|
-
warnings.push("close_reason_defaulted");
|
|
1142
|
-
}
|
|
1143
|
-
return {
|
|
1144
|
-
item: closeResult.item,
|
|
1145
|
-
changed_fields: [...preChangedFields, ...closeResult.changed_fields],
|
|
1146
|
-
warnings
|
|
1147
|
-
};
|
|
1148
|
-
}
|
|
1544
|
+
return buildNoopUpdateResult({ pmRoot, id, settings, typeRegistry });
|
|
1149
1545
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1546
|
+
workflowTransitionWarnings.push(...await collectWorkflowTransitionWarnings({
|
|
1547
|
+
options,
|
|
1548
|
+
fieldFlags,
|
|
1549
|
+
workflowEnforcement,
|
|
1550
|
+
typeWorkflows,
|
|
1551
|
+
statusRegistry,
|
|
1552
|
+
typeRegistry,
|
|
1553
|
+
pmRoot,
|
|
1554
|
+
id,
|
|
1555
|
+
settings
|
|
1556
|
+
}));
|
|
1557
|
+
const routedClose = await routeCloseStatusUpdate({
|
|
1558
|
+
options,
|
|
1559
|
+
fieldFlags,
|
|
1560
|
+
statusRegistry,
|
|
1561
|
+
workflowTransitionWarnings,
|
|
1562
|
+
global,
|
|
1563
|
+
id
|
|
1564
|
+
});
|
|
1565
|
+
if (routedClose) {
|
|
1566
|
+
return routedClose;
|
|
1152
1567
|
}
|
|
1568
|
+
assertMatchingOrderRank(options);
|
|
1153
1569
|
const result = await mutateItem({
|
|
1154
1570
|
pmRoot,
|
|
1155
1571
|
settings,
|
|
@@ -1162,347 +1578,31 @@ async function runUpdate(id, options, global) {
|
|
|
1162
1578
|
bypassAssigneeConflict: options.allowAuditUpdate === true || options.allowAuditDepUpdate === true,
|
|
1163
1579
|
extensionFieldNames,
|
|
1164
1580
|
mutate(document) {
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1581
|
+
return mutateUpdateDocument(document, {
|
|
1582
|
+
options,
|
|
1583
|
+
settings,
|
|
1584
|
+
typeRegistry,
|
|
1585
|
+
statusRegistry,
|
|
1586
|
+
runtimeFieldRegistry,
|
|
1587
|
+
extensionRegistrations,
|
|
1588
|
+
extensionFieldNames,
|
|
1171
1589
|
clearFrontMatterKeys,
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
const previousStatusNormalized = normalizeStatusInput(previousStatus, statusRegistry) ?? previousStatus;
|
|
1189
|
-
if (options.status !== void 0) {
|
|
1190
|
-
const status = parseStatus(options.status, statusRegistry);
|
|
1191
|
-
document.metadata.status = status;
|
|
1192
|
-
if (status === statusRegistry.canceled_status) {
|
|
1193
|
-
delete document.metadata.assignee;
|
|
1194
|
-
}
|
|
1195
|
-
changedFields.push("status");
|
|
1196
|
-
}
|
|
1197
|
-
if (options.closeReason !== void 0 || clearFrontMatterKeys.has("close_reason")) {
|
|
1198
|
-
if (clearFrontMatterKeys.has("close_reason")) {
|
|
1199
|
-
delete document.metadata.close_reason;
|
|
1200
|
-
} else {
|
|
1201
|
-
const closeReason = options.closeReason?.trim() ?? "";
|
|
1202
|
-
if (closeReason.length === 0) {
|
|
1203
|
-
throw new PmCliError("--close-reason must not be empty", EXIT_CODE.USAGE);
|
|
1204
|
-
}
|
|
1205
|
-
document.metadata.close_reason = closeReason;
|
|
1206
|
-
}
|
|
1207
|
-
changedFields.push("close_reason");
|
|
1208
|
-
} else if (options.status !== void 0 && previousStatusNormalized === statusRegistry.close_status && document.metadata.status !== statusRegistry.canceled_status && document.metadata.close_reason !== void 0) {
|
|
1209
|
-
delete document.metadata.close_reason;
|
|
1210
|
-
changedFields.push("close_reason");
|
|
1211
|
-
}
|
|
1212
|
-
if (options.priority !== void 0) {
|
|
1213
|
-
document.metadata.priority = ensurePriority(options.priority);
|
|
1214
|
-
changedFields.push("priority");
|
|
1215
|
-
}
|
|
1216
|
-
if (options.type !== void 0) {
|
|
1217
|
-
const resolvedTypeName = resolveTypeName(options.type, typeRegistry);
|
|
1218
|
-
if (!resolvedTypeName) {
|
|
1219
|
-
throw new PmCliError(buildInvalidTypeError(options.type, typeRegistry.types, resolveItemTypesFilePath(pmRoot, settings.schema)), EXIT_CODE.USAGE);
|
|
1220
|
-
}
|
|
1221
|
-
document.metadata.type = resolvedTypeName;
|
|
1222
|
-
activeTypeName = resolvedTypeName;
|
|
1223
|
-
changedFields.push("type");
|
|
1224
|
-
}
|
|
1225
|
-
enforceUpdateOptionsByType(activeTypeName, options, typeRegistry, extensionFieldNames);
|
|
1226
|
-
if (options.typeOption !== void 0 || clearFrontMatterKeys.has("type_options")) {
|
|
1227
|
-
if (clearFrontMatterKeys.has("type_options")) {
|
|
1228
|
-
delete document.metadata.type_options;
|
|
1229
|
-
} else {
|
|
1230
|
-
const parsedTypeOptions = parseTypeOptionEntries(options.typeOption ?? []);
|
|
1231
|
-
const validation = validateTypeOptions(activeTypeName, parsedTypeOptions, typeRegistry);
|
|
1232
|
-
if (validation.errors.length > 0) {
|
|
1233
|
-
throw new PmCliError(validation.errors.join("; "), EXIT_CODE.USAGE);
|
|
1234
|
-
}
|
|
1235
|
-
document.metadata.type_options = validation.normalized;
|
|
1236
|
-
}
|
|
1237
|
-
changedFields.push("type_options");
|
|
1238
|
-
} else if (options.type !== void 0 && document.metadata.type_options !== void 0) {
|
|
1239
|
-
const validation = validateTypeOptions(activeTypeName, document.metadata.type_options, typeRegistry);
|
|
1240
|
-
if (validation.errors.length > 0) {
|
|
1241
|
-
throw new PmCliError(`Current type options are incompatible with type "${activeTypeName}". ${validation.errors.join("; ")}. Use --clear-type-options to clear them.`, EXIT_CODE.USAGE);
|
|
1242
|
-
}
|
|
1243
|
-
document.metadata.type_options = validation.normalized;
|
|
1244
|
-
}
|
|
1245
|
-
if (options.dep !== void 0 || options.depRemove !== void 0 || clearFrontMatterKeys.has("dependencies")) {
|
|
1246
|
-
let nextDependencies = clearFrontMatterKeys.has("dependencies") ? [] : [...document.metadata.dependencies ?? []];
|
|
1247
|
-
if (dependencyUpdates.additions.length > 0) {
|
|
1248
|
-
const seen = new Set(nextDependencies.map((entry) => dependencyKey(entry)));
|
|
1249
|
-
for (const addition of dependencyUpdates.additions) {
|
|
1250
|
-
const key = dependencyKey(addition);
|
|
1251
|
-
if (seen.has(key)) {
|
|
1252
|
-
continue;
|
|
1253
|
-
}
|
|
1254
|
-
nextDependencies.push(addition);
|
|
1255
|
-
seen.add(key);
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
if (dependencyRemovals.length > 0) {
|
|
1259
|
-
nextDependencies = nextDependencies.filter((entry) => !dependencyRemovals.some((selector) => matchesDependencySelector(entry, selector)));
|
|
1260
|
-
}
|
|
1261
|
-
if (nextDependencies.length === 0) {
|
|
1262
|
-
delete document.metadata.dependencies;
|
|
1263
|
-
} else {
|
|
1264
|
-
document.metadata.dependencies = nextDependencies;
|
|
1265
|
-
}
|
|
1266
|
-
changedFields.push("dependencies");
|
|
1267
|
-
}
|
|
1268
|
-
if (options.comment !== void 0 || clearFrontMatterKeys.has("comments")) {
|
|
1269
|
-
if (clearFrontMatterKeys.has("comments") || !commentUpdates.values || commentUpdates.values.length === 0) {
|
|
1270
|
-
delete document.metadata.comments;
|
|
1271
|
-
} else {
|
|
1272
|
-
document.metadata.comments = [...document.metadata.comments ?? [], ...commentUpdates.values];
|
|
1273
|
-
}
|
|
1274
|
-
changedFields.push("comments");
|
|
1275
|
-
}
|
|
1276
|
-
if (options.note !== void 0 || clearFrontMatterKeys.has("notes")) {
|
|
1277
|
-
if (clearFrontMatterKeys.has("notes") || !noteUpdates.values || noteUpdates.values.length === 0) {
|
|
1278
|
-
delete document.metadata.notes;
|
|
1279
|
-
} else {
|
|
1280
|
-
document.metadata.notes = [...document.metadata.notes ?? [], ...noteUpdates.values];
|
|
1281
|
-
}
|
|
1282
|
-
changedFields.push("notes");
|
|
1283
|
-
}
|
|
1284
|
-
if (options.learning !== void 0 || clearFrontMatterKeys.has("learnings")) {
|
|
1285
|
-
if (clearFrontMatterKeys.has("learnings") || !learningUpdates.values || learningUpdates.values.length === 0) {
|
|
1286
|
-
delete document.metadata.learnings;
|
|
1287
|
-
} else {
|
|
1288
|
-
document.metadata.learnings = [...document.metadata.learnings ?? [], ...learningUpdates.values];
|
|
1289
|
-
}
|
|
1290
|
-
changedFields.push("learnings");
|
|
1291
|
-
}
|
|
1292
|
-
if (options.file !== void 0 || clearFrontMatterKeys.has("files")) {
|
|
1293
|
-
if (clearFrontMatterKeys.has("files") || !fileUpdates.values || fileUpdates.values.length === 0) {
|
|
1294
|
-
delete document.metadata.files;
|
|
1295
|
-
} else {
|
|
1296
|
-
const nextFiles = [...document.metadata.files ?? []];
|
|
1297
|
-
const seen = new Set(nextFiles.map((entry) => fileKey(entry)));
|
|
1298
|
-
for (const entry of fileUpdates.values) {
|
|
1299
|
-
const key = fileKey(entry);
|
|
1300
|
-
if (seen.has(key)) {
|
|
1301
|
-
continue;
|
|
1302
|
-
}
|
|
1303
|
-
nextFiles.push(entry);
|
|
1304
|
-
seen.add(key);
|
|
1305
|
-
}
|
|
1306
|
-
document.metadata.files = nextFiles;
|
|
1307
|
-
}
|
|
1308
|
-
changedFields.push("files");
|
|
1309
|
-
}
|
|
1310
|
-
if (options.test !== void 0 || clearFrontMatterKeys.has("tests")) {
|
|
1311
|
-
if (clearFrontMatterKeys.has("tests") && options.replaceTests === true) {
|
|
1312
|
-
if (!testUpdates.values || testUpdates.values.length === 0) {
|
|
1313
|
-
delete document.metadata.tests;
|
|
1314
|
-
} else {
|
|
1315
|
-
const replacementTests = [];
|
|
1316
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1317
|
-
for (const entry of testUpdates.values) {
|
|
1318
|
-
const key = testKey(entry);
|
|
1319
|
-
if (seen.has(key)) {
|
|
1320
|
-
continue;
|
|
1321
|
-
}
|
|
1322
|
-
replacementTests.push(entry);
|
|
1323
|
-
seen.add(key);
|
|
1324
|
-
}
|
|
1325
|
-
document.metadata.tests = replacementTests;
|
|
1326
|
-
}
|
|
1327
|
-
} else if (clearFrontMatterKeys.has("tests") || !testUpdates.values || testUpdates.values.length === 0) {
|
|
1328
|
-
delete document.metadata.tests;
|
|
1329
|
-
} else {
|
|
1330
|
-
const nextTests = [...document.metadata.tests ?? []];
|
|
1331
|
-
const seen = new Set(nextTests.map((entry) => testKey(entry)));
|
|
1332
|
-
for (const entry of testUpdates.values) {
|
|
1333
|
-
const key = testKey(entry);
|
|
1334
|
-
if (seen.has(key)) {
|
|
1335
|
-
continue;
|
|
1336
|
-
}
|
|
1337
|
-
nextTests.push(entry);
|
|
1338
|
-
seen.add(key);
|
|
1339
|
-
}
|
|
1340
|
-
document.metadata.tests = nextTests;
|
|
1341
|
-
}
|
|
1342
|
-
changedFields.push("tests");
|
|
1343
|
-
}
|
|
1344
|
-
if (options.doc !== void 0 || clearFrontMatterKeys.has("docs")) {
|
|
1345
|
-
if (clearFrontMatterKeys.has("docs") || !docUpdates.values || docUpdates.values.length === 0) {
|
|
1346
|
-
delete document.metadata.docs;
|
|
1347
|
-
} else {
|
|
1348
|
-
const nextDocs = [...document.metadata.docs ?? []];
|
|
1349
|
-
const seen = new Set(nextDocs.map((entry) => docKey(entry)));
|
|
1350
|
-
for (const entry of docUpdates.values) {
|
|
1351
|
-
const key = docKey(entry);
|
|
1352
|
-
if (seen.has(key)) {
|
|
1353
|
-
continue;
|
|
1354
|
-
}
|
|
1355
|
-
nextDocs.push(entry);
|
|
1356
|
-
seen.add(key);
|
|
1357
|
-
}
|
|
1358
|
-
document.metadata.docs = nextDocs;
|
|
1359
|
-
}
|
|
1360
|
-
changedFields.push("docs");
|
|
1361
|
-
}
|
|
1362
|
-
const addTagsValues = options.addTags;
|
|
1363
|
-
const removeTagsValues = options.removeTags;
|
|
1364
|
-
const hasAdditiveTagMutation = Array.isArray(addTagsValues) && addTagsValues.length > 0 || Array.isArray(removeTagsValues) && removeTagsValues.length > 0;
|
|
1365
|
-
if (options.tags !== void 0 || clearFrontMatterKeys.has("tags") || hasAdditiveTagMutation) {
|
|
1366
|
-
const baseTags = clearFrontMatterKeys.has("tags") ? [] : options.tags !== void 0 ? parseTags(options.tags) : Array.isArray(document.metadata.tags) ? [...document.metadata.tags] : [];
|
|
1367
|
-
const withAdditions = mergeAdditiveTags(baseTags, addTagsValues);
|
|
1368
|
-
const finalTags = applyTagRemovals(withAdditions, removeTagsValues);
|
|
1369
|
-
document.metadata.tags = finalTags;
|
|
1370
|
-
changedFields.push("tags");
|
|
1371
|
-
}
|
|
1372
|
-
applyUpdateScalarMutations(UPDATE_POST_TAG_SCALAR_MUTATIONS, options, scalarMutationContext);
|
|
1373
|
-
const orderRaw = options.order ?? options.rank;
|
|
1374
|
-
if (orderRaw !== void 0 || clearFrontMatterKeys.has("order")) {
|
|
1375
|
-
if (clearFrontMatterKeys.has("order")) {
|
|
1376
|
-
delete document.metadata.order;
|
|
1377
|
-
} else {
|
|
1378
|
-
const parsedOrder = parseOptionalNumber(orderRaw ?? "", "order");
|
|
1379
|
-
if (!Number.isInteger(parsedOrder)) {
|
|
1380
|
-
throw new PmCliError("Order must be an integer", EXIT_CODE.USAGE);
|
|
1381
|
-
}
|
|
1382
|
-
document.metadata.order = parsedOrder;
|
|
1383
|
-
}
|
|
1384
|
-
changedFields.push("order");
|
|
1385
|
-
}
|
|
1386
|
-
if (options.assignee !== void 0 || clearFrontMatterKeys.has("assignee")) {
|
|
1387
|
-
if (clearFrontMatterKeys.has("assignee")) {
|
|
1388
|
-
delete document.metadata.assignee;
|
|
1389
|
-
} else {
|
|
1390
|
-
const assignee = options.assignee?.trim() ?? "";
|
|
1391
|
-
if (assignee === "") {
|
|
1392
|
-
throw new PmCliError("--assignee must not be empty. Use --unset assignee to clear it.", EXIT_CODE.USAGE);
|
|
1393
|
-
}
|
|
1394
|
-
document.metadata.assignee = assignee;
|
|
1395
|
-
}
|
|
1396
|
-
changedFields.push("assignee");
|
|
1397
|
-
}
|
|
1398
|
-
if (options.parent !== void 0 || clearFrontMatterKeys.has("parent")) {
|
|
1399
|
-
if (clearFrontMatterKeys.has("parent")) {
|
|
1400
|
-
delete document.metadata.parent;
|
|
1401
|
-
} else {
|
|
1402
|
-
document.metadata.parent = resolvedParentValue ?? "";
|
|
1403
|
-
}
|
|
1404
|
-
changedFields.push("parent");
|
|
1405
|
-
}
|
|
1406
|
-
applyUpdateScalarMutations(UPDATE_STAKEHOLDER_SCALAR_MUTATIONS, options, scalarMutationContext);
|
|
1407
|
-
if (options.sprint !== void 0 || clearFrontMatterKeys.has("sprint")) {
|
|
1408
|
-
if (clearFrontMatterKeys.has("sprint")) {
|
|
1409
|
-
delete document.metadata.sprint;
|
|
1410
|
-
} else {
|
|
1411
|
-
const sprintValidation = validateSprintOrReleaseValue("sprint", options.sprint ?? "", sprintReleasePolicy);
|
|
1412
|
-
document.metadata.sprint = sprintValidation.value;
|
|
1413
|
-
warnings.push(...sprintValidation.warnings);
|
|
1414
|
-
}
|
|
1415
|
-
changedFields.push("sprint");
|
|
1416
|
-
}
|
|
1417
|
-
if (options.release !== void 0 || clearFrontMatterKeys.has("release")) {
|
|
1418
|
-
if (clearFrontMatterKeys.has("release")) {
|
|
1419
|
-
delete document.metadata.release;
|
|
1420
|
-
} else {
|
|
1421
|
-
const releaseValidation = validateSprintOrReleaseValue("release", options.release ?? "", sprintReleasePolicy);
|
|
1422
|
-
document.metadata.release = releaseValidation.value;
|
|
1423
|
-
warnings.push(...releaseValidation.warnings);
|
|
1424
|
-
}
|
|
1425
|
-
changedFields.push("release");
|
|
1426
|
-
}
|
|
1427
|
-
if (options.blockedBy !== void 0 || clearFrontMatterKeys.has("blocked_by")) {
|
|
1428
|
-
if (clearFrontMatterKeys.has("blocked_by")) {
|
|
1429
|
-
delete document.metadata.blocked_by;
|
|
1430
|
-
} else {
|
|
1431
|
-
document.metadata.blocked_by = options.blockedBy?.trim() ?? "";
|
|
1432
|
-
}
|
|
1433
|
-
changedFields.push("blocked_by");
|
|
1434
|
-
applyBlockedByDependencyEdge(document.metadata, resolvedBlockedByDependencyId, nowIso, author, changedFields);
|
|
1435
|
-
}
|
|
1436
|
-
applyUpdateScalarMutations(UPDATE_ISSUE_SCALAR_MUTATIONS, options, scalarMutationContext);
|
|
1437
|
-
if (options.reminder !== void 0 || clearFrontMatterKeys.has("reminders")) {
|
|
1438
|
-
if (clearFrontMatterKeys.has("reminders")) {
|
|
1439
|
-
delete document.metadata.reminders;
|
|
1440
|
-
} else {
|
|
1441
|
-
document.metadata.reminders = parseReminderEntries(options.reminder ?? [], nowValue, { valueMode: "trimmed" });
|
|
1442
|
-
}
|
|
1443
|
-
changedFields.push("reminders");
|
|
1444
|
-
}
|
|
1445
|
-
if (options.event !== void 0 || clearFrontMatterKeys.has("events")) {
|
|
1446
|
-
if (clearFrontMatterKeys.has("events")) {
|
|
1447
|
-
delete document.metadata.events;
|
|
1448
|
-
} else {
|
|
1449
|
-
document.metadata.events = parseEventEntries(options.event ?? [], nowValue, {
|
|
1450
|
-
allDayEmptyGuard: "truthy",
|
|
1451
|
-
recurrenceEmptyNumericGuard: "truthy"
|
|
1452
|
-
});
|
|
1453
|
-
}
|
|
1454
|
-
changedFields.push("events");
|
|
1455
|
-
}
|
|
1456
|
-
for (const definition of runtimeFieldRegistry.definitions) {
|
|
1457
|
-
if (!clearFrontMatterKeys.has(definition.metadata_key)) {
|
|
1458
|
-
continue;
|
|
1459
|
-
}
|
|
1460
|
-
if (metadataRecord[definition.metadata_key] === void 0) {
|
|
1461
|
-
continue;
|
|
1462
|
-
}
|
|
1463
|
-
delete metadataRecord[definition.metadata_key];
|
|
1464
|
-
changedFields.push(definition.metadata_key);
|
|
1465
|
-
}
|
|
1466
|
-
for (const fieldKey of extensionFieldNames) {
|
|
1467
|
-
if (!clearFrontMatterKeys.has(fieldKey)) {
|
|
1468
|
-
continue;
|
|
1469
|
-
}
|
|
1470
|
-
if (metadataRecord[fieldKey] === void 0) {
|
|
1471
|
-
continue;
|
|
1472
|
-
}
|
|
1473
|
-
delete metadataRecord[fieldKey];
|
|
1474
|
-
changedFields.push(fieldKey);
|
|
1475
|
-
}
|
|
1476
|
-
for (const [fieldKey, fieldValue] of Object.entries(runtimeFieldUpdates)) {
|
|
1477
|
-
if (clearFrontMatterKeys.has(fieldKey)) {
|
|
1478
|
-
continue;
|
|
1479
|
-
}
|
|
1480
|
-
if (stableValueEquals(metadataRecord[fieldKey], fieldValue)) {
|
|
1481
|
-
continue;
|
|
1482
|
-
}
|
|
1483
|
-
metadataRecord[fieldKey] = fieldValue;
|
|
1484
|
-
changedFields.push(fieldKey);
|
|
1485
|
-
}
|
|
1486
|
-
const registeredItemFieldUpdates = parseRegisteredItemFieldAssignments(options.field, extensionRegistrations);
|
|
1487
|
-
for (const fieldKey of Object.keys(registeredItemFieldUpdates)) {
|
|
1488
|
-
if (!clearFrontMatterKeys.has(fieldKey)) {
|
|
1489
|
-
continue;
|
|
1490
|
-
}
|
|
1491
|
-
throw new PmCliError(`Cannot combine --unset ${fieldKey.replaceAll("_", "-")} with --field ${fieldKey}=...`, EXIT_CODE.USAGE);
|
|
1492
|
-
}
|
|
1493
|
-
for (const [fieldKey, fieldValue] of Object.entries(registeredItemFieldUpdates)) {
|
|
1494
|
-
if (stableValueEquals(metadataRecord[fieldKey], fieldValue)) {
|
|
1495
|
-
continue;
|
|
1496
|
-
}
|
|
1497
|
-
metadataRecord[fieldKey] = fieldValue;
|
|
1498
|
-
changedFields.push(fieldKey);
|
|
1499
|
-
}
|
|
1500
|
-
try {
|
|
1501
|
-
applyRegisteredItemFieldDefaultsAndValidation(metadataRecord, extensionRegistrations, { skipDefaultFields: clearFrontMatterKeys });
|
|
1502
|
-
} catch (error) {
|
|
1503
|
-
throw new PmCliError(error instanceof Error ? error.message : "Invalid extension item field values", EXIT_CODE.USAGE);
|
|
1504
|
-
}
|
|
1505
|
-
return { changedFields, warnings };
|
|
1590
|
+
dependencyUpdates,
|
|
1591
|
+
dependencyRemovals,
|
|
1592
|
+
commentUpdates,
|
|
1593
|
+
noteUpdates,
|
|
1594
|
+
learningUpdates,
|
|
1595
|
+
fileUpdates,
|
|
1596
|
+
testUpdates,
|
|
1597
|
+
docUpdates,
|
|
1598
|
+
resolvedParentValue: parentReference.resolvedParentValue,
|
|
1599
|
+
resolvedBlockedByDependencyId,
|
|
1600
|
+
runtimeFieldUpdates,
|
|
1601
|
+
nowValue,
|
|
1602
|
+
nowIso,
|
|
1603
|
+
author,
|
|
1604
|
+
pmRoot
|
|
1605
|
+
});
|
|
1506
1606
|
}
|
|
1507
1607
|
});
|
|
1508
1608
|
return {
|
|
@@ -1531,6 +1631,6 @@ export {
|
|
|
1531
1631
|
runUpdate,
|
|
1532
1632
|
_testOnlyUpdateCommand
|
|
1533
1633
|
};
|
|
1534
|
-
//# sourceMappingURL=chunk-
|
|
1634
|
+
//# sourceMappingURL=chunk-7W4H4K26.js.map
|
|
1535
1635
|
|
|
1536
|
-
//# debugId=
|
|
1636
|
+
//# debugId=636bc41a-f03b-528f-84cb-5ab89ae42c00
|