shopify 5.0.1 → 5.1.0
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/dist/analytics-QFDTQYPM.js +1 -0
- package/dist/analytics-XADBBHOH.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-24Q6X53V.js +1 -0
- package/dist/{chunk-F3OM2YO6.js → chunk-25MYHE4W.js} +1 -1
- package/dist/{chunk-HP2ZAAY7.js → chunk-27JT4NA4.js} +1 -1
- package/dist/chunk-2BYW3BYX.js +1 -0
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/{chunk-V654BMS7.js → chunk-2KUM2RU4.js} +60 -60
- package/dist/chunk-2PD7TNFS.js +275 -0
- package/dist/{chunk-3JACWBUC.js → chunk-3C72S6LO.js} +1 -1
- package/dist/chunk-3FZ4LE6A.js +10 -0
- package/dist/{chunk-ZBVHPC6W.js → chunk-3GD5ESWN.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/{chunk-X4A5D3PZ.js → chunk-3MZ7ELHS.js} +2 -2
- package/dist/{chunk-VXL5FBE7.js → chunk-3PS52ZT4.js} +1 -1
- package/dist/chunk-3PYDIBTX.js +1 -0
- package/dist/chunk-3Z75BVGJ.js +1 -0
- package/dist/chunk-4FWPOGPQ.js +1 -0
- package/dist/chunk-4IP37MBX.js +1 -0
- package/dist/chunk-4NFX7YCT.js +1 -0
- package/dist/chunk-4TCXPHKN.js +1 -0
- package/dist/chunk-4WBWZIN5.js +6 -0
- package/dist/chunk-5534MHZW.js +97 -0
- package/dist/{chunk-C4EKNOLY.js → chunk-5C6CXU74.js} +1 -1
- package/dist/{chunk-56GKTWFF.js → chunk-5HOZDOJ7.js} +1 -1
- package/dist/{chunk-CX3ANDPI.js → chunk-5PSQFQL6.js} +1 -1
- package/dist/chunk-5T3ZT6CC.js +1 -0
- package/dist/chunk-62NW4EPI.js +17 -0
- package/dist/chunk-65NCQJYR.js +1 -0
- package/dist/{chunk-QGWC23HQ.js → chunk-6BYHL3DS.js} +1 -1
- package/dist/chunk-6I7DT7QR.js +3 -0
- package/dist/chunk-6IMTMS2S.js +3 -0
- package/dist/chunk-7A77JCED.js +11 -0
- package/dist/chunk-7ART2IKU.js +1 -0
- package/dist/{chunk-TTBNFGCW.js → chunk-7BPT5V24.js} +2 -2
- package/dist/{chunk-V7H7ITCF.js → chunk-7CT3NIXI.js} +1 -1
- package/dist/chunk-7DBKSSDK.js +1 -0
- package/dist/chunk-7HECBXSP.js +1 -0
- package/dist/chunk-7KID5BIR.js +4 -0
- package/dist/{chunk-63UKZLPC.js → chunk-7N7KRZOM.js} +1 -1
- package/dist/{chunk-NJVNGEOU.js → chunk-7NRHZG5Y.js} +102 -102
- package/dist/chunk-7PHDEILV.js +1 -0
- package/dist/chunk-A2NSORBM.js +2296 -0
- package/dist/chunk-A54TADAZ.js +1 -0
- package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
- package/dist/chunk-AGTUAQHX.js +4 -0
- package/dist/chunk-AHYI27QL.js +11 -0
- package/dist/chunk-ALINJ6J2.js +1 -0
- package/dist/chunk-AMVWKHNY.js +1 -0
- package/dist/{chunk-D4LFWIFE.js → chunk-ASKBYEO7.js} +1 -1
- package/dist/{chunk-LENSEW2F.js → chunk-AVJJGQOP.js} +1 -1
- package/dist/{chunk-QVVQUJQL.js → chunk-AY3AAV77.js} +1 -1
- package/dist/{chunk-DSKAIC7O.js → chunk-BFAOTQGH.js} +1 -1
- package/dist/{chunk-KGASGUDQ.js → chunk-BPKQA2EO.js} +1 -1
- package/dist/{chunk-KLYGMYXV.js → chunk-C2HJEGTS.js} +1 -1
- package/dist/chunk-C72QNK6O.js +4 -0
- package/dist/chunk-CDSDQTNB.js +16 -0
- package/dist/chunk-CEQGOCKX.js +1 -0
- package/dist/{chunk-QBE6XVU3.js → chunk-CIGWIKOW.js} +1 -1
- package/dist/chunk-CQAD5WML.js +1 -0
- package/dist/chunk-CRQQCT7F.js +1 -0
- package/dist/chunk-CZNUBAAG.js +3 -0
- package/dist/{chunk-WQOPLNDH.js → chunk-D7IMC2G4.js} +1 -1
- package/dist/{chunk-LGXNXAQA.js → chunk-DC7ITY6T.js} +1 -1
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-4EDE3UH7.js → chunk-DDZYIC76.js} +2 -2
- package/dist/chunk-DGIIUQH3.js +1 -0
- package/dist/{chunk-5AWELO3D.js → chunk-DMOLPSXF.js} +1 -1
- package/dist/{chunk-GSGCSBRN.js → chunk-DOLVBTCB.js} +1 -1
- package/dist/{chunk-MXXMIPUN.js → chunk-DTKGI43P.js} +2 -2
- package/dist/{chunk-37P5YOP2.js → chunk-DVD7I2TX.js} +2 -2
- package/dist/chunk-DVFVO6ZE.js +2 -0
- package/dist/{chunk-7U2MTK6I.js → chunk-DXEMSLI6.js} +1 -1
- package/dist/chunk-EDWIWZWM.js +15 -0
- package/dist/chunk-ELR6AZT4.js +9 -0
- package/dist/chunk-EVQPYZ7F.js +5 -0
- package/dist/chunk-F5QKMDP3.js +1 -0
- package/dist/{chunk-J5DUFSR4.js → chunk-F6IQWX2F.js} +1 -1
- package/dist/{chunk-XZLM4HLO.js → chunk-FAVPTYIR.js} +1 -1
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/{chunk-DVW7NDVD.js → chunk-FHKK3QU7.js} +1 -1
- package/dist/chunk-FKKJQGYX.js +7 -0
- package/dist/chunk-FQLXQ7WN.js +16 -0
- package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
- package/dist/{chunk-AIEVQSI3.js → chunk-FU7PYW7H.js} +1 -1
- package/dist/{chunk-5YUDEPEY.js → chunk-FYQE5E6U.js} +1 -1
- package/dist/chunk-G3EWGBXR.js +1 -0
- package/dist/chunk-G3RNO2TC.js +1 -0
- package/dist/{chunk-7NYCJG2U.js → chunk-GGCP2TIK.js} +1 -1
- package/dist/chunk-GSFWBFFH.js +1 -0
- package/dist/{chunk-NUCDRKDW.js → chunk-H2KGP2FM.js} +2 -2
- package/dist/{chunk-PVASYKSJ.js → chunk-H4K3F7PP.js} +1 -1
- package/dist/chunk-HGZ2HRPO.js +13 -0
- package/dist/chunk-HMPRWNGG.js +203 -0
- package/dist/chunk-HP4QYSBQ.js +1 -0
- package/dist/{chunk-LR4J4KYJ.js → chunk-HSTZV6H7.js} +2 -2
- package/dist/{chunk-ZHHTQRWU.js → chunk-HVUMVDUG.js} +1 -1
- package/dist/{chunk-IY5EI5V2.js → chunk-HYCNYUHW.js} +1 -1
- package/dist/{chunk-FHNJLON5.js → chunk-I3WRA2LH.js} +1 -1
- package/dist/{chunk-MS7DTL4U.js → chunk-IRLYC626.js} +2 -2
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-EA5XVQJT.js → chunk-JALDNBTU.js} +1 -1
- package/dist/{chunk-ZTZGDZCE.js → chunk-JC37YZ4I.js} +1 -1
- package/dist/{chunk-DM7BTMFP.js → chunk-JG4FAT2T.js} +1 -1
- package/dist/chunk-JGLLABZR.js +8 -0
- package/dist/chunk-JIY6XWSC.js +1 -0
- package/dist/{chunk-VG2AESTZ.js → chunk-JIYCZXK5.js} +1 -1
- package/dist/chunk-JMSAHCBU.js +35 -0
- package/dist/{chunk-CWR3IFXD.js → chunk-JNSVKDBY.js} +1 -1
- package/dist/chunk-JQU2BJDH.js +3 -0
- package/dist/chunk-JVY6CCLE.js +3 -0
- package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
- package/dist/chunk-KCAWHJGF.js +1 -0
- package/dist/{chunk-M73IECPW.js → chunk-KFO2JNF5.js} +1 -1
- package/dist/chunk-KFR7HWCG.js +9 -0
- package/dist/{chunk-QYFU363G.js → chunk-KHZF73BL.js} +1 -1
- package/dist/{chunk-HT66BOEC.js → chunk-KM4LE7K4.js} +2 -2
- package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
- package/dist/chunk-LFBFPK22.js +1 -0
- package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
- package/dist/chunk-LGDWE3H3.js +1 -0
- package/dist/chunk-LPPEAMI6.js +1 -0
- package/dist/chunk-LXIWMYM4.js +1 -0
- package/dist/chunk-MGWCXTGD.js +1 -0
- package/dist/chunk-MGX7UG44.js +1 -0
- package/dist/chunk-MKFRKNHF.js +3 -0
- package/dist/chunk-MTT6EAQO.js +1 -0
- package/dist/{chunk-75LAVRRL.js → chunk-MU7IVBGI.js} +2 -2
- package/dist/{chunk-36TZ447N.js → chunk-MYMBHVC4.js} +1 -1
- package/dist/chunk-MZDBH4XV.js +4 -0
- package/dist/{chunk-3G2PEYPI.js → chunk-NUBJ2HK7.js} +1 -1
- package/dist/{chunk-K3YALQBQ.js → chunk-NY5N4ANL.js} +1 -1
- package/dist/{chunk-364BVGRY.js → chunk-NYMKGE3J.js} +1 -1
- package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
- package/dist/chunk-O7HZ3EIP.js +1 -0
- package/dist/chunk-OJOF6IYG.js +9 -0
- package/dist/{chunk-EXTVC33U.js → chunk-ONZULPQH.js} +68 -66
- package/dist/chunk-ORMXPSJM.js +1 -0
- package/dist/chunk-ORYEDUKM.js +5 -0
- package/dist/{chunk-MZCIRMZJ.js → chunk-OTMYJWIP.js} +1 -1
- package/dist/chunk-OVJVFB5E.js +20 -0
- package/dist/chunk-OWQEFORZ.js +1 -0
- package/dist/{chunk-43HKFLOU.js → chunk-OXPEBT4I.js} +2 -2
- package/dist/chunk-OXZR2MB4.js +6 -0
- package/dist/chunk-OY5M52EF.js +6 -0
- package/dist/{chunk-FK5OFLSJ.js → chunk-PJZZZNWR.js} +1 -1
- package/dist/chunk-Q2LQJYRK.js +16 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/{chunk-KNQXCU3Y.js → chunk-QCLE5REL.js} +2 -2
- package/dist/chunk-QGQWVA7N.js +1 -0
- package/dist/chunk-QKPAB245.js +1 -0
- package/dist/chunk-QUPZOBTB.js +1 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/{chunk-2M4BKFYF.js → chunk-R6US7F33.js} +1 -1
- package/dist/chunk-RKNVTEO3.js +5 -0
- package/dist/{chunk-2QQ7EBJD.js → chunk-RLOEI6VE.js} +1 -1
- package/dist/chunk-RSZAAN37.js +1 -0
- package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
- package/dist/chunk-S4KNPCW3.js +81 -0
- package/dist/{chunk-YFRI75U4.js → chunk-SBN3ILXO.js} +1 -1
- package/dist/chunk-SCDGLREP.js +1 -0
- package/dist/chunk-SHOMIS6Q.js +2 -0
- package/dist/chunk-SN3PMWUF.js +6 -0
- package/dist/chunk-SODCXZ5U.js +1 -0
- package/dist/chunk-SPJM7RTD.js +1 -0
- package/dist/chunk-SQL67BKI.js +5 -0
- package/dist/{chunk-MMUGP3WP.js → chunk-SURFUFAZ.js} +1 -1
- package/dist/{chunk-KOTZSPZA.js → chunk-SVQDMZJO.js} +1 -1
- package/dist/chunk-T4ZOTYOY.js +1 -0
- package/dist/chunk-T6C4WC3Z.js +2 -0
- package/dist/chunk-TD6JBHUS.js +1 -0
- package/dist/chunk-TIM4CIXZ.js +22 -0
- package/dist/{chunk-V2FCZC7U.js → chunk-TP7CTMMT.js} +1 -1
- package/dist/chunk-TSPJAMYB.js +1 -0
- package/dist/chunk-TSVEV2UD.js +26 -0
- package/dist/chunk-TTAT62N3.js +25 -0
- package/dist/{chunk-ZVEBXHEY.js → chunk-TUSS6PXB.js} +1 -1
- package/dist/chunk-TXP6KFWO.js +5 -0
- package/dist/chunk-TZHVCMZN.js +6 -0
- package/dist/chunk-UC4TOM36.js +3 -0
- package/dist/{chunk-2YGPWG3I.js → chunk-UFY4L5KQ.js} +1 -1
- package/dist/chunk-UU6UQ2QY.js +1 -0
- package/dist/chunk-V4FC72R6.js +1 -0
- package/dist/chunk-VA2S7W7H.js +10 -0
- package/dist/chunk-VE3IIC7H.js +1 -0
- package/dist/{chunk-EH22T4FI.js → chunk-VJG7VXFU.js} +2 -2
- package/dist/chunk-VQSRU5XL.js +4 -0
- package/dist/chunk-VRIFLMA3.js +70 -0
- package/dist/chunk-WBJFTCEJ.js +1 -0
- package/dist/chunk-WBPP6PO7.js +31 -0
- package/dist/chunk-WE5KY6T6.js +1 -0
- package/dist/chunk-WFPVT2IY.js +1 -0
- package/dist/{chunk-ETXBF6Q7.js → chunk-WLYXBQ2M.js} +1 -1
- package/dist/chunk-WNVOEE6T.js +7 -0
- package/dist/chunk-WPDJVUTY.js +47 -0
- package/dist/chunk-WWCYEZUU.js +1 -0
- package/dist/chunk-WWVDZ3GC.js +3 -0
- package/dist/{chunk-CXPYOLGM.js → chunk-WZBZ7FWP.js} +2 -2
- package/dist/chunk-XEZPN5TR.js +22 -0
- package/dist/{chunk-AQ34X5B3.js → chunk-XLMKHTJ5.js} +1 -1
- package/dist/chunk-XRNBCV2B.js +1 -0
- package/dist/{chunk-B4ISKIXN.js → chunk-XWLNCBAG.js} +1 -1
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YKDRUAY3.js +857 -0
- package/dist/{chunk-FPOZMNT2.js → chunk-YNFQBYSL.js} +1 -1
- package/dist/{chunk-2CJQQQW4.js → chunk-YNZLLZU2.js} +1 -1
- package/dist/chunk-YOYPYB4H.js +1 -0
- package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
- package/dist/chunk-YTL45RXR.js +103 -0
- package/dist/chunk-YVPB7OT6.js +6 -0
- package/dist/chunk-YYWSHRO2.js +89 -0
- package/dist/{chunk-5XOEMYEQ.js → chunk-Z5QEXS6F.js} +1 -1
- package/dist/chunk-Z5WFRYVQ.js +6 -0
- package/dist/{chunk-P5W5RVE6.js → chunk-Z6ZRS256.js} +1 -1
- package/dist/chunk-ZMOW2YZ4.js +18 -0
- package/dist/chunk-ZMU4EYXT.js +1 -0
- package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
- package/dist/chunk-ZXZWMXXK.js +7 -0
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs-next.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.d.ts +10 -10
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.d.ts +7 -7
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +21 -21
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +23 -23
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +90 -90
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.d.ts +7 -7
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +24 -24
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.d.ts +7 -7
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli-version-check-V25AVSZ6.js +1 -0
- package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
- package/dist/command-json-schema-C5UZXP2W.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OCGEEV4U.js +1 -0
- package/dist/custom-oclif-loader-ZVUKMRGH.js +1 -0
- package/dist/data/filters.json +41 -2
- package/dist/data/local_block_entry.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +78 -36
- package/dist/data/section.json +1 -1
- package/dist/data/shopify_system_translations.json +240 -23
- package/dist/data/strict_settings.json +24 -0
- package/dist/data/tags.json +57 -24
- package/dist/data/theme_block.json +1 -1
- package/dist/deprecations-A5AXXKIK.js +1 -0
- package/dist/dist-NORLLIHQ.js +1 -0
- package/dist/dist-XBM4XZS4.js +1 -0
- package/dist/environment-5P7JJ3GI.js +1 -0
- package/dist/environments-Y5JEI3U3.js +1 -0
- package/dist/error-GI4DXVDU.js +1 -0
- package/dist/error-handler-BS2ZENQV.js +1 -0
- package/dist/fs-UOOLPOHJ.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +2 -2
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/http-2OXOS2AW.js +1 -0
- package/dist/http-proxy-node16-NZZ674YW.js +38 -0
- package/dist/index.js +12 -12
- package/dist/is-global-CI77T7NE.js +1 -0
- package/dist/json-error-6PBUR4LQ.js +1 -0
- package/dist/latest-version-75YEFEMK.js +9 -0
- package/dist/lib-4JVADMNT.js +1 -0
- package/dist/lib-L4STV5B2.js +1 -0
- package/dist/lib-LEEN55OD.js +1 -0
- package/dist/{local-KA3IWOZ6.js → local-5NIWPWDS.js} +1 -1
- package/dist/metadata-IXPNNPNJ.js +1 -0
- package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
- package/dist/node-package-manager-ALFEGGD6.js +1 -0
- package/dist/notifications-system-FQW3GKH2.js +1 -0
- package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
- package/dist/os-6TNQTEUN.js +1 -0
- package/dist/output-LEOB5LAM.js +1 -0
- package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.js} +1 -1
- package/dist/registry-auth-token-EDH77OOW.js +1 -0
- package/dist/registry-url-JMNV3LLX.js +1 -0
- package/dist/semver-HHZRKD6Y.js +1 -0
- package/dist/system-J4CTESP5.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-YDUI56E3.js +1 -0
- package/dist/upgrade-LBCZORG2.js +1 -0
- package/dist/version-2YL4YEQ2.js +1 -0
- package/dist/version-X2CPQVWQ.js +1 -0
- package/dist/workerd-5UPTEWNI.js +18 -0
- package/oclif.manifest.json +25622 -1132
- package/package.json +7 -7
- package/dist/analytics-RSUIYNLC.js +0 -1
- package/dist/analytics-V2SDYXQJ.js +0 -1
- package/dist/chunk-2AW3KBTP.js +0 -1
- package/dist/chunk-2M535QQJ.js +0 -6
- package/dist/chunk-2NZ7GDDR.js +0 -2
- package/dist/chunk-2RFCYZMG.js +0 -47
- package/dist/chunk-2S5NPJEJ.js +0 -5
- package/dist/chunk-2TPLPZA2.js +0 -3
- package/dist/chunk-32O27NE3.js +0 -1
- package/dist/chunk-335BUVBP.js +0 -1
- package/dist/chunk-46JYM3GH.js +0 -1
- package/dist/chunk-4GQEXVDT.js +0 -1
- package/dist/chunk-4IUXLUFD.js +0 -6
- package/dist/chunk-4QZ6OBXL.js +0 -4
- package/dist/chunk-4SDCXKYR.js +0 -31
- package/dist/chunk-5AQ5JT2V.js +0 -7
- package/dist/chunk-5D4FNAAD.js +0 -3
- package/dist/chunk-5TWYJQQO.js +0 -1
- package/dist/chunk-5YXYYQBX.js +0 -1
- package/dist/chunk-6JZC6UKY.js +0 -20
- package/dist/chunk-6Y6A2QGK.js +0 -3
- package/dist/chunk-7AWAOPLA.js +0 -1
- package/dist/chunk-7XAEI4XT.js +0 -3
- package/dist/chunk-A7LBGXWG.js +0 -1
- package/dist/chunk-ADVLRSSO.js +0 -1
- package/dist/chunk-AOBE6HN6.js +0 -31
- package/dist/chunk-B2VE7WOX.js +0 -1
- package/dist/chunk-BB7GAZP6.js +0 -1
- package/dist/chunk-BNTOGZLY.js +0 -1
- package/dist/chunk-BOAGJ6P5.js +0 -1
- package/dist/chunk-BU3JQM3W.js +0 -1
- package/dist/chunk-C3LL5CZA.js +0 -1
- package/dist/chunk-CFUZ6574.js +0 -15
- package/dist/chunk-CKVVJ4XO.js +0 -1
- package/dist/chunk-CNPBDSDL.js +0 -1
- package/dist/chunk-DTRENW4Q.js +0 -272
- package/dist/chunk-E3CTHNQS.js +0 -1
- package/dist/chunk-FFSDGRAN.js +0 -1
- package/dist/chunk-FNWXMCSD.js +0 -97
- package/dist/chunk-FS5PZCZ3.js +0 -1
- package/dist/chunk-FTHVOIK7.js +0 -4
- package/dist/chunk-FVRI7ZKE.js +0 -103
- package/dist/chunk-FZCGRIOM.js +0 -1
- package/dist/chunk-GCKGQFV7.js +0 -1
- package/dist/chunk-GGJUPL4W.js +0 -6
- package/dist/chunk-GHU6YEXH.js +0 -15
- package/dist/chunk-GNPIKPHB.js +0 -1
- package/dist/chunk-H57KYDEI.js +0 -16
- package/dist/chunk-HB3MJYBK.js +0 -1
- package/dist/chunk-HNU6R7RT.js +0 -7
- package/dist/chunk-HPT3UXZ5.js +0 -4
- package/dist/chunk-HXNGLDMU.js +0 -1
- package/dist/chunk-IAL6IQYW.js +0 -16
- package/dist/chunk-IULZYDCI.js +0 -9
- package/dist/chunk-IWTOC6DG.js +0 -1
- package/dist/chunk-J3JPJCWP.js +0 -1
- package/dist/chunk-J3UXIC23.js +0 -10
- package/dist/chunk-J7BTC45S.js +0 -1
- package/dist/chunk-JMVK2BIB.js +0 -3
- package/dist/chunk-JUTULEWW.js +0 -5
- package/dist/chunk-KT5QQOES.js +0 -3
- package/dist/chunk-KVF55INC.js +0 -5
- package/dist/chunk-L6VONMA2.js +0 -5
- package/dist/chunk-LWMKZJ4M.js +0 -1
- package/dist/chunk-M2KX3PXA.js +0 -1
- package/dist/chunk-M7NLCGCP.js +0 -6
- package/dist/chunk-MHWETFNT.js +0 -1
- package/dist/chunk-MNWT2SQO.js +0 -2265
- package/dist/chunk-MU2X7NGF.js +0 -11
- package/dist/chunk-MZWPIFAM.js +0 -70
- package/dist/chunk-NCPZVARH.js +0 -836
- package/dist/chunk-NMECLRGK.js +0 -11
- package/dist/chunk-NMLLRFZF.js +0 -1
- package/dist/chunk-NPB753M3.js +0 -1
- package/dist/chunk-OH7BQZQ7.js +0 -2
- package/dist/chunk-OLKLHVHA.js +0 -22
- package/dist/chunk-OPVXPDOQ.js +0 -1
- package/dist/chunk-OQUXGAF2.js +0 -1
- package/dist/chunk-OUMERKRE.js +0 -10
- package/dist/chunk-OYGIQDME.js +0 -1
- package/dist/chunk-PNZURX3S.js +0 -1
- package/dist/chunk-PRKJVU4Y.js +0 -1
- package/dist/chunk-PXFPVGWV.js +0 -1
- package/dist/chunk-Q2ORJEB2.js +0 -25
- package/dist/chunk-QFWWCZOI.js +0 -1
- package/dist/chunk-QFYLJVJW.js +0 -77
- package/dist/chunk-QX3T6G5X.js +0 -1
- package/dist/chunk-RDXLDCMI.js +0 -3
- package/dist/chunk-REDUS6EW.js +0 -1
- package/dist/chunk-RFZNFTVM.js +0 -1
- package/dist/chunk-RIG66DIQ.js +0 -18
- package/dist/chunk-RNUEPPVN.js +0 -1
- package/dist/chunk-RWTAPWLJ.js +0 -3
- package/dist/chunk-T5YVYVSW.js +0 -1
- package/dist/chunk-UDPYSL3M.js +0 -4
- package/dist/chunk-ULMNNGGX.js +0 -6
- package/dist/chunk-URCH4ITT.js +0 -1
- package/dist/chunk-UU2R56LN.js +0 -12
- package/dist/chunk-V75WUEFU.js +0 -1
- package/dist/chunk-VXD26GIG.js +0 -1
- package/dist/chunk-W7S6SYBM.js +0 -2
- package/dist/chunk-WAY723TL.js +0 -16
- package/dist/chunk-WFOU5M4H.js +0 -16
- package/dist/chunk-WGOSE3RL.js +0 -4
- package/dist/chunk-WQ6W725N.js +0 -1
- package/dist/chunk-X7DCL5LT.js +0 -1
- package/dist/chunk-XDXHSGDL.js +0 -1
- package/dist/chunk-XKKKMV46.js +0 -6
- package/dist/chunk-XRVJJG6W.js +0 -26
- package/dist/chunk-XV6XCOTG.js +0 -319
- package/dist/chunk-XYFYQWKW.js +0 -1
- package/dist/chunk-YCUEDZDA.js +0 -1
- package/dist/chunk-YQ63ZFYT.js +0 -1
- package/dist/chunk-YXIFSIRX.js +0 -1
- package/dist/chunk-ZDQO6CNY.js +0 -1
- package/dist/chunk-ZGASBRSQ.js +0 -5
- package/dist/command-json-schema-6EGXCM4B.js +0 -1
- package/dist/conf-store-E7ELDWBA.js +0 -1
- package/dist/custom-oclif-loader-FKFZJPHF.js +0 -1
- package/dist/deprecations-RNGBHZYB.js +0 -1
- package/dist/dist-VHIZZDYK.js +0 -1
- package/dist/dist-WXI5YQYP.js +0 -1
- package/dist/environment-O7ECODHU.js +0 -1
- package/dist/environments-WZJ6MRTH.js +0 -1
- package/dist/error-IFB626JA.js +0 -1
- package/dist/error-handler-OVJYVIOZ.js +0 -1
- package/dist/fs-7UOUHJDO.js +0 -1
- package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
- package/dist/is-global-XW3CVHLK.js +0 -1
- package/dist/json-error-C2U7ZLCG.js +0 -1
- package/dist/latest-version-LDWU5F7A.js +0 -49
- package/dist/lib-PJHT4MKY.js +0 -1
- package/dist/lib-VKSQ65BQ.js +0 -1
- package/dist/lib-YEZOHXF3.js +0 -1
- package/dist/metadata-6JI7HF5B.js +0 -1
- package/dist/node-package-manager-X3QIEMMX.js +0 -1
- package/dist/notifications-system-OXGLT2R4.js +0 -1
- package/dist/os-NORIEVMI.js +0 -1
- package/dist/output-K3JTLRJD.js +0 -1
- package/dist/system-LTHR2T7L.js +0 -1
- package/dist/ui-MYUBVKCK.js +0 -1
- package/dist/upgrade-MFTWBXL3.js +0 -1
- package/dist/version-BNGPPAUU.js +0 -1
- package/dist/version-RCGFWSB4.js +0 -1
- package/dist/workerd-ISSXMKIH.js +0 -18
- /package/dist/{chunk-YLQ3LNNY.js → chunk-2S3FHQFS.js} +0 -0
- /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{a as Cn}from"./chunk-AAK376RT.js";import{a as Du}from"./chunk-P2OI2P2M.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,c as Xs,d as Ti,e as ju,f as Di,g as Ve,h as Lu,i as Au,j as xu,k as Su,l as qu,m as Fu,n as Ru,o as Nu,p as Tu}from"./chunk-QFYLJVJW.js";import{b as Cu,c as kt}from"./chunk-ZGASBRSQ.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-CX5CC6P5.js";import{a as Iu}from"./chunk-IGE4Y5SE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=ku;V.compact=Mu;V.uniqBy=Hu;V.last=Bu;V.sortBy=Uu;V.castArray=Wu;V.isProd=Vu;V.maxBy=Gu;V.sumBy=zu;V.capitalize=Ju;V.isTruthy=Ku;V.isNotFalsy=Xu;V.uniq=Yu;V.mapValues=Zu;V.mergeNestedObjects=ed;function ku(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Mu(n){return n.filter(e=>!!e)}function Hu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Bu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Uu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Wu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Vu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Gu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function zu(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ju(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Ku(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Xu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Yu(n){return[...new Set(n)].sort()}function Zu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function Qu(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function ed(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(Qu(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=sd;Ce.existsSync=od;var td=$("node:fs"),Bi=$("node:fs/promises"),nd=N(),id=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=id;var rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=rd;var Hi=class extends Map{set(e,t){return((0,nd.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function sd(n,e=!0){try{return await Zs(n,e)}catch{}}function od(n){return(0,td.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var ad=$("node:url"),Qs=we(),cd=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,cd.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new ad.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ld=Ge({});X.string=ld});var to=m((Db,ud)=>{ud.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var dd=$("node:fs"),fd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,dd.readFileSync)((0,fd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var hd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=md;Ne.setLogger=yd;Ne.clearLoggers=_d;var pd=hd(kt()),Gi="oclif";function jn(n=Gi){let e=(0,pd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function gd(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(gd(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function md(n){return(e,...t)=>no(n).debug(e,...t)}function yd(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function _d(){je.clear()}});var Mt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),wd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=wd;var bd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=bd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var vd=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||vd.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=Ed;var oo=Cu();function Ed(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var $d=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=Cd;pt.parseTheme=lo;var Ji=$d(Ve()),Od=so(),Pd=ao();function co(n){return Od.STANDARD_ANSI.includes(n)}function Cd(n,e){if(!n||!(0,Pd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?jd(t):lo(t)]).filter(([e,t])=>t))}function jd(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Id=An(Xs()),Ki=An(Ti()),Ld=An(Di()),Ad=An(fe()),xd=ht(),Sd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?Ad.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Ht=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Id.default)(super.stack,{pretty:!0})}render(){if(Sd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ld.default)(e,xd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Ht;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Ht||(Te.CLIError=Ht={}))});var Sn=m(gt=>{"use strict";u();var po=gt&>.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Rd;gt.default=Dd;var xn=po(Ti()),qd=po(Di()),Fd=ht(),ho=Ie();function Rd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Nd=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
|
|
1
|
+
import{a as Cn}from"./chunk-AAK376RT.js";import{a as ku}from"./chunk-P2OI2P2M.js";import{a as Pn}from"./chunk-EVQPYZ7F.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,b as Cu,c as ju,e as Xs,f as Ti,g as Iu,h as Di,i as Ve,j as Au,k as xu,l as Su,m as qu,n as Fu,o as Ru,p as Nu,q as Tu,r as Du}from"./chunk-S4KNPCW3.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-O472FAYX.js";import{a as Lu}from"./chunk-IGE4Y5SE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=Mu;V.compact=Hu;V.uniqBy=Bu;V.last=Uu;V.sortBy=Wu;V.castArray=Vu;V.isProd=Gu;V.maxBy=zu;V.sumBy=Ju;V.capitalize=Ku;V.isTruthy=Xu;V.isNotFalsy=Yu;V.uniq=Zu;V.mapValues=Qu;V.mergeNestedObjects=td;function Mu(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Hu(n){return n.filter(e=>!!e)}function Bu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Uu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Wu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Vu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Gu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function zu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function Ju(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ku(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Xu(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Yu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Zu(n){return[...new Set(n)].sort()}function Qu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function ed(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function td(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(ed(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=od;Ce.existsSync=ad;var nd=$("node:fs"),Bi=$("node:fs/promises"),id=N(),rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=rd;var sd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=sd;var Hi=class extends Map{set(e,t){return((0,id.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function od(n,e=!0){try{return await Zs(n,e)}catch{}}function ad(n){return(0,nd.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var cd=$("node:url"),Qs=we(),ld=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,ld.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new cd.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ud=Ge({});X.string=ud});var to=m((kb,dd)=>{dd.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var fd=$("node:fs"),hd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,fd.readFileSync)((0,hd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var pd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=yd;Ne.setLogger=_d;Ne.clearLoggers=wd;var gd=pd(ju()),Gi="oclif";function jn(n=Gi){let e=(0,gd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function md(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(md(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function yd(n){return(e,...t)=>no(n).debug(e,...t)}function _d(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function wd(){je.clear()}});var kt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),bd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=bd;var vd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=vd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var Ed=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Ed.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=$d;var oo=Cu();function $d(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var Od=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=jd;pt.parseTheme=lo;var Ji=Od(Ve()),Pd=so(),Cd=ao();function co(n){return Pd.STANDARD_ANSI.includes(n)}function jd(n,e){if(!n||!(0,Cd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?Id(t):lo(t)]).filter(([e,t])=>t))}function Id(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Ld=An(Xs()),Ki=An(Ti()),Ad=An(Di()),xd=An(fe()),Sd=ht(),qd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?xd.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Mt=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Ld.default)(super.stack,{pretty:!0})}render(){if(qd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ad.default)(e,Sd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Mt;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Mt||(Te.CLIError=Mt={}))});var Sn=m(gt=>{"use strict";u();var po=gt&>.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Nd;gt.default=kd;var xn=po(Ti()),Fd=po(Di()),Rd=ht(),ho=Ie();function Nd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Td=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
|
|
2
2
|
`);return`${e}
|
|
3
|
-
${(0,xn.default)(t,2)}`};function
|
|
4
|
-
`),g=`${i?"Caused by: ":""}${y}`;g=(0,
|
|
5
|
-
`)}});var mt=m(be=>{"use strict";u();var kd=be&&be.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Md=be&&be.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Hd=be&&be.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&kd(t,e,i[r]);return Md(t,e),t}})();Object.defineProperty(be,"__esModule",{value:!0});be.error=yo;var Bd=Q(),Ud=Mt(),go=ze(),mo=Hd(Sn());function yo(n,e={}){let t;if(typeof n=="string")t=new go.CLIError(n,e);else if(n instanceof Error)t=(0,go.addOclifExitCode)(n,e);else throw new TypeError("first argument must be a string or instance of Error");if(t=(0,mo.applyPrettyPrintOptions)(t,e),e.exit===!1){let i=(0,mo.default)(t);i&&(0,Ud.stderr)(i),t?.stack&&(0,Bd.getLogger)().error(t.stack)}else throw t}be.default=yo});var Fn=m(qn=>{"use strict";u();Object.defineProperty(qn,"__esModule",{value:!0});qn.ExitError=void 0;var Wd=ze(),Xi=class extends Wd.CLIError{code="EEXIT";constructor(e=1){super(`EEXIT: ${e}`,{exit:e})}render(){return""}};qn.ExitError=Xi});var Zi=m(Rn=>{"use strict";u();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ModuleLoadError=void 0;var Vd=ze(),Yi=class extends Vd.CLIError{code="MODULE_NOT_FOUND";constructor(e){super(`[MODULE_NOT_FOUND] ${e}`,{exit:1}),this.name="ModuleLoadError"}};Rn.ModuleLoadError=Yi});var Nn=m(Qi=>{"use strict";u();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.exit=zd;var Gd=Fn();function zd(n=0){throw new Gd.ExitError(n)}});var yt=m(Je=>{"use strict";u();var Jd=Je&&Je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Je,"__esModule",{value:!0});Je.warn=er;Je.memoizedWarn=Zd;var Kd=Q(),Xd=Mt(),_o=ze(),Yd=Jd(Sn());function er(n){let e;if(typeof n=="string")e=new _o.CLIError.Warn(n);else if(n instanceof Error)e=(0,_o.addOclifExitCode)(n);else throw new TypeError("first argument must be a string or instance of Error");let t=(0,Yd.default)(e);t&&(0,Xd.stderr)(t),e?.stack&&(0,Kd.getLogger)().error(e.stack)}var wo=new Set;function Zd(n){wo.has(n)||er(n),wo.add(n)}Je.default=er});var Po=m(tr=>{"use strict";u();Object.defineProperty(tr,"__esModule",{value:!0});tr.readTSConfig=nf;var bo=$("node:fs/promises"),$o=$("node:path"),Qd=yt(),ef=Q(),vo=N(),tf=(0,ef.makeDebug)("read-tsconfig");function Eo(n,e){try{return $.resolve(e,{paths:[n]})}catch{}}async function Oo(n,e){let t;try{t=await e(n)}catch{t=!1}if(t)return n;let i=(0,$o.dirname)(n);if(i!==n)return Oo(i,e)}async function nf(n,e="tsconfig.json"){let t=[],i;try{i=Iu()}catch{try{i=$(n+"/node_modules/typescript")}catch{}}if(!i){(0,Qd.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let r=async s=>{let o=await Oo(s,async a=>(await(0,bo.readdir)(a)).includes("package.json"));if(o)try{let a=await(0,bo.readFile)(s,"utf8"),l=i?.parseConfigFileTextToJson(s,a).config;if(t.push(l),l.extends){if(l.extends.startsWith(".")){let f=Eo(o,l.extends);return f?r(f):void 0}let d=Eo(o,l.extends);if(d)return r(d)}return l}catch(a){tf(a)}};return await r((0,$o.join)(n,e)),{compilerOptions:(0,vo.mergeNestedObjects)(t,"compilerOptions"),"ts-node":(0,vo.mergeNestedObjects)(t,"ts-node")}}});var _t=m(Ke=>{"use strict";u();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.collectUsableIds=void 0;Ke.makeDebug=sf;Ke.getPermutations=nr;Ke.getCommandIdPermutations=of;var rf=Q();function sf(...n){return(e,...t)=>(0,rf.getLogger)(["config",...n].join(":")).debug(e,...t)}function nr(n){if(n.length===0)return[];if(n.length===1)return[n];let e=[],t=nr(n.slice(1)),i=n[0];for(let r=0,s=t.length;r<s;r++){let o=t[r];for(let a=0,l=o.length;a<=l;a++){let d=o.slice(0,a),f=o.slice(a),c=[...d,i,...f];e.push(c)}}return e}function of(n){return nr(n.split(":")).flatMap(e=>e.join(":"))}var af=n=>new Set(n.flatMap(e=>e.split(":").map((t,i,r)=>r.slice(0,i+1).join(":"))));Ke.collectUsableIds=af});var wt=m(he=>{"use strict";u();var cf=he&&he.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(he,"__esModule",{value:!0});he.TS_CONFIGS=void 0;he.tsPath=Ef;var Co=$("node:fs/promises"),ee=$("node:path"),lf=$("node:url"),uf=cf(fe()),Bt=yt(),jo=Ie(),df=we(),ff=Po(),ir=N(),hf=_t(),L=(0,hf.makeDebug)("ts-path");he.TS_CONFIGS={};var Tn=new Set;function pf(){return process.execPath.split(ee.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(ee.sep).includes("ts-node")||process.execArgv[0].split(ee.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(ee.sep).includes("tsx")?"tsx":"node"}var rr=pf();function gf(n){return"code"in n&&n.code==="ENOENT"}async function mf(n){try{if(he.TS_CONFIGS[n])return he.TS_CONFIGS[n];let e=await(0,ff.readTSConfig)(n);return e?(L("tsconfig: %O",e),he.TS_CONFIGS[n]=e,he.TS_CONFIGS[n]):void 0}catch(e){if(gf(e))return;L(`Could not parse tsconfig.json. Skipping typescript path lookup for ${n}.`),(0,Bt.memoizedWarn)(`Could not parse tsconfig.json for ${n}. Falling back to compiled source.`)}}async function yf(n,e){if(!Tn.has(n))try{let t=e==="module"?"tsx/esm/api":"tsx/cjs/api",i=$.resolve(t,{paths:[n]});if(!i)return;L("registering tsx at",n),L("tsx path:",i);let{href:r}=(0,lf.pathToFileURL)(i);L("tsx href:",r);let{register:s}=await import(r);L("Successfully imported tsx"),s(),Tn.add(n)}catch(t){L(`Could not find tsx. Skipping tsx registration for ${n}.`),L(t)}}async function _f(n,e){if(Tn.has(n))return;L("registering ts-node at",n);let t=$.resolve("ts-node",{paths:[n,__dirname]});L("ts-node path:",t);let i;try{i=$(t),L("Successfully required ts-node")}catch(f){L(`Could not find ts-node at ${t}. Skipping ts-node registration for ${n}.`),L(f),(0,Bt.memoizedWarn)(`Could not find ts-node at ${t}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let r=[(0,ee.join)(n,"node_modules","@types")],s=[];if(e.compilerOptions.rootDirs)for(let f of e.compilerOptions.rootDirs)s.push((0,ee.join)(n,f));else e.compilerOptions.rootDir?s.push((0,ee.join)(n,e.compilerOptions.rootDir)):e.compilerOptions.baseUrl?s.push((0,ee.join)(n,e.compilerOptions.baseUrl)):s.push((0,ee.join)(n,"src"));let{baseUrl:o,rootDir:a,...l}=e.compilerOptions,d={compilerOptions:{...l,rootDirs:s,typeRoots:r},...e["ts-node"],cwd:n,esm:e["ts-node"]?.esm??!0,experimentalSpecifierResolution:e["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:n,skipProject:!0,transpileOnly:!0};L("ts-node options: %O",d),i.register(d),Tn.add(n)}function wf(n,e,t){return(t||n?.moduleType==="commonjs")&&e?.moduleType==="module"&&!e?.pjson.devDependencies?.tsx}function bf(n,e,t){if(e?.moduleType!=="module"||t)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return rr==="ts-node"&&i>=20}async function vf(n,e,t){let i=await mf(n);if(!i)return e;L(`Determining path for ${e}`),rr==="bun"?L(`Skipping ts-node registration for ${n} because the runtime is: ${rr}`):(await yf(n,t?.moduleType),await _f(n,i));let{baseUrl:r,outDir:s,rootDir:o,rootDirs:a}=i.compilerOptions,l=o??(a??[])[0]??r;if(!l)return L(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${e}`),e;if(!s)return L(`no outDir specified in tsconfig.json. Returning default path ${e}`),e;let d=(0,ee.join)(n,s),f=(0,ee.join)(n,l),c=(0,ee.relative)(d,e),p=(0,ee.join)(f,c).replace(/\.js$/,"");return L(`lib dir: ${d}`),L(`src dir: ${f}`),L(`src directory to find: ${p}`),(0,df.existsSync)(p)?(L(`Found source directory for ${e} at ${p}`),p):(await Promise.all([(0,Co.access)(`${p}.ts`).then(()=>`${p}.ts`).catch(()=>!1),(0,Co.access)(`${p}.tsx`).then(()=>`${p}.tsx`).catch(()=>!1)])).some(Boolean)?(L(`Found source file for ${e} at ${p}`),p):(L(`No source file found. Returning default path ${e}`),(0,ir.isProd)()||(0,Bt.memoizedWarn)(`Could not find source for ${e} based on tsconfig. Defaulting to compiled source.`),e)}async function Ef(n,e,t){let i=t?.options.isRoot?t:uf.default.getInstance().get("rootPlugin");if(!e)return e;e=e.startsWith(n)?e:(0,ee.join)(n,e);let r=jo.settings.enableAutoTranspile??jo.settings.tsnodeEnabled;if(r===!1)return L(`Skipping typescript path lookup for ${n} because enableAutoTranspile is explicitly set to false`),e;let s=(0,ir.isProd)();if(r===void 0&&s&&t?.type!=="link")return L(`Skipping typescript path lookup for ${n} because NODE_ENV is NOT "test" or "development"`),e;if(wf(i,t,s)){L(`Skipping typescript path lookup for ${n} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`);let o=process.env.OCLIF_DISABLE_LINKED_ESM_WARNING&&(0,ir.isTruthy)(process.env.OCLIF_DISABLE_LINKED_ESM_WARNING);return t?.type==="link"&&!o&&(0,Bt.memoizedWarn)(`${t?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),e}if(bf(n,t,s))return L(`Skipping typescript path lookup for ${n} because ts-node is run in node version ${process.version}"`),(0,Bt.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),e;try{return await vf(n,e,t)}catch(o){return L(o),e}}});var Ut=m(bt=>{"use strict";u();Object.defineProperty(bt,"__esModule",{value:!0});bt.load=jf;bt.loadWithData=If;bt.loadWithDataFromManifest=Lf;bt.isPathModule=or;var $f=Lu(),Of=$("node:fs"),Dn=$("node:path"),ar=$("node:url"),Io=wt(),sr=Zi(),Ao=we(),Pf=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],Cf=n=>n.type!==void 0;function cr(n,e,t){throw n.code==="MODULE_NOT_FOUND"||n.code==="ERR_MODULE_NOT_FOUND"?new sr.ModuleLoadError(`${e?"import()":"require"} failed to load ${t}: ${n.message}`):n}async function jf(n,e){let t,i;try{return{filePath:t,isESM:i}=await xo(n,e),i?await import((0,ar.pathToFileURL)(t).href):$(t)}catch(r){cr(r,i,t??e)}}async function If(n,e){let t,i;try{({filePath:t,isESM:i}=await xo(n,e));let r=i?await import((0,ar.pathToFileURL)(t).href):$(t);return{filePath:t,isESM:i,module:r}}catch(r){cr(r,i,t??e)}}async function Lf(n,e){let{id:t,isESM:i,relativePath:r}=n;if(!r)throw new sr.ModuleLoadError(`Cached command ${t} does not have a relative path`);if(i===void 0)throw new sr.ModuleLoadError(`Cached command ${t} does not have the isESM property set`);let s=(0,Dn.join)(e,r.join(Dn.sep));try{let o=i?await import((0,ar.pathToFileURL)(s).href):$(s);return{filePath:s,isESM:i,module:o}}catch(o){cr(o,i,s??e)}}function or(n){switch((0,Dn.extname)(n).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return $f.sync(n)==="module";case".mjs":case".mts":return!0;default:return!1}}async function xo(n,e){let t,i;try{i=$.resolve(e),t=or(i)}catch{i=(Cf(n)?await(0,Io.tsPath)(n.root,e,n):await(0,Io.tsPath)(n.root,e))??e;let r=!1,s=!1;if((0,Ao.existsSync)(i)){r=!0;try{(0,Of.lstatSync)(i)?.isDirectory?.()&&(r=!1,s=!0)}catch{}}if(!r){let o=Lo(i);!o&&s&&(o=Lo((0,Dn.join)(i,"index"))),o&&(i=o)}t=or(i)}return{filePath:i,isESM:t}}function Lo(n){for(let e of Pf){let t=`${n}${e}`;if((0,Ao.existsSync)(t))return t}return null}});var Mn=m(kn=>{"use strict";u();Object.defineProperty(kn,"__esModule",{value:!0});kn.SINGLE_COMMAND_CLI_SYMBOL=void 0;kn.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var lr=m(Hn=>{"use strict";u();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.cacheDefaultValue=void 0;var Af=async(n,e)=>{if(!(e&&n.noCacheDefault)){if(typeof n.defaultHelp=="function")try{return await n.defaultHelp({flags:{},options:n})}catch{return}if(typeof n.default=="function")try{return await n.default({flags:{},options:n})}catch{}else return n.default}};Hn.cacheDefaultValue=Af});var Xe=m(Bn=>{"use strict";u();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.toStandardizedId=xf;Bn.toConfiguredId=Sf;function xf(n,e){return n.replaceAll(new RegExp(e.topicSeparator,"g"),":")}function Sf(n,e){return n.replaceAll(new RegExp(":","g"),e.topicSeparator||":")}});var dr=m(Un=>{"use strict";u();Object.defineProperty(Un,"__esModule",{value:!0});Un.ActionBase=void 0;var So=$("node:util"),qo=N(),ur=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get globals(){globalThis.ux=globalThis.ux||{};let e=globalThis.ux;return e.action=e.action||{},e}get output(){return this.globals.output}set output(e){this.globals.output=e}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(e){let{task:t}=this;t&&t.status!==e&&(this._updateStatus(e,t.status),t.status=e)}get task(){return this.globals.action.task}set task(e){this.globals.action.task=e}_flushStdout(){try{let e="",t;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();t=i[0],this._write(t,i[1]),e+=i[1][0].toString("utf8")}e&&t&&e.at(-1)!==`
|
|
3
|
+
${(0,xn.default)(t,2)}`};function Dd(n){return!!n&&"name"in n&&"message"in n}function kd(n){let e=[],t=n,i=!1;for(;Dd(t);){if(ho.settings.debug&&t.stack)e.push(`${i?"Caused by: ":""}${t.stack}`);else{let{bang:r,code:s,message:o,name:a,ref:l,suggestions:d}=t,f=o?`${a||"Error"}: ${o}`:void 0,c=s?`Code: ${s}`:void 0,p=Td(d),h=l?`Reference: ${l}`:void 0,y=[f,c,p,h].filter(Boolean).join(`
|
|
4
|
+
`),g=`${i?"Caused by: ":""}${y}`;g=(0,Fd.default)(g,Rd.errtermwidth-6,{hard:!0,trim:!1}),ho.settings.debug||(g=(0,xn.default)(g,3),g=(0,xn.default)(g,1,{includeEmptyLines:!0,indent:r||""}),g=(0,xn.default)(g,1)),e.push(g)}i=!0,t=t.cause??null}return e.join(`
|
|
5
|
+
`)}});var mt=m(be=>{"use strict";u();var Md=be&&be.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Hd=be&&be.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Bd=be&&be.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&Md(t,e,i[r]);return Hd(t,e),t}})();Object.defineProperty(be,"__esModule",{value:!0});be.error=yo;var Ud=Q(),Wd=kt(),go=ze(),mo=Bd(Sn());function yo(n,e={}){let t;if(typeof n=="string")t=new go.CLIError(n,e);else if(n instanceof Error)t=(0,go.addOclifExitCode)(n,e);else throw new TypeError("first argument must be a string or instance of Error");if(t=(0,mo.applyPrettyPrintOptions)(t,e),e.exit===!1){let i=(0,mo.default)(t);i&&(0,Wd.stderr)(i),t?.stack&&(0,Ud.getLogger)().error(t.stack)}else throw t}be.default=yo});var Fn=m(qn=>{"use strict";u();Object.defineProperty(qn,"__esModule",{value:!0});qn.ExitError=void 0;var Vd=ze(),Xi=class extends Vd.CLIError{code="EEXIT";constructor(e=1){super(`EEXIT: ${e}`,{exit:e})}render(){return""}};qn.ExitError=Xi});var Zi=m(Rn=>{"use strict";u();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ModuleLoadError=void 0;var Gd=ze(),Yi=class extends Gd.CLIError{code="MODULE_NOT_FOUND";constructor(e){super(`[MODULE_NOT_FOUND] ${e}`,{exit:1}),this.name="ModuleLoadError"}};Rn.ModuleLoadError=Yi});var Nn=m(Qi=>{"use strict";u();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.exit=Jd;var zd=Fn();function Jd(n=0){throw new zd.ExitError(n)}});var yt=m(Je=>{"use strict";u();var Kd=Je&&Je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Je,"__esModule",{value:!0});Je.warn=er;Je.memoizedWarn=Qd;var Xd=Q(),Yd=kt(),_o=ze(),Zd=Kd(Sn());function er(n){let e;if(typeof n=="string")e=new _o.CLIError.Warn(n);else if(n instanceof Error)e=(0,_o.addOclifExitCode)(n);else throw new TypeError("first argument must be a string or instance of Error");let t=(0,Zd.default)(e);t&&(0,Yd.stderr)(t),e?.stack&&(0,Xd.getLogger)().error(e.stack)}var wo=new Set;function Qd(n){wo.has(n)||er(n),wo.add(n)}Je.default=er});var Po=m(tr=>{"use strict";u();Object.defineProperty(tr,"__esModule",{value:!0});tr.readTSConfig=rf;var bo=$("node:fs/promises"),$o=$("node:path"),ef=yt(),tf=Q(),vo=N(),nf=(0,tf.makeDebug)("read-tsconfig");function Eo(n,e){try{return $.resolve(e,{paths:[n]})}catch{}}async function Oo(n,e){let t;try{t=await e(n)}catch{t=!1}if(t)return n;let i=(0,$o.dirname)(n);if(i!==n)return Oo(i,e)}async function rf(n,e="tsconfig.json"){let t=[],i;try{i=Lu()}catch{try{i=$(n+"/node_modules/typescript")}catch{}}if(!i){(0,ef.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let r=async s=>{let o=await Oo(s,async a=>(await(0,bo.readdir)(a)).includes("package.json"));if(o)try{let a=await(0,bo.readFile)(s,"utf8"),l=i?.parseConfigFileTextToJson(s,a).config;if(t.push(l),l.extends){if(l.extends.startsWith(".")){let f=Eo(o,l.extends);return f?r(f):void 0}let d=Eo(o,l.extends);if(d)return r(d)}return l}catch(a){nf(a)}};return await r((0,$o.join)(n,e)),{compilerOptions:(0,vo.mergeNestedObjects)(t,"compilerOptions"),"ts-node":(0,vo.mergeNestedObjects)(t,"ts-node")}}});var _t=m(Ke=>{"use strict";u();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.collectUsableIds=void 0;Ke.makeDebug=of;Ke.getPermutations=nr;Ke.getCommandIdPermutations=af;var sf=Q();function of(...n){return(e,...t)=>(0,sf.getLogger)(["config",...n].join(":")).debug(e,...t)}function nr(n){if(n.length===0)return[];if(n.length===1)return[n];let e=[],t=nr(n.slice(1)),i=n[0];for(let r=0,s=t.length;r<s;r++){let o=t[r];for(let a=0,l=o.length;a<=l;a++){let d=o.slice(0,a),f=o.slice(a),c=[...d,i,...f];e.push(c)}}return e}function af(n){return nr(n.split(":")).flatMap(e=>e.join(":"))}var cf=n=>new Set(n.flatMap(e=>e.split(":").map((t,i,r)=>r.slice(0,i+1).join(":"))));Ke.collectUsableIds=cf});var wt=m(he=>{"use strict";u();var lf=he&&he.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(he,"__esModule",{value:!0});he.TS_CONFIGS=void 0;he.tsPath=$f;var Co=$("node:fs/promises"),ee=$("node:path"),uf=$("node:url"),df=lf(fe()),Ht=yt(),jo=Ie(),ff=we(),hf=Po(),ir=N(),pf=_t(),L=(0,pf.makeDebug)("ts-path");he.TS_CONFIGS={};var Tn=new Set;function gf(){return process.execPath.split(ee.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(ee.sep).includes("ts-node")||process.execArgv[0].split(ee.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(ee.sep).includes("tsx")?"tsx":"node"}var rr=gf();function mf(n){return"code"in n&&n.code==="ENOENT"}async function yf(n){try{if(he.TS_CONFIGS[n])return he.TS_CONFIGS[n];let e=await(0,hf.readTSConfig)(n);return e?(L("tsconfig: %O",e),he.TS_CONFIGS[n]=e,he.TS_CONFIGS[n]):void 0}catch(e){if(mf(e))return;L(`Could not parse tsconfig.json. Skipping typescript path lookup for ${n}.`),(0,Ht.memoizedWarn)(`Could not parse tsconfig.json for ${n}. Falling back to compiled source.`)}}async function _f(n,e){if(!Tn.has(n))try{let t=e==="module"?"tsx/esm/api":"tsx/cjs/api",i=$.resolve(t,{paths:[n]});if(!i)return;L("registering tsx at",n),L("tsx path:",i);let{href:r}=(0,uf.pathToFileURL)(i);L("tsx href:",r);let{register:s}=await import(r);L("Successfully imported tsx"),s(),Tn.add(n)}catch(t){L(`Could not find tsx. Skipping tsx registration for ${n}.`),L(t)}}async function wf(n,e){if(Tn.has(n))return;L("registering ts-node at",n);let t=$.resolve("ts-node",{paths:[n,__dirname]});L("ts-node path:",t);let i;try{i=$(t),L("Successfully required ts-node")}catch(f){L(`Could not find ts-node at ${t}. Skipping ts-node registration for ${n}.`),L(f),(0,Ht.memoizedWarn)(`Could not find ts-node at ${t}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let r=[(0,ee.join)(n,"node_modules","@types")],s=[];if(e.compilerOptions.rootDirs)for(let f of e.compilerOptions.rootDirs)s.push((0,ee.join)(n,f));else e.compilerOptions.rootDir?s.push((0,ee.join)(n,e.compilerOptions.rootDir)):e.compilerOptions.baseUrl?s.push((0,ee.join)(n,e.compilerOptions.baseUrl)):s.push((0,ee.join)(n,"src"));let{baseUrl:o,rootDir:a,...l}=e.compilerOptions,d={compilerOptions:{...l,rootDirs:s,typeRoots:r},...e["ts-node"],cwd:n,esm:e["ts-node"]?.esm??!0,experimentalSpecifierResolution:e["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:n,skipProject:!0,transpileOnly:!0};L("ts-node options: %O",d),i.register(d),Tn.add(n)}function bf(n,e,t){return(t||n?.moduleType==="commonjs")&&e?.moduleType==="module"&&!e?.pjson.devDependencies?.tsx}function vf(n,e,t){if(e?.moduleType!=="module"||t)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return rr==="ts-node"&&i>=20}async function Ef(n,e,t){let i=await yf(n);if(!i)return e;L(`Determining path for ${e}`),rr==="bun"?L(`Skipping ts-node registration for ${n} because the runtime is: ${rr}`):(await _f(n,t?.moduleType),await wf(n,i));let{baseUrl:r,outDir:s,rootDir:o,rootDirs:a}=i.compilerOptions,l=o??(a??[])[0]??r;if(!l)return L(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${e}`),e;if(!s)return L(`no outDir specified in tsconfig.json. Returning default path ${e}`),e;let d=(0,ee.join)(n,s),f=(0,ee.join)(n,l),c=(0,ee.relative)(d,e),p=(0,ee.join)(f,c).replace(/\.js$/,"");return L(`lib dir: ${d}`),L(`src dir: ${f}`),L(`src directory to find: ${p}`),(0,ff.existsSync)(p)?(L(`Found source directory for ${e} at ${p}`),p):(await Promise.all([(0,Co.access)(`${p}.ts`).then(()=>`${p}.ts`).catch(()=>!1),(0,Co.access)(`${p}.tsx`).then(()=>`${p}.tsx`).catch(()=>!1)])).some(Boolean)?(L(`Found source file for ${e} at ${p}`),p):(L(`No source file found. Returning default path ${e}`),(0,ir.isProd)()||(0,Ht.memoizedWarn)(`Could not find source for ${e} based on tsconfig. Defaulting to compiled source.`),e)}async function $f(n,e,t){let i=t?.options.isRoot?t:df.default.getInstance().get("rootPlugin");if(!e)return e;e=e.startsWith(n)?e:(0,ee.join)(n,e);let r=jo.settings.enableAutoTranspile??jo.settings.tsnodeEnabled;if(r===!1)return L(`Skipping typescript path lookup for ${n} because enableAutoTranspile is explicitly set to false`),e;let s=(0,ir.isProd)();if(r===void 0&&s&&t?.type!=="link")return L(`Skipping typescript path lookup for ${n} because NODE_ENV is NOT "test" or "development"`),e;if(bf(i,t,s)){L(`Skipping typescript path lookup for ${n} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`);let o=process.env.OCLIF_DISABLE_LINKED_ESM_WARNING&&(0,ir.isTruthy)(process.env.OCLIF_DISABLE_LINKED_ESM_WARNING);return t?.type==="link"&&!o&&(0,Ht.memoizedWarn)(`${t?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),e}if(vf(n,t,s))return L(`Skipping typescript path lookup for ${n} because ts-node is run in node version ${process.version}"`),(0,Ht.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),e;try{return await Ef(n,e,t)}catch(o){return L(o),e}}});var Bt=m(bt=>{"use strict";u();Object.defineProperty(bt,"__esModule",{value:!0});bt.load=If;bt.loadWithData=Lf;bt.loadWithDataFromManifest=Af;bt.isPathModule=or;var Of=Au(),Pf=$("node:fs"),Dn=$("node:path"),ar=$("node:url"),Io=wt(),sr=Zi(),Ao=we(),Cf=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],jf=n=>n.type!==void 0;function cr(n,e,t){throw n.code==="MODULE_NOT_FOUND"||n.code==="ERR_MODULE_NOT_FOUND"?new sr.ModuleLoadError(`${e?"import()":"require"} failed to load ${t}: ${n.message}`):n}async function If(n,e){let t,i;try{return{filePath:t,isESM:i}=await xo(n,e),i?await import((0,ar.pathToFileURL)(t).href):$(t)}catch(r){cr(r,i,t??e)}}async function Lf(n,e){let t,i;try{({filePath:t,isESM:i}=await xo(n,e));let r=i?await import((0,ar.pathToFileURL)(t).href):$(t);return{filePath:t,isESM:i,module:r}}catch(r){cr(r,i,t??e)}}async function Af(n,e){let{id:t,isESM:i,relativePath:r}=n;if(!r)throw new sr.ModuleLoadError(`Cached command ${t} does not have a relative path`);if(i===void 0)throw new sr.ModuleLoadError(`Cached command ${t} does not have the isESM property set`);let s=(0,Dn.join)(e,r.join(Dn.sep));try{let o=i?await import((0,ar.pathToFileURL)(s).href):$(s);return{filePath:s,isESM:i,module:o}}catch(o){cr(o,i,s??e)}}function or(n){switch((0,Dn.extname)(n).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return Of.sync(n)==="module";case".mjs":case".mts":return!0;default:return!1}}async function xo(n,e){let t,i;try{i=$.resolve(e),t=or(i)}catch{i=(jf(n)?await(0,Io.tsPath)(n.root,e,n):await(0,Io.tsPath)(n.root,e))??e;let r=!1,s=!1;if((0,Ao.existsSync)(i)){r=!0;try{(0,Pf.lstatSync)(i)?.isDirectory?.()&&(r=!1,s=!0)}catch{}}if(!r){let o=Lo(i);!o&&s&&(o=Lo((0,Dn.join)(i,"index"))),o&&(i=o)}t=or(i)}return{filePath:i,isESM:t}}function Lo(n){for(let e of Cf){let t=`${n}${e}`;if((0,Ao.existsSync)(t))return t}return null}});var Mn=m(kn=>{"use strict";u();Object.defineProperty(kn,"__esModule",{value:!0});kn.SINGLE_COMMAND_CLI_SYMBOL=void 0;kn.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var lr=m(Hn=>{"use strict";u();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.cacheDefaultValue=void 0;var xf=async(n,e)=>{if(!(e&&n.noCacheDefault)){if(typeof n.defaultHelp=="function")try{return await n.defaultHelp({flags:{},options:n})}catch{return}if(typeof n.default=="function")try{return await n.default({flags:{},options:n})}catch{}else return n.default}};Hn.cacheDefaultValue=xf});var Xe=m(Bn=>{"use strict";u();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.toStandardizedId=Sf;Bn.toConfiguredId=qf;function Sf(n,e){return n.replaceAll(new RegExp(e.topicSeparator,"g"),":")}function qf(n,e){return n.replaceAll(new RegExp(":","g"),e.topicSeparator||":")}});var dr=m(Un=>{"use strict";u();Object.defineProperty(Un,"__esModule",{value:!0});Un.ActionBase=void 0;var So=$("node:util"),qo=N(),ur=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get globals(){globalThis.ux=globalThis.ux||{};let e=globalThis.ux;return e.action=e.action||{},e}get output(){return this.globals.output}set output(e){this.globals.output=e}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(e){let{task:t}=this;t&&t.status!==e&&(this._updateStatus(e,t.status),t.status=e)}get task(){return this.globals.action.task}set task(e){this.globals.action.task=e}_flushStdout(){try{let e="",t;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();t=i[0],this._write(t,i[1]),e+=i[1][0].toString("utf8")}e&&t&&e.at(-1)!==`
|
|
6
6
|
`&&this._write(t,`
|
|
7
|
-
`)}catch(e){this._write("stderr",(0,So.inspect)(e))}}_pause(e){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(e){throw new Error("not implemented")}_stdout(e){try{if(e){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...t)=>(this.stdmocks.push(["stdout",t]),!0),process.stderr.write=(...t)=>(this.stdmocks.push(["stderr",t]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(t){this._write("stderr",(0,So.inspect)(t))}}_stop(e){throw new Error("not implemented")}_updateStatus(e,t){}_write(e,t){switch(e){case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,qo.castArray)(t));break}case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,qo.castArray)(t));break}default:throw new Error(`invalid std: ${e}`)}}pause(e,t){let{task:i}=this,r=i&&i.active;i&&r&&(this._pause(t),this._stdout(!1),i.active=!1);let s=e();return i&&r&&this._resume(),s}async pauseAsync(e,t){let{task:i}=this,r=i&&i.active;i&&r&&(this._pause(t),this._stdout(!1),i.active=!1);let s=await e();return i&&r&&this._resume(),s}start(e,t,i={}){this.std=i.stdout?"stdout":"stderr";let r={action:e,active:!!(this.task&&this.task.active),status:t};this.task=r,this._start(i),r.active=!0,this._stdout(!0)}stop(e="done"){let{task:t}=this;t&&(this._stop(e),t.active=!1,this.task=void 0,this._stdout(!1))}};Un.ActionBase=ur});var Fo=m(hr=>{"use strict";u();Object.defineProperty(hr,"__esModule",{value:!0});var
|
|
8
|
-
`),this._flushStdout()}_render(e,t){this.task&&(this.task.active&&this._flush(),this._write(this.std,t?`${e}... ${t}`:`${e}...`))}};hr.default=fr});var No=m(
|
|
9
|
-
`).map(t=>Math.ceil(t.length/
|
|
10
|
-
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let e=this._lines(this.output);this._write(this.std,pr.cursorLeft+pr.cursorUp(e)+pr.eraseDown),this.output=void 0}getFrames(e){return e?.style?Ro.default[e.style].frames:Ro.default[process.platform==="win32"?"line":"dots2"].frames}};
|
|
7
|
+
`)}catch(e){this._write("stderr",(0,So.inspect)(e))}}_pause(e){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(e){throw new Error("not implemented")}_stdout(e){try{if(e){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...t)=>(this.stdmocks.push(["stdout",t]),!0),process.stderr.write=(...t)=>(this.stdmocks.push(["stderr",t]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(t){this._write("stderr",(0,So.inspect)(t))}}_stop(e){throw new Error("not implemented")}_updateStatus(e,t){}_write(e,t){switch(e){case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,qo.castArray)(t));break}case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,qo.castArray)(t));break}default:throw new Error(`invalid std: ${e}`)}}pause(e,t){let{task:i}=this,r=i&&i.active;i&&r&&(this._pause(t),this._stdout(!1),i.active=!1);let s=e();return i&&r&&this._resume(),s}async pauseAsync(e,t){let{task:i}=this,r=i&&i.active;i&&r&&(this._pause(t),this._stdout(!1),i.active=!1);let s=await e();return i&&r&&this._resume(),s}start(e,t,i={}){this.std=i.stdout?"stdout":"stderr";let r={action:e,active:!!(this.task&&this.task.active),status:t};this.task=r,this._start(i),r.active=!0,this._stdout(!0)}stop(e="done"){let{task:t}=this;t&&(this._stop(e),t.active=!1,this.task=void 0,this._stdout(!1))}};Un.ActionBase=ur});var Fo=m(hr=>{"use strict";u();Object.defineProperty(hr,"__esModule",{value:!0});var Ff=dr(),fr=class extends Ff.ActionBase{type="simple";_pause(e){e?this._updateStatus(e):this._flush()}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(e){this.task&&this._updateStatus(e,this.task.status,!0)}_updateStatus(e,t,i=!1){this.task&&(this.task.active&&!t?this._write(this.std,` ${e}`):this._write(this.std,`${this.task.action}... ${e}`),(i||!t)&&this._flush())}_flush(){this._write(this.std,`
|
|
8
|
+
`),this._flushStdout()}_render(e,t){this.task&&(this.task.active&&this._flush(),this._write(this.std,t?`${e}... ${t}`:`${e}...`))}};hr.default=fr});var No=m(Ut=>{"use strict";u();var mr=Ut&&Ut.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ut,"__esModule",{value:!0});var pr=xu(),Rf=mr(Ve()),Ro=mr(Su()),Nf=mr(fe()),Tf=ht(),Df=oe(),kf=dr(),gr=class extends kf.ActionBase{type="spinner";color="magenta";frameIndex;frames;spinner;constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let e=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,this.colorize(e)}_pause(e){this.spinner&&clearInterval(this.spinner),this._reset(),e&&this._render(` ${e}`),this.output=void 0}_start(e){this.color=Nf.default.getInstance().get("config")?.theme?.spinner??this.color,e.style&&(this.frames=this.getFrames(e)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(e){this.task&&(this.task.status=e),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}colorize(e){return(0,Df.colorize)(this.color,e)}_lines(e){return Rf.default.strip(e).split(`
|
|
9
|
+
`).map(t=>Math.ceil(t.length/Tf.errtermwidth)).reduce((t,i)=>t+i,0)}_render(e){if(!this.task)return;this._reset(),this._flushStdout();let t=e==="spinner"?` ${this._frame()}`:e||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${t}${i}
|
|
10
|
+
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let e=this._lines(this.output);this._write(this.std,pr.cursorLeft+pr.cursorUp(e)+pr.eraseDown),this.output=void 0}getFrames(e){return e?.style?Ro.default[e.style].frames:Ro.default[process.platform==="win32"?"line":"dots2"].frames}};Ut.default=gr});var yr=m(Wt=>{"use strict";u();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.stringifyInput=Do;Wt.tokenize=ko;Wt.default=Wf;var Mf=oe(),Hf=[{regex:/^\s+/,tokenType:"whitespace"},{regex:/^[{}]/,tokenType:"brace"},{regex:/^[[\]]/,tokenType:"bracket"},{regex:/^:/,tokenType:"colon"},{regex:/^,/,tokenType:"comma"},{regex:/^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?/i,tokenType:"number"},{regex:/^"(?:\\.|[^"\\])*"(?=\s*:)/,tokenType:"key"},{regex:/^"(?:\\.|[^"\\])*"/,tokenType:"string"},{regex:/^true|^false/,tokenType:"boolean"},{regex:/^null/,tokenType:"null"}];function To(n,e,t){return JSON.stringify(n,Bf(e,e),t)}function Bf(n,e){let t=[],i=[];return e||(e=function(r,s){return t[0]===s?"[Circular ~]":"[Circular ~."+i.slice(0,t.indexOf(s)).join(".")+"]"}),function(r,s){if(t.length>0){let o=t.indexOf(this);~o?t.splice(o+1):t.push(this),~o?i.splice(o,Number.POSITIVE_INFINITY,r):i.push(r),t.includes(s)&&(s=e.call(this,r,s))}else t.push(s);return n?n.call(this,r,s):s}}function Do(n,e){return e?.pretty?To(typeof n=="string"?JSON.parse(n):n,void 0,2):typeof n=="string"?n:To(n)}function ko(n,e){let t=Do(n,e),i=[],r=!1;do for(let s of Hf){let o=s.regex.exec(t);if(o){i.push({type:s.tokenType,value:o[0]}),t=t.slice(o[0].length),r=!0;break}}while(Uf(t,r));return i}function Uf(n,e){return(n?.length??0)>0&&e}function Wf(n,e){let t={...e,pretty:e?.pretty??!0};return ko(n,t).reduce((i,r)=>i+(0,Mf.colorize)(e?.theme?.[r.type],r.value),"")}});var Ye=m(S=>{"use strict";u();var Wn=S&&S.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(S,"__esModule",{value:!0});S.ux=S.action=S.stdout=S.stderr=S.colorize=S.colorizeJson=S.warn=S.exit=S.error=void 0;var Vf=mt(),Gf=Nn(),zf=yt(),Jf=Wn(Fo()),Kf=Wn(No()),Xf=Wn(yr()),Yf=oe(),Mo=kt(),Zf=mt();Object.defineProperty(S,"error",{enumerable:!0,get:function(){return Zf.error}});var Qf=Nn();Object.defineProperty(S,"exit",{enumerable:!0,get:function(){return Qf.exit}});var eh=yt();Object.defineProperty(S,"warn",{enumerable:!0,get:function(){return eh.warn}});var th=yr();Object.defineProperty(S,"colorizeJson",{enumerable:!0,get:function(){return Wn(th).default}});var nh=oe();Object.defineProperty(S,"colorize",{enumerable:!0,get:function(){return nh.colorize}});var Ho=kt();Object.defineProperty(S,"stderr",{enumerable:!0,get:function(){return Ho.stderr}});Object.defineProperty(S,"stdout",{enumerable:!0,get:function(){return Ho.stdout}});var ih=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple";S.action=ih==="spinner"?new Kf.default:new Jf.default;S.ux={action:S.action,colorize:Yf.colorize,colorizeJson:Xf.default,error:Vf.error,exit:Gf.exit,stderr:Mo.stderr,stdout:Mo.stdout,warn:zf.warn}});var Vn=m(_r=>{"use strict";u();Object.defineProperty(_r,"__esModule",{value:!0});_r.ensureArgObject=rh;function rh(n){return Array.isArray(n)?(n??[]).reduce((e,t)=>({...e,[t.name]:t}),{}):n??{}}});var Bo=m(Gn=>{"use strict";u();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.DocOpts=void 0;var sh=Vn(),wr=class n{cmd;flagList;flagMap;constructor(e){this.cmd=e,this.flagMap={},this.flagList=Object.entries(e.flags||{}).filter(([t,i])=>!i.hidden).map(([t,i])=>(this.flagMap[t]=i,i))}static formatUsageType(e,t,i){if(e.type!=="option")return"";let r;return e.helpValue?r=typeof e.helpValue=="string"?[e.helpValue]:e.helpValue:e.options?r=[i?e.options.join("|"):"<option>"]:t?r=[e.name]:r=["<value>"],r.map(s=>`${s}${e.multiple?"...":""}`).join(" ")}static generate(e){return new n(e).toString()}toString(){let e=["<%= command.id %>"];if(this.cmd.args){let t=Object.values((0,sh.ensureArgObject)(this.cmd.args)).filter(i=>!i.hidden).map(i=>{let r=i.multiple||this.cmd.strict===!1?"...":"";return i.required?`${i.name.toUpperCase()}${r}`:`[${i.name.toUpperCase()}${r}]`})||[];e.push(...t)}try{e.push(...Object.values(this.groupFlagElements()))}catch{e.push(...this.flagList.map(t=>{let i=t.char?`-${t.char}`:`--${t.name}`;return t.type==="boolean"?i:`${i}=${n.formatUsageType(t,!1,!0)}`}))}return e.join(" ")}combineElementsToFlag(e,t,i,r){if(!this.flagMap[t])return;let s=this.flagMap[t]?.required;(typeof s!="boolean"||!s)&&(s=i.reduce((o,a)=>o||this.flagMap[a]?.required||!1,!1));for(let o of i)e[t]=`${e[t]||""}${r}${e[o]||""}`,delete e[o],delete this.flagMap[o];e[t]=s?`(${e[t]||""})`:`[${e[t]||""}]`,delete this.flagMap[t]}generateElements(e={},t=[]){let i=[];for(let r of t){let s="",o=r.char?`-${r.char}`:`--${r.name}`;r.type==="option"&&(s=` ${n.formatUsageType(r,!1,!0)}`);let a=`${o}${s}`;e[r.name]=a,i.push(a)}return i}groupFlagElements(){let e={};this.generateElements(e,this.flagList.filter(t=>t.required)),this.generateElements(e,this.flagList.filter(t=>!t.required));for(let t of this.flagList){Array.isArray(t.dependsOn)&&this.combineElementsToFlag(e,t.name,t.dependsOn," ");let i;if(Array.isArray(t.exclusive)&&(i=new Set(t.exclusive)),Array.isArray(t.combinable)){let r=new Set(t.combinable);i??=new Set;for(let s of this.flagList)t!==s&&!r.has(s.name)&&i.add(s.name)}i!==void 0&&i.size>0&&this.combineElementsToFlag(e,t.name,[...i]," | ")}for(let t of Object.keys(this.flagMap)){let i=this.flagMap[t]||{};i.required||(e[i.name]=`[${e[i.name]||""}]`)}return e}};Gn.DocOpts=wr});var vt=m(te=>{"use strict";u();var oh=te&&te.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),ah=te&&te.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ch=te&&te.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&oh(t,e,i[r]);return ah(t,e),t}})();Object.defineProperty(te,"__esModule",{value:!0});te.template=fh;te.standardizeIDFromArgv=Uo;te.getHelpFlagAdditions=mh;te.formatFlagDeprecationWarning=yh;te.formatCommandDeprecationWarning=_h;te.normalizeArgv=wh;var lh=ch(Ks()),uh=_t(),dh=Xe();function fh(n){function e(t){return lh.render(t,n)}return e}var hh=n=>n.startsWith("-"),ph=n=>n.includes("=");function gh(n,e){if(n.length===1)return n;let i=(r=>{let s=(0,uh.collectUsableIds)(e.commandIDs),o=[],a=f=>s.has(f),l=f=>(f?[...o,f]:o).filter(Boolean).join(":"),d=()=>{let f=l();if(!f)return!1;let c=e.findCommand(f);return!!(c&&(c.strict===!1||Object.keys(c.args??{}).length>0))};for(let f of r)if(a(l(f)))o.push(f);else{if(ph(f)||hh(f)||d())break;o.push(f)}return l()})(n);if(i){let r=n.slice(i.split(":").length);return[i,...r]}return n}function Uo(n,e){return n.length===0||(e.topicSeparator===" "?n=gh(n,e):e.topicSeparator!==":"&&(n[0]=(0,dh.toStandardizedId)(n[0],e))),n}function mh(n){let e=["--help"],t=n.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...e]).values()]}function yh(n,e){let t=`The "${n}" flag has been deprecated`;return e===!0?`${t}.`:e.message?e.message:(e.version&&(t+=` and will be removed in version ${e.version}`),t+=e.to?`. Use "${e.to}" instead.`:".",t)}function _h(n,e){let t=`The "${n}" command has been deprecated`;return e?e.message?e.message:(e.version&&(t+=` and will be removed in version ${e.version}`),t+=e.to?`. Use "${e.to}" instead.`:".",t):`${t}.`}function wh(n,e=process.argv.slice(2)){return n.topicSeparator!==":"&&!e[0]?.includes(":")&&(e=Uo(e,n)),e}});var zt=m(Et=>{"use strict";u();var Gt=Et&&Et.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Et,"__esModule",{value:!0});Et.HelpFormatter=void 0;var Vt=Gt(Ve()),bh=Gt(Ti()),vh=Gt(Iu()),Eh=Gt(qu()),$h=Gt(Di()),Oh=ht(),br=oe(),Ph=vt(),vr=class{config;indentSpacing=2;opts;render;constructor(e,t={}){this.config=e,this.opts={maxWidth:Oh.stdtermwidth,...t},this.render=(0,Ph.template)(this)}indent(e,t=this.indentSpacing){return(0,bh.default)(e,t)}renderList(e,t){if(e.length===0)return"";let i=()=>{let l="";for(let[d,f]of e)!d&&!f||(d&&(t.stripAnsi&&(d=Vt.default.strip(d)),l+=this.wrap(d.trim(),t.indentation)),f&&(t.stripAnsi&&(f=Vt.default.strip(f)),l+=`
|
|
11
11
|
`,l+=this.indent(this.wrap(f.trim(),t.indentation+2),4)),l+=`
|
|
12
12
|
|
|
13
|
-
`);return l.trim()};if(t.multiline)return i();let r=(0,
|
|
13
|
+
`);return l.trim()};if(t.multiline)return i();let r=(0,Eh.default)(e.map(l=>l[0]).join(`
|
|
14
14
|
`)),s="",o=t.spacer||`
|
|
15
|
-
`,a="";for(let[l,d]of e){let f=d;if(a&&(s+=o,s+=a),a=l||"",t.stripAnsi&&(a=
|
|
16
|
-
`).map(h=>h.trim());if(a+=" ".repeat(r-(0,
|
|
15
|
+
`,a="";for(let[l,d]of e){let f=d;if(a&&(s+=o,s+=a),a=l||"",t.stripAnsi&&(a=Vt.default.strip(a)),!f){a=a.trim();continue}t.stripAnsi&&(f=Vt.default.strip(f)),f=this.wrap(f.trim(),t.indentation+r+2);let[c,...p]=f.split(`
|
|
16
|
+
`).map(h=>h.trim());if(a+=" ".repeat(r-(0,vh.default)(a)+2),a+=c,p.length!==0){if(p.length>4)return i();t.spacer||(o=`
|
|
17
17
|
`),a+=`
|
|
18
18
|
`,a+=this.indent(p.join(`
|
|
19
19
|
`),r+2)}}return a&&(s+=o,s+=a),s.trim()}section(e,t){let i;if(typeof t=="string")i=this.render(t);else if(Array.isArray(t))i=t.map(s=>{if("name"in s){let l=s;return[this.render(l.name),this.render(l.description)]}let[o,a]=s;return[this.render(o),a&&this.render(a)]});else{if("header"in t)return this.section(t.header,t.body);i=t.map(s=>[s.name,s.description]).map(([s,o])=>[this.render(s),o&&this.render(o)])}let r=[(0,br.colorize)(this.config?.theme?.sectionHeader,(0,br.colorize)("bold",e)),(0,br.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
|
|
20
|
-
`);return this.opts.stripAnsi?
|
|
20
|
+
`);return this.opts.stripAnsi?Vt.default.strip(r):r}wrap(e,t=this.indentSpacing){return(0,$h.default)(this.render(e),this.opts.maxWidth-t,{hard:!0})}};Et.HelpFormatter=vr});var Er=m(Ze=>{"use strict";u();var Ch=Ze&&Ze.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.CommandHelp=void 0;var jh=Ch(Ve()),Ih=Vn(),Wo=Xe(),$t=N(),T=oe(),Vo=Bo(),Lh=zt(),Ot=/\r\n|\n/;function Ah(n){return n==="alphabetical"?"alphabetical":n==="none"?"none":"alphabetical"}var zn=class extends Lh.HelpFormatter{command;config;opts;constructor(e,t,i){super(t,i),this.command=e,this.config=t,this.opts=i}aliases(e){return!e||e.length===0?void 0:e.map(i=>[(0,T.colorize)(this.config?.theme?.dollarSign,"$"),(0,T.colorize)(this.config?.theme?.bin,this.config.bin),(0,T.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
|
|
21
21
|
`)}arg(e){let t=e.name.toUpperCase();return e.required?`${t}`:`[${t}]`}args(e){if(e.filter(t=>t.description).length!==0)return e.map(t=>{let i=t.multiple||this.command.strict===!1?"...":"",r=`${t.name.toUpperCase()}${i}`;r=t.required?`${r}`:`[${r}]`;let s=t.description||"";return t.default&&(s=`${(0,T.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${t.default}]`)} ${s}`),t.options&&(s=`${(0,T.colorize)(this.config?.theme?.flagOptions,`(${t.options.join("|")})`)} ${s}`),[(0,T.colorize)(this.config?.theme?.flag,r),s?(0,T.colorize)(this.config?.theme?.sectionDescription,s):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?Vo.DocOpts.generate(this.command):(0,$t.compact)([this.command.id,Object.values(this.command.args??{})?.filter(e=>!e.hidden).map(e=>this.arg(e)).join(" ")]).join(" ")}description(){let e=this.command,t;if(this.opts.hideCommandSummaryInDescription)t=[(e.description||"").split(Ot).at(-1)??""];else if(e.description){let i=e.summary?`${e.summary}
|
|
22
22
|
`:null;t=i?[...i.split(Ot),...(e.description||"").split(Ot)]:(e.description||"").split(Ot)}if(t)return this.wrap(t.join(`
|
|
23
23
|
`))}examples(e){return!e||e.length===0?void 0:(0,$t.castArray)(e).map(i=>{let r,s;if(typeof i=="string"){let d=i.split(Ot).filter(Boolean);if(d.length>=2&&!this.isCommand(d[0])&&d.slice(1).every(f=>this.isCommand(f)))r=d[0],s=d.slice(1);else return d.map(f=>this.formatIfCommand(f)).join(`
|
|
@@ -34,43 +34,43 @@ ${l}`}).join(`
|
|
|
34
34
|
|
|
35
35
|
${this.indent(this.wrap(r.description||"",this.indentSpacing*2))}`}).join(`
|
|
36
36
|
|
|
37
|
-
`)}generate(){let e=this.command,t=Object.entries(e.flags||{}).filter(([,o])=>!o.hidden).map(([o,a])=>(a.name=o,a)),i=
|
|
37
|
+
`)}generate(){let e=this.command,t=Object.entries(e.flags||{}).filter(([,o])=>!o.hidden).map(([o,a])=>(a.name=o,a)),i=Ah(this.opts.flagSortOrder)==="alphabetical"?(0,$t.sortBy)(t,o=>[!o.char,o.char,o.name]):t,r=Object.values((0,Ih.ensureArgObject)(e.args)).filter(o=>!o.hidden);return(0,$t.compact)(this.sections().map(({generate:o,header:a})=>{let l=o({args:r,cmd:e,flags:i},a);return Array.isArray(l)?l.map(d=>d&&d.body&&this.section(d.header,d.body)).join(`
|
|
38
38
|
|
|
39
39
|
`):l&&this.section(a,l)})).join(`
|
|
40
40
|
|
|
41
41
|
`)}groupFlags(e){let t=[],i={};for(let r of e){let s=r.helpGroup;s?(i[s]||(i[s]=[]),i[s].push(r)):t.push(r)}return{flagGroups:i,mainFlags:t}}sections(){let e=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},r)=>[{body:this.args(i),header:r}],header:"ARGUMENTS"},{generate:({flags:i},r)=>{let{flagGroups:s,mainFlags:o}=this.groupFlags(i),a=[],l=this.flags(o);l&&a.push({body:l,header:r});for(let[d,f]of Object.entries(s)){let c=this.flags(f);c&&a.push({body:c,header:`${d.toUpperCase()} ${r}`})}return(0,$t.compact)(a)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let r=i.examples||i.example;return this.examples(r)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],t=this.opts.sections?.map(i=>i.toLowerCase());return e.filter(({header:i})=>!t||t.includes(i.toLowerCase()))}usage(){let{id:e,usage:t}=this.command,i=(0,Wo.toStandardizedId)(e,this.config),r=(0,Wo.toConfiguredId)(e,this.config);return(t?(0,$t.castArray)(t):[this.defaultUsage()]).map(o=>{let a=this.opts.maxWidth-this.indentSpacing,l=(0,T.colorize)(this.config?.theme?.dollarSign,"$"),d=(0,T.colorize)(this.config?.theme?.bin,this.config.bin),f=(0,T.colorize)(this.config?.theme?.command,"<%= command.id %>"),c=(0,T.colorize)(this.config?.theme?.sectionDescription,o.replace("<%= command.id %>","").replace(new RegExp(`^${i}`),"").replace(new RegExp(`^${r}`),"").trim()),p=`${l} ${d} ${f} ${c}`.trim();if(p.length>a){let h=p.slice(0,Math.max(0,a)).lastIndexOf(" ");return p.slice(0,Math.max(0,h))+`
|
|
42
42
|
`+this.indent(this.wrap(p.slice(Math.max(0,h)),this.indentSpacing*2))}return this.wrap(p)}).join(`
|
|
43
|
-
`)}formatIfCommand(e){e=this.render(e);let t=(0,T.colorize)(this.config?.theme?.dollarSign,"$");return e.startsWith(this.config.bin)?`${t} ${e}`:e.startsWith(`$ ${this.config.bin}`)?`${t}${e.replace("$","")}`:e}isCommand(e){return
|
|
43
|
+
`)}formatIfCommand(e){e=this.render(e);let t=(0,T.colorize)(this.config?.theme?.dollarSign,"$");return e.startsWith(this.config.bin)?`${t} ${e}`:e.startsWith(`$ ${this.config.bin}`)?`${t}${e.replace("$","")}`:e}isCommand(e){return jh.default.strip(this.formatIfCommand(e)).startsWith(`${(0,T.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};Ze.CommandHelp=zn;Ze.default=zn});var Go=m(Jt=>{"use strict";u();var xh=Jt&&Jt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jt,"__esModule",{value:!0});var Sh=xh(Ve()),qh=N(),Pt=oe(),Fh=zt(),$r=class extends Fh.HelpFormatter{config;opts;constructor(e,t){super(e,t),this.config=e,this.opts=t}description(){let e=this.config.pjson.oclif.description||this.config.pjson.description||"";if(e=this.render(e),e=e.split(`
|
|
44
44
|
`).slice(1).join(`
|
|
45
45
|
`),!!e)return this.section("DESCRIPTION",this.wrap((0,Pt.colorize)(this.config?.theme?.sectionDescription,e)))}root(){let e=this.config.pjson.oclif.description||this.config.pjson.description||"";e=this.render(e),e=e.split(`
|
|
46
|
-
`)[0];let t=(0,
|
|
46
|
+
`)[0];let t=(0,qh.compact)([(0,Pt.colorize)(this.config?.theme?.commandSummary,e),this.version(),this.usage(),this.description()]).join(`
|
|
47
47
|
|
|
48
|
-
`);return this.opts.stripAnsi&&(t=
|
|
48
|
+
`);return this.opts.stripAnsi&&(t=Sh.default.strip(t)),t}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,Pt.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,Pt.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,Pt.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,Pt.colorize)(this.config?.theme?.version,this.config.userAgent)))}};Jt.default=$r});var Yt=m(M=>{"use strict";u();var Yo=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(M,"__esModule",{value:!0});M.Help=M.HelpBase=M.standardizeIDFromArgv=M.normalizeArgv=M.getHelpFlagAdditions=M.HelpFormatter=M.CommandHelp=void 0;M.loadHelpClass=Gh;var zo=Yo(Ve()),Rh=wt(),Nh=mt(),Th=Bt(),Jo=Mn(),Dh=lr(),Or=Xe(),Kt=N(),Ko=Ye(),ve=oe(),kh=Er(),Mh=zt(),Hh=Yo(Go()),Xt=vt(),Bh=Er();Object.defineProperty(M,"CommandHelp",{enumerable:!0,get:function(){return Bh.CommandHelp}});var Uh=zt();Object.defineProperty(M,"HelpFormatter",{enumerable:!0,get:function(){return Uh.HelpFormatter}});var Pr=vt();Object.defineProperty(M,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Pr.getHelpFlagAdditions}});Object.defineProperty(M,"normalizeArgv",{enumerable:!0,get:function(){return Pr.normalizeArgv}});Object.defineProperty(M,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Pr.standardizeIDFromArgv}});function Wh(n,e){let t=(0,Xt.getHelpFlagAdditions)(e);for(let i of n){if(i==="--")return;if(!(t.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Jn=class extends Mh.HelpFormatter{constructor(e,t={}){super(e,t),e.topicSeparator||(e.topicSeparator=":")}};M.HelpBase=Jn;var Kn=class extends Jn{CommandHelpClass=kh.CommandHelp;constructor(e,t={}){super(e,t)}get _topics(){return this.config.topics.filter(e=>this.config.topics.some(i=>i.name.includes(`${e.name}:`)))}get sortedCommands(){let{commands:e}=this.config;return e=e.filter(t=>this.opts.all||!t.hidden),e=(0,Kt.sortBy)(e,t=>t.id),e=(0,Kt.uniqBy)(e,t=>t.id),e}get sortedTopics(){let e=this._topics;return e=e.filter(t=>this.opts.all||!t.hidden),e=(0,Kt.sortBy)(e,t=>t.name),e=(0,Kt.uniqBy)(e,t=>t.name),e}command(e){return this.formatCommand(e)}description(e){let t=this.render(e.description||"");return e.summary?t:t.split(`
|
|
49
49
|
`).slice(1).join(`
|
|
50
50
|
`)}formatCommand(e){return this.config.topicSeparator!==":"&&(e.id=e.id.replaceAll(":",this.config.topicSeparator),e.aliases=e.aliases&&e.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(e).generate()}formatCommands(e){if(e.length===0)return"";let t=this.renderList(e.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let r=this.summary(i);return[(0,ve.colorize)(this.config?.theme?.command,i.id),r&&(0,ve.colorize)(this.config?.theme?.sectionDescription,zo.default.strip(r))]}),{indentation:2,spacer:`
|
|
51
|
-
`,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",t)}formatRoot(){return new
|
|
51
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",t)}formatRoot(){return new Hh.default(this.config,this.opts).root()}formatTopic(e){let t=this.render(e.description||""),i=t.split(`
|
|
52
52
|
`)[0];t=t.split(`
|
|
53
53
|
`).slice(1).join(`
|
|
54
|
-
`);let r=`${e.name}:COMMAND`;this.config.topicSeparator!==":"&&(r=r.replaceAll(":",this.config.topicSeparator));let s=(0,
|
|
54
|
+
`);let r=`${e.name}:COMMAND`;this.config.topicSeparator!==":"&&(r=r.replaceAll(":",this.config.topicSeparator));let s=(0,Kt.compact)([(0,ve.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,ve.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ve.colorize)(this.config?.theme?.bin,this.config.bin)} ${r}`),t&&this.section("DESCRIPTION",this.wrap((0,ve.colorize)(this.config?.theme?.sectionDescription,t)))]).join(`
|
|
55
55
|
|
|
56
56
|
`);return this.opts.stripAnsi&&(s=zo.default.strip(s)),s+`
|
|
57
57
|
`}formatTopics(e){if(e.length===0)return"";let t=this.renderList(e.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,ve.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,ve.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
|
|
58
58
|
`)[0]))])),{indentation:2,spacer:`
|
|
59
|
-
`,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",t)}getCommandHelpClass(e){return new this.CommandHelpClass(e,this.config,this.opts)}log(...e){return this.opts.sendToStderr?Ko.ux.stderr(e):Ko.ux.stdout(e)}async showCommandHelp(e){let t=e.id,i=t.split(":").length,r=this.sortedTopics.filter(d=>d.name.startsWith(t+":")&&d.name.split(":").length===i+1),s=this.sortedCommands.filter(d=>d.id.startsWith(t+":")&&d.id.split(":").length===i+1),o=this.config.plugins.get(e.pluginName),a=this.config.pjson?.oclif?.state||o?.pjson?.oclif?.state||e.state;if(a&&this.log(a==="deprecated"?`${(0,
|
|
59
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",t)}getCommandHelpClass(e){return new this.CommandHelpClass(e,this.config,this.opts)}log(...e){return this.opts.sendToStderr?Ko.ux.stderr(e):Ko.ux.stdout(e)}async showCommandHelp(e){let t=e.id,i=t.split(":").length,r=this.sortedTopics.filter(d=>d.name.startsWith(t+":")&&d.name.split(":").length===i+1),s=this.sortedCommands.filter(d=>d.id.startsWith(t+":")&&d.id.split(":").length===i+1),o=this.config.plugins.get(e.pluginName),a=this.config.pjson?.oclif?.state||o?.pjson?.oclif?.state||e.state;if(a&&this.log(a==="deprecated"?`${(0,Xt.formatCommandDeprecationWarning)((0,Or.toConfiguredId)(t,this.config),e.deprecationOptions)}
|
|
60
60
|
`:`This command is in ${a}.
|
|
61
|
-
`),e.deprecateAliases&&[...e.aliases??[],...e.hiddenAliases??[]].includes(t)){let d=this.config.commands.find(p=>[...p.aliases??[],...p.hiddenAliases??[]].includes(t)),f=d?(0,Or.toConfiguredId)(d.id,this.config):"",c={...e.deprecationOptions,...d?{to:f}:{}};this.log(`${(0,
|
|
61
|
+
`),e.deprecateAliases&&[...e.aliases??[],...e.hiddenAliases??[]].includes(t)){let d=this.config.commands.find(p=>[...p.aliases??[],...p.hiddenAliases??[]].includes(t)),f=d?(0,Or.toConfiguredId)(d.id,this.config):"",c={...e.deprecationOptions,...d?{to:f}:{}};this.log(`${(0,Xt.formatCommandDeprecationWarning)((0,Or.toConfiguredId)(t,this.config),c)}
|
|
62
62
|
`)}let l=this.summary(e);if(l&&this.log(l+`
|
|
63
|
-
`),this.log(this.formatCommand(e)),this.log(""),r.length>0&&(this.log(this.formatTopics(r)),this.log("")),s.length>0){let d=[],f=s.filter(c=>(d.push(...c.aliases),!d.includes(c.id)));this.log(this.formatCommands(f)),this.log("")}}async showHelp(e){let t=e.slice(1);e=e.filter(o=>!(0,
|
|
63
|
+
`),this.log(this.formatCommand(e)),this.log(""),r.length>0&&(this.log(this.formatTopics(r)),this.log("")),s.length>0){let d=[],f=s.filter(c=>(d.push(...c.aliases),!d.includes(c.id)));this.log(this.formatCommands(f)),this.log("")}}async showHelp(e){let t=e.slice(1);e=e.filter(o=>!(0,Xt.getHelpFlagAdditions)(this.config).includes(o)),this.config.topicSeparator!==":"&&(e=(0,Xt.standardizeIDFromArgv)(e,this.config));let i=Wh(e,this.config);if(!i){if(this.config.isSingleCommandCLI){let o=this.config.findCommand(Jo.SINGLE_COMMAND_CLI_SYMBOL);if(o){o.id="",await this.showCommandHelp(o);return}}await this.showRootHelp();return}let r=this.config.findCommand(i);if(r){if(r.id===Jo.SINGLE_COMMAND_CLI_SYMBOL&&(r.id=""),r.hasDynamicHelp&&r.pluginType!=="jit"){let o=await r.load();for(let[a,l]of Object.entries(o.flags??{}))l.type!=="boolean"&&(r.flags[a].default=await(0,Dh.cacheDefaultValue)(l,!1));await this.showCommandHelp(r)}else await this.showCommandHelp(r);return}let s=this.config.findTopic(i);if(s){await this.showTopicHelp(s);return}if(this.config.flexibleTaxonomy){let o=this.config.findMatches(i,t);if(o.length>0&&(await this.config.runHook("command_incomplete",{argv:t.filter(l=>!i.split(":").includes(l)),id:i,matches:o})).successes.length>0)return}(0,Nh.error)(`Command ${i} not found.`)}async showRootHelp(){let e=this.sortedTopics,t=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
|
|
64
64
|
`),this.log(this.formatRoot()),this.log(""),this.opts.all||(e=e.filter(r=>!r.name.includes(":")),t=t.filter(r=>!r.id.includes(":"))),e.length>0&&(this.log(this.formatTopics(e)),this.log("")),t.length>0&&(t=t.filter(r=>r.id),this.log(this.formatCommands(t)),this.log(""))}async showTopicHelp(e){let{name:t}=e,i=t.split(":").length,r=this.sortedTopics.filter(a=>a.name.startsWith(t+":")&&a.name.split(":").length===i+1),s=this.sortedCommands.filter(a=>a.id.startsWith(t+":")&&a.id.split(":").length===i+1),o=this.config.pjson?.oclif?.state;o&&this.log(`This topic is in ${o}.
|
|
65
65
|
`),this.log(this.formatTopic(e)),r.length>0&&(this.log(this.formatTopics(r)),this.log("")),s.length>0&&(this.log(this.formatCommands(s)),this.log(""))}summary(e){if(!(this.opts.sections&&!this.opts.sections.map(t=>t.toLowerCase()).includes("summary")))return e.summary?(0,ve.colorize)(this.config?.theme?.commandSummary,this.render(e.summary.split(`
|
|
66
66
|
`)[0])):e.description&&(0,ve.colorize)(this.config?.theme?.commandSummary,this.render(e.description).split(`
|
|
67
|
-
`)[0])}};M.Help=Kn;function Xo(n){return n&&n.default?n.default:n}function
|
|
68
|
-
${i.message}`)}}return Kn}});var Xn=m(Ee=>{"use strict";u();var Cr=Ee&&Ee.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Exit=void 0;Ee.handle=Qh;var Gh=Cr(Xs()),zh=Cr(fe()),Jh=Zt(),Kh=Q(),Xh=ze(),Yh=Fn(),Zh=Cr(Sn());Ee.Exit={exit(n=0){process.exit(n)}};async function Qh(n){try{n||(n=new Xh.CLIError("no error?")),n.message==="SIGINT"&&Ee.Exit.exit(1);let e=!(n instanceof Yh.ExitError)&&!n.skipOclifErrorHandling,t=(0,Zh.default)(n),i=(0,Gh.default)(n.stack||"",{pretty:!0});if(e){console.error(t??i);let s=zh.default.getInstance().get("config");if(n.showHelp&&n.parse?.input?.argv&&s){let o={...s.pjson.oclif.helpOptions??s.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},a=new Jh.Help(s,o);console.error(),await a.showHelp(process.argv.slice(2))}}let r=n.oclif?.exit??1;n.code!=="EEXIT"&&i&&(0,Kh.getLogger)().error(i),Ee.Exit.exit(r)}catch(e){console.error(n.stack),console.error(e.stack),Ee.Exit.exit(1)}}});var Le=m(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.warn=J.handle=J.exit=J.ModuleLoadError=J.ExitError=J.CLIError=J.error=void 0;var ep=mt();Object.defineProperty(J,"error",{enumerable:!0,get:function(){return ep.error}});var tp=ze();Object.defineProperty(J,"CLIError",{enumerable:!0,get:function(){return tp.CLIError}});var np=Fn();Object.defineProperty(J,"ExitError",{enumerable:!0,get:function(){return np.ExitError}});var ip=Zi();Object.defineProperty(J,"ModuleLoadError",{enumerable:!0,get:function(){return ip.ModuleLoadError}});var rp=Nn();Object.defineProperty(J,"exit",{enumerable:!0,get:function(){return rp.exit}});var sp=Xn();Object.defineProperty(J,"handle",{enumerable:!0,get:function(){return sp.handle}});var op=yt();Object.defineProperty(J,"warn",{enumerable:!0,get:function(){return op.warn}})});var Ct=m(Y=>{"use strict";u();Object.defineProperty(Y,"__esModule",{value:!0});Y.Performance=Y.OCLIF_MARKER_OWNER=void 0;var Qt=$("node:perf_hooks"),Zo=Q(),ap=Ie();Y.OCLIF_MARKER_OWNER="@oclif/core";var jr=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(e,t,i={}){this.owner=e,this.name=t,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[r,s]=t.split("#"),[o,a]=r.split(".");this.module=o,this.method=a,this.scope=s,Qt.performance.mark(this.startMarker)}addDetails(e){this.details={...this.details,...e}}measure(){Qt.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Qt.performance.mark(this.stopMarker)}},Ir=class n{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!n.enabled||n._results.size>0)return;let e=[...n.markers.values()];if(e.length!==0){for(let t of e.filter(i=>!i.stopped))t.stop();return new Promise(t=>{new Qt.PerformanceObserver(r=>{for(let c of r.getEntries()){let p=n.markers.get(c.name);if(p){let h={details:p.details,duration:c.duration,method:p.method,module:p.module,name:c.name,scope:p.scope},y=n._results.get(p.owner)??[];n._results.set(p.owner,[...y,h])}}let s=n._results.get(Y.OCLIF_MARKER_OWNER)??[],o=s.find(c=>c.name.startsWith("config.runCommand")),a=o?n.getResult(Y.OCLIF_MARKER_OWNER,`plugin.findCommand#${o.details.plugin}.${o.details.command}`)?.duration??0:0,l=Object.fromEntries(s.filter(({name:c})=>c.startsWith("plugin.load#")).sort((c,p)=>p.duration-c.duration).map(({details:c,duration:p,scope:h})=>[h,{details:c,duration:p}])),d=s.filter(({name:c})=>c.startsWith("config.runHook#")).reduce((c,p)=>{let h=p.details.event;if(h)c[h]||(c[h]={}),c[h][p.scope]=p.duration;else{let y=p.scope;c[y]||(c[y]={}),c[y].total=p.duration}return c},{}),f=Object.fromEntries(s.filter(({name:c})=>c.startsWith("config.loadPlugins#")).sort((c,p)=>p.duration-c.duration).map(({duration:c,scope:p})=>[p,c]));n._oclifPerf={hookRunTimes:d,"oclif.commandLoadMs":a,"oclif.commandRunMs":s.find(({name:c})=>c.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":n.getResult(Y.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":f.core??0,"oclif.initHookMs":d.init?.total??0,"oclif.initMs":n.getResult(Y.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":f.link??0,"oclif.postrunHookMs":d.postrun?.total??0,"oclif.prerunHookMs":d.prerun?.total??0,"oclif.runMs":n.getResult(Y.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":f.user??0,pluginLoadTimes:l},t()}).observe({buffered:!0,entryTypes:["measure"]});for(let r of e)try{r.measure()}catch{}Qt.performance.clearMarks()})}}static debug(){if(!n.enabled)return;let e=(0,Zo.makeDebug)("perf"),t=(process.uptime()*1e3).toFixed(4);e("Process Uptime: %sms",t),e("Oclif Time: %sms",n.oclifPerf["oclif.runMs"].toFixed(4)),e("Init Time: %sms",n.oclifPerf["oclif.initMs"].toFixed(4)),e("Config Load Time: %sms",n.oclifPerf["oclif.configLoadMs"].toFixed(4)),e(" \u2022 Root Plugin Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),e(" \u2022 Plugins Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),e(" \u2022 Commands Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),e("Core Plugin Load Time: %sms",n.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),e("User Plugin Load Time: %sms",n.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),e("Linked Plugin Load Time: %sms",n.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),e("Plugin Load Times:");for(let[s,o]of Object.entries(n.oclifPerf.pluginLoadTimes))o.details.hasManifest?e(` ${s}: ${o.duration.toFixed(4)}ms`):e(` ${s}: ${o.duration.toFixed(4)}ms (no manifest!)`);e("Hook Run Times:");for(let[s,o]of Object.entries(n.oclifPerf.hookRunTimes)){e(` ${s}:`);for(let[a,l]of Object.entries(o))e(` ${a}: ${l.toFixed(4)}ms`)}e("Command Load Time: %sms",n.oclifPerf["oclif.commandLoadMs"].toFixed(4)),e("Command Run Time: %sms",n.oclifPerf["oclif.commandRunMs"].toFixed(4)),n.oclifPerf["oclif.configLoadMs"]>n.oclifPerf["oclif.runMs"]&&e("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=(0,Zo.makeDebug)("non-oclif-perf"),r=n.results;if(r.size>0){i("Non-Core Performance Measurements:");for(let[s,o]of r){i(` ${s}:`);for(let a of o)i(` ${a.name}: ${a.duration.toFixed(4)}ms`)}}}static getResult(e,t){return n._results.get(e)?.find(i=>i.name===t)}static mark(e,t,i={}){if(!n.enabled)return;let r=new jr(e,t,i);return n.markers.set(r.name,r),r}static get enabled(){return ap.settings.performanceEnabled??!1}static get oclifPerf(){if(!n.enabled)return{};if(n._oclifPerf)return n._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return n.enabled?new Map([...n._results.entries()].filter(([e])=>e!==Y.OCLIF_MARKER_OWNER)):new Map}};Y.Performance=Ir});var Qo=m(Lr=>{"use strict";u();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.determinePriority=cp;function cp(n,e){return e.sort((i,r)=>{let s=i.pluginAlias??"A-Cannot-Find-This",o=r.pluginAlias??"B-Cannot-Find-This",a=n.indexOf(s),l=n.indexOf(o);return i.pluginType==="core"&&r.pluginType==="core"?a-l:r.pluginType==="core"&&i.pluginType!=="core"?1:i.pluginType==="core"&&r.pluginType!=="core"?-1:i.pluginType==="jit"&&r.pluginType!=="jit"?1:r.pluginType==="jit"&&i.pluginType!=="jit"?-1:0})[0]}});var ia=m(Qe=>{"use strict";u();var ta=Qe&&Qe.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getHomeDir=dp;Qe.getPlatform=na;Qe.getShell=fp;var lp=ta(Pu()),up=$("node:child_process"),Ar=$("node:os"),ea=ta($("node:path"));function dp(){return(0,Ar.homedir)()}function na(){return lp.default?"wsl":(0,Ar.platform)()}function fp(){let n,e=process.env.SHELL??(0,Ar.userInfo)().shell?.split(ea.default.sep)?.pop();return e?n=e.split("/"):na()==="win32"?n=hp().split(ea.default.sep):n=["unknown"],n.at(-1)??"unknown"}function hp(){try{let n=(0,up.execSync)(`powershell.exe -NoProfile -Command "(Get-CimInstance Win32_Process -Filter 'ProcessID = ${process.ppid}').Name"`,{encoding:"utf8"});return n.includes("powershell")||n.includes("pwsh")?"powershell":process.env.COMSPEC??"cmd.exe"}catch{return process.env.COMSPEC??"cmd.exe"}}});var ya=m(tt=>{u();Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"});var pp=Object.create,aa=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,mp=Object.getOwnPropertyNames,yp=Object.getPrototypeOf,_p=Object.prototype.hasOwnProperty,wp=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=mp(e),s=0,o=r.length,a;s<o;s++)a=r[s],!_p.call(n,a)&&a!==t&&aa(n,a,{get:(l=>e[l]).bind(null,a),enumerable:!(i=gp(e,a))||i.enumerable});return n},bp=(n,e,t)=>(t=n!=null?pp(yp(n)):{},wp(e||!n||!n.__esModule?aa(t,"default",{value:n,enumerable:!0}):t,n)),jt=$("fs"),Ae=$("path"),vp=$("url"),Ep=Ru(),et=Fu();et=bp(et,1);var $p=Array.isArray,ca=/\\/g,Op=/^[A-Za-z]:$/,Sr=process.platform==="win32",Pp=/^(\/?\.\.)+$/;function Cp(n,e={}){let t=n.length,i=Array(t),r=Array(t),s,o;for(s=0;s<t;s++){let a=la(n[s]);i[s]=a;let l=a.length,d=Array(l);for(o=0;o<l;o++)d[o]=(0,et.default)(a[o],e);r[s]=d}return a=>{let l=a.split("/");if(l[0]===".."&&Pp.test(a))return!0;for(s=0;s<t;s++){let d=i[s],f=r[s],c=l.length,p=Math.min(c,d.length);for(o=0;o<p;){let h=d[o];if(h.includes("/"))return!0;if(!f[o](l[o]))break;if(!e.noglobstar&&h==="**")return!0;o++}if(o===c)return!0}return!1}}var jp=/^[A-Z]:\/$/i,Ip=Sr?n=>jp.test(n):n=>n==="/";function ra(n,e,t){if(n===e||e.startsWith(`${n}/`)){if(t){let r=n.length+ +!Ip(n);return(s,o)=>s.slice(r,o?-1:void 0)||"."}let i=e.slice(n.length+1);return i?(r,s)=>{if(r===".")return i;let o=`${i}/${r}`;return s?o.slice(0,-1):o}:(r,s)=>s&&r!=="."?r.slice(0,-1):r}return t?i=>Ae.posix.relative(n,i)||".":i=>Ae.posix.relative(n,`${e}/${i}`)||"."}function Lp(n,e){if(e.startsWith(`${n}/`)){let t=e.slice(n.length+1);return i=>`${t}/${i}`}return t=>{let i=Ae.posix.relative(n,`${e}/${t}`);return t[t.length-1]==="/"&&i!==""?`${i}/`:i||"."}}function sa(n){return n.replace(Op,e=>`${e}/`)}var Ap={parts:!0};function la(n){var e;let t=et.default.scan(n,Ap);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[n]}var xp=/\\(?![()[\]{}!+@])/g;function Sp(n){return ua(n)}function qp(n){return da(n).replace(xp,"/")}var Fp=Sr?qp:Sp,Rp=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Np=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,ua=n=>n.replace(Rp,"\\$&"),da=n=>n.replace(Np,"\\$&"),fa=Sr?da:ua;function ha(n,e){if(e?.caseSensitiveMatch===!1)return!0;let t=et.default.scan(n);return t.isGlob||t.negated}function en(...n){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...n)}function pa(n){return typeof n=="string"?[n]:n??[]}var Tp=/^(\/?\.\.)+/,Dp=/\\(?=[()[\]{}!*+?@|])/g;function xr(n,e,t,i){var r;let s=e.cwd,o=n;n[n.length-1]==="/"&&(o=n.slice(0,-1)),o[o.length-1]!=="*"&&e.expandDirectories&&(o+="/**");let a=fa(s);o=(0,Ae.isAbsolute)(o.replace(Dp,""))?Ae.posix.relative(a,o):Ae.posix.normalize(o);let l=(r=Tp.exec(o))===null||r===void 0?void 0:r[0],d=la(o);if(l){let c=(l.length+1)/3,p=0,h=a.split("/");for(;p<c&&d[p+c]===h[h.length+p-c];)o=o.slice(0,(c-p-1)*3)+o.slice((c-p)*3+d[p+c].length+1)||".",p++;let y=Ae.posix.join(s,l.slice(p*3));y[0]!=="."&&t.root.length>y.length&&(t.root=sa(y),t.depthOffset=-c+p)}if(!i&&t.depthOffset>=0){var f;(f=t.commonPath)!==null&&f!==void 0||(t.commonPath=d);let c=[],p=Math.min(t.commonPath.length,d.length);for(let h=0;h<p;h++){let y=d[h];if(y==="**"&&!d[h+1]){c.pop();break}if(h===d.length-1||y!==t.commonPath[h]||ha(y))break;c.push(y)}t.depthOffset=c.length,t.commonPath=c,t.root=sa(c.length>0?Ae.posix.join(s,...c):s)}return o}function kp(n,e,t){let i=[],r=[];for(let s of n.ignore)s&&(s[0]!=="!"||s[1]==="(")&&r.push(xr(s,n,t,!0));for(let s of e)s&&(s[0]!=="!"||s[1]==="("?i.push(xr(s,n,t,!1)):(s[1]!=="!"||s[2]==="(")&&r.push(xr(s.slice(1),n,t,!0)));return{match:i,ignore:r}}function Mp(n,e){let t=n.cwd,i={root:t,depthOffset:0},r=kp(n,e,i);n.debug&&en("internal processing patterns:",r);let{absolute:s,caseSensitiveMatch:o,debug:a,dot:l,followSymbolicLinks:d,onlyDirectories:f}=n,c=i.root.replace(ca,""),p={dot:l,nobrace:n.braceExpansion===!1,nocase:!o,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},h=(0,et.default)(r.match,p),y=(0,et.default)(r.ignore,p),g=Cp(r.match,p),_=ra(t,c,s),E=s?_:ra(t,c,!0),w=(R,F)=>{let I=E(F,!0);return I!=="."&&!g(I)||y(I)},P;n.deep!==void 0&&(P=Math.round(n.deep-i.depthOffset));let j=new Ep.fdir({filters:[a?(R,F)=>{let I=_(R,F),We=h(I)&&!y(I);return We&&en(`matched ${I}`),We}:(R,F)=>{let I=_(R,F);return h(I)&&!y(I)}],exclude:a?(R,F)=>{let I=w(R,F);return en(`${I?"skipped":"crawling"} ${F}`),I}:w,fs:n.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:f,includeDirs:f||!n.onlyFiles,maxDepth:P,signal:n.signal}).crawl(c);return n.debug&&en("internal properties:",{...i,root:c}),[j,t!==c&&!s&&Lp(t,c)]}function ga(n,e){if(e)for(let t=n.length-1;t>=0;t--)n[t]=e(n[t]);return n}var oa={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Hp(n){let e=Object.assign({},n);for(let t in oa)e[t]===void 0&&Object.assign(e,{[t]:oa[t]});return e.cwd=(e.cwd instanceof URL?(0,vp.fileURLToPath)(e.cwd):(0,Ae.resolve)(e.cwd||process.cwd())).replace(ca,"/"),e.ignore=pa(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||jt.readdir,readdirSync:e.fs.readdirSync||jt.readdirSync,realpath:e.fs.realpath||jt.realpath,realpathSync:e.fs.realpathSync||jt.realpathSync,stat:e.fs.stat||jt.stat,statSync:e.fs.statSync||jt.statSync}),e.debug&&en("globbing with options:",e),e}function ma(n,e={}){var t;if(n&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");let i=$p(n)||typeof n=="string",r=pa((t=i?n:n.patterns)!==null&&t!==void 0?t:"**/*"),s=Hp(i?e:n);return r.length>0?Mp(s,r):[]}async function Bp(n,e){let[t,i]=ma(n,e);return t?ga(await t.withPromise(),i):[]}function Up(n,e){let[t,i]=ma(n,e);return t?ga(t.sync(),i):[]}tt.convertPathToPattern=Fp;tt.escapePath=fa;tt.glob=Bp;tt.globSync=Up;tt.isDynamicPattern=ha});var Fr=m(H=>{"use strict";u();Object.defineProperty(H,"__esModule",{value:!0});H.help=H.version=H.string=H.url=H.file=H.directory=H.integer=void 0;H.custom=It;H.boolean=qr;H.option=Jp;var Wp=$("node:url"),Yn=Le(),Vp=Zt(),_a=we();function It(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],multiple:!!(e.multiple===void 0?n?.multiple??!1:e.multiple),type:"option"})}function qr(n={}){return{parse:async(e,t)=>e,...n,allowNo:!!n.allowNo,type:"boolean"}}H.integer=It({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Yn.CLIError(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Yn.CLIError(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Yn.CLIError(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});H.directory=It({async parse(n,e,t){return t.exists?(0,_a.dirExists)(n):n}});H.file=It({async parse(n,e,t){return t.exists?(0,_a.fileExists)(n):n}});H.url=It({async parse(n){try{return new Wp.URL(n)}catch{throw new Yn.CLIError(`Expected a valid url but received: ${n}`)}}});H.string=It();var Gp=(n={})=>qr({description:"Show CLI version.",...n,async parse(e,t){t.log(t.config.userAgent),t.exit(0)}});H.version=Gp;var zp=(n={})=>qr({description:"Show CLI help.",...n,async parse(e,t){let i=await(0,Vp.loadHelpClass)(t.config);await new i(t.config,t.config.pjson.oclif.helpOptions??t.config.pjson.helpOptions).showHelp(t.id?[t.id,...t.argv]:t.argv),t.exit(0)}});H.help=zp;function Jp(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],multiple:!!(e.multiple===void 0?n.multiple:e.multiple),type:"option"})}});var Nr=m(Rr=>{"use strict";u();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.aggregateFlags=Yp;var Kp=Fr(),Xp=(0,Kp.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function Yp(n,e,t){let i={...e,...n};return t?{json:Xp,...i}:i}});var va=m(Tr=>{"use strict";u();Object.defineProperty(Tr,"__esModule",{value:!0});Tr.cacheCommand=ig;var Zp=Nr(),wa=lr(),Qp=Vn(),eg=N();function ba(n,e){let t=Object.getPrototypeOf(e),i=(0,eg.pickBy)(t,r=>r!==void 0);return Object.keys(t).length>0?ba({...i,...n},t):n}async function tg(n,e){let t=Object.entries(n).map(async([i,r])=>[i,{aliases:r.aliases,char:r.char,charAliases:r.charAliases,combinable:r.combinable,dependsOn:r.dependsOn,deprecateAliases:r.deprecateAliases,deprecated:r.deprecated,description:r.description,env:r.env,exclusive:r.exclusive,helpGroup:r.helpGroup,helpLabel:r.helpLabel,hidden:r.hidden,name:i,noCacheDefault:r.noCacheDefault,relationships:r.relationships,required:r.required,summary:r.summary,...r.type==="boolean"?{allowNo:r.allowNo,type:r.type}:{default:await(0,wa.cacheDefaultValue)(r,e),delimiter:r.delimiter,hasDynamicHelp:typeof r.defaultHelp=="function",helpValue:r.helpValue,multiple:r.multiple,options:r.options,type:r.type}}]);return Object.fromEntries(await Promise.all(t))}async function ng(n,e){let t=Object.entries(n).map(async([i,r])=>[i,{default:await(0,wa.cacheDefaultValue)(r,e),description:r.description,hidden:r.hidden,multiple:r.multiple,name:i,noCacheDefault:r.noCacheDefault,options:r.options,required:r.required}]);return Object.fromEntries(await Promise.all(t))}async function ig(n,e,t=!1){let i=ba(n,n),r=i.flags??i._flags,s=i.baseFlags??i._baseFlags,[o,a]=await Promise.all([tg((0,Zp.aggregateFlags)(r,s,i.enableJsonFlag),t),ng((0,Qp.ensureArgObject)(i.args),t)]),l={aliases:(i.aliases??[]).map(h=>h.replaceAll(" ",":")),args:a,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:o,hasDynamicHelp:Object.values(o).some(h=>h.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:e&&e.alias,pluginName:e&&e.name,pluginType:e&&e.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},d=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],f=new Set([...d,...Object.keys(l)]),c=Object.keys(i).filter(h=>!f.has(h)),p=Object.fromEntries(c.map(h=>[h,i[h]]));return{...l,...p}}});var $a=m(Qn=>{"use strict";u();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.debug=ne;Qn.findRoot=lg;var ie=$("node:path"),rg=Q(),Zn=we();function ne(...n){return(e,...t)=>(0,rg.getLogger)(["find-root",...n].join(":")).debug(e,...t)}function*Dr(n){for(;(0,ie.dirname)(n)!==n;)yield n,n=(0,ie.dirname)(n);yield n}async function Ea(n,e){if(ne(e??"root-plugin")(`Finding root starting at ${n}`),e){for(let t of Dr(n))if(t.endsWith((0,ie.basename)(e)))return ne(e)("Found root based on plugin name!"),t}for(let t of Dr(n))if(!((0,ie.basename)((0,ie.dirname)(t))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,ie.basename)(t))))try{let i=(0,ie.join)(t,"package.json");if(ne(e??"root-plugin")(`Checking ${i}`),await(0,Zn.safeReadJson)(i))return ne(e??"root-plugin")("Found root by traversing up from starting point!"),(0,ie.dirname)(i)}catch{}}async function sg(n,e){ne(n??"root-plugin")("Finding root using legacy method");for(let t of Dr(e)){let i;if(n){if(i=(0,ie.join)(t,"node_modules",n,"package.json"),await(0,Zn.safeReadJson)(i))return(0,ie.dirname)(i);if((await(0,Zn.safeReadJson)((0,ie.join)(t,"package.json")))?.name===n)return t}else if(i=(0,ie.join)(t,"package.json"),await(0,Zn.safeReadJson)(i))return(0,ie.dirname)(i)}}var De;function og(n){if(De)return De;try{return De=$($.resolve("pnpapi",{paths:[n]})),De}catch{}}var kr=n=>JSON.stringify(n),ag=(n,e,t)=>kr(n?.packageDependencies.get(t))===kr(e?.packageDependencies.get(t));function cg(n,e){if(og(e),!De)return;ne(n)("Finding root for using pnp method");let t=new Set,i=(r,s)=>{let o=kr(r);if(t.has(o))return;let a=De.getPackageInformation(r);if(r.name===n)return a.packageLocation;t.add(o);for(let[l,d]of a.packageDependencies){if(d===null||s!==null&&ag(a,s,l))continue;let f=De.getLocator(l,d),c=i(f,a);if(c)return c}t.delete(o)};for(let r of De.getDependencyTreeRoots()){let s=i(r);if(s)return s}}async function lg(n,e){if(n){ne(n)(`Finding root using ${e}`);let i;try{i=$.resolve(n,{paths:[e]}),ne(n)("Found starting point with require.resolve")}catch{ne(n)("require.resolve could not find plugin starting point")}if(i){let s=await Ea((0,ie.dirname)(i),n);if(s)return ne(n)(`Found root at ${s}`),s}let r=process.versions.pnp?cg(n,e):await sg(n,e);return ne(n)(r?`Found root at ${r}`:"No root found!"),r}ne("root-plugin")(`Finding root plugin using ${e}`);let t=await Ea(e);return ne("root-plugin")(t?`Found root at ${t}`:"No root found!"),t}});var Pa=m(Mr=>{"use strict";u();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.readPjson=hg;var ug=Nu(),dg=$("node:path"),fg=Q(),Oa=we(),tn=(0,fg.makeDebug)("read-pjson");async function hg(n){let e=(0,dg.join)(n,"package.json");if(process.env.OCLIF_DISABLE_RC)return tn("OCLIF_DISABLE_RC is set, skipping rc search"),(0,Oa.readJson)(e);let t=await(0,Oa.readJson)(e);if(t.oclif)return tn(`found oclif config in ${e}`),t;tn(`searching for oclif config in ${n}`);let r=await(0,ug.lilconfig)("oclif",{searchPlaces:[".oclifrc",".oclifrc.json",".oclifrc.js",".oclifrc.mjs",".oclifrc.cjs","oclif.config.js","oclif.config.mjs","oclif.config.cjs"],stopDir:n}).search(n);return r?.config?(tn(`found oclif config for ${n}: %O`,r),{...t,oclif:r?.config??{}}):(tn(`no oclif config found in ${n}`),t)}});var Wr=m(At=>{"use strict";u();var pg=At&&At.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});At.Plugin=void 0;var nn=$("node:path"),Ca=$("node:util"),gg=ya(),mg=pg(fe()),rn=Le(),ei=Ut(),Lt=Ct(),xa=Mn(),yg=va(),_g=$a(),wg=we(),bg=Pa(),ja=N(),Hr=wt(),ti=_t(),Ia=mg.default.getInstance().get("@oclif/core");function Br(n,e){return n?(e=e?`${e}:`:"",Array.isArray(n)?[...n,n.flatMap(t=>Br(t.subtopics,`${e}${t.name}`))]:Object.keys(n).flatMap(t=>(n[t].name=t,[{...n[t],name:`${e}${t}`},...Br(n[t].subtopics,`${e}${n[t].name}`)]))):[]}var vg=(n,e)=>!!(n?.commands[e]&&"isESM"in n.commands[e]&&"relativePath"in n.commands[e]),La=n=>typeof n.run=="function"?n:n.default&&n.default.run?n.default:Object.values(n).find(e=>typeof e.run=="function"),Aa=n=>{if(n&&typeof n.run=="function")return n},Sa=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Eg(n){return n.map(e=>{let t=(0,nn.parse)(e),i=t.dir.split("/"),r=t.name!=="index"&&t.name,s=[...i,r].filter(Boolean).join(":");return s===""?xa.SINGLE_COMMAND_CLI_SYMBOL:s})}function $g(n){if(n){if(typeof n=="string")return{globPatterns:Sa,strategy:"pattern",target:n};if(!n.target)throw new rn.CLIError("`oclif.commandDiscovery.target` is required.");if(!n.strategy)throw new rn.CLIError("`oclif.commandDiscovery.strategy` is required.");return n.strategy==="explicit"&&!n.identifier&&(n.identifier="default"),n}}function Og(n){return typeof n=="string"?{identifier:"default",target:n}:n.identifier?n:{...n,identifier:"default"}}var Ur=class{options;_base=`${Ia.name}@${Ia.version}`;_debug=(0,ti.makeDebug)();alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(e){this.options=e}get topics(){return Br(this.pjson.oclif.topics||{})}async findCommand(e,t={}){let i=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${e}`,{id:e,plugin:this.name}),s=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let o=await this.getCommandsDir();if(!o)return;let a,l,d;try{({filePath:d,isESM:l,module:a}=vg(this.manifest,e)?await(0,ei.loadWithDataFromManifest)(this.manifest.commands[e],this.root):await(0,ei.loadWithData)(this,(0,nn.join)(o??this.pjson.oclif.commands,...e.split(":")))),this._debug(l?"(import)":"(require)",d)}catch(c){if(!t.must&&c.code==="MODULE_NOT_FOUND")return;throw c}let f=La(a);return f?(f.id=e,f.plugin=this,f.isESM=l,f.relativePath=(0,nn.relative)(this.root,d||"").split(nn.sep),f):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let o=await this.loadCommandsFromTarget(),a=Aa(o?.[e]);return a?(a.id=e,a.plugin=this,a):void 0}})();return!s&&t.must&&(0,rn.error)(`command ${e} not found`),i?.stop(),s}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let e=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,_g.findRoot)(this.options.name,this.options.root);if(!e)throw new rn.CLIError(`could not find package.json with ${(0,Ca.inspect)(this.options)}`);if(this.root=e,this._debug(`loading ${this.type} plugin from ${e}`),this.pjson=this.options.pjson??await(0,bg.readPjson)(e),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new rn.CLIError(`no name in package.json (${e})`);this._debug=(0,ti.makeDebug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([t,i])=>[t,(0,ja.castArray)(i).map(r=>Og(r))])),this.commandDiscoveryOpts=$g(this.pjson.oclif?.commands),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([t,i])=>({...i,load:async()=>this.findCommand(t,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((t,i)=>t.id.localeCompare(i.id))}async _manifest(){let e=!!this.options.ignoreManifest,t=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,r=async(a=!1)=>{try{let l=(0,nn.join)(this.root,`${a?".":""}oclif.manifest.json`),d=await(0,wg.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&d.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${d.version}
|
|
69
|
-
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,d}catch(l){if(l.code==="ENOENT"){if(!a)return r(!0)}else this.warn(l,"readManifest")}},s=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!e){let a=await r();if(a)return s?.addDetails({commandCount:Object.keys(a.commands).length,fromCache:!0}),s?.stop(),this.commandIDs=Object.keys(a.commands),a}this.commandIDs=await this.getCommandIDs();let o={commands:(await Promise.all(this.commandIDs.map(async a=>{try{let l=await this.findCommand(a,{must:!0}),d=await(0,
|
|
70
|
-
`),e}async getCommandIDs(){let e=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),t;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{t=await this.getCommandIdsFromTarget()??[];break}case"pattern":{t=await this.getCommandIdsFromPattern();break}case"single":{t=await this.getCommandIdsFromTarget()??[];break}default:t=[]}return this._debug("found commands",t),e?.addDetails({count:t.length}),e?.stop(),t}async getCommandIdsFromPattern(){let e=await this.getCommandsDir();if(!e)return[];this._debug(`loading IDs from ${e}`);let t=await(0,gg.glob)(this.commandDiscoveryOpts?.globPatterns??Sa,{cwd:e});return Eg(t)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,t])=>Aa(t)).map(([t])=>t)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let e=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts.target,this),t=await(0,ei.load)(this,e);return this.commandCache=t[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let e=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),t=await(0,ei.load)(this,e);return this.commandCache={[xa.SINGLE_COMMAND_CLI_SYMBOL]:La(t)},this.commandCache}}warn(e,t){typeof e=="string"&&(e=new Error(e));let i=this.addErrorScope(e,t);process.emitWarning(i.name,i)}};At.Plugin=Ur});var Ra=m(Jr=>{"use strict";u();Object.defineProperty(Jr,"__esModule",{value:!0});var Pg=qu(),Vr=$("node:path"),xt=Ct(),Gr=we(),Cg=N(),qa=Wr(),jg=_t(),Fa=(0,jg.makeDebug)();function nt(n,e){return Object.keys(n).filter(t=>e.some(i=>(0,Pg.minimatch)(t,i)))}var zr=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(e){this.options=e,e.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(e.plugins)?new Map(e.plugins.map(t=>[t.name,t])):e.plugins)}async loadChildren(e){return(!this.pluginsProvided||e.force)&&(await this.loadUserPlugins(e),await this.loadDevPlugins(e),await this.loadCorePlugins(e)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:e}){let t;if(this.pluginsProvided){let i=[...this.plugins.values()];t=i.find(r=>r.root===this.options.root)??i[0]}else{let i=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,"plugin.load#root");t=new qa.Plugin({isRoot:!0,pjson:e,root:this.options.root}),await t.load(),i?.addDetails({commandCount:t.commands.length,hasManifest:t.hasManifest??!1,name:t.name,topicCount:t.topics.length,type:t.type,usesMain:!!t.pjson.main}),i?.stop()}return this.plugins.set(t.name,t),t}async loadCorePlugins(e){let{plugins:t}=e.rootPlugin.pjson.oclif;if(t){let s=nt(e.rootPlugin.pjson.dependencies??{},t);await this.loadPlugins(e.rootPlugin.root,"core",s)}let{core:i,path:r}=e.pluginAdditions??{core:[]};if(i)if(r){let s=await(0,Gr.readJson)((0,Vr.join)(r,"package.json")),o=nt(s.dependencies??{},i);await this.loadPlugins(r,"core",o)}else{let s=nt(e.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(e.rootPlugin.root,"core",s)}}async loadDevPlugins(e){if(e.devPlugins!==!1){if((0,Cg.isProd)())return;try{let{devPlugins:t}=e.rootPlugin.pjson.oclif;if(t){let s={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=nt(s??{},t);await this.loadPlugins(e.rootPlugin.root,"dev",o)}let{dev:i,path:r}=e.pluginAdditions??{core:[]};if(i)if(r){let s=await(0,Gr.readJson)((0,Vr.join)(r,"package.json")),o={...s.dependencies,...s.devDependencies},a=nt(o??{},i);await this.loadPlugins(r,"dev",a)}else{let s={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=nt(s??{},i);await this.loadPlugins(e.rootPlugin.root,"dev",o)}}catch(t){process.emitWarning(t)}}}async loadPlugins(e,t,i,r){if(!i||i.length===0)return;let s=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,`config.loadPlugins#${t}`);Fa("loading plugins",i),await Promise.all((i||[]).map(async o=>{try{let a=typeof o=="string"?o:o.name,l={name:a,root:e,type:t};if(typeof o!="string"&&(l.tag=o.tag||l.tag,l.root=o.root||l.root,l.url=o.url),r&&(l.parent=r),this.plugins.has(a))return;let d=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,`plugin.load#${a}`),f=new qa.Plugin(l);if(await f.load(),d?.addDetails({commandCount:f.commands.length,hasManifest:f.hasManifest,name:f.name,topicCount:f.topics.length,type:f.type,usesMain:!!f.pjson.main}),d?.stop(),this.plugins.set(f.name,f),r&&(f.parent=r,r.children||(r.children=[]),r.children.push(f)),f.pjson.oclif.plugins){let c=t==="dev"?{...f.pjson.dependencies,...f.pjson.devDependencies}:f.pjson.dependencies,p=nt(c??{},f.pjson.oclif.plugins);await this.loadPlugins(f.root,t,p,f)}}catch(a){this.errors.push(a)}})),s?.addDetails({pluginCount:i.length}),s?.stop()}async loadUserPlugins(e){if(e.userPlugins!==!1)try{let t=(0,Vr.join)(e.dataDir,"package.json");Fa("reading user plugins pjson %s",t);let i=await(0,Gr.readJson)(t,!1);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(t,"user",i.oclif.plugins.filter(r=>r.type==="user")),await this.loadPlugins(t,"link",i.oclif.plugins.filter(r=>r.type==="link"))}catch(t){t.code!=="ENOENT"&&process.emitWarning(t)}}};Jr.default=zr});var Va=m((ae,Wa)=>{"use strict";u();var Ig=ae&&ae.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Lg=ae&&ae.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Ag=ae&&ae.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&Ig(t,e,i[r]);return Lg(t,e),t}})(),Ba=ae&&ae.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ae,"__esModule",{value:!0});ae.Config=void 0;var xg=Ag(Ks()),sn=$("node:os"),it=$("node:path"),Na=$("node:url"),Ua=Ba(fe()),St=Le(),Sg=vt(),Kr=Q(),qg=Ut(),K=Ct(),on=Ie(),Ta=Qo(),Da=we(),Fg=Xe(),Xr=ia(),ni=N(),Rg=Ye(),Ng=oe(),Tg=Ba(Ra()),Dg=wt(),cn=_t(),an=(0,cn.makeDebug)(),ka=Ua.default.getInstance().get("@oclif/core"),Ma=`${ka.name}@${ka.version}`,kg=new Set(["preparse"]);function Ha(){process.listenerCount("warning")>1||process.on("warning",n=>{console.error(n.stack),n.detail&&console.error(n.detail)})}function Mg(n){let e=n.match(/[^-]+(?:-([^.]+))?/);return e&&e[1]||"stable"}function Hg(n){return n&&!!n._base}var ii=class extends Map{validPermutations=new Map;add(e,t){this.validPermutations.set(e,t);for(let i of(0,cn.collectUsableIds)([e]))this.has(i)?this.set(i,this.get(i).add(t)):this.set(i,new Set([t]))}get(e){return super.get(e)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(e){return this.validPermutations.get(e)}hasValid(e){return this.validPermutations.has(e)}},Yr=class n{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;dirname;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";updateConfig;userAgent;userPJSON;valid;version;warned=!1;windows;_base=Ma;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new ii;pluginLoader;rootPlugin;topicPermutations=new ii;constructor(e){this.options=e}static async load(e=Wa.filename||__dirname){if((0,Kr.setLogger)(e),typeof e=="string"&&e.startsWith("file://")&&(e=(0,Na.fileURLToPath)(e)),typeof e=="string"&&(e={root:e}),Hg(e)){an(`reloading config from ${e._base} to ${Ma}`);let i=new Map(e.getPluginsList().map(s=>[s.name,s])),r=new n({...e.options,plugins:i});return await r.load(),r}let t=new n(e);return await t.load(),t}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(e=>e.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,ni.isProd)()}static get rootPlugin(){return this.rootPlugin}get topics(){return[...this._topics.values()]}get versionDetails(){let[e,t,i]=this.userAgent.split(" ");return{architecture:t,cliVersion:e,nodeVersion:i,osVersion:`${(0,sn.type)()} ${(0,sn.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(r=>[r.name,{root:r.root,type:r.type,version:r.version}])),rootPath:this.root,shell:this.shell}}dir(e){let t=process.env[`XDG_${e.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,it.join)(this.home,e==="data"?".local/share":"."+e);return(0,it.join)(t,this.dirname)}findCommand(e,t={}){let i=this.getCmdLookupId(e),r=this._commands.get(i);return t.must&&!r&&(0,St.error)(`command ${i} not found`),r}findMatches(e,t){let i=t.filter(o=>!(0,Sg.getHelpFlagAdditions)(this).includes(o)&&o.startsWith("-")).map(o=>o.replaceAll("-",""));return[...this.commandPermutations.get(e)].map(o=>this._commands.get(o)).filter(o=>{let a=Object.entries(o.flags).flatMap(([l,d])=>d.char?[d.char,l]:[l]);return i.every(l=>a.includes(l))})}findTopic(e,t={}){let i=this.getTopicLookupId(e),r=this._topics.get(i);if(r)return r;if(t.must)throw new Error(`topic ${e} not found`)}getAllCommandIDs(){return this.getAllCommands().map(e=>e.id)}getAllCommands(){let e=[...this._commands.values()],t=[...this.commandPermutations.getAllValid()];for(let i of t)if(!this._commands.has(i)){let r=this._commands.get(this.getCmdLookupId(i));e.push({...r,id:i})}return e}getPluginsList(){return[...this.plugins.values()]}async load(){on.settings.performanceEnabled=(on.settings.performanceEnabled===void 0?this.options.enablePerf:on.settings.performanceEnabled)??!1,on.settings.debug&&Ha(),(0,Kr.setLogger)(this.options);let e=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new Tg.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let t=Ua.default.getInstance();t.set("rootPlugin",this.rootPlugin),t.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||Mg(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,sn.arch)()==="ia32"?"x86":(0,sn.arch)(),this.platform=(0,Xr.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=(0,Xr.getShell)(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Xr.getHomeDir)()||(0,sn.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,this.theme=await this.loadTheme(),this.updateConfig={...this.pjson.oclif.update,node:this.pjson.oclif.update?.node??{},s3:this.buildS3Config()},this.isSingleCommandCLI=!!(typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),this.maybeAdjustDebugSetting(),await this.loadPluginsAndCommands(),an("config done"),e?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((i,r)=>i+r.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),e?.stop()}async loadPluginsAndCommands(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:r}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:e?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=r,t?.stop();let s=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let o of this.plugins.values())this.loadCommands(o),this.loadTopics(o);s?.stop();for(let o of i)this.warn(o)}async loadTheme(){if(this.scopedEnvVarTrue("DISABLE_THEME"))return;let e=(0,it.resolve)(this.configDir,"theme.json"),t=async()=>{if(this.pjson.oclif.theme)return typeof this.pjson.oclif.theme=="string"?(0,Da.safeReadJson)((0,it.resolve)(this.root,this.pjson.oclif.theme)):this.pjson.oclif.theme},[i,r]=await Promise.all([t(),(0,Da.safeReadJson)(e)]),s={...i,...r};return Object.keys(s).length>0?(0,Ng.parseTheme)(s):void 0}macosCacheDir(){return this.platform==="darwin"&&(0,it.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(e,t=[],i=null){let r=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runCommand#${e}`);an("runCommand %s %o",e,t);let s=i??this.findCommand(e);if(!s){let l=this.flexibleTaxonomy?this.findMatches(e,t):[],d=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:t,id:e,matches:l}):await this.runHook("command_not_found",{argv:t,id:e});if(d.successes[0])return d.successes[0].result;throw d.failures[0]?d.failures[0].error:new St.CLIError(`command ${e} not found`)}if(this.isJitPluginCommand(s)){let l=s.pluginName,d=this.pjson.oclif.jitPlugins[l],f=await this.runHook("jit_plugin_not_installed",{argv:t,command:s,id:e,pluginName:l,pluginVersion:d});if(f.failures[0])throw f.failures[0].error;if(f.successes[0])await this.loadPluginsAndCommands({force:!0}),s=this.findCommand(e)??s;else{let c=await this.runHook("command_not_found",{argv:t,id:e});if(c.successes[0])return c.successes[0].result;throw c.failures[0]?c.failures[0].error:new St.CLIError(`command ${e} not found`)}}let o=await s.load();await this.runHook("prerun",{argv:t,Command:o});let a=await o.run(t,this);if(s.id==="plugins:uninstall")for(let l of t)this.plugins.delete(l);return await this.runHook("postrun",{argv:t,Command:o,result:a}),r?.addDetails({command:e,plugin:s.pluginName}),r?.stop(),a}async runHook(e,t,i,r){let s=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runHook#${e}`);an("start %s hook",e);let o=c=>typeof c=="function"?c:c.default&&typeof c.default=="function"?c.default:Object.values(c).find(p=>typeof p=="function"),a=async(c,p)=>{let h,y=new Promise((g,_)=>{h=setTimeout(()=>{_(new Error(`Timed out after ${c} ms.`))},c).unref()});return Promise.race([p,y]).then(g=>(clearTimeout(h),g))},l={failures:[],successes:[]},f=(kg.has(e)?[this.rootPlugin]:[...this.plugins.values()]).map(async c=>{let p=(0,Kr.makeDebug)([c.name,"hooks",e].join(":")),h={config:this,debug:p,error(g,_={}){(0,St.error)(g,_)},exit(g=0){(0,St.exit)(g)},log(g,..._){Rg.ux.stdout(g,..._)},warn(g){(0,St.warn)(g)}},y=c.hooks[e]||[];for(let g of y){let _=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runHook#${c.name}(${g.target})`);try{let{filePath:E,isESM:w,module:P}=await(0,qg.loadWithData)(c,await(0,Dg.tsPath)(c.root,g.target,c));p("start",w?"(import)":"(require)",E);let j=P[g.identifier]??(g.identifier==="default"?o(P):void 0);if(!j){p("No hook found for hook definition:",g);continue}let R=i?await a(i,j.call(h,{...t,config:this,context:h})):await j.call(h,{...t,config:this,context:h});l.successes.push({plugin:c,result:R}),c.name==="@oclif/plugin-legacy"&&e==="init"&&this.insertLegacyPlugins(R),p("done")}catch(E){if(l.failures.push({error:E,plugin:c}),p(E),!r&&E.oclif?.exit!==void 0&&E.oclif?.exit!==0&&E.code!=="MODULE_NOT_FOUND")throw E}_?.addDetails({event:e,hook:g.target,plugin:c.name}),_?.stop()}});return await Promise.all(f),an("%s hook done",e),s?.stop(),l}s3Key(e,t,i={}){typeof t=="object"?i=t:t&&(i.ext=t);let r=this.updateConfig.s3?.templates?.[i.platform?"target":"vanilla"][e]??"";return xg.render(r,{...this,...i})}s3Url(e){let{host:t}=this.updateConfig.s3??{host:void 0};if(!t)throw new Error("no s3 host is set");let i=new Na.URL(t);return i.pathname=(0,it.join)(i.pathname,e),i.toString()}scopedEnvVar(e){return process.env[this.scopedEnvVarKeys(e).find(t=>process.env[t])]}scopedEnvVarKey(e){return[this.bin,e].map(t=>t.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(e){return[this.bin,...this.binAliases??[]].filter(Boolean).map(t=>[t.replaceAll("@","").replaceAll(/[/-]/g,"_"),e].join("_").toUpperCase())}scopedEnvVarTrue(e){let t=this.scopedEnvVar(e);return t==="1"||t==="true"}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,it.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}buildS3Config(){let e=this.pjson.oclif.update?.s3,t=this.scopedEnvVar("S3_BUCKET")??e?.bucket,i=e?.host??(t&&`https://${t}.s3.amazonaws.com`),r={...e?.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...e?.templates&&e?.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...e?.templates&&e?.templates.vanilla}};return{bucket:t,host:i,templates:r}}getCmdLookupId(e){return this._commands.has(e)?e:this.commandPermutations.hasValid(e)?this.commandPermutations.getValid(e):e}getTopicLookupId(e){return this._topics.has(e)?e:this.topicPermutations.hasValid(e)?this.topicPermutations.getValid(e):e}insertLegacyPlugins(e){for(let t of e){this.plugins.set(t.name,t);for(let i of t.commands??[]){this._commands.delete(i.id);for(let r of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(r)}this.loadCommands(t)}}isJitPluginCommand(e){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(e.pluginName??"")&&!!(e?.pluginName&&!this.plugins.has(e.pluginName))}loadCommands(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.loadCommands#${e.name}`,{plugin:e.name});for(let i of e.commands){if(this._commands.has(i.id)){let o=(0,Ta.determinePriority)(this.pjson.oclif.plugins??[],[this._commands.get(i.id),i]);this._commands.set(o.id,o)}else this._commands.set(i.id,i);let r=this.flexibleTaxonomy&&i.permutations===void 0?(0,cn.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let o of r)this.commandPermutations.add(o,i.id);let s=(o,a=!1)=>{let l=(0,Fg.toStandardizedId)(o,this);if(this._commands.has(l)){let f=(0,Ta.determinePriority)(this.pjson.oclif.plugins??[],[this._commands.get(l),i]);this._commands.set(l,{...f,id:l})}else this._commands.set(l,{...i,hidden:a,id:l});let d=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,cn.getCommandIdPermutations)(l):i.permutations??[l];for(let f of d)this.commandPermutations.add(f,i.id)};for(let o of i.aliases??[])s(o);for(let o of i.hiddenAliases??[])s(o,!0)}t?.addDetails({commandCount:e.commands.length}),t?.stop()}loadTopics(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.loadTopics#${e.name}`,{plugin:e.name});for(let i of(0,ni.compact)(e.topics)){let r=this._topics.get(i.name);r?(r.description=i.description||r.description,r.hidden=r.hidden||i.hidden):this._topics.set(i.name,i);let s=this.flexibleTaxonomy?(0,cn.getCommandIdPermutations)(i.name):[i.name];for(let o of s)this.topicPermutations.add(o,i.name)}for(let i of e.commands.filter(r=>!r.hidden)){let r=i.id.split(":");for(;r.length>0;){let s=r.join(":");s&&!this._topics.has(s)&&this._topics.set(s,{description:i.summary||i.description,name:s}),r.pop()}}t?.stop()}maybeAdjustDebugSetting(){this.scopedEnvVarTrue("DEBUG")&&(on.settings.debug=!0,Ha())}warn(e,t){if(!this.warned){if(typeof e=="string"){process.emitWarning(e);return}if(e instanceof Error){let i=e;i.name=`${e.name} Plugin: ${this.name}`,i.detail=(0,ni.compact)([e.detail,`module: ${this._base}`,t&&`task: ${t}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
67
|
+
`)[0])}};M.Help=Kn;function Xo(n){return n&&n.default?n.default:n}function Vh(n){return typeof n=="string"?{identifier:"default",target:n}:n.identifier?n:{...n,identifier:"default"}}async function Gh(n){if(n.pjson.oclif?.helpClass){let{identifier:e,target:t}=Vh(n.pjson.oclif?.helpClass);try{let i=await(0,Rh.tsPath)(n.root,t)??t,r=await(0,Th.load)(n,i),s=r[e]??(e==="default"?Xo(r):void 0);return Xo(s)}catch(i){throw new Error(`Unable to load configured help class "${t}", failed with message:
|
|
68
|
+
${i.message}`)}}return Kn}});var Xn=m(Ee=>{"use strict";u();var Cr=Ee&&Ee.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Exit=void 0;Ee.handle=ep;var zh=Cr(Xs()),Jh=Cr(fe()),Kh=Yt(),Xh=Q(),Yh=ze(),Zh=Fn(),Qh=Cr(Sn());Ee.Exit={exit(n=0){process.exit(n)}};async function ep(n){try{n||(n=new Yh.CLIError("no error?")),n.message==="SIGINT"&&Ee.Exit.exit(1);let e=!(n instanceof Zh.ExitError)&&!n.skipOclifErrorHandling,t=(0,Qh.default)(n),i=(0,zh.default)(n.stack||"",{pretty:!0});if(e){console.error(t??i);let s=Jh.default.getInstance().get("config");if(n.showHelp&&n.parse?.input?.argv&&s){let o={...s.pjson.oclif.helpOptions??s.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},a=new Kh.Help(s,o);console.error(),await a.showHelp(process.argv.slice(2))}}let r=n.oclif?.exit??1;n.code!=="EEXIT"&&i&&(0,Xh.getLogger)().error(i),Ee.Exit.exit(r)}catch(e){console.error(n.stack),console.error(e.stack),Ee.Exit.exit(1)}}});var Le=m(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.warn=J.handle=J.exit=J.ModuleLoadError=J.ExitError=J.CLIError=J.error=void 0;var tp=mt();Object.defineProperty(J,"error",{enumerable:!0,get:function(){return tp.error}});var np=ze();Object.defineProperty(J,"CLIError",{enumerable:!0,get:function(){return np.CLIError}});var ip=Fn();Object.defineProperty(J,"ExitError",{enumerable:!0,get:function(){return ip.ExitError}});var rp=Zi();Object.defineProperty(J,"ModuleLoadError",{enumerable:!0,get:function(){return rp.ModuleLoadError}});var sp=Nn();Object.defineProperty(J,"exit",{enumerable:!0,get:function(){return sp.exit}});var op=Xn();Object.defineProperty(J,"handle",{enumerable:!0,get:function(){return op.handle}});var ap=yt();Object.defineProperty(J,"warn",{enumerable:!0,get:function(){return ap.warn}})});var Ct=m(Y=>{"use strict";u();Object.defineProperty(Y,"__esModule",{value:!0});Y.Performance=Y.OCLIF_MARKER_OWNER=void 0;var Zt=$("node:perf_hooks"),Zo=Q(),cp=Ie();Y.OCLIF_MARKER_OWNER="@oclif/core";var jr=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(e,t,i={}){this.owner=e,this.name=t,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[r,s]=t.split("#"),[o,a]=r.split(".");this.module=o,this.method=a,this.scope=s,Zt.performance.mark(this.startMarker)}addDetails(e){this.details={...this.details,...e}}measure(){Zt.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Zt.performance.mark(this.stopMarker)}},Ir=class n{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!n.enabled||n._results.size>0)return;let e=[...n.markers.values()];if(e.length!==0){for(let t of e.filter(i=>!i.stopped))t.stop();return new Promise(t=>{new Zt.PerformanceObserver(r=>{for(let c of r.getEntries()){let p=n.markers.get(c.name);if(p){let h={details:p.details,duration:c.duration,method:p.method,module:p.module,name:c.name,scope:p.scope},y=n._results.get(p.owner)??[];n._results.set(p.owner,[...y,h])}}let s=n._results.get(Y.OCLIF_MARKER_OWNER)??[],o=s.find(c=>c.name.startsWith("config.runCommand")),a=o?n.getResult(Y.OCLIF_MARKER_OWNER,`plugin.findCommand#${o.details.plugin}.${o.details.command}`)?.duration??0:0,l=Object.fromEntries(s.filter(({name:c})=>c.startsWith("plugin.load#")).sort((c,p)=>p.duration-c.duration).map(({details:c,duration:p,scope:h})=>[h,{details:c,duration:p}])),d=s.filter(({name:c})=>c.startsWith("config.runHook#")).reduce((c,p)=>{let h=p.details.event;if(h)c[h]||(c[h]={}),c[h][p.scope]=p.duration;else{let y=p.scope;c[y]||(c[y]={}),c[y].total=p.duration}return c},{}),f=Object.fromEntries(s.filter(({name:c})=>c.startsWith("config.loadPlugins#")).sort((c,p)=>p.duration-c.duration).map(({duration:c,scope:p})=>[p,c]));n._oclifPerf={hookRunTimes:d,"oclif.commandLoadMs":a,"oclif.commandRunMs":s.find(({name:c})=>c.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":n.getResult(Y.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":f.core??0,"oclif.initHookMs":d.init?.total??0,"oclif.initMs":n.getResult(Y.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":f.link??0,"oclif.postrunHookMs":d.postrun?.total??0,"oclif.prerunHookMs":d.prerun?.total??0,"oclif.runMs":n.getResult(Y.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":f.user??0,pluginLoadTimes:l},t()}).observe({buffered:!0,entryTypes:["measure"]});for(let r of e)try{r.measure()}catch{}Zt.performance.clearMarks()})}}static debug(){if(!n.enabled)return;let e=(0,Zo.makeDebug)("perf"),t=(process.uptime()*1e3).toFixed(4);e("Process Uptime: %sms",t),e("Oclif Time: %sms",n.oclifPerf["oclif.runMs"].toFixed(4)),e("Init Time: %sms",n.oclifPerf["oclif.initMs"].toFixed(4)),e("Config Load Time: %sms",n.oclifPerf["oclif.configLoadMs"].toFixed(4)),e(" \u2022 Root Plugin Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),e(" \u2022 Plugins Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),e(" \u2022 Commands Load Time: %sms",n.getResult(Y.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),e("Core Plugin Load Time: %sms",n.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),e("User Plugin Load Time: %sms",n.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),e("Linked Plugin Load Time: %sms",n.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),e("Plugin Load Times:");for(let[s,o]of Object.entries(n.oclifPerf.pluginLoadTimes))o.details.hasManifest?e(` ${s}: ${o.duration.toFixed(4)}ms`):e(` ${s}: ${o.duration.toFixed(4)}ms (no manifest!)`);e("Hook Run Times:");for(let[s,o]of Object.entries(n.oclifPerf.hookRunTimes)){e(` ${s}:`);for(let[a,l]of Object.entries(o))e(` ${a}: ${l.toFixed(4)}ms`)}e("Command Load Time: %sms",n.oclifPerf["oclif.commandLoadMs"].toFixed(4)),e("Command Run Time: %sms",n.oclifPerf["oclif.commandRunMs"].toFixed(4)),n.oclifPerf["oclif.configLoadMs"]>n.oclifPerf["oclif.runMs"]&&e("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=(0,Zo.makeDebug)("non-oclif-perf"),r=n.results;if(r.size>0){i("Non-Core Performance Measurements:");for(let[s,o]of r){i(` ${s}:`);for(let a of o)i(` ${a.name}: ${a.duration.toFixed(4)}ms`)}}}static getResult(e,t){return n._results.get(e)?.find(i=>i.name===t)}static mark(e,t,i={}){if(!n.enabled)return;let r=new jr(e,t,i);return n.markers.set(r.name,r),r}static get enabled(){return cp.settings.performanceEnabled??!1}static get oclifPerf(){if(!n.enabled)return{};if(n._oclifPerf)return n._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return n.enabled?new Map([...n._results.entries()].filter(([e])=>e!==Y.OCLIF_MARKER_OWNER)):new Map}};Y.Performance=Ir});var Qo=m(Lr=>{"use strict";u();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.determinePriority=lp;function lp(n,e){return e.sort((i,r)=>{let s=i.pluginAlias??"A-Cannot-Find-This",o=r.pluginAlias??"B-Cannot-Find-This",a=n.indexOf(s),l=n.indexOf(o);return i.pluginType==="core"&&r.pluginType==="core"?a-l:r.pluginType==="core"&&i.pluginType!=="core"?1:i.pluginType==="core"&&r.pluginType!=="core"?-1:i.pluginType==="jit"&&r.pluginType!=="jit"?1:r.pluginType==="jit"&&i.pluginType!=="jit"?-1:0})[0]}});var ia=m(Qe=>{"use strict";u();var ta=Qe&&Qe.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getHomeDir=fp;Qe.getPlatform=na;Qe.getShell=hp;var up=ta(Pu()),dp=$("node:child_process"),Ar=$("node:os"),ea=ta($("node:path"));function fp(){return(0,Ar.homedir)()}function na(){return up.default?"wsl":(0,Ar.platform)()}function hp(){let n,e=process.env.SHELL??(0,Ar.userInfo)().shell?.split(ea.default.sep)?.pop();return e?n=e.split("/"):na()==="win32"?n=pp().split(ea.default.sep):n=["unknown"],n.at(-1)??"unknown"}function pp(){try{let n=(0,dp.execSync)(`powershell.exe -NoProfile -Command "(Get-CimInstance Win32_Process -Filter 'ProcessID = ${process.ppid}').Name"`,{encoding:"utf8"});return n.includes("powershell")||n.includes("pwsh")?"powershell":process.env.COMSPEC??"cmd.exe"}catch{return process.env.COMSPEC??"cmd.exe"}}});var ya=m(tt=>{u();Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"});var gp=Object.create,aa=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,yp=Object.getOwnPropertyNames,_p=Object.getPrototypeOf,wp=Object.prototype.hasOwnProperty,bp=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=yp(e),s=0,o=r.length,a;s<o;s++)a=r[s],!wp.call(n,a)&&a!==t&&aa(n,a,{get:(l=>e[l]).bind(null,a),enumerable:!(i=mp(e,a))||i.enumerable});return n},vp=(n,e,t)=>(t=n!=null?gp(_p(n)):{},bp(e||!n||!n.__esModule?aa(t,"default",{value:n,enumerable:!0}):t,n)),jt=$("fs"),Ae=$("path"),Ep=$("url"),$p=Nu(),et=Ru();et=vp(et,1);var Op=Array.isArray,ca=/\\/g,Pp=/^[A-Za-z]:$/,Sr=process.platform==="win32",Cp=/^(\/?\.\.)+$/;function jp(n,e={}){let t=n.length,i=Array(t),r=Array(t),s,o;for(s=0;s<t;s++){let a=la(n[s]);i[s]=a;let l=a.length,d=Array(l);for(o=0;o<l;o++)d[o]=(0,et.default)(a[o],e);r[s]=d}return a=>{let l=a.split("/");if(l[0]===".."&&Cp.test(a))return!0;for(s=0;s<t;s++){let d=i[s],f=r[s],c=l.length,p=Math.min(c,d.length);for(o=0;o<p;){let h=d[o];if(h.includes("/"))return!0;if(!f[o](l[o]))break;if(!e.noglobstar&&h==="**")return!0;o++}if(o===c)return!0}return!1}}var Ip=/^[A-Z]:\/$/i,Lp=Sr?n=>Ip.test(n):n=>n==="/";function ra(n,e,t){if(n===e||e.startsWith(`${n}/`)){if(t){let r=n.length+ +!Lp(n);return(s,o)=>s.slice(r,o?-1:void 0)||"."}let i=e.slice(n.length+1);return i?(r,s)=>{if(r===".")return i;let o=`${i}/${r}`;return s?o.slice(0,-1):o}:(r,s)=>s&&r!=="."?r.slice(0,-1):r}return t?i=>Ae.posix.relative(n,i)||".":i=>Ae.posix.relative(n,`${e}/${i}`)||"."}function Ap(n,e){if(e.startsWith(`${n}/`)){let t=e.slice(n.length+1);return i=>`${t}/${i}`}return t=>{let i=Ae.posix.relative(n,`${e}/${t}`);return t[t.length-1]==="/"&&i!==""?`${i}/`:i||"."}}function sa(n){return n.replace(Pp,e=>`${e}/`)}var xp={parts:!0};function la(n){var e;let t=et.default.scan(n,xp);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[n]}var Sp=/\\(?![()[\]{}!+@])/g;function qp(n){return ua(n)}function Fp(n){return da(n).replace(Sp,"/")}var Rp=Sr?Fp:qp,Np=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Tp=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,ua=n=>n.replace(Np,"\\$&"),da=n=>n.replace(Tp,"\\$&"),fa=Sr?da:ua;function ha(n,e){if(e?.caseSensitiveMatch===!1)return!0;let t=et.default.scan(n);return t.isGlob||t.negated}function Qt(...n){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...n)}function pa(n){return typeof n=="string"?[n]:n??[]}var Dp=/^(\/?\.\.)+/,kp=/\\(?=[()[\]{}!*+?@|])/g;function xr(n,e,t,i){var r;let s=e.cwd,o=n;n[n.length-1]==="/"&&(o=n.slice(0,-1)),o[o.length-1]!=="*"&&e.expandDirectories&&(o+="/**");let a=fa(s);o=(0,Ae.isAbsolute)(o.replace(kp,""))?Ae.posix.relative(a,o):Ae.posix.normalize(o);let l=(r=Dp.exec(o))===null||r===void 0?void 0:r[0],d=la(o);if(l){let c=(l.length+1)/3,p=0,h=a.split("/");for(;p<c&&d[p+c]===h[h.length+p-c];)o=o.slice(0,(c-p-1)*3)+o.slice((c-p)*3+d[p+c].length+1)||".",p++;let y=Ae.posix.join(s,l.slice(p*3));y[0]!=="."&&t.root.length>y.length&&(t.root=sa(y),t.depthOffset=-c+p)}if(!i&&t.depthOffset>=0){var f;(f=t.commonPath)!==null&&f!==void 0||(t.commonPath=d);let c=[],p=Math.min(t.commonPath.length,d.length);for(let h=0;h<p;h++){let y=d[h];if(y==="**"&&!d[h+1]){c.pop();break}if(h===d.length-1||y!==t.commonPath[h]||ha(y))break;c.push(y)}t.depthOffset=c.length,t.commonPath=c,t.root=sa(c.length>0?Ae.posix.join(s,...c):s)}return o}function Mp(n,e,t){let i=[],r=[];for(let s of n.ignore)s&&(s[0]!=="!"||s[1]==="(")&&r.push(xr(s,n,t,!0));for(let s of e)s&&(s[0]!=="!"||s[1]==="("?i.push(xr(s,n,t,!1)):(s[1]!=="!"||s[2]==="(")&&r.push(xr(s.slice(1),n,t,!0)));return{match:i,ignore:r}}function Hp(n,e){let t=n.cwd,i={root:t,depthOffset:0},r=Mp(n,e,i);n.debug&&Qt("internal processing patterns:",r);let{absolute:s,caseSensitiveMatch:o,debug:a,dot:l,followSymbolicLinks:d,onlyDirectories:f}=n,c=i.root.replace(ca,""),p={dot:l,nobrace:n.braceExpansion===!1,nocase:!o,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},h=(0,et.default)(r.match,p),y=(0,et.default)(r.ignore,p),g=jp(r.match,p),_=ra(t,c,s),E=s?_:ra(t,c,!0),w=(R,F)=>{let I=E(F,!0);return I!=="."&&!g(I)||y(I)},P;n.deep!==void 0&&(P=Math.round(n.deep-i.depthOffset));let j=new $p.fdir({filters:[a?(R,F)=>{let I=_(R,F),We=h(I)&&!y(I);return We&&Qt(`matched ${I}`),We}:(R,F)=>{let I=_(R,F);return h(I)&&!y(I)}],exclude:a?(R,F)=>{let I=w(R,F);return Qt(`${I?"skipped":"crawling"} ${F}`),I}:w,fs:n.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:f,includeDirs:f||!n.onlyFiles,maxDepth:P,signal:n.signal}).crawl(c);return n.debug&&Qt("internal properties:",{...i,root:c}),[j,t!==c&&!s&&Ap(t,c)]}function ga(n,e){if(e)for(let t=n.length-1;t>=0;t--)n[t]=e(n[t]);return n}var oa={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Bp(n){let e=Object.assign({},n);for(let t in oa)e[t]===void 0&&Object.assign(e,{[t]:oa[t]});return e.cwd=(e.cwd instanceof URL?(0,Ep.fileURLToPath)(e.cwd):(0,Ae.resolve)(e.cwd||process.cwd())).replace(ca,"/"),e.ignore=pa(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||jt.readdir,readdirSync:e.fs.readdirSync||jt.readdirSync,realpath:e.fs.realpath||jt.realpath,realpathSync:e.fs.realpathSync||jt.realpathSync,stat:e.fs.stat||jt.stat,statSync:e.fs.statSync||jt.statSync}),e.debug&&Qt("globbing with options:",e),e}function ma(n,e={}){var t;if(n&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");let i=Op(n)||typeof n=="string",r=pa((t=i?n:n.patterns)!==null&&t!==void 0?t:"**/*"),s=Bp(i?e:n);return r.length>0?Hp(s,r):[]}async function Up(n,e){let[t,i]=ma(n,e);return t?ga(await t.withPromise(),i):[]}function Wp(n,e){let[t,i]=ma(n,e);return t?ga(t.sync(),i):[]}tt.convertPathToPattern=Rp;tt.escapePath=fa;tt.glob=Up;tt.globSync=Wp;tt.isDynamicPattern=ha});var Fr=m(H=>{"use strict";u();Object.defineProperty(H,"__esModule",{value:!0});H.help=H.version=H.string=H.url=H.file=H.directory=H.integer=void 0;H.custom=It;H.boolean=qr;H.option=Kp;var Vp=$("node:url"),Yn=Le(),Gp=Yt(),_a=we();function It(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],multiple:!!(e.multiple===void 0?n?.multiple??!1:e.multiple),type:"option"})}function qr(n={}){return{parse:async(e,t)=>e,...n,allowNo:!!n.allowNo,type:"boolean"}}H.integer=It({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Yn.CLIError(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Yn.CLIError(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Yn.CLIError(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});H.directory=It({async parse(n,e,t){return t.exists?(0,_a.dirExists)(n):n}});H.file=It({async parse(n,e,t){return t.exists?(0,_a.fileExists)(n):n}});H.url=It({async parse(n){try{return new Vp.URL(n)}catch{throw new Yn.CLIError(`Expected a valid url but received: ${n}`)}}});H.string=It();var zp=(n={})=>qr({description:"Show CLI version.",...n,async parse(e,t){t.log(t.config.userAgent),t.exit(0)}});H.version=zp;var Jp=(n={})=>qr({description:"Show CLI help.",...n,async parse(e,t){let i=await(0,Gp.loadHelpClass)(t.config);await new i(t.config,t.config.pjson.oclif.helpOptions??t.config.pjson.helpOptions).showHelp(t.id?[t.id,...t.argv]:t.argv),t.exit(0)}});H.help=Jp;function Kp(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],multiple:!!(e.multiple===void 0?n.multiple:e.multiple),type:"option"})}});var Nr=m(Rr=>{"use strict";u();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.aggregateFlags=Zp;var Xp=Fr(),Yp=(0,Xp.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function Zp(n,e,t){let i={...e,...n};return t?{json:Yp,...i}:i}});var va=m(Tr=>{"use strict";u();Object.defineProperty(Tr,"__esModule",{value:!0});Tr.cacheCommand=rg;var Qp=Nr(),wa=lr(),eg=Vn(),tg=N();function ba(n,e){let t=Object.getPrototypeOf(e),i=(0,tg.pickBy)(t,r=>r!==void 0);return Object.keys(t).length>0?ba({...i,...n},t):n}async function ng(n,e){let t=Object.entries(n).map(async([i,r])=>[i,{aliases:r.aliases,char:r.char,charAliases:r.charAliases,combinable:r.combinable,dependsOn:r.dependsOn,deprecateAliases:r.deprecateAliases,deprecated:r.deprecated,description:r.description,env:r.env,exclusive:r.exclusive,helpGroup:r.helpGroup,helpLabel:r.helpLabel,hidden:r.hidden,name:i,noCacheDefault:r.noCacheDefault,relationships:r.relationships,required:r.required,summary:r.summary,...r.type==="boolean"?{allowNo:r.allowNo,type:r.type}:{default:await(0,wa.cacheDefaultValue)(r,e),delimiter:r.delimiter,hasDynamicHelp:typeof r.defaultHelp=="function",helpValue:r.helpValue,multiple:r.multiple,options:r.options,type:r.type}}]);return Object.fromEntries(await Promise.all(t))}async function ig(n,e){let t=Object.entries(n).map(async([i,r])=>[i,{default:await(0,wa.cacheDefaultValue)(r,e),description:r.description,hidden:r.hidden,multiple:r.multiple,name:i,noCacheDefault:r.noCacheDefault,options:r.options,required:r.required}]);return Object.fromEntries(await Promise.all(t))}async function rg(n,e,t=!1){let i=ba(n,n),r=i.flags??i._flags,s=i.baseFlags??i._baseFlags,[o,a]=await Promise.all([ng((0,Qp.aggregateFlags)(r,s,i.enableJsonFlag),t),ig((0,eg.ensureArgObject)(i.args),t)]),l={aliases:(i.aliases??[]).map(h=>h.replaceAll(" ",":")),args:a,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:o,hasDynamicHelp:Object.values(o).some(h=>h.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:e&&e.alias,pluginName:e&&e.name,pluginType:e&&e.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},d=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],f=new Set([...d,...Object.keys(l)]),c=Object.keys(i).filter(h=>!f.has(h)),p=Object.fromEntries(c.map(h=>[h,i[h]]));return{...l,...p}}});var $a=m(Qn=>{"use strict";u();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.debug=ne;Qn.findRoot=ug;var ie=$("node:path"),sg=Q(),Zn=we();function ne(...n){return(e,...t)=>(0,sg.getLogger)(["find-root",...n].join(":")).debug(e,...t)}function*Dr(n){for(;(0,ie.dirname)(n)!==n;)yield n,n=(0,ie.dirname)(n);yield n}async function Ea(n,e){if(ne(e??"root-plugin")(`Finding root starting at ${n}`),e){for(let t of Dr(n))if(t.endsWith((0,ie.basename)(e)))return ne(e)("Found root based on plugin name!"),t}for(let t of Dr(n))if(!((0,ie.basename)((0,ie.dirname)(t))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,ie.basename)(t))))try{let i=(0,ie.join)(t,"package.json");if(ne(e??"root-plugin")(`Checking ${i}`),await(0,Zn.safeReadJson)(i))return ne(e??"root-plugin")("Found root by traversing up from starting point!"),(0,ie.dirname)(i)}catch{}}async function og(n,e){ne(n??"root-plugin")("Finding root using legacy method");for(let t of Dr(e)){let i;if(n){if(i=(0,ie.join)(t,"node_modules",n,"package.json"),await(0,Zn.safeReadJson)(i))return(0,ie.dirname)(i);if((await(0,Zn.safeReadJson)((0,ie.join)(t,"package.json")))?.name===n)return t}else if(i=(0,ie.join)(t,"package.json"),await(0,Zn.safeReadJson)(i))return(0,ie.dirname)(i)}}var De;function ag(n){if(De)return De;try{return De=$($.resolve("pnpapi",{paths:[n]})),De}catch{}}var kr=n=>JSON.stringify(n),cg=(n,e,t)=>kr(n?.packageDependencies.get(t))===kr(e?.packageDependencies.get(t));function lg(n,e){if(ag(e),!De)return;ne(n)("Finding root for using pnp method");let t=new Set,i=(r,s)=>{let o=kr(r);if(t.has(o))return;let a=De.getPackageInformation(r);if(r.name===n)return a.packageLocation;t.add(o);for(let[l,d]of a.packageDependencies){if(d===null||s!==null&&cg(a,s,l))continue;let f=De.getLocator(l,d),c=i(f,a);if(c)return c}t.delete(o)};for(let r of De.getDependencyTreeRoots()){let s=i(r);if(s)return s}}async function ug(n,e){if(n){ne(n)(`Finding root using ${e}`);let i;try{i=$.resolve(n,{paths:[e]}),ne(n)("Found starting point with require.resolve")}catch{ne(n)("require.resolve could not find plugin starting point")}if(i){let s=await Ea((0,ie.dirname)(i),n);if(s)return ne(n)(`Found root at ${s}`),s}let r=process.versions.pnp?lg(n,e):await og(n,e);return ne(n)(r?`Found root at ${r}`:"No root found!"),r}ne("root-plugin")(`Finding root plugin using ${e}`);let t=await Ea(e);return ne("root-plugin")(t?`Found root at ${t}`:"No root found!"),t}});var Pa=m(Mr=>{"use strict";u();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.readPjson=pg;var dg=Tu(),fg=$("node:path"),hg=Q(),Oa=we(),en=(0,hg.makeDebug)("read-pjson");async function pg(n){let e=(0,fg.join)(n,"package.json");if(process.env.OCLIF_DISABLE_RC)return en("OCLIF_DISABLE_RC is set, skipping rc search"),(0,Oa.readJson)(e);let t=await(0,Oa.readJson)(e);if(t.oclif)return en(`found oclif config in ${e}`),t;en(`searching for oclif config in ${n}`);let r=await(0,dg.lilconfig)("oclif",{searchPlaces:[".oclifrc",".oclifrc.json",".oclifrc.js",".oclifrc.mjs",".oclifrc.cjs","oclif.config.js","oclif.config.mjs","oclif.config.cjs"],stopDir:n}).search(n);return r?.config?(en(`found oclif config for ${n}: %O`,r),{...t,oclif:r?.config??{}}):(en(`no oclif config found in ${n}`),t)}});var Wr=m(At=>{"use strict";u();var gg=At&&At.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});At.Plugin=void 0;var tn=$("node:path"),Ca=$("node:util"),mg=ya(),yg=gg(fe()),nn=Le(),ei=Bt(),Lt=Ct(),xa=Mn(),_g=va(),wg=$a(),bg=we(),vg=Pa(),ja=N(),Hr=wt(),ti=_t(),Ia=yg.default.getInstance().get("@oclif/core");function Br(n,e){return n?(e=e?`${e}:`:"",Array.isArray(n)?[...n,n.flatMap(t=>Br(t.subtopics,`${e}${t.name}`))]:Object.keys(n).flatMap(t=>(n[t].name=t,[{...n[t],name:`${e}${t}`},...Br(n[t].subtopics,`${e}${n[t].name}`)]))):[]}var Eg=(n,e)=>!!(n?.commands[e]&&"isESM"in n.commands[e]&&"relativePath"in n.commands[e]),La=n=>typeof n.run=="function"?n:n.default&&n.default.run?n.default:Object.values(n).find(e=>typeof e.run=="function"),Aa=n=>{if(n&&typeof n.run=="function")return n},Sa=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function $g(n){return n.map(e=>{let t=(0,tn.parse)(e),i=t.dir.split("/"),r=t.name!=="index"&&t.name,s=[...i,r].filter(Boolean).join(":");return s===""?xa.SINGLE_COMMAND_CLI_SYMBOL:s})}function Og(n){if(n){if(typeof n=="string")return{globPatterns:Sa,strategy:"pattern",target:n};if(!n.target)throw new nn.CLIError("`oclif.commandDiscovery.target` is required.");if(!n.strategy)throw new nn.CLIError("`oclif.commandDiscovery.strategy` is required.");return n.strategy==="explicit"&&!n.identifier&&(n.identifier="default"),n}}function Pg(n){return typeof n=="string"?{identifier:"default",target:n}:n.identifier?n:{...n,identifier:"default"}}var Ur=class{options;_base=`${Ia.name}@${Ia.version}`;_debug=(0,ti.makeDebug)();alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(e){this.options=e}get topics(){return Br(this.pjson.oclif.topics||{})}async findCommand(e,t={}){let i=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${e}`,{id:e,plugin:this.name}),s=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let o=await this.getCommandsDir();if(!o)return;let a,l,d;try{({filePath:d,isESM:l,module:a}=Eg(this.manifest,e)?await(0,ei.loadWithDataFromManifest)(this.manifest.commands[e],this.root):await(0,ei.loadWithData)(this,(0,tn.join)(o??this.pjson.oclif.commands,...e.split(":")))),this._debug(l?"(import)":"(require)",d)}catch(c){if(!t.must&&c.code==="MODULE_NOT_FOUND")return;throw c}let f=La(a);return f?(f.id=e,f.plugin=this,f.isESM=l,f.relativePath=(0,tn.relative)(this.root,d||"").split(tn.sep),f):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let o=await this.loadCommandsFromTarget(),a=Aa(o?.[e]);return a?(a.id=e,a.plugin=this,a):void 0}})();return!s&&t.must&&(0,nn.error)(`command ${e} not found`),i?.stop(),s}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let e=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,wg.findRoot)(this.options.name,this.options.root);if(!e)throw new nn.CLIError(`could not find package.json with ${(0,Ca.inspect)(this.options)}`);if(this.root=e,this._debug(`loading ${this.type} plugin from ${e}`),this.pjson=this.options.pjson??await(0,vg.readPjson)(e),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new nn.CLIError(`no name in package.json (${e})`);this._debug=(0,ti.makeDebug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([t,i])=>[t,(0,ja.castArray)(i).map(r=>Pg(r))])),this.commandDiscoveryOpts=Og(this.pjson.oclif?.commands),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([t,i])=>({...i,load:async()=>this.findCommand(t,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((t,i)=>t.id.localeCompare(i.id))}async _manifest(){let e=!!this.options.ignoreManifest,t=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,r=async(a=!1)=>{try{let l=(0,tn.join)(this.root,`${a?".":""}oclif.manifest.json`),d=await(0,bg.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&d.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${d.version}
|
|
69
|
+
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,d}catch(l){if(l.code==="ENOENT"){if(!a)return r(!0)}else this.warn(l,"readManifest")}},s=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!e){let a=await r();if(a)return s?.addDetails({commandCount:Object.keys(a.commands).length,fromCache:!0}),s?.stop(),this.commandIDs=Object.keys(a.commands),a}this.commandIDs=await this.getCommandIDs();let o={commands:(await Promise.all(this.commandIDs.map(async a=>{try{let l=await this.findCommand(a,{must:!0}),d=await(0,_g.cacheCommand)(l,this,i);if(d.id=a,this.flexibleTaxonomy){let f=(0,ti.getCommandIdPermutations)(a),c=d.aliases.flatMap(p=>(0,ti.getCommandIdPermutations)(p));return[a,{...d,aliasPermutations:c,permutations:f}]}return[a,d]}catch(l){let d=`findCommand (${a})`;if(!t)this.warn(l,d);else throw this.addErrorScope(l,d)}}))).filter(a=>!!a).reduce((a,[l,d])=>(a[l]=d,a),{}),version:this.version};return s?.addDetails({commandCount:Object.keys(o.commands).length,fromCache:!1}),s?.stop(),o}addErrorScope(e,t){return e.name=e.name??(0,Ca.inspect)(e).trim(),e.detail=(0,ja.compact)([e.detail,`module: ${this._base}`,t&&`task: ${t}`,`plugin: ${this.name}`,`root: ${this.root}`,...e.code?[`code: ${e.code}`]:[],...e.message?[`message: ${e.message}`]:[],"See more details with DEBUG=*"]).join(`
|
|
70
|
+
`),e}async getCommandIDs(){let e=Lt.Performance.mark(Lt.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),t;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{t=await this.getCommandIdsFromTarget()??[];break}case"pattern":{t=await this.getCommandIdsFromPattern();break}case"single":{t=await this.getCommandIdsFromTarget()??[];break}default:t=[]}return this._debug("found commands",t),e?.addDetails({count:t.length}),e?.stop(),t}async getCommandIdsFromPattern(){let e=await this.getCommandsDir();if(!e)return[];this._debug(`loading IDs from ${e}`);let t=await(0,mg.glob)(this.commandDiscoveryOpts?.globPatterns??Sa,{cwd:e});return $g(t)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,t])=>Aa(t)).map(([t])=>t)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let e=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts.target,this),t=await(0,ei.load)(this,e);return this.commandCache=t[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let e=await(0,Hr.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),t=await(0,ei.load)(this,e);return this.commandCache={[xa.SINGLE_COMMAND_CLI_SYMBOL]:La(t)},this.commandCache}}warn(e,t){typeof e=="string"&&(e=new Error(e));let i=this.addErrorScope(e,t);process.emitWarning(i.name,i)}};At.Plugin=Ur});var Ra=m(Jr=>{"use strict";u();Object.defineProperty(Jr,"__esModule",{value:!0});var Cg=Fu(),Vr=$("node:path"),xt=Ct(),Gr=we(),jg=N(),qa=Wr(),Ig=_t(),Fa=(0,Ig.makeDebug)();function nt(n,e){return Object.keys(n).filter(t=>e.some(i=>(0,Cg.minimatch)(t,i)))}var zr=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(e){this.options=e,e.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(e.plugins)?new Map(e.plugins.map(t=>[t.name,t])):e.plugins)}async loadChildren(e){return(!this.pluginsProvided||e.force)&&(await this.loadUserPlugins(e),await this.loadDevPlugins(e),await this.loadCorePlugins(e)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:e}){let t;if(this.pluginsProvided){let i=[...this.plugins.values()];t=i.find(r=>r.root===this.options.root)??i[0]}else{let i=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,"plugin.load#root");t=new qa.Plugin({isRoot:!0,pjson:e,root:this.options.root}),await t.load(),i?.addDetails({commandCount:t.commands.length,hasManifest:t.hasManifest??!1,name:t.name,topicCount:t.topics.length,type:t.type,usesMain:!!t.pjson.main}),i?.stop()}return this.plugins.set(t.name,t),t}async loadCorePlugins(e){let{plugins:t}=e.rootPlugin.pjson.oclif;if(t){let s=nt(e.rootPlugin.pjson.dependencies??{},t);await this.loadPlugins(e.rootPlugin.root,"core",s)}let{core:i,path:r}=e.pluginAdditions??{core:[]};if(i)if(r){let s=await(0,Gr.readJson)((0,Vr.join)(r,"package.json")),o=nt(s.dependencies??{},i);await this.loadPlugins(r,"core",o)}else{let s=nt(e.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(e.rootPlugin.root,"core",s)}}async loadDevPlugins(e){if(e.devPlugins!==!1){if((0,jg.isProd)())return;try{let{devPlugins:t}=e.rootPlugin.pjson.oclif;if(t){let s={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=nt(s??{},t);await this.loadPlugins(e.rootPlugin.root,"dev",o)}let{dev:i,path:r}=e.pluginAdditions??{core:[]};if(i)if(r){let s=await(0,Gr.readJson)((0,Vr.join)(r,"package.json")),o={...s.dependencies,...s.devDependencies},a=nt(o??{},i);await this.loadPlugins(r,"dev",a)}else{let s={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=nt(s??{},i);await this.loadPlugins(e.rootPlugin.root,"dev",o)}}catch(t){process.emitWarning(t)}}}async loadPlugins(e,t,i,r){if(!i||i.length===0)return;let s=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,`config.loadPlugins#${t}`);Fa("loading plugins",i),await Promise.all((i||[]).map(async o=>{try{let a=typeof o=="string"?o:o.name,l={name:a,root:e,type:t};if(typeof o!="string"&&(l.tag=o.tag||l.tag,l.root=o.root||l.root,l.url=o.url),r&&(l.parent=r),this.plugins.has(a))return;let d=xt.Performance.mark(xt.OCLIF_MARKER_OWNER,`plugin.load#${a}`),f=new qa.Plugin(l);if(await f.load(),d?.addDetails({commandCount:f.commands.length,hasManifest:f.hasManifest,name:f.name,topicCount:f.topics.length,type:f.type,usesMain:!!f.pjson.main}),d?.stop(),this.plugins.set(f.name,f),r&&(f.parent=r,r.children||(r.children=[]),r.children.push(f)),f.pjson.oclif.plugins){let c=t==="dev"?{...f.pjson.dependencies,...f.pjson.devDependencies}:f.pjson.dependencies,p=nt(c??{},f.pjson.oclif.plugins);await this.loadPlugins(f.root,t,p,f)}}catch(a){this.errors.push(a)}})),s?.addDetails({pluginCount:i.length}),s?.stop()}async loadUserPlugins(e){if(e.userPlugins!==!1)try{let t=(0,Vr.join)(e.dataDir,"package.json");Fa("reading user plugins pjson %s",t);let i=await(0,Gr.readJson)(t,!1);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(t,"user",i.oclif.plugins.filter(r=>r.type==="user")),await this.loadPlugins(t,"link",i.oclif.plugins.filter(r=>r.type==="link"))}catch(t){t.code!=="ENOENT"&&process.emitWarning(t)}}};Jr.default=zr});var Va=m((ae,Wa)=>{"use strict";u();var Lg=ae&&ae.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Ag=ae&&ae.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),xg=ae&&ae.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&Lg(t,e,i[r]);return Ag(t,e),t}})(),Ba=ae&&ae.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ae,"__esModule",{value:!0});ae.Config=void 0;var Sg=xg(Ks()),rn=$("node:os"),it=$("node:path"),Na=$("node:url"),Ua=Ba(fe()),St=Le(),qg=vt(),Kr=Q(),Fg=Bt(),K=Ct(),sn=Ie(),Ta=Qo(),Da=we(),Rg=Xe(),Xr=ia(),ni=N(),Ng=Ye(),Tg=oe(),Dg=Ba(Ra()),kg=wt(),an=_t(),on=(0,an.makeDebug)(),ka=Ua.default.getInstance().get("@oclif/core"),Ma=`${ka.name}@${ka.version}`,Mg=new Set(["preparse"]);function Ha(){process.listenerCount("warning")>1||process.on("warning",n=>{console.error(n.stack),n.detail&&console.error(n.detail)})}function Hg(n){let e=n.match(/[^-]+(?:-([^.]+))?/);return e&&e[1]||"stable"}function Bg(n){return n&&!!n._base}var ii=class extends Map{validPermutations=new Map;add(e,t){this.validPermutations.set(e,t);for(let i of(0,an.collectUsableIds)([e]))this.has(i)?this.set(i,this.get(i).add(t)):this.set(i,new Set([t]))}get(e){return super.get(e)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(e){return this.validPermutations.get(e)}hasValid(e){return this.validPermutations.has(e)}},Yr=class n{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;dirname;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";updateConfig;userAgent;userPJSON;valid;version;warned=!1;windows;_base=Ma;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new ii;pluginLoader;rootPlugin;topicPermutations=new ii;constructor(e){this.options=e}static async load(e=Wa.filename||__dirname){if((0,Kr.setLogger)(e),typeof e=="string"&&e.startsWith("file://")&&(e=(0,Na.fileURLToPath)(e)),typeof e=="string"&&(e={root:e}),Bg(e)){on(`reloading config from ${e._base} to ${Ma}`);let i=new Map(e.getPluginsList().map(s=>[s.name,s])),r=new n({...e.options,plugins:i});return await r.load(),r}let t=new n(e);return await t.load(),t}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(e=>e.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,ni.isProd)()}static get rootPlugin(){return this.rootPlugin}get topics(){return[...this._topics.values()]}get versionDetails(){let[e,t,i]=this.userAgent.split(" ");return{architecture:t,cliVersion:e,nodeVersion:i,osVersion:`${(0,rn.type)()} ${(0,rn.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(r=>[r.name,{root:r.root,type:r.type,version:r.version}])),rootPath:this.root,shell:this.shell}}dir(e){let t=process.env[`XDG_${e.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,it.join)(this.home,e==="data"?".local/share":"."+e);return(0,it.join)(t,this.dirname)}findCommand(e,t={}){let i=this.getCmdLookupId(e),r=this._commands.get(i);return t.must&&!r&&(0,St.error)(`command ${i} not found`),r}findMatches(e,t){let i=t.filter(o=>!(0,qg.getHelpFlagAdditions)(this).includes(o)&&o.startsWith("-")).map(o=>o.replaceAll("-",""));return[...this.commandPermutations.get(e)].map(o=>this._commands.get(o)).filter(o=>{let a=Object.entries(o.flags).flatMap(([l,d])=>d.char?[d.char,l]:[l]);return i.every(l=>a.includes(l))})}findTopic(e,t={}){let i=this.getTopicLookupId(e),r=this._topics.get(i);if(r)return r;if(t.must)throw new Error(`topic ${e} not found`)}getAllCommandIDs(){return this.getAllCommands().map(e=>e.id)}getAllCommands(){let e=[...this._commands.values()],t=[...this.commandPermutations.getAllValid()];for(let i of t)if(!this._commands.has(i)){let r=this._commands.get(this.getCmdLookupId(i));e.push({...r,id:i})}return e}getPluginsList(){return[...this.plugins.values()]}async load(){sn.settings.performanceEnabled=(sn.settings.performanceEnabled===void 0?this.options.enablePerf:sn.settings.performanceEnabled)??!1,sn.settings.debug&&Ha(),(0,Kr.setLogger)(this.options);let e=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new Dg.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let t=Ua.default.getInstance();t.set("rootPlugin",this.rootPlugin),t.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||Hg(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,rn.arch)()==="ia32"?"x86":(0,rn.arch)(),this.platform=(0,Xr.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=(0,Xr.getShell)(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Xr.getHomeDir)()||(0,rn.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,this.theme=await this.loadTheme(),this.updateConfig={...this.pjson.oclif.update,node:this.pjson.oclif.update?.node??{},s3:this.buildS3Config()},this.isSingleCommandCLI=!!(typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),this.maybeAdjustDebugSetting(),await this.loadPluginsAndCommands(),on("config done"),e?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((i,r)=>i+r.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),e?.stop()}async loadPluginsAndCommands(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:r}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:e?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=r,t?.stop();let s=K.Performance.mark(K.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let o of this.plugins.values())this.loadCommands(o),this.loadTopics(o);s?.stop();for(let o of i)this.warn(o)}async loadTheme(){if(this.scopedEnvVarTrue("DISABLE_THEME"))return;let e=(0,it.resolve)(this.configDir,"theme.json"),t=async()=>{if(this.pjson.oclif.theme)return typeof this.pjson.oclif.theme=="string"?(0,Da.safeReadJson)((0,it.resolve)(this.root,this.pjson.oclif.theme)):this.pjson.oclif.theme},[i,r]=await Promise.all([t(),(0,Da.safeReadJson)(e)]),s={...i,...r};return Object.keys(s).length>0?(0,Tg.parseTheme)(s):void 0}macosCacheDir(){return this.platform==="darwin"&&(0,it.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(e,t=[],i=null){let r=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runCommand#${e}`);on("runCommand %s %o",e,t);let s=i??this.findCommand(e);if(!s){let l=this.flexibleTaxonomy?this.findMatches(e,t):[],d=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:t,id:e,matches:l}):await this.runHook("command_not_found",{argv:t,id:e});if(d.successes[0])return d.successes[0].result;throw d.failures[0]?d.failures[0].error:new St.CLIError(`command ${e} not found`)}if(this.isJitPluginCommand(s)){let l=s.pluginName,d=this.pjson.oclif.jitPlugins[l],f=await this.runHook("jit_plugin_not_installed",{argv:t,command:s,id:e,pluginName:l,pluginVersion:d});if(f.failures[0])throw f.failures[0].error;if(f.successes[0])await this.loadPluginsAndCommands({force:!0}),s=this.findCommand(e)??s;else{let c=await this.runHook("command_not_found",{argv:t,id:e});if(c.successes[0])return c.successes[0].result;throw c.failures[0]?c.failures[0].error:new St.CLIError(`command ${e} not found`)}}let o=await s.load();await this.runHook("prerun",{argv:t,Command:o});let a=await o.run(t,this);if(s.id==="plugins:uninstall")for(let l of t)this.plugins.delete(l);return await this.runHook("postrun",{argv:t,Command:o,result:a}),r?.addDetails({command:e,plugin:s.pluginName}),r?.stop(),a}async runHook(e,t,i,r){let s=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runHook#${e}`);on("start %s hook",e);let o=c=>typeof c=="function"?c:c.default&&typeof c.default=="function"?c.default:Object.values(c).find(p=>typeof p=="function"),a=async(c,p)=>{let h,y=new Promise((g,_)=>{h=setTimeout(()=>{_(new Error(`Timed out after ${c} ms.`))},c).unref()});return Promise.race([p,y]).then(g=>(clearTimeout(h),g))},l={failures:[],successes:[]},f=(Mg.has(e)?[this.rootPlugin]:[...this.plugins.values()]).map(async c=>{let p=(0,Kr.makeDebug)([c.name,"hooks",e].join(":")),h={config:this,debug:p,error(g,_={}){(0,St.error)(g,_)},exit(g=0){(0,St.exit)(g)},log(g,..._){Ng.ux.stdout(g,..._)},warn(g){(0,St.warn)(g)}},y=c.hooks[e]||[];for(let g of y){let _=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.runHook#${c.name}(${g.target})`);try{let{filePath:E,isESM:w,module:P}=await(0,Fg.loadWithData)(c,await(0,kg.tsPath)(c.root,g.target,c));p("start",w?"(import)":"(require)",E);let j=P[g.identifier]??(g.identifier==="default"?o(P):void 0);if(!j){p("No hook found for hook definition:",g);continue}let R=i?await a(i,j.call(h,{...t,config:this,context:h})):await j.call(h,{...t,config:this,context:h});l.successes.push({plugin:c,result:R}),c.name==="@oclif/plugin-legacy"&&e==="init"&&this.insertLegacyPlugins(R),p("done")}catch(E){if(l.failures.push({error:E,plugin:c}),p(E),!r&&E.oclif?.exit!==void 0&&E.oclif?.exit!==0&&E.code!=="MODULE_NOT_FOUND")throw E}_?.addDetails({event:e,hook:g.target,plugin:c.name}),_?.stop()}});return await Promise.all(f),on("%s hook done",e),s?.stop(),l}s3Key(e,t,i={}){typeof t=="object"?i=t:t&&(i.ext=t);let r=this.updateConfig.s3?.templates?.[i.platform?"target":"vanilla"][e]??"";return Sg.render(r,{...this,...i})}s3Url(e){let{host:t}=this.updateConfig.s3??{host:void 0};if(!t)throw new Error("no s3 host is set");let i=new Na.URL(t);return i.pathname=(0,it.join)(i.pathname,e),i.toString()}scopedEnvVar(e){return process.env[this.scopedEnvVarKeys(e).find(t=>process.env[t])]}scopedEnvVarKey(e){return[this.bin,e].map(t=>t.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(e){return[this.bin,...this.binAliases??[]].filter(Boolean).map(t=>[t.replaceAll("@","").replaceAll(/[/-]/g,"_"),e].join("_").toUpperCase())}scopedEnvVarTrue(e){let t=this.scopedEnvVar(e);return t==="1"||t==="true"}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,it.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}buildS3Config(){let e=this.pjson.oclif.update?.s3,t=this.scopedEnvVar("S3_BUCKET")??e?.bucket,i=e?.host??(t&&`https://${t}.s3.amazonaws.com`),r={...e?.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...e?.templates&&e?.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...e?.templates&&e?.templates.vanilla}};return{bucket:t,host:i,templates:r}}getCmdLookupId(e){return this._commands.has(e)?e:this.commandPermutations.hasValid(e)?this.commandPermutations.getValid(e):e}getTopicLookupId(e){return this._topics.has(e)?e:this.topicPermutations.hasValid(e)?this.topicPermutations.getValid(e):e}insertLegacyPlugins(e){for(let t of e){this.plugins.set(t.name,t);for(let i of t.commands??[]){this._commands.delete(i.id);for(let r of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(r)}this.loadCommands(t)}}isJitPluginCommand(e){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(e.pluginName??"")&&!!(e?.pluginName&&!this.plugins.has(e.pluginName))}loadCommands(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.loadCommands#${e.name}`,{plugin:e.name});for(let i of e.commands){if(this._commands.has(i.id)){let o=(0,Ta.determinePriority)(this.pjson.oclif.plugins??[],[this._commands.get(i.id),i]);this._commands.set(o.id,o)}else this._commands.set(i.id,i);let r=this.flexibleTaxonomy&&i.permutations===void 0?(0,an.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let o of r)this.commandPermutations.add(o,i.id);let s=(o,a=!1)=>{let l=(0,Rg.toStandardizedId)(o,this);if(this._commands.has(l)){let f=(0,Ta.determinePriority)(this.pjson.oclif.plugins??[],[this._commands.get(l),i]);this._commands.set(l,{...f,id:l})}else this._commands.set(l,{...i,hidden:a,id:l});let d=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,an.getCommandIdPermutations)(l):i.permutations??[l];for(let f of d)this.commandPermutations.add(f,i.id)};for(let o of i.aliases??[])s(o);for(let o of i.hiddenAliases??[])s(o,!0)}t?.addDetails({commandCount:e.commands.length}),t?.stop()}loadTopics(e){let t=K.Performance.mark(K.OCLIF_MARKER_OWNER,`config.loadTopics#${e.name}`,{plugin:e.name});for(let i of(0,ni.compact)(e.topics)){let r=this._topics.get(i.name);r?(r.description=i.description||r.description,r.hidden=r.hidden||i.hidden):this._topics.set(i.name,i);let s=this.flexibleTaxonomy?(0,an.getCommandIdPermutations)(i.name):[i.name];for(let o of s)this.topicPermutations.add(o,i.name)}for(let i of e.commands.filter(r=>!r.hidden)){let r=i.id.split(":");for(;r.length>0;){let s=r.join(":");s&&!this._topics.has(s)&&this._topics.set(s,{description:i.summary||i.description,name:s}),r.pop()}}t?.stop()}maybeAdjustDebugSetting(){this.scopedEnvVarTrue("DEBUG")&&(sn.settings.debug=!0,Ha())}warn(e,t){if(!this.warned){if(typeof e=="string"){process.emitWarning(e);return}if(e instanceof Error){let i=e;i.name=`${e.name} Plugin: ${this.name}`,i.detail=(0,ni.compact)([e.detail,`module: ${this._base}`,t&&`task: ${t}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
71
71
|
`),process.emitWarning(e);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),e.name=`${e.name} Plugin: ${this.name}`,e.detail=(0,ni.compact)([e.detail,`module: ${this._base}`,t&&`task: ${t}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
72
|
-
`),process.emitWarning(JSON.stringify(e))}}};ae.Config=Yr});var ri=m(ke=>{"use strict";u();Object.defineProperty(ke,"__esModule",{value:!0});ke.tsPath=ke.Plugin=ke.Config=void 0;var
|
|
73
|
-
`)}});var as=m(x=>{"use strict";u();var za=x&&x.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(x,"__esModule",{value:!0});x.ViolatedFlagConstraintError=x.FailedFlagValidationError=x.ArgInvalidOptionError=x.FlagInvalidOptionError=x.NonExistentFlagsError=x.UnexpectedArgsError=x.RequiredArgsError=x.InvalidArgsSpecError=x.CLIParseError=x.CLIError=void 0;var qt=za(fe()),
|
|
72
|
+
`),process.emitWarning(JSON.stringify(e))}}};ae.Config=Yr});var ri=m(ke=>{"use strict";u();Object.defineProperty(ke,"__esModule",{value:!0});ke.tsPath=ke.Plugin=ke.Config=void 0;var Ug=Va();Object.defineProperty(ke,"Config",{enumerable:!0,get:function(){return Ug.Config}});var Wg=Wr();Object.defineProperty(ke,"Plugin",{enumerable:!0,get:function(){return Wg.Plugin}});var Vg=wt();Object.defineProperty(ke,"tsPath",{enumerable:!0,get:function(){return Vg.tsPath}})});var Ga=m(Zr=>{"use strict";u();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.default=Xg;var Gg=Du(),zg=ht(),Jg=N();function Kg(n,e){return Gg(n,zg.stdtermwidth,{skipScheme:"ansi-color"})(e).trim()}function Xg(n){if(n.length===0)return"";let e=(0,Jg.maxBy)(n,i=>i[0].length)?.[0].length??0;return n.map(i=>{let r=i[0],s=i[1];return s?(r=r.padEnd(e),s=Kg(e+2,s),`${r} ${s}`):r}).join(`
|
|
73
|
+
`)}});var as=m(x=>{"use strict";u();var za=x&&x.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(x,"__esModule",{value:!0});x.ViolatedFlagConstraintError=x.FailedFlagValidationError=x.ArgInvalidOptionError=x.FlagInvalidOptionError=x.NonExistentFlagsError=x.UnexpectedArgsError=x.RequiredArgsError=x.InvalidArgsSpecError=x.CLIParseError=x.CLIError=void 0;var qt=za(fe()),Yg=Le(),Ja=N(),Ka=za(Ga()),Xa=oe(),Zg=Le();Object.defineProperty(x,"CLIError",{enumerable:!0,get:function(){return Zg.CLIError}});var pe=class extends Yg.CLIError{parse;showHelp=!1;constructor(e){e.message+=`
|
|
74
74
|
See more help with --help`,super(e.message,{exit:e.exit}),this.parse=e.parse}};x.CLIParseError=pe;var Qr=class extends pe{args;constructor({args:e,exit:t,parse:i,reason:r}){let s="Invalid argument spec";r&&(s+=`: ${r}`);let o=Object.values(e).filter(a=>a.name);if(o.length>0){let a=(0,Ka.default)(o.map(l=>[`${l.name} (${l.required?"required":"optional"})`,l.description]));s+=`:
|
|
75
75
|
${a}`}super({exit:qt.default.getInstance().get("exitCodes")?.invalidArgsSpec??t,message:s,parse:i}),this.args=e}};x.InvalidArgsSpecError=Qr;var es=class extends pe{args;constructor({args:e,exit:t,flagsWithMultiple:i,parse:r}){let s=`Missing ${e.length} required arg${e.length===1?"":"s"}`,o=e.filter(a=>a.name);if(o.length>0){let a=(0,Ka.default)(o.map(l=>{let d=l.options?`(${l.options.join("|")}) ${l.description}`:l.description;return[l.name,d]}));s+=`:
|
|
76
76
|
${a}`}if(i?.length){let a=i.map(l=>`--${l}`).join(", ");s+=`
|
|
@@ -80,20 +80,20 @@ Alternatively, you can use "--" to signify the end of the flags and the beginnin
|
|
|
80
80
|
${(0,Xa.colorize)("dim",s.join(`
|
|
81
81
|
`))}`;super({exit:qt.default.getInstance().get("exitCodes")?.failedFlagValidation??e,message:a,parse:i})}};x.FailedFlagValidationError=ss;var os=class extends pe{constructor({exit:e,failed:t,parse:i}){let r=t.map(l=>l.reason),s=(0,Ja.uniq)(r),a=`The following ${s.length===1?"error":"errors"} occurred:
|
|
82
82
|
${(0,Xa.colorize)("dim",s.join(`
|
|
83
|
-
`))}`;super({exit:qt.default.getInstance().get("exitCodes")?.violatedFlagConstraint??e,message:a,parse:i})}};x.ViolatedFlagConstraintError=os});var Za=m($e=>{"use strict";u();var
|
|
83
|
+
`))}`;super({exit:qt.default.getInstance().get("exitCodes")?.violatedFlagConstraint??e,message:a,parse:i})}};x.ViolatedFlagConstraintError=os});var Za=m($e=>{"use strict";u();var Qg=$e&&$e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($e,"__esModule",{value:!0});$e.Parser=$e.readStdin=void 0;var em=$("node:os"),tm=$("node:readline"),Ya=Qg(fe()),nm=Q(),Me=N(),rt=as(),ge;try{ge=process.env.CLI_FLAGS_DEBUG==="1"?(0,nm.makeDebug)("parser"):()=>{}}catch{ge=()=>{}}var im=async()=>{let{stdin:n,stdout:e}=process;return n.isTTY?null:globalThis.oclif?.stdinCache?(ge("resolved stdin from global cache",globalThis.oclif.stdinCache),globalThis.oclif.stdinCache):new Promise(t=>{let i=[],r=new AbortController,{signal:s}=r,o=setTimeout(()=>r.abort(),10),a=(0,tm.createInterface)({input:n,output:e,terminal:!1});a.on("line",l=>{i.push(l)}),a.once("close",()=>{let l=i.join(em.EOL);clearTimeout(o),ge("resolved from stdin",l),globalThis.oclif={...globalThis.oclif,stdinCache:l},t(l)}),s.addEventListener("abort",()=>{ge("stdin aborted"),clearTimeout(o),a.close(),t(null)},{once:!0})})};$e.readStdin=im;function rm(n){return/^-\d/g.test(n)}var si=(n,e)=>{if(n.options&&!n.options.includes(e))throw new rt.FlagInvalidOptionError(n,e);return e},oi="--no-",cs=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(e){this.input=e,this.context=e.context??{},this.argv=[...e.argv],this._setNames(),this.booleanFlags=(0,Me.pickBy)(e.flags,t=>t.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(e.flags).flatMap(t=>[...t.aliases??[],...t.charAliases??[]].map(i=>[i,t])))}get _argTokens(){return this.raw.filter(e=>e.type==="arg")}async parse(){this._debugInput();let e=async c=>{let{isLong:p,name:h}=this.findFlag(c);if(!h){let g=c.indexOf("=");if(g!==-1){let _=c.slice(g+1);this.argv.unshift(_);let E=await e(c.slice(0,g));return E||this.argv.shift(),E}return!1}let y=this.input.flags[h];if(y.type==="option"){if(!y.multiple&&this.raw.some(_=>_.type==="flag"&&_.flag===h))throw new rt.CLIError(`Flag --${h} can only be specified once`);this.currentFlag=y;let g=p||c.length<3?this.argv.shift():c.slice(c[2]==="="?3:2);if(y.allowStdin==="only"&&g!=="-"&&g!==void 0&&!this.findFlag(g).name)throw new rt.CLIError(`Flag --${h} can only be read from stdin. The value must be "-" or not provided at all.`);if(y.allowStdin&&g==="-"||y.allowStdin==="only"){let _=await(0,$e.readStdin)();_&&(g=_.trim())}if(typeof g!="string"||this.findFlag(g).name)throw y.options?new rt.CLIError(`Flag --${h} expects one of these values: ${y.options.join(", ")}`):new rt.CLIError(`Flag --${h} expects a value`);this.raw.push({flag:y.name,input:g,type:"flag"})}else this.raw.push({flag:y.name,input:c,type:"flag"}),!p&&c.length>2&&this.argv.unshift(`-${c.slice(2)}`);return!0},t=!0,i=[],r=!1,s=[...this.argv];for(;this.argv.length>0;){let c=this.argv.shift();if(t&&c.startsWith("-")&&c!=="-"){if(this.input["--"]!==!1&&c==="--"){t=!1;continue}if(await e(c))continue;if(c==="--"){r=!0;continue}if(this.input["--"]!==!1&&!rm(c)){i.push(c);continue}}if(t&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:c,type:"flag"});continue}let p=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:p,input:c,type:"arg"})}let[{args:o,argv:a},{flags:l,metadata:d}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(a,o,l);let f=r?[...a,...i,"--"]:[...a,...i];return{args:o,argv:f.sort((c,p)=>s.indexOf(c)-s.indexOf(p)),flags:l,metadata:d,nonExistentFlags:i,raw:this.raw}}async _args(){let e=[],t={},i=this._argTokens,r=!1,s=this.context,o=async(c,p,h)=>{if(p.options&&!p.options.includes(h))throw new rt.ArgInvalidOptionError(p,h);s.token={arg:c,input:h,type:"arg"};let y=await p.parse(h,s,p);e.push(y),t[c]=y},a=async(c,p)=>{if(t[c]!==void 0||!p.default&&p.default!==!1)return;let h=typeof p.default=="function"?await p.default():p.default;if(Array.isArray(h))for(let y of h)e.push(y);else e.push(h);t[c]=h},l=async(c,p)=>{if(p.ignoreStdin||r)return;let h=await(0,$e.readStdin)();r=!0,h&&(h=h.trim(),await o(c,p,h))},d=Object.entries(this.input.args),f=d.findIndex(([,c])=>c.multiple);if(f===-1){for(let[c,p]of d){let h=i.find(y=>y.arg===c);s.token=h,await(h?o(c,p,h.input):l(c,p)),await a(c,p)}for(let c of i)t[c.arg]===void 0&&e.push(c.input)}else{let c=i.map(g=>g.input);for(let g=0;g<f;g++){let[_,E]=d[g],w=c.shift();await(w===void 0?l(_,E):o(_,E,w)),await a(_,E)}let p=[];for(let g=d.length-1;g>f;g--){let[_,E]=d[g],w=c.pop();w!==void 0&&p.unshift({arg:E,input:w,name:_})}let[h,y]=d[f];if(c.length>0){let g=[];for(let _ of c)await o(h,y,_),g.push(t[h]);t[h]=g}for(let{arg:g,input:_,name:E}of p)await o(E,g,_);await a(h,y);for(let g=f+1;g<d.length;g++){let[_,E]=d[g];await a(_,E)}}return{args:t,argv:e}}_debugInput(){ge("input: %s",this.argv.join(" "));let e=Object.keys(this.input.args);e.length>0&&ge("available args: %s",e.join(" ")),Object.keys(this.input.flags).length!==0&&ge("available flags: %s",Object.keys(this.input.flags).map(t=>`--${t}`).join(" "))}_debugOutput(e,t,i){i.length>0&&ge("argv: %o",i),Object.keys(e).length>0&&ge("args: %o",e),Object.keys(t).length>0&&ge("flags: %o",t)}async _flags(){let e=async(c,p,h,y)=>{if(!p.parse)return c;let g={...h,error:h?.error,exit:h?.exit,jsonEnabled:h?.jsonEnabled,log:h?.log,logToStderr:h?.logToStderr,token:y,warn:h?.warn};try{return p.type==="boolean"?await p.parse(c,g,p):await p.parse(c,g,p)}catch(_){throw _.message=`Parsing --${p.name}
|
|
84
84
|
${_.message}
|
|
85
|
-
See more help with --help`,Ya.default.getInstance().get("exitCodes")?.failedFlagParsing&&(_.oclif={exit:Ya.default.getInstance().get("exitCodes")?.failedFlagParsing}),_}},t=c=>{if(c.tokens?.length){if(c.inputFlag.flag.type==="boolean"&&(0,Me.last)(c.tokens)?.input){let h=y=>{let g=[y.inputFlag.name,...y.inputFlag.flag.aliases??[]].map(E=>`${oi}${E}`),_=(0,Me.last)(y.tokens)?.input;return _?!g.includes(_):!0};return{...c,valueFunction:async y=>e(h(y),y.inputFlag.flag,this.context,(0,Me.last)(y.tokens))}}if(c.inputFlag.flag.type==="option"&&c.inputFlag.flag.delimiter&&c.inputFlag.flag.multiple){let h=y=>new RegExp(`(?<!\\\\)${y}`);return{...c,valueFunction:async y=>(await Promise.all((y.tokens??[]).flatMap(g=>g.input.split(h(y.inputFlag.flag.delimiter??","))).map(g=>g.trim().replaceAll(new RegExp(`\\\\${y.inputFlag.flag.delimiter}`,"g"),y.inputFlag.flag.delimiter??",").replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async g=>e(g,y.inputFlag.flag,this.context,{...(0,Me.last)(y.tokens),input:g})))).map(g=>si(y.inputFlag.flag,g))}}if(c.inputFlag.flag.type==="option"&&c.inputFlag.flag.multiple)return{...c,valueFunction:async h=>Promise.all((c.tokens??[]).map(y=>e(si(h.inputFlag.flag,y.input),h.inputFlag.flag,this.context,y)))};if(c.inputFlag.flag.type==="option")return{...c,valueFunction:async h=>e(si(h.inputFlag.flag,(0,Me.last)(c.tokens)?.input),h.inputFlag.flag,this.context,(0,Me.last)(c.tokens))}}if(c.inputFlag.flag.env&&process.env[c.inputFlag.flag.env]){let h=process.env[c.inputFlag.flag.env];if(c.inputFlag.flag.type==="option"&&h)return{...c,valueFunction:async y=>e(si(y.inputFlag.flag,h),y.inputFlag.flag,this.context)};if(c.inputFlag.flag.type==="boolean")return{...c,valueFunction:async y=>(0,Me.isTruthy)(process.env[y.inputFlag.flag.env]??"false")}}return typeof c.inputFlag.flag.default!==void 0?{...c,metadata:{setFromDefault:!0},valueFunction:typeof c.inputFlag.flag.default=="function"?(h,y={})=>c.inputFlag.flag.default({flags:y,options:h.inputFlag.flag}):async()=>c.inputFlag.flag.default}:c},i=c=>c.inputFlag.flag.type==="option"&&c.inputFlag.flag.defaultHelp?{...c,helpFunction:typeof c.inputFlag.flag.defaultHelp=="function"?(p,h,...y)=>p.inputFlag.flag.defaultHelp({flags:h,options:p.inputFlag},...y):p=>p.inputFlag.flag.defaultHelp}:c,r=async c=>{let p=s(d.filter(h=>!h.metadata?.setFromDefault));return Promise.all(c.map(async h=>{try{if(h.helpFunction)return{...h,metadata:{...h.metadata,defaultHelp:await h.helpFunction?.(h,p,this.context)}}}catch{}return h}))},s=c=>Object.fromEntries(c.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),o=this.mapAndValidateFlags(),a=await Promise.all(Object.entries(this.input.flags).filter(([c,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||o.has(c)).map(([c,p])=>({inputFlag:{flag:p,name:c},tokens:o.get(c)})).map(c=>t(c)).filter(c=>c.valueFunction!==void 0).map(c=>i(c)).map(async c=>c.metadata?.setFromDefault?c:{...c,value:await c.valueFunction?.(c)})),l=s(a.filter(c=>!c.metadata?.setFromDefault)),d=await Promise.all(a.map(async c=>c.metadata?.setFromDefault?{...c,value:await c.valueFunction?.(c,l)}:c)),f=d.some(c=>typeof c.helpFunction=="function")?await r(d):d;return{flags:s(f),metadata:{flags:Object.fromEntries(f.filter(c=>c.metadata).map(c=>[c.inputFlag.name,c.metadata]))}}}_setNames(){for(let e of Object.keys(this.input.flags))this.input.flags[e].name=e;for(let e of Object.keys(this.input.args))this.input.args[e].name=e}findFlag(e){let t=e.startsWith("--"),i=t?!1:e.startsWith("-"),r=t?this.findLongFlag(e):i?this.findShortFlag(e):void 0;return{isLong:t,name:r}}findLongFlag(e){let t=e.slice(2);if(this.input.flags[t])return t;if(this.flagAliases[t])return this.flagAliases[t].name;if(e.startsWith(oi)){let i=this.booleanFlags[e.slice(oi.length)];if(i&&i.allowNo)return i.name;let r=this.flagAliases[e.slice(oi.length)];if(r&&r.type==="boolean"&&r.allowNo)return r.name}}findShortFlag([e,t]){return this.flagAliases[t]?this.flagAliases[t].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===t&&t!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let e=new Map;for(let t of this.raw.filter(i=>i.type==="flag")){if(!(t.flag in this.input.flags))throw new rt.CLIError(`Unexpected flag ${t.flag}`);let i=e.get(t.flag)??[];e.set(t.flag,[...i,t])}return e}};$e.Parser=cs});var us=m(ls=>{"use strict";u();Object.defineProperty(ls,"__esModule",{value:!0});ls.validate=rm;var Qa=N(),xe=as();async function rm(n){let e;function t(){let g=Object.entries(n.input.args),_=g.findIndex(([,F])=>F.multiple);if(_!==-1){if(g.findIndex(([,I],We)=>We>_&&I.multiple)!==-1)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:"only one variadic arg (multiple: true) is allowed"});for(let I=0;I<_;I++)if(!g[I][1].required)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:`args before a variadic arg must be required, but "${g[I][0]}" is optional`});for(let I=_+1;I<g.length;I++)if(!g[I][1].required)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:`args after a variadic arg must be required, but "${g[I][0]}" is optional`})}let E=_!==-1;if(n.output.nonExistentFlags?.length>0)throw new xe.NonExistentFlagsError({flags:n.output.nonExistentFlags,parse:n});let w=Object.keys(n.input.args).length,P=Object.values(n.input.args).some(F=>F.multiple);if(n.input.strict&&!P&&n.output.argv.length>w){let F=n.output.argv.slice(w);throw new xe.UnexpectedArgsError({args:F,parse:n})}let j=[],R=!1;for(let[F,I]of Object.entries(n.input.args)){if(!I.required)R=!0;else if(R&&!E)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n});I.required&&n.output.args[F]===void 0&&j.push(I)}if(j.length>0){let F=Object.entries(n.input.flags).filter(([I,We])=>We.type==="option"&&!!We.multiple).map(([I])=>I);throw new xe.RequiredArgsError({args:j,flagsWithMultiple:F,parse:n})}}async function i(){let g=Object.entries(n.input.flags).flatMap(([w,P])=>n.output.flags[w]!==void 0?[...P.relationships?y(w,P):[],...P.dependsOn?[p(w,P.dependsOn)]:[],...P.exclusive?[d(w,P.exclusive)]:[],...P.combinable?[f(w,P.combinable)]:[],...P.exactlyOne?[c(w,P.exactlyOne)]:[]]:P.required?[{name:w,reason:`Missing required flag ${w}`,status:"failed",validationFn:"required"}]:P.exactlyOne&&P.exactlyOne.length>0?[a(P)]:P.atLeastOne&&P.atLeastOne.length>0?[l(P)]:[]),E=(await Promise.all(g)).filter(w=>w.status==="failed");if(E.length>0)throw new xe.FailedFlagValidationError({failed:E,parse:n})}function r(){if(n.input.constraints){let _=n.input.constraints.map(E=>E._evaluateAgainstFlags(n.output.flags)).filter(E=>E.status==="failed");if(_.length>0)throw new xe.ViolatedFlagConstraintError({failed:_,parse:n})}}async function s(g){if(e)return e;let _=g.map(async w=>typeof w=="string"?[w,n.output.flags[w]]:await w.when(n.output.flags)?[w.name,n.output.flags[w.name]]:null),E=await Promise.all(_);return e=Object.fromEntries(E.filter(w=>w!==null)),e}let o=g=>Object.keys(g).filter(_=>_!==void 0);function a(g){let _={name:g.name,validationFn:"validateExactlyOneAcrossFlags"};if(Object.entries(n.input.flags).map(w=>w[0]).filter(w=>n.output.flags[w]!==void 0).filter(w=>g.exactlyOne&&g.exactlyOne.includes(w)).length===0){let P=`Exactly one of the following must be provided: ${(0,Qa.uniq)(g.exactlyOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{..._,reason:P,status:"failed"}}return{..._,status:"success"}}function l(g){let _={name:g.name,validationFn:"validateAtLeastOneAcrossFlags"};if(Object.entries(n.input.flags).map(w=>w[0]).filter(w=>n.output.flags[w]!==void 0).filter(w=>g.atLeastOne&&g.atLeastOne.includes(w)).length===0){let P=`At least one of the following must be provided: ${(0,Qa.uniq)(g.atLeastOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{..._,reason:P,status:"failed"}}return{..._,status:"success"}}async function d(g,_){let E={name:g,validationFn:"validateExclusive"},w=await s(_),P=o(w);for(let j of P)if(!(n.output.metadata.flags&&n.output.metadata.flags[j]?.setFromDefault)&&!(n.output.metadata.flags&&n.output.metadata.flags[g]?.setFromDefault)&&n.output.flags[j]!==void 0){let R=n.output.metadata.flags?.[j]?.defaultHelp??n.output.flags[j];return{...E,reason:`--${j}=${R} cannot also be provided when using --${g}`,status:"failed"}}return{...E,status:"success"}}async function f(g,_){let E={name:g,validationFn:"validateCombinable"},w=new Set(_.map(j=>typeof j=="string"?j:j.name)),P=await s(_);for(let j of Object.keys(n.output.flags))if(!(n.output.metadata.flags&&n.output.metadata.flags[j]?.setFromDefault)&&!(n.output.metadata.flags&&n.output.metadata.flags[g]?.setFromDefault)&&j!==g&&n.output.flags[j]!==void 0&&!w.has(j)){let R=Object.keys(P).map(F=>`--${F}`).join(", ");return{...E,reason:`Only the following can be provided when using --${g}: ${R}`,status:"failed"}}return{...E,status:"success"}}async function c(g,_){let E={name:g,validationFn:"validateExactlyOne"},w=await s(_),P=o(w);for(let j of P)if(j!==g&&n.output.flags[j]!==void 0)return{...E,reason:`--${j} cannot also be provided when using --${g}`,status:"failed"};return{...E,status:"success"}}async function p(g,_){let E={name:g,validationFn:"validateDependsOn"},w=await s(_);if(!Object.values(w).every(j=>j!==void 0)){let j=Object.keys(w).map(R=>`--${R}`).join(", ");return{...E,reason:`All of the following must be provided when using --${g}: ${j}`,status:"failed"}}return{...E,status:"success"}}async function h(g,_){let E={name:g,validationFn:"validateSome"},w=await s(_);if(!Object.values(w).some(Boolean)){let j=Object.keys(w).map(R=>`--${R}`).join(", ");return{...E,reason:`One of the following must be provided when using --${g}: ${j}`,status:"failed"}}return{...E,status:"success"}}function y(g,_){return(_.relationships??[]).map(E=>{switch(E.type){case"all":return p(g,E.flags);case"none":return d(g,E.flags);case"only":return f(g,E.flags);case"some":return h(g,E.flags);default:throw new Error(`Unknown relationship type: ${E.type}`)}})}t(),await i(),r()}});var tc=m(ai=>{"use strict";u();Object.defineProperty(ai,"__esModule",{value:!0});ai.flagUsage=ec;ai.flagUsages=am;var sm=N(),om=Ye();function ec(n,e={}){let t=[];n.helpLabel?t.push(n.helpLabel):(n.char&&t.push(`-${n.char}`),n.name&&t.push(` --${n.name}`));let i=n.type==="option"?` ${n.name.toUpperCase()}`:"",r=n.summary||n.description||"";return e.displayRequired&&n.required&&(r=`(required) ${r}`),r=r?(0,om.colorize)("dim",r):void 0,[` ${t.join(",").trim()}${i}`,r]}function am(n,e={}){return n.length===0?[]:(0,sm.sortBy)(n,t=>[t.char?-1:1,t.char,t.name]).map(t=>ec(t,e))}});var ds=m(st=>{"use strict";u();Object.defineProperty(st,"__esModule",{value:!0});st.validate=st.flagUsages=void 0;st.parse=fm;var cm=Za(),lm=us(),um=tc();Object.defineProperty(st,"flagUsages",{enumerable:!0,get:function(){return um.flagUsages}});var dm=us();Object.defineProperty(st,"validate",{enumerable:!0,get:function(){return dm.validate}});async function fm(n,e){let t={"--":e["--"],args:e.args??{},argv:n,constraints:e.constraints,context:e.context,flags:e.flags??{},strict:e.strict!==!1},r=await new cm.Parser(t).parse();return await(0,lm.validate)({input:t,output:r}),r}});var ac=m(ce=>{"use strict";u();var hm=ce&&ce.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),pm=ce&&ce.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oc=ce&&ce.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&hm(t,e,i[r]);return pm(t,e),t}})(),gm=ce&&ce.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ce,"__esModule",{value:!0});ce.Command=void 0;var mm=$("node:url"),nc=$("node:util"),ps=gm(fe()),ym=ri(),fs=oc(Le()),ln=vt(),_m=Q(),wm=oc(ds()),ic=Nr(),hs=Xe(),rc=N(),ot=Ye(),sc=ps.default.getInstance().get("@oclif/core");process.stdout.on("error",n=>{if(!(n&&n.code==="EPIPE"))throw n});var gs=class{argv;config;static _base=`${sc.name}@${sc.version}`;static aliases=[];static args={};static baseFlags;static constraints;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;parsed=!1;constructor(e,t){this.argv=e,this.config=t,this.id=this.ctor.id;try{this.debug=(0,_m.makeDebug)(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(e,t){e||(e=process.argv.slice(2)),typeof t=="string"&&t.startsWith("file://")&&(t=(0,mm.fileURLToPath)(t));let i=await ym.Config.load(t||$.main?.filename||__dirname),r=ps.default.getInstance();r.has("config")||r.set("config",i);let s=new this(e,i);if(!s.id){let o=s.constructor.name.toLowerCase();s.id=o,s.ctor.id=o}return s._run()}get ctor(){return this.constructor}async _run(){let e,t;try{this.removeEnvVar("REDIRECTED"),await this.init(),t=await this.run()}catch(i){e=i,await this.catch(i)}finally{await this.finally(e)}return t&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(t)),!this.parsed&&!(0,rc.isProd)()&&process.emitWarning(`Command ${this.id} did not parse its arguments. Did you forget to call 'this.parse'?`,{code:"UnparsedCommand"}),t}async catch(e){if(process.exitCode=process.exitCode??e.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(e));else{if(!e.message)throw e;try{ot.ux.action.stop(ot.ux.colorize("bold",ot.ux.colorize("red","!")))}catch{}throw e}}error(e,t={}){return fs.error(e,t)}exit(e=0){fs.exit(e)}async finally(e){}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv);let e=globalThis;e["http-call"]=e["http-call"]||{},e["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor?.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let e=this.argv.indexOf("--"),t=this.argv.indexOf("--json");return e===-1?t!==-1:t!==-1&&t<e}log(e="",...t){this.jsonEnabled()||(e=typeof e=="string"?e:(0,nc.inspect)(e),ot.ux.stdout(e,...t))}logJson(e){ot.ux.stdout(ot.ux.colorizeJson(e,{pretty:!0,theme:this.config.theme?.json}))}logToStderr(e="",...t){this.jsonEnabled()||(e=typeof e=="string"?e:(0,nc.inspect)(e),ot.ux.stderr(e,...t))}async parse(e,t=this.argv){e||(e=this.ctor);let i={context:this,...e,flags:(0,ic.aggregateFlags)(e.flags,e.baseFlags,e.enableJsonFlag)},r=await this.config.runHook("preparse",{argv:[...t],options:i}),s=r.successes?.length?r.successes.find(a=>a.plugin.root===ps.default.getInstance().get("rootPlugin")?.root)?.result??t:t;this.argv=[...s];let o=await wm.parse(s,i);return this.warnIfFlagDeprecated(o.flags??{}),this.parsed=!0,o}toErrorJson(e){return e instanceof Error?{error:{...e,message:e.message,name:e.name}}:{error:e}}toSuccessJson(e){return e}warn(e){return this.jsonEnabled()||fs.warn(e),e}warnIfCommandDeprecated(){let[e]=(0,ln.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&[...this.ctor.aliases,...this.ctor.hiddenAliases].includes(e)){let t=(0,hs.toConfiguredId)(this.ctor.id,this.config),i=(0,hs.toConfiguredId)(e,this.config);this.warn((0,ln.formatCommandDeprecationWarning)(i,{to:t}))}if(this.ctor.state==="deprecated"){let t=(0,hs.toConfiguredId)(this.ctor.id,this.config);this.warn((0,ln.formatCommandDeprecationWarning)(t,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(e){let t=(0,ic.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(e)){let r=t[i],s=r?.deprecated;if(s&&this.warn((0,ln.formatFlagDeprecationWarning)(i,s)),r?.deprecateAliases){let a=(0,rc.uniq)([...r?.aliases??[],...r?.charAliases??[]]).map(d=>d.length===1?`-${d}`:`--${d}`);if(a.length===0)return;let l=a.filter(d=>this.argv.includes(d));for(let d of l){let f=`--${r?.name}`;r?.char&&(f+=` | -${r?.char}`),this.warn((0,ln.formatFlagDeprecationWarning)(d,{to:f}))}}}}removeEnvVar(e){let t=[];try{t.push(...this.config.scopedEnvVarKeys(e))}catch{t.push(this.config.scopedEnvVarKey(e))}t.map(i=>delete process.env[i])}};ce.Command=gs});var lc=m(un=>{"use strict";u();Object.defineProperty(un,"__esModule",{value:!0});un.flag=bm;un.flags=vm;un.combinationOf=Em;function bm(n){return new ci([n])}function vm(...n){return new ci(n)}function Em(...n){return{flags:n,type:"all"}}var ci=class{are=this;is=this;constrainedFlags;constraintApplicatorFunctionHolder=new ys;topLevelCondition;underConstructionCondition;constructor(e){this.constrainedFlags=e}get and(){if(this.topLevelCondition===void 0)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'and' requires a 'when' or 'unless'.`);if(this.underConstructionCondition)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'and' cannot directly follow '${this.underConstructionCondition.getName()}'`);return this.topLevelCondition=new bs(this.topLevelCondition),this.underConstructionCondition=this.topLevelCondition,this}get or(){if(this.topLevelCondition===void 0)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'or' requires a 'when' or 'unless'.`);if(this.underConstructionCondition)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'or' cannot directly follow '${this.underConstructionCondition.getName()}'`);return this.topLevelCondition=new vs(this.topLevelCondition),this.underConstructionCondition=this.topLevelCondition,this}get unless(){let e=new ws;if(this.topLevelCondition===void 0&&(this.topLevelCondition=e),this.underConstructionCondition===void 0)this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(e),this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(e),this.underConstructionCondition=e;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}get when(){let e=new _s;if(this.topLevelCondition===void 0&&(this.topLevelCondition=e),this.underConstructionCondition===void 0)this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(e),this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(e),this.underConstructionCondition=e;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}_evaluateAgainstFlags(e){let t=!1;try{t=this.topLevelCondition?this.topLevelCondition.isSatisfied(e):!0}catch(i){return{name:this.constrainedFlags.join(","),reason:`Error evaluating constraint conditions on ${q(this.constrainedFlags)}: ${i.message}`,status:"failed",validationFn:"constraintCondition"}}try{let i=this.constraintApplicatorFunctionHolder.applyConstraintApplicatorFunction(e);return{name:this.constrainedFlags.join(","),reason:i,status:t&&i!==""?"failed":"success",validationFn:this.constraintApplicatorFunctionHolder.constraintType??""}}catch(i){return{name:this.constrainedFlags.join(","),reason:`Error evaluating constraint on ${q(this.constrainedFlags)}: ${i.message}`,status:"failed",validationFn:"constraintApplication"}}}allFlagCriteriaSatisfied(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: allFlagCriteriaSatisfied must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new li(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new li(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}anyFlagCriterionSatisfied(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: anyFlagCriterionSatisfied must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new ui(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new ui(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}dependentOn(...e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("dependentOn",t=>{if(Se(this.constrainedFlags,t).length===0)return"";for(let o of e)if(typeof o=="string"){if(o in t&&t[o]!==void 0)return""}else if(Se(o.flags,t).length===o.flags.length)return"";return`${this.constrainedFlags.length>1?`Flags ${q(this.constrainedFlags)} require`:`Flag ${q(this.constrainedFlags)} requires`} at least one of the following${this.topLevelCondition?" under current circumstances:":":"} ${q(e)}.`}),this}exclusiveWith(...e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("exclusiveWith",t=>{if(Se(this.constrainedFlags,t).length===0)return"";let r=!1;for(let a of e)if(typeof a=="string"){if(a in t&&t[a]!==void 0){r=!0;break}}else if(Se(a.flags,t).length===a.flags.length){r=!0;break}return r?`${this.constrainedFlags.length>1?"Flags":"Flag"} ${q(this.constrainedFlags)} cannot be used with any of the following${this.topLevelCondition?" under current circumstances:":":"} ${q(e)}.`:""}),this}mutuallyDependent(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("mutuallyDependent",e=>{let t=Se(this.constrainedFlags,e);return t.length===0||t.length===this.constrainedFlags.length?"":`The following flags are mutually dependent${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. Found only ${q(t)}.`}),this}mutuallyExclusive(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("mutuallyExclusive",e=>{let t=Se(this.constrainedFlags,e);return t.length<=1?"":`The following flags are mutually exclusive${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. Found: ${q(t)}.`}),this}requiredAll(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("requiredAll",e=>{let t=Se(this.constrainedFlags,e);if(t.length===this.constrainedFlags.length)return"";let i=this.constrainedFlags.length>1?"These flags are required":"This flag is required",r=t.length>0?`Found only: ${q(t)}.`:"Found none.";return`${i}${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. ${r}`}),this}requiredAny(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("requiredAny",e=>Se(this.constrainedFlags,e).length>0?"":`Must provide at least one of these flags${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}.`),this}requiredAtLeastN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredAtLeast${e}`,t=>ms(e,"AT_LEAST_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}requiredAtMostN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredAtMost${e}`,t=>ms(e,"AT_MOST_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}requiredExactlyN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredExactly${e}`,t=>ms(e,"EXACTLY_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}thisIsTrue(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: thisIsTrue must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new di(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new di(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}},ys=class{constraintType;constraintApplicatorFunction;applyConstraintApplicatorFunction(e){return(this.constraintApplicatorFunction??function(){return""})(e)}setConstraintApplicator(e,t){if(this.constraintApplicatorFunction)throw new Error(`Misconfigured Constraint: Cannot apply multiple kinds of constraint within one statement: ${this.constraintType}, ${e}. Use multiple constraint expressions instead.`);this.constraintType=e,this.constraintApplicatorFunction=t}},cc={AT_LEAST_N:{fn:(n,e)=>e>=n,label:"at least"},AT_MOST_N:{fn:(n,e)=>e<=n,label:"at most"},EXACTLY_N:{fn:(n,e)=>e===n,label:"exactly"}};function ms(n,e,t,i,r){let s=Se(t,i);return cc[e].fn(n,s.length)?"":`Must provide ${cc[e].label} ${n} of the following${r?" under current circumstances:":":"} ${q(t)}. Found ${s.length}.`}function Se(n,e){return n.filter(t=>t in e&&e[t]!==void 0)}function q(n){return n.map(t=>typeof t=="string"?`--${t}`:`combination of ${t.flags.map(i=>`--${i}`).join(" and ")}`).join(", ")}var at=class{},qe=class extends at{condition;setCondition(e){if(this.condition)throw new Error(`Duplicate conditions applied to '${this.getName()}' clause: '${this.condition.getName()}' and '${e.getName()}'.`);this.condition=e}},_s=class extends qe{getName(){return"when"}isSatisfied(e){if(this.condition)return this.condition.isSatisfied(e);throw new Error("'when' expression without any conditions")}},ws=class extends qe{getName(){return"unless"}isSatisfied(e){if(this.condition)return!this.condition.isSatisfied(e);throw new Error("'unless' expression without any conditions")}},li=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"allFlagCriteriaSatisfied"}isSatisfied(e){for(let t of Object.keys(this.tester))if(!this.tester[t](e[t]))return!1;return!0}},ui=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"anyFlagCriterionSatisfied"}isSatisfied(e){for(let t of Object.keys(this.tester))if(this.tester[t](e[t]))return!0;return!1}},di=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"thisIsTrue"}isSatisfied(e){return this.tester(e)}},Fe=class extends at{left;right;constructor(e){super(),this.left=e}setRight(e){this.right=e}},bs=class extends Fe{getName(){return"and"}isSatisfied(e){return this.left.isSatisfied(e)&&(this.right?this.right.isSatisfied(e):!0)}},vs=class extends Fe{getName(){return"or"}isSatisfied(e){return this.left.isSatisfied(e)||(this.right?this.right.isSatisfied(e):!1)}}});var $s=m(Es=>{"use strict";u();Object.defineProperty(Es,"__esModule",{value:!0});Es.flush=Cm;var $m=mt();function Om(n,e){function t(i,r=!1){return new Promise(s=>{let o=setTimeout(()=>s(null),i);r&&o.unref()})}return Promise.race([n,t(e,!0).then(()=>(0,$m.error)("timed out"))])}async function Pm(){let n=new Promise(t=>{process.stdout.once("drain",()=>t(null))});if(!process.stdout.write(""))return n}async function Cm(n=1e4){await Om(Pm(),n)}});var Ps=m(me=>{"use strict";u();var jm=me&&me.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(me,"__esModule",{value:!0});me.versionAddition=me.helpAddition=void 0;me.run=Fm;var uc=$("node:url"),Im=jm(fe()),Lm=ri(),Os=Zt(),dc=Q(),Ft=Ct(),Am=Mn(),xm=Ye(),Sm=(n,e)=>{if(n.length===0&&!e.isSingleCommandCLI)return!0;let t=(0,Os.getHelpFlagAdditions)(e);for(let i of n){if(t.includes(i))return!0;if(i==="--")return!1}return!1};me.helpAddition=Sm;var qm=(n,e)=>{let t=e?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...t]).values()].includes(n[0])};me.versionAddition=qm;async function Fm(n,e){let t=Ft.Performance.mark(Ft.OCLIF_MARKER_OWNER,"main.run"),i=Ft.Performance.mark(Ft.OCLIF_MARKER_OWNER,"main.run#init"),r=async p=>{let h=await(0,Os.loadHelpClass)(o);await new h(o,o.pjson.oclif.helpOptions??o.pjson.helpOptions).showHelp(p)};(0,dc.setLogger)(e);let{debug:s}=(0,dc.getLogger)("main");s(`process.execPath: ${process.execPath}`),s(`process.execArgv: ${process.execArgv}`),s("process.argv: %O",process.argv),n=n??process.argv.slice(2),e&&(typeof e=="string"&&e.startsWith("file://")||e instanceof uc.URL)&&(e=(0,uc.fileURLToPath)(e));let o=await Lm.Config.load(e??$.main?.filename??__dirname);Im.default.getInstance().set("config",o),o.isSingleCommandCLI&&(n=[Am.SINGLE_COMMAND_CLI_SYMBOL,...n]);let[a,...l]=(0,Os.normalizeArgv)(o,n),d=async(p,h)=>{t?.stop(),i?.stopped||i?.stop(),await Ft.Performance.collect(),Ft.Performance.debug(),await o.runHook("finally",{argv:l,Command:p,error:h,id:a})};if(await o.runHook("init",{argv:l,id:a}),(0,me.versionAddition)(n,o)){xm.ux.stdout(o.userAgent),await d();return}if((0,me.helpAddition)(n,o)){await r(n),await d();return}let f=o.findCommand(a);if(!f&&(o.flexibleTaxonomy?null:o.findTopic(a))){await r([a]),await d();return}i?.stop();let c;try{return await o.runCommand(a,l,f)}catch(p){throw c=p,p}finally{await d(f,c)}}});var fc=m(Cs=>{"use strict";u();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.execute=Mm;var Rm=Le(),Nm=Xn(),Tm=$s(),Dm=Ps(),km=Ie();async function Mm(n){if(!n.dir&&!n.loadOptions)throw new Rm.CLIError("dir or loadOptions is required.");return n.development&&(process.env.NODE_ENV="development",km.settings.debug=!0),(0,Dm.run)(n.args??process.argv.slice(2),n.loadOptions??n.dir).then(async e=>((0,Tm.flush)(),e)).catch(async e=>(0,Nm.handle)(e))}});var pc=m(hc=>{"use strict";u();Object.defineProperty(hc,"__esModule",{value:!0})});var le=m(O=>{"use strict";u();var Hm=O&&O.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Bm=O&&O.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ct=O&&O.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&Hm(t,e,i[r]);return Bm(t,e),t}})();Object.defineProperty(O,"__esModule",{value:!0});O.ux=O.toStandardizedId=O.toConfiguredId=O.settings=O.Performance=O.Parser=O.ModuleLoader=O.getLogger=O.Interfaces=O.loadHelpClass=O.HelpBase=O.Help=O.CommandHelp=O.flush=O.Flags=O.execute=O.handle=O.Errors=O.Constraints=O.Plugin=O.Config=O.Command=O.Args=void 0;var Um=N();function Wm(){try{process.cwd()}catch(n){n.code==="ENOENT"&&process.stderr.write(`WARNING: current directory does not exist
|
|
86
|
-
`)}}function Vm(){if(!(process.env.OCLIF_DISABLE_ENGINE_WARNING&&(0,Um.isTruthy)(process.env.OCLIF_DISABLE_ENGINE_WARNING)))try{let n=$("node:path"),e=Ou(),t=n.join(__dirname,".."),i=$(n.join(t,"package.json"));e.satisfies(process.versions.node,i.engines.node)||process.emitWarning(`Node version must be ${i.engines.node} to use this CLI. Current node version: ${process.versions.node}`)}catch{}}Wm();Vm();O.Args=ct(eo());var Gm=ac();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return Gm.Command}});var gc=ri();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return gc.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return gc.Plugin}});O.Constraints=ct(lc());O.Errors=ct(Le());var zm=Xn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return zm.handle}});var Jm=fc();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return Jm.execute}});O.Flags=ct(Fr());var Km=$s();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return Km.flush}});var fi=Zt();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return fi.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return fi.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return fi.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return fi.loadHelpClass}});O.Interfaces=ct(pc());var Xm=Q();Object.defineProperty(O,"getLogger",{enumerable:!0,get:function(){return Xm.getLogger}});var Ym=Ps();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return Ym.run}});O.ModuleLoader=ct(Ut());O.Parser=ct(ds());var Zm=Ct();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return Zm.Performance}});var Qm=Ie();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return Qm.settings}});var mc=Xe();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return mc.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return mc.toStandardizedId}});var ey=Ye();Object.defineProperty(O,"ux",{enumerable:!0,get:function(){return ey.ux}})});var Rt=m((a$,_c)=>{"use strict";u();var ty="2.0.0",ny=Number.MAX_SAFE_INTEGER||9007199254740991,iy=16,ry=250,sy=["major","premajor","minor","preminor","patch","prepatch","prerelease"];_c.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:iy,MAX_SAFE_BUILD_LENGTH:ry,MAX_SAFE_INTEGER:ny,RELEASE_TYPES:sy,SEMVER_SPEC_VERSION:ty,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var fn=m((l$,wc)=>{"use strict";u();var oy=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};wc.exports=oy});var Nt=m((Oe,bc)=>{"use strict";u();var{MAX_SAFE_COMPONENT_LENGTH:js,MAX_SAFE_BUILD_LENGTH:ay,MAX_LENGTH:cy}=Rt(),ly=fn();Oe=bc.exports={};var uy=Oe.re=[],dy=Oe.safeRe=[],b=Oe.src=[],fy=Oe.safeSrc=[],v=Oe.t={},hy=0,Is="[a-zA-Z0-9-]",py=[["\\s",1],["\\d",cy],[Is,ay]],gy=n=>{for(let[e,t]of py)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},C=(n,e,t)=>{let i=gy(e),r=hy++;ly(n,r,e),v[n]=r,b[r]=e,fy[r]=i,uy[r]=new RegExp(e,t?"g":void 0),dy[r]=new RegExp(i,t?"g":void 0)};C("NUMERICIDENTIFIER","0|[1-9]\\d*");C("NUMERICIDENTIFIERLOOSE","\\d+");C("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Is}*`);C("MAINVERSION",`(${b[v.NUMERICIDENTIFIER]})\\.(${b[v.NUMERICIDENTIFIER]})\\.(${b[v.NUMERICIDENTIFIER]})`);C("MAINVERSIONLOOSE",`(${b[v.NUMERICIDENTIFIERLOOSE]})\\.(${b[v.NUMERICIDENTIFIERLOOSE]})\\.(${b[v.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASEIDENTIFIER",`(?:${b[v.NONNUMERICIDENTIFIER]}|${b[v.NUMERICIDENTIFIER]})`);C("PRERELEASEIDENTIFIERLOOSE",`(?:${b[v.NONNUMERICIDENTIFIER]}|${b[v.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASE",`(?:-(${b[v.PRERELEASEIDENTIFIER]}(?:\\.${b[v.PRERELEASEIDENTIFIER]})*))`);C("PRERELEASELOOSE",`(?:-?(${b[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[v.PRERELEASEIDENTIFIERLOOSE]})*))`);C("BUILDIDENTIFIER",`${Is}+`);C("BUILD",`(?:\\+(${b[v.BUILDIDENTIFIER]}(?:\\.${b[v.BUILDIDENTIFIER]})*))`);C("FULLPLAIN",`v?${b[v.MAINVERSION]}${b[v.PRERELEASE]}?${b[v.BUILD]}?`);C("FULL",`^${b[v.FULLPLAIN]}$`);C("LOOSEPLAIN",`[v=\\s]*${b[v.MAINVERSIONLOOSE]}${b[v.PRERELEASELOOSE]}?${b[v.BUILD]}?`);C("LOOSE",`^${b[v.LOOSEPLAIN]}$`);C("GTLT","((?:<|>)?=?)");C("XRANGEIDENTIFIERLOOSE",`${b[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);C("XRANGEIDENTIFIER",`${b[v.NUMERICIDENTIFIER]}|x|X|\\*`);C("XRANGEPLAIN",`[v=\\s]*(${b[v.XRANGEIDENTIFIER]})(?:\\.(${b[v.XRANGEIDENTIFIER]})(?:\\.(${b[v.XRANGEIDENTIFIER]})(?:${b[v.PRERELEASE]})?${b[v.BUILD]}?)?)?`);C("XRANGEPLAINLOOSE",`[v=\\s]*(${b[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[v.XRANGEIDENTIFIERLOOSE]})(?:${b[v.PRERELEASELOOSE]})?${b[v.BUILD]}?)?)?`);C("XRANGE",`^${b[v.GTLT]}\\s*${b[v.XRANGEPLAIN]}$`);C("XRANGELOOSE",`^${b[v.GTLT]}\\s*${b[v.XRANGEPLAINLOOSE]}$`);C("COERCEPLAIN",`(^|[^\\d])(\\d{1,${js}})(?:\\.(\\d{1,${js}}))?(?:\\.(\\d{1,${js}}))?`);C("COERCE",`${b[v.COERCEPLAIN]}(?:$|[^\\d])`);C("COERCEFULL",b[v.COERCEPLAIN]+`(?:${b[v.PRERELEASE]})?(?:${b[v.BUILD]})?(?:$|[^\\d])`);C("COERCERTL",b[v.COERCE],!0);C("COERCERTLFULL",b[v.COERCEFULL],!0);C("LONETILDE","(?:~>?)");C("TILDETRIM",`(\\s*)${b[v.LONETILDE]}\\s+`,!0);Oe.tildeTrimReplace="$1~";C("TILDE",`^${b[v.LONETILDE]}${b[v.XRANGEPLAIN]}$`);C("TILDELOOSE",`^${b[v.LONETILDE]}${b[v.XRANGEPLAINLOOSE]}$`);C("LONECARET","(?:\\^)");C("CARETTRIM",`(\\s*)${b[v.LONECARET]}\\s+`,!0);Oe.caretTrimReplace="$1^";C("CARET",`^${b[v.LONECARET]}${b[v.XRANGEPLAIN]}$`);C("CARETLOOSE",`^${b[v.LONECARET]}${b[v.XRANGEPLAINLOOSE]}$`);C("COMPARATORLOOSE",`^${b[v.GTLT]}\\s*(${b[v.LOOSEPLAIN]})$|^$`);C("COMPARATOR",`^${b[v.GTLT]}\\s*(${b[v.FULLPLAIN]})$|^$`);C("COMPARATORTRIM",`(\\s*)${b[v.GTLT]}\\s*(${b[v.LOOSEPLAIN]}|${b[v.XRANGEPLAIN]})`,!0);Oe.comparatorTrimReplace="$1$2$3";C("HYPHENRANGE",`^\\s*(${b[v.XRANGEPLAIN]})\\s+-\\s+(${b[v.XRANGEPLAIN]})\\s*$`);C("HYPHENRANGELOOSE",`^\\s*(${b[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[v.XRANGEPLAINLOOSE]})\\s*$`);C("STAR","(<|>)?=?\\s*\\*");C("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");C("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var hi=m((f$,vc)=>{"use strict";u();var my=Object.freeze({loose:!0}),yy=Object.freeze({}),_y=n=>n?typeof n!="object"?my:n:yy;vc.exports=_y});var Ls=m((p$,Oc)=>{"use strict";u();var Ec=/^[0-9]+$/,$c=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:n<e?-1:1;let t=Ec.test(n),i=Ec.test(e);return t&&i&&(n=+n,e=+e),n===e?0:t&&!i?-1:i&&!t?1:n<e?-1:1},wy=(n,e)=>$c(e,n);Oc.exports={compareIdentifiers:$c,rcompareIdentifiers:wy}});var G=m((m$,Cc)=>{"use strict";u();var pi=fn(),{MAX_LENGTH:Pc,MAX_SAFE_INTEGER:gi}=Rt(),{safeRe:mi,t:yi}=Nt(),by=hi(),{compareIdentifiers:As}=Ls(),vy=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let i=0;i<t.length;i++)if(As(n[i],t[i])!==0)return!1;return!0},xs=class n{constructor(e,t){if(t=by(t),e instanceof n){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Pc)throw new TypeError(`version is longer than ${Pc} characters`);pi("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?mi[yi.LOOSE]:mi[yi.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>gi||this.major<0)throw new TypeError("Invalid major version");if(this.minor>gi||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>gi||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let s=+r;if(s>=0&&s<gi)return s}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(pi("SemVer.compare",this.version,this.options,e),!(e instanceof n)){if(typeof e=="string"&&e===this.version)return 0;e=new n(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof n||(e=new n(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],r=e.prerelease[t];if(pi("prerelease compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return As(i,r)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let i=this.build[t],r=e.build[t];if(pi("build compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return As(i,r)}while(++t)}inc(e,t,i){if(e.startsWith("pre")){if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let r=`-${t}`.match(this.options.loose?mi[yi.PRERELEASELOOSE]:mi[yi.PRERELEASE]);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(t){let s=[t,r];if(i===!1&&(s=[t]),vy(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Cc.exports=xs});var He=m((_$,Ic)=>{"use strict";u();var jc=G(),Ey=(n,e,t=!1)=>{if(n instanceof jc)return n;try{return new jc(n,e)}catch(i){if(!t)return null;throw i}};Ic.exports=Ey});var Ac=m((b$,Lc)=>{"use strict";u();var $y=He(),Oy=(n,e)=>{let t=$y(n,e);return t?t.version:null};Lc.exports=Oy});var Sc=m((E$,xc)=>{"use strict";u();var Py=He(),Cy=(n,e)=>{let t=Py(n.trim().replace(/^[=v]+/,""),e);return t?t.version:null};xc.exports=Cy});var Rc=m((O$,Fc)=>{"use strict";u();var qc=G(),jy=(n,e,t,i,r)=>{typeof t=="string"&&(r=i,i=t,t=void 0);try{return new qc(n instanceof qc?n.version:n,t).inc(e,i,r).version}catch{return null}};Fc.exports=jy});var Dc=m((C$,Tc)=>{"use strict";u();var Nc=He(),Iy=(n,e)=>{let t=Nc(n,null,!0),i=Nc(e,null,!0),r=t.compare(i);if(r===0)return null;let s=r>0,o=s?t:i,a=s?i:t,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let f=l?"pre":"";return t.major!==i.major?f+"major":t.minor!==i.minor?f+"minor":t.patch!==i.patch?f+"patch":"prerelease"};Tc.exports=Iy});var Mc=m((I$,kc)=>{"use strict";u();var Ly=G(),Ay=(n,e)=>new Ly(n,e).major;kc.exports=Ay});var Bc=m((A$,Hc)=>{"use strict";u();var xy=G(),Sy=(n,e)=>new xy(n,e).minor;Hc.exports=Sy});var Wc=m((S$,Uc)=>{"use strict";u();var qy=G(),Fy=(n,e)=>new qy(n,e).patch;Uc.exports=Fy});var Gc=m((F$,Vc)=>{"use strict";u();var Ry=He(),Ny=(n,e)=>{let t=Ry(n,e);return t&&t.prerelease.length?t.prerelease:null};Vc.exports=Ny});var ue=m((N$,Jc)=>{"use strict";u();var zc=G(),Ty=(n,e,t)=>new zc(n,t).compare(new zc(e,t));Jc.exports=Ty});var Xc=m((D$,Kc)=>{"use strict";u();var Dy=ue(),ky=(n,e,t)=>Dy(e,n,t);Kc.exports=ky});var Zc=m((M$,Yc)=>{"use strict";u();var My=ue(),Hy=(n,e)=>My(n,e,!0);Yc.exports=Hy});var _i=m((B$,el)=>{"use strict";u();var Qc=G(),By=(n,e,t)=>{let i=new Qc(n,t),r=new Qc(e,t);return i.compare(r)||i.compareBuild(r)};el.exports=By});var nl=m((W$,tl)=>{"use strict";u();var Uy=_i(),Wy=(n,e)=>n.sort((t,i)=>Uy(t,i,e));tl.exports=Wy});var rl=m((G$,il)=>{"use strict";u();var Vy=_i(),Gy=(n,e)=>n.sort((t,i)=>Vy(i,t,e));il.exports=Gy});var hn=m((J$,sl)=>{"use strict";u();var zy=ue(),Jy=(n,e,t)=>zy(n,e,t)>0;sl.exports=Jy});var wi=m((X$,ol)=>{"use strict";u();var Ky=ue(),Xy=(n,e,t)=>Ky(n,e,t)<0;ol.exports=Xy});var Ss=m((Z$,al)=>{"use strict";u();var Yy=ue(),Zy=(n,e,t)=>Yy(n,e,t)===0;al.exports=Zy});var qs=m((eO,cl)=>{"use strict";u();var Qy=ue(),e_=(n,e,t)=>Qy(n,e,t)!==0;cl.exports=e_});var bi=m((nO,ll)=>{"use strict";u();var t_=ue(),n_=(n,e,t)=>t_(n,e,t)>=0;ll.exports=n_});var vi=m((rO,ul)=>{"use strict";u();var i_=ue(),r_=(n,e,t)=>i_(n,e,t)<=0;ul.exports=r_});var Fs=m((oO,dl)=>{"use strict";u();var s_=Ss(),o_=qs(),a_=hn(),c_=bi(),l_=wi(),u_=vi(),d_=(n,e,t,i)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return s_(n,t,i);case"!=":return o_(n,t,i);case">":return a_(n,t,i);case">=":return c_(n,t,i);case"<":return l_(n,t,i);case"<=":return u_(n,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};dl.exports=d_});var hl=m((cO,fl)=>{"use strict";u();var f_=G(),h_=He(),{safeRe:Ei,t:$i}=Nt(),p_=(n,e)=>{if(n instanceof f_)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let t=null;if(!e.rtl)t=n.match(e.includePrerelease?Ei[$i.COERCEFULL]:Ei[$i.COERCE]);else{let l=e.includePrerelease?Ei[$i.COERCERTLFULL]:Ei[$i.COERCERTL],d;for(;(d=l.exec(n))&&(!t||t.index+t[0].length!==n.length);)(!t||d.index+d[0].length!==t.index+t[0].length)&&(t=d),l.lastIndex=d.index+d[1].length+d[2].length;l.lastIndex=-1}if(t===null)return null;let i=t[2],r=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return h_(`${i}.${r}.${s}${o}${a}`,e)};fl.exports=p_});var gl=m((uO,pl)=>{"use strict";u();var g_=He(),m_=Rt(),y_=G(),__=(n,e,t)=>{if(!m_.RELEASE_TYPES.includes(e))return null;let i=w_(n,t);return i&&b_(i,e)},w_=(n,e)=>{let t=n instanceof y_?n.version:n;return g_(t,e)},b_=(n,e)=>{if(v_(e))return n.version;switch(n.prerelease=[],e){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},v_=n=>n.startsWith("pre");pl.exports=__});var yl=m((fO,ml)=>{"use strict";u();var Rs=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,t)}return this}};ml.exports=Rs});var de=m((pO,vl)=>{"use strict";u();var E_=/\s+/g,Ns=class n{constructor(e,t){if(t=O_(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof Ts)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(E_," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!wl(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&q_(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let i=0;i<t.length;i++)i>0&&(this.formatted+=" "),this.formatted+=t[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S_,"");let i=((this.options.includePrerelease&&A_)|(this.options.loose&&x_))+":"+e,r=_l.get(i);if(r)return r;let s=this.options.loose,o=s?Z[z.HYPHENRANGELOOSE]:Z[z.HYPHENRANGE];e=e.replace(o,W_(this.options.includePrerelease)),A("hyphen replace",e),e=e.replace(Z[z.COMPARATORTRIM],j_),A("comparator trim",e),e=e.replace(Z[z.TILDETRIM],I_),A("tilde trim",e),e=e.replace(Z[z.CARETTRIM],L_),A("caret trim",e);let a=e.split(" ").map(c=>F_(c,this.options)).join(" ").split(/\s+/).map(c=>U_(c,this.options));s&&(a=a.filter(c=>(A("loose invalid filter",c,this.options),!!c.match(Z[z.COMPARATORLOOSE])))),A("range list",a);let l=new Map,d=a.map(c=>new Ts(c,this.options));for(let c of d){if(wl(c))return[c];l.set(c.value,c)}l.size>1&&l.has("")&&l.delete("");let f=[...l.values()];return _l.set(i,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>bl(i,t)&&e.set.some(r=>bl(r,t)&&i.every(s=>r.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new P_(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(V_(this.set[t],e,this.options))return!0;return!1}};vl.exports=Ns;var $_=yl(),_l=new $_,O_=hi(),Ts=pn(),A=fn(),P_=G(),{safeRe:Z,src:C_,t:z,comparatorTrimReplace:j_,tildeTrimReplace:I_,caretTrimReplace:L_}=Nt(),{FLAG_INCLUDE_PRERELEASE:A_,FLAG_LOOSE:x_}=Rt(),S_=new RegExp(C_[z.BUILD],"g"),wl=n=>n.value==="<0.0.0-0",q_=n=>n.value==="",bl=(n,e)=>{let t=!0,i=n.slice(),r=i.pop();for(;t&&i.length;)t=i.every(s=>r.intersects(s,e)),r=i.pop();return t},F_=(n,e)=>(n=n.replace(Z[z.BUILD],""),A("comp",n,e),n=D_(n,e),A("caret",n),n=N_(n,e),A("tildes",n),n=M_(n,e),A("xrange",n),n=B_(n,e),A("stars",n),n),B=n=>!n||n.toLowerCase()==="x"||n==="*",R_=(n,e,t)=>B(n)&&!B(e)||B(e)&&t&&!B(t),N_=(n,e)=>n.trim().split(/\s+/).map(t=>T_(t,e)).join(" "),T_=(n,e)=>{let t=e.loose?Z[z.TILDELOOSE]:Z[z.TILDE],i=e.includePrerelease?"-0":"";return n.replace(t,(r,s,o,a,l)=>{A("tilde",n,r,s,o,a,l);let d;return B(s)?d="":B(o)?d=`>=${s}.0.0${i} <${+s+1}.0.0-0`:B(a)?d=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l?(A("replaceTilde pr",l),d=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`):d=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,A("tilde return",d),d})},D_=(n,e)=>n.trim().split(/\s+/).map(t=>k_(t,e)).join(" "),k_=(n,e)=>{A("caret",n,e);let t=e.loose?Z[z.CARETLOOSE]:Z[z.CARET],i=e.includePrerelease?"-0":"";return n.replace(t,(r,s,o,a,l)=>{A("caret",n,r,s,o,a,l);let d;return B(s)?d="":B(o)?d=`>=${s}.0.0${i} <${+s+1}.0.0-0`:B(a)?s==="0"?d=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(A("replaceCaret pr",l),s==="0"?o==="0"?d=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(A("no pr"),s==="0"?o==="0"?d=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),A("caret return",d),d})},M_=(n,e)=>(A("replaceXRanges",n,e),n.split(/\s+/).map(t=>H_(t,e)).join(" ")),H_=(n,e)=>{n=n.trim();let t=e.loose?Z[z.XRANGELOOSE]:Z[z.XRANGE];return n.replace(t,(i,r,s,o,a,l)=>{if(A("xRange",n,i,r,s,o,a,l),R_(s,o,a))return n;let d=B(s),f=d||B(o),c=f||B(a),p=c;return r==="="&&p&&(r=""),l=e.includePrerelease?"-0":"",d?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&p?(f&&(o=0),a=0,r===">"?(r=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):r==="<="&&(r="<",f?s=+s+1:o=+o+1),r==="<"&&(l="-0"),i=`${r+s}.${o}.${a}${l}`):f?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:c&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),A("xRange return",i),i})},B_=(n,e)=>(A("replaceStars",n,e),n.trim().replace(Z[z.STAR],"")),U_=(n,e)=>(A("replaceGTE0",n,e),n.trim().replace(Z[e.includePrerelease?z.GTE0PRE:z.GTE0],"")),W_=n=>(e,t,i,r,s,o,a,l,d,f,c,p)=>(B(i)?t="":B(r)?t=`>=${i}.0.0${n?"-0":""}`:B(s)?t=`>=${i}.${r}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,B(d)?l="":B(f)?l=`<${+d+1}.0.0-0`:B(c)?l=`<${d}.${+f+1}.0-0`:p?l=`<=${d}.${f}.${c}-${p}`:n?l=`<${d}.${f}.${+c+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),V_=(n,e,t)=>{for(let i=0;i<n.length;i++)if(!n[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<n.length;i++)if(A(n[i].semver),n[i].semver!==Ts.ANY&&n[i].semver.prerelease.length>0){let r=n[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var pn=m((mO,jl)=>{"use strict";u();var gn=Symbol("SemVer ANY"),Ms=class n{static get ANY(){return gn}constructor(e,t){if(t=El(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ks("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===gn?this.value="":this.value=this.operator+this.semver.version,ks("comp",this)}parse(e){let t=this.options.loose?$l[Ol.COMPARATORLOOSE]:$l[Ol.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Pl(i[2],this.options.loose):this.semver=gn}toString(){return this.value}test(e){if(ks("Comparator.test",e,this.options.loose),this.semver===gn||e===gn)return!0;if(typeof e=="string")try{e=new Pl(e,this.options)}catch{return!1}return Ds(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Cl(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Cl(this.value,t).test(e.semver):(t=El(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Ds(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ds(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};jl.exports=Ms;var El=hi(),{safeRe:$l,t:Ol}=Nt(),Ds=Fs(),ks=fn(),Pl=G(),Cl=de()});var mn=m((_O,Il)=>{"use strict";u();var G_=de(),z_=(n,e,t)=>{try{e=new G_(e,t)}catch{return!1}return e.test(n)};Il.exports=z_});var Al=m((bO,Ll)=>{"use strict";u();var J_=de(),K_=(n,e)=>new J_(n,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Ll.exports=K_});var Sl=m((EO,xl)=>{"use strict";u();var X_=G(),Y_=de(),Z_=(n,e,t)=>{let i=null,r=null,s=null;try{s=new Y_(e,t)}catch{return null}return n.forEach(o=>{s.test(o)&&(!i||r.compare(o)===-1)&&(i=o,r=new X_(i,t))}),i};xl.exports=Z_});var Fl=m((OO,ql)=>{"use strict";u();var Q_=G(),ew=de(),tw=(n,e,t)=>{let i=null,r=null,s=null;try{s=new ew(e,t)}catch{return null}return n.forEach(o=>{s.test(o)&&(!i||r.compare(o)===1)&&(i=o,r=new Q_(i,t))}),i};ql.exports=tw});var Tl=m((CO,Nl)=>{"use strict";u();var Hs=G(),nw=de(),Rl=hn(),iw=(n,e)=>{n=new nw(n,e);let t=new Hs("0.0.0");if(n.test(t)||(t=new Hs("0.0.0-0"),n.test(t)))return t;t=null;for(let i=0;i<n.set.length;++i){let r=n.set[i],s=null;r.forEach(o=>{let a=new Hs(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Rl(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||Rl(t,s))&&(t=s)}return t&&n.test(t)?t:null};Nl.exports=iw});var kl=m((IO,Dl)=>{"use strict";u();var rw=de(),sw=(n,e)=>{try{return new rw(n,e).range||"*"}catch{return null}};Dl.exports=sw});var Oi=m((AO,Ul)=>{"use strict";u();var ow=G(),Bl=pn(),{ANY:aw}=Bl,cw=de(),lw=mn(),Ml=hn(),Hl=wi(),uw=vi(),dw=bi(),fw=(n,e,t,i)=>{n=new ow(n,i),e=new cw(e,i);let r,s,o,a,l;switch(t){case">":r=Ml,s=uw,o=Hl,a=">",l=">=";break;case"<":r=Hl,s=dw,o=Ml,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(lw(n,e,i))return!1;for(let d=0;d<e.set.length;++d){let f=e.set[d],c=null,p=null;if(f.forEach(h=>{h.semver===aw&&(h=new Bl(">=0.0.0")),c=c||h,p=p||h,r(h.semver,c.semver,i)?c=h:o(h.semver,p.semver,i)&&(p=h)}),c.operator===a||c.operator===l||(!p.operator||p.operator===a)&&s(n,p.semver))return!1;if(p.operator===l&&o(n,p.semver))return!1}return!0};Ul.exports=fw});var Vl=m((SO,Wl)=>{"use strict";u();var hw=Oi(),pw=(n,e,t)=>hw(n,e,">",t);Wl.exports=pw});var zl=m((FO,Gl)=>{"use strict";u();var gw=Oi(),mw=(n,e,t)=>gw(n,e,"<",t);Gl.exports=mw});var Xl=m((NO,Kl)=>{"use strict";u();var Jl=de(),yw=(n,e,t)=>(n=new Jl(n,t),e=new Jl(e,t),n.intersects(e,t));Kl.exports=yw});var Zl=m((DO,Yl)=>{"use strict";u();var _w=mn(),ww=ue();Yl.exports=(n,e,t)=>{let i=[],r=null,s=null,o=n.sort((f,c)=>ww(f,c,t));for(let f of o)_w(f,e,t)?(s=f,r||(r=f)):(s&&i.push([r,s]),s=null,r=null);r&&i.push([r,null]);let a=[];for(let[f,c]of i)f===c?a.push(f):!c&&f===o[0]?a.push("*"):c?f===o[0]?a.push(`<=${c}`):a.push(`${f} - ${c}`):a.push(`>=${f}`);let l=a.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return l.length<d.length?l:e}});var ru=m((MO,iu)=>{"use strict";u();var Ql=de(),Ws=pn(),{ANY:Bs}=Ws,Us=mn(),Vs=ue(),bw=(n,e,t={})=>{if(n===e)return!0;n=new Ql(n,t),e=new Ql(e,t);let i=!1;e:for(let r of n.set){for(let s of e.set){let o=Ew(r,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},vw=[new Ws(">=0.0.0-0")],eu=[new Ws(">=0.0.0")],Ew=(n,e,t)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Bs){if(e.length===1&&e[0].semver===Bs)return!0;t.includePrerelease?n=vw:n=eu}if(e.length===1&&e[0].semver===Bs){if(t.includePrerelease)return!0;e=eu}let i=new Set,r,s;for(let h of n)h.operator===">"||h.operator===">="?r=tu(r,h,t):h.operator==="<"||h.operator==="<="?s=nu(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(r&&s){if(o=Vs(r.semver,s.semver,t),o>0)return null;if(o===0&&(r.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(r&&!Us(h,String(r),t)||s&&!Us(h,String(s),t))return null;for(let y of e)if(!Us(h,String(y),t))return!1;return!0}let a,l,d,f,c=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=r&&!t.includePrerelease&&r.semver.prerelease.length?r.semver:!1;c&&c.prerelease.length===1&&s.operator==="<"&&c.prerelease[0]===0&&(c=!1);for(let h of e){if(f=f||h.operator===">"||h.operator===">=",d=d||h.operator==="<"||h.operator==="<=",r){if(p&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===p.major&&h.semver.minor===p.minor&&h.semver.patch===p.patch&&(p=!1),h.operator===">"||h.operator===">="){if(a=tu(r,h,t),a===h&&a!==r)return!1}else if(r.operator===">="&&!h.test(r.semver))return!1}if(s){if(c&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===c.major&&h.semver.minor===c.minor&&h.semver.patch===c.patch&&(c=!1),h.operator==="<"||h.operator==="<="){if(l=nu(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||r)&&o!==0)return!1}return!(r&&d&&!s&&o!==0||s&&f&&!r&&o!==0||p||c)},tu=(n,e,t)=>{if(!n)return e;let i=Vs(n.semver,e.semver,t);return i>0?n:i<0||e.operator===">"&&n.operator===">="?e:n},nu=(n,e,t)=>{if(!n)return e;let i=Vs(n.semver,e.semver,t);return i<0?n:i>0||e.operator==="<"&&n.operator==="<="?e:n};iu.exports=bw});var cu=m((BO,au)=>{"use strict";u();var Gs=Nt(),su=Rt(),$w=G(),ou=Ls(),Ow=He(),Pw=Ac(),Cw=Sc(),jw=Rc(),Iw=Dc(),Lw=Mc(),Aw=Bc(),xw=Wc(),Sw=Gc(),qw=ue(),Fw=Xc(),Rw=Zc(),Nw=_i(),Tw=nl(),Dw=rl(),kw=hn(),Mw=wi(),Hw=Ss(),Bw=qs(),Uw=bi(),Ww=vi(),Vw=Fs(),Gw=hl(),zw=gl(),Jw=pn(),Kw=de(),Xw=mn(),Yw=Al(),Zw=Sl(),Qw=Fl(),eb=Tl(),tb=kl(),nb=Oi(),ib=Vl(),rb=zl(),sb=Xl(),ob=Zl(),ab=ru();au.exports={parse:Ow,valid:Pw,clean:Cw,inc:jw,diff:Iw,major:Lw,minor:Aw,patch:xw,prerelease:Sw,compare:qw,rcompare:Fw,compareLoose:Rw,compareBuild:Nw,sort:Tw,rsort:Dw,gt:kw,lt:Mw,eq:Hw,neq:Bw,gte:Uw,lte:Ww,cmp:Vw,coerce:Gw,truncate:zw,Comparator:Jw,Range:Kw,satisfies:Xw,toComparators:Yw,maxSatisfying:Zw,minSatisfying:Qw,minVersion:eb,validRange:tb,outside:nb,gtr:ib,ltr:rb,intersects:sb,simplifyRange:ob,subset:ab,SemVer:$w,re:Gs.re,src:Gs.src,tokens:Gs.t,SEMVER_SPEC_VERSION:su.SEMVER_SPEC_VERSION,RELEASE_TYPES:su.RELEASE_TYPES,compareIdentifiers:ou.compareIdentifiers,rcompareIdentifiers:ou.rcompareIdentifiers}});u();u();var Fi=W(le(),1);u();var yc=W(Ve(),1);var{Ansis:aE,ansi256:cE,fg:lE,bgAnsi256:uE,bg:dE,rgb:fE,bgRgb:hE,hex:pE,bgHex:gE,reset:mE,inverse:yE,hidden:_E,visible:wE,bold:Re,dim:se,italic:bE,underline:vE,strikethrough:EE,strike:$E,black:OE,red:PE,green:CE,yellow:jE,blue:IE,magenta:LE,cyan:dn,white:AE,grey:xE,gray:SE,blackBright:qE,redBright:FE,greenBright:RE,yellowBright:NE,blueBright:TE,magentaBright:DE,cyanBright:kE,whiteBright:ME,bgBlack:HE,bgRed:BE,bgGreen:UE,bgYellow:WE,bgBlue:VE,bgMagenta:GE,bgCyan:zE,bgWhite:JE,bgGrey:KE,bgGray:XE,bgBlackBright:YE,bgRedBright:ZE,bgGreenBright:QE,bgYellowBright:e$,bgBlueBright:t$,bgMagentaBright:n$,bgCyanBright:i$,bgWhiteBright:r$}=yc.default;u();var U=W(le(),1);var yu=W(kt(),1),Be=W(cu(),1);import{spawn as mb}from"node:child_process";import{access as yb,mkdir as _b,readFile as wb,rename as bb,rm as hu,writeFile as vb}from"node:fs/promises";import{basename as Eb,dirname as pu,join as re,parse as gu,resolve as Js}from"node:path";import{fileURLToPath as $b}from"node:url";u();var Li=W(le(),1),uu=W(kt(),1);import{readFile as lb}from"node:fs/promises";import{createRequire as ub}from"node:module";import{join as db,sep as fb}from"node:path";u();var yn=W(le(),1),lu=W(kt(),1);import{spawn as cb}from"node:child_process";var Pi=(0,lu.default)("@oclif/plugin-plugins:spawn");async function Ci(n,e=[],{cwd:t,logLevel:i}){return new Promise((r,s)=>{process.platform==="win32"&&n.endsWith(".js")&&(e.unshift(`"${n}"`),n="node"),Pi("modulePath",n),Pi("args",e);let o=cb(n,e,{cwd:t,env:{...Ys(),HUSKY:"0"},stdio:"pipe",windowsVerbatimArguments:!0,...process.platform==="win32"&&n.toLowerCase().endsWith(".cmd")&&{shell:!0}}),a=["up to date","added"],l=[],d=[],f=[],c=[],p=h=>{let y=f.length===0&&c.length===0,g=a.some(_=>h.startsWith(_));return y&&g&&i==="notice"?!1:i!=="silent"};o.stderr?.setEncoding("utf8"),o.stderr?.on("data",h=>{let y=h.toString().trim();l.push(y),p(y)?(f.push(y),yn.ux.stdout(y)):Pi(y)}),o.stdout?.setEncoding("utf8"),o.stdout?.on("data",h=>{let y=h.toString().trim();d.push(y),p(y)?(c.push(y),yn.ux.stdout(y)):Pi(y)}),o.on("error",s),o.on("exit",h=>{h===0?r({stderr:l,stdout:d}):s(new yn.Errors.CLIError(`${n} ${e.join(" ")} exited with code ${h}`,{suggestions:["Run with DEBUG=@oclif/plugin-plugins* to see debug output."]}))})})}var ji=(0,uu.default)("@oclif/plugin-plugins:npm"),Ii=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let i=await this.findNpm();ji("npm binary path",i),e.push(`--loglevel=${this.logLevel}`,"--no-fund"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&Li.ux.stderr(`${t.cwd}: ${i} ${e.join(" ")}`),ji(`${t.cwd}: ${i} ${e.join(" ")}`);try{let r=await Ci(i,e,t);return ji("npm done"),r}catch(r){throw ji("npm error",r),r}}async install(e,t){let i=t.prod?["--omit","dev"]:[];return this.exec(["install",...e,...i,"--no-audit"],t)}async uninstall(e,t){return this.exec(["uninstall",...e],t)}async update(e,t){return this.exec(["update",...e],t)}async view(e,t){return this.exec(["view",...e],{...t,logLevel:"silent"})}async findNpm(){if(this.bin)return this.bin;try{let e=ub(import.meta.url).resolve("npm/package.json"),t=JSON.parse(await lb(e,{encoding:"utf8"})),i=e.slice(0,Math.max(0,e.lastIndexOf(fb)));this.bin=db(i,t.bin.npm)}catch{let{default:e}=await import("./lib-O5EZ4NVT.js");this.bin=await e("npm")}if(!this.bin)throw new Li.Errors.CLIError("npm not found");return this.bin}};u();function zs(n,e){let t=n===void 0?0:n,i=e===void 0?0:e;if(Array.isArray(t)&&Array.isArray(i)){if(t.length===0&&i.length===0)return 0;let r=zs(t[0],i[0]);return r!==0?r:zs(t.slice(1),i.slice(1))}return t<i?-1:t>i?1:0}function Tt(n,e){return n.sort((t,i)=>zs(e(t),e(i)))}function du(n,e){return n.filter((t,i)=>!n.some((r,s)=>s>i&&e(t,r)))}u();var Si=W(le(),1),fu=W(kt(),1);import{createRequire as hb}from"node:module";import{fileURLToPath as pb}from"node:url";var gb=hb(import.meta.url),Ai=(0,fu.default)("@oclif/plugin-plugins:yarn"),xi=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let i=await this.findYarn();Ai("yarn binary path",i),t.logLevel==="verbose"&&e.push("--verbose"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&Si.ux.stderr(`${t.cwd}: ${i} ${e.join(" ")}`),Ai(`${t.cwd}: ${i} ${e.join(" ")}`);try{let r=await Ci(i,e,t);return Ai("yarn done"),r}catch(r){throw Ai("yarn error",r),r}}async install(e,t){return this.exec(["install",...e],t)}async findYarn(){if(this.bin)return this.bin;try{this.bin=gb.resolve("yarn/bin/yarn.js",{paths:[this.config.root,pb(import.meta.url)]})}catch{let{default:e}=await import("./lib-O5EZ4NVT.js");this.bin=await e("yarn")}if(!this.bin)throw new Si.Errors.CLIError("yarn not found");return this.bin}};var qi={dependencies:{},oclif:{plugins:[],schema:1},private:!0};async function Dt(n){try{return await yb(n),!0}catch{return!1}}function _u(n){return du(n,(e,t)=>e.name===t.name||e.type==="link"&&t.type==="link"&&e.root===t.root)}function Ob(n,e){if(n)return typeof n=="string"?n:n.url;if(e)return typeof e=="string"?e:e.url.replace("git+","").replace(".git","")}function mu(n,e){[...e.stdout,...e.stderr].some(i=>i.includes("npm WARN"))&&(U.ux.stderr(Re.yellow(`
|
|
87
|
-
These warnings can only be addressed by the owner(s) of ${n.name}.`)),(n.pjson.bugs||n.pjson.repository)&&U.ux.stderr(`We suggest that you create an issue at ${
|
|
88
|
-
`))}function
|
|
89
|
-
Does your current user own the directory ${this.config.dataDir}?`]}):r}}async link(e,{install:t}){let i=await U.Config.load(Js(e));if(this.isValidPlugin(i),t)if(await Dt(re(i.root,"yarn.lock"))){this.debug("installing dependencies with yarn");let r=new xi({config:this.config,logLevel:this.logLevel});U.ux.warn(`The ${U.ux.colorize("dim","plugins link")} command will no longer auto install dependencies in future versions. Please run ${U.ux.colorize("dim","yarn")} manually in the plugin directory before linking.`),await r.install([],{cwd:i.root,logLevel:this.logLevel})}else await Dt(re(i.root,"package-lock.json"))?(this.debug("installing dependencies with npm"),await this.npm.install([],{cwd:i.root,logLevel:this.logLevel,prod:!1})):await Dt(re(i.root,"pnpm-lock.yaml"))?U.ux.warn(`pnpm is not supported for installing after a link. The link succeeded, but you may need to run 'pnpm install' in ${i.root}.`):U.ux.warn(`No lockfile found in ${i.root}. The link succeeded, but you may need to install the dependencies in your project.`);return await this.add({name:i.name,root:i.root,type:"link"}),i}async list(){return(await this.pjson()).oclif.plugins}async maybeUnfriendlyName(e){await this.ensurePJSON();let t=this.unfriendlyName(e);return this.debug(`checking registry for expanded package name ${t}`),t&&await this.npmHasPackage(t)?t:(this.debug(`expanded package name ${t} not found, using given package name ${e}`),e)}async pjson(){let e=await this.readPJSON(),t=e?
|
|
90
|
-
If you are sure it is, contact the CLI developer noting this error.`]})}async maybeCleanUp(){if(await Dt(re(this.config.dataDir,"yarn.lock")))try{this.debug("Found yarn.lock! Removing yarn.lock and node_modules..."),await Promise.all([
|
|
91
|
-
Uninstalled JIT Plugins:`));for(let{name:t,version:i}of e)this.log(`${this.plugins.friendlyName(t)} ${se(i)}`)}}formatPlugin(e){let t=`${this.plugins.friendlyName(e.name)} ${se(e.version)}`;return e.type!=="user"&&(t+=se(` (${e.type})`)),e.type==="link"?t+=` ${e.root}`:e.tag&&e.tag!=="latest"&&(t+=se(` (${String(e.tag)})`)),t}};u();var lt=W(le(),1);import{readFile as wu}from"node:fs/promises";import{dirname as
|
|
85
|
+
See more help with --help`,Ya.default.getInstance().get("exitCodes")?.failedFlagParsing&&(_.oclif={exit:Ya.default.getInstance().get("exitCodes")?.failedFlagParsing}),_}},t=c=>{if(c.tokens?.length){if(c.inputFlag.flag.type==="boolean"&&(0,Me.last)(c.tokens)?.input){let h=y=>{let g=[y.inputFlag.name,...y.inputFlag.flag.aliases??[]].map(E=>`${oi}${E}`),_=(0,Me.last)(y.tokens)?.input;return _?!g.includes(_):!0};return{...c,valueFunction:async y=>e(h(y),y.inputFlag.flag,this.context,(0,Me.last)(y.tokens))}}if(c.inputFlag.flag.type==="option"&&c.inputFlag.flag.delimiter&&c.inputFlag.flag.multiple){let h=y=>new RegExp(`(?<!\\\\)${y}`);return{...c,valueFunction:async y=>(await Promise.all((y.tokens??[]).flatMap(g=>g.input.split(h(y.inputFlag.flag.delimiter??","))).map(g=>g.trim().replaceAll(new RegExp(`\\\\${y.inputFlag.flag.delimiter}`,"g"),y.inputFlag.flag.delimiter??",").replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async g=>e(g,y.inputFlag.flag,this.context,{...(0,Me.last)(y.tokens),input:g})))).map(g=>si(y.inputFlag.flag,g))}}if(c.inputFlag.flag.type==="option"&&c.inputFlag.flag.multiple)return{...c,valueFunction:async h=>Promise.all((c.tokens??[]).map(y=>e(si(h.inputFlag.flag,y.input),h.inputFlag.flag,this.context,y)))};if(c.inputFlag.flag.type==="option")return{...c,valueFunction:async h=>e(si(h.inputFlag.flag,(0,Me.last)(c.tokens)?.input),h.inputFlag.flag,this.context,(0,Me.last)(c.tokens))}}if(c.inputFlag.flag.env&&process.env[c.inputFlag.flag.env]){let h=process.env[c.inputFlag.flag.env];if(c.inputFlag.flag.type==="option"&&h)return{...c,valueFunction:async y=>e(si(y.inputFlag.flag,h),y.inputFlag.flag,this.context)};if(c.inputFlag.flag.type==="boolean")return{...c,valueFunction:async y=>(0,Me.isTruthy)(process.env[y.inputFlag.flag.env]??"false")}}return typeof c.inputFlag.flag.default!==void 0?{...c,metadata:{setFromDefault:!0},valueFunction:typeof c.inputFlag.flag.default=="function"?(h,y={})=>c.inputFlag.flag.default({flags:y,options:h.inputFlag.flag}):async()=>c.inputFlag.flag.default}:c},i=c=>c.inputFlag.flag.type==="option"&&c.inputFlag.flag.defaultHelp?{...c,helpFunction:typeof c.inputFlag.flag.defaultHelp=="function"?(p,h,...y)=>p.inputFlag.flag.defaultHelp({flags:h,options:p.inputFlag},...y):p=>p.inputFlag.flag.defaultHelp}:c,r=async c=>{let p=s(d.filter(h=>!h.metadata?.setFromDefault));return Promise.all(c.map(async h=>{try{if(h.helpFunction)return{...h,metadata:{...h.metadata,defaultHelp:await h.helpFunction?.(h,p,this.context)}}}catch{}return h}))},s=c=>Object.fromEntries(c.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),o=this.mapAndValidateFlags(),a=await Promise.all(Object.entries(this.input.flags).filter(([c,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||o.has(c)).map(([c,p])=>({inputFlag:{flag:p,name:c},tokens:o.get(c)})).map(c=>t(c)).filter(c=>c.valueFunction!==void 0).map(c=>i(c)).map(async c=>c.metadata?.setFromDefault?c:{...c,value:await c.valueFunction?.(c)})),l=s(a.filter(c=>!c.metadata?.setFromDefault)),d=await Promise.all(a.map(async c=>c.metadata?.setFromDefault?{...c,value:await c.valueFunction?.(c,l)}:c)),f=d.some(c=>typeof c.helpFunction=="function")?await r(d):d;return{flags:s(f),metadata:{flags:Object.fromEntries(f.filter(c=>c.metadata).map(c=>[c.inputFlag.name,c.metadata]))}}}_setNames(){for(let e of Object.keys(this.input.flags))this.input.flags[e].name=e;for(let e of Object.keys(this.input.args))this.input.args[e].name=e}findFlag(e){let t=e.startsWith("--"),i=t?!1:e.startsWith("-"),r=t?this.findLongFlag(e):i?this.findShortFlag(e):void 0;return{isLong:t,name:r}}findLongFlag(e){let t=e.slice(2);if(this.input.flags[t])return t;if(this.flagAliases[t])return this.flagAliases[t].name;if(e.startsWith(oi)){let i=this.booleanFlags[e.slice(oi.length)];if(i&&i.allowNo)return i.name;let r=this.flagAliases[e.slice(oi.length)];if(r&&r.type==="boolean"&&r.allowNo)return r.name}}findShortFlag([e,t]){return this.flagAliases[t]?this.flagAliases[t].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===t&&t!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let e=new Map;for(let t of this.raw.filter(i=>i.type==="flag")){if(!(t.flag in this.input.flags))throw new rt.CLIError(`Unexpected flag ${t.flag}`);let i=e.get(t.flag)??[];e.set(t.flag,[...i,t])}return e}};$e.Parser=cs});var us=m(ls=>{"use strict";u();Object.defineProperty(ls,"__esModule",{value:!0});ls.validate=sm;var Qa=N(),xe=as();async function sm(n){let e;function t(){let g=Object.entries(n.input.args),_=g.findIndex(([,F])=>F.multiple);if(_!==-1){if(g.findIndex(([,I],We)=>We>_&&I.multiple)!==-1)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:"only one variadic arg (multiple: true) is allowed"});for(let I=0;I<_;I++)if(!g[I][1].required)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:`args before a variadic arg must be required, but "${g[I][0]}" is optional`});for(let I=_+1;I<g.length;I++)if(!g[I][1].required)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n,reason:`args after a variadic arg must be required, but "${g[I][0]}" is optional`})}let E=_!==-1;if(n.output.nonExistentFlags?.length>0)throw new xe.NonExistentFlagsError({flags:n.output.nonExistentFlags,parse:n});let w=Object.keys(n.input.args).length,P=Object.values(n.input.args).some(F=>F.multiple);if(n.input.strict&&!P&&n.output.argv.length>w){let F=n.output.argv.slice(w);throw new xe.UnexpectedArgsError({args:F,parse:n})}let j=[],R=!1;for(let[F,I]of Object.entries(n.input.args)){if(!I.required)R=!0;else if(R&&!E)throw new xe.InvalidArgsSpecError({args:n.input.args,parse:n});I.required&&n.output.args[F]===void 0&&j.push(I)}if(j.length>0){let F=Object.entries(n.input.flags).filter(([I,We])=>We.type==="option"&&!!We.multiple).map(([I])=>I);throw new xe.RequiredArgsError({args:j,flagsWithMultiple:F,parse:n})}}async function i(){let g=Object.entries(n.input.flags).flatMap(([w,P])=>n.output.flags[w]!==void 0?[...P.relationships?y(w,P):[],...P.dependsOn?[p(w,P.dependsOn)]:[],...P.exclusive?[d(w,P.exclusive)]:[],...P.combinable?[f(w,P.combinable)]:[],...P.exactlyOne?[c(w,P.exactlyOne)]:[]]:P.required?[{name:w,reason:`Missing required flag ${w}`,status:"failed",validationFn:"required"}]:P.exactlyOne&&P.exactlyOne.length>0?[a(P)]:P.atLeastOne&&P.atLeastOne.length>0?[l(P)]:[]),E=(await Promise.all(g)).filter(w=>w.status==="failed");if(E.length>0)throw new xe.FailedFlagValidationError({failed:E,parse:n})}function r(){if(n.input.constraints){let _=n.input.constraints.map(E=>E._evaluateAgainstFlags(n.output.flags)).filter(E=>E.status==="failed");if(_.length>0)throw new xe.ViolatedFlagConstraintError({failed:_,parse:n})}}async function s(g){if(e)return e;let _=g.map(async w=>typeof w=="string"?[w,n.output.flags[w]]:await w.when(n.output.flags)?[w.name,n.output.flags[w.name]]:null),E=await Promise.all(_);return e=Object.fromEntries(E.filter(w=>w!==null)),e}let o=g=>Object.keys(g).filter(_=>_!==void 0);function a(g){let _={name:g.name,validationFn:"validateExactlyOneAcrossFlags"};if(Object.entries(n.input.flags).map(w=>w[0]).filter(w=>n.output.flags[w]!==void 0).filter(w=>g.exactlyOne&&g.exactlyOne.includes(w)).length===0){let P=`Exactly one of the following must be provided: ${(0,Qa.uniq)(g.exactlyOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{..._,reason:P,status:"failed"}}return{..._,status:"success"}}function l(g){let _={name:g.name,validationFn:"validateAtLeastOneAcrossFlags"};if(Object.entries(n.input.flags).map(w=>w[0]).filter(w=>n.output.flags[w]!==void 0).filter(w=>g.atLeastOne&&g.atLeastOne.includes(w)).length===0){let P=`At least one of the following must be provided: ${(0,Qa.uniq)(g.atLeastOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{..._,reason:P,status:"failed"}}return{..._,status:"success"}}async function d(g,_){let E={name:g,validationFn:"validateExclusive"},w=await s(_),P=o(w);for(let j of P)if(!(n.output.metadata.flags&&n.output.metadata.flags[j]?.setFromDefault)&&!(n.output.metadata.flags&&n.output.metadata.flags[g]?.setFromDefault)&&n.output.flags[j]!==void 0){let R=n.output.metadata.flags?.[j]?.defaultHelp??n.output.flags[j];return{...E,reason:`--${j}=${R} cannot also be provided when using --${g}`,status:"failed"}}return{...E,status:"success"}}async function f(g,_){let E={name:g,validationFn:"validateCombinable"},w=new Set(_.map(j=>typeof j=="string"?j:j.name)),P=await s(_);for(let j of Object.keys(n.output.flags))if(!(n.output.metadata.flags&&n.output.metadata.flags[j]?.setFromDefault)&&!(n.output.metadata.flags&&n.output.metadata.flags[g]?.setFromDefault)&&j!==g&&n.output.flags[j]!==void 0&&!w.has(j)){let R=Object.keys(P).map(F=>`--${F}`).join(", ");return{...E,reason:`Only the following can be provided when using --${g}: ${R}`,status:"failed"}}return{...E,status:"success"}}async function c(g,_){let E={name:g,validationFn:"validateExactlyOne"},w=await s(_),P=o(w);for(let j of P)if(j!==g&&n.output.flags[j]!==void 0)return{...E,reason:`--${j} cannot also be provided when using --${g}`,status:"failed"};return{...E,status:"success"}}async function p(g,_){let E={name:g,validationFn:"validateDependsOn"},w=await s(_);if(!Object.values(w).every(j=>j!==void 0)){let j=Object.keys(w).map(R=>`--${R}`).join(", ");return{...E,reason:`All of the following must be provided when using --${g}: ${j}`,status:"failed"}}return{...E,status:"success"}}async function h(g,_){let E={name:g,validationFn:"validateSome"},w=await s(_);if(!Object.values(w).some(Boolean)){let j=Object.keys(w).map(R=>`--${R}`).join(", ");return{...E,reason:`One of the following must be provided when using --${g}: ${j}`,status:"failed"}}return{...E,status:"success"}}function y(g,_){return(_.relationships??[]).map(E=>{switch(E.type){case"all":return p(g,E.flags);case"none":return d(g,E.flags);case"only":return f(g,E.flags);case"some":return h(g,E.flags);default:throw new Error(`Unknown relationship type: ${E.type}`)}})}t(),await i(),r()}});var tc=m(ai=>{"use strict";u();Object.defineProperty(ai,"__esModule",{value:!0});ai.flagUsage=ec;ai.flagUsages=cm;var om=N(),am=Ye();function ec(n,e={}){let t=[];n.helpLabel?t.push(n.helpLabel):(n.char&&t.push(`-${n.char}`),n.name&&t.push(` --${n.name}`));let i=n.type==="option"?` ${n.name.toUpperCase()}`:"",r=n.summary||n.description||"";return e.displayRequired&&n.required&&(r=`(required) ${r}`),r=r?(0,am.colorize)("dim",r):void 0,[` ${t.join(",").trim()}${i}`,r]}function cm(n,e={}){return n.length===0?[]:(0,om.sortBy)(n,t=>[t.char?-1:1,t.char,t.name]).map(t=>ec(t,e))}});var ds=m(st=>{"use strict";u();Object.defineProperty(st,"__esModule",{value:!0});st.validate=st.flagUsages=void 0;st.parse=hm;var lm=Za(),um=us(),dm=tc();Object.defineProperty(st,"flagUsages",{enumerable:!0,get:function(){return dm.flagUsages}});var fm=us();Object.defineProperty(st,"validate",{enumerable:!0,get:function(){return fm.validate}});async function hm(n,e){let t={"--":e["--"],args:e.args??{},argv:n,constraints:e.constraints,context:e.context,flags:e.flags??{},strict:e.strict!==!1},r=await new lm.Parser(t).parse();return await(0,um.validate)({input:t,output:r}),r}});var ac=m(ce=>{"use strict";u();var pm=ce&&ce.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),gm=ce&&ce.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),oc=ce&&ce.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&pm(t,e,i[r]);return gm(t,e),t}})(),mm=ce&&ce.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ce,"__esModule",{value:!0});ce.Command=void 0;var ym=$("node:url"),nc=$("node:util"),ps=mm(fe()),_m=ri(),fs=oc(Le()),cn=vt(),wm=Q(),bm=oc(ds()),ic=Nr(),hs=Xe(),rc=N(),ot=Ye(),sc=ps.default.getInstance().get("@oclif/core");process.stdout.on("error",n=>{if(!(n&&n.code==="EPIPE"))throw n});var gs=class{argv;config;static _base=`${sc.name}@${sc.version}`;static aliases=[];static args={};static baseFlags;static constraints;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;parsed=!1;constructor(e,t){this.argv=e,this.config=t,this.id=this.ctor.id;try{this.debug=(0,wm.makeDebug)(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(e,t){e||(e=process.argv.slice(2)),typeof t=="string"&&t.startsWith("file://")&&(t=(0,ym.fileURLToPath)(t));let i=await _m.Config.load(t||$.main?.filename||__dirname),r=ps.default.getInstance();r.has("config")||r.set("config",i);let s=new this(e,i);if(!s.id){let o=s.constructor.name.toLowerCase();s.id=o,s.ctor.id=o}return s._run()}get ctor(){return this.constructor}async _run(){let e,t;try{this.removeEnvVar("REDIRECTED"),await this.init(),t=await this.run()}catch(i){e=i,await this.catch(i)}finally{await this.finally(e)}return t&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(t)),!this.parsed&&!(0,rc.isProd)()&&process.emitWarning(`Command ${this.id} did not parse its arguments. Did you forget to call 'this.parse'?`,{code:"UnparsedCommand"}),t}async catch(e){if(process.exitCode=process.exitCode??e.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(e));else{if(!e.message)throw e;try{ot.ux.action.stop(ot.ux.colorize("bold",ot.ux.colorize("red","!")))}catch{}throw e}}error(e,t={}){return fs.error(e,t)}exit(e=0){fs.exit(e)}async finally(e){}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv);let e=globalThis;e["http-call"]=e["http-call"]||{},e["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor?.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let e=this.argv.indexOf("--"),t=this.argv.indexOf("--json");return e===-1?t!==-1:t!==-1&&t<e}log(e="",...t){this.jsonEnabled()||(e=typeof e=="string"?e:(0,nc.inspect)(e),ot.ux.stdout(e,...t))}logJson(e){ot.ux.stdout(ot.ux.colorizeJson(e,{pretty:!0,theme:this.config.theme?.json}))}logToStderr(e="",...t){this.jsonEnabled()||(e=typeof e=="string"?e:(0,nc.inspect)(e),ot.ux.stderr(e,...t))}async parse(e,t=this.argv){e||(e=this.ctor);let i={context:this,...e,flags:(0,ic.aggregateFlags)(e.flags,e.baseFlags,e.enableJsonFlag)},r=await this.config.runHook("preparse",{argv:[...t],options:i}),s=r.successes?.length?r.successes.find(a=>a.plugin.root===ps.default.getInstance().get("rootPlugin")?.root)?.result??t:t;this.argv=[...s];let o=await bm.parse(s,i);return this.warnIfFlagDeprecated(o.flags??{}),this.parsed=!0,o}toErrorJson(e){return e instanceof Error?{error:{...e,message:e.message,name:e.name}}:{error:e}}toSuccessJson(e){return e}warn(e){return this.jsonEnabled()||fs.warn(e),e}warnIfCommandDeprecated(){let[e]=(0,cn.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&[...this.ctor.aliases,...this.ctor.hiddenAliases].includes(e)){let t=(0,hs.toConfiguredId)(this.ctor.id,this.config),i=(0,hs.toConfiguredId)(e,this.config);this.warn((0,cn.formatCommandDeprecationWarning)(i,{to:t}))}if(this.ctor.state==="deprecated"){let t=(0,hs.toConfiguredId)(this.ctor.id,this.config);this.warn((0,cn.formatCommandDeprecationWarning)(t,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(e){let t=(0,ic.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(e)){let r=t[i],s=r?.deprecated;if(s&&this.warn((0,cn.formatFlagDeprecationWarning)(i,s)),r?.deprecateAliases){let a=(0,rc.uniq)([...r?.aliases??[],...r?.charAliases??[]]).map(d=>d.length===1?`-${d}`:`--${d}`);if(a.length===0)return;let l=a.filter(d=>this.argv.includes(d));for(let d of l){let f=`--${r?.name}`;r?.char&&(f+=` | -${r?.char}`),this.warn((0,cn.formatFlagDeprecationWarning)(d,{to:f}))}}}}removeEnvVar(e){let t=[];try{t.push(...this.config.scopedEnvVarKeys(e))}catch{t.push(this.config.scopedEnvVarKey(e))}t.map(i=>delete process.env[i])}};ce.Command=gs});var lc=m(ln=>{"use strict";u();Object.defineProperty(ln,"__esModule",{value:!0});ln.flag=vm;ln.flags=Em;ln.combinationOf=$m;function vm(n){return new ci([n])}function Em(...n){return new ci(n)}function $m(...n){return{flags:n,type:"all"}}var ci=class{are=this;is=this;constrainedFlags;constraintApplicatorFunctionHolder=new ys;topLevelCondition;underConstructionCondition;constructor(e){this.constrainedFlags=e}get and(){if(this.topLevelCondition===void 0)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'and' requires a 'when' or 'unless'.`);if(this.underConstructionCondition)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'and' cannot directly follow '${this.underConstructionCondition.getName()}'`);return this.topLevelCondition=new bs(this.topLevelCondition),this.underConstructionCondition=this.topLevelCondition,this}get or(){if(this.topLevelCondition===void 0)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'or' requires a 'when' or 'unless'.`);if(this.underConstructionCondition)throw new Error(`Misconfigured constraint on ${q(this.constrainedFlags)}: 'or' cannot directly follow '${this.underConstructionCondition.getName()}'`);return this.topLevelCondition=new vs(this.topLevelCondition),this.underConstructionCondition=this.topLevelCondition,this}get unless(){let e=new ws;if(this.topLevelCondition===void 0&&(this.topLevelCondition=e),this.underConstructionCondition===void 0)this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(e),this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(e),this.underConstructionCondition=e;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}get when(){let e=new _s;if(this.topLevelCondition===void 0&&(this.topLevelCondition=e),this.underConstructionCondition===void 0)this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(e),this.underConstructionCondition=e;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(e),this.underConstructionCondition=e;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}_evaluateAgainstFlags(e){let t=!1;try{t=this.topLevelCondition?this.topLevelCondition.isSatisfied(e):!0}catch(i){return{name:this.constrainedFlags.join(","),reason:`Error evaluating constraint conditions on ${q(this.constrainedFlags)}: ${i.message}`,status:"failed",validationFn:"constraintCondition"}}try{let i=this.constraintApplicatorFunctionHolder.applyConstraintApplicatorFunction(e);return{name:this.constrainedFlags.join(","),reason:i,status:t&&i!==""?"failed":"success",validationFn:this.constraintApplicatorFunctionHolder.constraintType??""}}catch(i){return{name:this.constrainedFlags.join(","),reason:`Error evaluating constraint on ${q(this.constrainedFlags)}: ${i.message}`,status:"failed",validationFn:"constraintApplication"}}}allFlagCriteriaSatisfied(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: allFlagCriteriaSatisfied must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new li(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new li(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}anyFlagCriterionSatisfied(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: anyFlagCriterionSatisfied must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new ui(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new ui(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}dependentOn(...e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("dependentOn",t=>{if(Se(this.constrainedFlags,t).length===0)return"";for(let o of e)if(typeof o=="string"){if(o in t&&t[o]!==void 0)return""}else if(Se(o.flags,t).length===o.flags.length)return"";return`${this.constrainedFlags.length>1?`Flags ${q(this.constrainedFlags)} require`:`Flag ${q(this.constrainedFlags)} requires`} at least one of the following${this.topLevelCondition?" under current circumstances:":":"} ${q(e)}.`}),this}exclusiveWith(...e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("exclusiveWith",t=>{if(Se(this.constrainedFlags,t).length===0)return"";let r=!1;for(let a of e)if(typeof a=="string"){if(a in t&&t[a]!==void 0){r=!0;break}}else if(Se(a.flags,t).length===a.flags.length){r=!0;break}return r?`${this.constrainedFlags.length>1?"Flags":"Flag"} ${q(this.constrainedFlags)} cannot be used with any of the following${this.topLevelCondition?" under current circumstances:":":"} ${q(e)}.`:""}),this}mutuallyDependent(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("mutuallyDependent",e=>{let t=Se(this.constrainedFlags,e);return t.length===0||t.length===this.constrainedFlags.length?"":`The following flags are mutually dependent${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. Found only ${q(t)}.`}),this}mutuallyExclusive(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("mutuallyExclusive",e=>{let t=Se(this.constrainedFlags,e);return t.length<=1?"":`The following flags are mutually exclusive${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. Found: ${q(t)}.`}),this}requiredAll(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("requiredAll",e=>{let t=Se(this.constrainedFlags,e);if(t.length===this.constrainedFlags.length)return"";let i=this.constrainedFlags.length>1?"These flags are required":"This flag is required",r=t.length>0?`Found only: ${q(t)}.`:"Found none.";return`${i}${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}. ${r}`}),this}requiredAny(){return this.constraintApplicatorFunctionHolder.setConstraintApplicator("requiredAny",e=>Se(this.constrainedFlags,e).length>0?"":`Must provide at least one of these flags${this.topLevelCondition?" under current circumstances:":":"} ${q(this.constrainedFlags)}.`),this}requiredAtLeastN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredAtLeast${e}`,t=>ms(e,"AT_LEAST_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}requiredAtMostN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredAtMost${e}`,t=>ms(e,"AT_MOST_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}requiredExactlyN(e){return this.constraintApplicatorFunctionHolder.setConstraintApplicator(`requiredExactly${e}`,t=>ms(e,"EXACTLY_N",this.constrainedFlags,t,this.topLevelCondition!==void 0)),this}thisIsTrue(e){if(this.underConstructionCondition===void 0)throw new Error(`Misconfigured constraint condition on ${q(this.constrainedFlags)}: thisIsTrue must immediately follow a when/unless/and/or`);if(this.underConstructionCondition instanceof qe)this.underConstructionCondition.setCondition(new di(e)),this.underConstructionCondition=void 0;else if(this.underConstructionCondition instanceof Fe)this.underConstructionCondition.setRight(new di(e)),this.underConstructionCondition=void 0;else throw new TypeError("UNKNOWN CONDITION TYPE");return this}},ys=class{constraintType;constraintApplicatorFunction;applyConstraintApplicatorFunction(e){return(this.constraintApplicatorFunction??function(){return""})(e)}setConstraintApplicator(e,t){if(this.constraintApplicatorFunction)throw new Error(`Misconfigured Constraint: Cannot apply multiple kinds of constraint within one statement: ${this.constraintType}, ${e}. Use multiple constraint expressions instead.`);this.constraintType=e,this.constraintApplicatorFunction=t}},cc={AT_LEAST_N:{fn:(n,e)=>e>=n,label:"at least"},AT_MOST_N:{fn:(n,e)=>e<=n,label:"at most"},EXACTLY_N:{fn:(n,e)=>e===n,label:"exactly"}};function ms(n,e,t,i,r){let s=Se(t,i);return cc[e].fn(n,s.length)?"":`Must provide ${cc[e].label} ${n} of the following${r?" under current circumstances:":":"} ${q(t)}. Found ${s.length}.`}function Se(n,e){return n.filter(t=>t in e&&e[t]!==void 0)}function q(n){return n.map(t=>typeof t=="string"?`--${t}`:`combination of ${t.flags.map(i=>`--${i}`).join(" and ")}`).join(", ")}var at=class{},qe=class extends at{condition;setCondition(e){if(this.condition)throw new Error(`Duplicate conditions applied to '${this.getName()}' clause: '${this.condition.getName()}' and '${e.getName()}'.`);this.condition=e}},_s=class extends qe{getName(){return"when"}isSatisfied(e){if(this.condition)return this.condition.isSatisfied(e);throw new Error("'when' expression without any conditions")}},ws=class extends qe{getName(){return"unless"}isSatisfied(e){if(this.condition)return!this.condition.isSatisfied(e);throw new Error("'unless' expression without any conditions")}},li=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"allFlagCriteriaSatisfied"}isSatisfied(e){for(let t of Object.keys(this.tester))if(!this.tester[t](e[t]))return!1;return!0}},ui=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"anyFlagCriterionSatisfied"}isSatisfied(e){for(let t of Object.keys(this.tester))if(this.tester[t](e[t]))return!0;return!1}},di=class extends at{tester;constructor(e){super(),this.tester=e}getName(){return"thisIsTrue"}isSatisfied(e){return this.tester(e)}},Fe=class extends at{left;right;constructor(e){super(),this.left=e}setRight(e){this.right=e}},bs=class extends Fe{getName(){return"and"}isSatisfied(e){return this.left.isSatisfied(e)&&(this.right?this.right.isSatisfied(e):!0)}},vs=class extends Fe{getName(){return"or"}isSatisfied(e){return this.left.isSatisfied(e)||(this.right?this.right.isSatisfied(e):!1)}}});var $s=m(Es=>{"use strict";u();Object.defineProperty(Es,"__esModule",{value:!0});Es.flush=jm;var Om=mt();function Pm(n,e){function t(i,r=!1){return new Promise(s=>{let o=setTimeout(()=>s(null),i);r&&o.unref()})}return Promise.race([n,t(e,!0).then(()=>(0,Om.error)("timed out"))])}async function Cm(){let n=new Promise(t=>{process.stdout.once("drain",()=>t(null))});if(!process.stdout.write(""))return n}async function jm(n=1e4){await Pm(Cm(),n)}});var Ps=m(me=>{"use strict";u();var Im=me&&me.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(me,"__esModule",{value:!0});me.versionAddition=me.helpAddition=void 0;me.run=Rm;var uc=$("node:url"),Lm=Im(fe()),Am=ri(),Os=Yt(),dc=Q(),Ft=Ct(),xm=Mn(),Sm=Ye(),qm=(n,e)=>{if(n.length===0&&!e.isSingleCommandCLI)return!0;let t=(0,Os.getHelpFlagAdditions)(e);for(let i of n){if(t.includes(i))return!0;if(i==="--")return!1}return!1};me.helpAddition=qm;var Fm=(n,e)=>{let t=e?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...t]).values()].includes(n[0])};me.versionAddition=Fm;async function Rm(n,e){let t=Ft.Performance.mark(Ft.OCLIF_MARKER_OWNER,"main.run"),i=Ft.Performance.mark(Ft.OCLIF_MARKER_OWNER,"main.run#init"),r=async p=>{let h=await(0,Os.loadHelpClass)(o);await new h(o,o.pjson.oclif.helpOptions??o.pjson.helpOptions).showHelp(p)};(0,dc.setLogger)(e);let{debug:s}=(0,dc.getLogger)("main");s(`process.execPath: ${process.execPath}`),s(`process.execArgv: ${process.execArgv}`),s("process.argv: %O",process.argv),n=n??process.argv.slice(2),e&&(typeof e=="string"&&e.startsWith("file://")||e instanceof uc.URL)&&(e=(0,uc.fileURLToPath)(e));let o=await Am.Config.load(e??$.main?.filename??__dirname);Lm.default.getInstance().set("config",o),o.isSingleCommandCLI&&(n=[xm.SINGLE_COMMAND_CLI_SYMBOL,...n]);let[a,...l]=(0,Os.normalizeArgv)(o,n),d=async(p,h)=>{t?.stop(),i?.stopped||i?.stop(),await Ft.Performance.collect(),Ft.Performance.debug(),await o.runHook("finally",{argv:l,Command:p,error:h,id:a})};if(await o.runHook("init",{argv:l,id:a}),(0,me.versionAddition)(n,o)){Sm.ux.stdout(o.userAgent),await d();return}if((0,me.helpAddition)(n,o)){await r(n),await d();return}let f=o.findCommand(a);if(!f&&(o.flexibleTaxonomy?null:o.findTopic(a))){await r([a]),await d();return}i?.stop();let c;try{return await o.runCommand(a,l,f)}catch(p){throw c=p,p}finally{await d(f,c)}}});var fc=m(Cs=>{"use strict";u();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.execute=Hm;var Nm=Le(),Tm=Xn(),Dm=$s(),km=Ps(),Mm=Ie();async function Hm(n){if(!n.dir&&!n.loadOptions)throw new Nm.CLIError("dir or loadOptions is required.");return n.development&&(process.env.NODE_ENV="development",Mm.settings.debug=!0),(0,km.run)(n.args??process.argv.slice(2),n.loadOptions??n.dir).then(async e=>((0,Dm.flush)(),e)).catch(async e=>(0,Tm.handle)(e))}});var pc=m(hc=>{"use strict";u();Object.defineProperty(hc,"__esModule",{value:!0})});var le=m(O=>{"use strict";u();var Bm=O&&O.__createBinding||(Object.create?(function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}):(function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]})),Um=O&&O.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),ct=O&&O.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=n(e),r=0;r<i.length;r++)i[r]!=="default"&&Bm(t,e,i[r]);return Um(t,e),t}})();Object.defineProperty(O,"__esModule",{value:!0});O.ux=O.toStandardizedId=O.toConfiguredId=O.settings=O.Performance=O.Parser=O.ModuleLoader=O.getLogger=O.Interfaces=O.loadHelpClass=O.HelpBase=O.Help=O.CommandHelp=O.flush=O.Flags=O.execute=O.handle=O.Errors=O.Constraints=O.Plugin=O.Config=O.Command=O.Args=void 0;var Wm=N();function Vm(){try{process.cwd()}catch(n){n.code==="ENOENT"&&process.stderr.write(`WARNING: current directory does not exist
|
|
86
|
+
`)}}function Gm(){if(!(process.env.OCLIF_DISABLE_ENGINE_WARNING&&(0,Wm.isTruthy)(process.env.OCLIF_DISABLE_ENGINE_WARNING)))try{let n=$("node:path"),e=Ou(),t=n.join(__dirname,".."),i=$(n.join(t,"package.json"));e.satisfies(process.versions.node,i.engines.node)||process.emitWarning(`Node version must be ${i.engines.node} to use this CLI. Current node version: ${process.versions.node}`)}catch{}}Vm();Gm();O.Args=ct(eo());var zm=ac();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return zm.Command}});var gc=ri();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return gc.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return gc.Plugin}});O.Constraints=ct(lc());O.Errors=ct(Le());var Jm=Xn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return Jm.handle}});var Km=fc();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return Km.execute}});O.Flags=ct(Fr());var Xm=$s();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return Xm.flush}});var fi=Yt();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return fi.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return fi.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return fi.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return fi.loadHelpClass}});O.Interfaces=ct(pc());var Ym=Q();Object.defineProperty(O,"getLogger",{enumerable:!0,get:function(){return Ym.getLogger}});var Zm=Ps();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return Zm.run}});O.ModuleLoader=ct(Bt());O.Parser=ct(ds());var Qm=Ct();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return Qm.Performance}});var ey=Ie();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return ey.settings}});var mc=Xe();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return mc.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return mc.toStandardizedId}});var ty=Ye();Object.defineProperty(O,"ux",{enumerable:!0,get:function(){return ty.ux}})});var Rt=m((c$,_c)=>{"use strict";u();var ny="2.0.0",iy=Number.MAX_SAFE_INTEGER||9007199254740991,ry=16,sy=250,oy=["major","premajor","minor","preminor","patch","prepatch","prerelease"];_c.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ry,MAX_SAFE_BUILD_LENGTH:sy,MAX_SAFE_INTEGER:iy,RELEASE_TYPES:oy,SEMVER_SPEC_VERSION:ny,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var dn=m((u$,wc)=>{"use strict";u();var ay=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};wc.exports=ay});var Nt=m((Oe,bc)=>{"use strict";u();var{MAX_SAFE_COMPONENT_LENGTH:js,MAX_SAFE_BUILD_LENGTH:cy,MAX_LENGTH:ly}=Rt(),uy=dn();Oe=bc.exports={};var dy=Oe.re=[],fy=Oe.safeRe=[],b=Oe.src=[],hy=Oe.safeSrc=[],v=Oe.t={},py=0,Is="[a-zA-Z0-9-]",gy=[["\\s",1],["\\d",ly],[Is,cy]],my=n=>{for(let[e,t]of gy)n=n.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return n},C=(n,e,t)=>{let i=my(e),r=py++;uy(n,r,e),v[n]=r,b[r]=e,hy[r]=i,dy[r]=new RegExp(e,t?"g":void 0),fy[r]=new RegExp(i,t?"g":void 0)};C("NUMERICIDENTIFIER","0|[1-9]\\d*");C("NUMERICIDENTIFIERLOOSE","\\d+");C("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Is}*`);C("MAINVERSION",`(${b[v.NUMERICIDENTIFIER]})\\.(${b[v.NUMERICIDENTIFIER]})\\.(${b[v.NUMERICIDENTIFIER]})`);C("MAINVERSIONLOOSE",`(${b[v.NUMERICIDENTIFIERLOOSE]})\\.(${b[v.NUMERICIDENTIFIERLOOSE]})\\.(${b[v.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASEIDENTIFIER",`(?:${b[v.NONNUMERICIDENTIFIER]}|${b[v.NUMERICIDENTIFIER]})`);C("PRERELEASEIDENTIFIERLOOSE",`(?:${b[v.NONNUMERICIDENTIFIER]}|${b[v.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASE",`(?:-(${b[v.PRERELEASEIDENTIFIER]}(?:\\.${b[v.PRERELEASEIDENTIFIER]})*))`);C("PRERELEASELOOSE",`(?:-?(${b[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[v.PRERELEASEIDENTIFIERLOOSE]})*))`);C("BUILDIDENTIFIER",`${Is}+`);C("BUILD",`(?:\\+(${b[v.BUILDIDENTIFIER]}(?:\\.${b[v.BUILDIDENTIFIER]})*))`);C("FULLPLAIN",`v?${b[v.MAINVERSION]}${b[v.PRERELEASE]}?${b[v.BUILD]}?`);C("FULL",`^${b[v.FULLPLAIN]}$`);C("LOOSEPLAIN",`[v=\\s]*${b[v.MAINVERSIONLOOSE]}${b[v.PRERELEASELOOSE]}?${b[v.BUILD]}?`);C("LOOSE",`^${b[v.LOOSEPLAIN]}$`);C("GTLT","((?:<|>)?=?)");C("XRANGEIDENTIFIERLOOSE",`${b[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);C("XRANGEIDENTIFIER",`${b[v.NUMERICIDENTIFIER]}|x|X|\\*`);C("XRANGEPLAIN",`[v=\\s]*(${b[v.XRANGEIDENTIFIER]})(?:\\.(${b[v.XRANGEIDENTIFIER]})(?:\\.(${b[v.XRANGEIDENTIFIER]})(?:${b[v.PRERELEASE]})?${b[v.BUILD]}?)?)?`);C("XRANGEPLAINLOOSE",`[v=\\s]*(${b[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[v.XRANGEIDENTIFIERLOOSE]})(?:${b[v.PRERELEASELOOSE]})?${b[v.BUILD]}?)?)?`);C("XRANGE",`^${b[v.GTLT]}\\s*${b[v.XRANGEPLAIN]}$`);C("XRANGELOOSE",`^${b[v.GTLT]}\\s*${b[v.XRANGEPLAINLOOSE]}$`);C("COERCEPLAIN",`(^|[^\\d])(\\d{1,${js}})(?:\\.(\\d{1,${js}}))?(?:\\.(\\d{1,${js}}))?`);C("COERCE",`${b[v.COERCEPLAIN]}(?:$|[^\\d])`);C("COERCEFULL",b[v.COERCEPLAIN]+`(?:${b[v.PRERELEASE]})?(?:${b[v.BUILD]})?(?:$|[^\\d])`);C("COERCERTL",b[v.COERCE],!0);C("COERCERTLFULL",b[v.COERCEFULL],!0);C("LONETILDE","(?:~>?)");C("TILDETRIM",`(\\s*)${b[v.LONETILDE]}\\s+`,!0);Oe.tildeTrimReplace="$1~";C("TILDE",`^${b[v.LONETILDE]}${b[v.XRANGEPLAIN]}$`);C("TILDELOOSE",`^${b[v.LONETILDE]}${b[v.XRANGEPLAINLOOSE]}$`);C("LONECARET","(?:\\^)");C("CARETTRIM",`(\\s*)${b[v.LONECARET]}\\s+`,!0);Oe.caretTrimReplace="$1^";C("CARET",`^${b[v.LONECARET]}${b[v.XRANGEPLAIN]}$`);C("CARETLOOSE",`^${b[v.LONECARET]}${b[v.XRANGEPLAINLOOSE]}$`);C("COMPARATORLOOSE",`^${b[v.GTLT]}\\s*(${b[v.LOOSEPLAIN]})$|^$`);C("COMPARATOR",`^${b[v.GTLT]}\\s*(${b[v.FULLPLAIN]})$|^$`);C("COMPARATORTRIM",`(\\s*)${b[v.GTLT]}\\s*(${b[v.LOOSEPLAIN]}|${b[v.XRANGEPLAIN]})`,!0);Oe.comparatorTrimReplace="$1$2$3";C("HYPHENRANGE",`^\\s*(${b[v.XRANGEPLAIN]})\\s+-\\s+(${b[v.XRANGEPLAIN]})\\s*$`);C("HYPHENRANGELOOSE",`^\\s*(${b[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[v.XRANGEPLAINLOOSE]})\\s*$`);C("STAR","(<|>)?=?\\s*\\*");C("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");C("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var hi=m((h$,vc)=>{"use strict";u();var yy=Object.freeze({loose:!0}),_y=Object.freeze({}),wy=n=>n?typeof n!="object"?yy:n:_y;vc.exports=wy});var Ls=m((g$,Oc)=>{"use strict";u();var Ec=/^[0-9]+$/,$c=(n,e)=>{if(typeof n=="number"&&typeof e=="number")return n===e?0:n<e?-1:1;let t=Ec.test(n),i=Ec.test(e);return t&&i&&(n=+n,e=+e),n===e?0:t&&!i?-1:i&&!t?1:n<e?-1:1},by=(n,e)=>$c(e,n);Oc.exports={compareIdentifiers:$c,rcompareIdentifiers:by}});var G=m((y$,Cc)=>{"use strict";u();var pi=dn(),{MAX_LENGTH:Pc,MAX_SAFE_INTEGER:gi}=Rt(),{safeRe:mi,t:yi}=Nt(),vy=hi(),{compareIdentifiers:As}=Ls(),Ey=(n,e)=>{let t=e.split(".");if(t.length>n.length)return!1;for(let i=0;i<t.length;i++)if(As(n[i],t[i])!==0)return!1;return!0},xs=class n{constructor(e,t){if(t=vy(t),e instanceof n){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Pc)throw new TypeError(`version is longer than ${Pc} characters`);pi("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?mi[yi.LOOSE]:mi[yi.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>gi||this.major<0)throw new TypeError("Invalid major version");if(this.minor>gi||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>gi||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let s=+r;if(s>=0&&s<gi)return s}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(pi("SemVer.compare",this.version,this.options,e),!(e instanceof n)){if(typeof e=="string"&&e===this.version)return 0;e=new n(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof n||(e=new n(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof n||(e=new n(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],r=e.prerelease[t];if(pi("prerelease compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return As(i,r)}while(++t)}compareBuild(e){e instanceof n||(e=new n(e,this.options));let t=0;do{let i=this.build[t],r=e.build[t];if(pi("build compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return As(i,r)}while(++t)}inc(e,t,i){if(e.startsWith("pre")){if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let r=`-${t}`.match(this.options.loose?mi[yi.PRERELEASELOOSE]:mi[yi.PRERELEASE]);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(t){let s=[t,r];if(i===!1&&(s=[t]),Ey(this.prerelease,t)){let o=this.prerelease[t.split(".").length];isNaN(o)&&(this.prerelease=s)}else this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Cc.exports=xs});var He=m((w$,Ic)=>{"use strict";u();var jc=G(),$y=(n,e,t=!1)=>{if(n instanceof jc)return n;try{return new jc(n,e)}catch(i){if(!t)return null;throw i}};Ic.exports=$y});var Ac=m((v$,Lc)=>{"use strict";u();var Oy=He(),Py=(n,e)=>{let t=Oy(n,e);return t?t.version:null};Lc.exports=Py});var Sc=m(($$,xc)=>{"use strict";u();var Cy=He(),jy=(n,e)=>{let t=Cy(n.trim().replace(/^[=v]+/,""),e);return t?t.version:null};xc.exports=jy});var Rc=m((P$,Fc)=>{"use strict";u();var qc=G(),Iy=(n,e,t,i,r)=>{typeof t=="string"&&(r=i,i=t,t=void 0);try{return new qc(n instanceof qc?n.version:n,t).inc(e,i,r).version}catch{return null}};Fc.exports=Iy});var Dc=m((j$,Tc)=>{"use strict";u();var Nc=He(),Ly=(n,e)=>{let t=Nc(n,null,!0),i=Nc(e,null,!0),r=t.compare(i);if(r===0)return null;let s=r>0,o=s?t:i,a=s?i:t,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let f=l?"pre":"";return t.major!==i.major?f+"major":t.minor!==i.minor?f+"minor":t.patch!==i.patch?f+"patch":"prerelease"};Tc.exports=Ly});var Mc=m((L$,kc)=>{"use strict";u();var Ay=G(),xy=(n,e)=>new Ay(n,e).major;kc.exports=xy});var Bc=m((x$,Hc)=>{"use strict";u();var Sy=G(),qy=(n,e)=>new Sy(n,e).minor;Hc.exports=qy});var Wc=m((q$,Uc)=>{"use strict";u();var Fy=G(),Ry=(n,e)=>new Fy(n,e).patch;Uc.exports=Ry});var Gc=m((R$,Vc)=>{"use strict";u();var Ny=He(),Ty=(n,e)=>{let t=Ny(n,e);return t&&t.prerelease.length?t.prerelease:null};Vc.exports=Ty});var ue=m((T$,Jc)=>{"use strict";u();var zc=G(),Dy=(n,e,t)=>new zc(n,t).compare(new zc(e,t));Jc.exports=Dy});var Xc=m((k$,Kc)=>{"use strict";u();var ky=ue(),My=(n,e,t)=>ky(e,n,t);Kc.exports=My});var Zc=m((H$,Yc)=>{"use strict";u();var Hy=ue(),By=(n,e)=>Hy(n,e,!0);Yc.exports=By});var _i=m((U$,el)=>{"use strict";u();var Qc=G(),Uy=(n,e,t)=>{let i=new Qc(n,t),r=new Qc(e,t);return i.compare(r)||i.compareBuild(r)};el.exports=Uy});var nl=m((V$,tl)=>{"use strict";u();var Wy=_i(),Vy=(n,e)=>n.sort((t,i)=>Wy(t,i,e));tl.exports=Vy});var rl=m((z$,il)=>{"use strict";u();var Gy=_i(),zy=(n,e)=>n.sort((t,i)=>Gy(i,t,e));il.exports=zy});var fn=m((K$,sl)=>{"use strict";u();var Jy=ue(),Ky=(n,e,t)=>Jy(n,e,t)>0;sl.exports=Ky});var wi=m((Y$,ol)=>{"use strict";u();var Xy=ue(),Yy=(n,e,t)=>Xy(n,e,t)<0;ol.exports=Yy});var Ss=m((Q$,al)=>{"use strict";u();var Zy=ue(),Qy=(n,e,t)=>Zy(n,e,t)===0;al.exports=Qy});var qs=m((tO,cl)=>{"use strict";u();var e_=ue(),t_=(n,e,t)=>e_(n,e,t)!==0;cl.exports=t_});var bi=m((iO,ll)=>{"use strict";u();var n_=ue(),i_=(n,e,t)=>n_(n,e,t)>=0;ll.exports=i_});var vi=m((sO,ul)=>{"use strict";u();var r_=ue(),s_=(n,e,t)=>r_(n,e,t)<=0;ul.exports=s_});var Fs=m((aO,dl)=>{"use strict";u();var o_=Ss(),a_=qs(),c_=fn(),l_=bi(),u_=wi(),d_=vi(),f_=(n,e,t,i)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return o_(n,t,i);case"!=":return a_(n,t,i);case">":return c_(n,t,i);case">=":return l_(n,t,i);case"<":return u_(n,t,i);case"<=":return d_(n,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};dl.exports=f_});var hl=m((lO,fl)=>{"use strict";u();var h_=G(),p_=He(),{safeRe:Ei,t:$i}=Nt(),g_=(n,e)=>{if(n instanceof h_)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let t=null;if(!e.rtl)t=n.match(e.includePrerelease?Ei[$i.COERCEFULL]:Ei[$i.COERCE]);else{let l=e.includePrerelease?Ei[$i.COERCERTLFULL]:Ei[$i.COERCERTL],d;for(;(d=l.exec(n))&&(!t||t.index+t[0].length!==n.length);)(!t||d.index+d[0].length!==t.index+t[0].length)&&(t=d),l.lastIndex=d.index+d[1].length+d[2].length;l.lastIndex=-1}if(t===null)return null;let i=t[2],r=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return p_(`${i}.${r}.${s}${o}${a}`,e)};fl.exports=g_});var gl=m((dO,pl)=>{"use strict";u();var m_=He(),y_=Rt(),__=G(),w_=(n,e,t)=>{if(!y_.RELEASE_TYPES.includes(e))return null;let i=b_(n,t);return i&&v_(i,e)},b_=(n,e)=>{let t=n instanceof __?n.version:n;return m_(t,e)},v_=(n,e)=>{if(E_(e))return n.version;switch(n.prerelease=[],e){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},E_=n=>n.startsWith("pre");pl.exports=w_});var yl=m((hO,ml)=>{"use strict";u();var Rs=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,t)}return this}};ml.exports=Rs});var de=m((gO,vl)=>{"use strict";u();var $_=/\s+/g,Ns=class n{constructor(e,t){if(t=P_(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof Ts)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace($_," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!wl(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&F_(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let i=0;i<t.length;i++)i>0&&(this.formatted+=" "),this.formatted+=t[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(q_,"");let i=((this.options.includePrerelease&&x_)|(this.options.loose&&S_))+":"+e,r=_l.get(i);if(r)return r;let s=this.options.loose,o=s?Z[z.HYPHENRANGELOOSE]:Z[z.HYPHENRANGE];e=e.replace(o,V_(this.options.includePrerelease)),A("hyphen replace",e),e=e.replace(Z[z.COMPARATORTRIM],I_),A("comparator trim",e),e=e.replace(Z[z.TILDETRIM],L_),A("tilde trim",e),e=e.replace(Z[z.CARETTRIM],A_),A("caret trim",e);let a=e.split(" ").map(c=>R_(c,this.options)).join(" ").split(/\s+/).map(c=>W_(c,this.options));s&&(a=a.filter(c=>(A("loose invalid filter",c,this.options),!!c.match(Z[z.COMPARATORLOOSE])))),A("range list",a);let l=new Map,d=a.map(c=>new Ts(c,this.options));for(let c of d){if(wl(c))return[c];l.set(c.value,c)}l.size>1&&l.has("")&&l.delete("");let f=[...l.values()];return _l.set(i,f),f}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>bl(i,t)&&e.set.some(r=>bl(r,t)&&i.every(s=>r.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new C_(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(G_(this.set[t],e,this.options))return!0;return!1}};vl.exports=Ns;var O_=yl(),_l=new O_,P_=hi(),Ts=hn(),A=dn(),C_=G(),{safeRe:Z,src:j_,t:z,comparatorTrimReplace:I_,tildeTrimReplace:L_,caretTrimReplace:A_}=Nt(),{FLAG_INCLUDE_PRERELEASE:x_,FLAG_LOOSE:S_}=Rt(),q_=new RegExp(j_[z.BUILD],"g"),wl=n=>n.value==="<0.0.0-0",F_=n=>n.value==="",bl=(n,e)=>{let t=!0,i=n.slice(),r=i.pop();for(;t&&i.length;)t=i.every(s=>r.intersects(s,e)),r=i.pop();return t},R_=(n,e)=>(n=n.replace(Z[z.BUILD],""),A("comp",n,e),n=k_(n,e),A("caret",n),n=T_(n,e),A("tildes",n),n=H_(n,e),A("xrange",n),n=U_(n,e),A("stars",n),n),B=n=>!n||n.toLowerCase()==="x"||n==="*",N_=(n,e,t)=>B(n)&&!B(e)||B(e)&&t&&!B(t),T_=(n,e)=>n.trim().split(/\s+/).map(t=>D_(t,e)).join(" "),D_=(n,e)=>{let t=e.loose?Z[z.TILDELOOSE]:Z[z.TILDE],i=e.includePrerelease?"-0":"";return n.replace(t,(r,s,o,a,l)=>{A("tilde",n,r,s,o,a,l);let d;return B(s)?d="":B(o)?d=`>=${s}.0.0${i} <${+s+1}.0.0-0`:B(a)?d=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l?(A("replaceTilde pr",l),d=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`):d=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,A("tilde return",d),d})},k_=(n,e)=>n.trim().split(/\s+/).map(t=>M_(t,e)).join(" "),M_=(n,e)=>{A("caret",n,e);let t=e.loose?Z[z.CARETLOOSE]:Z[z.CARET],i=e.includePrerelease?"-0":"";return n.replace(t,(r,s,o,a,l)=>{A("caret",n,r,s,o,a,l);let d;return B(s)?d="":B(o)?d=`>=${s}.0.0${i} <${+s+1}.0.0-0`:B(a)?s==="0"?d=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(A("replaceCaret pr",l),s==="0"?o==="0"?d=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(A("no pr"),s==="0"?o==="0"?d=`>=${s}.${o}.${a} <${s}.${o}.${+a+1}-0`:d=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`:d=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),A("caret return",d),d})},H_=(n,e)=>(A("replaceXRanges",n,e),n.split(/\s+/).map(t=>B_(t,e)).join(" ")),B_=(n,e)=>{n=n.trim();let t=e.loose?Z[z.XRANGELOOSE]:Z[z.XRANGE];return n.replace(t,(i,r,s,o,a,l)=>{if(A("xRange",n,i,r,s,o,a,l),N_(s,o,a))return n;let d=B(s),f=d||B(o),c=f||B(a),p=c;return r==="="&&p&&(r=""),l=e.includePrerelease?"-0":"",d?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&p?(f&&(o=0),a=0,r===">"?(r=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):r==="<="&&(r="<",f?s=+s+1:o=+o+1),r==="<"&&(l="-0"),i=`${r+s}.${o}.${a}${l}`):f?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:c&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),A("xRange return",i),i})},U_=(n,e)=>(A("replaceStars",n,e),n.trim().replace(Z[z.STAR],"")),W_=(n,e)=>(A("replaceGTE0",n,e),n.trim().replace(Z[e.includePrerelease?z.GTE0PRE:z.GTE0],"")),V_=n=>(e,t,i,r,s,o,a,l,d,f,c,p)=>(B(i)?t="":B(r)?t=`>=${i}.0.0${n?"-0":""}`:B(s)?t=`>=${i}.${r}.0${n?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,B(d)?l="":B(f)?l=`<${+d+1}.0.0-0`:B(c)?l=`<${d}.${+f+1}.0-0`:p?l=`<=${d}.${f}.${c}-${p}`:n?l=`<${d}.${f}.${+c+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),G_=(n,e,t)=>{for(let i=0;i<n.length;i++)if(!n[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<n.length;i++)if(A(n[i].semver),n[i].semver!==Ts.ANY&&n[i].semver.prerelease.length>0){let r=n[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var hn=m((yO,jl)=>{"use strict";u();var pn=Symbol("SemVer ANY"),Ms=class n{static get ANY(){return pn}constructor(e,t){if(t=El(t),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ks("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===pn?this.value="":this.value=this.operator+this.semver.version,ks("comp",this)}parse(e){let t=this.options.loose?$l[Ol.COMPARATORLOOSE]:$l[Ol.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Pl(i[2],this.options.loose):this.semver=pn}toString(){return this.value}test(e){if(ks("Comparator.test",e,this.options.loose),this.semver===pn||e===pn)return!0;if(typeof e=="string")try{e=new Pl(e,this.options)}catch{return!1}return Ds(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Cl(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Cl(this.value,t).test(e.semver):(t=El(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Ds(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ds(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};jl.exports=Ms;var El=hi(),{safeRe:$l,t:Ol}=Nt(),Ds=Fs(),ks=dn(),Pl=G(),Cl=de()});var gn=m((wO,Il)=>{"use strict";u();var z_=de(),J_=(n,e,t)=>{try{e=new z_(e,t)}catch{return!1}return e.test(n)};Il.exports=J_});var Al=m((vO,Ll)=>{"use strict";u();var K_=de(),X_=(n,e)=>new K_(n,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Ll.exports=X_});var Sl=m(($O,xl)=>{"use strict";u();var Y_=G(),Z_=de(),Q_=(n,e,t)=>{let i=null,r=null,s=null;try{s=new Z_(e,t)}catch{return null}return n.forEach(o=>{s.test(o)&&(!i||r.compare(o)===-1)&&(i=o,r=new Y_(i,t))}),i};xl.exports=Q_});var Fl=m((PO,ql)=>{"use strict";u();var ew=G(),tw=de(),nw=(n,e,t)=>{let i=null,r=null,s=null;try{s=new tw(e,t)}catch{return null}return n.forEach(o=>{s.test(o)&&(!i||r.compare(o)===1)&&(i=o,r=new ew(i,t))}),i};ql.exports=nw});var Tl=m((jO,Nl)=>{"use strict";u();var Hs=G(),iw=de(),Rl=fn(),rw=(n,e)=>{n=new iw(n,e);let t=new Hs("0.0.0");if(n.test(t)||(t=new Hs("0.0.0-0"),n.test(t)))return t;t=null;for(let i=0;i<n.set.length;++i){let r=n.set[i],s=null;r.forEach(o=>{let a=new Hs(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Rl(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||Rl(t,s))&&(t=s)}return t&&n.test(t)?t:null};Nl.exports=rw});var kl=m((LO,Dl)=>{"use strict";u();var sw=de(),ow=(n,e)=>{try{return new sw(n,e).range||"*"}catch{return null}};Dl.exports=ow});var Oi=m((xO,Ul)=>{"use strict";u();var aw=G(),Bl=hn(),{ANY:cw}=Bl,lw=de(),uw=gn(),Ml=fn(),Hl=wi(),dw=vi(),fw=bi(),hw=(n,e,t,i)=>{n=new aw(n,i),e=new lw(e,i);let r,s,o,a,l;switch(t){case">":r=Ml,s=dw,o=Hl,a=">",l=">=";break;case"<":r=Hl,s=fw,o=Ml,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(uw(n,e,i))return!1;for(let d=0;d<e.set.length;++d){let f=e.set[d],c=null,p=null;if(f.forEach(h=>{h.semver===cw&&(h=new Bl(">=0.0.0")),c=c||h,p=p||h,r(h.semver,c.semver,i)?c=h:o(h.semver,p.semver,i)&&(p=h)}),c.operator===a||c.operator===l||(!p.operator||p.operator===a)&&s(n,p.semver))return!1;if(p.operator===l&&o(n,p.semver))return!1}return!0};Ul.exports=hw});var Vl=m((qO,Wl)=>{"use strict";u();var pw=Oi(),gw=(n,e,t)=>pw(n,e,">",t);Wl.exports=gw});var zl=m((RO,Gl)=>{"use strict";u();var mw=Oi(),yw=(n,e,t)=>mw(n,e,"<",t);Gl.exports=yw});var Xl=m((TO,Kl)=>{"use strict";u();var Jl=de(),_w=(n,e,t)=>(n=new Jl(n,t),e=new Jl(e,t),n.intersects(e,t));Kl.exports=_w});var Zl=m((kO,Yl)=>{"use strict";u();var ww=gn(),bw=ue();Yl.exports=(n,e,t)=>{let i=[],r=null,s=null,o=n.sort((f,c)=>bw(f,c,t));for(let f of o)ww(f,e,t)?(s=f,r||(r=f)):(s&&i.push([r,s]),s=null,r=null);r&&i.push([r,null]);let a=[];for(let[f,c]of i)f===c?a.push(f):!c&&f===o[0]?a.push("*"):c?f===o[0]?a.push(`<=${c}`):a.push(`${f} - ${c}`):a.push(`>=${f}`);let l=a.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return l.length<d.length?l:e}});var ru=m((HO,iu)=>{"use strict";u();var Ql=de(),Ws=hn(),{ANY:Bs}=Ws,Us=gn(),Vs=ue(),vw=(n,e,t={})=>{if(n===e)return!0;n=new Ql(n,t),e=new Ql(e,t);let i=!1;e:for(let r of n.set){for(let s of e.set){let o=$w(r,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Ew=[new Ws(">=0.0.0-0")],eu=[new Ws(">=0.0.0")],$w=(n,e,t)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Bs){if(e.length===1&&e[0].semver===Bs)return!0;t.includePrerelease?n=Ew:n=eu}if(e.length===1&&e[0].semver===Bs){if(t.includePrerelease)return!0;e=eu}let i=new Set,r,s;for(let h of n)h.operator===">"||h.operator===">="?r=tu(r,h,t):h.operator==="<"||h.operator==="<="?s=nu(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(r&&s){if(o=Vs(r.semver,s.semver,t),o>0)return null;if(o===0&&(r.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(r&&!Us(h,String(r),t)||s&&!Us(h,String(s),t))return null;for(let y of e)if(!Us(h,String(y),t))return!1;return!0}let a,l,d,f,c=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=r&&!t.includePrerelease&&r.semver.prerelease.length?r.semver:!1;c&&c.prerelease.length===1&&s.operator==="<"&&c.prerelease[0]===0&&(c=!1);for(let h of e){if(f=f||h.operator===">"||h.operator===">=",d=d||h.operator==="<"||h.operator==="<=",r){if(p&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===p.major&&h.semver.minor===p.minor&&h.semver.patch===p.patch&&(p=!1),h.operator===">"||h.operator===">="){if(a=tu(r,h,t),a===h&&a!==r)return!1}else if(r.operator===">="&&!h.test(r.semver))return!1}if(s){if(c&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===c.major&&h.semver.minor===c.minor&&h.semver.patch===c.patch&&(c=!1),h.operator==="<"||h.operator==="<="){if(l=nu(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!h.test(s.semver))return!1}if(!h.operator&&(s||r)&&o!==0)return!1}return!(r&&d&&!s&&o!==0||s&&f&&!r&&o!==0||p||c)},tu=(n,e,t)=>{if(!n)return e;let i=Vs(n.semver,e.semver,t);return i>0?n:i<0||e.operator===">"&&n.operator===">="?e:n},nu=(n,e,t)=>{if(!n)return e;let i=Vs(n.semver,e.semver,t);return i<0?n:i>0||e.operator==="<"&&n.operator==="<="?e:n};iu.exports=vw});var cu=m((UO,au)=>{"use strict";u();var Gs=Nt(),su=Rt(),Ow=G(),ou=Ls(),Pw=He(),Cw=Ac(),jw=Sc(),Iw=Rc(),Lw=Dc(),Aw=Mc(),xw=Bc(),Sw=Wc(),qw=Gc(),Fw=ue(),Rw=Xc(),Nw=Zc(),Tw=_i(),Dw=nl(),kw=rl(),Mw=fn(),Hw=wi(),Bw=Ss(),Uw=qs(),Ww=bi(),Vw=vi(),Gw=Fs(),zw=hl(),Jw=gl(),Kw=hn(),Xw=de(),Yw=gn(),Zw=Al(),Qw=Sl(),eb=Fl(),tb=Tl(),nb=kl(),ib=Oi(),rb=Vl(),sb=zl(),ob=Xl(),ab=Zl(),cb=ru();au.exports={parse:Pw,valid:Cw,clean:jw,inc:Iw,diff:Lw,major:Aw,minor:xw,patch:Sw,prerelease:qw,compare:Fw,rcompare:Rw,compareLoose:Nw,compareBuild:Tw,sort:Dw,rsort:kw,gt:Mw,lt:Hw,eq:Bw,neq:Uw,gte:Ww,lte:Vw,cmp:Gw,coerce:zw,truncate:Jw,Comparator:Kw,Range:Xw,satisfies:Yw,toComparators:Zw,maxSatisfying:Qw,minSatisfying:eb,minVersion:tb,validRange:nb,outside:ib,gtr:rb,ltr:sb,intersects:ob,simplifyRange:ab,subset:cb,SemVer:Ow,re:Gs.re,src:Gs.src,tokens:Gs.t,SEMVER_SPEC_VERSION:su.SEMVER_SPEC_VERSION,RELEASE_TYPES:su.RELEASE_TYPES,compareIdentifiers:ou.compareIdentifiers,rcompareIdentifiers:ou.rcompareIdentifiers}});u();u();var Fi=W(le(),1);u();var yc=W(Ve(),1);var{Ansis:cE,ansi256:lE,fg:uE,bgAnsi256:dE,bg:fE,rgb:hE,bgRgb:pE,hex:gE,bgHex:mE,reset:yE,inverse:_E,hidden:wE,visible:bE,bold:Re,dim:se,italic:vE,underline:EE,strikethrough:$E,strike:OE,black:PE,red:CE,green:jE,yellow:IE,blue:LE,magenta:AE,cyan:un,white:xE,grey:SE,gray:qE,blackBright:FE,redBright:RE,greenBright:NE,yellowBright:TE,blueBright:DE,magentaBright:kE,cyanBright:ME,whiteBright:HE,bgBlack:BE,bgRed:UE,bgGreen:WE,bgYellow:VE,bgBlue:GE,bgMagenta:zE,bgCyan:JE,bgWhite:KE,bgGrey:XE,bgGray:YE,bgBlackBright:ZE,bgRedBright:QE,bgGreenBright:e$,bgYellowBright:t$,bgBlueBright:n$,bgMagentaBright:i$,bgCyanBright:r$,bgWhiteBright:s$}=yc.default;u();var U=W(le(),1);var yu=W(Pn(),1),Be=W(cu(),1);import{spawn as yb}from"node:child_process";import{access as _b,mkdir as wb,readFile as bb,rename as vb,rm as hu,writeFile as Eb}from"node:fs/promises";import{basename as $b,dirname as pu,join as re,parse as gu,resolve as Js}from"node:path";import{fileURLToPath as Ob}from"node:url";u();var Li=W(le(),1),uu=W(Pn(),1);import{readFile as ub}from"node:fs/promises";import{createRequire as db}from"node:module";import{join as fb,sep as hb}from"node:path";u();var mn=W(le(),1),lu=W(Pn(),1);import{spawn as lb}from"node:child_process";var Pi=(0,lu.default)("@oclif/plugin-plugins:spawn");async function Ci(n,e=[],{cwd:t,logLevel:i}){return new Promise((r,s)=>{process.platform==="win32"&&n.endsWith(".js")&&(e.unshift(`"${n}"`),n="node"),Pi("modulePath",n),Pi("args",e);let o=lb(n,e,{cwd:t,env:{...Ys(),HUSKY:"0"},stdio:"pipe",windowsVerbatimArguments:!0,...process.platform==="win32"&&n.toLowerCase().endsWith(".cmd")&&{shell:!0}}),a=["up to date","added"],l=[],d=[],f=[],c=[],p=h=>{let y=f.length===0&&c.length===0,g=a.some(_=>h.startsWith(_));return y&&g&&i==="notice"?!1:i!=="silent"};o.stderr?.setEncoding("utf8"),o.stderr?.on("data",h=>{let y=h.toString().trim();l.push(y),p(y)?(f.push(y),mn.ux.stdout(y)):Pi(y)}),o.stdout?.setEncoding("utf8"),o.stdout?.on("data",h=>{let y=h.toString().trim();d.push(y),p(y)?(c.push(y),mn.ux.stdout(y)):Pi(y)}),o.on("error",s),o.on("exit",h=>{h===0?r({stderr:l,stdout:d}):s(new mn.Errors.CLIError(`${n} ${e.join(" ")} exited with code ${h}`,{suggestions:["Run with DEBUG=@oclif/plugin-plugins* to see debug output."]}))})})}var ji=(0,uu.default)("@oclif/plugin-plugins:npm"),Ii=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let i=await this.findNpm();ji("npm binary path",i),e.push(`--loglevel=${this.logLevel}`,"--no-fund"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&Li.ux.stderr(`${t.cwd}: ${i} ${e.join(" ")}`),ji(`${t.cwd}: ${i} ${e.join(" ")}`);try{let r=await Ci(i,e,t);return ji("npm done"),r}catch(r){throw ji("npm error",r),r}}async install(e,t){let i=t.prod?["--omit","dev"]:[];return this.exec(["install",...e,...i,"--no-audit"],t)}async uninstall(e,t){return this.exec(["uninstall",...e],t)}async update(e,t){return this.exec(["update",...e],t)}async view(e,t){return this.exec(["view",...e],{...t,logLevel:"silent"})}async findNpm(){if(this.bin)return this.bin;try{let e=db(import.meta.url).resolve("npm/package.json"),t=JSON.parse(await ub(e,{encoding:"utf8"})),i=e.slice(0,Math.max(0,e.lastIndexOf(hb)));this.bin=fb(i,t.bin.npm)}catch{let{default:e}=await import("./lib-O5EZ4NVT.js");this.bin=await e("npm")}if(!this.bin)throw new Li.Errors.CLIError("npm not found");return this.bin}};u();function zs(n,e){let t=n===void 0?0:n,i=e===void 0?0:e;if(Array.isArray(t)&&Array.isArray(i)){if(t.length===0&&i.length===0)return 0;let r=zs(t[0],i[0]);return r!==0?r:zs(t.slice(1),i.slice(1))}return t<i?-1:t>i?1:0}function Tt(n,e){return n.sort((t,i)=>zs(e(t),e(i)))}function du(n,e){return n.filter((t,i)=>!n.some((r,s)=>s>i&&e(t,r)))}u();var Si=W(le(),1),fu=W(Pn(),1);import{createRequire as pb}from"node:module";import{fileURLToPath as gb}from"node:url";var mb=pb(import.meta.url),Ai=(0,fu.default)("@oclif/plugin-plugins:yarn"),xi=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let i=await this.findYarn();Ai("yarn binary path",i),t.logLevel==="verbose"&&e.push("--verbose"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&Si.ux.stderr(`${t.cwd}: ${i} ${e.join(" ")}`),Ai(`${t.cwd}: ${i} ${e.join(" ")}`);try{let r=await Ci(i,e,t);return Ai("yarn done"),r}catch(r){throw Ai("yarn error",r),r}}async install(e,t){return this.exec(["install",...e],t)}async findYarn(){if(this.bin)return this.bin;try{this.bin=mb.resolve("yarn/bin/yarn.js",{paths:[this.config.root,gb(import.meta.url)]})}catch{let{default:e}=await import("./lib-O5EZ4NVT.js");this.bin=await e("yarn")}if(!this.bin)throw new Si.Errors.CLIError("yarn not found");return this.bin}};var qi={dependencies:{},oclif:{plugins:[],schema:1},private:!0};async function Dt(n){try{return await _b(n),!0}catch{return!1}}function _u(n){return du(n,(e,t)=>e.name===t.name||e.type==="link"&&t.type==="link"&&e.root===t.root)}function Pb(n,e){if(n)return typeof n=="string"?n:n.url;if(e)return typeof e=="string"?e:e.url.replace("git+","").replace(".git","")}function mu(n,e){[...e.stdout,...e.stderr].some(i=>i.includes("npm WARN"))&&(U.ux.stderr(Re.yellow(`
|
|
87
|
+
These warnings can only be addressed by the owner(s) of ${n.name}.`)),(n.pjson.bugs||n.pjson.repository)&&U.ux.stderr(`We suggest that you create an issue at ${Pb(n.pjson.bugs,n.pjson.repository)} and ask the plugin owners to address them.
|
|
88
|
+
`))}function Cb(n,e,t){if(!(0,Be.valid)(t.tag))return`${t.name}@${t.tag}`;if(t.tag&&(0,Be.valid)(t.tag)&&n[t.name]&&(0,Be.valid)(n[t.name])&&(0,Be.gt)(t.tag,n[t.name]))return`${t.name}@${t.tag}`;let i=n[t.name]??t.tag;return e.push({...t,tag:i}),`${t.name}@${i}`}var D=class{config;npm;debug;logLevel;constructor(e){this.config=e.config,this.debug=(0,yu.default)("@oclif/plugin-plugins"),this.logLevel=e.logLevel??"notice",this.npm=new Ii({config:this.config,logLevel:this.logLevel})}get pjsonPath(){return re(this.config.dataDir,"package.json")}async add(...e){let t=await this.pjson(),i=[...t.oclif.plugins||[],...e];await this.savePJSON({...t,oclif:{...t.oclif,plugins:_u(i)}})}friendlyName(e){let{pluginPrefix:t,scope:i}=this.config.pjson.oclif;return i?e.match(`@${i}/${t??"plugin"}-(.+)`)?.[1]??e:e}async hasPlugin(e){let t=await this.list(),i=this.friendlyName(e),r=this.unfriendlyName(e)??e;return t.find(s=>this.friendlyName(s.name)===i)??t.find(s=>this.unfriendlyName(s.name)===r)??t.find(s=>s.type==="link"&&Js(s.root)===Js(e))??!1}async install(e,{force:t=!1,tag:i="latest"}={}){await this.maybeCleanUp();try{this.debug(`installing plugin ${e}`);let r={cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0};await this.ensurePJSON();let s,o=t?["--force"]:[];if(e.includes(":")){let a=e,l=await this.npm.install([...o,a],r),{dependencies:d}=await this.pjson(),{default:f}=await import("./npa-LVYMN7GE.js"),c=f(a),h=Object.entries(d??{}).find(([,w])=>{let P=f(w);return P.type!==c.type?!1:P.type==="file"&&P.raw?gu(a).base===gu(P.raw).base:P.hosted?.type===c.hosted?.type&&P.hosted?.user===c.hosted?.user&&P.hosted?.project===c.hosted?.project})?.[0];if(!h)throw new U.Errors.CLIError(`Could not find plugin name for ${a}`);let y=re(this.config.dataDir,"node_modules",h);s=await U.Config.load({devPlugins:!1,name:h,root:y,userPlugins:!1}),mu(s,l),this.isValidPlugin(s),await this.add({name:h,type:"user",url:a});let g=new Set(["npm-shrinkwrap.json","oclif.lock","oclif.manifest.json"]),_=(s.pjson.files??[]).map(w=>re(y,w)).filter(w=>!g.has($b(w)));this.debug(`checking for existence of files: ${_.join(", ")}`);let E=Object.fromEntries(await Promise.all(_?.map(async w=>[w,await Dt(w)])??[]));this.debug(E),Object.values(E).every(Boolean)||U.ux.warn("This plugin may not work as expected because the prepare script did not produce all the expected files.")}else{let a=(0,Be.validRange)(i),l=this.unfriendlyName(e);l&&await this.npmHasPackage(l)&&(e=l),await this.npmHasPackage(e,!0);let d=await this.npm.install([...o,`${e}@${i}`],r);this.debug(`loading plugin ${e}...`),s=await U.Config.load({devPlugins:!1,name:e,root:re(this.config.dataDir,"node_modules",e),userPlugins:!1}),this.debug(`finished loading plugin ${e} at root ${s.root}`),mu(s,d),this.isValidPlugin(s),await this.add({name:e,tag:a??i,type:"user"})}return await hu(re(this.config.dataDir,"yarn.lock"),{force:!0}),s}catch(r){throw this.debug("error installing plugin:",r),await this.uninstall(e).catch(s=>this.debug(s)),String(r).includes("EACCES")?new U.Errors.CLIError(r,{suggestions:[`Plugin failed to install because of a permissions error.
|
|
89
|
+
Does your current user own the directory ${this.config.dataDir}?`]}):r}}async link(e,{install:t}){let i=await U.Config.load(Js(e));if(this.isValidPlugin(i),t)if(await Dt(re(i.root,"yarn.lock"))){this.debug("installing dependencies with yarn");let r=new xi({config:this.config,logLevel:this.logLevel});U.ux.warn(`The ${U.ux.colorize("dim","plugins link")} command will no longer auto install dependencies in future versions. Please run ${U.ux.colorize("dim","yarn")} manually in the plugin directory before linking.`),await r.install([],{cwd:i.root,logLevel:this.logLevel})}else await Dt(re(i.root,"package-lock.json"))?(this.debug("installing dependencies with npm"),await this.npm.install([],{cwd:i.root,logLevel:this.logLevel,prod:!1})):await Dt(re(i.root,"pnpm-lock.yaml"))?U.ux.warn(`pnpm is not supported for installing after a link. The link succeeded, but you may need to run 'pnpm install' in ${i.root}.`):U.ux.warn(`No lockfile found in ${i.root}. The link succeeded, but you may need to install the dependencies in your project.`);return await this.add({name:i.name,root:i.root,type:"link"}),i}async list(){return(await this.pjson()).oclif.plugins}async maybeUnfriendlyName(e){await this.ensurePJSON();let t=this.unfriendlyName(e);return this.debug(`checking registry for expanded package name ${t}`),t&&await this.npmHasPackage(t)?t:(this.debug(`expanded package name ${t} not found, using given package name ${e}`),e)}async pjson(){let e=await this.readPJSON(),t=e?jb(e.oclif.plugins):[];return{...qi,...e,oclif:{...qi.oclif,...e?.oclif,plugins:t}}}async remove(e){let t=await this.pjson();t.dependencies&&delete t.dependencies[e],await this.savePJSON({...t,oclif:{...t.oclif,plugins:t.oclif.plugins.filter(i=>i.name!==e)}})}unfriendlyName(e){if(e.includes("@"))return;let{pluginPrefix:t,scope:i}=this.config.pjson.oclif;if(i)return`@${i}/${t??"plugin"}-${e}`}async uninstall(e){try{((await this.pjson()).oclif.plugins??[]).some(i=>typeof i=="object"&&i.type==="user"&&i.name===e)&&await this.npm.uninstall([e],{cwd:this.config.dataDir,logLevel:this.logLevel})}catch(t){U.ux.warn(t)}finally{await this.remove(e)}}async update(){let e=(await this.list()).filter(a=>a.type==="user");if(e.length===0)return;await this.maybeCleanUp();let t=this.config.pjson.oclif.aliases||{};for(let[a,l]of Object.entries(t))e.find(f=>f.name===a)&&(l&&await this.install(l),await this.uninstall(a),e=e.filter(f=>f.name!==a));let i=e.filter(a=>!!a.url);i.length>0&&await this.npm.update(i.map(a=>a.name),{cwd:this.config.dataDir,logLevel:this.logLevel});let r=e.filter(a=>!a.url),s=this.config.pjson.oclif.jitPlugins??{},o=[];r.length>0&&await this.npm.install(r.map(a=>Cb(s,o,a)),{cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0}),await this.add(...o)}async ensurePJSON(){await Dt(this.pjsonPath)||(this.debug(`creating ${this.pjsonPath} with pjson: ${JSON.stringify(qi,null,2)}`),await this.savePJSON(qi))}isValidPlugin(e){if(e.valid||this.config.plugins.get("@oclif/plugin-legacy")||e._base.includes("@oclif/plugin-legacy"))return!0;throw new U.Errors.CLIError("plugin is invalid",{suggestions:[`Plugin failed to install because it does not appear to be a valid CLI plugin.
|
|
90
|
+
If you are sure it is, contact the CLI developer noting this error.`]})}async maybeCleanUp(){if(await Dt(re(this.config.dataDir,"yarn.lock")))try{this.debug("Found yarn.lock! Removing yarn.lock and node_modules..."),await Promise.all([vb(re(this.config.dataDir,"node_modules"),re(this.config.dataDir,"node_modules.old")),hu(re(this.config.dataDir,"yarn.lock"),{force:!0})]);let e=re(pu(Ob(import.meta.url)),"rm.js");this.debug(`spawning ${e} to remove node_modules.old`),yb(process.argv[0],[e,re(this.config.dataDir,"node_modules.old")],{detached:!0,stdio:"ignore",...this.config.windows?{shell:!0}:{}}).unref()}catch(e){this.debug("Error cleaning up yarn.lock and node_modules:",e)}}async npmHasPackage(e,t=!1){try{return await this.npm.view([e],{cwd:this.config.dataDir,logLevel:this.logLevel}),this.debug(`Found ${e} in the registry.`),!0}catch(i){if(this.debug(i),t)throw new U.Errors.CLIError(`${e} does not exist in the registry.`);return!1}}async readPJSON(){try{return JSON.parse(await bb(this.pjsonPath,"utf8"))}catch(e){this.debug(e);let t=e;t.code!=="ENOENT"&&process.emitWarning(t)}}async savePJSON(e){await wb(pu(this.pjsonPath),{recursive:!0}),await Eb(this.pjsonPath,JSON.stringify({name:this.config.name,...e},null,2))}},jb=n=>{let e=(n??[]).map(t=>typeof t=="string"?{name:t,tag:"latest",type:"user"}:t);return _u(e)};var yn=class n extends Fi.Command{static description="List installed plugins.";static enableJsonFlag=!0;static examples=["<%= config.bin %> <%= command.id %>"];static flags={core:Fi.Flags.boolean({description:"Show core plugins."})};plugins;async run(){let{flags:e}=await this.parse(n);this.plugins=new D({config:this.config});let t=this.config.getPluginsList();Tt(t,a=>this.plugins.friendlyName(a.name)),e.core||(t=t.filter(a=>a.type!=="core"&&a.type!=="dev")),t.length===0&&this.log("No plugins installed.");let i=this.config.getPluginsList(),r=new Set(i.filter(a=>a.type==="user"||a.type==="link").map(a=>a.name)),s=this.config.pjson.oclif.jitPlugins??{},o=Object.entries(s).map(([a,l])=>({name:a,type:"jit",version:l})).filter(a=>!r.has(a.name));return Tt(o,a=>a.name),this.jsonEnabled()||(this.display(t),this.displayJitPlugins(o)),[...i.filter(a=>!a.parent).map(a=>{let{config:l,...d}=a;return d}),...o]}createTree(e){let t={};for(let i of e.children??[])t[this.formatPlugin(i)]=this.createTree(i);return t}display(e){let t=e.find(i=>i.root===this.config.root);for(let i of e.filter(r=>!r.parent))if(i.name!==t?.name&&(this.log(this.formatPlugin(i)),i.children&&i.children.length>0)){let r=this.createTree(i);this.log(Cn(r))}}displayJitPlugins(e){if(e.length!==0){this.log(se(`
|
|
91
|
+
Uninstalled JIT Plugins:`));for(let{name:t,version:i}of e)this.log(`${this.plugins.friendlyName(t)} ${se(i)}`)}}formatPlugin(e){let t=`${this.plugins.friendlyName(e.name)} ${se(e.version)}`;return e.type!=="user"&&(t+=se(` (${e.type})`)),e.type==="link"?t+=` ${e.root}`:e.tag&&e.tag!=="latest"&&(t+=se(` (${String(e.tag)})`)),t}};u();var lt=W(le(),1);import{readFile as wu}from"node:fs/promises";import{dirname as Lb,join as Ri,sep as bu}from"node:path";u();var Ib=["silent","error","warn","notice","http","info","verbose","silly"];function Pe(n,e,t){if(e.verbose)return"verbose";if(e.silent)return"silent";let i=n.scopedEnvVar("NPM_LOG_LEVEL");return Ib.includes(i)?i:t}function Ab(n,e){let t=n.split(bu),i=t.reduce((s,o,a)=>o===e?[...s,a]:s,[]),r=Math.max(...i);return r===-1?n:t.slice(0,r+1).join(bu)}var _n=class n extends lt.Command{static args={plugin:lt.Args.string({default:".",description:"Plugin to inspect.",required:!0})};static description="Displays installation properties of a plugin.";static enableJsonFlag=!0;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:lt.Flags.help({char:"h"}),verbose:lt.Flags.boolean({char:"v"})};static strict=!1;static usage="plugins:inspect PLUGIN...";plugins;async findDep(e,t){let i=Ri(...t.split("/")),r=Ri(e.root,"node_modules"),s=[r];for(;(r.match(/node_modules/g)??[]).length>1;)r=Ab(Lb(r),"node_modules"),s.push(r);for(let o of s)try{let a=Ri(o,i),l=Ri(a,"package.json"),d=JSON.parse(await wu(l,"utf8"));return{pkgPath:a,version:d.version}}catch{}return{pkgPath:null,version:null}}findPlugin(e){let t=this.config.getPluginsList().find(i=>i.name===e);if(t)return t;throw this.config.pjson.oclif.jitPlugins?.[e]&&this.warn(`Plugin ${e} is a JIT plugin. It will be installed the first time you run one of it's commands.`),new Error(`${e} not installed`)}async inspect(e,t=!1){let i=this.findPlugin(e),r={},s={};for(let a of Tt(Object.keys({...i.pjson.dependencies}),l=>l)){let{pkgPath:l,version:d}=await this.findDep(i,a);if(!d)continue;let f=i.pjson.dependencies?.[a],c=se(f?`${f} => ${d}`:d),p=t?`${a} ${c} ${l}`:`${a} ${c}`;r[p]=null,s[a]={from:f,version:d}}let o={[Re.cyan(i.name)]:{[`version ${i.version}`]:null,...i.tag?{[`tag ${i.tag}`]:null}:{},...i.pjson.homepage?{[`homepage ${i.pjson.homepage}`]:null}:{},[`location ${i.root}`]:null,commands:Object.fromEntries(Tt(i.commandIDs,a=>a).map(a=>[a,null])),dependencies:r}};return this.log(Cn(o)),{...i,deps:s}}async run(){let{argv:e,flags:t}=await this.parse(n);this.plugins=new D({config:this.config,logLevel:Pe(this.config,t,"silent")});let i=this.config.pjson.oclif.aliases??{},r=[];for(let s of e){s==="."&&(s=JSON.parse(await wu("package.json","utf8")).name),i[s]===null&&this.error(`${s} is blocked`),s=i[s]??s;let o=await this.plugins.maybeUnfriendlyName(s)??s;try{r.push(await this.inspect(o,t.verbose))}catch(a){throw this.log(Re.red("failed")),a}}return r}};u();var k=W(le(),1);var vu=W(ku(),1);var wn=class n extends k.Command{static aliases=["plugins:add"];static args={plugin:k.Args.string({description:"Plugin to install.",required:!0})};static description=`Uses npm to install plugins.
|
|
92
92
|
|
|
93
93
|
Installation of a user-installed plugin will override a core plugin.
|
|
94
94
|
|
|
95
95
|
Use the <%= config.scopedEnvVarKey('NPM_LOG_LEVEL') %> environment variable to set the npm loglevel.
|
|
96
|
-
Use the <%= config.scopedEnvVarKey('NPM_REGISTRY') %> environment variable to set the npm registry.`;static enableJsonFlag=!0;static examples=[{command:'<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> ',description:"Install a plugin from npm registry."},{command:"<%= config.bin %> <%= command.id %> https://github.com/someuser/someplugin",description:"Install a plugin from a github url."},{command:"<%= config.bin %> <%= command.id %> someuser/someplugin",description:"Install a plugin from a github slug."}];static flags={force:k.Flags.boolean({char:"f",description:"Force npm to fetch remote resources even if a local copy exists on disk."}),help:k.Flags.help({char:"h"}),jit:k.Flags.boolean({hidden:!0,async parse(e,t){if(e===!1||e===void 0)return e;let i=t.argv.filter(l=>!l.startsWith("-"));if(i.length===0)return e;let r=t.config.pjson.oclif.jitPlugins??{};if(Object.keys(r).length===0)return e;let s=new D({config:t.config}),a=(await Promise.all(i.map(async l=>{let d=await s.maybeUnfriendlyName(l);return{jit:!!r[d],name:d}}))).filter(l=>!l.jit).map(l=>l.name);if(a.length>0)throw new k.Errors.CLIError(`The following plugins are not JIT plugins: ${a.join(", ")}`);return e}}),silent:k.Flags.boolean({char:"s",description:"Silences npm output.",exclusive:["verbose"]}),verbose:k.Flags.boolean({char:"v",description:"Show verbose npm output.",exclusive:["silent"]})};static strict=!1;static summary="Installs a plugin into <%= config.bin %>.";flags;async parsePlugin(e,t){if(t.startsWith("git+ssh://")||t.endsWith(".git"))return{type:"repo",url:t};let i=async o=>{let a=/(?<!^)@/,[l,d="latest"]=o.split(a),f=l.startsWith("@")?l:await e.maybeUnfriendlyName(l);if(
|
|
96
|
+
Use the <%= config.scopedEnvVarKey('NPM_REGISTRY') %> environment variable to set the npm registry.`;static enableJsonFlag=!0;static examples=[{command:'<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> ',description:"Install a plugin from npm registry."},{command:"<%= config.bin %> <%= command.id %> https://github.com/someuser/someplugin",description:"Install a plugin from a github url."},{command:"<%= config.bin %> <%= command.id %> someuser/someplugin",description:"Install a plugin from a github slug."}];static flags={force:k.Flags.boolean({char:"f",description:"Force npm to fetch remote resources even if a local copy exists on disk."}),help:k.Flags.help({char:"h"}),jit:k.Flags.boolean({hidden:!0,async parse(e,t){if(e===!1||e===void 0)return e;let i=t.argv.filter(l=>!l.startsWith("-"));if(i.length===0)return e;let r=t.config.pjson.oclif.jitPlugins??{};if(Object.keys(r).length===0)return e;let s=new D({config:t.config}),a=(await Promise.all(i.map(async l=>{let d=await s.maybeUnfriendlyName(l);return{jit:!!r[d],name:d}}))).filter(l=>!l.jit).map(l=>l.name);if(a.length>0)throw new k.Errors.CLIError(`The following plugins are not JIT plugins: ${a.join(", ")}`);return e}}),silent:k.Flags.boolean({char:"s",description:"Silences npm output.",exclusive:["verbose"]}),verbose:k.Flags.boolean({char:"v",description:"Show verbose npm output.",exclusive:["silent"]})};static strict=!1;static summary="Installs a plugin into <%= config.bin %>.";flags;async parsePlugin(e,t){if(t.startsWith("git+ssh://")||t.endsWith(".git"))return{type:"repo",url:t};let i=async o=>{let a=/(?<!^)@/,[l,d="latest"]=o.split(a),f=l.startsWith("@")?l:await e.maybeUnfriendlyName(l);if(xb(f),this.flags.jit){let c=this.config.pjson.oclif?.jitPlugins?.[f];return c?(a.test(o)&&this.warn(`--jit flag is present along side a tag. Ignoring tag ${d} and using the version specified in package.json (${c}).`),{name:f,tag:c}):(this.warn(`--jit flag is present but ${f} is not a JIT plugin. Installing ${d} instead.`),{name:f,tag:d})}return{name:f,tag:d}};if(t.startsWith("@")&&t.includes("/")){let{name:o,tag:a}=await i(t);return{name:o,tag:a,type:"npm"}}if(t.includes("/"))return t.includes(":")?{type:"repo",url:t}:{type:"repo",url:`https://github.com/${t}`};let{name:r,tag:s}=await i(t);return{name:r,tag:s,type:"npm"}}async run(){let{argv:e,flags:t}=await this.parse(n);this.flags=t;let i=new D({config:this.config,logLevel:Pe(this.config,this.flags,"notice")}),r=this.config.pjson.oclif.aliases||{},s=e.length;for(let o of e){if(r[o]===null&&this.error(`${o} is blocked`),o=r[o]||o,o===this.config.name){let f=this.config.binPath&&this.config.plugins.get("@oclif/plugin-update")?` Use "${this.config.bin} update" to update ${this.config.name}.`:"",c=`Ignoring top-level CLI plugin ${this.config.name}.${f}`;s===1?this.error(c):this.warn(c);continue}let a=await this.parsePlugin(i,o),l;await this.config.runHook("plugins:preinstall",{plugin:a});try{a.type==="npm"?(k.ux.action.start(`${this.config.name}: Installing plugin ${un(i.friendlyName(a.name)+"@"+a.tag)}`),l=await i.install(a.name,{force:t.force,tag:a.tag})):(k.ux.action.start(`${this.config.name}: Installing plugin ${un(a.url)}`),l=await i.install(a.url,{force:t.force}))}catch(f){throw k.ux.action.stop(Re.red("failed")),f}let d=new k.Plugin(l);await d.load(),this.config.plugins.set(d.name,d),await this.config.runHook("plugins:postinstall",{}),k.ux.action.stop(`installed v${l.version}`)}}};function xb(n){if(!(0,vu.default)(n).validForNewPackages)throw new k.Errors.CLIError("Invalid npm package name.")}u();var ye=W(le(),1);var bn=class n extends ye.Command{static args={path:ye.Args.string({default:".",description:"path to plugin",name:"path",required:!0})};static description=`Installation of a linked plugin will override a user-installed or core plugin.
|
|
97
97
|
|
|
98
98
|
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
99
|
-
`;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:ye.Flags.help({char:"h"}),install:ye.Flags.boolean({allowNo:!0,default:!0,description:"Install dependencies after linking the plugin."}),verbose:ye.Flags.boolean({char:"v"})};static summary="Links a plugin into the CLI for development.";async run(){let{args:e,flags:t}=await this.parse(n),i=new D({config:this.config,logLevel:Pe(this.config,t,"silent")});ye.ux.action.start(`${this.config.name}: Linking plugin ${
|
|
99
|
+
`;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:ye.Flags.help({char:"h"}),install:ye.Flags.boolean({allowNo:!0,default:!0,description:"Install dependencies after linking the plugin."}),verbose:ye.Flags.boolean({char:"v"})};static summary="Links a plugin into the CLI for development.";async run(){let{args:e,flags:t}=await this.parse(n),i=new D({config:this.config,logLevel:Pe(this.config,t,"silent")});ye.ux.action.start(`${this.config.name}: Linking plugin ${un(e.path)}`),await i.link(e.path,{install:t.install}),ye.ux.action.stop()}};u();var vn=W(le(),1);import{rm as Sb}from"node:fs/promises";import{join as Ni}from"node:path";var En=class n extends vn.Command{static flags={hard:vn.Flags.boolean({summary:"Delete node_modules and package manager related files in addition to uninstalling plugins."}),reinstall:vn.Flags.boolean({summary:"Reinstall all plugins after uninstalling."})};static summary="Remove all user-installed and linked plugins.";async run(){let{flags:e}=await this.parse(n),t=new D({config:this.config}),i=await t.list();this.log(`Found ${i.length} plugin${i.length===0?"":"s"}:`);for(let r of i)this.log(`- ${r.name} ${se(this.config.plugins.get(r.name)?.version??"")} ${se(`(${r.type})`)}`);if(e.hard){let r=[Ni(this.config.dataDir,"node_modules"),Ni(this.config.dataDir,"package.json"),Ni(this.config.dataDir,"yarn.lock"),Ni(this.config.dataDir,"package-lock.json")];this.log("\u2705 Removed the following files:");for(let s of r)this.log(`- ${s}`);await Promise.all(r.map(s=>Sb(s,{force:!0,recursive:!0})));for(let s of i)this.log(`\u2705 ${s.type==="link"?"Unlinked":"Uninstalled"} ${s.name}`)}else for(let r of i)try{await t.uninstall(r.name),this.log(`\u2705 ${r.type==="link"?"Unlinked":"Uninstalled"} ${r.name}`)}catch{this.warn(`Failed to uninstall ${r.name}`)}if(e.reinstall){this.log("Reinstall flag passed:");for(let r of i){if(r.type==="link")try{let s=await t.link(r.root,{install:!1}),o=se(`-> ${s.version}`);this.log(`\u2705 Relinked ${r.name} ${o}`)}catch{this.warn(`Failed to relink ${r.name}`)}if(r.type==="user")try{let s=r.url?await t.install(r.url):await t.install(r.name,{tag:r.tag}),o=se(`-> ${s.version}`),a=r.tag?`@${r.tag}`:r.url?` (${r.url})`:"";this.log(`\u2705 Reinstalled ${r.name}${a} ${o}`)}catch{this.warn(`Failed to reinstall ${r.name}`)}}}}};u();var _e=W(le(),1);function Eu(n){if(n.includes("@")){let e=n.split("@");return!e.at(-1)?.includes("/")&&e.length>1&&e.pop(),e.join("@")}return n}var $n=class n extends _e.Command{static aliases=["plugins:unlink","plugins:remove"];static args={plugin:_e.Args.string({description:"plugin to uninstall"})};static description="Removes a plugin from the CLI.";static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %>'];static flags={help:_e.Flags.help({char:"h"}),verbose:_e.Flags.boolean({char:"v"})};static strict=!1;async run(){let{argv:e,flags:t}=await this.parse(n),i=new D({config:this.config,logLevel:Pe(this.config,t,"silent")}),r=[];e.length===0&&e.push(".");for(let s of e){let o=Eu(i.friendlyName(s)),a=await i.hasPlugin(Eu(s));if(!a){let l=this.config.getPluginsList().find(d=>d.name===s);return l?.parent?this.error(`${o} is installed via plugin ${l.parent.name}, uninstall ${l.parent.name} instead`):this.error(`${o} is not installed`)}try{let{name:l}=a,d=o==="."?l:o??l;_e.ux.action.start(`${this.config.name}: Uninstalling ${d}`),await i.uninstall(l),r.push(l)}catch(l){throw _e.ux.action.stop(Re.red("failed")),l}_e.ux.action.stop()}for(let s of r)this.config.plugins.delete(s);await this.config.runHook("plugins:postuninstall",{})}};u();var Ue=W(le(),1);var On=class n extends Ue.Command{static description="Update installed plugins.";static flags={help:Ue.Flags.help({char:"h"}),verbose:Ue.Flags.boolean({char:"v"})};async run(){let{flags:e}=await this.parse(n),t=new D({config:this.config,logLevel:Pe(this.config,e,"silent")});Ue.ux.action.start(`${this.config.name}: Updating plugins`),await t.update(),Ue.ux.action.stop()}};u();var $u=async function(){let n=new D({config:this.config});try{await n.update()}catch(e){e instanceof Error&&this.error(e.message)}};var yC={plugins:yn,"plugins:inspect":_n,"plugins:install":wn,"plugins:link":bn,"plugins:reset":En,"plugins:uninstall":$n,"plugins:update":On},_C={update:$u};export{yC as a,_C as b};
|