@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
package/dist/cli/main.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Provides CLI runtime support for Main.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!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]="
|
|
8
|
+
!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]="a367900b-1ec4-5110-9997-7f0a02e315c0")}catch(e){}}();
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
import { activateExtensions, clearActiveExtensionHooks, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, } from "../core/extensions/index.js";
|
|
11
11
|
import { pathExists } from "../core/fs/fs-utils.js";
|
|
@@ -132,6 +132,59 @@ function inferMissingFieldsFromErrorMessage(message) {
|
|
|
132
132
|
/* c8 ignore next */
|
|
133
133
|
return normalized.length > 0 ? normalized : undefined;
|
|
134
134
|
}
|
|
135
|
+
function inferMissingFieldsForRecovery(rawMessage, invocationArgv, existingRecovery) {
|
|
136
|
+
if (existingRecovery?.suggested_retry) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
const providedFields = extractProvidedOptionFlags(invocationArgv);
|
|
140
|
+
const providedSet = new Set(providedFields.map((flag) => normalizeLongOptionFlag(flag) ?? flag));
|
|
141
|
+
const rawInferred = inferMissingFieldsFromErrorMessage(rawMessage);
|
|
142
|
+
const trulyMissing = rawInferred?.filter((flag) => !providedSet.has(normalizeLongOptionFlag(flag) ?? flag));
|
|
143
|
+
return trulyMissing && trulyMissing.length > 0 ? trulyMissing : undefined;
|
|
144
|
+
}
|
|
145
|
+
function resolveRecoverySuggestedRetry(invocationArgv, attemptedCommand, inferredMissing, existingRecovery) {
|
|
146
|
+
if (existingRecovery?.suggested_retry) {
|
|
147
|
+
return existingRecovery.suggested_retry;
|
|
148
|
+
}
|
|
149
|
+
const missingFlag = inferredMissing?.[0];
|
|
150
|
+
const normalizedMissing = missingFlag ? normalizeLongOptionFlag(missingFlag) : undefined;
|
|
151
|
+
const suggestedRetry = normalizedMissing
|
|
152
|
+
? renderAttemptedCommand([...invocationArgv, normalizedMissing, "<value>"])
|
|
153
|
+
: attemptedCommand;
|
|
154
|
+
return suggestedRetry === attemptedCommand ? undefined : suggestedRetry;
|
|
155
|
+
}
|
|
156
|
+
function projectExistingRecoveryOptionalFields(existingRecovery) {
|
|
157
|
+
if (!existingRecovery) {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
const optionalFields = [
|
|
161
|
+
"recovery_mode",
|
|
162
|
+
"missing_required_fields",
|
|
163
|
+
"suggested_flags",
|
|
164
|
+
"fallback_candidates",
|
|
165
|
+
"next_best_command",
|
|
166
|
+
];
|
|
167
|
+
const projected = {};
|
|
168
|
+
for (const field of optionalFields) {
|
|
169
|
+
const value = existingRecovery[field];
|
|
170
|
+
if (value !== undefined && value !== null) {
|
|
171
|
+
projected[field] = value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return projected;
|
|
175
|
+
}
|
|
176
|
+
function buildRecoveryPayload(params) {
|
|
177
|
+
const existingRecovery = params.existingRecovery;
|
|
178
|
+
return {
|
|
179
|
+
attempted_command: existingRecovery?.attempted_command ?? params.attemptedCommand,
|
|
180
|
+
normalized_args: existingRecovery?.normalized_args ?? [...params.invocationArgv],
|
|
181
|
+
/* c8 ignore next */
|
|
182
|
+
provided_fields: existingRecovery?.provided_fields ?? (params.providedFields.length > 0 ? params.providedFields : undefined),
|
|
183
|
+
missing: existingRecovery?.missing ?? params.inferredMissing,
|
|
184
|
+
...projectExistingRecoveryOptionalFields(existingRecovery),
|
|
185
|
+
...(params.suggestedRetry ? { suggested_retry: params.suggestedRetry } : {}),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
135
188
|
function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
136
189
|
const explainRequested = invocationArgv.includes("--explain");
|
|
137
190
|
const existingRecovery = context?.recovery;
|
|
@@ -144,40 +197,16 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
144
197
|
}
|
|
145
198
|
const attemptedCommand = renderAttemptedCommand(invocationArgv);
|
|
146
199
|
const providedFields = extractProvidedOptionFlags(invocationArgv);
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
/* c8 ignore next */
|
|
158
|
-
if (normalizedMissing) {
|
|
159
|
-
suggestedRetry = renderAttemptedCommand([...invocationArgv, normalizedMissing, "<value>"]);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (!suggestedRetry) {
|
|
163
|
-
suggestedRetry = attemptedCommand;
|
|
164
|
-
}
|
|
165
|
-
if (!existingRecovery?.suggested_retry && suggestedRetry === attemptedCommand) {
|
|
166
|
-
suggestedRetry = undefined;
|
|
167
|
-
}
|
|
168
|
-
const recovery = {
|
|
169
|
-
attempted_command: existingRecovery?.attempted_command ?? attemptedCommand,
|
|
170
|
-
normalized_args: existingRecovery?.normalized_args ?? [...invocationArgv],
|
|
171
|
-
/* c8 ignore next */
|
|
172
|
-
provided_fields: existingRecovery?.provided_fields ?? (providedFields.length > 0 ? providedFields : undefined),
|
|
173
|
-
missing: existingRecovery?.missing ?? inferredMissing,
|
|
174
|
-
...(existingRecovery?.recovery_mode ? { recovery_mode: existingRecovery.recovery_mode } : {}),
|
|
175
|
-
...(existingRecovery?.missing_required_fields ? { missing_required_fields: existingRecovery.missing_required_fields } : {}),
|
|
176
|
-
...(existingRecovery?.suggested_flags ? { suggested_flags: existingRecovery.suggested_flags } : {}),
|
|
177
|
-
...(suggestedRetry ? { suggested_retry: suggestedRetry } : {}),
|
|
178
|
-
...(existingRecovery?.fallback_candidates ? { fallback_candidates: existingRecovery.fallback_candidates } : {}),
|
|
179
|
-
...(existingRecovery?.next_best_command ? { next_best_command: existingRecovery.next_best_command } : {}),
|
|
180
|
-
};
|
|
200
|
+
const inferredMissing = inferMissingFieldsForRecovery(rawMessage, invocationArgv, existingRecovery);
|
|
201
|
+
const suggestedRetry = resolveRecoverySuggestedRetry(invocationArgv, attemptedCommand, inferredMissing, existingRecovery);
|
|
202
|
+
const recovery = buildRecoveryPayload({
|
|
203
|
+
invocationArgv,
|
|
204
|
+
attemptedCommand,
|
|
205
|
+
providedFields,
|
|
206
|
+
inferredMissing,
|
|
207
|
+
suggestedRetry,
|
|
208
|
+
existingRecovery,
|
|
209
|
+
});
|
|
181
210
|
return {
|
|
182
211
|
...context,
|
|
183
212
|
recovery,
|
|
@@ -1316,36 +1345,67 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
|
|
|
1316
1345
|
visit(rootProgram);
|
|
1317
1346
|
}
|
|
1318
1347
|
/* c8 ignore stop */
|
|
1348
|
+
async function clearDynamicExtensionCommandState(params) {
|
|
1349
|
+
activeRuntimeExtensionCommandDescriptors = new Map();
|
|
1350
|
+
setActiveExtensionServices({ overrides: [] });
|
|
1351
|
+
if (params) {
|
|
1352
|
+
await maybeAttachCreateUpdatePolicyHelpText(params.rootProgram, params.pmRoot, params.invocationArgv, createEmptyExtensionRegistrationRegistry(), params.settings);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
/* v8 ignore start -- dynamic help fallback variants are exercised through registration integration tests; residual legacy branches are defensive */
|
|
1356
|
+
function attachDynamicExtensionHelp(command, descriptor, flagHelp, metadataHelp) {
|
|
1357
|
+
if (descriptor?.flags && descriptor.flags.length > 0) {
|
|
1358
|
+
applyDynamicExtensionFlagOptions(command, descriptor.flags);
|
|
1359
|
+
const residualFlagHelp = buildResidualDynamicExtensionFlagHelp(command, descriptor.flags);
|
|
1360
|
+
if (residualFlagHelp) {
|
|
1361
|
+
command.addHelpText("after", residualFlagHelp);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
else if (flagHelp) {
|
|
1365
|
+
command.addHelpText("after", flagHelp);
|
|
1366
|
+
}
|
|
1367
|
+
if (metadataHelp) {
|
|
1368
|
+
command.addHelpText("after", metadataHelp);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
/* v8 ignore stop */
|
|
1319
1372
|
/* c8 ignore start */
|
|
1320
1373
|
async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv) {
|
|
1321
1374
|
const bootstrapGlobalOptions = parseBootstrapGlobalOptions(invocationArgv);
|
|
1322
1375
|
const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
|
|
1323
1376
|
if (bootstrapGlobalOptions.noExtensions) {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1377
|
+
await clearDynamicExtensionCommandState({
|
|
1378
|
+
rootProgram,
|
|
1379
|
+
pmRoot,
|
|
1380
|
+
invocationArgv,
|
|
1381
|
+
});
|
|
1327
1382
|
return;
|
|
1328
1383
|
}
|
|
1329
1384
|
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(pmRoot);
|
|
1330
1385
|
const probe = buildBootstrapActivationProbe(invocationArgv);
|
|
1331
1386
|
if (!discoverySnapshot) {
|
|
1332
|
-
|
|
1333
|
-
setActiveExtensionServices({ overrides: [] });
|
|
1387
|
+
await clearDynamicExtensionCommandState();
|
|
1334
1388
|
return;
|
|
1335
1389
|
}
|
|
1336
1390
|
if (!discoveryNeedsActivationForProbe(discoverySnapshot.discovery, probe)) {
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1391
|
+
await clearDynamicExtensionCommandState({
|
|
1392
|
+
rootProgram,
|
|
1393
|
+
pmRoot,
|
|
1394
|
+
invocationArgv,
|
|
1395
|
+
settings: discoverySnapshot.settings,
|
|
1396
|
+
});
|
|
1340
1397
|
emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, probe);
|
|
1341
1398
|
return;
|
|
1342
1399
|
}
|
|
1343
1400
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
1344
1401
|
/* c8 ignore next */
|
|
1345
1402
|
if (!snapshot) {
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1403
|
+
await clearDynamicExtensionCommandState({
|
|
1404
|
+
rootProgram,
|
|
1405
|
+
pmRoot,
|
|
1406
|
+
invocationArgv,
|
|
1407
|
+
settings: discoverySnapshot.settings,
|
|
1408
|
+
});
|
|
1349
1409
|
return;
|
|
1350
1410
|
}
|
|
1351
1411
|
// Ensure usage/help/error formatting overrides are available even when parse
|
|
@@ -1364,20 +1424,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
|
|
|
1364
1424
|
const flagHelp = snapshot.commandFlagHelp.get(commandPath);
|
|
1365
1425
|
const metadataHelp = descriptor ? buildDynamicExtensionCommandMetadataHelp(descriptor) : null;
|
|
1366
1426
|
if (existingCommand) {
|
|
1367
|
-
|
|
1368
|
-
applyDynamicExtensionFlagOptions(existingCommand, descriptor.flags);
|
|
1369
|
-
const residualFlagHelp = buildResidualDynamicExtensionFlagHelp(existingCommand, descriptor.flags);
|
|
1370
|
-
if (residualFlagHelp) {
|
|
1371
|
-
existingCommand.addHelpText("after", residualFlagHelp);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
else if (flagHelp) {
|
|
1375
|
-
existingCommand.addHelpText("after", flagHelp);
|
|
1376
|
-
}
|
|
1377
|
-
/* c8 ignore next */
|
|
1378
|
-
if (metadataHelp) {
|
|
1379
|
-
existingCommand.addHelpText("after", metadataHelp);
|
|
1380
|
-
}
|
|
1427
|
+
attachDynamicExtensionHelp(existingCommand, descriptor, flagHelp, metadataHelp);
|
|
1381
1428
|
continue;
|
|
1382
1429
|
}
|
|
1383
1430
|
const dynamicCommand = ensureCommandPath(rootProgram, pathParts);
|
|
@@ -1861,6 +1908,315 @@ function enforceExplicitRetryForFlagTypos(bootstrapInvocation) {
|
|
|
1861
1908
|
},
|
|
1862
1909
|
});
|
|
1863
1910
|
}
|
|
1911
|
+
function createTelemetryCommandErrorEmitter(params) {
|
|
1912
|
+
return async (event) => {
|
|
1913
|
+
const errorCategory = resolveTelemetryErrorCategory(event.errorCode);
|
|
1914
|
+
const commandResolution = deriveTelemetryCommandResolution({
|
|
1915
|
+
ok: false,
|
|
1916
|
+
errorCode: event.errorCode,
|
|
1917
|
+
errorCategory,
|
|
1918
|
+
});
|
|
1919
|
+
await emitTelemetryErrorEvent({
|
|
1920
|
+
command: event.command,
|
|
1921
|
+
args: params.invocationArgv,
|
|
1922
|
+
options: event.options,
|
|
1923
|
+
global: params.bootstrapGlobal,
|
|
1924
|
+
pm_version: CLI_VERSION,
|
|
1925
|
+
pm_root: params.bootstrapPmRoot,
|
|
1926
|
+
error_code: event.errorCode,
|
|
1927
|
+
error_message: event.errorMessage,
|
|
1928
|
+
exit_code: event.exitCode,
|
|
1929
|
+
error_category: errorCategory,
|
|
1930
|
+
command_resolution: commandResolution,
|
|
1931
|
+
resolution_stage: event.resolutionStage,
|
|
1932
|
+
});
|
|
1933
|
+
return {
|
|
1934
|
+
errorCategory,
|
|
1935
|
+
commandResolution,
|
|
1936
|
+
};
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
async function prepareExtensionServicesForRunPmCliError(params) {
|
|
1940
|
+
if (params.bootstrapGlobal.noExtensions) {
|
|
1941
|
+
return;
|
|
1942
|
+
}
|
|
1943
|
+
const bootstrapProbe = buildBootstrapActivationProbe(params.invocationArgv);
|
|
1944
|
+
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(params.bootstrapPmRoot);
|
|
1945
|
+
if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
|
|
1946
|
+
const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(params.bootstrapPmRoot);
|
|
1947
|
+
setRecoveredExtensionServices(bootstrapSnapshot);
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1950
|
+
if (discoverySnapshot) {
|
|
1951
|
+
emitExtensionSkippedProfile(bootstrapProfileEnabled(params.invocationArgv), discoverySnapshot, bootstrapProbe);
|
|
1952
|
+
}
|
|
1953
|
+
setActiveExtensionServices({ overrides: [] });
|
|
1954
|
+
}
|
|
1955
|
+
function setRecoveredExtensionServices(bootstrapSnapshot) {
|
|
1956
|
+
if (!bootstrapSnapshot) {
|
|
1957
|
+
setActiveExtensionServices({ overrides: [] });
|
|
1958
|
+
return;
|
|
1959
|
+
}
|
|
1960
|
+
setActiveExtensionServices(bootstrapSnapshot.services);
|
|
1961
|
+
}
|
|
1962
|
+
async function finishRunPmCliFailure(params) {
|
|
1963
|
+
sentryFinishCommandSpan(false, params.errorMessage, {
|
|
1964
|
+
error_code: params.classificationCode,
|
|
1965
|
+
error_category: params.errorCategory,
|
|
1966
|
+
exit_code: params.exitCode,
|
|
1967
|
+
command_resolution: params.commandResolution,
|
|
1968
|
+
resolution_stage: params.resolutionStage,
|
|
1969
|
+
});
|
|
1970
|
+
await runAndClearAfterCommandHooks({
|
|
1971
|
+
ok: false,
|
|
1972
|
+
error: params.errorMessage,
|
|
1973
|
+
exit_code: params.exitCode,
|
|
1974
|
+
error_code: params.classificationCode,
|
|
1975
|
+
error_category: params.errorCategory,
|
|
1976
|
+
command_resolution: params.commandResolution,
|
|
1977
|
+
resolution_stage: params.resolutionStage,
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
async function finishRunPmCliSuccessParse() {
|
|
1981
|
+
sentryFinishCommandSpan(true, undefined, {
|
|
1982
|
+
exit_code: EXIT_CODE.SUCCESS,
|
|
1983
|
+
command_resolution: "success",
|
|
1984
|
+
resolution_stage: "parse",
|
|
1985
|
+
});
|
|
1986
|
+
await runAndClearAfterCommandHooks({
|
|
1987
|
+
ok: true,
|
|
1988
|
+
exit_code: EXIT_CODE.SUCCESS,
|
|
1989
|
+
command_resolution: "success",
|
|
1990
|
+
resolution_stage: "parse",
|
|
1991
|
+
});
|
|
1992
|
+
process.exitCode = EXIT_CODE.SUCCESS;
|
|
1993
|
+
}
|
|
1994
|
+
async function handleRunPmCliKnownError(context, numericExitCode) {
|
|
1995
|
+
const hasExplicitExitCode = typeof numericExitCode === "number" && Number.isFinite(numericExitCode);
|
|
1996
|
+
if (!(context.error instanceof PmCliError) &&
|
|
1997
|
+
(isCommanderError(context.error) || !hasExplicitExitCode)) {
|
|
1998
|
+
return false;
|
|
1999
|
+
}
|
|
2000
|
+
const errorMessage = describeUnknownError(context.error);
|
|
2001
|
+
const exitCode = context.error instanceof PmCliError ? context.error.exitCode : normalizeThrownExitCode(numericExitCode);
|
|
2002
|
+
const rawContext = context.error instanceof PmCliError ? context.error.context : undefined;
|
|
2003
|
+
const enrichedContext = buildPmCliRecoveryContext(rawContext, context.invocationArgv, errorMessage);
|
|
2004
|
+
const classification = classifyPmCliError(errorMessage, enrichedContext);
|
|
2005
|
+
const renderedError = context.jsonErrors
|
|
2006
|
+
? JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2)
|
|
2007
|
+
: formatPmCliErrorForDisplay(errorMessage, enrichedContext);
|
|
2008
|
+
printError(renderedError);
|
|
2009
|
+
const { errorCategory, commandResolution } = await context.emitTelemetryCommandError({
|
|
2010
|
+
command: context.attemptedCommand,
|
|
2011
|
+
errorCode: classification.code,
|
|
2012
|
+
errorMessage: classification.detail,
|
|
2013
|
+
exitCode,
|
|
2014
|
+
options: {
|
|
2015
|
+
bootstrap_global_options: context.bootstrapGlobal,
|
|
2016
|
+
},
|
|
2017
|
+
resolutionStage: "execute",
|
|
2018
|
+
});
|
|
2019
|
+
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
2020
|
+
command: context.attemptedCommand,
|
|
2021
|
+
error_code: classification.code,
|
|
2022
|
+
error_category: errorCategory,
|
|
2023
|
+
exit_code: exitCode,
|
|
2024
|
+
error_message: classification.detail,
|
|
2025
|
+
command_resolution: commandResolution,
|
|
2026
|
+
resolution_stage: "execute",
|
|
2027
|
+
source_context: activeTelemetryCommandContext?.source_context,
|
|
2028
|
+
});
|
|
2029
|
+
await finishRunPmCliFailure({
|
|
2030
|
+
errorMessage,
|
|
2031
|
+
exitCode,
|
|
2032
|
+
classificationCode: classification.code,
|
|
2033
|
+
errorCategory,
|
|
2034
|
+
commandResolution,
|
|
2035
|
+
resolutionStage: "execute",
|
|
2036
|
+
});
|
|
2037
|
+
if (loggedHandledErrorToSentry) {
|
|
2038
|
+
sentryCaptureCliError(wrapThrownErrorForSentry(context.error, errorMessage));
|
|
2039
|
+
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2040
|
+
}
|
|
2041
|
+
process.exitCode = exitCode;
|
|
2042
|
+
return true;
|
|
2043
|
+
}
|
|
2044
|
+
function resolveUnknownHelpToken(invocationArgv) {
|
|
2045
|
+
const helpRequest = parseBootstrapHelpRequest(invocationArgv);
|
|
2046
|
+
return helpRequest.commandPathTokens[0] ?? parseBootstrapCommandName(invocationArgv) ?? "<command>";
|
|
2047
|
+
}
|
|
2048
|
+
async function handleUnknownHelpCommandError(context, code) {
|
|
2049
|
+
const unknownToken = resolveUnknownHelpToken(context.invocationArgv);
|
|
2050
|
+
const unknownMessage = `unknown command '${unknownToken}'`;
|
|
2051
|
+
const recoveryCommandDescriptors = await loadRuntimeExtensionCommandDescriptorsForRecovery(resolvePmRoot(process.cwd(), context.bootstrapGlobal.path));
|
|
2052
|
+
const usageContext = await resolveCommanderUsageContext({ message: unknownMessage }, program, recoveryCommandDescriptors);
|
|
2053
|
+
const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
|
|
2054
|
+
unknownCommandExamples: usageContext.unknownCommandExamples,
|
|
2055
|
+
unknownCommandNextSteps: usageContext.unknownCommandNextSteps,
|
|
2056
|
+
attemptedCommand: usageContext.attemptedCommand,
|
|
2057
|
+
normalizedInvocationArgs: usageContext.normalizedInvocationArgs,
|
|
2058
|
+
providedOptionFlags: usageContext.providedOptionFlags,
|
|
2059
|
+
unknownOptionSuggestions: usageContext.unknownOptionSuggestions,
|
|
2060
|
+
suggestedRetryCommand: usageContext.suggestedRetryCommand,
|
|
2061
|
+
});
|
|
2062
|
+
const { errorCategory, commandResolution } = await context.emitTelemetryCommandError({
|
|
2063
|
+
command: unknownToken,
|
|
2064
|
+
errorCode: classification.code,
|
|
2065
|
+
errorMessage: classification.detail,
|
|
2066
|
+
exitCode: EXIT_CODE.USAGE,
|
|
2067
|
+
options: {
|
|
2068
|
+
bootstrap_global_options: context.bootstrapGlobal,
|
|
2069
|
+
commander_code: code ?? "commander.helpDisplayed",
|
|
2070
|
+
},
|
|
2071
|
+
resolutionStage: "parse",
|
|
2072
|
+
});
|
|
2073
|
+
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
2074
|
+
command: unknownToken,
|
|
2075
|
+
error_code: classification.code,
|
|
2076
|
+
error_category: errorCategory,
|
|
2077
|
+
exit_code: EXIT_CODE.USAGE,
|
|
2078
|
+
error_message: classification.detail,
|
|
2079
|
+
command_resolution: commandResolution,
|
|
2080
|
+
resolution_stage: "parse",
|
|
2081
|
+
source_context: activeTelemetryCommandContext?.source_context,
|
|
2082
|
+
});
|
|
2083
|
+
const renderedUsage = context.jsonErrors
|
|
2084
|
+
? await formatCommanderUsageJson({ message: unknownMessage }, program, recoveryCommandDescriptors)
|
|
2085
|
+
: await formatCommanderUsageMessage({ message: unknownMessage }, program, recoveryCommandDescriptors);
|
|
2086
|
+
await finishRunPmCliFailure({
|
|
2087
|
+
errorMessage: unknownMessage,
|
|
2088
|
+
exitCode: EXIT_CODE.USAGE,
|
|
2089
|
+
classificationCode: classification.code,
|
|
2090
|
+
errorCategory,
|
|
2091
|
+
commandResolution,
|
|
2092
|
+
resolutionStage: "parse",
|
|
2093
|
+
});
|
|
2094
|
+
printError(renderedUsage);
|
|
2095
|
+
if (loggedHandledErrorToSentry) {
|
|
2096
|
+
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2097
|
+
}
|
|
2098
|
+
process.exitCode = EXIT_CODE.USAGE;
|
|
2099
|
+
}
|
|
2100
|
+
async function handleRunPmCliHelpDisplayError(context, code, rawMessage) {
|
|
2101
|
+
const isHelpDisplayCode = code === "commander.helpDisplayed" || code === "commander.help" || code === "commander.helpCommand";
|
|
2102
|
+
if (!isHelpDisplayCode && !rawMessage.includes("(outputHelp)")) {
|
|
2103
|
+
return false;
|
|
2104
|
+
}
|
|
2105
|
+
const helpRequest = parseBootstrapHelpRequest(context.invocationArgv);
|
|
2106
|
+
if (helpRequest.requested && !isKnownHelpCommandPath(program, helpRequest.commandPathTokens)) {
|
|
2107
|
+
await handleUnknownHelpCommandError(context, code);
|
|
2108
|
+
return true;
|
|
2109
|
+
}
|
|
2110
|
+
await finishRunPmCliSuccessParse();
|
|
2111
|
+
return true;
|
|
2112
|
+
}
|
|
2113
|
+
async function handleRunPmCliCommanderUsageError(context, code) {
|
|
2114
|
+
const usageContext = await resolveCommanderUsageContext(context.error, program, activeRuntimeExtensionCommandDescriptors);
|
|
2115
|
+
const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
|
|
2116
|
+
unknownCommandExamples: usageContext.unknownCommandExamples,
|
|
2117
|
+
unknownCommandNextSteps: usageContext.unknownCommandNextSteps,
|
|
2118
|
+
attemptedCommand: usageContext.attemptedCommand,
|
|
2119
|
+
normalizedInvocationArgs: usageContext.normalizedInvocationArgs,
|
|
2120
|
+
providedOptionFlags: usageContext.providedOptionFlags,
|
|
2121
|
+
unknownOptionSuggestions: usageContext.unknownOptionSuggestions,
|
|
2122
|
+
suggestedRetryCommand: usageContext.suggestedRetryCommand,
|
|
2123
|
+
});
|
|
2124
|
+
const { errorCategory, commandResolution } = await context.emitTelemetryCommandError({
|
|
2125
|
+
command: context.attemptedCommand,
|
|
2126
|
+
errorCode: classification.code,
|
|
2127
|
+
errorMessage: classification.detail,
|
|
2128
|
+
exitCode: EXIT_CODE.USAGE,
|
|
2129
|
+
options: {
|
|
2130
|
+
bootstrap_global_options: context.bootstrapGlobal,
|
|
2131
|
+
commander_code: code,
|
|
2132
|
+
},
|
|
2133
|
+
resolutionStage: "parse",
|
|
2134
|
+
});
|
|
2135
|
+
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
2136
|
+
command: context.attemptedCommand,
|
|
2137
|
+
error_code: classification.code,
|
|
2138
|
+
error_category: errorCategory,
|
|
2139
|
+
exit_code: EXIT_CODE.USAGE,
|
|
2140
|
+
error_message: classification.detail,
|
|
2141
|
+
command_resolution: commandResolution,
|
|
2142
|
+
resolution_stage: "parse",
|
|
2143
|
+
source_context: activeTelemetryCommandContext?.source_context,
|
|
2144
|
+
});
|
|
2145
|
+
const renderedUsage = context.jsonErrors
|
|
2146
|
+
? await formatCommanderUsageJson(context.error, program, activeRuntimeExtensionCommandDescriptors)
|
|
2147
|
+
: await formatCommanderUsageMessage(context.error, program, activeRuntimeExtensionCommandDescriptors);
|
|
2148
|
+
await finishRunPmCliFailure({
|
|
2149
|
+
errorMessage: usageContext.message,
|
|
2150
|
+
exitCode: EXIT_CODE.USAGE,
|
|
2151
|
+
classificationCode: classification.code,
|
|
2152
|
+
errorCategory,
|
|
2153
|
+
commandResolution,
|
|
2154
|
+
resolutionStage: "parse",
|
|
2155
|
+
});
|
|
2156
|
+
printError(renderedUsage);
|
|
2157
|
+
if (loggedHandledErrorToSentry) {
|
|
2158
|
+
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2159
|
+
}
|
|
2160
|
+
process.exitCode = EXIT_CODE.USAGE;
|
|
2161
|
+
}
|
|
2162
|
+
function shouldHandleRunPmCliCommanderError(error) {
|
|
2163
|
+
if (typeof error !== "object" || error === null || !("code" in error)) {
|
|
2164
|
+
return false;
|
|
2165
|
+
}
|
|
2166
|
+
const code = error.code;
|
|
2167
|
+
if (typeof code === "string" && (code === "commander.version" || code.startsWith("commander."))) {
|
|
2168
|
+
return true;
|
|
2169
|
+
}
|
|
2170
|
+
const rawMessage = String(error.message ?? "");
|
|
2171
|
+
return rawMessage.includes("(outputHelp)");
|
|
2172
|
+
}
|
|
2173
|
+
async function handleRunPmCliCommanderError(context) {
|
|
2174
|
+
const code = context.error.code;
|
|
2175
|
+
const rawMessage = String(context.error.message ?? "");
|
|
2176
|
+
if (await handleRunPmCliHelpDisplayError(context, code, rawMessage)) {
|
|
2177
|
+
return;
|
|
2178
|
+
}
|
|
2179
|
+
if (code === "commander.version") {
|
|
2180
|
+
await finishRunPmCliSuccessParse();
|
|
2181
|
+
return;
|
|
2182
|
+
}
|
|
2183
|
+
await handleRunPmCliCommanderUsageError(context, code);
|
|
2184
|
+
}
|
|
2185
|
+
async function handleRunPmCliError(params) {
|
|
2186
|
+
const bootstrapGlobal = parseBootstrapGlobalOptions(params.invocationArgv);
|
|
2187
|
+
const bootstrapPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);
|
|
2188
|
+
const context = {
|
|
2189
|
+
error: params.error,
|
|
2190
|
+
invocationArgv: params.invocationArgv,
|
|
2191
|
+
bootstrapGlobal,
|
|
2192
|
+
jsonErrors: bootstrapGlobal.json,
|
|
2193
|
+
bootstrapPmRoot,
|
|
2194
|
+
attemptedCommand: parseBootstrapCommandName(params.invocationArgv) ?? "<unknown>",
|
|
2195
|
+
emitTelemetryCommandError: createTelemetryCommandErrorEmitter({
|
|
2196
|
+
invocationArgv: params.invocationArgv,
|
|
2197
|
+
bootstrapGlobal,
|
|
2198
|
+
bootstrapPmRoot,
|
|
2199
|
+
}),
|
|
2200
|
+
};
|
|
2201
|
+
await prepareExtensionServicesForRunPmCliError({
|
|
2202
|
+
invocationArgv: params.invocationArgv,
|
|
2203
|
+
bootstrapGlobal,
|
|
2204
|
+
bootstrapPmRoot,
|
|
2205
|
+
});
|
|
2206
|
+
if (await handleRunPmCliKnownError(context, readThrownExitCode(params.error))) {
|
|
2207
|
+
return;
|
|
2208
|
+
}
|
|
2209
|
+
if (shouldHandleRunPmCliCommanderError(params.error)) {
|
|
2210
|
+
await handleRunPmCliCommanderError(context);
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
await handleGenericRunPmCliError({
|
|
2214
|
+
error: params.error,
|
|
2215
|
+
attemptedCommand: context.attemptedCommand,
|
|
2216
|
+
bootstrapGlobal,
|
|
2217
|
+
emitTelemetryCommandError: context.emitTelemetryCommandError,
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
1864
2220
|
/**
|
|
1865
2221
|
* Implements run pm cli for the public runtime surface of this module.
|
|
1866
2222
|
*/
|
|
@@ -1900,286 +2256,7 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1900
2256
|
await program.parseAsync(invocationProcessArgv);
|
|
1901
2257
|
}
|
|
1902
2258
|
catch (error) {
|
|
1903
|
-
|
|
1904
|
-
const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);
|
|
1905
|
-
const jsonErrors = bootstrapGlobal.json;
|
|
1906
|
-
const bootstrapPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);
|
|
1907
|
-
const attemptedCommand = parseBootstrapCommandName(invocationArgv) ?? "<unknown>";
|
|
1908
|
-
const emitTelemetryCommandError = async (params) => {
|
|
1909
|
-
const errorCategory = resolveTelemetryErrorCategory(params.errorCode);
|
|
1910
|
-
const commandResolution = deriveTelemetryCommandResolution({
|
|
1911
|
-
ok: false,
|
|
1912
|
-
errorCode: params.errorCode,
|
|
1913
|
-
errorCategory,
|
|
1914
|
-
});
|
|
1915
|
-
await emitTelemetryErrorEvent({
|
|
1916
|
-
command: params.command,
|
|
1917
|
-
args: invocationArgv,
|
|
1918
|
-
options: params.options,
|
|
1919
|
-
global: bootstrapGlobal,
|
|
1920
|
-
pm_version: CLI_VERSION,
|
|
1921
|
-
pm_root: bootstrapPmRoot,
|
|
1922
|
-
error_code: params.errorCode,
|
|
1923
|
-
error_message: params.errorMessage,
|
|
1924
|
-
exit_code: params.exitCode,
|
|
1925
|
-
error_category: errorCategory,
|
|
1926
|
-
command_resolution: commandResolution,
|
|
1927
|
-
resolution_stage: params.resolutionStage,
|
|
1928
|
-
});
|
|
1929
|
-
return {
|
|
1930
|
-
errorCategory,
|
|
1931
|
-
commandResolution,
|
|
1932
|
-
};
|
|
1933
|
-
};
|
|
1934
|
-
if (!bootstrapGlobal.noExtensions) {
|
|
1935
|
-
const bootstrapProbe = buildBootstrapActivationProbe(invocationArgv);
|
|
1936
|
-
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(bootstrapPmRoot);
|
|
1937
|
-
if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
|
|
1938
|
-
const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
|
|
1939
|
-
/* c8 ignore next */
|
|
1940
|
-
setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
|
|
1941
|
-
}
|
|
1942
|
-
else {
|
|
1943
|
-
/* c8 ignore next */
|
|
1944
|
-
if (discoverySnapshot) {
|
|
1945
|
-
emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, bootstrapProbe);
|
|
1946
|
-
}
|
|
1947
|
-
setActiveExtensionServices({ overrides: [] });
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
const numericExitCode = readThrownExitCode(error);
|
|
1951
|
-
if (error instanceof PmCliError ||
|
|
1952
|
-
(!isCommanderError(error) && typeof numericExitCode === "number" && Number.isFinite(numericExitCode))) {
|
|
1953
|
-
const errorMessage = describeUnknownError(error);
|
|
1954
|
-
const exitCode = error instanceof PmCliError ? error.exitCode : normalizeThrownExitCode(numericExitCode);
|
|
1955
|
-
const context = error instanceof PmCliError ? error.context : undefined;
|
|
1956
|
-
const enrichedContext = buildPmCliRecoveryContext(context, invocationArgv, errorMessage);
|
|
1957
|
-
const classification = classifyPmCliError(errorMessage, enrichedContext);
|
|
1958
|
-
const renderedError = jsonErrors
|
|
1959
|
-
? JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2)
|
|
1960
|
-
: formatPmCliErrorForDisplay(errorMessage, enrichedContext);
|
|
1961
|
-
printError(renderedError);
|
|
1962
|
-
const { errorCategory, commandResolution } = await emitTelemetryCommandError({
|
|
1963
|
-
command: attemptedCommand,
|
|
1964
|
-
errorCode: classification.code,
|
|
1965
|
-
errorMessage: classification.detail,
|
|
1966
|
-
exitCode,
|
|
1967
|
-
options: {
|
|
1968
|
-
bootstrap_global_options: bootstrapGlobal,
|
|
1969
|
-
},
|
|
1970
|
-
resolutionStage: "execute",
|
|
1971
|
-
});
|
|
1972
|
-
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
1973
|
-
command: attemptedCommand,
|
|
1974
|
-
error_code: classification.code,
|
|
1975
|
-
error_category: errorCategory,
|
|
1976
|
-
exit_code: exitCode,
|
|
1977
|
-
error_message: classification.detail,
|
|
1978
|
-
command_resolution: commandResolution,
|
|
1979
|
-
resolution_stage: "execute",
|
|
1980
|
-
source_context: activeTelemetryCommandContext?.source_context,
|
|
1981
|
-
});
|
|
1982
|
-
sentryFinishCommandSpan(false, errorMessage, {
|
|
1983
|
-
error_code: classification.code,
|
|
1984
|
-
error_category: errorCategory,
|
|
1985
|
-
exit_code: exitCode,
|
|
1986
|
-
command_resolution: commandResolution,
|
|
1987
|
-
resolution_stage: "execute",
|
|
1988
|
-
});
|
|
1989
|
-
await runAndClearAfterCommandHooks({
|
|
1990
|
-
ok: false,
|
|
1991
|
-
error: errorMessage,
|
|
1992
|
-
exit_code: exitCode,
|
|
1993
|
-
error_code: classification.code,
|
|
1994
|
-
error_category: errorCategory,
|
|
1995
|
-
command_resolution: commandResolution,
|
|
1996
|
-
resolution_stage: "execute",
|
|
1997
|
-
});
|
|
1998
|
-
if (loggedHandledErrorToSentry) {
|
|
1999
|
-
sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
|
|
2000
|
-
}
|
|
2001
|
-
if (loggedHandledErrorToSentry) {
|
|
2002
|
-
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2003
|
-
}
|
|
2004
|
-
process.exitCode = exitCode;
|
|
2005
|
-
return;
|
|
2006
|
-
}
|
|
2007
|
-
if (typeof error === "object" && error !== null && "code" in error) {
|
|
2008
|
-
const code = error.code;
|
|
2009
|
-
/* c8 ignore next */
|
|
2010
|
-
const rawMessage = typeof error.message === "string" ? (error.message ?? "") : "";
|
|
2011
|
-
const isHelpDisplayCode = code === "commander.helpDisplayed" || code === "commander.help" || code === "commander.helpCommand";
|
|
2012
|
-
if (isHelpDisplayCode || rawMessage.includes("(outputHelp)")) {
|
|
2013
|
-
const helpRequest = parseBootstrapHelpRequest(invocationArgv);
|
|
2014
|
-
if (helpRequest.requested && !isKnownHelpCommandPath(program, helpRequest.commandPathTokens)) {
|
|
2015
|
-
/* c8 ignore next */
|
|
2016
|
-
const unknownToken = helpRequest.commandPathTokens[0] ?? parseBootstrapCommandName(invocationArgv) ?? "<command>";
|
|
2017
|
-
const unknownMessage = `unknown command '${unknownToken}'`;
|
|
2018
|
-
const recoveryCommandDescriptors = await loadRuntimeExtensionCommandDescriptorsForRecovery(resolvePmRoot(process.cwd(), bootstrapGlobal.path));
|
|
2019
|
-
const usageContext = await resolveCommanderUsageContext({ message: unknownMessage }, program, recoveryCommandDescriptors);
|
|
2020
|
-
const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
|
|
2021
|
-
unknownCommandExamples: usageContext.unknownCommandExamples,
|
|
2022
|
-
unknownCommandNextSteps: usageContext.unknownCommandNextSteps,
|
|
2023
|
-
attemptedCommand: usageContext.attemptedCommand,
|
|
2024
|
-
normalizedInvocationArgs: usageContext.normalizedInvocationArgs,
|
|
2025
|
-
providedOptionFlags: usageContext.providedOptionFlags,
|
|
2026
|
-
unknownOptionSuggestions: usageContext.unknownOptionSuggestions,
|
|
2027
|
-
suggestedRetryCommand: usageContext.suggestedRetryCommand,
|
|
2028
|
-
});
|
|
2029
|
-
const { errorCategory, commandResolution } = await emitTelemetryCommandError({
|
|
2030
|
-
command: unknownToken,
|
|
2031
|
-
errorCode: classification.code,
|
|
2032
|
-
errorMessage: classification.detail,
|
|
2033
|
-
exitCode: EXIT_CODE.USAGE,
|
|
2034
|
-
options: {
|
|
2035
|
-
bootstrap_global_options: bootstrapGlobal,
|
|
2036
|
-
commander_code: code ?? "commander.helpDisplayed",
|
|
2037
|
-
},
|
|
2038
|
-
resolutionStage: "parse",
|
|
2039
|
-
});
|
|
2040
|
-
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
2041
|
-
command: unknownToken,
|
|
2042
|
-
error_code: classification.code,
|
|
2043
|
-
error_category: errorCategory,
|
|
2044
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2045
|
-
error_message: classification.detail,
|
|
2046
|
-
command_resolution: commandResolution,
|
|
2047
|
-
resolution_stage: "parse",
|
|
2048
|
-
source_context: activeTelemetryCommandContext?.source_context,
|
|
2049
|
-
});
|
|
2050
|
-
const renderedUsage = jsonErrors
|
|
2051
|
-
? await formatCommanderUsageJson({ message: unknownMessage }, program, recoveryCommandDescriptors)
|
|
2052
|
-
: await formatCommanderUsageMessage({ message: unknownMessage }, program, recoveryCommandDescriptors);
|
|
2053
|
-
sentryFinishCommandSpan(false, unknownMessage, {
|
|
2054
|
-
error_code: classification.code,
|
|
2055
|
-
error_category: errorCategory,
|
|
2056
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2057
|
-
command_resolution: commandResolution,
|
|
2058
|
-
resolution_stage: "parse",
|
|
2059
|
-
});
|
|
2060
|
-
await runAndClearAfterCommandHooks({
|
|
2061
|
-
ok: false,
|
|
2062
|
-
error: unknownMessage,
|
|
2063
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2064
|
-
error_code: classification.code,
|
|
2065
|
-
error_category: errorCategory,
|
|
2066
|
-
command_resolution: commandResolution,
|
|
2067
|
-
resolution_stage: "parse",
|
|
2068
|
-
});
|
|
2069
|
-
if (jsonErrors) {
|
|
2070
|
-
printError(renderedUsage);
|
|
2071
|
-
}
|
|
2072
|
-
else {
|
|
2073
|
-
printError(renderedUsage);
|
|
2074
|
-
}
|
|
2075
|
-
if (loggedHandledErrorToSentry) {
|
|
2076
|
-
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2077
|
-
}
|
|
2078
|
-
process.exitCode = EXIT_CODE.USAGE;
|
|
2079
|
-
return;
|
|
2080
|
-
}
|
|
2081
|
-
sentryFinishCommandSpan(true, undefined, {
|
|
2082
|
-
exit_code: EXIT_CODE.SUCCESS,
|
|
2083
|
-
command_resolution: "success",
|
|
2084
|
-
resolution_stage: "parse",
|
|
2085
|
-
});
|
|
2086
|
-
await runAndClearAfterCommandHooks({
|
|
2087
|
-
ok: true,
|
|
2088
|
-
exit_code: EXIT_CODE.SUCCESS,
|
|
2089
|
-
command_resolution: "success",
|
|
2090
|
-
resolution_stage: "parse",
|
|
2091
|
-
});
|
|
2092
|
-
process.exitCode = EXIT_CODE.SUCCESS;
|
|
2093
|
-
return;
|
|
2094
|
-
}
|
|
2095
|
-
if (code === "commander.version") {
|
|
2096
|
-
sentryFinishCommandSpan(true, undefined, {
|
|
2097
|
-
exit_code: EXIT_CODE.SUCCESS,
|
|
2098
|
-
command_resolution: "success",
|
|
2099
|
-
resolution_stage: "parse",
|
|
2100
|
-
});
|
|
2101
|
-
await runAndClearAfterCommandHooks({
|
|
2102
|
-
ok: true,
|
|
2103
|
-
exit_code: EXIT_CODE.SUCCESS,
|
|
2104
|
-
command_resolution: "success",
|
|
2105
|
-
resolution_stage: "parse",
|
|
2106
|
-
});
|
|
2107
|
-
process.exitCode = EXIT_CODE.SUCCESS;
|
|
2108
|
-
return;
|
|
2109
|
-
}
|
|
2110
|
-
/* c8 ignore next */
|
|
2111
|
-
if (code?.startsWith("commander.")) {
|
|
2112
|
-
const usageContext = await resolveCommanderUsageContext(error, program, activeRuntimeExtensionCommandDescriptors);
|
|
2113
|
-
const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
|
|
2114
|
-
unknownCommandExamples: usageContext.unknownCommandExamples,
|
|
2115
|
-
unknownCommandNextSteps: usageContext.unknownCommandNextSteps,
|
|
2116
|
-
attemptedCommand: usageContext.attemptedCommand,
|
|
2117
|
-
normalizedInvocationArgs: usageContext.normalizedInvocationArgs,
|
|
2118
|
-
providedOptionFlags: usageContext.providedOptionFlags,
|
|
2119
|
-
unknownOptionSuggestions: usageContext.unknownOptionSuggestions,
|
|
2120
|
-
suggestedRetryCommand: usageContext.suggestedRetryCommand,
|
|
2121
|
-
});
|
|
2122
|
-
const { errorCategory, commandResolution } = await emitTelemetryCommandError({
|
|
2123
|
-
command: attemptedCommand,
|
|
2124
|
-
errorCode: classification.code,
|
|
2125
|
-
errorMessage: classification.detail,
|
|
2126
|
-
exitCode: EXIT_CODE.USAGE,
|
|
2127
|
-
options: {
|
|
2128
|
-
bootstrap_global_options: bootstrapGlobal,
|
|
2129
|
-
commander_code: code,
|
|
2130
|
-
},
|
|
2131
|
-
resolutionStage: "parse",
|
|
2132
|
-
});
|
|
2133
|
-
const loggedHandledErrorToSentry = await maybeLogHandledCliErrorToSentry({
|
|
2134
|
-
command: attemptedCommand,
|
|
2135
|
-
error_code: classification.code,
|
|
2136
|
-
error_category: errorCategory,
|
|
2137
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2138
|
-
error_message: classification.detail,
|
|
2139
|
-
command_resolution: commandResolution,
|
|
2140
|
-
resolution_stage: "parse",
|
|
2141
|
-
source_context: activeTelemetryCommandContext?.source_context,
|
|
2142
|
-
});
|
|
2143
|
-
const renderedUsage = jsonErrors
|
|
2144
|
-
? await formatCommanderUsageJson(error, program, activeRuntimeExtensionCommandDescriptors)
|
|
2145
|
-
: await formatCommanderUsageMessage(error, program, activeRuntimeExtensionCommandDescriptors);
|
|
2146
|
-
sentryFinishCommandSpan(false, usageContext.message, {
|
|
2147
|
-
error_code: classification.code,
|
|
2148
|
-
error_category: errorCategory,
|
|
2149
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2150
|
-
command_resolution: commandResolution,
|
|
2151
|
-
resolution_stage: "parse",
|
|
2152
|
-
});
|
|
2153
|
-
await runAndClearAfterCommandHooks({
|
|
2154
|
-
ok: false,
|
|
2155
|
-
error: usageContext.message,
|
|
2156
|
-
exit_code: EXIT_CODE.USAGE,
|
|
2157
|
-
error_code: classification.code,
|
|
2158
|
-
error_category: errorCategory,
|
|
2159
|
-
command_resolution: commandResolution,
|
|
2160
|
-
resolution_stage: "parse",
|
|
2161
|
-
});
|
|
2162
|
-
if (jsonErrors) {
|
|
2163
|
-
printError(renderedUsage);
|
|
2164
|
-
}
|
|
2165
|
-
else {
|
|
2166
|
-
printError(renderedUsage);
|
|
2167
|
-
}
|
|
2168
|
-
if (loggedHandledErrorToSentry) {
|
|
2169
|
-
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2170
|
-
}
|
|
2171
|
-
process.exitCode = EXIT_CODE.USAGE;
|
|
2172
|
-
return;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
/* c8 ignore next */
|
|
2176
|
-
await handleGenericRunPmCliError({
|
|
2177
|
-
error,
|
|
2178
|
-
attemptedCommand,
|
|
2179
|
-
bootstrapGlobal,
|
|
2180
|
-
emitTelemetryCommandError,
|
|
2181
|
-
});
|
|
2182
|
-
/* c8 ignore stop */
|
|
2259
|
+
await handleRunPmCliError({ error, invocationArgv });
|
|
2183
2260
|
}
|
|
2184
2261
|
}
|
|
2185
2262
|
export const _testOnly = {
|
|
@@ -2218,6 +2295,12 @@ export const _testOnly = {
|
|
|
2218
2295
|
extensionProvidesTemplatesRuntime,
|
|
2219
2296
|
hasAnyCapability,
|
|
2220
2297
|
handleGenericRunPmCliError,
|
|
2298
|
+
handleRunPmCliCommanderError,
|
|
2299
|
+
handleRunPmCliError,
|
|
2300
|
+
handleRunPmCliHelpDisplayError,
|
|
2301
|
+
handleRunPmCliKnownError,
|
|
2302
|
+
handleRunPmCliCommanderUsageError,
|
|
2303
|
+
handleUnknownHelpCommandError,
|
|
2221
2304
|
inferMissingFieldsFromErrorMessage,
|
|
2222
2305
|
inferPostActionErrorCode,
|
|
2223
2306
|
inferPostActionFailureMessage,
|
|
@@ -2234,12 +2317,14 @@ export const _testOnly = {
|
|
|
2234
2317
|
normalizeTelemetryResolutionStage,
|
|
2235
2318
|
normalizeThrownExitCode,
|
|
2236
2319
|
probeUsesAnyFlag,
|
|
2320
|
+
prepareExtensionServicesForRunPmCliError,
|
|
2237
2321
|
readRecordBoolean,
|
|
2238
2322
|
readRecordNumber,
|
|
2239
2323
|
readRecordString,
|
|
2240
2324
|
registerDynamicExtensionCommandPaths,
|
|
2241
2325
|
registerRuntimeSchemaFieldFlags,
|
|
2242
2326
|
resolveCoreCommandRegistrationSelection,
|
|
2327
|
+
resolveUnknownHelpToken,
|
|
2243
2328
|
readThrownExitCode,
|
|
2244
2329
|
runAndClearAfterCommandHooks,
|
|
2245
2330
|
runRequiredExtensionCommand,
|
|
@@ -2247,8 +2332,10 @@ export const _testOnly = {
|
|
|
2247
2332
|
shouldLogHandledErrorToSentry,
|
|
2248
2333
|
shouldRegisterDynamicExtensionPaths,
|
|
2249
2334
|
shouldRegisterRuntimeSchemaFlags,
|
|
2335
|
+
shouldHandleRunPmCliCommanderError,
|
|
2250
2336
|
setActiveExtensionHookContextForTest,
|
|
2251
2337
|
setActiveRuntimeExtensionCommandDescriptorsForTest,
|
|
2338
|
+
setRecoveredExtensionServices,
|
|
2252
2339
|
toLooseFieldDefinitionType,
|
|
2253
2340
|
isImporterOrExporterCommandPath,
|
|
2254
2341
|
validateDynamicExtensionCommandInvocation,
|
|
@@ -2256,4 +2343,4 @@ export const _testOnly = {
|
|
|
2256
2343
|
wrapThrownErrorForSentry,
|
|
2257
2344
|
};
|
|
2258
2345
|
//# sourceMappingURL=main.js.map
|
|
2259
|
-
//# debugId=
|
|
2346
|
+
//# debugId=a367900b-1ec4-5110-9997-7f0a02e315c0
|