@shopify/cli 4.5.1 → 4.6.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-6S5JVSRO.js +1 -0
- package/dist/analytics-E252SR3P.js +1 -0
- package/dist/assets/hydrogen/starter/package.json +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-VDIVGBZH.js → chokidar-5RWEYTNQ.js} +1 -1
- package/dist/{chunk-XU6CCL4P.js → chunk-2I62GKIH.js} +80 -80
- package/dist/{chunk-PGN5EZTI.js → chunk-2JFZ6GZC.js} +2 -2
- package/dist/{chunk-UQWFDL3F.js → chunk-2KD4LHRT.js} +1 -1
- package/dist/chunk-2MCH43SL.js +11 -0
- package/dist/{chunk-BEXQB4RT.js → chunk-2SNT7U7B.js} +1 -1
- package/dist/{chunk-U2LQBJJL.js → chunk-2VIUGNYO.js} +1 -1
- package/dist/chunk-2Y6CYLKF.js +1 -0
- package/dist/{chunk-KHXDP3SF.js → chunk-3EHRA4LA.js} +1 -1
- package/dist/{chunk-GQG6WELZ.js → chunk-3EPQ6UOK.js} +6 -6
- package/dist/{chunk-ZHPXJRHR.js → chunk-3NO6PWNL.js} +1 -1
- package/dist/chunk-3TFUSDHY.js +370 -0
- package/dist/{chunk-SFMXFH33.js → chunk-46NA23I7.js} +1 -1
- package/dist/{chunk-C5U4NLNU.js → chunk-47URTBZF.js} +1 -1
- package/dist/chunk-4FEBSLSU.js +1 -0
- package/dist/{chunk-DCUAVLTM.js → chunk-4HB4VZJQ.js} +1 -1
- package/dist/{chunk-DU5LZYQX.js → chunk-4JARSKED.js} +1 -1
- package/dist/{chunk-IHUCBI6L.js → chunk-4KZRP2JP.js} +141 -141
- package/dist/{chunk-2GDACKZF.js → chunk-4P7PWLUN.js} +1 -1
- package/dist/{chunk-MYQQOOGA.js → chunk-4YCMEC5R.js} +1 -1
- package/dist/{chunk-Q2X7IXPQ.js → chunk-53ZA2HD3.js} +1 -1
- package/dist/{chunk-DE3WCNP6.js → chunk-57YF2UNT.js} +1 -1
- package/dist/{chunk-MOCD7GFI.js → chunk-5EFQILLF.js} +1 -1
- package/dist/chunk-5JPV3HPJ.js +1 -0
- package/dist/{chunk-OCYPWE2O.js → chunk-5LJ5H4TD.js} +1 -1
- package/dist/{chunk-JVMYTC3J.js → chunk-5Y2VD4I3.js} +1 -1
- package/dist/{chunk-YBFCDINU.js → chunk-6BX62FFE.js} +1 -1
- package/dist/{chunk-6ZMNEURG.js → chunk-6FJBCRVK.js} +1 -1
- package/dist/{chunk-2WDKXDFM.js → chunk-6Q5VRSRN.js} +1 -1
- package/dist/{chunk-GDHD3TGC.js → chunk-6QDOCBD4.js} +1 -1
- package/dist/{chunk-BVFIJSD7.js → chunk-6SXB44CE.js} +1 -1
- package/dist/chunk-6UTUJKKC.js +16 -0
- package/dist/{chunk-E24W34C4.js → chunk-6YCGMS7X.js} +15 -15
- package/dist/chunk-72GN655L.js +1 -0
- package/dist/chunk-7CPECP5P.js +1 -0
- package/dist/{chunk-XH5FCMS5.js → chunk-7HAFBCL3.js} +1 -1
- package/dist/chunk-7XPFLQEM.js +1 -0
- package/dist/{chunk-DDVT2K7E.js → chunk-A3JE5LX3.js} +1 -1
- package/dist/{chunk-ASOT7VNB.js → chunk-AJ6VOBXU.js} +1 -1
- package/dist/{chunk-XWQ72WTQ.js → chunk-B2WK53GH.js} +1 -1
- package/dist/chunk-B34VYVGV.js +1 -0
- package/dist/chunk-B6SY4BIK.js +2 -0
- package/dist/{chunk-H7DDRARV.js → chunk-BBEHNPKK.js} +1 -1
- package/dist/{chunk-GKQ6CSJZ.js → chunk-BCTMBKAU.js} +1 -1
- package/dist/chunk-BGUHH7AW.js +10 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-C256W7D2.js +26 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/{chunk-MQXSMZQZ.js → chunk-CXWLHQKA.js} +1 -1
- package/dist/chunk-DHU767C3.js +1 -0
- package/dist/{chunk-NGPJXONG.js → chunk-DKHMLETG.js} +1 -1
- package/dist/{chunk-QPJQ67GU.js → chunk-DODCPRXT.js} +144 -144
- package/dist/{chunk-QDYDB7DY.js → chunk-E3RDAVJT.js} +3 -3
- package/dist/chunk-E3RQCWSC.js +6 -0
- package/dist/{chunk-EDSKA6UB.js → chunk-EBZ6MDEM.js} +1 -1
- package/dist/chunk-ELJ7SKMH.js +1 -0
- package/dist/{chunk-FOPGI6GO.js → chunk-EQTULRM7.js} +1 -1
- package/dist/{chunk-SRAHMYWJ.js → chunk-ERCJPRN3.js} +1 -1
- package/dist/{chunk-M2AS5BWX.js → chunk-ESZS7L6O.js} +1 -1
- package/dist/{chunk-IBBFRL3Y.js → chunk-ET2O5DAS.js} +1 -1
- package/dist/chunk-EZ7EBYDT.js +684 -0
- package/dist/{chunk-AVMNXIXF.js → chunk-EZNJDFFK.js} +1 -1
- package/dist/chunk-F34LB7M4.js +20 -0
- package/dist/{chunk-QVYZZNAS.js → chunk-FE24P4UQ.js} +1 -1
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/{chunk-ALQKJAHP.js → chunk-FMTPUYSH.js} +1 -1
- package/dist/{chunk-IQYZAALJ.js → chunk-FPWLEGKZ.js} +1 -1
- package/dist/{chunk-APYASWBA.js → chunk-FT4HLDK7.js} +1 -1
- package/dist/{chunk-E7OLCSAL.js → chunk-G3YYMKWG.js} +1 -1
- package/dist/chunk-G7QW5OSQ.js +6 -0
- package/dist/{chunk-JO4ZHVOD.js → chunk-GCDEDRY7.js} +1 -1
- package/dist/{chunk-GAYQKMOM.js → chunk-GEE5MXHT.js} +1 -1
- package/dist/{chunk-IIHPONSQ.js → chunk-H4MYBJ6C.js} +1 -1
- package/dist/chunk-HDXBZLHH.js +8 -0
- package/dist/chunk-HSKB5OTM.js +1 -0
- package/dist/{chunk-5T3OVTF5.js → chunk-HT6MOPLW.js} +1 -1
- package/dist/chunk-HZXY7RWJ.js +19 -0
- package/dist/{chunk-WIXW233Y.js → chunk-IDAWPBJM.js} +1 -1
- package/dist/{chunk-UHJ65YFN.js → chunk-IDLDQ2JB.js} +1 -1
- package/dist/{chunk-KOB6T6NK.js → chunk-IKYZ5L3F.js} +1 -1
- package/dist/{chunk-O2PI2PYG.js → chunk-ILQXBASM.js} +1 -1
- package/dist/{chunk-O7MONSF7.js → chunk-IYU72M55.js} +1 -1
- package/dist/{chunk-JCNRQYRP.js → chunk-J3IHP46B.js} +2 -2
- package/dist/{chunk-UB5BVO76.js → chunk-J4KJQHNS.js} +1 -1
- package/dist/{chunk-3GMW7IEC.js → chunk-JHRZCUBE.js} +1 -1
- package/dist/chunk-JIBLEZ57.js +18 -0
- package/dist/{chunk-TXJEP4FB.js → chunk-JIKIYMCT.js} +1 -1
- package/dist/{chunk-MKCXLBQ4.js → chunk-JJTGHARS.js} +1 -1
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/{chunk-U7ZRDNZU.js → chunk-JQP3ZCAG.js} +1 -1
- package/dist/{chunk-5UXPTCSD.js → chunk-JS3X6BDT.js} +1 -1
- package/dist/{chunk-YZY4M6IH.js → chunk-K7IZMKBR.js} +1 -1
- package/dist/{chunk-5JCREGSD.js → chunk-KGZH4RFA.js} +1 -1
- package/dist/{chunk-JNEGEJH6.js → chunk-KO4FB4QU.js} +1 -1
- package/dist/chunk-KPRKIZ5M.js +3 -0
- package/dist/chunk-KUN74JD4.js +4 -0
- package/dist/chunk-KURWC4A5.js +16 -0
- package/dist/{chunk-XDEAZP2I.js → chunk-L3D2CASO.js} +1 -1
- package/dist/{chunk-P6S5YLOP.js → chunk-L7DZTIHJ.js} +1 -1
- package/dist/{chunk-QPY6WJTT.js → chunk-LBDAYBIF.js} +1 -1
- package/dist/{chunk-ZG7BVVT2.js → chunk-LD6ZCTZ3.js} +1 -1
- package/dist/{chunk-TDCY3BRI.js → chunk-LH3RIIOB.js} +1 -1
- package/dist/{chunk-BZAZMLII.js → chunk-LWRDNTAD.js} +1 -1
- package/dist/{chunk-MMKBIMMC.js → chunk-LWWBU7ET.js} +1 -1
- package/dist/chunk-M4BEPPA3.js +1 -0
- package/dist/chunk-M4YPMHIM.js +1 -0
- package/dist/{chunk-VSZS3FAJ.js → chunk-M5KKLAM6.js} +1 -1
- package/dist/{chunk-Q2UHGP2Z.js → chunk-MBLHXPGK.js} +1 -1
- package/dist/{chunk-3YCTWCHH.js → chunk-MDHJJVXA.js} +1 -1
- package/dist/{chunk-5U6MXSNY.js → chunk-MDXSLAIC.js} +1 -1
- package/dist/{chunk-NV5IDANV.js → chunk-NA2ERJIJ.js} +1 -1
- package/dist/chunk-NOKCVDYD.js +317 -0
- package/dist/chunk-O6XSWAP2.js +4 -0
- package/dist/{chunk-OVLTFTZW.js → chunk-OB62WVZ5.js} +1 -1
- package/dist/{chunk-UYNCJGMC.js → chunk-OT52JOML.js} +1 -1
- package/dist/chunk-OTT73YUA.js +5 -0
- package/dist/{chunk-ZVQBSXE4.js → chunk-OUUOML3D.js} +1 -1
- package/dist/{chunk-7ZLKT2TB.js → chunk-P7XC5HS2.js} +1 -1
- package/dist/{chunk-KC2TN7AR.js → chunk-PALG4SNB.js} +1 -1
- package/dist/{chunk-T5DF2GGD.js → chunk-PB37BTPE.js} +1 -1
- package/dist/{chunk-WO5YOBQ7.js → chunk-PWYRKTJ4.js} +1 -1
- package/dist/{chunk-H7PNMMDO.js → chunk-PXSX63RF.js} +1 -1
- package/dist/{chunk-QMSYJIAU.js → chunk-QDPDB5EP.js} +1 -1
- package/dist/{chunk-7XQDZF73.js → chunk-QG7TELFC.js} +1 -1
- package/dist/{chunk-OASPW2P2.js → chunk-QU5NL2QT.js} +1 -1
- package/dist/{chunk-DQE7XRCK.js → chunk-QV53BSQP.js} +1 -1
- package/dist/{chunk-CNOL26GA.js → chunk-QXXA2EQY.js} +1 -1
- package/dist/{chunk-T3AJL2M5.js → chunk-QZ5FMWZS.js} +1 -1
- package/dist/chunk-R26GJEH3.js +1 -0
- package/dist/{chunk-TDSR2X7X.js → chunk-RTW4RZWH.js} +2 -2
- package/dist/{chunk-FPCPFECH.js → chunk-SEV3S3WH.js} +1 -1
- package/dist/{chunk-YYHCPLBX.js → chunk-TAFOSPBW.js} +1 -1
- package/dist/{chunk-MCATVWHC.js → chunk-TAV2ENJY.js} +1 -1
- package/dist/{chunk-ZNWFTUFV.js → chunk-TQNALMQH.js} +1 -1
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/{chunk-RFDT525K.js → chunk-TUJNCWHZ.js} +1 -1
- package/dist/{chunk-2MNOWKMI.js → chunk-U564K7SX.js} +1 -1
- package/dist/chunk-UKQ7NE5V.js +1 -0
- package/dist/{chunk-ICFFBMFB.js → chunk-UM3OHLCX.js} +1 -1
- package/dist/{chunk-4TC4M4RC.js → chunk-V65P572N.js} +3 -3
- package/dist/chunk-VFIVXK53.js +2 -0
- package/dist/chunk-VVFPW4ZQ.js +2 -0
- package/dist/{chunk-TVU4YD2H.js → chunk-VYITPC34.js} +1 -1
- package/dist/{chunk-3QVXHF6I.js → chunk-VZKR2YFM.js} +1 -1
- package/dist/{chunk-WMDYHUPS.js → chunk-W2GMKXM7.js} +1 -1
- package/dist/{chunk-72K36DID.js → chunk-W4X3635B.js} +1 -1
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/{chunk-RIRSTGFU.js → chunk-WEEYQX3M.js} +1 -1
- package/dist/{chunk-KOUKBXOZ.js → chunk-WO7LKJCJ.js} +1 -1
- package/dist/{chunk-6XLVKD6Q.js → chunk-WPRAJ25Z.js} +1 -1
- package/dist/{chunk-LUG2BZJP.js → chunk-WR2ZQGUR.js} +1 -1
- package/dist/{chunk-5K4DONQJ.js → chunk-WWX265PC.js} +1 -1
- package/dist/chunk-XERJY4IG.js +103 -0
- package/dist/{chunk-GXUZ3V7S.js → chunk-XGCJWCC4.js} +1 -1
- package/dist/{chunk-PGKP7W5T.js → chunk-XGMPC7KK.js} +1 -1
- package/dist/chunk-XGRVAPLR.js +7 -0
- package/dist/{chunk-TC3JOEMA.js → chunk-Y2PC2BBJ.js} +60 -60
- package/dist/{chunk-ODH2U44N.js → chunk-Y4QC2YVE.js} +1 -1
- package/dist/chunk-YNJZ2VXV.js +5 -0
- package/dist/chunk-Z5DDPQ26.js +3 -0
- package/dist/{chunk-EXQXGSGY.js → chunk-ZK7VJZ6V.js} +1 -1
- package/dist/{chunk-COTYR5RC.js → chunk-ZLT4DPHN.js} +1 -1
- package/dist/{chunk-CGULQAB5.js → chunk-ZOBQKNGK.js} +1 -1
- package/dist/chunk-ZTE46E4Z.js +153 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- 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-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.js +1 -1
- package/dist/cli/commands/app/release.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.js +1 -1
- 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.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- 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.js +1 -1
- 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.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.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.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-N5P2ZEAD.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/custom-oclif-loader-4ZAXX5MR.js +1 -0
- package/dist/data/filters.json +1 -1
- package/dist/data/objects.json +30 -3
- package/dist/data/shopify_system_translations.json +48 -4
- package/dist/deprecations-4TY4DNME.js +1 -0
- package/dist/dist-6ZJS4I57.js +1 -0
- package/dist/dist-7W2KJOYN.js +1 -0
- package/dist/environments-TR5WW2MD.js +1 -0
- package/dist/error-VJQM4MFE.js +1 -0
- package/dist/error-handler-IYGE3Z72.js +1 -0
- package/dist/{fs-7LCRIUF3.js → fs-EOQL26C3.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- 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 +1 -1
- 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-proxy-node16-X2WAMUT5.js → http-proxy-node16-A6AKKRQH.js} +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-RQCPBQA3.js +1 -0
- package/dist/{latest-version-32HXMWJ7.js → latest-version-LDWU5F7A.js} +7 -7
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-JKLF33A7.js +1 -0
- package/dist/{lib-NOROGV6N.js → lib-P3APEIHY.js} +1 -1
- package/dist/local-TW3HCZ2S.js +1 -0
- package/dist/local-storage-T6FKS53K.js +1 -0
- package/dist/{metadata-D5GLZOLV.js → metadata-TYZDEER5.js} +1 -1
- package/dist/{morph-QZGREMO2.js → morph-ABSWZEVT.js} +4 -4
- package/dist/node-package-manager-6SWUZILX.js +1 -0
- package/dist/notifications-system-SMHMV2UW.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/{output-FYS764MJ.js → output-JG5I2TEL.js} +1 -1
- package/dist/system-D4Z32GDS.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-6M3XZ6MR.js +1 -0
- package/dist/upgrade-EKAG4IV7.js +1 -0
- package/dist/version-6UBWZCNS.js +1 -0
- package/dist/version-XRU7TEAI.js +1 -0
- package/dist/{workerd-N25GY5MX.js → workerd-LXBSJULF.js} +1 -1
- package/oclif.manifest.json +612 -2
- package/package.json +11 -11
- package/dist/analytics-CIKTYXZ6.js +0 -1
- package/dist/analytics-DM7CBV2M.js +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/apple-touch-icon-BXMqQaSW.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-16x16-B6uL8SrV.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-32x32-CGwlpz_y.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-ByUl89Ab.ico +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Bm_GpKQW.js +0 -51
- package/dist/assets/dev-console/extensions/dev-console/assets/index-DISeE29z.css +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/site-B9Ae890R.webmanifest +0 -19
- package/dist/assets/dev-console/index.html +0 -21
- package/dist/chunk-2FIDORHT.js +0 -5
- package/dist/chunk-2HZMOK4U.js +0 -836
- package/dist/chunk-2O22LZKV.js +0 -44
- package/dist/chunk-3SJHCEQR.js +0 -7
- package/dist/chunk-4E354M4H.js +0 -1
- package/dist/chunk-5C7HDTHJ.js +0 -1
- package/dist/chunk-5NY4HKJF.js +0 -103
- package/dist/chunk-5PLLJPEW.js +0 -3
- package/dist/chunk-6Y3QXASG.js +0 -22
- package/dist/chunk-6ZRHK4ON.js +0 -1
- package/dist/chunk-7USHLXEN.js +0 -2
- package/dist/chunk-AH2ZJ73H.js +0 -16
- package/dist/chunk-AI756VJI.js +0 -1
- package/dist/chunk-DA4LHFJQ.js +0 -26
- package/dist/chunk-DKKBJ4H5.js +0 -2
- package/dist/chunk-EAXEV45I.js +0 -2
- package/dist/chunk-ELIH6GCC.js +0 -1
- package/dist/chunk-EYDNSYYE.js +0 -370
- package/dist/chunk-FO6FNY6P.js +0 -5
- package/dist/chunk-G7QLHXVA.js +0 -19
- package/dist/chunk-H3QZN45D.js +0 -4
- package/dist/chunk-HHSUBF73.js +0 -1
- package/dist/chunk-HXYWEKMS.js +0 -2
- package/dist/chunk-IDKUJQIG.js +0 -11
- package/dist/chunk-IOU6EKTT.js +0 -1
- package/dist/chunk-IRH6IGFT.js +0 -567
- package/dist/chunk-IRTCLR3F.js +0 -10
- package/dist/chunk-J3KRY2SD.js +0 -1
- package/dist/chunk-JOYM7AEQ.js +0 -1
- package/dist/chunk-LKZ7ARYS.js +0 -18
- package/dist/chunk-N5HGT3TE.js +0 -4
- package/dist/chunk-NJOO5XJV.js +0 -1
- package/dist/chunk-NNOSZ447.js +0 -1
- package/dist/chunk-OHASEW7T.js +0 -1
- package/dist/chunk-PGODIZ64.js +0 -1
- package/dist/chunk-PTIJDS6I.js +0 -3
- package/dist/chunk-Q6LCSRIW.js +0 -1
- package/dist/chunk-SKM44SK5.js +0 -4
- package/dist/chunk-T6CC5WUU.js +0 -159
- package/dist/chunk-UZ7U322K.js +0 -283
- package/dist/chunk-VHAZBDFE.js +0 -21
- package/dist/chunk-VRRDIXFQ.js +0 -6
- package/dist/chunk-YB3SGPFF.js +0 -1
- package/dist/chunk-YJCJDCVP.js +0 -1
- package/dist/chunk-ZDQNCYRH.js +0 -5
- package/dist/conf-store-OC4XCP45.js +0 -1
- package/dist/custom-oclif-loader-3AICQCNU.js +0 -1
- package/dist/deprecations-M5JGGK47.js +0 -1
- package/dist/dist-3SP7TISC.js +0 -1
- package/dist/dist-Z4H2OM7V.js +0 -1
- package/dist/environments-ZLSO534C.js +0 -1
- package/dist/error-ZBG2MA5U.js +0 -1
- package/dist/error-handler-MCUV4RZV.js +0 -1
- package/dist/is-global-RURDJZDU.js +0 -1
- package/dist/lib-QJDPPAWN.js +0 -1
- package/dist/lib-UCG2DNMS.js +0 -1
- package/dist/local-5AKD7T5X.js +0 -1
- package/dist/local-storage-TJU77VRQ.js +0 -1
- package/dist/node-package-manager-FA3Y6DPG.js +0 -1
- package/dist/notifications-system-76GJJAJP.js +0 -1
- package/dist/out-CDCY25QC.js +0 -1
- package/dist/system-KDM2BB7R.js +0 -1
- package/dist/ui-QIHGXICT.js +0 -1
- package/dist/upgrade-DY4L43H4.js +0 -1
- package/dist/version-LULWCT5R.js +0 -1
- package/dist/version-WIERCO5R.js +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import{a as Gi,c as Ki,d as ln,g as ao,k as un,l as qe,m as lo,n as uo,o as fo,p as po,q as ho,r as mo,s as go,t as _o,u as yo}from"./chunk-TR4OWSEX.js";import{a as ro,b as oo}from"./chunk-2KD4LHRT.js";import{b as so}from"./chunk-I5A6BPCP.js";import{a as io}from"./chunk-CX5CC6P5.js";import{a as co}from"./chunk-ET2CGROE.js";import{a as v,c as y,g as f}from"./chunk-VKWPEFWQ.js";var $=y(F=>{"use strict";f();Object.defineProperty(F,"__esModule",{value:!0});F.pickBy=bo;F.compact=vo;F.uniqBy=wo;F.last=Oo;F.sortBy=jo;F.castArray=Po;F.isProd=Co;F.maxBy=Eo;F.sumBy=$o;F.capitalize=qo;F.isTruthy=Do;F.isNotFalsy=xo;F.uniq=Fo;F.mapValues=Ao;F.mergeNestedObjects=Mo;function bo(t,e){return Object.entries(t).reduce((n,[i,s])=>(e(s)&&(n[i]=s),n),{})}function vo(t){return t.filter(e=>!!e)}function wo(t,e){return t.filter((n,i)=>{let s=e(n);return!t.some((r,o)=>o>i&&e(r)===s)})}function Oo(t){if(t)return t.at(-1)}function dn(t,e){if(t=t===void 0?0:t,e=e===void 0?0:e,Array.isArray(t)&&Array.isArray(e)){if(t.length===0&&e.length===0)return 0;let n=dn(t[0],e[0]);return n!==0?n:dn(t.slice(1),e.slice(1))}return t<e?-1:t>e?1:0}function jo(t,e){return t.sort((n,i)=>dn(e(n),e(i)))}function Po(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function Co(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Eo(t,e){if(t.length!==0)return t.reduce((n,i)=>{let s=e(i),r=e(n);return s>r?i:n})}function $o(t,e){return t.reduce((n,i)=>n+e(i),0)}function qo(t){return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}function Do(t){return["1","true","y","yes"].includes(t.toLowerCase())}function xo(t){return!["0","false","n","no"].includes(t.toLowerCase())}function Fo(t){return[...new Set(t)].sort()}function Ao(t,e){return Object.entries(t).reduce((n,[i,s])=>(n[i]=e(s,i),n),{})}function So(t,e){return e.split(".").reduce((n,i)=>n?.[i],t)}function Mo(t,e){return Object.fromEntries(t.flatMap(n=>Object.entries(So(n,e)??{})).reverse())}});var X=y(ie=>{"use strict";f();Object.defineProperty(ie,"__esModule",{value:!0});ie.fileExists=ie.dirExists=void 0;ie.readJson=Ji;ie.safeReadJson=Ro;ie.existsSync=No;var Io=v("node:fs"),hn=v("node:fs/promises"),ko=$(),To=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No directory found at ${t}`)}if(!e.isDirectory())throw new Error(`${t} exists but is not a directory`);return t};ie.dirExists=To;var Lo=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No file found at ${t}`)}if(!e.isFile())throw new Error(`${t} exists but is not a file`);return t};ie.fileExists=Lo;var pn=class extends Map{set(e,n){return((0,ko.isProd)()??!1)&&super.set(e,n),this}},fn=new pn;async function Ji(t,e=!0){if(e&&fn.has(t))return JSON.parse(fn.get(t));let n=await(0,hn.readFile)(t,"utf8");return fn.set(t,n),JSON.parse(n)}async function Ro(t,e=!0){try{return await Ji(t,e)}catch{}}function No(t){return(0,Io.existsSync)(t)}});var Xi=y(M=>{"use strict";f();Object.defineProperty(M,"__esModule",{value:!0});M.string=M.url=M.file=M.directory=M.integer=M.boolean=void 0;M.custom=me;var Ho=v("node:url"),Yi=X(),Bo=$();function me(t){return(e={})=>({parse:async(n,i,s)=>n,...t,...e,input:[],type:"option"})}M.boolean=me({parse:async t=>!!t&&(0,Bo.isNotFalsy)(t)});M.integer=me({async parse(t,e,n){if(!/^-?\d+$/.test(t))throw new Error(`Expected an integer but received: ${t}`);let i=Number.parseInt(t,10);if(n.min!==void 0&&i<n.min)throw new Error(`Expected an integer greater than or equal to ${n.min} but received: ${t}`);if(n.max!==void 0&&i>n.max)throw new Error(`Expected an integer less than or equal to ${n.max} but received: ${t}`);return i}});M.directory=me({async parse(t,e,n){return n.exists?(0,Yi.dirExists)(t):t}});M.file=me({async parse(t,e,n){return n.exists?(0,Yi.fileExists)(t):t}});M.url=me({async parse(t){try{return new Ho.URL(t)}catch{throw new Error(`Expected a valid url but received: ${t}`)}}});var Wo=me({});M.string=Wo});var Zi=y((Rf,zo)=>{zo.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.8.3",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.4",semver:"^7.7.3","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.14","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.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@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.1",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 G=y(gn=>{"use strict";f();Object.defineProperty(gn,"__esModule",{value:!0});var Uo=v("node:fs"),Vo=v("node:path"),mn=class t extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return t.instance||(t.instance=new t),t.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Zi().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,Uo.readFileSync)((0,Vo.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};gn.default=mn});var k=y(le=>{"use strict";f();var Go=le&&le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(le,"__esModule",{value:!0});le.getLogger=Qi;le.makeDebug=Yo;le.setLogger=Xo;le.clearLoggers=Zo;var Ko=Go(oo()),yn="oclif";function Ct(t=yn){let e=(0,Ko.default)(t);return{child:(n,i)=>Ct(`${t}${i??":"}${n}`),debug:e,error:(n,...i)=>Ct(`${t}:error`).debug(n,...i),info:e,namespace:t,trace:e,warn:e}}var se=new Map;function Qi(t){let e=se.get("root");if(e||_n(Ct(yn)),e=se.get("root"),t){let n=se.get(t);if(n)return n;let i=e.child(t);return se.set(t,i),i}return e}function Jo(t){return typeof t.child=="function"&&typeof t.debug=="function"&&typeof t.error=="function"&&typeof t.info=="function"&&typeof t.trace=="function"&&typeof t.warn=="function"&&typeof t.namespace=="string"}function _n(t){se.has(t.namespace)||se.has("root")||(Jo(t)?(se.set(t.namespace,t),se.set("root",t)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function Yo(t){return(e,...n)=>Qi(t).debug(e,...n)}function Xo(t){t&&typeof t!="string"&&"logger"in t&&t.logger?_n(t.logger):_n(Ct(yn))}function Zo(){se.clear()}});var tt=y(xe=>{"use strict";f();Object.defineProperty(xe,"__esModule",{value:!0});xe.stderr=xe.stdout=void 0;var De=v("node:util"),Qo=(t,...e)=>{!t&&e?console.log((0,De.format)(...e)):t?console.log(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.log()};xe.stdout=Qo;var ea=(t,...e)=>{!t&&e?console.error((0,De.format)(...e)):t?console.error(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.error()};xe.stderr=ea});var re=y(Et=>{"use strict";f();Object.defineProperty(Et,"__esModule",{value:!0});Et.settings=void 0;globalThis.oclif||(globalThis.oclif={});Et.settings=globalThis.oclif});var Ae=y(Fe=>{"use strict";f();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.errtermwidth=Fe.stdtermwidth=void 0;var ta=re();function es(t){if(!t.isTTY)return 80;let e=t.getWindowSize()[0];return e<1?80:e<40?40:e}var ts=Number.parseInt(process.env.OCLIF_COLUMNS,10)||ta.settings.columns;Fe.stdtermwidth=ts||es(process.stdout);Fe.errtermwidth=ts||es(process.stderr)});var ns=y($t=>{"use strict";f();Object.defineProperty($t,"__esModule",{value:!0});$t.STANDARD_ANSI=void 0;$t.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 ss=y(bn=>{"use strict";f();Object.defineProperty(bn,"__esModule",{value:!0});bn.supportsColor=na;var is=ro();function na(){return!!is.stdout&&!!is.stderr}});var W=y(Se=>{"use strict";f();var ia=Se&&Se.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Se,"__esModule",{value:!0});Se.colorize=oa;Se.parseTheme=os;var vn=ia(qe()),sa=ns(),ra=ss();function rs(t){return sa.STANDARD_ANSI.includes(t)}function oa(t,e){if(!t||!(0,ra.supportsColor)())return e;if(rs(t))return vn.default[t](e);if(t.startsWith("#"))return vn.default.hex(t)(e);if(t.startsWith("rgb")){let[n,i,s]=t.slice(4,-1).split(",").map(r=>Number.parseInt(r.trim(),10));return vn.default.rgb(n,i,s)(e)}return e}function os(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?aa(n):os(n)]).filter(([e,n])=>n))}function aa(t){return t.startsWith("#")||t.startsWith("rgb")||rs(t)?t:void 0}});var ge=y(ue=>{"use strict";f();var qt=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ue,"__esModule",{value:!0});ue.CLIError=void 0;ue.addOclifExitCode=cs;var ca=qt(Ki()),wn=qt(ln()),la=qt(un()),ua=qt(G()),da=Ae(),fa=re(),as=W();function cs(t,e){return"oclif"in t||(t.oclif={}),t.oclif.exit=e?.exit===void 0?ua.default.getInstance().get("exitCodes")?.default??2:e.exit,t}var nt=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,n={}){super(e instanceof Error?e.message:e),cs(this,n),this.code=n.code,this.suggestions=n.suggestions}get bang(){try{return(0,as.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,ca.default)(super.stack,{pretty:!0})}render(){if(fa.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,la.default)(e,da.errtermwidth-6,{hard:!0,trim:!1}),e=(0,wn.default)(e,3),e=(0,wn.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,wn.default)(e,1),e}};ue.CLIError=nt;(function(t){class e extends t{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,as.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}t.Warn=e})(nt||(ue.CLIError=nt={}))});var xt=y(Me=>{"use strict";f();var ls=Me&&Me.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Me,"__esModule",{value:!0});Me.applyPrettyPrintOptions=ga;Me.default=ya;var Dt=ls(ln()),pa=ls(un()),ha=Ae(),ma=re();function ga(t,e){let n=["message","code","ref","suggestions"];for(let i of n)!(i in t)&&e[i]&&(t[i]=e[i]);return t}var _a=t=>{let e="Try this:";if(!t||t.length===0)return;if(t.length===1)return`${e} ${t[0]}`;let n=t.map(i=>`* ${i}`).join(`
|
|
2
|
+
`);return`${e}
|
|
3
|
+
${(0,Dt.default)(n,2)}`};function ya(t){if(ma.settings.debug)return t.stack;let{bang:e,code:n,message:i,name:s,ref:r,suggestions:o}=t,c=i?`${s||"Error"}: ${i}`:void 0,l=n?`Code: ${n}`:void 0,u=_a(o),p=r?`Reference: ${r}`:void 0,a=[c,l,u,p].filter(Boolean).join(`
|
|
4
|
+
`),d=(0,pa.default)(a,ha.errtermwidth-6,{hard:!0,trim:!1});return d=(0,Dt.default)(d,3),d=(0,Dt.default)(d,1,{includeEmptyLines:!0,indent:e||""}),d=(0,Dt.default)(d,1),d}});var Ie=y(Z=>{"use strict";f();var ba=Z&&Z.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),va=Z&&Z.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wa=Z&&Z.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&ba(n,e,i[s]);return va(n,e),n}})();Object.defineProperty(Z,"__esModule",{value:!0});Z.error=fs;var Oa=k(),ja=tt(),us=ge(),ds=wa(xt());function fs(t,e={}){let n;if(typeof t=="string")n=new us.CLIError(t,e);else if(t instanceof Error)n=(0,us.addOclifExitCode)(t,e);else throw new TypeError("first argument must be a string or instance of Error");if(n=(0,ds.applyPrettyPrintOptions)(n,e),e.exit===!1){let i=(0,ds.default)(n);i&&(0,ja.stderr)(i),n?.stack&&(0,Oa.getLogger)().error(n.stack)}else throw n}Z.default=fs});var At=y(Ft=>{"use strict";f();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.ExitError=void 0;var Pa=ge(),On=class extends Pa.CLIError{code="EEXIT";constructor(e=1){super(`EEXIT: ${e}`,{exit:e})}render(){return""}};Ft.ExitError=On});var Pn=y(St=>{"use strict";f();Object.defineProperty(St,"__esModule",{value:!0});St.ModuleLoadError=void 0;var Ca=ge(),jn=class extends Ca.CLIError{code="MODULE_NOT_FOUND";constructor(e){super(`[MODULE_NOT_FOUND] ${e}`,{exit:1}),this.name="ModuleLoadError"}};St.ModuleLoadError=jn});var Mt=y(Cn=>{"use strict";f();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.exit=$a;var Ea=At();function $a(t=0){throw new Ea.ExitError(t)}});var ke=y(_e=>{"use strict";f();var qa=_e&&_e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_e,"__esModule",{value:!0});_e.warn=En;_e.memoizedWarn=Aa;var Da=k(),xa=tt(),ps=ge(),Fa=qa(xt());function En(t){let e;if(typeof t=="string")e=new ps.CLIError.Warn(t);else if(t instanceof Error)e=(0,ps.addOclifExitCode)(t);else throw new TypeError("first argument must be a string or instance of Error");let n=(0,Fa.default)(e);n&&(0,xa.stderr)(n),e?.stack&&(0,Da.getLogger)().error(e.stack)}var hs=new Set;function Aa(t){hs.has(t)||En(t),hs.add(t)}_e.default=En});var vs=y($n=>{"use strict";f();Object.defineProperty($n,"__esModule",{value:!0});$n.readTSConfig=ka;var ms=v("node:fs/promises"),ys=v("node:path"),Sa=ke(),Ma=k(),gs=$(),Ia=(0,Ma.makeDebug)("read-tsconfig");function _s(t,e){try{return v.resolve(e,{paths:[t]})}catch{}}async function bs(t,e){let n;try{n=await e(t)}catch{n=!1}if(n)return t;let i=(0,ys.dirname)(t);if(i!==t)return bs(i,e)}async function ka(t,e="tsconfig.json"){let n=[],i;try{i=co()}catch{try{i=v(t+"/node_modules/typescript")}catch{}}if(!i){(0,Sa.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let s=async r=>{let o=await bs(r,async c=>(await(0,ms.readdir)(c)).includes("package.json"));if(o)try{let c=await(0,ms.readFile)(r,"utf8"),l=i?.parseConfigFileTextToJson(r,c).config;if(n.push(l),l.extends){if(l.extends.startsWith(".")){let p=_s(o,l.extends);return p?s(p):void 0}let u=_s(o,l.extends);if(u)return s(u)}return l}catch(c){Ia(c)}};return await s((0,ys.join)(t,e)),{compilerOptions:(0,gs.mergeNestedObjects)(n,"compilerOptions"),"ts-node":(0,gs.mergeNestedObjects)(n,"ts-node")}}});var Te=y(ye=>{"use strict";f();Object.defineProperty(ye,"__esModule",{value:!0});ye.collectUsableIds=void 0;ye.makeDebug=La;ye.getPermutations=qn;ye.getCommandIdPermutations=Ra;var Ta=k();function La(...t){return(e,...n)=>(0,Ta.getLogger)(["config",...t].join(":")).debug(e,...n)}function qn(t){if(t.length===0)return[];if(t.length===1)return[t];let e=[],n=qn(t.slice(1)),i=t[0];for(let s=0,r=n.length;s<r;s++){let o=n[s];for(let c=0,l=o.length;c<=l;c++){let u=o.slice(0,c),p=o.slice(c),a=[...u,i,...p];e.push(a)}}return e}function Ra(t){return qn(t.split(":")).flatMap(e=>e.join(":"))}var Na=t=>new Set(t.flatMap(e=>e.split(":").map((n,i,s)=>s.slice(0,i+1).join(":"))));ye.collectUsableIds=Na});var Le=y(K=>{"use strict";f();var Ha=K&&K.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K,"__esModule",{value:!0});K.TS_CONFIGS=void 0;K.tsPath=tc;var ws=v("node:fs/promises"),T=v("node:path"),Ba=v("node:url"),Wa=Ha(G()),it=ke(),Os=re(),za=X(),Ua=vs(),Dn=$(),Va=Te(),P=(0,Va.makeDebug)("ts-path");K.TS_CONFIGS={};var It=new Set;function Ga(){return process.execPath.split(T.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(T.sep).includes("ts-node")||process.execArgv[0].split(T.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(T.sep).includes("tsx")?"tsx":"node"}var xn=Ga();function Ka(t){return"code"in t&&t.code==="ENOENT"}async function Ja(t){try{if(K.TS_CONFIGS[t])return K.TS_CONFIGS[t];let e=await(0,Ua.readTSConfig)(t);return e?(P("tsconfig: %O",e),K.TS_CONFIGS[t]=e,K.TS_CONFIGS[t]):void 0}catch(e){if(Ka(e))return;P(`Could not parse tsconfig.json. Skipping typescript path lookup for ${t}.`),(0,it.memoizedWarn)(`Could not parse tsconfig.json for ${t}. Falling back to compiled source.`)}}async function Ya(t,e){if(!It.has(t))try{let n=e==="module"?"tsx/esm/api":"tsx/cjs/api",i=v.resolve(n,{paths:[t]});if(!i)return;P("registering tsx at",t),P("tsx path:",i);let{href:s}=(0,Ba.pathToFileURL)(i);P("tsx href:",s);let{register:r}=await import(s);P("Successfully imported tsx"),r(),It.add(t)}catch(n){P(`Could not find tsx. Skipping tsx registration for ${t}.`),P(n)}}async function Xa(t,e){if(It.has(t))return;P("registering ts-node at",t);let n=v.resolve("ts-node",{paths:[t,__dirname]});P("ts-node path:",n);let i;try{i=v(n),P("Successfully required ts-node")}catch(p){P(`Could not find ts-node at ${n}. Skipping ts-node registration for ${t}.`),P(p),(0,it.memoizedWarn)(`Could not find ts-node at ${n}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let s=[(0,T.join)(t,"node_modules","@types")],r=[];if(e.compilerOptions.rootDirs)for(let p of e.compilerOptions.rootDirs)r.push((0,T.join)(t,p));else e.compilerOptions.rootDir?r.push((0,T.join)(t,e.compilerOptions.rootDir)):e.compilerOptions.baseUrl?r.push((0,T.join)(t,e.compilerOptions.baseUrl)):r.push((0,T.join)(t,"src"));let{baseUrl:o,rootDir:c,...l}=e.compilerOptions,u={compilerOptions:{...l,rootDirs:r,typeRoots:s},...e["ts-node"],cwd:t,esm:e["ts-node"]?.esm??!0,experimentalSpecifierResolution:e["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:t,skipProject:!0,transpileOnly:!0};P("ts-node options: %O",u),i.register(u),It.add(t)}function Za(t,e,n){return(n||t?.moduleType==="commonjs")&&e?.moduleType==="module"&&!e?.pjson.devDependencies?.tsx}function Qa(t,e,n){if(e?.moduleType!=="module"||n)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return xn==="ts-node"&&i>=20}async function ec(t,e,n){let i=await Ja(t);if(!i)return e;P(`Determining path for ${e}`),xn==="bun"?P(`Skipping ts-node registration for ${t} because the runtime is: ${xn}`):(await Ya(t,n?.moduleType),await Xa(t,i));let{baseUrl:s,outDir:r,rootDir:o,rootDirs:c}=i.compilerOptions,l=o??(c??[])[0]??s;if(!l)return P(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${e}`),e;if(!r)return P(`no outDir specified in tsconfig.json. Returning default path ${e}`),e;let u=(0,T.join)(t,r),p=(0,T.join)(t,l),a=(0,T.relative)(u,e),d=(0,T.join)(p,a).replace(/\.js$/,"");return P(`lib dir: ${u}`),P(`src dir: ${p}`),P(`src directory to find: ${d}`),(0,za.existsSync)(d)?(P(`Found source directory for ${e} at ${d}`),d):(await Promise.all([(0,ws.access)(`${d}.ts`).then(()=>`${d}.ts`).catch(()=>!1),(0,ws.access)(`${d}.tsx`).then(()=>`${d}.tsx`).catch(()=>!1)])).some(Boolean)?(P(`Found source file for ${e} at ${d}`),d):(P(`No source file found. Returning default path ${e}`),(0,Dn.isProd)()||(0,it.memoizedWarn)(`Could not find source for ${e} based on tsconfig. Defaulting to compiled source.`),e)}async function tc(t,e,n){let i=n?.options.isRoot?n:Wa.default.getInstance().get("rootPlugin");if(!e)return e;e=e.startsWith(t)?e:(0,T.join)(t,e);let s=Os.settings.enableAutoTranspile??Os.settings.tsnodeEnabled;if(s===!1)return P(`Skipping typescript path lookup for ${t} because enableAutoTranspile is explicitly set to false`),e;let r=(0,Dn.isProd)();if(s===void 0&&r&&n?.type!=="link")return P(`Skipping typescript path lookup for ${t} because NODE_ENV is NOT "test" or "development"`),e;if(Za(i,n,r)){P(`Skipping typescript path lookup for ${t} 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,Dn.isTruthy)(process.env.OCLIF_DISABLE_LINKED_ESM_WARNING);return n?.type==="link"&&!o&&(0,it.memoizedWarn)(`${n?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),e}if(Qa(t,n,r))return P(`Skipping typescript path lookup for ${t} because ts-node is run in node version ${process.version}"`),(0,it.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 ec(t,e,n)}catch(o){return P(o),e}}});var st=y(Re=>{"use strict";f();Object.defineProperty(Re,"__esModule",{value:!0});Re.load=oc;Re.loadWithData=ac;Re.loadWithDataFromManifest=cc;Re.isPathModule=An;var nc=lo(),ic=v("node:fs"),kt=v("node:path"),Sn=v("node:url"),js=Le(),Fn=Pn(),Cs=X(),sc=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],rc=t=>t.type!==void 0;function Mn(t,e,n){throw t.code==="MODULE_NOT_FOUND"||t.code==="ERR_MODULE_NOT_FOUND"?new Fn.ModuleLoadError(`${e?"import()":"require"} failed to load ${n}: ${t.message}`):t}async function oc(t,e){let n,i;try{return{filePath:n,isESM:i}=await Es(t,e),i?await import((0,Sn.pathToFileURL)(n).href):v(n)}catch(s){Mn(s,i,n??e)}}async function ac(t,e){let n,i;try{({filePath:n,isESM:i}=await Es(t,e));let s=i?await import((0,Sn.pathToFileURL)(n).href):v(n);return{filePath:n,isESM:i,module:s}}catch(s){Mn(s,i,n??e)}}async function cc(t,e){let{id:n,isESM:i,relativePath:s}=t;if(!s)throw new Fn.ModuleLoadError(`Cached command ${n} does not have a relative path`);if(i===void 0)throw new Fn.ModuleLoadError(`Cached command ${n} does not have the isESM property set`);let r=(0,kt.join)(e,s.join(kt.sep));try{let o=i?await import((0,Sn.pathToFileURL)(r).href):v(r);return{filePath:r,isESM:i,module:o}}catch(o){Mn(o,i,r??e)}}function An(t){switch((0,kt.extname)(t).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return nc.sync(t)==="module";case".mjs":case".mts":return!0;default:return!1}}async function Es(t,e){let n,i;try{i=v.resolve(e),n=An(i)}catch{i=(rc(t)?await(0,js.tsPath)(t.root,e,t):await(0,js.tsPath)(t.root,e))??e;let s=!1,r=!1;if((0,Cs.existsSync)(i)){s=!0;try{(0,ic.lstatSync)(i)?.isDirectory?.()&&(s=!1,r=!0)}catch{}}if(!s){let o=Ps(i);!o&&r&&(o=Ps((0,kt.join)(i,"index"))),o&&(i=o)}n=An(i)}return{filePath:i,isESM:n}}function Ps(t){for(let e of sc){let n=`${t}${e}`;if((0,Cs.existsSync)(n))return n}return null}});var Lt=y(Tt=>{"use strict";f();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.SINGLE_COMMAND_CLI_SYMBOL=void 0;Tt.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var In=y(Rt=>{"use strict";f();Object.defineProperty(Rt,"__esModule",{value:!0});Rt.cacheDefaultValue=void 0;var lc=async(t,e)=>{if(!(e&&t.noCacheDefault)){if(typeof t.defaultHelp=="function")try{return await t.defaultHelp({flags:{},options:t})}catch{return}if(typeof t.default=="function")try{return await t.default({flags:{},options:t})}catch{}else return t.default}};Rt.cacheDefaultValue=lc});var be=y(Nt=>{"use strict";f();Object.defineProperty(Nt,"__esModule",{value:!0});Nt.toStandardizedId=uc;Nt.toConfiguredId=dc;function uc(t,e){return t.replaceAll(new RegExp(e.topicSeparator,"g"),":")}function dc(t,e){return t.replaceAll(new RegExp(":","g"),e.topicSeparator||":")}});var Tn=y(Ht=>{"use strict";f();Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ActionBase=void 0;var $s=v("node:util"),qs=$(),kn=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:n}=this;n&&n.status!==e&&(this._updateStatus(e,n.status),n.status=e)}get task(){return this.globals.action.task}set task(e){this.globals.action.task=e}_flushStdout(){try{let e="",n;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();n=i[0],this._write(n,i[1]),e+=i[1][0].toString("utf8")}e&&n&&e.at(-1)!==`
|
|
5
|
+
`&&this._write(n,`
|
|
6
|
+
`)}catch(e){this._write("stderr",(0,$s.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=(...n)=>(this.stdmocks.push(["stdout",n]),!0),process.stderr.write=(...n)=>(this.stdmocks.push(["stderr",n]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(n){this._write("stderr",(0,$s.inspect)(n))}}_stop(e){throw new Error("not implemented")}_updateStatus(e,n){}_write(e,n){switch(e){case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,qs.castArray)(n));break}case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,qs.castArray)(n));break}default:throw new Error(`invalid std: ${e}`)}}pause(e,n){let{task:i}=this,s=i&&i.active;i&&s&&(this._pause(n),this._stdout(!1),i.active=!1);let r=e();return i&&s&&this._resume(),r}async pauseAsync(e,n){let{task:i}=this,s=i&&i.active;i&&s&&(this._pause(n),this._stdout(!1),i.active=!1);let r=await e();return i&&s&&this._resume(),r}start(e,n,i={}){this.std=i.stdout?"stdout":"stderr";let s={action:e,active:!!(this.task&&this.task.active),status:n};this.task=s,this._start(i),s.active=!0,this._stdout(!0)}stop(e="done"){let{task:n}=this;n&&(this._stop(e),n.active=!1,this.task=void 0,this._stdout(!1))}};Ht.ActionBase=kn});var Ds=y(Rn=>{"use strict";f();Object.defineProperty(Rn,"__esModule",{value:!0});var fc=Tn(),Ln=class extends fc.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,n,i=!1){this.task&&(this.task.active&&!n?this._write(this.std,` ${e}`):this._write(this.std,`${this.task.action}... ${e}`),(i||!n)&&this._flush())}_flush(){this._write(this.std,`
|
|
7
|
+
`),this._flushStdout()}_render(e,n){this.task&&(this.task.active&&this._flush(),this._write(this.std,n?`${e}... ${n}`:`${e}...`))}};Rn.default=Ln});var Fs=y(rt=>{"use strict";f();var Bn=rt&&rt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rt,"__esModule",{value:!0});var Nn=uo(),pc=Bn(qe()),xs=Bn(fo()),hc=Bn(G()),mc=Ae(),gc=W(),_c=Tn(),Hn=class extends _c.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=hc.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,gc.colorize)(this.color,e)}_lines(e){return pc.default.strip(e).split(`
|
|
8
|
+
`).map(n=>Math.ceil(n.length/mc.errtermwidth)).reduce((n,i)=>n+i,0)}_render(e){if(!this.task)return;this._reset(),this._flushStdout();let n=e==="spinner"?` ${this._frame()}`:e||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${n}${i}
|
|
9
|
+
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let e=this._lines(this.output);this._write(this.std,Nn.cursorLeft+Nn.cursorUp(e)+Nn.eraseDown),this.output=void 0}getFrames(e){return e?.style?xs.default[e.style].frames:xs.default[process.platform==="win32"?"line":"dots2"].frames}};rt.default=Hn});var Wn=y(ot=>{"use strict";f();Object.defineProperty(ot,"__esModule",{value:!0});ot.stringifyInput=Ss;ot.tokenize=Ms;ot.default=Oc;var yc=W(),bc=[{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 As(t,e,n){return JSON.stringify(t,vc(e,e),n)}function vc(t,e){let n=[],i=[];return e||(e=function(s,r){return n[0]===r?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(r)).join(".")+"]"}),function(s,r){if(n.length>0){let o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,Number.POSITIVE_INFINITY,s):i.push(s),n.includes(r)&&(r=e.call(this,s,r))}else n.push(r);return t?t.call(this,s,r):r}}function Ss(t,e){return e?.pretty?As(typeof t=="string"?JSON.parse(t):t,void 0,2):typeof t=="string"?t:As(t)}function Ms(t,e){let n=Ss(t,e),i=[],s=!1;do for(let r of bc){let o=r.regex.exec(n);if(o){i.push({type:r.tokenType,value:o[0]}),n=n.slice(o[0].length),s=!0;break}}while(wc(n,s));return i}function wc(t,e){return(t?.length??0)>0&&e}function Oc(t,e){let n={...e,pretty:e?.pretty??!0};return Ms(t,n).reduce((i,s)=>i+(0,yc.colorize)(e?.theme?.[s.type],s.value),"")}});var ve=y(C=>{"use strict";f();var Bt=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(C,"__esModule",{value:!0});C.ux=C.action=C.stdout=C.stderr=C.colorize=C.colorizeJson=C.warn=C.exit=C.error=void 0;var jc=Ie(),Pc=Mt(),Cc=ke(),Ec=Bt(Ds()),$c=Bt(Fs()),qc=Bt(Wn()),Dc=W(),Is=tt(),xc=Ie();Object.defineProperty(C,"error",{enumerable:!0,get:function(){return xc.error}});var Fc=Mt();Object.defineProperty(C,"exit",{enumerable:!0,get:function(){return Fc.exit}});var Ac=ke();Object.defineProperty(C,"warn",{enumerable:!0,get:function(){return Ac.warn}});var Sc=Wn();Object.defineProperty(C,"colorizeJson",{enumerable:!0,get:function(){return Bt(Sc).default}});var Mc=W();Object.defineProperty(C,"colorize",{enumerable:!0,get:function(){return Mc.colorize}});var ks=tt();Object.defineProperty(C,"stderr",{enumerable:!0,get:function(){return ks.stderr}});Object.defineProperty(C,"stdout",{enumerable:!0,get:function(){return ks.stdout}});var Ic=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple";C.action=Ic==="spinner"?new $c.default:new Ec.default;C.ux={action:C.action,colorize:Dc.colorize,colorizeJson:qc.default,error:jc.error,exit:Pc.exit,stderr:Is.stderr,stdout:Is.stdout,warn:Cc.warn}});var Wt=y(zn=>{"use strict";f();Object.defineProperty(zn,"__esModule",{value:!0});zn.ensureArgObject=kc;function kc(t){return Array.isArray(t)?(t??[]).reduce((e,n)=>({...e,[n.name]:n}),{}):t??{}}});var Ts=y(zt=>{"use strict";f();Object.defineProperty(zt,"__esModule",{value:!0});zt.DocOpts=void 0;var Tc=Wt(),Un=class t{cmd;flagList;flagMap;constructor(e){this.cmd=e,this.flagMap={},this.flagList=Object.entries(e.flags||{}).filter(([n,i])=>!i.hidden).map(([n,i])=>(this.flagMap[n]=i,i))}static formatUsageType(e,n,i){if(e.type!=="option")return"";let s;return e.helpValue?s=typeof e.helpValue=="string"?[e.helpValue]:e.helpValue:e.options?s=[i?e.options.join("|"):"<option>"]:n?s=[e.name]:s=["<value>"],s.map(r=>`${r}${e.multiple?"...":""}`).join(" ")}static generate(e){return new t(e).toString()}toString(){let e=["<%= command.id %>"];if(this.cmd.args){let n=this.cmd.strict===!1?"...":"",i=Object.values((0,Tc.ensureArgObject)(this.cmd.args)).filter(s=>!s.hidden).map(s=>s.required?`${s.name.toUpperCase()}${n}`:`[${s.name.toUpperCase()}${n}]`)||[];e.push(...i)}try{e.push(...Object.values(this.groupFlagElements()))}catch{e.push(...this.flagList.map(n=>{let i=n.char?`-${n.char}`:`--${n.name}`;return n.type==="boolean"?i:`${i}=${t.formatUsageType(n,!1,!0)}`}))}return e.join(" ")}combineElementsToFlag(e,n,i,s){if(!this.flagMap[n])return;let r=this.flagMap[n]?.required;(typeof r!="boolean"||!r)&&(r=i.reduce((o,c)=>o||this.flagMap[c]?.required||!1,!1));for(let o of i)e[n]=`${e[n]||""}${s}${e[o]||""}`,delete e[o],delete this.flagMap[o];e[n]=r?`(${e[n]||""})`:`[${e[n]||""}]`,delete this.flagMap[n]}generateElements(e={},n=[]){let i=[];for(let s of n){let r="",o=s.char?`-${s.char}`:`--${s.name}`;s.type==="option"&&(r=` ${t.formatUsageType(s,!1,!0)}`);let c=`${o}${r}`;e[s.name]=c,i.push(c)}return i}groupFlagElements(){let e={};this.generateElements(e,this.flagList.filter(n=>n.required)),this.generateElements(e,this.flagList.filter(n=>!n.required));for(let n of this.flagList){Array.isArray(n.dependsOn)&&this.combineElementsToFlag(e,n.name,n.dependsOn," ");let i;if(Array.isArray(n.exclusive)&&(i=new Set(n.exclusive)),Array.isArray(n.combinable)){let s=new Set(n.combinable);i??=new Set;for(let r of this.flagList)n!==r&&!s.has(r.name)&&i.add(r.name)}i!==void 0&&i.size>0&&this.combineElementsToFlag(e,n.name,[...i]," | ")}for(let n of Object.keys(this.flagMap)){let i=this.flagMap[n]||{};i.required||(e[i.name]=`[${e[i.name]||""}]`)}return e}};zt.DocOpts=Un});var Ne=y(L=>{"use strict";f();var Lc=L&&L.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Rc=L&&L.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Nc=L&&L.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&Lc(n,e,i[s]);return Rc(n,e),n}})();Object.defineProperty(L,"__esModule",{value:!0});L.template=zc;L.standardizeIDFromArgv=Ls;L.getHelpFlagAdditions=Kc;L.formatFlagDeprecationWarning=Jc;L.formatCommandDeprecationWarning=Yc;L.normalizeArgv=Xc;var Hc=Nc(Gi()),Bc=Te(),Wc=be();function zc(t){function e(n){return Hc.render(n,t)}return e}var Uc=t=>t.startsWith("-"),Vc=t=>t.includes("=");function Gc(t,e){if(t.length===1)return t;let i=(s=>{let r=(0,Bc.collectUsableIds)(e.commandIDs),o=[],c=p=>r.has(p),l=p=>(p?[...o,p]:o).filter(Boolean).join(":"),u=()=>{let p=l();if(!p)return!1;let a=e.findCommand(p);return!!(a&&(a.strict===!1||Object.keys(a.args??{}).length>0))};for(let p of s)if(c(l(p)))o.push(p);else{if(Vc(p)||Uc(p)||u())break;o.push(p)}return l()})(t);if(i){let s=t.slice(i.split(":").length);return[i,...s]}return t}function Ls(t,e){return t.length===0||(e.topicSeparator===" "?t=Gc(t,e):e.topicSeparator!==":"&&(t[0]=(0,Wc.toStandardizedId)(t[0],e))),t}function Kc(t){let e=["--help"],n=t.pjson.oclif.additionalHelpFlags??[];return[...new Set([...n,...e]).values()]}function Jc(t,e){let n=`The "${t}" flag has been deprecated`;return e===!0?`${n}.`:e.message?e.message:(e.version&&(n+=` and will be removed in version ${e.version}`),n+=e.to?`. Use "${e.to}" instead.`:".",n)}function Yc(t,e){let n=`The "${t}" command has been deprecated`;return e?e.message?e.message:(e.version&&(n+=` and will be removed in version ${e.version}`),n+=e.to?`. Use "${e.to}" instead.`:".",n):`${n}.`}function Xc(t,e=process.argv.slice(2)){return t.topicSeparator!==":"&&!e[0]?.includes(":")&&(e=Ls(e,t)),e}});var lt=y(He=>{"use strict";f();var ct=He&&He.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(He,"__esModule",{value:!0});He.HelpFormatter=void 0;var at=ct(qe()),Zc=ct(ln()),Qc=ct(ao()),el=ct(po()),tl=ct(un()),nl=Ae(),Vn=W(),il=Ne(),Gn=class{config;indentSpacing=2;opts;render;constructor(e,n={}){this.config=e,this.opts={maxWidth:nl.stdtermwidth,...n},this.render=(0,il.template)(this)}indent(e,n=this.indentSpacing){return(0,Zc.default)(e,n)}renderList(e,n){if(e.length===0)return"";let i=()=>{let l="";for(let[u,p]of e)!u&&!p||(u&&(n.stripAnsi&&(u=at.default.strip(u)),l+=this.wrap(u.trim(),n.indentation)),p&&(n.stripAnsi&&(p=at.default.strip(p)),l+=`
|
|
10
|
+
`,l+=this.indent(this.wrap(p.trim(),n.indentation+2),4)),l+=`
|
|
11
|
+
|
|
12
|
+
`);return l.trim()};if(n.multiline)return i();let s=(0,el.default)(e.map(l=>l[0]).join(`
|
|
13
|
+
`)),r="",o=n.spacer||`
|
|
14
|
+
`,c="";for(let[l,u]of e){let p=u;if(c&&(r+=o,r+=c),c=l||"",n.stripAnsi&&(c=at.default.strip(c)),!p){c=c.trim();continue}n.stripAnsi&&(p=at.default.strip(p)),p=this.wrap(p.trim(),n.indentation+s+2);let[a,...d]=p.split(`
|
|
15
|
+
`).map(m=>m.trim());if(c+=" ".repeat(s-(0,Qc.default)(c)+2),c+=a,d.length!==0){if(d.length>4)return i();n.spacer||(o=`
|
|
16
|
+
`),c+=`
|
|
17
|
+
`,c+=this.indent(d.join(`
|
|
18
|
+
`),s+2)}}return c&&(r+=o,r+=c),r.trim()}section(e,n){let i;if(typeof n=="string")i=this.render(n);else if(Array.isArray(n))i=n.map(r=>{if("name"in r){let l=r;return[this.render(l.name),this.render(l.description)]}let[o,c]=r;return[this.render(o),c&&this.render(c)]});else{if("header"in n)return this.section(n.header,n.body);i=n.map(r=>[r.name,r.description]).map(([r,o])=>[this.render(r),o&&this.render(o)])}let s=[(0,Vn.colorize)(this.config?.theme?.sectionHeader,(0,Vn.colorize)("bold",e)),(0,Vn.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
|
|
19
|
+
`);return this.opts.stripAnsi?at.default.strip(s):s}wrap(e,n=this.indentSpacing){return(0,tl.default)(this.render(e),this.opts.maxWidth-n,{hard:!0})}};He.HelpFormatter=Gn});var Kn=y(we=>{"use strict";f();var sl=we&&we.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(we,"__esModule",{value:!0});we.CommandHelp=void 0;var rl=sl(qe()),ol=Wt(),Rs=be(),Be=$(),q=W(),Ns=Ts(),al=lt(),We=/\r\n|\n/;function cl(t){return t==="alphabetical"?"alphabetical":t==="none"?"none":"alphabetical"}var Ut=class extends al.HelpFormatter{command;config;opts;constructor(e,n,i){super(n,i),this.command=e,this.config=n,this.opts=i}aliases(e){return!e||e.length===0?void 0:e.map(i=>[(0,q.colorize)(this.config?.theme?.dollarSign,"$"),(0,q.colorize)(this.config?.theme?.bin,this.config.bin),(0,q.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
|
|
20
|
+
`)}arg(e){let n=e.name.toUpperCase();return e.required?`${n}`:`[${n}]`}args(e){if(e.filter(n=>n.description).length!==0)return e.map(n=>{let i=this.command.strict===!1?`${n.name.toUpperCase()}...`:n.name.toUpperCase();i=n.required?`${i}`:`[${i}]`;let s=n.description||"";return n.default&&(s=`${(0,q.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${n.default}]`)} ${s}`),n.options&&(s=`${(0,q.colorize)(this.config?.theme?.flagOptions,`(${n.options.join("|")})`)} ${s}`),[(0,q.colorize)(this.config?.theme?.flag,i),s?(0,q.colorize)(this.config?.theme?.sectionDescription,s):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?Ns.DocOpts.generate(this.command):(0,Be.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,n;if(this.opts.hideCommandSummaryInDescription)n=[(e.description||"").split(We).at(-1)??""];else if(e.description){let i=e.summary?`${e.summary}
|
|
21
|
+
`:null;n=i?[...i.split(We),...(e.description||"").split(We)]:(e.description||"").split(We)}if(n)return this.wrap(n.join(`
|
|
22
|
+
`))}examples(e){return!e||e.length===0?void 0:(0,Be.castArray)(e).map(i=>{let s,r;if(typeof i=="string"){let u=i.split(We).filter(Boolean);if(u.length>=2&&!this.isCommand(u[0])&&u.slice(1).every(p=>this.isCommand(p)))s=u[0],r=u.slice(1);else return u.map(p=>this.formatIfCommand(p)).join(`
|
|
23
|
+
`)}else s=i.description,r=[i.command];let o=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",c=this.indentSpacing*2,l=r.map(u=>this.indent(this.wrap(this.formatIfCommand(u),c+4)).split(We).join(` ${o}
|
|
24
|
+
`)).join(`
|
|
25
|
+
`);return`${this.wrap(s,c)}
|
|
26
|
+
|
|
27
|
+
${l}`}).join(`
|
|
28
|
+
|
|
29
|
+
`)}flagHelpLabel(e,n=!1){let i=e.helpLabel;if(!i){let s=[];s.push(e.char?`-${e.char[0]}`:" "),e.name&&(e.type==="boolean"&&e.allowNo?s.push(`--[no-]${e.name.trim()}`):s.push(`--${e.name.trim()}`)),i=s.join(e.char?(0,q.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(e.type==="option"){let s=Ns.DocOpts.formatUsageType(e,this.opts.showFlagNameInTitle??!1,this.opts.showFlagOptionsInTitle??n);s.includes("|")||(s=(0,q.colorize)("underline",s)),i+=`=${s}`}return(0,q.colorize)(this.config.theme?.flag,i)}flags(e){if(e.length===0)return;let n=e.reduce((i,s)=>i&&s.char===void 0,!0);return e.map(i=>{let s=this.flagHelpLabel(i);n&&(s=s.replace(" ",""));let r=i.summary||i.description||"",o=[],c=!(this.opts.respectNoCacheDefault===!0&&i.noCacheDefault===!0);return i.type==="option"?(i.default&&c&&o.push(`default: ${i.default}`),i.env&&o.push(`env: ${i.env}`)):i.type==="boolean"&&i.env&&o.push(`env: ${i.env}`),o.length>0&&(r=`${(0,q.colorize)(this.config?.theme?.flagDefaultValue,`[${o.join(", ")}]`)} ${r}`),i.required&&(r=`${(0,q.colorize)(this.config?.theme?.flagRequired,"(required)")} ${r}`),i.type==="option"&&i.options&&!i.helpValue&&!this.opts.showFlagOptionsInTitle&&(r+=(0,q.colorize)(this.config?.theme?.flagOptions,`
|
|
30
|
+
<options: ${i.options.join("|")}>`)),[s,(0,q.colorize)(this.config?.theme?.sectionDescription,r.trim())]})}flagsDescriptions(e){let n=e.filter(s=>s.summary&&s.description);return n.length===0?void 0:n.map(s=>{let r=s.summary||"",o=this.flagHelpLabel(s,!0);return s.char||(o=o.replace(" ","")),o+=o.length+r.length+2<this.opts.maxWidth?" "+r:`
|
|
31
|
+
|
|
32
|
+
`+this.indent(this.wrap(r,this.indentSpacing*2)),`${o}
|
|
33
|
+
|
|
34
|
+
${this.indent(this.wrap(s.description||"",this.indentSpacing*2))}`}).join(`
|
|
35
|
+
|
|
36
|
+
`)}generate(){let e=this.command,n=Object.entries(e.flags||{}).filter(([,o])=>!o.hidden).map(([o,c])=>(c.name=o,c)),i=cl(this.opts.flagSortOrder)==="alphabetical"?(0,Be.sortBy)(n,o=>[!o.char,o.char,o.name]):n,s=Object.values((0,ol.ensureArgObject)(e.args)).filter(o=>!o.hidden);return(0,Be.compact)(this.sections().map(({generate:o,header:c})=>{let l=o({args:s,cmd:e,flags:i},c);return Array.isArray(l)?l.map(u=>u&&u.body&&this.section(u.header,u.body)).join(`
|
|
37
|
+
|
|
38
|
+
`):l&&this.section(c,l)})).join(`
|
|
39
|
+
|
|
40
|
+
`)}groupFlags(e){let n=[],i={};for(let s of e){let r=s.helpGroup;r?(i[r]||(i[r]=[]),i[r].push(s)):n.push(s)}return{flagGroups:i,mainFlags:n}}sections(){let e=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},s)=>[{body:this.args(i),header:s}],header:"ARGUMENTS"},{generate:({flags:i},s)=>{let{flagGroups:r,mainFlags:o}=this.groupFlags(i),c=[],l=this.flags(o);l&&c.push({body:l,header:s});for(let[u,p]of Object.entries(r)){let a=this.flags(p);a&&c.push({body:a,header:`${u.toUpperCase()} ${s}`})}return(0,Be.compact)(c)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let s=i.examples||i.example;return this.examples(s)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],n=this.opts.sections?.map(i=>i.toLowerCase());return e.filter(({header:i})=>!n||n.includes(i.toLowerCase()))}usage(){let{id:e,usage:n}=this.command,i=(0,Rs.toStandardizedId)(e,this.config),s=(0,Rs.toConfiguredId)(e,this.config);return(n?(0,Be.castArray)(n):[this.defaultUsage()]).map(o=>{let c=this.opts.maxWidth-this.indentSpacing,l=(0,q.colorize)(this.config?.theme?.dollarSign,"$"),u=(0,q.colorize)(this.config?.theme?.bin,this.config.bin),p=(0,q.colorize)(this.config?.theme?.command,"<%= command.id %>"),a=(0,q.colorize)(this.config?.theme?.sectionDescription,o.replace("<%= command.id %>","").replace(new RegExp(`^${i}`),"").replace(new RegExp(`^${s}`),"").trim()),d=`${l} ${u} ${p} ${a}`.trim();if(d.length>c){let m=d.slice(0,Math.max(0,c)).lastIndexOf(" ");return d.slice(0,Math.max(0,m))+`
|
|
41
|
+
`+this.indent(this.wrap(d.slice(Math.max(0,m)),this.indentSpacing*2))}return this.wrap(d)}).join(`
|
|
42
|
+
`)}formatIfCommand(e){e=this.render(e);let n=(0,q.colorize)(this.config?.theme?.dollarSign,"$");return e.startsWith(this.config.bin)?`${n} ${e}`:e.startsWith(`$ ${this.config.bin}`)?`${n}${e.replace("$","")}`:e}isCommand(e){return rl.default.strip(this.formatIfCommand(e)).startsWith(`${(0,q.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};we.CommandHelp=Ut;we.default=Ut});var Hs=y(ut=>{"use strict";f();var ll=ut&&ut.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ut,"__esModule",{value:!0});var ul=ll(qe()),dl=$(),ze=W(),fl=lt(),Jn=class extends fl.HelpFormatter{config;opts;constructor(e,n){super(e,n),this.config=e,this.opts=n}description(){let e=this.config.pjson.oclif.description||this.config.pjson.description||"";if(e=this.render(e),e=e.split(`
|
|
43
|
+
`).slice(1).join(`
|
|
44
|
+
`),!!e)return this.section("DESCRIPTION",this.wrap((0,ze.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(`
|
|
45
|
+
`)[0];let n=(0,dl.compact)([(0,ze.colorize)(this.config?.theme?.commandSummary,e),this.version(),this.usage(),this.description()]).join(`
|
|
46
|
+
|
|
47
|
+
`);return this.opts.stripAnsi&&(n=ul.default.strip(n)),n}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,ze.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ze.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,ze.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,ze.colorize)(this.config?.theme?.version,this.config.userAgent)))}};ut.default=Jn});var pt=y(D=>{"use strict";f();var Vs=D&&D.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(D,"__esModule",{value:!0});D.Help=D.HelpBase=D.standardizeIDFromArgv=D.normalizeArgv=D.getHelpFlagAdditions=D.HelpFormatter=D.CommandHelp=void 0;D.loadHelpClass=Pl;var Bs=Vs(qe()),pl=Le(),hl=Ie(),ml=st(),Ws=Lt(),gl=In(),Yn=be(),dt=$(),zs=ve(),Q=W(),_l=Kn(),yl=lt(),bl=Vs(Hs()),ft=Ne(),vl=Kn();Object.defineProperty(D,"CommandHelp",{enumerable:!0,get:function(){return vl.CommandHelp}});var wl=lt();Object.defineProperty(D,"HelpFormatter",{enumerable:!0,get:function(){return wl.HelpFormatter}});var Xn=Ne();Object.defineProperty(D,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Xn.getHelpFlagAdditions}});Object.defineProperty(D,"normalizeArgv",{enumerable:!0,get:function(){return Xn.normalizeArgv}});Object.defineProperty(D,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Xn.standardizeIDFromArgv}});function Ol(t,e){let n=(0,ft.getHelpFlagAdditions)(e);for(let i of t){if(i==="--")return;if(!(n.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Vt=class extends yl.HelpFormatter{constructor(e,n={}){super(e,n),e.topicSeparator||(e.topicSeparator=":")}};D.HelpBase=Vt;var Gt=class extends Vt{CommandHelpClass=_l.CommandHelp;constructor(e,n={}){super(e,n)}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(n=>this.opts.all||!n.hidden),e=(0,dt.sortBy)(e,n=>n.id),e=(0,dt.uniqBy)(e,n=>n.id),e}get sortedTopics(){let e=this._topics;return e=e.filter(n=>this.opts.all||!n.hidden),e=(0,dt.sortBy)(e,n=>n.name),e=(0,dt.uniqBy)(e,n=>n.name),e}command(e){return this.formatCommand(e)}description(e){let n=this.render(e.description||"");return e.summary?n:n.split(`
|
|
48
|
+
`).slice(1).join(`
|
|
49
|
+
`)}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 n=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 s=this.summary(i);return[(0,Q.colorize)(this.config?.theme?.command,i.id),s&&(0,Q.colorize)(this.config?.theme?.sectionDescription,Bs.default.strip(s))]}),{indentation:2,spacer:`
|
|
50
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",n)}formatRoot(){return new bl.default(this.config,this.opts).root()}formatTopic(e){let n=this.render(e.description||""),i=n.split(`
|
|
51
|
+
`)[0];n=n.split(`
|
|
52
|
+
`).slice(1).join(`
|
|
53
|
+
`);let s=`${e.name}:COMMAND`;this.config.topicSeparator!==":"&&(s=s.replaceAll(":",this.config.topicSeparator));let r=(0,dt.compact)([(0,Q.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,Q.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,Q.colorize)(this.config?.theme?.bin,this.config.bin)} ${s}`),n&&this.section("DESCRIPTION",this.wrap((0,Q.colorize)(this.config?.theme?.sectionDescription,n)))]).join(`
|
|
54
|
+
|
|
55
|
+
`);return this.opts.stripAnsi&&(r=Bs.default.strip(r)),r+`
|
|
56
|
+
`}formatTopics(e){if(e.length===0)return"";let n=this.renderList(e.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,Q.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,Q.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
|
|
57
|
+
`)[0]))])),{indentation:2,spacer:`
|
|
58
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",n)}getCommandHelpClass(e){return new this.CommandHelpClass(e,this.config,this.opts)}log(...e){return this.opts.sendToStderr?zs.ux.stderr(e):zs.ux.stdout(e)}async showCommandHelp(e){let n=e.id,i=n.split(":").length,s=this.sortedTopics.filter(u=>u.name.startsWith(n+":")&&u.name.split(":").length===i+1),r=this.sortedCommands.filter(u=>u.id.startsWith(n+":")&&u.id.split(":").length===i+1),o=this.config.plugins.get(e.pluginName),c=this.config.pjson?.oclif?.state||o?.pjson?.oclif?.state||e.state;if(c&&this.log(c==="deprecated"?`${(0,ft.formatCommandDeprecationWarning)((0,Yn.toConfiguredId)(n,this.config),e.deprecationOptions)}
|
|
59
|
+
`:`This command is in ${c}.
|
|
60
|
+
`),e.deprecateAliases&&e.aliases.includes(n)){let u=this.config.commands.find(d=>d.aliases.includes(n)),p=u?(0,Yn.toConfiguredId)(u.id,this.config):"",a={...e.deprecationOptions,...u?{to:p}:{}};this.log(`${(0,ft.formatCommandDeprecationWarning)((0,Yn.toConfiguredId)(n,this.config),a)}
|
|
61
|
+
`)}let l=this.summary(e);if(l&&this.log(l+`
|
|
62
|
+
`),this.log(this.formatCommand(e)),this.log(""),s.length>0&&(this.log(this.formatTopics(s)),this.log("")),r.length>0){let u=[],p=r.filter(a=>(u.push(...a.aliases),!u.includes(a.id)));this.log(this.formatCommands(p)),this.log("")}}async showHelp(e){let n=e.slice(1);e=e.filter(o=>!(0,ft.getHelpFlagAdditions)(this.config).includes(o)),this.config.topicSeparator!==":"&&(e=(0,ft.standardizeIDFromArgv)(e,this.config));let i=Ol(e,this.config);if(!i){if(this.config.isSingleCommandCLI){let o=this.config.findCommand(Ws.SINGLE_COMMAND_CLI_SYMBOL);if(o){o.id="",await this.showCommandHelp(o);return}}await this.showRootHelp();return}let s=this.config.findCommand(i);if(s){if(s.id===Ws.SINGLE_COMMAND_CLI_SYMBOL&&(s.id=""),s.hasDynamicHelp&&s.pluginType!=="jit"){let o=await s.load();for(let[c,l]of Object.entries(o.flags??{}))l.type!=="boolean"&&(s.flags[c].default=await(0,gl.cacheDefaultValue)(l,!1));await this.showCommandHelp(s)}else await this.showCommandHelp(s);return}let r=this.config.findTopic(i);if(r){await this.showTopicHelp(r);return}if(this.config.flexibleTaxonomy){let o=this.config.findMatches(i,n);if(o.length>0&&(await this.config.runHook("command_incomplete",{argv:n.filter(l=>!i.split(":").includes(l)),id:i,matches:o})).successes.length>0)return}(0,hl.error)(`Command ${i} not found.`)}async showRootHelp(){let e=this.sortedTopics,n=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
|
|
63
|
+
`),this.log(this.formatRoot()),this.log(""),this.opts.all||(e=e.filter(s=>!s.name.includes(":")),n=n.filter(s=>!s.id.includes(":"))),e.length>0&&(this.log(this.formatTopics(e)),this.log("")),n.length>0&&(n=n.filter(s=>s.id),this.log(this.formatCommands(n)),this.log(""))}async showTopicHelp(e){let{name:n}=e,i=n.split(":").length,s=this.sortedTopics.filter(c=>c.name.startsWith(n+":")&&c.name.split(":").length===i+1),r=this.sortedCommands.filter(c=>c.id.startsWith(n+":")&&c.id.split(":").length===i+1),o=this.config.pjson?.oclif?.state;o&&this.log(`This topic is in ${o}.
|
|
64
|
+
`),this.log(this.formatTopic(e)),s.length>0&&(this.log(this.formatTopics(s)),this.log("")),r.length>0&&(this.log(this.formatCommands(r)),this.log(""))}summary(e){if(!(this.opts.sections&&!this.opts.sections.map(n=>n.toLowerCase()).includes("summary")))return e.summary?(0,Q.colorize)(this.config?.theme?.commandSummary,this.render(e.summary.split(`
|
|
65
|
+
`)[0])):e.description&&(0,Q.colorize)(this.config?.theme?.commandSummary,this.render(e.description).split(`
|
|
66
|
+
`)[0])}};D.Help=Gt;function Us(t){return t&&t.default?t.default:t}function jl(t){return typeof t=="string"?{identifier:"default",target:t}:t.identifier?t:{...t,identifier:"default"}}async function Pl(t){if(t.pjson.oclif?.helpClass){let{identifier:e,target:n}=jl(t.pjson.oclif?.helpClass);try{let i=await(0,pl.tsPath)(t.root,n)??n,s=await(0,ml.load)(t,i),r=s[e]??(e==="default"?Us(s):void 0);return Us(r)}catch(i){throw new Error(`Unable to load configured help class "${n}", failed with message:
|
|
67
|
+
${i.message}`)}}return Gt}});var Kt=y(ee=>{"use strict";f();var Zn=ee&&ee.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ee,"__esModule",{value:!0});ee.Exit=void 0;ee.handle=Al;var Cl=Zn(Ki()),El=Zn(G()),$l=pt(),ql=k(),Dl=ge(),xl=At(),Fl=Zn(xt());ee.Exit={exit(t=0){process.exit(t)}};async function Al(t){try{t||(t=new Dl.CLIError("no error?")),t.message==="SIGINT"&&ee.Exit.exit(1);let e=!(t instanceof xl.ExitError)&&!t.skipOclifErrorHandling,n=(0,Fl.default)(t),i=(0,Cl.default)(t.stack||"",{pretty:!0});if(e){console.error(n??i);let r=El.default.getInstance().get("config");if(t.showHelp&&t.parse?.input?.argv&&r){let o={...r.pjson.oclif.helpOptions??r.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new $l.Help(r,o);console.error(),await c.showHelp(process.argv.slice(2))}}let s=t.oclif?.exit??1;t.code!=="EEXIT"&&i&&(0,ql.getLogger)().error(i),ee.Exit.exit(s)}catch(e){console.error(t.stack),console.error(e.stack),ee.Exit.exit(1)}}});var oe=y(A=>{"use strict";f();Object.defineProperty(A,"__esModule",{value:!0});A.warn=A.handle=A.exit=A.ModuleLoadError=A.ExitError=A.CLIError=A.error=void 0;var Sl=Ie();Object.defineProperty(A,"error",{enumerable:!0,get:function(){return Sl.error}});var Ml=ge();Object.defineProperty(A,"CLIError",{enumerable:!0,get:function(){return Ml.CLIError}});var Il=At();Object.defineProperty(A,"ExitError",{enumerable:!0,get:function(){return Il.ExitError}});var kl=Pn();Object.defineProperty(A,"ModuleLoadError",{enumerable:!0,get:function(){return kl.ModuleLoadError}});var Tl=Mt();Object.defineProperty(A,"exit",{enumerable:!0,get:function(){return Tl.exit}});var Ll=Kt();Object.defineProperty(A,"handle",{enumerable:!0,get:function(){return Ll.handle}});var Rl=ke();Object.defineProperty(A,"warn",{enumerable:!0,get:function(){return Rl.warn}})});var Ue=y(I=>{"use strict";f();Object.defineProperty(I,"__esModule",{value:!0});I.Performance=I.OCLIF_MARKER_OWNER=void 0;var ht=v("node:perf_hooks"),Gs=k(),Nl=re();I.OCLIF_MARKER_OWNER="@oclif/core";var Qn=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(e,n,i={}){this.owner=e,this.name=n,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[s,r]=n.split("#"),[o,c]=s.split(".");this.module=o,this.method=c,this.scope=r,ht.performance.mark(this.startMarker)}addDetails(e){this.details={...this.details,...e}}measure(){ht.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,ht.performance.mark(this.stopMarker)}},ei=class t{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!t.enabled||t._results.size>0)return;let e=[...t.markers.values()];if(e.length!==0){for(let n of e.filter(i=>!i.stopped))n.stop();return new Promise(n=>{new ht.PerformanceObserver(s=>{for(let a of s.getEntries()){let d=t.markers.get(a.name);if(d){let m={details:d.details,duration:a.duration,method:d.method,module:d.module,name:a.name,scope:d.scope},h=t._results.get(d.owner)??[];t._results.set(d.owner,[...h,m])}}let r=t._results.get(I.OCLIF_MARKER_OWNER)??[],o=r.find(a=>a.name.startsWith("config.runCommand")),c=o?t.getResult(I.OCLIF_MARKER_OWNER,`plugin.findCommand#${o.details.plugin}.${o.details.command}`)?.duration??0:0,l=Object.fromEntries(r.filter(({name:a})=>a.startsWith("plugin.load#")).sort((a,d)=>d.duration-a.duration).map(({details:a,duration:d,scope:m})=>[m,{details:a,duration:d}])),u=r.filter(({name:a})=>a.startsWith("config.runHook#")).reduce((a,d)=>{let m=d.details.event;if(m)a[m]||(a[m]={}),a[m][d.scope]=d.duration;else{let h=d.scope;a[h]||(a[h]={}),a[h].total=d.duration}return a},{}),p=Object.fromEntries(r.filter(({name:a})=>a.startsWith("config.loadPlugins#")).sort((a,d)=>d.duration-a.duration).map(({duration:a,scope:d})=>[d,a]));t._oclifPerf={hookRunTimes:u,"oclif.commandLoadMs":c,"oclif.commandRunMs":r.find(({name:a})=>a.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":t.getResult(I.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":p.core??0,"oclif.initHookMs":u.init?.total??0,"oclif.initMs":t.getResult(I.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":p.link??0,"oclif.postrunHookMs":u.postrun?.total??0,"oclif.prerunHookMs":u.prerun?.total??0,"oclif.runMs":t.getResult(I.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":p.user??0,pluginLoadTimes:l},n()}).observe({buffered:!0,entryTypes:["measure"]});for(let s of e)try{s.measure()}catch{}ht.performance.clearMarks()})}}static debug(){if(!t.enabled)return;let e=(0,Gs.makeDebug)("perf"),n=(process.uptime()*1e3).toFixed(4);e("Process Uptime: %sms",n),e("Oclif Time: %sms",t.oclifPerf["oclif.runMs"].toFixed(4)),e("Init Time: %sms",t.oclifPerf["oclif.initMs"].toFixed(4)),e("Config Load Time: %sms",t.oclifPerf["oclif.configLoadMs"].toFixed(4)),e(" \u2022 Root Plugin Load Time: %sms",t.getResult(I.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),e(" \u2022 Plugins Load Time: %sms",t.getResult(I.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),e(" \u2022 Commands Load Time: %sms",t.getResult(I.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),e("Core Plugin Load Time: %sms",t.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),e("User Plugin Load Time: %sms",t.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),e("Linked Plugin Load Time: %sms",t.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),e("Plugin Load Times:");for(let[r,o]of Object.entries(t.oclifPerf.pluginLoadTimes))o.details.hasManifest?e(` ${r}: ${o.duration.toFixed(4)}ms`):e(` ${r}: ${o.duration.toFixed(4)}ms (no manifest!)`);e("Hook Run Times:");for(let[r,o]of Object.entries(t.oclifPerf.hookRunTimes)){e(` ${r}:`);for(let[c,l]of Object.entries(o))e(` ${c}: ${l.toFixed(4)}ms`)}e("Command Load Time: %sms",t.oclifPerf["oclif.commandLoadMs"].toFixed(4)),e("Command Run Time: %sms",t.oclifPerf["oclif.commandRunMs"].toFixed(4)),t.oclifPerf["oclif.configLoadMs"]>t.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,Gs.makeDebug)("non-oclif-perf"),s=t.results;if(s.size>0){i("Non-Core Performance Measurements:");for(let[r,o]of s){i(` ${r}:`);for(let c of o)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static getResult(e,n){return t._results.get(e)?.find(i=>i.name===n)}static mark(e,n,i={}){if(!t.enabled)return;let s=new Qn(e,n,i);return t.markers.set(s.name,s),s}static get enabled(){return Nl.settings.performanceEnabled??!1}static get oclifPerf(){if(!t.enabled)return{};if(t._oclifPerf)return t._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return t.enabled?new Map([...t._results.entries()].filter(([e])=>e!==I.OCLIF_MARKER_OWNER)):new Map}};I.Performance=ei});var Ks=y(ti=>{"use strict";f();Object.defineProperty(ti,"__esModule",{value:!0});ti.determinePriority=Hl;function Hl(t,e){return e.sort((i,s)=>{let r=i.pluginAlias??"A-Cannot-Find-This",o=s.pluginAlias??"B-Cannot-Find-This",c=t.indexOf(r),l=t.indexOf(o);return i.pluginType==="core"&&s.pluginType==="core"?c-l:s.pluginType==="core"&&i.pluginType!=="core"?1:i.pluginType==="core"&&s.pluginType!=="core"?-1:i.pluginType==="jit"&&s.pluginType!=="jit"?1:s.pluginType==="jit"&&i.pluginType!=="jit"?-1:0})[0]}});var Ys=y(Jt=>{"use strict";f();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getHomeDir=Bl;Jt.getPlatform=Wl;var Js=v("node:os");function Bl(){return(0,Js.homedir)()}function Wl(){return(0,Js.platform)()}});var cr=y(je=>{f();Object.defineProperty(je,Symbol.toStringTag,{value:"Module"});var zl=Object.create,Zs=Object.defineProperty,Ul=Object.getOwnPropertyDescriptor,Vl=Object.getOwnPropertyNames,Gl=Object.getPrototypeOf,Kl=Object.prototype.hasOwnProperty,Jl=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var s=Vl(e),r=0,o=s.length,c;r<o;r++)c=s[r],!Kl.call(t,c)&&c!==n&&Zs(t,c,{get:(l=>e[l]).bind(null,c),enumerable:!(i=Ul(e,c))||i.enumerable});return t},Yl=(t,e,n)=>(n=t!=null?zl(Gl(t)):{},Jl(e||!t||!t.__esModule?Zs(n,"default",{value:t,enumerable:!0}):n,t)),Ve=v("fs"),ae=v("path"),Xl=v("url"),Zl=go(),Oe=mo();Oe=Yl(Oe);var Ql=Array.isArray,Qs=/\\/g,ii=process.platform==="win32",eu=/^(\/?\.\.)+$/;function tu(t,e={}){let n=t.length,i=Array(n),s=Array(n),r,o;for(r=0;r<n;r++){let c=er(t[r]);i[r]=c;let l=c.length,u=Array(l);for(o=0;o<l;o++)u[o]=(0,Oe.default)(c[o],e);s[r]=u}return c=>{let l=c.split("/");if(l[0]===".."&&eu.test(c))return!0;for(r=0;r<n;r++){let u=i[r],p=s[r],a=l.length,d=Math.min(a,u.length);for(o=0;o<d;){let m=u[o];if(m.includes("/"))return!0;if(!p[o](l[o]))break;if(!e.noglobstar&&m==="**")return!0;o++}if(o===a)return!0}return!1}}var nu=/^[A-Z]:\/$/i,iu=ii?t=>nu.test(t):t=>t==="/";function Xs(t,e,n){if(t===e||e.startsWith(`${t}/`)){if(n){let s=t.length+ +!iu(t);return(r,o)=>r.slice(s,o?-1:void 0)||"."}let i=e.slice(t.length+1);return i?(s,r)=>{if(s===".")return i;let o=`${i}/${s}`;return r?o.slice(0,-1):o}:(s,r)=>r&&s!=="."?s.slice(0,-1):s}return n?i=>ae.posix.relative(t,i)||".":i=>ae.posix.relative(t,`${e}/${i}`)||"."}function su(t,e){if(e.startsWith(`${t}/`)){let n=e.slice(t.length+1);return i=>`${n}/${i}`}return n=>{let i=ae.posix.relative(t,`${e}/${n}`);return n[n.length-1]==="/"&&i!==""?`${i}/`:i||"."}}var ru={parts:!0};function er(t){var e;let n=Oe.default.scan(t,ru);return!((e=n.parts)===null||e===void 0)&&e.length?n.parts:[t]}var ou=/\\(?![()[\]{}!+@])/g;function au(t){return tr(t)}function cu(t){return nr(t).replace(ou,"/")}var lu=ii?cu:au,uu=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,du=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,tr=t=>t.replace(uu,"\\$&"),nr=t=>t.replace(du,"\\$&"),ir=ii?nr:tr;function sr(t,e){if(e?.caseSensitiveMatch===!1)return!0;let n=Oe.default.scan(t);return n.isGlob||n.negated}function mt(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function rr(t){return typeof t=="string"?[t]:t??[]}var fu=/^(\/?\.\.)+/,pu=/\\(?=[()[\]{}!*+?@|])/g;function ni(t,e,n,i){var s;let r=e.cwd,o=t;t[t.length-1]==="/"&&(o=t.slice(0,-1)),o[o.length-1]!=="*"&&e.expandDirectories&&(o+="/**");let c=ir(r);o=(0,ae.isAbsolute)(o.replace(pu,""))?ae.posix.relative(c,o):ae.posix.normalize(o);let l=(s=fu.exec(o))===null||s===void 0?void 0:s[0],u=er(o);if(l){let a=(l.length+1)/3,d=0,m=c.split("/");for(;d<a&&u[d+a]===m[m.length+d-a];)o=o.slice(0,(a-d-1)*3)+o.slice((a-d)*3+u[d+a].length+1)||".",d++;let h=ae.posix.join(r,l.slice(d*3));h[0]!=="."&&n.root.length>h.length&&(n.root=h,n.depthOffset=-a+d)}if(!i&&n.depthOffset>=0){var p;(p=n.commonPath)!==null&&p!==void 0||(n.commonPath=u);let a=[],d=Math.min(n.commonPath.length,u.length);for(let m=0;m<d;m++){let h=u[m];if(h==="**"&&!u[m+1]){a.pop();break}if(m===u.length-1||h!==n.commonPath[m]||sr(h))break;a.push(h)}n.depthOffset=a.length,n.commonPath=a,n.root=a.length>0?ae.posix.join(r,...a):r}return o}function hu(t,e,n){let i=[],s=[];for(let r of t.ignore)r&&(r[0]!=="!"||r[1]==="(")&&s.push(ni(r,t,n,!0));for(let r of e)r&&(r[0]!=="!"||r[1]==="("?i.push(ni(r,t,n,!1)):(r[1]!=="!"||r[2]==="(")&&s.push(ni(r.slice(1),t,n,!0)));return{match:i,ignore:s}}function mu(t,e){let n=t.cwd,i={root:n,depthOffset:0},s=hu(t,e,i);t.debug&&mt("internal processing patterns:",s);let{absolute:r,caseSensitiveMatch:o,debug:c,dot:l,followSymbolicLinks:u,onlyDirectories:p}=t,a=i.root.replace(Qs,""),d={dot:l,nobrace:t.braceExpansion===!1,nocase:!o,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},m=(0,Oe.default)(s.match,d),h=(0,Oe.default)(s.ignore,d),g=tu(s.match,d),b=Xs(n,a,r),_=r?b:Xs(n,a,!0),O=(V,ce)=>{let B=_(ce,!0);return B!=="."&&!g(B)||h(B)},j;t.deep!==void 0&&(j=Math.round(t.deep-i.depthOffset));let H=new Zl.fdir({filters:[c?(V,ce)=>{let B=b(V,ce),Vi=m(B)&&!h(B);return Vi&&mt(`matched ${B}`),Vi}:(V,ce)=>{let B=b(V,ce);return m(B)&&!h(B)}],exclude:c?(V,ce)=>{let B=O(V,ce);return mt(`${B?"skipped":"crawling"} ${ce}`),B}:O,fs:t.fs,pathSeparator:"/",relativePaths:!r,resolvePaths:r,includeBasePath:r,resolveSymlinks:u,excludeSymlinks:!u,excludeFiles:p,includeDirs:p||!t.onlyFiles,maxDepth:j,signal:t.signal}).crawl(a);return t.debug&&mt("internal properties:",{...i,root:a}),[H,n!==a&&!r&&su(n,a)]}function or(t,e){if(e)for(let n=t.length-1;n>=0;n--)t[n]=e(t[n]);return t}var gu={caseSensitiveMatch:!0,cwd:process.cwd(),debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function _u(t){let e={...gu,...t};return e.cwd=(e.cwd instanceof URL?(0,Xl.fileURLToPath)(e.cwd):(0,ae.resolve)(e.cwd)).replace(Qs,"/"),e.ignore=rr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Ve.readdir,readdirSync:e.fs.readdirSync||Ve.readdirSync,realpath:e.fs.realpath||Ve.realpath,realpathSync:e.fs.realpathSync||Ve.realpathSync,stat:e.fs.stat||Ve.stat,statSync:e.fs.statSync||Ve.statSync}),e.debug&&mt("globbing with options:",e),e}function ar(t,e={}){var n;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");let i=Ql(t)||typeof t=="string",s=rr((n=i?t:t.patterns)!==null&&n!==void 0?n:"**/*"),r=_u(i?e:t);return s.length>0?mu(r,s):[]}async function yu(t,e){let[n,i]=ar(t,e);return n?or(await n.withPromise(),i):[]}function bu(t,e){let[n,i]=ar(t,e);return n?or(n.sync(),i):[]}je.convertPathToPattern=lu;je.escapePath=ir;je.glob=yu;je.globSync=bu;je.isDynamicPattern=sr});var ri=y(x=>{"use strict";f();Object.defineProperty(x,"__esModule",{value:!0});x.help=x.version=x.string=x.url=x.file=x.directory=x.integer=void 0;x.custom=Ge;x.boolean=si;x.option=Pu;var vu=v("node:url"),Yt=oe(),wu=pt(),lr=X();function Ge(t){return(e={})=>({parse:async(n,i,s)=>n,...t,...e,input:[],multiple:!!(e.multiple===void 0?t?.multiple??!1:e.multiple),type:"option"})}function si(t={}){return{parse:async(e,n)=>e,...t,allowNo:!!t.allowNo,type:"boolean"}}x.integer=Ge({async parse(t,e,n){if(!/^-?\d+$/.test(t))throw new Yt.CLIError(`Expected an integer but received: ${t}`);let i=Number.parseInt(t,10);if(n.min!==void 0&&i<n.min)throw new Yt.CLIError(`Expected an integer greater than or equal to ${n.min} but received: ${t}`);if(n.max!==void 0&&i>n.max)throw new Yt.CLIError(`Expected an integer less than or equal to ${n.max} but received: ${t}`);return i}});x.directory=Ge({async parse(t,e,n){return n.exists?(0,lr.dirExists)(t):t}});x.file=Ge({async parse(t,e,n){return n.exists?(0,lr.fileExists)(t):t}});x.url=Ge({async parse(t){try{return new vu.URL(t)}catch{throw new Yt.CLIError(`Expected a valid url but received: ${t}`)}}});x.string=Ge();var Ou=(t={})=>si({description:"Show CLI version.",...t,async parse(e,n){n.log(n.config.userAgent),n.exit(0)}});x.version=Ou;var ju=(t={})=>si({description:"Show CLI help.",...t,async parse(e,n){let i=await(0,wu.loadHelpClass)(n.config);await new i(n.config,n.config.pjson.oclif.helpOptions??n.config.pjson.helpOptions).showHelp(n.id?[n.id,...n.argv]:n.argv),n.exit(0)}});x.help=ju;function Pu(t){return(e={})=>({parse:async(n,i,s)=>n,...t,...e,input:[],multiple:!!(e.multiple===void 0?t.multiple:e.multiple),type:"option"})}});var ai=y(oi=>{"use strict";f();Object.defineProperty(oi,"__esModule",{value:!0});oi.aggregateFlags=$u;var Cu=ri(),Eu=(0,Cu.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function $u(t,e,n){let i={...e,...t};return n?{json:Eu,...i}:i}});var fr=y(ci=>{"use strict";f();Object.defineProperty(ci,"__esModule",{value:!0});ci.cacheCommand=Su;var qu=ai(),ur=In(),Du=Wt(),xu=$();function dr(t,e){let n=Object.getPrototypeOf(e),i=(0,xu.pickBy)(n,s=>s!==void 0);return Object.keys(n).length>0?dr({...i,...t},n):t}async function Fu(t,e){let n=Object.entries(t).map(async([i,s])=>[i,{aliases:s.aliases,char:s.char,charAliases:s.charAliases,combinable:s.combinable,dependsOn:s.dependsOn,deprecateAliases:s.deprecateAliases,deprecated:s.deprecated,description:s.description,env:s.env,exclusive:s.exclusive,helpGroup:s.helpGroup,helpLabel:s.helpLabel,hidden:s.hidden,name:i,noCacheDefault:s.noCacheDefault,relationships:s.relationships,required:s.required,summary:s.summary,...s.type==="boolean"?{allowNo:s.allowNo,type:s.type}:{default:await(0,ur.cacheDefaultValue)(s,e),delimiter:s.delimiter,hasDynamicHelp:typeof s.defaultHelp=="function",helpValue:s.helpValue,multiple:s.multiple,options:s.options,type:s.type}}]);return Object.fromEntries(await Promise.all(n))}async function Au(t,e){let n=Object.entries(t).map(async([i,s])=>[i,{default:await(0,ur.cacheDefaultValue)(s,e),description:s.description,hidden:s.hidden,name:i,noCacheDefault:s.noCacheDefault,options:s.options,required:s.required}]);return Object.fromEntries(await Promise.all(n))}async function Su(t,e,n=!1){let i=dr(t,t),s=i.flags??i._flags,r=i.baseFlags??i._baseFlags,[o,c]=await Promise.all([Fu((0,qu.aggregateFlags)(s,r,i.enableJsonFlag),n),Au((0,Du.ensureArgObject)(i.args),n)]),l={aliases:(i.aliases??[]).map(m=>m.replaceAll(" ",":")),args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:o,hasDynamicHelp:Object.values(o).some(m=>m.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},u=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],p=new Set([...u,...Object.keys(l)]),a=Object.keys(i).filter(m=>!p.has(m)),d=Object.fromEntries(a.map(m=>[m,i[m]]));return{...l,...d}}});var hr=y(Zt=>{"use strict";f();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.debug=R;Zt.findRoot=Ru;var N=v("node:path"),Mu=k(),Xt=X();function R(...t){return(e,...n)=>(0,Mu.getLogger)(["find-root",...t].join(":")).debug(e,...n)}function*li(t){for(;(0,N.dirname)(t)!==t;)yield t,t=(0,N.dirname)(t);yield t}async function pr(t,e){if(R(e??"root-plugin")(`Finding root starting at ${t}`),e){for(let n of li(t))if(n.endsWith((0,N.basename)(e)))return R(e)("Found root based on plugin name!"),n}for(let n of li(t))if(!((0,N.basename)((0,N.dirname)(n))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,N.basename)(n))))try{let i=(0,N.join)(n,"package.json");if(R(e??"root-plugin")(`Checking ${i}`),await(0,Xt.safeReadJson)(i))return R(e??"root-plugin")("Found root by traversing up from starting point!"),(0,N.dirname)(i)}catch{}}async function Iu(t,e){R(t??"root-plugin")("Finding root using legacy method");for(let n of li(e)){let i;if(t){if(i=(0,N.join)(n,"node_modules",t,"package.json"),await(0,Xt.safeReadJson)(i))return(0,N.dirname)(i);if((await(0,Xt.safeReadJson)((0,N.join)(n,"package.json")))?.name===t)return n}else if(i=(0,N.join)(n,"package.json"),await(0,Xt.safeReadJson)(i))return(0,N.dirname)(i)}}var de;function ku(t){if(de)return de;try{return de=v(v.resolve("pnpapi",{paths:[t]})),de}catch{}}var ui=t=>JSON.stringify(t),Tu=(t,e,n)=>ui(t?.packageDependencies.get(n))===ui(e?.packageDependencies.get(n));function Lu(t,e){if(ku(e),!de)return;R(t)("Finding root for using pnp method");let n=new Set,i=(s,r)=>{let o=ui(s);if(n.has(o))return;let c=de.getPackageInformation(s);if(s.name===t)return c.packageLocation;n.add(o);for(let[l,u]of c.packageDependencies){if(u===null||r!==null&&Tu(c,r,l))continue;let p=de.getLocator(l,u),a=i(p,c);if(a)return a}n.delete(o)};for(let s of de.getDependencyTreeRoots()){let r=i(s);if(r)return r}}async function Ru(t,e){if(t){R(t)(`Finding root using ${e}`);let i;try{i=v.resolve(t,{paths:[e]}),R(t)("Found starting point with require.resolve")}catch{R(t)("require.resolve could not find plugin starting point")}if(i){let r=await pr((0,N.dirname)(i),t);if(r)return R(t)(`Found root at ${r}`),r}let s=process.versions.pnp?Lu(t,e):await Iu(t,e);return R(t)(s?`Found root at ${s}`:"No root found!"),s}R("root-plugin")(`Finding root plugin using ${e}`);let n=await pr(e);return R("root-plugin")(n?`Found root at ${n}`:"No root found!"),n}});var gr=y(di=>{"use strict";f();Object.defineProperty(di,"__esModule",{value:!0});di.readPjson=Wu;var Nu=_o(),Hu=v("node:path"),Bu=k(),mr=X(),gt=(0,Bu.makeDebug)("read-pjson");async function Wu(t){let e=(0,Hu.join)(t,"package.json");if(process.env.OCLIF_DISABLE_RC)return gt("OCLIF_DISABLE_RC is set, skipping rc search"),(0,mr.readJson)(e);let n=await(0,mr.readJson)(e);if(n.oclif)return gt(`found oclif config in ${e}`),n;gt(`searching for oclif config in ${t}`);let s=await(0,Nu.lilconfig)("oclif",{searchPlaces:[".oclifrc",".oclifrc.json",".oclifrc.js",".oclifrc.mjs",".oclifrc.cjs","oclif.config.js","oclif.config.mjs","oclif.config.cjs"],stopDir:t}).search(t);return s?.config?(gt(`found oclif config for ${t}: %O`,s),{...n,oclif:s?.config??{}}):(gt(`no oclif config found in ${t}`),n)}});var mi=y(Je=>{"use strict";f();var zu=Je&&Je.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Je,"__esModule",{value:!0});Je.Plugin=void 0;var _t=v("node:path"),_r=v("node:util"),Uu=cr(),Vu=zu(G()),yt=oe(),Qt=st(),Ke=Ue(),Or=Lt(),Gu=fr(),Ku=hr(),Ju=X(),Yu=gr(),yr=$(),fi=Le(),en=Te(),br=Vu.default.getInstance().get("@oclif/core");function pi(t,e){return t?(e=e?`${e}:`:"",Array.isArray(t)?[...t,t.flatMap(n=>pi(n.subtopics,`${e}${n.name}`))]:Object.keys(t).flatMap(n=>(t[n].name=n,[{...t[n],name:`${e}${n}`},...pi(t[n].subtopics,`${e}${t[n].name}`)]))):[]}var Xu=(t,e)=>!!(t?.commands[e]&&"isESM"in t.commands[e]&&"relativePath"in t.commands[e]),vr=t=>typeof t.run=="function"?t:t.default&&t.default.run?t.default:Object.values(t).find(e=>typeof e.run=="function"),wr=t=>{if(t&&typeof t.run=="function")return t},jr=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Zu(t){return t.map(e=>{let n=(0,_t.parse)(e),i=n.dir.split("/"),s=n.name!=="index"&&n.name,r=[...i,s].filter(Boolean).join(":");return r===""?Or.SINGLE_COMMAND_CLI_SYMBOL:r})}function Qu(t){if(t){if(typeof t=="string")return{globPatterns:jr,strategy:"pattern",target:t};if(!t.target)throw new yt.CLIError("`oclif.commandDiscovery.target` is required.");if(!t.strategy)throw new yt.CLIError("`oclif.commandDiscovery.strategy` is required.");return t.strategy==="explicit"&&!t.identifier&&(t.identifier="default"),t}}function ed(t){return typeof t=="string"?{identifier:"default",target:t}:t.identifier?t:{...t,identifier:"default"}}var hi=class{options;_base=`${br.name}@${br.version}`;_debug=(0,en.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 pi(this.pjson.oclif.topics||{})}async findCommand(e,n={}){let i=Ke.Performance.mark(Ke.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${e}`,{id:e,plugin:this.name}),r=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let o=await this.getCommandsDir();if(!o)return;let c,l,u;try{({filePath:u,isESM:l,module:c}=Xu(this.manifest,e)?await(0,Qt.loadWithDataFromManifest)(this.manifest.commands[e],this.root):await(0,Qt.loadWithData)(this,(0,_t.join)(o??this.pjson.oclif.commands,...e.split(":")))),this._debug(l?"(import)":"(require)",u)}catch(a){if(!n.must&&a.code==="MODULE_NOT_FOUND")return;throw a}let p=vr(c);return p?(p.id=e,p.plugin=this,p.isESM=l,p.relativePath=(0,_t.relative)(this.root,u||"").split(_t.sep),p):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let o=await this.loadCommandsFromTarget(),c=wr(o?.[e]);return c?(c.id=e,c.plugin=this,c):void 0}})();return!r&&n.must&&(0,yt.error)(`command ${e} not found`),i?.stop(),r}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,Ku.findRoot)(this.options.name,this.options.root);if(!e)throw new yt.CLIError(`could not find package.json with ${(0,_r.inspect)(this.options)}`);if(this.root=e,this._debug(`loading ${this.type} plugin from ${e}`),this.pjson=this.options.pjson??await(0,Yu.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 yt.CLIError(`no name in package.json (${e})`);this._debug=(0,en.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(([n,i])=>[n,(0,yr.castArray)(i).map(s=>ed(s))])),this.commandDiscoveryOpts=Qu(this.pjson.oclif?.commands),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([n,i])=>({...i,load:async()=>this.findCommand(n,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((n,i)=>n.id.localeCompare(i.id))}async _manifest(){let e=!!this.options.ignoreManifest,n=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,s=async(c=!1)=>{try{let l=(0,_t.join)(this.root,`${c?".":""}oclif.manifest.json`),u=await(0,Ju.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&u.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${u.version}
|
|
68
|
+
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,u}catch(l){if(l.code==="ENOENT"){if(!c)return s(!0)}else this.warn(l,"readManifest")}},r=Ke.Performance.mark(Ke.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!e){let c=await s();if(c)return r?.addDetails({commandCount:Object.keys(c.commands).length,fromCache:!0}),r?.stop(),this.commandIDs=Object.keys(c.commands),c}this.commandIDs=await this.getCommandIDs();let o={commands:(await Promise.all(this.commandIDs.map(async c=>{try{let l=await this.findCommand(c,{must:!0}),u=await(0,Gu.cacheCommand)(l,this,i);if(u.id=c,this.flexibleTaxonomy){let p=(0,en.getCommandIdPermutations)(c),a=u.aliases.flatMap(d=>(0,en.getCommandIdPermutations)(d));return[c,{...u,aliasPermutations:a,permutations:p}]}return[c,u]}catch(l){let u=`findCommand (${c})`;if(!n)this.warn(l,u);else throw this.addErrorScope(l,u)}}))).filter(c=>!!c).reduce((c,[l,u])=>(c[l]=u,c),{}),version:this.version};return r?.addDetails({commandCount:Object.keys(o.commands).length,fromCache:!1}),r?.stop(),o}addErrorScope(e,n){return e.name=e.name??(0,_r.inspect)(e).trim(),e.detail=(0,yr.compact)([e.detail,`module: ${this._base}`,n&&`task: ${n}`,`plugin: ${this.name}`,`root: ${this.root}`,...e.code?[`code: ${e.code}`]:[],...e.message?[`message: ${e.message}`]:[],"See more details with DEBUG=*"]).join(`
|
|
69
|
+
`),e}async getCommandIDs(){let e=Ke.Performance.mark(Ke.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),n;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{n=await this.getCommandIdsFromTarget()??[];break}case"pattern":{n=await this.getCommandIdsFromPattern();break}case"single":{n=await this.getCommandIdsFromTarget()??[];break}default:n=[]}return this._debug("found commands",n),e?.addDetails({count:n.length}),e?.stop(),n}async getCommandIdsFromPattern(){let e=await this.getCommandsDir();if(!e)return[];this._debug(`loading IDs from ${e}`);let n=await(0,Uu.glob)(this.commandDiscoveryOpts?.globPatterns??jr,{cwd:e});return Zu(n)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,n])=>wr(n)).map(([n])=>n)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,fi.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,fi.tsPath)(this.root,this.commandDiscoveryOpts.target,this),n=await(0,Qt.load)(this,e);return this.commandCache=n[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let e=await(0,fi.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),n=await(0,Qt.load)(this,e);return this.commandCache={[Or.SINGLE_COMMAND_CLI_SYMBOL]:vr(n)},this.commandCache}}warn(e,n){typeof e=="string"&&(e=new Error(e));let i=this.addErrorScope(e,n);process.emitWarning(i.name,i)}};Je.Plugin=hi});var Er=y(bi=>{"use strict";f();Object.defineProperty(bi,"__esModule",{value:!0});var td=ho(),gi=v("node:path"),Ye=Ue(),_i=X(),nd=$(),Pr=mi(),id=Te(),Cr=(0,id.makeDebug)();function Pe(t,e){return Object.keys(t).filter(n=>e.some(i=>(0,td.minimatch)(n,i)))}var yi=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(n=>[n.name,n])):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 n;if(this.pluginsProvided){let i=[...this.plugins.values()];n=i.find(s=>s.root===this.options.root)??i[0]}else{let i=Ye.Performance.mark(Ye.OCLIF_MARKER_OWNER,"plugin.load#root");n=new Pr.Plugin({isRoot:!0,pjson:e,root:this.options.root}),await n.load(),i?.addDetails({commandCount:n.commands.length,hasManifest:n.hasManifest??!1,name:n.name,topicCount:n.topics.length,type:n.type,usesMain:!!n.pjson.main}),i?.stop()}return this.plugins.set(n.name,n),n}async loadCorePlugins(e){let{plugins:n}=e.rootPlugin.pjson.oclif;if(n){let r=Pe(e.rootPlugin.pjson.dependencies??{},n);await this.loadPlugins(e.rootPlugin.root,"core",r)}let{core:i,path:s}=e.pluginAdditions??{core:[]};if(i)if(s){let r=await(0,_i.readJson)((0,gi.join)(s,"package.json")),o=Pe(r.dependencies??{},i);await this.loadPlugins(s,"core",o)}else{let r=Pe(e.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(e.rootPlugin.root,"core",r)}}async loadDevPlugins(e){if(e.devPlugins!==!1){if((0,nd.isProd)())return;try{let{devPlugins:n}=e.rootPlugin.pjson.oclif;if(n){let r={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=Pe(r??{},n);await this.loadPlugins(e.rootPlugin.root,"dev",o)}let{dev:i,path:s}=e.pluginAdditions??{core:[]};if(i)if(s){let r=await(0,_i.readJson)((0,gi.join)(s,"package.json")),o={...r.dependencies,...r.devDependencies},c=Pe(o??{},i);await this.loadPlugins(s,"dev",c)}else{let r={...e.rootPlugin.pjson.dependencies,...e.rootPlugin.pjson.devDependencies},o=Pe(r??{},i);await this.loadPlugins(e.rootPlugin.root,"dev",o)}}catch(n){process.emitWarning(n)}}}async loadPlugins(e,n,i,s){if(!i||i.length===0)return;let r=Ye.Performance.mark(Ye.OCLIF_MARKER_OWNER,`config.loadPlugins#${n}`);Cr("loading plugins",i),await Promise.all((i||[]).map(async o=>{try{let c=typeof o=="string"?o:o.name,l={name:c,root:e,type:n};if(typeof o!="string"&&(l.tag=o.tag||l.tag,l.root=o.root||l.root,l.url=o.url),s&&(l.parent=s),this.plugins.has(c))return;let u=Ye.Performance.mark(Ye.OCLIF_MARKER_OWNER,`plugin.load#${c}`),p=new Pr.Plugin(l);if(await p.load(),u?.addDetails({commandCount:p.commands.length,hasManifest:p.hasManifest,name:p.name,topicCount:p.topics.length,type:p.type,usesMain:!!p.pjson.main}),u?.stop(),this.plugins.set(p.name,p),s&&(p.parent=s,s.children||(s.children=[]),s.children.push(p)),p.pjson.oclif.plugins){let a=n==="dev"?{...p.pjson.dependencies,...p.pjson.devDependencies}:p.pjson.dependencies,d=Pe(a??{},p.pjson.oclif.plugins);await this.loadPlugins(p.root,n,d,p)}}catch(c){this.errors.push(c)}})),r?.addDetails({pluginCount:i.length}),r?.stop()}async loadUserPlugins(e){if(e.userPlugins!==!1)try{let n=(0,gi.join)(e.dataDir,"package.json");Cr("reading user plugins pjson %s",n);let i=await(0,_i.readJson)(n,!1);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(n,"user",i.oclif.plugins.filter(s=>s.type==="user")),await this.loadPlugins(n,"link",i.oclif.plugins.filter(s=>s.type==="link"))}catch(n){n.code!=="ENOENT"&&process.emitWarning(n)}}};bi.default=yi});var Ir=y((z,Mr)=>{"use strict";f();var sd=z&&z.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),rd=z&&z.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),od=z&&z.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&sd(n,e,i[s]);return rd(n,e),n}})(),ji=z&&z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(z,"__esModule",{value:!0});z.Config=void 0;var ad=od(Gi()),cd=ji(so()),Xe=v("node:os"),fe=v("node:path"),$r=v("node:url"),Sr=ji(G()),Ze=oe(),ld=Ne(),vi=k(),ud=st(),S=Ue(),bt=re(),qr=Ks(),Dr=X(),dd=be(),xr=Ys(),tn=$(),fd=ve(),pd=W(),hd=ji(Er()),md=Le(),wt=Te(),vt=(0,wt.makeDebug)(),Fr=Sr.default.getInstance().get("@oclif/core"),wi=`${Fr.name}@${Fr.version}`,gd=new Set(["preparse"]);function Ar(){process.listenerCount("warning")>1||process.on("warning",t=>{console.error(t.stack),t.detail&&console.error(t.detail)})}function _d(t){let e=t.match(/[^-]+(?:-([^.]+))?/);return e&&e[1]||"stable"}function yd(t){return t&&!!t._base}var nn=class extends Map{validPermutations=new Map;add(e,n){this.validPermutations.set(e,n);for(let i of(0,wt.collectUsableIds)([e]))this.has(i)?this.set(i,this.get(i).add(n)):this.set(i,new Set([n]))}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)}},Oi=class t{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=wi;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new nn;pluginLoader;rootPlugin;topicPermutations=new nn;constructor(e){this.options=e}static async load(e=Mr.filename||__dirname){if((0,vi.setLogger)(e),typeof e=="string"&&e.startsWith("file://")&&(e=(0,$r.fileURLToPath)(e)),typeof e=="string"&&(e={root:e}),yd(e)){if(wi!==e._base){vt(`reloading config from ${e._base} to ${wi}`);let i=new t({...e.options,plugins:e.plugins});return await i.load(),i}return e}let n=new t(e);return await n.load(),n}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,tn.isProd)()}static get rootPlugin(){return this.rootPlugin}get topics(){return[...this._topics.values()]}get versionDetails(){let[e,n,i]=this.userAgent.split(" ");return{architecture:n,cliVersion:e,nodeVersion:i,osVersion:`${(0,Xe.type)()} ${(0,Xe.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(s=>[s.name,{root:s.root,type:s.type,version:s.version}])),rootPath:this.root,shell:this.shell}}_shell(){let e,{COMSPEC:n}=process.env,i=process.env.SHELL??(0,Xe.userInfo)().shell?.split(fe.sep)?.pop();return i?e=i.split("/"):this.windows&&(process.title.toLowerCase().includes("powershell")||process.title.toLowerCase().includes("pwsh"))?e=["powershell"]:this.windows&&(process.title.toLowerCase().includes("command prompt")||process.title.toLowerCase().includes("cmd"))?e=["cmd.exe"]:this.windows&&n?e=n.split(/\\|\//):e=["unknown"],e.at(-1)??"unknown"}dir(e){let n=process.env[`XDG_${e.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,fe.join)(this.home,e==="data"?".local/share":"."+e);return(0,fe.join)(n,this.dirname)}findCommand(e,n={}){let i=this.getCmdLookupId(e),s=this._commands.get(i);return n.must&&!s&&(0,Ze.error)(`command ${i} not found`),s}findMatches(e,n){let i=n.filter(o=>!(0,ld.getHelpFlagAdditions)(this).includes(o)&&o.startsWith("-")).map(o=>o.replaceAll("-",""));return[...this.commandPermutations.get(e)].map(o=>this._commands.get(o)).filter(o=>{let c=Object.entries(o.flags).flatMap(([l,u])=>u.char?[u.char,l]:[l]);return i.every(l=>c.includes(l))})}findTopic(e,n={}){let i=this.getTopicLookupId(e),s=this._topics.get(i);if(s)return s;if(n.must)throw new Error(`topic ${e} not found`)}getAllCommandIDs(){return this.getAllCommands().map(e=>e.id)}getAllCommands(){let e=[...this._commands.values()],n=[...this.commandPermutations.getAllValid()];for(let i of n)if(!this._commands.has(i)){let s=this._commands.get(this.getCmdLookupId(i));e.push({...s,id:i})}return e}getPluginsList(){return[...this.plugins.values()]}async load(){bt.settings.performanceEnabled=(bt.settings.performanceEnabled===void 0?this.options.enablePerf:bt.settings.performanceEnabled)??!1,bt.settings.debug&&Ar(),(0,vi.setLogger)(this.options);let e=S.Performance.mark(S.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new hd.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let n=Sr.default.getInstance();n.set("rootPlugin",this.rootPlugin),n.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||_d(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,Xe.arch)()==="ia32"?"x86":(0,Xe.arch)(),this.platform=cd.default?"wsl":(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=this._shell(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,xr.getHomeDir)()||(0,Xe.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(),vt("config done"),e?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((i,s)=>i+s.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),e?.stop()}async loadPluginsAndCommands(e){let n=S.Performance.mark(S.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:s}=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=s,n?.stop();let r=S.Performance.mark(S.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let o of this.plugins.values())this.loadCommands(o),this.loadTopics(o);r?.stop();for(let o of i)this.warn(o)}async loadTheme(){if(this.scopedEnvVarTrue("DISABLE_THEME"))return;let e=(0,fe.resolve)(this.configDir,"theme.json"),n=async()=>{if(this.pjson.oclif.theme)return typeof this.pjson.oclif.theme=="string"?(0,Dr.safeReadJson)((0,fe.resolve)(this.root,this.pjson.oclif.theme)):this.pjson.oclif.theme},[i,s]=await Promise.all([n(),(0,Dr.safeReadJson)(e)]),r={...i,...s};return Object.keys(r).length>0?(0,pd.parseTheme)(r):void 0}macosCacheDir(){return this.platform==="darwin"&&(0,fe.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(e,n=[],i=null){let s=S.Performance.mark(S.OCLIF_MARKER_OWNER,`config.runCommand#${e}`);vt("runCommand %s %o",e,n);let r=i??this.findCommand(e);if(!r){let l=this.flexibleTaxonomy?this.findMatches(e,n):[],u=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:n,id:e,matches:l}):await this.runHook("command_not_found",{argv:n,id:e});if(u.successes[0])return u.successes[0].result;throw u.failures[0]?u.failures[0].error:new Ze.CLIError(`command ${e} not found`)}if(this.isJitPluginCommand(r)){let l=r.pluginName,u=this.pjson.oclif.jitPlugins[l],p=await this.runHook("jit_plugin_not_installed",{argv:n,command:r,id:e,pluginName:l,pluginVersion:u});if(p.failures[0])throw p.failures[0].error;if(p.successes[0])await this.loadPluginsAndCommands({force:!0}),r=this.findCommand(e)??r;else{let a=await this.runHook("command_not_found",{argv:n,id:e});if(a.successes[0])return a.successes[0].result;throw a.failures[0]?a.failures[0].error:new Ze.CLIError(`command ${e} not found`)}}let o=await r.load();await this.runHook("prerun",{argv:n,Command:o});let c=await o.run(n,this);if(r.id==="plugins:uninstall")for(let l of n)this.plugins.delete(l);return await this.runHook("postrun",{argv:n,Command:o,result:c}),s?.addDetails({command:e,plugin:r.pluginName}),s?.stop(),c}async runHook(e,n,i,s){let r=S.Performance.mark(S.OCLIF_MARKER_OWNER,`config.runHook#${e}`);vt("start %s hook",e);let o=a=>typeof a=="function"?a:a.default&&typeof a.default=="function"?a.default:Object.values(a).find(d=>typeof d=="function"),c=async(a,d)=>{let m,h=new Promise((g,b)=>{m=setTimeout(()=>{b(new Error(`Timed out after ${a} ms.`))},a).unref()});return Promise.race([d,h]).then(g=>(clearTimeout(m),g))},l={failures:[],successes:[]},p=(gd.has(e)?[this.rootPlugin]:[...this.plugins.values()]).map(async a=>{let d=(0,vi.makeDebug)([a.name,"hooks",e].join(":")),m={config:this,debug:d,error(g,b={}){(0,Ze.error)(g,b)},exit(g=0){(0,Ze.exit)(g)},log(g,...b){fd.ux.stdout(g,...b)},warn(g){(0,Ze.warn)(g)}},h=a.hooks[e]||[];for(let g of h){let b=S.Performance.mark(S.OCLIF_MARKER_OWNER,`config.runHook#${a.name}(${g.target})`);try{let{filePath:_,isESM:O,module:j}=await(0,ud.loadWithData)(a,await(0,md.tsPath)(a.root,g.target,a));d("start",O?"(import)":"(require)",_);let H=j[g.identifier]??(g.identifier==="default"?o(j):void 0);if(!H){d("No hook found for hook definition:",g);continue}let V=i?await c(i,H.call(m,{...n,config:this,context:m})):await H.call(m,{...n,config:this,context:m});l.successes.push({plugin:a,result:V}),a.name==="@oclif/plugin-legacy"&&e==="init"&&this.insertLegacyPlugins(V),d("done")}catch(_){if(l.failures.push({error:_,plugin:a}),d(_),!s&&_.oclif?.exit!==void 0&&_.oclif?.exit!==0&&_.code!=="MODULE_NOT_FOUND")throw _}b?.addDetails({event:e,hook:g.target,plugin:a.name}),b?.stop()}});return await Promise.all(p),vt("%s hook done",e),r?.stop(),l}s3Key(e,n,i={}){typeof n=="object"?i=n:n&&(i.ext=n);let s=this.updateConfig.s3?.templates?.[i.platform?"target":"vanilla"][e]??"";return ad.render(s,{...this,...i})}s3Url(e){let{host:n}=this.updateConfig.s3??{host:void 0};if(!n)throw new Error("no s3 host is set");let i=new $r.URL(n);return i.pathname=(0,fe.join)(i.pathname,e),i.toString()}scopedEnvVar(e){return process.env[this.scopedEnvVarKeys(e).find(n=>process.env[n])]}scopedEnvVarKey(e){return[this.bin,e].map(n=>n.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(e){return[this.bin,...this.binAliases??[]].filter(Boolean).map(n=>[n.replaceAll("@","").replaceAll(/[/-]/g,"_"),e].join("_").toUpperCase())}scopedEnvVarTrue(e){let n=this.scopedEnvVar(e);return n==="1"||n==="true"}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,fe.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}buildS3Config(){let e=this.pjson.oclif.update?.s3,n=this.scopedEnvVar("S3_BUCKET")??e?.bucket,i=e?.host??(n&&`https://${n}.s3.amazonaws.com`),s={...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:n,host:i,templates:s}}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 n of e){this.plugins.set(n.name,n);for(let i of n.commands??[]){this._commands.delete(i.id);for(let s of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(s)}this.loadCommands(n)}}isJitPluginCommand(e){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(e.pluginName??"")&&!!(e?.pluginName&&!this.plugins.has(e.pluginName))}loadCommands(e){let n=S.Performance.mark(S.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,qr.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 s=this.flexibleTaxonomy&&i.permutations===void 0?(0,wt.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let o of s)this.commandPermutations.add(o,i.id);let r=(o,c=!1)=>{let l=(0,dd.toStandardizedId)(o,this);if(this._commands.has(l)){let p=(0,qr.determinePriority)(this.pjson.oclif.plugins??[],[this._commands.get(l),i]);this._commands.set(l,{...p,id:l})}else this._commands.set(l,{...i,hidden:c,id:l});let u=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,wt.getCommandIdPermutations)(l):i.permutations??[l];for(let p of u)this.commandPermutations.add(p,i.id)};for(let o of i.aliases??[])r(o);for(let o of i.hiddenAliases??[])r(o,!0)}n?.addDetails({commandCount:e.commands.length}),n?.stop()}loadTopics(e){let n=S.Performance.mark(S.OCLIF_MARKER_OWNER,`config.loadTopics#${e.name}`,{plugin:e.name});for(let i of(0,tn.compact)(e.topics)){let s=this._topics.get(i.name);s?(s.description=i.description||s.description,s.hidden=s.hidden||i.hidden):this._topics.set(i.name,i);let r=this.flexibleTaxonomy?(0,wt.getCommandIdPermutations)(i.name):[i.name];for(let o of r)this.topicPermutations.add(o,i.name)}for(let i of e.commands.filter(s=>!s.hidden)){let s=i.id.split(":");for(;s.length>0;){let r=s.join(":");r&&!this._topics.has(r)&&this._topics.set(r,{description:i.summary||i.description,name:r}),s.pop()}}n?.stop()}maybeAdjustDebugSetting(){this.scopedEnvVarTrue("DEBUG")&&(bt.settings.debug=!0,Ar())}warn(e,n){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,tn.compact)([e.detail,`module: ${this._base}`,n&&`task: ${n}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
70
|
+
`),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,tn.compact)([e.detail,`module: ${this._base}`,n&&`task: ${n}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
71
|
+
`),process.emitWarning(JSON.stringify(e))}}};z.Config=Oi});var sn=y(pe=>{"use strict";f();Object.defineProperty(pe,"__esModule",{value:!0});pe.tsPath=pe.Plugin=pe.Config=void 0;var bd=Ir();Object.defineProperty(pe,"Config",{enumerable:!0,get:function(){return bd.Config}});var vd=mi();Object.defineProperty(pe,"Plugin",{enumerable:!0,get:function(){return vd.Plugin}});var wd=Le();Object.defineProperty(pe,"tsPath",{enumerable:!0,get:function(){return wd.tsPath}})});var kr=y(Pi=>{"use strict";f();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.default=Ed;var Od=yo(),jd=Ae(),Pd=$();function Cd(t,e){return Od(t,jd.stdtermwidth,{skipScheme:"ansi-color"})(e).trim()}function Ed(t){if(t.length===0)return"";let e=(0,Pd.maxBy)(t,i=>i[0].length)?.[0].length??0;return t.map(i=>{let s=i[0],r=i[1];return r?(s=s.padEnd(e),r=Cd(e+2,r),`${s} ${r}`):s}).join(`
|
|
72
|
+
`)}});var Ai=y(E=>{"use strict";f();var Tr=E&&E.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(E,"__esModule",{value:!0});E.FailedFlagValidationError=E.ArgInvalidOptionError=E.FlagInvalidOptionError=E.NonExistentFlagsError=E.UnexpectedArgsError=E.RequiredArgsError=E.InvalidArgsSpecError=E.CLIParseError=E.CLIError=void 0;var Ot=Tr(G()),$d=oe(),qd=$(),Lr=Tr(kr()),Dd=W(),xd=oe();Object.defineProperty(E,"CLIError",{enumerable:!0,get:function(){return xd.CLIError}});var te=class extends $d.CLIError{parse;showHelp=!1;constructor(e){e.message+=`
|
|
73
|
+
See more help with --help`,super(e.message,{exit:e.exit}),this.parse=e.parse}};E.CLIParseError=te;var Ci=class extends te{args;constructor({args:e,exit:n,parse:i}){let s="Invalid argument spec",r=Object.values(e).filter(o=>o.name);if(r.length>0){let o=(0,Lr.default)(r.map(c=>[`${c.name} (${c.required?"required":"optional"})`,c.description]));s+=`:
|
|
74
|
+
${o}`}super({exit:Ot.default.getInstance().get("exitCodes")?.invalidArgsSpec??n,message:s,parse:i}),this.args=e}};E.InvalidArgsSpecError=Ci;var Ei=class extends te{args;constructor({args:e,exit:n,flagsWithMultiple:i,parse:s}){let r=`Missing ${e.length} required arg${e.length===1?"":"s"}`,o=e.filter(c=>c.name);if(o.length>0){let c=(0,Lr.default)(o.map(l=>{let u=l.options?`(${l.options.join("|")}) ${l.description}`:l.description;return[l.name,u]}));r+=`:
|
|
75
|
+
${c}`}if(i?.length){let c=i.map(l=>`--${l}`).join(", ");r+=`
|
|
76
|
+
|
|
77
|
+
Note: ${c} allow${i.length===1?"s":""} multiple values. Because of this you need to provide all arguments before providing ${i.length===1?"that flag":"those flags"}.`,r+=`
|
|
78
|
+
Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:Ot.default.getInstance().get("exitCodes")?.requiredArgs??n,message:r,parse:s}),this.args=e,this.showHelp=!0}};E.RequiredArgsError=Ei;var $i=class extends te{args;constructor({args:e,exit:n,parse:i}){let s=`Unexpected argument${e.length===1?"":"s"}: ${e.join(", ")}`;super({exit:Ot.default.getInstance().get("exitCodes")?.unexpectedArgs??n,message:s,parse:i}),this.args=e,this.showHelp=!0}};E.UnexpectedArgsError=$i;var qi=class extends te{flags;constructor({exit:e,flags:n,parse:i}){let s=`Nonexistent flag${n.length===1?"":"s"}: ${n.join(", ")}`;super({exit:Ot.default.getInstance().get("exitCodes")?.nonExistentFlag??e,message:s,parse:i}),this.flags=n,this.showHelp=!0}};E.NonExistentFlagsError=qi;var Di=class extends te{constructor(e,n){let i=`Expected --${e.name}=${n} to be one of: ${e.options.join(", ")}`;super({message:i,parse:{}})}};E.FlagInvalidOptionError=Di;var xi=class extends te{constructor(e,n){let i=`Expected ${n} to be one of: ${e.options.join(", ")}`;super({message:i,parse:{}})}};E.ArgInvalidOptionError=xi;var Fi=class extends te{constructor({exit:e,failed:n,parse:i}){let s=n.map(l=>l.reason),r=(0,qd.uniq)(s),c=`The following ${r.length===1?"error":"errors"} occurred:
|
|
79
|
+
${(0,Dd.colorize)("dim",r.join(`
|
|
80
|
+
`))}`;super({exit:Ot.default.getInstance().get("exitCodes")?.failedFlagValidation??e,message:c,parse:i})}};E.FailedFlagValidationError=Fi});var Nr=y(ne=>{"use strict";f();var Fd=ne&&ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ne,"__esModule",{value:!0});ne.Parser=ne.readStdin=void 0;var Ad=v("node:os"),Sd=v("node:readline"),Rr=Fd(G()),Md=k(),he=$(),Ce=Ai(),J;try{J=process.env.CLI_FLAGS_DEBUG==="1"?(0,Md.makeDebug)("parser"):()=>{}}catch{J=()=>{}}var Id=async()=>{let{stdin:t,stdout:e}=process;return t.isTTY?null:globalThis.oclif?.stdinCache?(J("resolved stdin from global cache",globalThis.oclif.stdinCache),globalThis.oclif.stdinCache):new Promise(n=>{let i=[],s=new AbortController,{signal:r}=s,o=setTimeout(()=>s.abort(),10),c=(0,Sd.createInterface)({input:t,output:e,terminal:!1});c.on("line",l=>{i.push(l)}),c.once("close",()=>{let l=i.join(Ad.EOL);clearTimeout(o),J("resolved from stdin",l),globalThis.oclif={...globalThis.oclif,stdinCache:l},n(l)}),r.addEventListener("abort",()=>{J("stdin aborted"),clearTimeout(o),c.close(),n(null)},{once:!0})})};ne.readStdin=Id;function kd(t){return/^-\d/g.test(t)}var rn=(t,e)=>{if(t.options&&!t.options.includes(e))throw new Ce.FlagInvalidOptionError(t,e);return e},on="--no-",Si=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,he.pickBy)(e.flags,n=>n.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(e.flags).flatMap(n=>[...n.aliases??[],...n.charAliases??[]].map(i=>[i,n])))}get _argTokens(){return this.raw.filter(e=>e.type==="arg")}async parse(){this._debugInput();let e=async a=>{let{isLong:d,name:m}=this.findFlag(a);if(!m){let g=a.indexOf("=");if(g!==-1){let b=a.slice(g+1);this.argv.unshift(b);let _=await e(a.slice(0,g));return _||this.argv.shift(),_}return!1}let h=this.input.flags[m];if(h.type==="option"){if(!h.multiple&&this.raw.some(b=>b.type==="flag"&&b.flag===m))throw new Ce.CLIError(`Flag --${m} can only be specified once`);this.currentFlag=h;let g=d||a.length<3?this.argv.shift():a.slice(a[2]==="="?3:2);if(h.allowStdin==="only"&&g!=="-"&&g!==void 0&&!this.findFlag(g).name)throw new Ce.CLIError(`Flag --${m} can only be read from stdin. The value must be "-" or not provided at all.`);if(h.allowStdin&&g==="-"||h.allowStdin==="only"){let b=await(0,ne.readStdin)();b&&(g=b.trim())}if(typeof g!="string"||this.findFlag(g).name)throw h.options?new Ce.CLIError(`Flag --${m} expects one of these values: ${h.options.join(", ")}`):new Ce.CLIError(`Flag --${m} expects a value`);this.raw.push({flag:h.name,input:g,type:"flag"})}else this.raw.push({flag:h.name,input:a,type:"flag"}),!d&&a.length>2&&this.argv.unshift(`-${a.slice(2)}`);return!0},n=!0,i=[],s=!1,r=[...this.argv];for(;this.argv.length>0;){let a=this.argv.shift();if(n&&a.startsWith("-")&&a!=="-"){if(this.input["--"]!==!1&&a==="--"){n=!1;continue}if(await e(a))continue;if(a==="--"){s=!0;continue}if(this.input["--"]!==!1&&!kd(a)){i.push(a);continue}}if(n&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:a,type:"flag"});continue}let d=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:d,input:a,type:"arg"})}let[{args:o,argv:c},{flags:l,metadata:u}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(c,o,l);let p=s?[...c,...i,"--"]:[...c,...i];return{args:o,argv:p.sort((a,d)=>r.indexOf(a)-r.indexOf(d)),flags:l,metadata:u,nonExistentFlags:i,raw:this.raw}}async _args(){let e=[],n={},i=this._argTokens,s=!1,r=this.context;for(let[o,c]of Object.entries(this.input.args)){let l=i.find(u=>u.arg===o);if(r.token=l,l){if(c.options&&!c.options.includes(l.input))throw new Ce.ArgInvalidOptionError(c,l.input);let u=await c.parse(l.input,r,c);e.push(u),n[l.arg]=u}else if(!c.ignoreStdin&&!s){let u=await(0,ne.readStdin)();if(u){u=u.trim();let p=await c.parse(u,r,c);e.push(p),n[o]=p}s=!0}if(!n[o]&&(c.default||c.default===!1))if(typeof c.default=="function"){let u=await c.default();e.push(u),n[o]=u}else e.push(c.default),n[o]=c.default}for(let o of i)n[o.arg]===void 0&&e.push(o.input);return{args:n,argv:e}}_debugInput(){J("input: %s",this.argv.join(" "));let e=Object.keys(this.input.args);e.length>0&&J("available args: %s",e.join(" ")),Object.keys(this.input.flags).length!==0&&J("available flags: %s",Object.keys(this.input.flags).map(n=>`--${n}`).join(" "))}_debugOutput(e,n,i){i.length>0&&J("argv: %o",i),Object.keys(e).length>0&&J("args: %o",e),Object.keys(n).length>0&&J("flags: %o",n)}async _flags(){let e=async(a,d,m,h)=>{if(!d.parse)return a;let g={...m,error:m?.error,exit:m?.exit,jsonEnabled:m?.jsonEnabled,log:m?.log,logToStderr:m?.logToStderr,token:h,warn:m?.warn};try{return d.type==="boolean"?await d.parse(a,g,d):await d.parse(a,g,d)}catch(b){throw b.message=`Parsing --${d.name}
|
|
81
|
+
${b.message}
|
|
82
|
+
See more help with --help`,Rr.default.getInstance().get("exitCodes")?.failedFlagParsing&&(b.oclif={exit:Rr.default.getInstance().get("exitCodes")?.failedFlagParsing}),b}},n=a=>{if(a.tokens?.length){if(a.inputFlag.flag.type==="boolean"&&(0,he.last)(a.tokens)?.input){let m=h=>{let g=[h.inputFlag.name,...h.inputFlag.flag.aliases??[]].map(_=>`${on}${_}`),b=(0,he.last)(h.tokens)?.input;return b?!g.includes(b):!0};return{...a,valueFunction:async h=>e(m(h),h.inputFlag.flag,this.context,(0,he.last)(h.tokens))}}if(a.inputFlag.flag.type==="option"&&a.inputFlag.flag.delimiter&&a.inputFlag.flag.multiple){let m=h=>new RegExp(`(?<!\\\\)${h}`);return{...a,valueFunction:async h=>(await Promise.all((h.tokens??[]).flatMap(g=>g.input.split(m(h.inputFlag.flag.delimiter??","))).map(g=>g.trim().replaceAll(new RegExp(`\\\\${h.inputFlag.flag.delimiter}`,"g"),h.inputFlag.flag.delimiter??",").replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async g=>e(g,h.inputFlag.flag,this.context,{...(0,he.last)(h.tokens),input:g})))).map(g=>rn(h.inputFlag.flag,g))}}if(a.inputFlag.flag.type==="option"&&a.inputFlag.flag.multiple)return{...a,valueFunction:async m=>Promise.all((a.tokens??[]).map(h=>e(rn(m.inputFlag.flag,h.input),m.inputFlag.flag,this.context,h)))};if(a.inputFlag.flag.type==="option")return{...a,valueFunction:async m=>e(rn(m.inputFlag.flag,(0,he.last)(a.tokens)?.input),m.inputFlag.flag,this.context,(0,he.last)(a.tokens))}}if(a.inputFlag.flag.env&&process.env[a.inputFlag.flag.env]){let m=process.env[a.inputFlag.flag.env];if(a.inputFlag.flag.type==="option"&&m)return{...a,valueFunction:async h=>e(rn(h.inputFlag.flag,m),h.inputFlag.flag,this.context)};if(a.inputFlag.flag.type==="boolean")return{...a,valueFunction:async h=>(0,he.isTruthy)(process.env[h.inputFlag.flag.env]??"false")}}return typeof a.inputFlag.flag.default!==void 0?{...a,metadata:{setFromDefault:!0},valueFunction:typeof a.inputFlag.flag.default=="function"?(m,h={})=>a.inputFlag.flag.default({flags:h,options:m.inputFlag.flag}):async()=>a.inputFlag.flag.default}:a},i=a=>a.inputFlag.flag.type==="option"&&a.inputFlag.flag.defaultHelp?{...a,helpFunction:typeof a.inputFlag.flag.defaultHelp=="function"?(d,m,...h)=>d.inputFlag.flag.defaultHelp({flags:m,options:d.inputFlag},...h):d=>d.inputFlag.flag.defaultHelp}:a,s=async a=>{let d=r(u.filter(m=>!m.metadata?.setFromDefault));return Promise.all(a.map(async m=>{try{if(m.helpFunction)return{...m,metadata:{...m.metadata,defaultHelp:await m.helpFunction?.(m,d,this.context)}}}catch{}return m}))},r=a=>Object.fromEntries(a.filter(d=>d.value!==void 0).map(d=>[d.inputFlag.name,d.value])),o=this.mapAndValidateFlags(),c=await Promise.all(Object.entries(this.input.flags).filter(([a,d])=>d.type==="boolean"||d.env||d.default!==void 0||"defaultHelp"in d||o.has(a)).map(([a,d])=>({inputFlag:{flag:d,name:a},tokens:o.get(a)})).map(a=>n(a)).filter(a=>a.valueFunction!==void 0).map(a=>i(a)).map(async a=>a.metadata?.setFromDefault?a:{...a,value:await a.valueFunction?.(a)})),l=r(c.filter(a=>!a.metadata?.setFromDefault)),u=await Promise.all(c.map(async a=>a.metadata?.setFromDefault?{...a,value:await a.valueFunction?.(a,l)}:a)),p=u.some(a=>typeof a.helpFunction=="function")?await s(u):u;return{flags:r(p),metadata:{flags:Object.fromEntries(p.filter(a=>a.metadata).map(a=>[a.inputFlag.name,a.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 n=e.startsWith("--"),i=n?!1:e.startsWith("-"),s=n?this.findLongFlag(e):i?this.findShortFlag(e):void 0;return{isLong:n,name:s}}findLongFlag(e){let n=e.slice(2);if(this.input.flags[n])return n;if(this.flagAliases[n])return this.flagAliases[n].name;if(e.startsWith(on)){let i=this.booleanFlags[e.slice(on.length)];if(i&&i.allowNo)return i.name;let s=this.flagAliases[e.slice(on.length)];if(s&&s.type==="boolean"&&s.allowNo)return s.name}}findShortFlag([e,n]){return this.flagAliases[n]?this.flagAliases[n].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===n&&n!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let e=new Map;for(let n of this.raw.filter(i=>i.type==="flag")){if(!(n.flag in this.input.flags))throw new Ce.CLIError(`Unexpected flag ${n.flag}`);let i=e.get(n.flag)??[];e.set(n.flag,[...i,n])}return e}};ne.Parser=Si});var Ii=y(Mi=>{"use strict";f();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.validate=Td;var Hr=$(),jt=Ai();async function Td(t){let e;function n(){if(t.output.nonExistentFlags?.length>0)throw new jt.NonExistentFlagsError({flags:t.output.nonExistentFlags,parse:t});let h=Object.keys(t.input.args).length;if(t.input.strict&&t.output.argv.length>h){let _=t.output.argv.slice(h);throw new jt.UnexpectedArgsError({args:_,parse:t})}let g=[],b=!1;for(let[_,O]of Object.entries(t.input.args)){if(!O.required)b=!0;else if(b)throw new jt.InvalidArgsSpecError({args:t.input.args,parse:t});O.required&&t.output.args[_]===void 0&&g.push(O)}if(g.length>0){let _=Object.entries(t.input.flags).filter(([O,j])=>j.type==="option"&&!!j.multiple).map(([O])=>O);throw new jt.RequiredArgsError({args:g,flagsWithMultiple:_,parse:t})}}async function i(){let h=Object.entries(t.input.flags).flatMap(([_,O])=>t.output.flags[_]!==void 0?[...O.relationships?m(_,O):[],...O.dependsOn?[a(_,O.dependsOn)]:[],...O.exclusive?[l(_,O.exclusive)]:[],...O.combinable?[u(_,O.combinable)]:[],...O.exactlyOne?[p(_,O.exactlyOne)]:[]]:O.required?[{name:_,reason:`Missing required flag ${_}`,status:"failed",validationFn:"required"}]:O.exactlyOne&&O.exactlyOne.length>0?[o(O)]:O.atLeastOne&&O.atLeastOne.length>0?[c(O)]:[]),b=(await Promise.all(h)).filter(_=>_.status==="failed");if(b.length>0)throw new jt.FailedFlagValidationError({failed:b,parse:t})}async function s(h){if(e)return e;let g=h.map(async _=>typeof _=="string"?[_,t.output.flags[_]]:await _.when(t.output.flags)?[_.name,t.output.flags[_.name]]:null),b=await Promise.all(g);return e=Object.fromEntries(b.filter(_=>_!==null)),e}let r=h=>Object.keys(h).filter(g=>g!==void 0);function o(h){let g={name:h.name,validationFn:"validateExactlyOneAcrossFlags"};if(Object.entries(t.input.flags).map(_=>_[0]).filter(_=>t.output.flags[_]!==void 0).filter(_=>h.exactlyOne&&h.exactlyOne.includes(_)).length===0){let O=`Exactly one of the following must be provided: ${(0,Hr.uniq)(h.exactlyOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{...g,reason:O,status:"failed"}}return{...g,status:"success"}}function c(h){let g={name:h.name,validationFn:"validateAtLeastOneAcrossFlags"};if(Object.entries(t.input.flags).map(_=>_[0]).filter(_=>t.output.flags[_]!==void 0).filter(_=>h.atLeastOne&&h.atLeastOne.includes(_)).length===0){let O=`At least one of the following must be provided: ${(0,Hr.uniq)(h.atLeastOne?.map(j=>`--${j}`)??[]).join(", ")}`;return{...g,reason:O,status:"failed"}}return{...g,status:"success"}}async function l(h,g){let b={name:h,validationFn:"validateExclusive"},_=await s(g),O=r(_);for(let j of O)if(!(t.output.metadata.flags&&t.output.metadata.flags[j]?.setFromDefault)&&!(t.output.metadata.flags&&t.output.metadata.flags[h]?.setFromDefault)&&t.output.flags[j]!==void 0){let H=t.output.metadata.flags?.[j]?.defaultHelp??t.output.flags[j];return{...b,reason:`--${j}=${H} cannot also be provided when using --${h}`,status:"failed"}}return{...b,status:"success"}}async function u(h,g){let b={name:h,validationFn:"validateCombinable"},_=new Set(g.map(j=>typeof j=="string"?j:j.name)),O=await s(g);for(let j of Object.keys(t.output.flags))if(!(t.output.metadata.flags&&t.output.metadata.flags[j]?.setFromDefault)&&!(t.output.metadata.flags&&t.output.metadata.flags[h]?.setFromDefault)&&j!==h&&t.output.flags[j]!==void 0&&!_.has(j)){let H=Object.keys(O).map(V=>`--${V}`).join(", ");return{...b,reason:`Only the following can be provided when using --${h}: ${H}`,status:"failed"}}return{...b,status:"success"}}async function p(h,g){let b={name:h,validationFn:"validateExactlyOne"},_=await s(g),O=r(_);for(let j of O)if(j!==h&&t.output.flags[j]!==void 0)return{...b,reason:`--${j} cannot also be provided when using --${h}`,status:"failed"};return{...b,status:"success"}}async function a(h,g){let b={name:h,validationFn:"validateDependsOn"},_=await s(g);if(!Object.values(_).every(j=>j!==void 0)){let j=Object.keys(_).map(H=>`--${H}`).join(", ");return{...b,reason:`All of the following must be provided when using --${h}: ${j}`,status:"failed"}}return{...b,status:"success"}}async function d(h,g){let b={name:h,validationFn:"validateSome"},_=await s(g);if(!Object.values(_).some(Boolean)){let j=Object.keys(_).map(H=>`--${H}`).join(", ");return{...b,reason:`One of the following must be provided when using --${h}: ${j}`,status:"failed"}}return{...b,status:"success"}}function m(h,g){return(g.relationships??[]).map(b=>{switch(b.type){case"all":return a(h,b.flags);case"none":return l(h,b.flags);case"only":return u(h,b.flags);case"some":return d(h,b.flags);default:throw new Error(`Unknown relationship type: ${b.type}`)}})}return n(),i()}});var Wr=y(an=>{"use strict";f();Object.defineProperty(an,"__esModule",{value:!0});an.flagUsage=Br;an.flagUsages=Nd;var Ld=$(),Rd=ve();function Br(t,e={}){let n=[];t.helpLabel?n.push(t.helpLabel):(t.char&&n.push(`-${t.char}`),t.name&&n.push(` --${t.name}`));let i=t.type==="option"?` ${t.name.toUpperCase()}`:"",s=t.summary||t.description||"";return e.displayRequired&&t.required&&(s=`(required) ${s}`),s=s?(0,Rd.colorize)("dim",s):void 0,[` ${n.join(",").trim()}${i}`,s]}function Nd(t,e={}){return t.length===0?[]:(0,Ld.sortBy)(t,n=>[n.char?-1:1,n.char,n.name]).map(n=>Br(n,e))}});var ki=y(Ee=>{"use strict";f();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.validate=Ee.flagUsages=void 0;Ee.parse=Ud;var Hd=Nr(),Bd=Ii(),Wd=Wr();Object.defineProperty(Ee,"flagUsages",{enumerable:!0,get:function(){return Wd.flagUsages}});var zd=Ii();Object.defineProperty(Ee,"validate",{enumerable:!0,get:function(){return zd.validate}});async function Ud(t,e){let n={"--":e["--"],args:e.args??{},argv:t,context:e.context,flags:e.flags??{},strict:e.strict!==!1},s=await new Hd.Parser(n).parse();return await(0,Bd.validate)({input:n,output:s}),s}});var Jr=y(U=>{"use strict";f();var Vd=U&&U.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Gd=U&&U.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kr=U&&U.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&Vd(n,e,i[s]);return Gd(n,e),n}})(),Kd=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.Command=void 0;var Jd=v("node:url"),zr=v("node:util"),Ri=Kd(G()),Yd=sn(),Ti=Kr(oe()),Pt=Ne(),Xd=k(),Zd=Kr(ki()),Ur=ai(),Li=be(),Vr=$(),$e=ve(),Gr=Ri.default.getInstance().get("@oclif/core");process.stdout.on("error",t=>{if(!(t&&t.code==="EPIPE"))throw t});var Ni=class{argv;config;static _base=`${Gr.name}@${Gr.version}`;static aliases=[];static args={};static baseFlags;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,n){this.argv=e,this.config=n,this.id=this.ctor.id;try{this.debug=(0,Xd.makeDebug)(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(e,n){e||(e=process.argv.slice(2)),typeof n=="string"&&n.startsWith("file://")&&(n=(0,Jd.fileURLToPath)(n));let i=await Yd.Config.load(n||v.main?.filename||__dirname),s=Ri.default.getInstance();s.has("config")||s.set("config",i);let r=new this(e,i);if(!r.id){let o=r.constructor.name.toLowerCase();r.id=o,r.ctor.id=o}return r._run()}get ctor(){return this.constructor}async _run(){let e,n;try{this.removeEnvVar("REDIRECTED"),await this.init(),n=await this.run()}catch(i){e=i,await this.catch(i)}finally{await this.finally(e)}return n&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(n)),!this.parsed&&!(0,Vr.isProd)()&&process.emitWarning(`Command ${this.id} did not parse its arguments. Did you forget to call 'this.parse'?`,{code:"UnparsedCommand"}),n}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{$e.ux.action.stop($e.ux.colorize("bold",$e.ux.colorize("red","!")))}catch{}throw e}}error(e,n={}){return Ti.error(e,n)}exit(e=0){Ti.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("--"),n=this.argv.indexOf("--json");return e===-1?n!==-1:n!==-1&&n<e}log(e="",...n){this.jsonEnabled()||(e=typeof e=="string"?e:(0,zr.inspect)(e),$e.ux.stdout(e,...n))}logJson(e){$e.ux.stdout($e.ux.colorizeJson(e,{pretty:!0,theme:this.config.theme?.json}))}logToStderr(e="",...n){this.jsonEnabled()||(e=typeof e=="string"?e:(0,zr.inspect)(e),$e.ux.stderr(e,...n))}async parse(e,n=this.argv){e||(e=this.ctor);let i={context:this,...e,flags:(0,Ur.aggregateFlags)(e.flags,e.baseFlags,e.enableJsonFlag)},s=await this.config.runHook("preparse",{argv:[...n],options:i}),r=s.successes?.length?s.successes.find(c=>c.plugin.root===Ri.default.getInstance().get("rootPlugin")?.root)?.result??n:n;this.argv=[...r];let o=await Zd.parse(r,i);return this.warnIfFlagDeprecated(o.flags??{}),this.parsed=!0,o}toErrorJson(e){return{error:e}}toSuccessJson(e){return e}warn(e){return this.jsonEnabled()||Ti.warn(e),e}warnIfCommandDeprecated(){let[e]=(0,Pt.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(e)){let n=(0,Li.toConfiguredId)(this.ctor.id,this.config),i=(0,Li.toConfiguredId)(e,this.config);this.warn((0,Pt.formatCommandDeprecationWarning)(i,{to:n}))}if(this.ctor.state==="deprecated"){let n=(0,Li.toConfiguredId)(this.ctor.id,this.config);this.warn((0,Pt.formatCommandDeprecationWarning)(n,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(e){let n=(0,Ur.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(e)){let s=n[i],r=s?.deprecated;if(r&&this.warn((0,Pt.formatFlagDeprecationWarning)(i,r)),s?.deprecateAliases){let c=(0,Vr.uniq)([...s?.aliases??[],...s?.charAliases??[]]).map(u=>u.length===1?`-${u}`:`--${u}`);if(c.length===0)return;let l=c.filter(u=>this.argv.includes(u));for(let u of l){let p=`--${s?.name}`;s?.char&&(p+=` | -${s?.char}`),this.warn((0,Pt.formatFlagDeprecationWarning)(u,{to:p}))}}}}removeEnvVar(e){let n=[];try{n.push(...this.config.scopedEnvVarKeys(e))}catch{n.push(this.config.scopedEnvVarKey(e))}n.map(i=>delete process.env[i])}};U.Command=Ni});var Bi=y(Hi=>{"use strict";f();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.flush=nf;var Qd=Ie();function ef(t,e){function n(i,s=!1){return new Promise(r=>{let o=setTimeout(()=>r(null),i);s&&o.unref()})}return Promise.race([t,n(e,!0).then(()=>(0,Qd.error)("timed out"))])}async function tf(){let t=new Promise(n=>{process.stdout.once("drain",()=>n(null))});if(!process.stdout.write(""))return t}async function nf(t=1e4){await ef(tf(),t)}});var zi=y(Y=>{"use strict";f();var sf=Y&&Y.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Y,"__esModule",{value:!0});Y.versionAddition=Y.helpAddition=void 0;Y.run=df;var Yr=v("node:url"),rf=sf(G()),of=sn(),Wi=pt(),Xr=k(),Qe=Ue(),af=Lt(),cf=ve(),lf=(t,e)=>{if(t.length===0&&!e.isSingleCommandCLI)return!0;let n=(0,Wi.getHelpFlagAdditions)(e);for(let i of t){if(n.includes(i))return!0;if(i==="--")return!1}return!1};Y.helpAddition=lf;var uf=(t,e)=>{let n=e?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...n]).values()].includes(t[0])};Y.versionAddition=uf;async function df(t,e){let n=Qe.Performance.mark(Qe.OCLIF_MARKER_OWNER,"main.run"),i=Qe.Performance.mark(Qe.OCLIF_MARKER_OWNER,"main.run#init"),s=async d=>{let m=await(0,Wi.loadHelpClass)(o);await new m(o,o.pjson.oclif.helpOptions??o.pjson.helpOptions).showHelp(d)};(0,Xr.setLogger)(e);let{debug:r}=(0,Xr.getLogger)("main");r(`process.execPath: ${process.execPath}`),r(`process.execArgv: ${process.execArgv}`),r("process.argv: %O",process.argv),t=t??process.argv.slice(2),e&&(typeof e=="string"&&e.startsWith("file://")||e instanceof Yr.URL)&&(e=(0,Yr.fileURLToPath)(e));let o=await of.Config.load(e??v.main?.filename??__dirname);rf.default.getInstance().set("config",o),o.isSingleCommandCLI&&(t=[af.SINGLE_COMMAND_CLI_SYMBOL,...t]);let[c,...l]=(0,Wi.normalizeArgv)(o,t),u=async(d,m)=>{n?.stop(),i?.stopped||i?.stop(),await Qe.Performance.collect(),Qe.Performance.debug(),await o.runHook("finally",{argv:l,Command:d,error:m,id:c})};if(await o.runHook("init",{argv:l,id:c}),(0,Y.versionAddition)(t,o)){cf.ux.stdout(o.userAgent),await u();return}if((0,Y.helpAddition)(t,o)){await s(t),await u();return}let p=o.findCommand(c);if(!p&&(o.flexibleTaxonomy?null:o.findTopic(c))){await s([c]),await u();return}i?.stop();let a;try{return await o.runCommand(c,l,p)}catch(d){throw a=d,d}finally{await u(p,a)}}});var Zr=y(Ui=>{"use strict";f();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.execute=_f;var ff=oe(),pf=Kt(),hf=Bi(),mf=zi(),gf=re();async function _f(t){if(!t.dir&&!t.loadOptions)throw new ff.CLIError("dir or loadOptions is required.");return t.development&&(process.env.NODE_ENV="development",gf.settings.debug=!0),(0,mf.run)(t.args??process.argv.slice(2),t.loadOptions??t.dir).then(async e=>((0,hf.flush)(),e)).catch(async e=>(0,pf.handle)(e))}});var eo=y(Qr=>{"use strict";f();Object.defineProperty(Qr,"__esModule",{value:!0})});var Af=y(w=>{f();var yf=w&&w.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bf=w&&w.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),et=w&&w.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&yf(n,e,i[s]);return bf(n,e),n}})();Object.defineProperty(w,"__esModule",{value:!0});w.ux=w.toStandardizedId=w.toConfiguredId=w.settings=w.Performance=w.Parser=w.ModuleLoader=w.getLogger=w.Interfaces=w.loadHelpClass=w.HelpBase=w.Help=w.CommandHelp=w.flush=w.Flags=w.execute=w.handle=w.Errors=w.Plugin=w.Config=w.Command=w.Args=void 0;var vf=$();function wf(){try{process.cwd()}catch(t){t.code==="ENOENT"&&process.stderr.write(`WARNING: current directory does not exist
|
|
83
|
+
`)}}function Of(){if(!(process.env.OCLIF_DISABLE_ENGINE_WARNING&&(0,vf.isTruthy)(process.env.OCLIF_DISABLE_ENGINE_WARNING)))try{let t=v("node:path"),e=io(),n=t.join(__dirname,".."),i=v(t.join(n,"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{}}wf();Of();w.Args=et(Xi());var jf=Jr();Object.defineProperty(w,"Command",{enumerable:!0,get:function(){return jf.Command}});var to=sn();Object.defineProperty(w,"Config",{enumerable:!0,get:function(){return to.Config}});Object.defineProperty(w,"Plugin",{enumerable:!0,get:function(){return to.Plugin}});w.Errors=et(oe());var Pf=Kt();Object.defineProperty(w,"handle",{enumerable:!0,get:function(){return Pf.handle}});var Cf=Zr();Object.defineProperty(w,"execute",{enumerable:!0,get:function(){return Cf.execute}});w.Flags=et(ri());var Ef=Bi();Object.defineProperty(w,"flush",{enumerable:!0,get:function(){return Ef.flush}});var cn=pt();Object.defineProperty(w,"CommandHelp",{enumerable:!0,get:function(){return cn.CommandHelp}});Object.defineProperty(w,"Help",{enumerable:!0,get:function(){return cn.Help}});Object.defineProperty(w,"HelpBase",{enumerable:!0,get:function(){return cn.HelpBase}});Object.defineProperty(w,"loadHelpClass",{enumerable:!0,get:function(){return cn.loadHelpClass}});w.Interfaces=et(eo());var $f=k();Object.defineProperty(w,"getLogger",{enumerable:!0,get:function(){return $f.getLogger}});var qf=zi();Object.defineProperty(w,"run",{enumerable:!0,get:function(){return qf.run}});w.ModuleLoader=et(st());w.Parser=et(ki());var Df=Ue();Object.defineProperty(w,"Performance",{enumerable:!0,get:function(){return Df.Performance}});var xf=re();Object.defineProperty(w,"settings",{enumerable:!0,get:function(){return xf.settings}});var no=be();Object.defineProperty(w,"toConfiguredId",{enumerable:!0,get:function(){return no.toConfiguredId}});Object.defineProperty(w,"toStandardizedId",{enumerable:!0,get:function(){return no.toStandardizedId}});var Ff=ve();Object.defineProperty(w,"ux",{enumerable:!0,get:function(){return Ff.ux}})});export{Af as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as E}from"./chunk-ZTE46E4Z.js";import{Fb as $,Hb as T,Pb as O,Ta as V,ma as N}from"./chunk-3TFUSDHY.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
2
2
|
`);let s;for(;(s=C.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
|
|
3
3
|
`),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){e=e||{};let n=x(e);e.path=n;let r=l.configDotenv(e);if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=A(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),f=M(r,i);t=l.decrypt(f.ciphertext,f.key);break}catch(i){if(o+1>=a)throw i}return l.parse(t)}function B(e){console.log(`[dotenv@${D}][WARN] ${e}`)}function v(e){console.log(`[dotenv@${D}][DEBUG] ${e}`)}function j(e){console.log(`[dotenv@${D}] ${e}`)}function A(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function M(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let f=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw f.code="INVALID_DOTENV_KEY",f}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function x(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)b.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return b.existsSync(n)?n:null}function k(e){return e[0]==="~"?y.join(q.homedir(),e.slice(1)):e}function W(e){let n=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;(n||!r)&&j("Loading env from encrypted .env.vault");let s=l._parseVault(e),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),l.populate(a,s,e),{parsed:s}}function G(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug),a=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?r=e.encoding:s&&v("No encoding is specified. UTF-8 is used by default");let t=[n];if(e&&e.path)if(!Array.isArray(e.path))t=[k(e.path)];else{t=[];for(let u of e.path)t.push(k(u))}let o,i={};for(let u of t)try{let c=l.parse(b.readFileSync(u,{encoding:r}));l.populate(i,c,e)}catch(c){s&&v(`Failed to load ${u} ${c.message}`),o=c}let f=process.env;if(e&&e.processEnv!=null&&(f=e.processEnv),l.populate(f,i,e),s||!a){let u=Object.keys(i).length,c=[];for(let p of t)try{let h=y.relative(process.cwd(),p);c.push(h)}catch(h){s&&v(`Failed to load ${p} ${h.message}`),o=h}j(`injecting env (${u}) from ${c.join(",")}`)}return o?{parsed:i,error:o}:{parsed:i}}function J(e){if(A(e).length===0)return l.configDotenv(e);let n=x(e);return n?l._configVault(e):(B(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),l.configDotenv(e))}function Q(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=F.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,f=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||f){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function H(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&v(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var l={configDotenv:G,_configVault:W,_parseVault:U,config:J,decrypt:Q,parse:S,populate:H};d.exports.configDotenv=l.configDotenv;d.exports._configVault=l._configVault;d.exports._parseVault=l._parseVault;d.exports.config=l.config;d.exports.decrypt=l.decrypt;d.exports.parse=l.parse;d.exports.populate=l.populate;d.exports=l});m();var L=Y(K());async function oe(e){if(O(T`Reading the .env file at ${$.path(e)}`),!await V(e))throw new E(`The environment file at ${e} does not exist.`);let n=await N(e);return{path:e,variables:(0,L.parse)(n)}}function se(e,n){let r=[],s=e===null?[]:e.split(`
|
|
4
4
|
`),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=_(t.key,t.value+o.slice(0,-1),t.quote),c=n[t.key];c&&(a.push(t.key),u=_(t.key,c)),r.push(u),t=void 0}else t.value+=`${o}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-4FEBSLSU.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-4P7PWLUN.js";import{b as P,c as w,d as v}from"./chunk-U564K7SX.js";import{a as F}from"./chunk-M4YPMHIM.js";import{a as x}from"./chunk-QG7TELFC.js";import{ua as y}from"./chunk-NOKCVDYD.js";import{b as h,c as m}from"./chunk-2Y6CYLKF.js";import{B as d,I as l}from"./chunk-6YCGMS7X.js";import{Pb as r}from"./chunk-3TFUSDHY.js";import{a as N}from"./chunk-CTNBSUVU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
|