@unbrained/pm-cli 2026.6.21 → 2026.6.22
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 +22 -0
- package/dist/cli/commands/completion.js +5 -3
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +11 -0
- package/dist/cli/commands/extension/doctor.js +31 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +16 -2
- package/dist/cli/commands/extension/scaffold.js +481 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +1 -0
- package/dist/cli/commands/extension.js +9 -4
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/help-content.js +16 -4
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-setup.js +6 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-KW3IRP44.js → activity-DXS2XMQU.js} +11 -11
- package/dist/cli-bundle/chunks/activity-NEOI45NX.js +18 -0
- package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js → aggregate-IHM4KMQ3.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js → aggregate-NMYDVQF7.js} +10 -10
- package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js → append-3HY5G7ET.js} +8 -8
- package/dist/cli-bundle/chunks/{append-QEOLX3XB.js → append-K54MDQYC.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js → chunk-25XZN3JD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js → chunk-2LEYMXI6.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js +643 -0
- package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js → chunk-3VLPDG3J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js → chunk-44O4JIN6.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js → chunk-47HTJ6BU.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js → chunk-4JXWVHMN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js → chunk-4SDKF5BG.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js +646 -0
- package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js → chunk-5SESR24H.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js → chunk-6FQHNHQQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js → chunk-6UPTNMVW.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js → chunk-75VEYQJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js → chunk-77VKGH4L.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-5PCI3UBT.js → chunk-7GCCDXXN.js} +55 -266
- package/dist/cli-bundle/chunks/chunk-7GCCDXXN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js → chunk-7MALIV5H.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-A4Z7ZOL5.js → chunk-7MPTFYT3.js} +20 -15
- package/dist/cli-bundle/chunks/chunk-7MPTFYT3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js → chunk-7PBGTIN3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js → chunk-A25LOPRG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js → chunk-A7E4ZXG2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js → chunk-AJXYOYJV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js → chunk-B2KR24R4.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js → chunk-C5SWTISA.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js → chunk-CLLVBO3I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js → chunk-CR7KFPAQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js → chunk-CWPBGUC7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-32R4PIC6.js → chunk-D35LTIFR.js} +55 -259
- package/dist/cli-bundle/chunks/chunk-D35LTIFR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js → chunk-DBQUQ3AS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js → chunk-DHBPJ7VG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js → chunk-DMT4ODVN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js → chunk-DU64SZUQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js → chunk-EVPVCE4R.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js → chunk-FK6MV5F5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js → chunk-GGAXE22C.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js → chunk-GNDHOR64.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js → chunk-GU7YHKYP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js → chunk-GXBSFKSX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js → chunk-H6FNDCDI.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js → chunk-HYQV75IB.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js → chunk-I367IDZP.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js → chunk-I6XE47J2.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js → chunk-J2TSPY5L.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js → chunk-JLSC5NPC.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js → chunk-JY25IOEZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js → chunk-K25UDYJ4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js → chunk-KBTREGVO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js → chunk-KK4TQ3ZP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-434HM6Z5.js → chunk-KL5ELX2X.js} +81 -3
- package/dist/cli-bundle/chunks/chunk-KL5ELX2X.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js → chunk-KRJJPDUO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js → chunk-MD7XKVWI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js → chunk-MNGAQB2E.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js → chunk-NIWY4V4Z.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js → chunk-NKZOJPXK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js → chunk-NVUATMTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js → chunk-P7ZU73BO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js → chunk-PCH2JTEO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-B473GZWW.js → chunk-PJS2J7Z4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js → chunk-QQWEROGS.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js → chunk-RPRFBXND.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HMOADQVT.js → chunk-RZZMSY4P.js} +88 -3
- package/dist/cli-bundle/chunks/chunk-RZZMSY4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js → chunk-SFKQAVZA.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js → chunk-THKDPOS5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js → chunk-TIKJAXQW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js → chunk-TJABI6PR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HC4AWIKT.js → chunk-TRUFOER3.js} +19 -14
- package/dist/cli-bundle/chunks/{chunk-HC4AWIKT.js.map → chunk-TRUFOER3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js → chunk-TZQKEBKF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js → chunk-UKK2VTTH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js → chunk-V4SM4UAL.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js → chunk-VB54F347.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js → chunk-WBSYW3NT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js → chunk-WQDX7DVG.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js → chunk-XKNF3VRJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js → chunk-Y335KFHD.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js → chunk-Y4BZEND6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js → chunk-YATDFWYK.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js → chunk-YJICYNAV.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js → chunk-YQSWTVZF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js → chunk-YRLLL5TY.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-RC56YUWG.js → claim-MPXNVBZQ.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js → claim-SKHJDLW6.js} +10 -10
- package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js → close-4RKSL5L6.js} +8 -8
- package/dist/cli-bundle/chunks/close-Z6AI736U.js +15 -0
- package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js → close-many-AWTPXLHJ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js → close-many-SXODYBDP.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js → comments-OOH64LWW.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js → comments-YYW5P7AG.js} +10 -10
- package/dist/cli-bundle/chunks/{config-OZCUABPB.js → config-3445MCQQ.js} +8 -8
- package/dist/cli-bundle/chunks/{config-7CK62S7T.js → config-LCDMKRB2.js} +8 -8
- package/dist/cli-bundle/chunks/{context-PUG2A7RC.js → context-DZMIBIVP.js} +13 -13
- package/dist/cli-bundle/chunks/{context-OEC366TO.js → context-PJCURODY.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-3THOLA7L.js → contracts-7YDFEJB3.js} +4 -4
- package/dist/cli-bundle/chunks/{contracts-N65FXEOL.js → contracts-MP2P3HL5.js} +4 -4
- package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js → copy-63IQQRRS.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-6QLHILAC.js → copy-TASIH2AZ.js} +7 -7
- package/dist/cli-bundle/chunks/create-3BV2VA3Q.js +30 -0
- package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js → create-TGSB5GV4.js} +14 -14
- package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js → delete-ARILQQLB.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js → delete-ZQKBZYNK.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js → deps-MSHQR2GY.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js → deps-NJFJIMQ5.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-C75YIXHC.js → docs-SS4UKYYA.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js → docs-XK2UVUXX.js} +9 -9
- package/dist/cli-bundle/chunks/{eval-GTENKE24.js → eval-FVZGX5IZ.js} +12 -12
- package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js → eval-JOTG2YHU.js} +12 -12
- package/dist/cli-bundle/chunks/{extension-46NWACO3.js → extension-NLMS47I4.js} +6 -5
- package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js → extension-OQPS27B4.js} +6 -5
- package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js → files-3EVJQZ2N.js} +9 -9
- package/dist/cli-bundle/chunks/{files-DSZBOSSN.js → files-Y2P6LN5A.js} +9 -9
- package/dist/cli-bundle/chunks/{focus-5STQXDPU.js → focus-D5ZUPTII.js} +8 -8
- package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js → focus-ZPIFTY4R.js} +8 -8
- package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js → gc-LXXDY456.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js → gc-RNOEQHSX.js} +3 -3
- package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js → get-Q3SZGQHD.js} +11 -11
- package/dist/cli-bundle/chunks/{get-J2IPJRZW.js → get-W23G7MJX.js} +11 -11
- package/dist/cli-bundle/chunks/{health-WOYBR3KU.js → health-5LHSX365.js} +14 -13
- package/dist/cli-bundle/chunks/{health-WOYBR3KU.js.map → health-5LHSX365.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-IVMA3XQC.js → health-UDDGJLPP.js} +16 -15
- package/dist/cli-bundle/chunks/{health-IVMA3XQC.js.map → health-UDDGJLPP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-RLH2QCRO.js → history-6CZVFIUJ.js} +10 -10
- package/dist/cli-bundle/chunks/history-YRQUD4YM.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js → history-compact-M35PDQ4G.js} +12 -12
- package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js → history-compact-VWUSQH6Z.js} +12 -12
- package/dist/cli-bundle/chunks/history-redact-27OEOZRZ.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js → history-redact-AJGARHT3.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js → history-repair-5RDMF7K4.js} +12 -12
- package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js → history-repair-YUAHIPIN.js} +12 -12
- package/dist/cli-bundle/chunks/init-DWAKYRXI.js +21 -0
- package/dist/cli-bundle/chunks/{init-2BNZOO6F.js → init-HASX3YNJ.js} +11 -10
- package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js → learnings-JNGUIJDK.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js → learnings-M4KA6MQE.js} +10 -10
- package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js → list-5UU2W24O.js} +10 -10
- package/dist/cli-bundle/chunks/{list-K6FPV4J4.js → list-6FMKTIH3.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js → notes-MODH5CBT.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-PU74EPKV.js → notes-PYCPLA5Y.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js → plan-DXRIRYRU.js} +14 -14
- package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js → plan-EHQALWSC.js} +14 -14
- package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js → register-list-query-QAASVP2J.js} +19 -19
- package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js → register-list-query-WE54YJMH.js} +19 -19
- package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js → register-mutation-B6DZJTY2.js} +33 -33
- package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js → register-mutation-CPV4C2KR.js} +33 -33
- package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js → register-operations-AT3BVVX2.js} +32 -32
- package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js → register-operations-RC4C3423.js} +32 -32
- package/dist/cli-bundle/chunks/{register-setup-EG2U6CEU.js → register-setup-HXEHMDHE.js} +23 -18
- package/dist/cli-bundle/chunks/register-setup-HXEHMDHE.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-DYBFLEZX.js → register-setup-JSMJEFCJ.js} +24 -19
- package/dist/cli-bundle/chunks/register-setup-JSMJEFCJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js → restore-FNBV4GWE.js} +11 -11
- package/dist/cli-bundle/chunks/restore-XY4YE2OV.js +19 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js → scheduling-shortcuts-ECL6GBMZ.js} +14 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js → scheduling-shortcuts-JRIUREEU.js} +14 -14
- package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js → schema-74YENAJL.js} +9 -9
- package/dist/cli-bundle/chunks/{schema-263RI4WW.js → schema-TCW3I7QR.js} +9 -9
- package/dist/cli-bundle/chunks/{search-SFRJOVDG.js → search-7USZ6XZA.js} +12 -12
- package/dist/cli-bundle/chunks/{search-LECJYSXE.js → search-GNAUE65M.js} +12 -12
- package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js → stats-CVHASAEU.js} +8 -8
- package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js → stats-DQMKJMFT.js} +8 -8
- package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js → telemetry-7P5EUWCS.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js → telemetry-PQTL5YS2.js} +4 -4
- package/dist/cli-bundle/chunks/test-COWPCGBE.js +36 -0
- package/dist/cli-bundle/chunks/{test-3EGNS3T5.js → test-FDQZQNZ4.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js → test-all-PIPPS4S5.js} +18 -17
- package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js.map → test-all-PIPPS4S5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js → test-all-WQIAZVA6.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js.map → test-all-WQIAZVA6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js → test-runs-JS6DNCCI.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js → test-runs-NZD2QGL5.js} +5 -5
- package/dist/cli-bundle/chunks/update-7IYQHX4Q.js +24 -0
- package/dist/cli-bundle/chunks/update-IJKDRBIX.js +28 -0
- package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js → update-many-6NTZ5J5D.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js → update-many-B3TH5TDS.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js → upgrade-4C7VE7MS.js} +8 -7
- package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js.map → upgrade-4C7VE7MS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js → upgrade-76IKZ6EZ.js} +6 -5
- package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js.map → upgrade-76IKZ6EZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js → validate-AQU7OCL3.js} +21 -20
- package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js.map → validate-AQU7OCL3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js → validate-BPM6Z3OT.js} +23 -22
- package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js.map → validate-BPM6Z3OT.js.map} +1 -1
- package/dist/cli-bundle/main.js +34 -22
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +82 -0
- package/dist/core/extensions/capability-usage.js +133 -0
- package/dist/core/extensions/capability-usage.js.map +1 -0
- package/dist/core/extensions/extension-capability-aliases.d.ts +7 -0
- package/dist/core/extensions/extension-capability-aliases.js +12 -2
- package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -0
- package/dist/core/extensions/index.js +3 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +18 -13
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +7 -2
- package/dist/sdk/index.js +8 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +520 -1
- package/dist/sdk/testing.js +477 -18
- package/dist/sdk/testing.js.map +1 -1
- package/docs/EXTENSIONS.md +4 -8
- package/docs/SDK.md +257 -0
- package/package.json +2 -2
- package/dist/cli-bundle/chunks/activity-CIHV64UC.js +0 -18
- package/dist/cli-bundle/chunks/chunk-32R4PIC6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-434HM6Z5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5PCI3UBT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A4Z7ZOL5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HMOADQVT.js.map +0 -7
- package/dist/cli-bundle/chunks/close-DNMHGOCX.js +0 -15
- package/dist/cli-bundle/chunks/create-NNP6TSFO.js +0 -30
- package/dist/cli-bundle/chunks/history-WX3MGFS2.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-YQGU3XRA.js +0 -21
- package/dist/cli-bundle/chunks/init-SC2P6CHP.js +0 -20
- package/dist/cli-bundle/chunks/register-setup-DYBFLEZX.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-EG2U6CEU.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-5KHR2YYQ.js +0 -19
- package/dist/cli-bundle/chunks/test-RQCTSWUK.js +0 -35
- package/dist/cli-bundle/chunks/update-6YXOGHRT.js +0 -24
- package/dist/cli-bundle/chunks/update-V33YUBRP.js +0 -28
- /package/dist/cli-bundle/chunks/{activity-KW3IRP44.js.map → activity-DXS2XMQU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-CIHV64UC.js.map → activity-NEOI45NX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js.map → aggregate-IHM4KMQ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js.map → aggregate-NMYDVQF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js.map → append-3HY5G7ET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QEOLX3XB.js.map → append-K54MDQYC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js.map → chunk-25XZN3JD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js.map → chunk-2LEYMXI6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js.map → chunk-3VLPDG3J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js.map → chunk-44O4JIN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js.map → chunk-47HTJ6BU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js.map → chunk-4JXWVHMN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js.map → chunk-4SDKF5BG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js.map → chunk-5SESR24H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js.map → chunk-6FQHNHQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js.map → chunk-6UPTNMVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js.map → chunk-75VEYQJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js.map → chunk-77VKGH4L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js.map → chunk-7MALIV5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js.map → chunk-7PBGTIN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js.map → chunk-A25LOPRG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js.map → chunk-A7E4ZXG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js.map → chunk-AJXYOYJV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js.map → chunk-B2KR24R4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js.map → chunk-C5SWTISA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js.map → chunk-CLLVBO3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js.map → chunk-CR7KFPAQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js.map → chunk-CWPBGUC7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js.map → chunk-DBQUQ3AS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js.map → chunk-DHBPJ7VG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js.map → chunk-DMT4ODVN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js.map → chunk-DU64SZUQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js.map → chunk-EVPVCE4R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js.map → chunk-FK6MV5F5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js.map → chunk-GGAXE22C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js.map → chunk-GNDHOR64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js.map → chunk-GU7YHKYP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js.map → chunk-GXBSFKSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js.map → chunk-H6FNDCDI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js.map → chunk-HYQV75IB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js.map → chunk-I367IDZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js.map → chunk-I6XE47J2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js.map → chunk-J2TSPY5L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js.map → chunk-JLSC5NPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js.map → chunk-JY25IOEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js.map → chunk-K25UDYJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js.map → chunk-KBTREGVO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js.map → chunk-KK4TQ3ZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js.map → chunk-KRJJPDUO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js.map → chunk-MD7XKVWI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js.map → chunk-MNGAQB2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js.map → chunk-NIWY4V4Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js.map → chunk-NKZOJPXK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js.map → chunk-NVUATMTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js.map → chunk-P7ZU73BO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js.map → chunk-PCH2JTEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B473GZWW.js.map → chunk-PJS2J7Z4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js.map → chunk-QQWEROGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js.map → chunk-RPRFBXND.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js.map → chunk-SFKQAVZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js.map → chunk-THKDPOS5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js.map → chunk-TIKJAXQW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js.map → chunk-TJABI6PR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js.map → chunk-TZQKEBKF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js.map → chunk-UKK2VTTH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js.map → chunk-V4SM4UAL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js.map → chunk-VB54F347.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js.map → chunk-WBSYW3NT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js.map → chunk-WQDX7DVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js.map → chunk-XKNF3VRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js.map → chunk-Y335KFHD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js.map → chunk-Y4BZEND6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js.map → chunk-YATDFWYK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js.map → chunk-YJICYNAV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js.map → chunk-YQSWTVZF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js.map → chunk-YRLLL5TY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RC56YUWG.js.map → claim-MPXNVBZQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js.map → claim-SKHJDLW6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js.map → close-4RKSL5L6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-DNMHGOCX.js.map → close-Z6AI736U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js.map → close-many-AWTPXLHJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js.map → close-many-SXODYBDP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js.map → comments-OOH64LWW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js.map → comments-YYW5P7AG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-OZCUABPB.js.map → config-3445MCQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-7CK62S7T.js.map → config-LCDMKRB2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PUG2A7RC.js.map → context-DZMIBIVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OEC366TO.js.map → context-PJCURODY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-3THOLA7L.js.map → contracts-7YDFEJB3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-N65FXEOL.js.map → contracts-MP2P3HL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js.map → copy-63IQQRRS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-6QLHILAC.js.map → copy-TASIH2AZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-NNP6TSFO.js.map → create-3BV2VA3Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js.map → create-TGSB5GV4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js.map → delete-ARILQQLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js.map → delete-ZQKBZYNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js.map → deps-MSHQR2GY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js.map → deps-NJFJIMQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-C75YIXHC.js.map → docs-SS4UKYYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js.map → docs-XK2UVUXX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-GTENKE24.js.map → eval-FVZGX5IZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js.map → eval-JOTG2YHU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-46NWACO3.js.map → extension-NLMS47I4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js.map → extension-OQPS27B4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js.map → files-3EVJQZ2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-DSZBOSSN.js.map → files-Y2P6LN5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-5STQXDPU.js.map → focus-D5ZUPTII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js.map → focus-ZPIFTY4R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js.map → gc-LXXDY456.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js.map → gc-RNOEQHSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js.map → get-Q3SZGQHD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-J2IPJRZW.js.map → get-W23G7MJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RLH2QCRO.js.map → history-6CZVFIUJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WX3MGFS2.js.map → history-YRQUD4YM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js.map → history-compact-M35PDQ4G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js.map → history-compact-VWUSQH6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-YQGU3XRA.js.map → history-redact-27OEOZRZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js.map → history-redact-AJGARHT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js.map → history-repair-5RDMF7K4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js.map → history-repair-YUAHIPIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-SC2P6CHP.js.map → init-DWAKYRXI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-2BNZOO6F.js.map → init-HASX3YNJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js.map → learnings-JNGUIJDK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js.map → learnings-M4KA6MQE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js.map → list-5UU2W24O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-K6FPV4J4.js.map → list-6FMKTIH3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js.map → notes-MODH5CBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-PU74EPKV.js.map → notes-PYCPLA5Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js.map → plan-DXRIRYRU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js.map → plan-EHQALWSC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js.map → register-list-query-QAASVP2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js.map → register-list-query-WE54YJMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js.map → register-mutation-B6DZJTY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js.map → register-mutation-CPV4C2KR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js.map → register-operations-AT3BVVX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js.map → register-operations-RC4C3423.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js.map → restore-FNBV4GWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-5KHR2YYQ.js.map → restore-XY4YE2OV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js.map → scheduling-shortcuts-ECL6GBMZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js.map → scheduling-shortcuts-JRIUREEU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js.map → schema-74YENAJL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-263RI4WW.js.map → schema-TCW3I7QR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-SFRJOVDG.js.map → search-7USZ6XZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-LECJYSXE.js.map → search-GNAUE65M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js.map → stats-CVHASAEU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js.map → stats-DQMKJMFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js.map → telemetry-7P5EUWCS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js.map → telemetry-PQTL5YS2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-RQCTSWUK.js.map → test-COWPCGBE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-3EGNS3T5.js.map → test-FDQZQNZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js.map → test-runs-JS6DNCCI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js.map → test-runs-NZD2QGL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-6YXOGHRT.js.map → update-7IYQHX4Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-V33YUBRP.js.map → update-IJKDRBIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js.map → update-many-6NTZ5J5D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js.map → update-many-B3TH5TDS.js.map} +0 -0
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runUpdate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FK6MV5F5.js";
|
|
4
4
|
import {
|
|
5
5
|
createCheckpointId,
|
|
6
6
|
loadMutationCheckpoint,
|
|
7
7
|
restoreCheckpointItems,
|
|
8
8
|
writeMutationCheckpoint
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-RPRFBXND.js";
|
|
10
|
+
import "./chunk-H6FNDCDI.js";
|
|
11
11
|
import {
|
|
12
12
|
runRestore
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7MALIV5H.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveAuthor
|
|
16
16
|
} from "./chunk-WW4E2DC3.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-YRLLL5TY.js";
|
|
18
|
+
import "./chunk-J2TSPY5L.js";
|
|
19
19
|
import {
|
|
20
20
|
resolvePriority
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-V4SM4UAL.js";
|
|
22
|
+
import "./chunk-NVUATMTC.js";
|
|
23
23
|
import {
|
|
24
24
|
applyTagRemovals,
|
|
25
25
|
mergeAdditiveTags,
|
|
26
26
|
parseTags
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-CWPBGUC7.js";
|
|
28
|
+
import "./chunk-GU7YHKYP.js";
|
|
29
|
+
import "./chunk-TZQKEBKF.js";
|
|
30
30
|
import {
|
|
31
31
|
buildInvalidTypeError
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-75VEYQJS.js";
|
|
33
|
+
import "./chunk-A25LOPRG.js";
|
|
34
34
|
import {
|
|
35
35
|
hasListFilters
|
|
36
36
|
} from "./chunk-ISEKN64V.js";
|
|
37
37
|
import "./chunk-5HIZDR5A.js";
|
|
38
38
|
import {
|
|
39
39
|
runList
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-MNGAQB2E.js";
|
|
41
41
|
import "./chunk-R23CSHGI.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-KRJJPDUO.js";
|
|
43
|
+
import "./chunk-PJS2J7Z4.js";
|
|
44
44
|
import {
|
|
45
45
|
toItemRecord
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-GNDHOR64.js";
|
|
47
|
+
import "./chunk-AJXYOYJV.js";
|
|
48
48
|
import {
|
|
49
49
|
collectRuntimeUpdateFieldValues,
|
|
50
50
|
normalizeStatusInput
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-CR7KFPAQ.js";
|
|
52
52
|
import {
|
|
53
53
|
resolveItemTypeRegistry,
|
|
54
54
|
resolveTypeName
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-3VLPDG3J.js";
|
|
56
56
|
import {
|
|
57
57
|
nowIso,
|
|
58
58
|
resolveIsoOrRelative
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-4JXWVHMN.js";
|
|
60
60
|
import {
|
|
61
61
|
EXIT_CODE,
|
|
62
62
|
PmCliError,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolveRuntimeStatusRegistry,
|
|
71
71
|
stableValueEquals,
|
|
72
72
|
toErrorMessage
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-RZZMSY4P.js";
|
|
74
74
|
|
|
75
75
|
// dist/cli/commands/update-many.js
|
|
76
76
|
!(function() {
|
|
@@ -651,4 +651,4 @@ export {
|
|
|
651
651
|
_testOnlyUpdateManyCommand,
|
|
652
652
|
runUpdateMany
|
|
653
653
|
};
|
|
654
|
-
//# sourceMappingURL=update-many-
|
|
654
|
+
//# sourceMappingURL=update-many-B3TH5TDS.js.map
|
|
@@ -1,12 +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]="e29e4c63-bf56-5d14-b8f1-25beaf2d15da")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
readManagedExtensionState,
|
|
5
5
|
runExtension
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-D35LTIFR.js";
|
|
7
|
+
import "./chunk-3GL6LTUL.js";
|
|
8
|
+
import "./chunk-DMT4ODVN.js";
|
|
8
9
|
import "./chunk-P4SESZGT.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-PCH2JTEO.js";
|
|
10
11
|
import {
|
|
11
12
|
EXIT_CODE,
|
|
12
13
|
PmCliError,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
resolveExtensionRoots,
|
|
15
16
|
resolvePmCliVersion,
|
|
16
17
|
resolvePmRoot
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KL5ELX2X.js";
|
|
18
19
|
|
|
19
20
|
// dist/cli/commands/upgrade.js
|
|
20
21
|
import { execFile } from "node:child_process";
|
|
@@ -269,6 +270,6 @@ export {
|
|
|
269
270
|
_testOnly,
|
|
270
271
|
runUpgrade
|
|
271
272
|
};
|
|
272
|
-
//# sourceMappingURL=upgrade-
|
|
273
|
+
//# sourceMappingURL=upgrade-4C7VE7MS.js.map
|
|
273
274
|
|
|
274
|
-
//# debugId=
|
|
275
|
+
//# debugId=e29e4c63-bf56-5d14-b8f1-25beaf2d15da
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/upgrade.ts"],"sourcesContent":["/**\n * @module cli/commands/upgrade\n *\n * Implements the pm upgrade command surface and its agent-facing runtime behavior.\n */\nimport { execFile } from \"node:child_process\";\nimport path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport {\n readManagedExtensionState,\n runExtension,\n type ExtensionScope,\n type ManagedExtensionRecord,\n type ManagedExtensionSource,\n} from \"./extension.js\";\nimport { resolveExtensionRoots } from \"../../core/extensions/loader.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { resolvePmCliVersion } from \"../../core/packages/root.js\";\n\nconst execFileAsync = promisify(execFile);\nconst DEFAULT_CLI_PACKAGE = \"@unbrained/pm-cli\";\nconst DEFAULT_TAG = \"latest\";\n\n/**\n * Documents the upgrade command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandOptions {\n dryRun?: boolean;\n cliOnly?: boolean;\n packagesOnly?: boolean;\n project?: boolean;\n local?: boolean;\n global?: boolean;\n repair?: boolean;\n tag?: string;\n packageName?: string;\n commandRunner?: UpgradeCommandRunner;\n}\n\nexport const _testOnly = {\n defaultCommandRunner,\n isLocalNpmSpec,\n normalizeTarget,\n packageRecordMatchesTarget,\n resolveCliPackage,\n resolvePackageInstallSource,\n resolveRunnablePackageSource,\n resolveScope,\n resolveTag,\n packageCommandFor,\n summarize,\n};\n\n/**\n * Documents the upgrade command runner result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandRunnerResult {\n stdout: string;\n stderr: string;\n}\n\n/**\n * Restricts upgrade command runner values accepted by command, SDK, and storage contracts.\n */\nexport type UpgradeCommandRunner = (\n command: string,\n args: string[],\n options?: { cwd?: string },\n) => Promise<UpgradeCommandRunnerResult>;\n\n/**\n * Documents the upgrade cli result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCliResult {\n requested: boolean;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n package: string;\n target: string;\n command: string[];\n before_version?: string;\n after_version?: string;\n repair: boolean;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade package result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradePackageResult {\n name: string;\n directory: string;\n scope: ExtensionScope;\n source: ManagedExtensionSource;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n command: string[];\n previous_version: string;\n installed_version?: string;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeResult {\n ok: boolean;\n action: \"upgrade\";\n dry_run: boolean;\n scope: ExtensionScope;\n target?: string;\n cli: UpgradeCliResult;\n packages: UpgradePackageResult[];\n summary: {\n requested_cli: boolean;\n requested_packages: boolean;\n planned: number;\n updated: number;\n skipped: number;\n failed: number;\n };\n}\n\nfunction resolveScope(options: UpgradeCommandOptions): ExtensionScope {\n const projectLike = options.project === true || options.local === true;\n const global = options.global === true;\n if (projectLike && global) {\n throw new PmCliError('Options \"--project/--local\" and \"--global\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n return global ? \"global\" : \"project\";\n}\n\nfunction normalizeTarget(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction packageRecordMatchesTarget(record: ManagedExtensionRecord, target: string): boolean {\n const normalizedTarget = normalizeTarget(target);\n const values = [\n record.name,\n record.directory,\n record.source.input,\n record.source.location,\n record.source.package,\n record.source.repository,\n record.source.owner && record.source.repo ? `${record.source.owner}/${record.source.repo}` : undefined,\n ];\n return values.some((value) => typeof value === \"string\" && normalizeTarget(value) === normalizedTarget);\n}\n\nfunction resolveRoots(scope: ExtensionScope, global: GlobalOptions): {\n selected_root: string;\n} {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const roots = resolveExtensionRoots(pmRoot, process.cwd());\n return {\n selected_root: scope === \"global\" ? roots.global : roots.project,\n };\n}\n\nasync function defaultCommandRunner(\n command: string,\n args: string[],\n options?: { cwd?: string },\n): Promise<UpgradeCommandRunnerResult> {\n try {\n const result = await execFileAsync(command, args, {\n cwd: options?.cwd,\n encoding: \"utf8\",\n });\n return {\n stdout: result.stdout,\n stderr: result.stderr,\n };\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error\n ? String((error as { stderr?: unknown }).stderr ?? \"\")\n : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Command failed: ${command} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nasync function readCurrentVersion(): Promise<string | undefined> {\n return resolvePmCliVersion(import.meta.url, [\"../../..\"]);\n}\n\nfunction resolveTag(options: UpgradeCommandOptions): string {\n return typeof options.tag === \"string\" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;\n}\n\nfunction resolveCliPackage(options: UpgradeCommandOptions): string {\n return typeof options.packageName === \"string\" && options.packageName.trim().length > 0\n ? options.packageName.trim()\n : DEFAULT_CLI_PACKAGE;\n}\n\nasync function upgradeCli(options: UpgradeCommandOptions, dryRun: boolean): Promise<UpgradeCliResult> {\n const runner = options.commandRunner ?? defaultCommandRunner;\n const packageName = resolveCliPackage(options);\n const tag = resolveTag(options);\n const target = `${packageName}@${tag}`;\n const command = [\"npm\", \"install\", \"-g\", target];\n if (options.repair === true) {\n command.push(\"--force\");\n }\n const beforeVersion = await readCurrentVersion();\n const planned: UpgradeCliResult = {\n requested: true,\n status: \"planned\",\n package: packageName,\n target,\n command,\n before_version: beforeVersion,\n repair: options.repair === true,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runner(command[0]!, command.slice(1));\n const verified = await runner(\"pm\", [\"--version\"]);\n return {\n ...planned,\n status: \"updated\",\n after_version: verified.stdout.trim() || undefined,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction isLocalNpmSpec(spec: string): boolean {\n return path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\") || spec.startsWith(\"file:\");\n}\n\nfunction resolvePackageInstallSource(source: ManagedExtensionSource, tag: string): string {\n if (source.kind === \"npm\") {\n const rawSpec = source.input.startsWith(\"npm:\") ? source.input.slice(\"npm:\".length).trim() : source.input.trim();\n if (!isLocalNpmSpec(rawSpec) && source.package && source.package.trim().length > 0) {\n return `npm:${source.package.trim()}@${tag}`;\n }\n return source.input.startsWith(\"npm:\") ? source.input : `npm:${source.input}`;\n }\n return source.input;\n}\n\nasync function resolveRunnablePackageSource(source: ManagedExtensionSource, tag: string): Promise<string> {\n const installSource = resolvePackageInstallSource(source, tag);\n if (source.kind !== \"local\") {\n return installSource;\n }\n if (await pathExists(installSource)) {\n return installSource;\n }\n if (await pathExists(source.location)) {\n return source.location;\n }\n return installSource;\n}\n\nfunction packageCommandFor(source: ManagedExtensionSource, installSource: string, scope: ExtensionScope, ref?: string): string[] {\n const command = [\"pm\", \"install\", installSource, scope === \"global\" ? \"--global\" : \"--project\"];\n if (source.kind === \"github\" && ref && ref.trim().length > 0) {\n command.push(\"--ref\", ref.trim());\n }\n return command;\n}\n\nasync function readManagedRecords(scope: ExtensionScope, global: GlobalOptions): Promise<ManagedExtensionRecord[]> {\n const roots = resolveRoots(scope, global);\n const managedState = await readManagedExtensionState(roots.selected_root);\n return managedState.state.entries.filter((entry) => entry.scope === scope);\n}\n\nasync function refreshManagedRecord(\n scope: ExtensionScope,\n global: GlobalOptions,\n record: ManagedExtensionRecord,\n): Promise<ManagedExtensionRecord | undefined> {\n const records = await readManagedRecords(scope, global);\n return records.find((candidate) => packageRecordMatchesTarget(candidate, record.name)) ??\n records.find((candidate) => normalizeTarget(candidate.directory) === normalizeTarget(record.directory));\n}\n\nasync function upgradePackageRecord(\n record: ManagedExtensionRecord,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n scope: ExtensionScope,\n dryRun: boolean,\n): Promise<UpgradePackageResult> {\n const tag = resolveTag(options);\n const installSource = await resolveRunnablePackageSource(record.source, tag);\n const command = packageCommandFor(record.source, installSource, scope, record.source.ref);\n const planned: UpgradePackageResult = {\n name: record.name,\n directory: record.directory,\n scope,\n source: record.source,\n status: \"planned\",\n command,\n previous_version: record.manifest_version,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runExtension(\n installSource,\n {\n install: true,\n project: scope === \"project\",\n global: scope === \"global\",\n ref: record.source.kind === \"github\" ? record.source.ref : undefined,\n },\n global,\n );\n const refreshed = await refreshManagedRecord(scope, global, record);\n return {\n ...planned,\n status: \"updated\",\n installed_version: refreshed?.manifest_version,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction summarize(\n cli: UpgradeCliResult,\n packages: UpgradePackageResult[],\n includeCli: boolean,\n includePackages: boolean,\n): UpgradeResult[\"summary\"] {\n const statuses = [includeCli ? cli.status : undefined, ...packages.map((entry) => entry.status)].filter(\n (value): value is UpgradeCliResult[\"status\"] => typeof value === \"string\",\n );\n return {\n requested_cli: includeCli,\n requested_packages: includePackages,\n planned: statuses.filter((status) => status === \"planned\").length,\n updated: statuses.filter((status) => status === \"updated\").length,\n skipped: statuses.filter((status) => status === \"skipped\").length,\n failed: statuses.filter((status) => status === \"failed\").length,\n };\n}\n\n/**\n * Implements run upgrade for the public runtime surface of this module.\n */\nexport async function runUpgrade(\n target: string | undefined,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n): Promise<UpgradeResult> {\n if (options.cliOnly === true && options.packagesOnly === true) {\n throw new PmCliError('Options \"--cli-only\" and \"--packages-only\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n\n const scope = resolveScope(options);\n const dryRun = options.dryRun === true;\n const normalizedTarget = typeof target === \"string\" && target.trim().length > 0 ? target.trim() : undefined;\n if (options.cliOnly === true && normalizedTarget) {\n throw new PmCliError('A package target cannot be used with \"--cli-only\".', EXIT_CODE.USAGE);\n }\n const includeCli = options.packagesOnly === true || normalizedTarget ? false : true;\n const includePackages = options.cliOnly === true ? false : true;\n const cli = includeCli\n ? await upgradeCli(options, dryRun)\n : {\n requested: false,\n status: \"skipped\",\n package: resolveCliPackage(options),\n target: `${resolveCliPackage(options)}@${resolveTag(options)}`,\n command: [\"npm\", \"install\", \"-g\", `${resolveCliPackage(options)}@${resolveTag(options)}`],\n repair: options.repair === true,\n reason: \"not_requested\",\n } as UpgradeCliResult;\n\n let packageRecords = includePackages ? await readManagedRecords(scope, global) : [];\n if (normalizedTarget) {\n packageRecords = packageRecords.filter((entry) => packageRecordMatchesTarget(entry, normalizedTarget));\n if (packageRecords.length === 0) {\n throw new PmCliError(`Managed package \"${normalizedTarget}\" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);\n }\n }\n\n const packages: UpgradePackageResult[] = [];\n for (const record of packageRecords) {\n packages.push(await upgradePackageRecord(record, options, global, scope, dryRun));\n }\n\n const summary = summarize(cli, packages, includeCli, includePackages);\n return {\n ok: summary.failed === 0,\n action: \"upgrade\",\n dry_run: dryRun,\n scope,\n target: normalizedTarget,\n cli,\n packages,\n summary,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA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MAAI,iBAAiB,kBAAkB,MAAM,mBAAmB,OAAO,MAAM,IAAI,CAAA;AACjF,MAAI,kBAAkB;AACpB,qBAAiB,eAAe,OAAO,CAAC,UAAU,2BAA2B,OAAO,gBAAgB,CAAC;AACrG,QAAI,eAAe,WAAW,GAAG;AAC/B,YAAM,IAAI,WAAW,oBAAoB,gBAAgB,sBAAsB,KAAK,WAAW,UAAU,SAAS;IACpH;EACF;AAEA,QAAM,WAAmC,CAAA;AACzC,aAAW,UAAU,gBAAgB;AACnC,aAAS,KAAK,MAAM,qBAAqB,QAAQ,SAAS,QAAQ,OAAO,MAAM,CAAC;EAClF;AAEA,QAAM,UAAU,UAAU,KAAK,UAAU,YAAY,eAAe;AACpE,SAAO;IACL,IAAI,QAAQ,WAAW;IACvB,QAAQ;IACR,SAAS;IACT;IACA,QAAQ;IACR;IACA;IACA;;AAEJ","debugId":"d72070bc-aca8-5845-a0a0-c668253c0673"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/upgrade.ts"],"sourcesContent":["/**\n * @module cli/commands/upgrade\n *\n * Implements the pm upgrade command surface and its agent-facing runtime behavior.\n */\nimport { execFile } from \"node:child_process\";\nimport path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport {\n readManagedExtensionState,\n runExtension,\n type ExtensionScope,\n type ManagedExtensionRecord,\n type ManagedExtensionSource,\n} from \"./extension.js\";\nimport { resolveExtensionRoots } from \"../../core/extensions/loader.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { resolvePmCliVersion } from \"../../core/packages/root.js\";\n\nconst execFileAsync = promisify(execFile);\nconst DEFAULT_CLI_PACKAGE = \"@unbrained/pm-cli\";\nconst DEFAULT_TAG = \"latest\";\n\n/**\n * Documents the upgrade command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandOptions {\n dryRun?: boolean;\n cliOnly?: boolean;\n packagesOnly?: boolean;\n project?: boolean;\n local?: boolean;\n global?: boolean;\n repair?: boolean;\n tag?: string;\n packageName?: string;\n commandRunner?: UpgradeCommandRunner;\n}\n\nexport const _testOnly = {\n defaultCommandRunner,\n isLocalNpmSpec,\n normalizeTarget,\n packageRecordMatchesTarget,\n resolveCliPackage,\n resolvePackageInstallSource,\n resolveRunnablePackageSource,\n resolveScope,\n resolveTag,\n packageCommandFor,\n summarize,\n};\n\n/**\n * Documents the upgrade command runner result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandRunnerResult {\n stdout: string;\n stderr: string;\n}\n\n/**\n * Restricts upgrade command runner values accepted by command, SDK, and storage contracts.\n */\nexport type UpgradeCommandRunner = (\n command: string,\n args: string[],\n options?: { cwd?: string },\n) => Promise<UpgradeCommandRunnerResult>;\n\n/**\n * Documents the upgrade cli result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCliResult {\n requested: boolean;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n package: string;\n target: string;\n command: string[];\n before_version?: string;\n after_version?: string;\n repair: boolean;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade package result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradePackageResult {\n name: string;\n directory: string;\n scope: ExtensionScope;\n source: ManagedExtensionSource;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n command: string[];\n previous_version: string;\n installed_version?: string;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeResult {\n ok: boolean;\n action: \"upgrade\";\n dry_run: boolean;\n scope: ExtensionScope;\n target?: string;\n cli: UpgradeCliResult;\n packages: UpgradePackageResult[];\n summary: {\n requested_cli: boolean;\n requested_packages: boolean;\n planned: number;\n updated: number;\n skipped: number;\n failed: number;\n };\n}\n\nfunction resolveScope(options: UpgradeCommandOptions): ExtensionScope {\n const projectLike = options.project === true || options.local === true;\n const global = options.global === true;\n if (projectLike && global) {\n throw new PmCliError('Options \"--project/--local\" and \"--global\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n return global ? \"global\" : \"project\";\n}\n\nfunction normalizeTarget(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction packageRecordMatchesTarget(record: ManagedExtensionRecord, target: string): boolean {\n const normalizedTarget = normalizeTarget(target);\n const values = [\n record.name,\n record.directory,\n record.source.input,\n record.source.location,\n record.source.package,\n record.source.repository,\n record.source.owner && record.source.repo ? `${record.source.owner}/${record.source.repo}` : undefined,\n ];\n return values.some((value) => typeof value === \"string\" && normalizeTarget(value) === normalizedTarget);\n}\n\nfunction resolveRoots(scope: ExtensionScope, global: GlobalOptions): {\n selected_root: string;\n} {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const roots = resolveExtensionRoots(pmRoot, process.cwd());\n return {\n selected_root: scope === \"global\" ? roots.global : roots.project,\n };\n}\n\nasync function defaultCommandRunner(\n command: string,\n args: string[],\n options?: { cwd?: string },\n): Promise<UpgradeCommandRunnerResult> {\n try {\n const result = await execFileAsync(command, args, {\n cwd: options?.cwd,\n encoding: \"utf8\",\n });\n return {\n stdout: result.stdout,\n stderr: result.stderr,\n };\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error\n ? String((error as { stderr?: unknown }).stderr ?? \"\")\n : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Command failed: ${command} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nasync function readCurrentVersion(): Promise<string | undefined> {\n return resolvePmCliVersion(import.meta.url, [\"../../..\"]);\n}\n\nfunction resolveTag(options: UpgradeCommandOptions): string {\n return typeof options.tag === \"string\" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;\n}\n\nfunction resolveCliPackage(options: UpgradeCommandOptions): string {\n return typeof options.packageName === \"string\" && options.packageName.trim().length > 0\n ? options.packageName.trim()\n : DEFAULT_CLI_PACKAGE;\n}\n\nasync function upgradeCli(options: UpgradeCommandOptions, dryRun: boolean): Promise<UpgradeCliResult> {\n const runner = options.commandRunner ?? defaultCommandRunner;\n const packageName = resolveCliPackage(options);\n const tag = resolveTag(options);\n const target = `${packageName}@${tag}`;\n const command = [\"npm\", \"install\", \"-g\", target];\n if (options.repair === true) {\n command.push(\"--force\");\n }\n const beforeVersion = await readCurrentVersion();\n const planned: UpgradeCliResult = {\n requested: true,\n status: \"planned\",\n package: packageName,\n target,\n command,\n before_version: beforeVersion,\n repair: options.repair === true,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runner(command[0]!, command.slice(1));\n const verified = await runner(\"pm\", [\"--version\"]);\n return {\n ...planned,\n status: \"updated\",\n after_version: verified.stdout.trim() || undefined,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction isLocalNpmSpec(spec: string): boolean {\n return path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\") || spec.startsWith(\"file:\");\n}\n\nfunction resolvePackageInstallSource(source: ManagedExtensionSource, tag: string): string {\n if (source.kind === \"npm\") {\n const rawSpec = source.input.startsWith(\"npm:\") ? source.input.slice(\"npm:\".length).trim() : source.input.trim();\n if (!isLocalNpmSpec(rawSpec) && source.package && source.package.trim().length > 0) {\n return `npm:${source.package.trim()}@${tag}`;\n }\n return source.input.startsWith(\"npm:\") ? source.input : `npm:${source.input}`;\n }\n return source.input;\n}\n\nasync function resolveRunnablePackageSource(source: ManagedExtensionSource, tag: string): Promise<string> {\n const installSource = resolvePackageInstallSource(source, tag);\n if (source.kind !== \"local\") {\n return installSource;\n }\n if (await pathExists(installSource)) {\n return installSource;\n }\n if (await pathExists(source.location)) {\n return source.location;\n }\n return installSource;\n}\n\nfunction packageCommandFor(source: ManagedExtensionSource, installSource: string, scope: ExtensionScope, ref?: string): string[] {\n const command = [\"pm\", \"install\", installSource, scope === \"global\" ? \"--global\" : \"--project\"];\n if (source.kind === \"github\" && ref && ref.trim().length > 0) {\n command.push(\"--ref\", ref.trim());\n }\n return command;\n}\n\nasync function readManagedRecords(scope: ExtensionScope, global: GlobalOptions): Promise<ManagedExtensionRecord[]> {\n const roots = resolveRoots(scope, global);\n const managedState = await readManagedExtensionState(roots.selected_root);\n return managedState.state.entries.filter((entry) => entry.scope === scope);\n}\n\nasync function refreshManagedRecord(\n scope: ExtensionScope,\n global: GlobalOptions,\n record: ManagedExtensionRecord,\n): Promise<ManagedExtensionRecord | undefined> {\n const records = await readManagedRecords(scope, global);\n return records.find((candidate) => packageRecordMatchesTarget(candidate, record.name)) ??\n records.find((candidate) => normalizeTarget(candidate.directory) === normalizeTarget(record.directory));\n}\n\nasync function upgradePackageRecord(\n record: ManagedExtensionRecord,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n scope: ExtensionScope,\n dryRun: boolean,\n): Promise<UpgradePackageResult> {\n const tag = resolveTag(options);\n const installSource = await resolveRunnablePackageSource(record.source, tag);\n const command = packageCommandFor(record.source, installSource, scope, record.source.ref);\n const planned: UpgradePackageResult = {\n name: record.name,\n directory: record.directory,\n scope,\n source: record.source,\n status: \"planned\",\n command,\n previous_version: record.manifest_version,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runExtension(\n installSource,\n {\n install: true,\n project: scope === \"project\",\n global: scope === \"global\",\n ref: record.source.kind === \"github\" ? record.source.ref : undefined,\n },\n global,\n );\n const refreshed = await refreshManagedRecord(scope, global, record);\n return {\n ...planned,\n status: \"updated\",\n installed_version: refreshed?.manifest_version,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction summarize(\n cli: UpgradeCliResult,\n packages: UpgradePackageResult[],\n includeCli: boolean,\n includePackages: boolean,\n): UpgradeResult[\"summary\"] {\n const statuses = [includeCli ? cli.status : undefined, ...packages.map((entry) => entry.status)].filter(\n (value): value is UpgradeCliResult[\"status\"] => typeof value === \"string\",\n );\n return {\n requested_cli: includeCli,\n requested_packages: includePackages,\n planned: statuses.filter((status) => status === \"planned\").length,\n updated: statuses.filter((status) => status === \"updated\").length,\n skipped: statuses.filter((status) => status === \"skipped\").length,\n failed: statuses.filter((status) => status === \"failed\").length,\n };\n}\n\n/**\n * Implements run upgrade for the public runtime surface of this module.\n */\nexport async function runUpgrade(\n target: string | undefined,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n): Promise<UpgradeResult> {\n if (options.cliOnly === true && options.packagesOnly === true) {\n throw new PmCliError('Options \"--cli-only\" and \"--packages-only\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n\n const scope = resolveScope(options);\n const dryRun = options.dryRun === true;\n const normalizedTarget = typeof target === \"string\" && target.trim().length > 0 ? target.trim() : undefined;\n if (options.cliOnly === true && normalizedTarget) {\n throw new PmCliError('A package target cannot be used with \"--cli-only\".', EXIT_CODE.USAGE);\n }\n const includeCli = options.packagesOnly === true || normalizedTarget ? false : true;\n const includePackages = options.cliOnly === true ? false : true;\n const cli = includeCli\n ? await upgradeCli(options, dryRun)\n : {\n requested: false,\n status: \"skipped\",\n package: resolveCliPackage(options),\n target: `${resolveCliPackage(options)}@${resolveTag(options)}`,\n command: [\"npm\", \"install\", \"-g\", `${resolveCliPackage(options)}@${resolveTag(options)}`],\n repair: options.repair === true,\n reason: \"not_requested\",\n } as UpgradeCliResult;\n\n let packageRecords = includePackages ? await readManagedRecords(scope, global) : [];\n if (normalizedTarget) {\n packageRecords = packageRecords.filter((entry) => packageRecordMatchesTarget(entry, normalizedTarget));\n if (packageRecords.length === 0) {\n throw new PmCliError(`Managed package \"${normalizedTarget}\" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);\n }\n }\n\n const packages: UpgradePackageResult[] = [];\n for (const record of packageRecords) {\n packages.push(await upgradePackageRecord(record, options, global, scope, dryRun));\n }\n\n const summary = summarize(cli, packages, includeCli, includePackages);\n return {\n ok: summary.failed === 0,\n action: \"upgrade\",\n dry_run: dryRun,\n scope,\n target: normalizedTarget,\n cli,\n packages,\n summary,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,SAAS,gBAAgB;AACzB,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAgB1B,IAAM,gBAAgB,UAAU,QAAQ;AACxC,IAAM,sBAAsB;AAC5B,IAAM,cAAc;AAkBb,IAAM,YAAY;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAyEF,SAAS,aAAa,SAA8B;AAClD,QAAM,cAAc,QAAQ,YAAY,QAAQ,QAAQ,UAAU;AAClE,QAAM,SAAS,QAAQ,WAAW;AAClC,MAAI,eAAe,QAAQ;AACzB,UAAM,IAAI,WAAW,sEAAsE,UAAU,KAAK;EAC5G;AACA,SAAO,SAAS,WAAW;AAC7B;AAEA,SAAS,gBAAgB,OAAa;AACpC,SAAO,MAAM,KAAI,EAAG,YAAW;AACjC;AAEA,SAAS,2BAA2B,QAAgC,QAAc;AAChF,QAAM,mBAAmB,gBAAgB,MAAM;AAC/C,QAAM,SAAS;IACb,OAAO;IACP,OAAO;IACP,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO,SAAS,OAAO,OAAO,OAAO,GAAG,OAAO,OAAO,KAAK,IAAI,OAAO,OAAO,IAAI,KAAK;;AAE/F,SAAO,OAAO,KAAK,CAAC,UAAU,OAAO,UAAU,YAAY,gBAAgB,KAAK,MAAM,gBAAgB;AACxG;AAEA,SAAS,aAAa,OAAuB,QAAqB;AAGhE,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,QAAM,QAAQ,sBAAsB,QAAQ,QAAQ,IAAG,CAAE;AACzD,SAAO;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,kBAAkB,OAAO;IAClC,QAAQ,GAAG,kBAAkB,OAAO,CAAC,IAAI,WAAW,OAAO,CAAC;IAC5D,SAAS,CAAC,OAAO,WAAW,MAAM,GAAG,kBAAkB,OAAO,CAAC,IAAI,WAAW,OAAO,CAAC,EAAE;IACxF,QAAQ,QAAQ,WAAW;IAC3B,QAAQ;;AAGd,MAAI,iBAAiB,kBAAkB,MAAM,mBAAmB,OAAO,MAAM,IAAI,CAAA;AACjF,MAAI,kBAAkB;AACpB,qBAAiB,eAAe,OAAO,CAAC,UAAU,2BAA2B,OAAO,gBAAgB,CAAC;AACrG,QAAI,eAAe,WAAW,GAAG;AAC/B,YAAM,IAAI,WAAW,oBAAoB,gBAAgB,sBAAsB,KAAK,WAAW,UAAU,SAAS;IACpH;EACF;AAEA,QAAM,WAAmC,CAAA;AACzC,aAAW,UAAU,gBAAgB;AACnC,aAAS,KAAK,MAAM,qBAAqB,QAAQ,SAAS,QAAQ,OAAO,MAAM,CAAC;EAClF;AAEA,QAAM,UAAU,UAAU,KAAK,UAAU,YAAY,eAAe;AACpE,SAAO;IACL,IAAI,QAAQ,WAAW;IACvB,QAAQ;IACR,SAAS;IACT;IACA,QAAQ;IACR;IACA;IACA;;AAEJ","debugId":"e29e4c63-bf56-5d14-b8f1-25beaf2d15da"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readManagedExtensionState,
|
|
3
3
|
runExtension
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-7GCCDXXN.js";
|
|
5
|
+
import "./chunk-4YJA4LGU.js";
|
|
6
|
+
import "./chunk-25XZN3JD.js";
|
|
6
7
|
import "./chunk-5HIZDR5A.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4JXWVHMN.js";
|
|
8
9
|
import {
|
|
9
10
|
EXIT_CODE,
|
|
10
11
|
PmCliError,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
resolveExtensionRoots,
|
|
13
14
|
resolvePmCliVersion,
|
|
14
15
|
resolvePmRoot
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RZZMSY4P.js";
|
|
16
17
|
|
|
17
18
|
// dist/cli/commands/upgrade.js
|
|
18
19
|
import { execFile } from "node:child_process";
|
|
@@ -274,4 +275,4 @@ export {
|
|
|
274
275
|
_testOnly,
|
|
275
276
|
runUpgrade
|
|
276
277
|
};
|
|
277
|
-
//# sourceMappingURL=upgrade-
|
|
278
|
+
//# sourceMappingURL=upgrade-76IKZ6EZ.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/upgrade.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/upgrade\n *\n * Implements the pm upgrade command surface and its agent-facing runtime behavior.\n */\nimport { execFile } from \"node:child_process\";\nimport path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport {\n readManagedExtensionState,\n runExtension,\n type ExtensionScope,\n type ManagedExtensionRecord,\n type ManagedExtensionSource,\n} from \"./extension.js\";\nimport { resolveExtensionRoots } from \"../../core/extensions/loader.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { resolvePmCliVersion } from \"../../core/packages/root.js\";\n\nconst execFileAsync = promisify(execFile);\nconst DEFAULT_CLI_PACKAGE = \"@unbrained/pm-cli\";\nconst DEFAULT_TAG = \"latest\";\n\n/**\n * Documents the upgrade command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandOptions {\n dryRun?: boolean;\n cliOnly?: boolean;\n packagesOnly?: boolean;\n project?: boolean;\n local?: boolean;\n global?: boolean;\n repair?: boolean;\n tag?: string;\n packageName?: string;\n commandRunner?: UpgradeCommandRunner;\n}\n\nexport const _testOnly = {\n defaultCommandRunner,\n isLocalNpmSpec,\n normalizeTarget,\n packageRecordMatchesTarget,\n resolveCliPackage,\n resolvePackageInstallSource,\n resolveRunnablePackageSource,\n resolveScope,\n resolveTag,\n packageCommandFor,\n summarize,\n};\n\n/**\n * Documents the upgrade command runner result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCommandRunnerResult {\n stdout: string;\n stderr: string;\n}\n\n/**\n * Restricts upgrade command runner values accepted by command, SDK, and storage contracts.\n */\nexport type UpgradeCommandRunner = (\n command: string,\n args: string[],\n options?: { cwd?: string },\n) => Promise<UpgradeCommandRunnerResult>;\n\n/**\n * Documents the upgrade cli result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeCliResult {\n requested: boolean;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n package: string;\n target: string;\n command: string[];\n before_version?: string;\n after_version?: string;\n repair: boolean;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade package result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradePackageResult {\n name: string;\n directory: string;\n scope: ExtensionScope;\n source: ManagedExtensionSource;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n command: string[];\n previous_version: string;\n installed_version?: string;\n reason?: string;\n error?: string;\n}\n\n/**\n * Documents the upgrade result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpgradeResult {\n ok: boolean;\n action: \"upgrade\";\n dry_run: boolean;\n scope: ExtensionScope;\n target?: string;\n cli: UpgradeCliResult;\n packages: UpgradePackageResult[];\n summary: {\n requested_cli: boolean;\n requested_packages: boolean;\n planned: number;\n updated: number;\n skipped: number;\n failed: number;\n };\n}\n\nfunction resolveScope(options: UpgradeCommandOptions): ExtensionScope {\n const projectLike = options.project === true || options.local === true;\n const global = options.global === true;\n if (projectLike && global) {\n throw new PmCliError('Options \"--project/--local\" and \"--global\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n return global ? \"global\" : \"project\";\n}\n\nfunction normalizeTarget(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction packageRecordMatchesTarget(record: ManagedExtensionRecord, target: string): boolean {\n const normalizedTarget = normalizeTarget(target);\n const values = [\n record.name,\n record.directory,\n record.source.input,\n record.source.location,\n record.source.package,\n record.source.repository,\n record.source.owner && record.source.repo ? `${record.source.owner}/${record.source.repo}` : undefined,\n ];\n return values.some((value) => typeof value === \"string\" && normalizeTarget(value) === normalizedTarget);\n}\n\nfunction resolveRoots(scope: ExtensionScope, global: GlobalOptions): {\n selected_root: string;\n} {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const roots = resolveExtensionRoots(pmRoot, process.cwd());\n return {\n selected_root: scope === \"global\" ? roots.global : roots.project,\n };\n}\n\nasync function defaultCommandRunner(\n command: string,\n args: string[],\n options?: { cwd?: string },\n): Promise<UpgradeCommandRunnerResult> {\n try {\n const result = await execFileAsync(command, args, {\n cwd: options?.cwd,\n encoding: \"utf8\",\n });\n return {\n stdout: result.stdout,\n stderr: result.stderr,\n };\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error\n ? String((error as { stderr?: unknown }).stderr ?? \"\")\n : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Command failed: ${command} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nasync function readCurrentVersion(): Promise<string | undefined> {\n return resolvePmCliVersion(import.meta.url, [\"../../..\"]);\n}\n\nfunction resolveTag(options: UpgradeCommandOptions): string {\n return typeof options.tag === \"string\" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;\n}\n\nfunction resolveCliPackage(options: UpgradeCommandOptions): string {\n return typeof options.packageName === \"string\" && options.packageName.trim().length > 0\n ? options.packageName.trim()\n : DEFAULT_CLI_PACKAGE;\n}\n\nasync function upgradeCli(options: UpgradeCommandOptions, dryRun: boolean): Promise<UpgradeCliResult> {\n const runner = options.commandRunner ?? defaultCommandRunner;\n const packageName = resolveCliPackage(options);\n const tag = resolveTag(options);\n const target = `${packageName}@${tag}`;\n const command = [\"npm\", \"install\", \"-g\", target];\n if (options.repair === true) {\n command.push(\"--force\");\n }\n const beforeVersion = await readCurrentVersion();\n const planned: UpgradeCliResult = {\n requested: true,\n status: \"planned\",\n package: packageName,\n target,\n command,\n before_version: beforeVersion,\n repair: options.repair === true,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runner(command[0]!, command.slice(1));\n const verified = await runner(\"pm\", [\"--version\"]);\n return {\n ...planned,\n status: \"updated\",\n after_version: verified.stdout.trim() || undefined,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction isLocalNpmSpec(spec: string): boolean {\n return path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\") || spec.startsWith(\"file:\");\n}\n\nfunction resolvePackageInstallSource(source: ManagedExtensionSource, tag: string): string {\n if (source.kind === \"npm\") {\n const rawSpec = source.input.startsWith(\"npm:\") ? source.input.slice(\"npm:\".length).trim() : source.input.trim();\n if (!isLocalNpmSpec(rawSpec) && source.package && source.package.trim().length > 0) {\n return `npm:${source.package.trim()}@${tag}`;\n }\n return source.input.startsWith(\"npm:\") ? source.input : `npm:${source.input}`;\n }\n return source.input;\n}\n\nasync function resolveRunnablePackageSource(source: ManagedExtensionSource, tag: string): Promise<string> {\n const installSource = resolvePackageInstallSource(source, tag);\n if (source.kind !== \"local\") {\n return installSource;\n }\n if (await pathExists(installSource)) {\n return installSource;\n }\n if (await pathExists(source.location)) {\n return source.location;\n }\n return installSource;\n}\n\nfunction packageCommandFor(source: ManagedExtensionSource, installSource: string, scope: ExtensionScope, ref?: string): string[] {\n const command = [\"pm\", \"install\", installSource, scope === \"global\" ? \"--global\" : \"--project\"];\n if (source.kind === \"github\" && ref && ref.trim().length > 0) {\n command.push(\"--ref\", ref.trim());\n }\n return command;\n}\n\nasync function readManagedRecords(scope: ExtensionScope, global: GlobalOptions): Promise<ManagedExtensionRecord[]> {\n const roots = resolveRoots(scope, global);\n const managedState = await readManagedExtensionState(roots.selected_root);\n return managedState.state.entries.filter((entry) => entry.scope === scope);\n}\n\nasync function refreshManagedRecord(\n scope: ExtensionScope,\n global: GlobalOptions,\n record: ManagedExtensionRecord,\n): Promise<ManagedExtensionRecord | undefined> {\n const records = await readManagedRecords(scope, global);\n return records.find((candidate) => packageRecordMatchesTarget(candidate, record.name)) ??\n records.find((candidate) => normalizeTarget(candidate.directory) === normalizeTarget(record.directory));\n}\n\nasync function upgradePackageRecord(\n record: ManagedExtensionRecord,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n scope: ExtensionScope,\n dryRun: boolean,\n): Promise<UpgradePackageResult> {\n const tag = resolveTag(options);\n const installSource = await resolveRunnablePackageSource(record.source, tag);\n const command = packageCommandFor(record.source, installSource, scope, record.source.ref);\n const planned: UpgradePackageResult = {\n name: record.name,\n directory: record.directory,\n scope,\n source: record.source,\n status: \"planned\",\n command,\n previous_version: record.manifest_version,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runExtension(\n installSource,\n {\n install: true,\n project: scope === \"project\",\n global: scope === \"global\",\n ref: record.source.kind === \"github\" ? record.source.ref : undefined,\n },\n global,\n );\n const refreshed = await refreshManagedRecord(scope, global, record);\n return {\n ...planned,\n status: \"updated\",\n installed_version: refreshed?.manifest_version,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction summarize(\n cli: UpgradeCliResult,\n packages: UpgradePackageResult[],\n includeCli: boolean,\n includePackages: boolean,\n): UpgradeResult[\"summary\"] {\n const statuses = [includeCli ? cli.status : undefined, ...packages.map((entry) => entry.status)].filter(\n (value): value is UpgradeCliResult[\"status\"] => typeof value === \"string\",\n );\n return {\n requested_cli: includeCli,\n requested_packages: includePackages,\n planned: statuses.filter((status) => status === \"planned\").length,\n updated: statuses.filter((status) => status === \"updated\").length,\n skipped: statuses.filter((status) => status === \"skipped\").length,\n failed: statuses.filter((status) => status === \"failed\").length,\n };\n}\n\n/**\n * Implements run upgrade for the public runtime surface of this module.\n */\nexport async function runUpgrade(\n target: string | undefined,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n): Promise<UpgradeResult> {\n if (options.cliOnly === true && options.packagesOnly === true) {\n throw new PmCliError('Options \"--cli-only\" and \"--packages-only\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n\n const scope = resolveScope(options);\n const dryRun = options.dryRun === true;\n const normalizedTarget = typeof target === \"string\" && target.trim().length > 0 ? target.trim() : undefined;\n if (options.cliOnly === true && normalizedTarget) {\n throw new PmCliError('A package target cannot be used with \"--cli-only\".', EXIT_CODE.USAGE);\n }\n const includeCli = options.packagesOnly === true || normalizedTarget ? false : true;\n const includePackages = options.cliOnly === true ? false : true;\n const cli = includeCli\n ? await upgradeCli(options, dryRun)\n : {\n requested: false,\n status: \"skipped\",\n package: resolveCliPackage(options),\n target: `${resolveCliPackage(options)}@${resolveTag(options)}`,\n command: [\"npm\", \"install\", \"-g\", `${resolveCliPackage(options)}@${resolveTag(options)}`],\n repair: options.repair === true,\n reason: \"not_requested\",\n } as UpgradeCliResult;\n\n let packageRecords = includePackages ? await readManagedRecords(scope, global) : [];\n if (normalizedTarget) {\n packageRecords = packageRecords.filter((entry) => packageRecordMatchesTarget(entry, normalizedTarget));\n if (packageRecords.length === 0) {\n throw new PmCliError(`Managed package \"${normalizedTarget}\" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);\n }\n }\n\n const packages: UpgradePackageResult[] = [];\n for (const record of packageRecords) {\n packages.push(await upgradePackageRecord(record, options, global, scope, dryRun));\n }\n\n const summary = summarize(cli, packages, includeCli, includePackages);\n return {\n ok: summary.failed === 0,\n action: \"upgrade\",\n dry_run: dryRun,\n scope,\n target: normalizedTarget,\n cli,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W,MAAM,GAAG,kBAAkB,OAAO,CAAC,IAAI,WAAW,OAAO,CAAC,EAAE;IACxF,QAAQ,QAAQ,WAAW;IAC3B,QAAQ;;AAGd,MAAI,iBAAiB,kBAAkB,MAAM,mBAAmB,OAAOA,OAAM,IAAI,CAAA;AACjF,MAAI,kBAAkB;AACpB,qBAAiB,eAAe,OAAO,CAAC,UAAU,2BAA2B,OAAO,gBAAgB,CAAC;AACrG,QAAI,eAAe,WAAW,GAAG;AAC/B,YAAM,IAAI,WAAW,oBAAoB,gBAAgB,sBAAsB,KAAK,WAAW,UAAU,SAAS;IACpH;EACF;AAEA,QAAM,WAAmC,CAAA;AACzC,aAAW,UAAU,gBAAgB;AACnC,aAAS,KAAK,MAAM,qBAAqB,QAAQ,SAASA,SAAQ,OAAO,MAAM,CAAC;EAClF;AAEA,QAAM,UAAU,UAAU,KAAK,UAAU,YAAY,eAAe;AACpE,SAAO;IACL,IAAI,QAAQ,WAAW;IACvB,QAAQ;IACR,SAAS;IACT;IACA,QAAQ;IACR;IACA;IACA;;AAEJ;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -3,35 +3,36 @@ import {
|
|
|
3
3
|
} from "./chunk-JINYH2DB.js";
|
|
4
4
|
import {
|
|
5
5
|
extractReferencedPmItemIdsFromCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5SESR24H.js";
|
|
7
7
|
import {
|
|
8
8
|
scanHistoryDrift
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2LEYMXI6.js";
|
|
10
|
+
import "./chunk-J2TSPY5L.js";
|
|
11
|
+
import "./chunk-NVUATMTC.js";
|
|
12
|
+
import "./chunk-CWPBGUC7.js";
|
|
13
|
+
import "./chunk-MD7XKVWI.js";
|
|
14
|
+
import "./chunk-A7E4ZXG2.js";
|
|
15
|
+
import "./chunk-75VEYQJS.js";
|
|
16
|
+
import "./chunk-7GCCDXXN.js";
|
|
17
|
+
import "./chunk-4YJA4LGU.js";
|
|
18
|
+
import "./chunk-25XZN3JD.js";
|
|
18
19
|
import "./chunk-5HIZDR5A.js";
|
|
19
20
|
import {
|
|
20
21
|
listAllFrontMatterWithBody
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-GNDHOR64.js";
|
|
23
|
+
import "./chunk-AJXYOYJV.js";
|
|
23
24
|
import {
|
|
24
25
|
CURRENT_ITEM_FORMAT_VERSION,
|
|
25
26
|
effectiveItemFormatVersion,
|
|
26
27
|
normalizeStatusInput,
|
|
27
28
|
scanItemFormatVersions
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CR7KFPAQ.js";
|
|
29
30
|
import {
|
|
30
31
|
resolveItemTypeRegistry
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3VLPDG3J.js";
|
|
32
33
|
import {
|
|
33
34
|
nowIso
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-4JXWVHMN.js";
|
|
35
36
|
import {
|
|
36
37
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
37
38
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -46,7 +47,7 @@ import {
|
|
|
46
47
|
resolvePmRoot,
|
|
47
48
|
resolveRuntimeStatusRegistry,
|
|
48
49
|
toNonEmptyStringOrUndefined
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-RZZMSY4P.js";
|
|
50
51
|
|
|
51
52
|
// dist/cli/commands/validate.js
|
|
52
53
|
import fs from "node:fs/promises";
|
|
@@ -1757,7 +1758,7 @@ async function applyValidateFix(fix, global2) {
|
|
|
1757
1758
|
case "set_estimate":
|
|
1758
1759
|
case "reparent":
|
|
1759
1760
|
case "unset_parent": {
|
|
1760
|
-
const { runUpdate } = await import("./update-
|
|
1761
|
+
const { runUpdate } = await import("./update-7IYQHX4Q.js");
|
|
1761
1762
|
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1762
1763
|
if (fix.kind === "set_resolution") {
|
|
1763
1764
|
updateOptions.resolution = fix.value;
|
|
@@ -1817,10 +1818,10 @@ async function applyValidateFixes(applicable, global2) {
|
|
|
1817
1818
|
const remove = batch.map((fix) => fix.path).filter((value) => typeof value === "string" && value.length > 0);
|
|
1818
1819
|
try {
|
|
1819
1820
|
if (first.kind === "prune_file_link") {
|
|
1820
|
-
const { runFiles } = await import("./files-
|
|
1821
|
+
const { runFiles } = await import("./files-3EVJQZ2N.js");
|
|
1821
1822
|
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1822
1823
|
} else {
|
|
1823
|
-
const { runDocs } = await import("./docs-
|
|
1824
|
+
const { runDocs } = await import("./docs-SS4UKYYA.js");
|
|
1824
1825
|
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1825
1826
|
}
|
|
1826
1827
|
applied.push(...batch);
|
|
@@ -1992,4 +1993,4 @@ export {
|
|
|
1992
1993
|
_testOnlyValidateCommand,
|
|
1993
1994
|
runValidate
|
|
1994
1995
|
};
|
|
1995
|
-
//# sourceMappingURL=validate-
|
|
1996
|
+
//# sourceMappingURL=validate-AQU7OCL3.js.map
|