@shopify/cli 4.6.1 → 4.7.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-6LI5GLWS.js +1 -0
- package/dist/analytics-UNRIIG4Y.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-LURVEPYP.js → chunk-2CYVZUYT.js} +1 -1
- package/dist/{chunk-BDDROQGK.js → chunk-2HK4MFWP.js} +3 -3
- package/dist/chunk-2JDCVEFK.js +1 -0
- package/dist/chunk-2SZOPJYI.js +1 -0
- package/dist/chunk-2U4P6UFZ.js +6 -0
- package/dist/{chunk-EVIO6OWW.js → chunk-2WJAAJVX.js} +1 -1
- package/dist/chunk-37TEEITE.js +2 -0
- package/dist/chunk-3K6VHXC2.js +4 -0
- package/dist/chunk-4HV6A6UH.js +8 -0
- package/dist/chunk-4JY2P2A5.js +1 -0
- package/dist/chunk-4LRG5YBS.js +3 -0
- package/dist/chunk-4W3UE2ZI.js +1 -0
- package/dist/chunk-5CADTCJE.js +25 -0
- package/dist/chunk-5CR5YJTU.js +11 -0
- package/dist/chunk-5CYJG63I.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5HPBQ6U5.js +1 -0
- package/dist/chunk-5NO5OXYP.js +15 -0
- package/dist/chunk-63CIFL36.js +6 -0
- package/dist/chunk-6EBLULOC.js +1 -0
- package/dist/{chunk-5QDM4XIK.js → chunk-6ENBE43F.js} +1 -1
- package/dist/chunk-6OFGSZD6.js +1 -0
- package/dist/chunk-6PDR2IUL.js +11 -0
- package/dist/chunk-6VGJVXZI.js +3 -0
- package/dist/{chunk-YHH3JA36.js → chunk-6VRXGEIW.js} +1 -1
- package/dist/chunk-6WZYX5RO.js +1 -0
- package/dist/chunk-7AALWJAO.js +7 -0
- package/dist/chunk-7DOWT5JZ.js +20 -0
- package/dist/chunk-7JIQXGDE.js +9 -0
- package/dist/chunk-7MHANY34.js +1 -0
- package/dist/chunk-7WTNEG2F.js +3 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-ACTDYTAV.js +317 -0
- package/dist/{chunk-Y2PC2BBJ.js → chunk-AEUCDGTB.js} +4 -4
- package/dist/chunk-AGOEROAI.js +10 -0
- package/dist/{chunk-DC7TXY4K.js → chunk-AH2ZGMDM.js} +1 -1
- package/dist/chunk-AMLWPYNA.js +4 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BR6DBMQA.js +5 -0
- package/dist/chunk-CFWHR74L.js +1 -0
- package/dist/chunk-CHMEDVDZ.js +15 -0
- package/dist/chunk-CIH6LPTG.js +6 -0
- package/dist/chunk-CMYQXGLO.js +1 -0
- package/dist/chunk-CTRXLZAJ.js +1 -0
- package/dist/{chunk-NVQOAHID.js → chunk-CYOFLJ3Z.js} +1 -1
- package/dist/{chunk-P2P2MAZQ.js → chunk-CZJZCJRX.js} +1 -1
- package/dist/chunk-CZPGC2E7.js +1 -0
- package/dist/{chunk-UTK6V2NE.js → chunk-D2K2ZBKH.js} +8 -8
- package/dist/chunk-DHU57LKD.js +1 -0
- package/dist/chunk-DKL6N3L2.js +1 -0
- package/dist/chunk-DMXQLI35.js +1 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/{chunk-LDWMX3KZ.js → chunk-DQCIORGH.js} +1 -1
- package/dist/chunk-DQFSKPKL.js +6 -0
- package/dist/{chunk-RMF3YNWE.js → chunk-E2W5OYYM.js} +1 -1
- package/dist/chunk-E5T4YRGW.js +1 -0
- package/dist/chunk-EOMCXBCS.js +5 -0
- package/dist/{chunk-GD5IRJBE.js → chunk-EW55WWT7.js} +1 -1
- package/dist/{chunk-7EE7YOCR.js → chunk-F5HCSUXC.js} +5 -5
- package/dist/{chunk-WOYI6SDK.js → chunk-FCGKO2KY.js} +1 -1
- package/dist/{chunk-J3D4KQOQ.js → chunk-FULWTZS6.js} +1 -1
- package/dist/chunk-FWPJEL6Q.js +3 -0
- package/dist/chunk-GKOBFX4A.js +1 -0
- package/dist/chunk-GLWQMLUC.js +1 -0
- package/dist/chunk-GMTNOCMS.js +375 -0
- package/dist/chunk-GSCWZR22.js +1 -0
- package/dist/chunk-GZ64KWHX.js +8 -0
- package/dist/{chunk-EZBB2ULE.js → chunk-H5KWM27L.js} +1 -1
- package/dist/chunk-HHVHVGRT.js +1 -0
- package/dist/{chunk-LXOBW4AW.js → chunk-HLNJL4B6.js} +1 -1
- package/dist/{chunk-U3P5TIIR.js → chunk-HZIX3DIT.js} +1 -1
- package/dist/chunk-I3N6NPHF.js +2 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JJJTPEMD.js +1 -0
- package/dist/{chunk-KRZABRYT.js → chunk-JLGA3B7P.js} +1 -1
- package/dist/chunk-JQ2B3VHR.js +7 -0
- package/dist/{chunk-STCLJWHD.js → chunk-JQISGC7D.js} +1 -1
- package/dist/chunk-JQVXH26X.js +6 -0
- package/dist/{chunk-PCTVUTV3.js → chunk-JUKAWTYY.js} +1 -1
- package/dist/{chunk-XZ2KUBFJ.js → chunk-JZMRBJH3.js} +2 -2
- package/dist/chunk-JZXA3H5K.js +1 -0
- package/dist/chunk-K4KTNINH.js +1 -0
- package/dist/chunk-KCS75ZM4.js +1 -0
- package/dist/{chunk-WE3VLC2S.js → chunk-KIYHEMHD.js} +7 -7
- package/dist/chunk-KK24VGVE.js +6 -0
- package/dist/{chunk-7TXWKLPY.js → chunk-KOVAFUYN.js} +1 -1
- package/dist/{chunk-NENUUNWB.js → chunk-KUNDCAQN.js} +1 -1
- package/dist/{chunk-NKBSS7YL.js → chunk-L67BU25M.js} +1 -1
- package/dist/{chunk-6HQMZ324.js → chunk-LDF4PQ3B.js} +18 -18
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LJM2DUXN.js +1 -0
- package/dist/{chunk-XWPPBOGF.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LQCR4TGH.js +3 -0
- package/dist/{chunk-QARALFHD.js → chunk-LRQYUWWB.js} +1 -1
- package/dist/{chunk-YR7K4NQT.js → chunk-LWJA2DQG.js} +1 -1
- package/dist/{chunk-NKT5U6IJ.js → chunk-LZ3GZ7NS.js} +1 -1
- package/dist/chunk-MB7E5GEY.js +2 -0
- package/dist/{chunk-7MD5MIGN.js → chunk-MLZLDL6B.js} +8 -8
- package/dist/chunk-MRCWOOSF.js +8 -0
- package/dist/chunk-N6YTJXIS.js +18 -0
- package/dist/chunk-NEMPLS7C.js +1 -0
- package/dist/chunk-OE3F7XXU.js +4 -0
- package/dist/chunk-OORWOTAP.js +3 -0
- package/dist/chunk-OUZGGWFN.js +1 -0
- package/dist/chunk-P5MNNBSO.js +1 -0
- package/dist/chunk-PAAKBWSF.js +1 -0
- package/dist/{chunk-M5YGJYNI.js → chunk-PANGX7SA.js} +1 -1
- package/dist/{chunk-7L5AIZOP.js → chunk-PIFW2R3S.js} +1 -1
- package/dist/chunk-PWSI275S.js +7 -0
- package/dist/chunk-Q5DQGV3M.js +1 -0
- package/dist/chunk-QBIVQXUJ.js +6 -0
- package/dist/chunk-QEB3HUQE.js +19 -0
- package/dist/{chunk-C7LFLIRT.js → chunk-QKGZWOOY.js} +1 -1
- package/dist/chunk-QPWMD2VR.js +1 -0
- package/dist/chunk-QRT4A2RV.js +3 -0
- package/dist/chunk-QXHENYJH.js +2 -0
- package/dist/{chunk-GJEG7VGX.js → chunk-QZBSCOJV.js} +1 -1
- package/dist/chunk-R2R6JDNH.js +1 -0
- package/dist/chunk-RUFQCXBX.js +16 -0
- package/dist/chunk-RY2SJVWM.js +12 -0
- package/dist/chunk-RZFBGBNA.js +1 -0
- package/dist/chunk-S3P5WWJD.js +1 -0
- package/dist/chunk-SEVSMWNX.js +1 -0
- package/dist/chunk-SJMTETSU.js +32 -0
- package/dist/chunk-SSJGWLCW.js +28 -0
- package/dist/chunk-SYADOUBB.js +7 -0
- package/dist/chunk-T5JXQ7KO.js +1 -0
- package/dist/chunk-TCTVI6PK.js +1 -0
- package/dist/chunk-TSLQZTXR.js +1 -0
- package/dist/chunk-TTAPXLI5.js +1 -0
- package/dist/{chunk-MMP3F6LO.js → chunk-TY4W7AYX.js} +1 -1
- package/dist/chunk-TYIGOVRQ.js +3 -0
- package/dist/{chunk-W2357IN2.js → chunk-U2Z5NMXV.js} +1 -1
- package/dist/{chunk-X5RH4ALT.js → chunk-U6HYEGAE.js} +1 -1
- package/dist/chunk-U7R6LYPJ.js +5 -0
- package/dist/chunk-UPJLZHHR.js +4 -0
- package/dist/chunk-UVQL7RUY.js +1 -0
- package/dist/chunk-V2HCVJYF.js +1 -0
- package/dist/chunk-V5SC2RYQ.js +2 -0
- package/dist/chunk-VKSR6MJG.js +2 -0
- package/dist/chunk-VRVP2GQL.js +5 -0
- package/dist/{chunk-MY2H5XPY.js → chunk-WCRZJY3P.js} +1 -1
- package/dist/{chunk-LJZIIURR.js → chunk-WHLGNDRE.js} +1 -1
- package/dist/{chunk-HVMEBH24.js → chunk-WKUGSFTB.js} +3 -3
- package/dist/chunk-X4XP2RQJ.js +1 -0
- package/dist/chunk-XAOYKECS.js +1 -0
- package/dist/chunk-XCBEYRQI.js +3 -0
- package/dist/chunk-XHZ5BWXL.js +5 -0
- package/dist/{chunk-H5I7BSNG.js → chunk-XLURZ6GL.js} +52 -52
- package/dist/chunk-XRT2W5Y2.js +10 -0
- package/dist/chunk-XUEMMLXK.js +1 -0
- package/dist/chunk-Y34LWI3S.js +19 -0
- package/dist/chunk-YHPBDS52.js +16 -0
- package/dist/{chunk-5INBKZRD.js → chunk-YIZZ5LZN.js} +1 -1
- package/dist/chunk-YN6A26QL.js +836 -0
- package/dist/chunk-YOO7DLOT.js +1 -0
- package/dist/chunk-YUVE2I3C.js +1 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-Z5K4J7HQ.js +1 -0
- package/dist/chunk-ZCNIR6YU.js +1 -0
- package/dist/{chunk-K4M32VKU.js → chunk-ZO74GSWC.js} +1 -1
- package/dist/{chunk-FBVNXRVB.js → chunk-ZRLEAF7M.js} +1 -1
- package/dist/chunk-ZSFAURIH.js +3 -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/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- 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/cli/services/doctor-release/theme/tests/init.js +4 -8
- package/dist/cli/services/doctor-release/theme/tests/push.js +3 -4
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OAGJBITE.js +1 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/deprecations-K3NPRKBF.js +1 -0
- package/dist/dist-EXJEE23W.js +1 -0
- package/dist/dist-S62Z6IFV.js +1 -0
- package/dist/environments-ALH2N36U.js +1 -0
- package/dist/error-YX56C43A.js +1 -0
- package/dist/error-handler-FDCH72NH.js +1 -0
- package/dist/fs-SKHQZZTQ.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +2 -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/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-V5VORI3F.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/local-GX5AN6ZS.js +1 -0
- package/dist/metadata-XUJUTBTB.js +1 -0
- package/dist/{morph-ABSWZEVT.js → morph-77RHJICZ.js} +1 -1
- package/dist/node-package-manager-3WIYU7Y3.js +1 -0
- package/dist/notifications-system-RHULO564.js +1 -0
- package/dist/os-M6X7KOR4.js +1 -0
- package/dist/output-X47P6ICP.js +1 -0
- package/dist/{prettier-6ZMB2MMO.js → prettier-RVUAAWC7.js} +1 -1
- package/dist/system-SR5G7WEW.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-VYWSLAQ6.js +1 -0
- package/dist/upgrade-PFQ7JMXG.js +1 -0
- package/dist/version-FK4ETQ22.js +1 -0
- package/dist/version-U4GM2LNG.js +1 -0
- package/dist/workerd-NAPS5TA7.js +18 -0
- package/oclif.manifest.json +146 -120
- package/package.json +7 -8
- package/dist/analytics-3ICKUTK2.js +0 -1
- package/dist/analytics-73NVZI4Z.js +0 -1
- package/dist/chunk-25Z36VJG.js +0 -1
- package/dist/chunk-2AVFG5KT.js +0 -1
- package/dist/chunk-2DMTEIS3.js +0 -2
- package/dist/chunk-2GB3EAD3.js +0 -153
- package/dist/chunk-2NB4P6BB.js +0 -5
- package/dist/chunk-2OYQHHKC.js +0 -3
- package/dist/chunk-2VJKXWLG.js +0 -4
- package/dist/chunk-3Q5ESVIY.js +0 -1
- package/dist/chunk-3XCIUG5P.js +0 -1
- package/dist/chunk-445NFHXL.js +0 -3
- package/dist/chunk-4BPFJDH3.js +0 -1
- package/dist/chunk-4E5RGEJO.js +0 -1
- package/dist/chunk-4IHSAT76.js +0 -2
- package/dist/chunk-4TANJ4JK.js +0 -1
- package/dist/chunk-534U3DKZ.js +0 -6
- package/dist/chunk-56T6YCU2.js +0 -1
- package/dist/chunk-5HJTCBBV.js +0 -317
- package/dist/chunk-5Q4WAGQL.js +0 -3
- package/dist/chunk-65CEF3SM.js +0 -8
- package/dist/chunk-6KAWCN3I.js +0 -10
- package/dist/chunk-6ZPHB5U2.js +0 -3
- package/dist/chunk-7AWKXTNS.js +0 -4
- package/dist/chunk-7US4TVO2.js +0 -32
- package/dist/chunk-A4SBXDZB.js +0 -14
- package/dist/chunk-A7IDVXF7.js +0 -1
- package/dist/chunk-AFM3UZQO.js +0 -684
- package/dist/chunk-AHLNB45E.js +0 -3
- package/dist/chunk-ARCAYYRW.js +0 -1
- package/dist/chunk-B3U6GDHL.js +0 -7
- package/dist/chunk-BCZMDFI2.js +0 -370
- package/dist/chunk-BKJMVAI7.js +0 -1
- package/dist/chunk-BPDUBZMU.js +0 -1
- package/dist/chunk-BQOKTPUU.js +0 -1
- package/dist/chunk-CELVG4AL.js +0 -6
- package/dist/chunk-CNI7ZUST.js +0 -3
- package/dist/chunk-CONJQV7M.js +0 -11
- package/dist/chunk-CV5ELBVU.js +0 -1
- package/dist/chunk-DXUISRMZ.js +0 -2
- package/dist/chunk-EHV7EKB3.js +0 -2
- package/dist/chunk-EJDWYASP.js +0 -1
- package/dist/chunk-EQNJ2NQD.js +0 -3
- package/dist/chunk-FG5QXIQH.js +0 -9
- package/dist/chunk-FGG6HXIZ.js +0 -1
- package/dist/chunk-FJCZ4F6J.js +0 -5
- package/dist/chunk-FKH5ZF2C.js +0 -1
- package/dist/chunk-GT6BJ2GK.js +0 -1
- package/dist/chunk-GWNV44NZ.js +0 -18
- package/dist/chunk-GXO2RRV2.js +0 -1
- package/dist/chunk-H5YC3EP6.js +0 -16
- package/dist/chunk-HY3INWPI.js +0 -1
- package/dist/chunk-I6ST5X56.js +0 -1
- package/dist/chunk-ID6ASBGV.js +0 -15
- package/dist/chunk-IDQT2UY7.js +0 -1
- package/dist/chunk-IIOFR25P.js +0 -3
- package/dist/chunk-IJEDTDSJ.js +0 -25
- package/dist/chunk-ILICQWUF.js +0 -1
- package/dist/chunk-IMWEC6NF.js +0 -16
- package/dist/chunk-ITNFDLZ4.js +0 -1
- package/dist/chunk-IU5U6KKO.js +0 -4
- package/dist/chunk-IXCDFXMB.js +0 -2
- package/dist/chunk-JRTJZAFJ.js +0 -19
- package/dist/chunk-JT7YTXJ7.js +0 -1
- package/dist/chunk-JX4HSDDG.js +0 -28
- package/dist/chunk-K5GJNXDK.js +0 -1
- package/dist/chunk-KCNOFNS5.js +0 -11
- package/dist/chunk-KM2R6O7V.js +0 -6
- package/dist/chunk-KNFDN3AP.js +0 -1
- package/dist/chunk-LEDVV6XK.js +0 -1
- package/dist/chunk-LEEVJH4B.js +0 -1
- package/dist/chunk-MDQHEW7V.js +0 -8
- package/dist/chunk-MPYCIVRA.js +0 -7
- package/dist/chunk-N4RYVOXT.js +0 -2
- package/dist/chunk-NB6HHZ36.js +0 -1
- package/dist/chunk-NEK2KNKR.js +0 -8
- package/dist/chunk-NJONAV7V.js +0 -1
- package/dist/chunk-OHQTOHUX.js +0 -15
- package/dist/chunk-PKR6HS4T.js +0 -6
- package/dist/chunk-PKRDBS7O.js +0 -5
- package/dist/chunk-PMD6S7YG.js +0 -1
- package/dist/chunk-PUOCHFFI.js +0 -1
- package/dist/chunk-Q2DPBMV4.js +0 -1
- package/dist/chunk-Q6XT3YKV.js +0 -3
- package/dist/chunk-QEL3F2NY.js +0 -5
- package/dist/chunk-R2W5B7YI.js +0 -3
- package/dist/chunk-REABQXMP.js +0 -1
- package/dist/chunk-RTPVI7LE.js +0 -3
- package/dist/chunk-SFZQFEZB.js +0 -6
- package/dist/chunk-STJ3LWFL.js +0 -1
- package/dist/chunk-STJWHL36.js +0 -7
- package/dist/chunk-SZJHOXS6.js +0 -6
- package/dist/chunk-TEPMNVJN.js +0 -1
- package/dist/chunk-TNSMROUR.js +0 -1
- package/dist/chunk-UDDJQ34Y.js +0 -1
- package/dist/chunk-UKQ7NE5V.js +0 -1
- package/dist/chunk-UOQBCBKY.js +0 -1
- package/dist/chunk-UQWT2PFO.js +0 -1
- package/dist/chunk-V26QBVCN.js +0 -1
- package/dist/chunk-VVEQ4IHW.js +0 -1
- package/dist/chunk-VXBHTSMX.js +0 -20
- package/dist/chunk-WDCCITSG.js +0 -1
- package/dist/chunk-WGMYSPR2.js +0 -10
- package/dist/chunk-WHT2RCAD.js +0 -11
- package/dist/chunk-WW7TENNA.js +0 -1
- package/dist/chunk-WXJGZGQS.js +0 -1
- package/dist/chunk-X4AZV5A2.js +0 -1
- package/dist/chunk-XBBP5BWC.js +0 -7
- package/dist/chunk-XH32NPYG.js +0 -1
- package/dist/chunk-Y7A7Z2V3.js +0 -1
- package/dist/chunk-YE7XCF44.js +0 -1
- package/dist/chunk-YIFT67BD.js +0 -4
- package/dist/chunk-Z36JS7OX.js +0 -6
- package/dist/chunk-ZHPPBTNE.js +0 -28
- package/dist/chunk-ZMSE5SQB.js +0 -1
- package/dist/conf-store-YW3NWYCN.js +0 -1
- package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
- package/dist/deprecations-VW7UIMZX.js +0 -1
- package/dist/dist-I3VCRVOE.js +0 -1
- package/dist/dist-MP4AU5F4.js +0 -1
- package/dist/environments-5P57CTOG.js +0 -1
- package/dist/error-U7DOQOWG.js +0 -1
- package/dist/error-handler-AOEXPYI7.js +0 -1
- package/dist/fs-K5NT4W2Q.js +0 -1
- package/dist/hooks/app-init.d.ts +0 -9
- package/dist/hooks/app-init.js +0 -1
- package/dist/is-global-CFYYUAIJ.js +0 -1
- package/dist/is-wsl-UEMXYJPN.js +0 -1
- package/dist/lib-JKLF33A7.js +0 -1
- package/dist/local-BRRQOCGY.js +0 -1
- package/dist/local-storage-FVSI2IBZ.js +0 -1
- package/dist/metadata-HVSGVFUQ.js +0 -1
- package/dist/node-package-manager-6JURLQKU.js +0 -1
- package/dist/notifications-system-BTEFKXCS.js +0 -1
- package/dist/output-EXMTVS2V.js +0 -1
- package/dist/system-DUJDILSL.js +0 -1
- package/dist/ui-AX6ZMY6P.js +0 -1
- package/dist/upgrade-5TEVQNLY.js +0 -1
- package/dist/version-7LKOAVDW.js +0 -1
- package/dist/version-PRFBZAWQ.js +0 -1
- package/dist/workerd-MFV7EBVM.js +0 -18
- /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as Mc,e as jc,f as Bc}from"./chunk-
|
|
1
|
+
import{a as Mc,e as jc,f as Bc}from"./chunk-ZSFAURIH.js";import{a as $c}from"./chunk-LWJA2DQG.js";import{c as Rc,i as Lc,o as hy}from"./chunk-NJPL5BTN.js";import{b as fn}from"./chunk-RY2SJVWM.js";import{C as cn,R as wc,T as Ec,U as bc,ja as Dc,na as Cc,s as xc}from"./chunk-YN6A26QL.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-KK24VGVE.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-GMTNOCMS.js";import{a as ly}from"./chunk-EOMCXBCS.js";import{h as I,k as hn}from"./chunk-R2R6JDNH.js";import{a as gc,c as yc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as vc,k as ho,m as ay,n as fo,p as uy,u as cy}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as oy}from"./chunk-ET2CGROE.js";import{c as sy}from"./chunk-TOLPNBZK.js";import{$a as mc,Ab as me,Ca as uo,Ea as un,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,gb as Sc,ia as Q0,ma as X,mb as Oc,ob as Pc,pa as br,qb as gt,rb as Nc,sb as Ar,ua as V,wa as on,xb as it,ya as an}from"./chunk-Y34LWI3S.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/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",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"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"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=Dr(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
|
|
2
2
|
`)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Gy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,zy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`)}),await this.flushing}log(t){t=Jy(Xy(t));let r=t.split(`
|
|
5
|
-
`).map(i=>`${Wy()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};pn.Logger=Eo});var Kt=E(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.config=void 0;var pi=Pt(),Vy=bo();function Yy(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}mn.config={get debug(){return!!pi.settings.debug},set debug(e){pi.settings.debug=e,e&&Yy()},get errlog(){return pi.settings.errlog},set errlog(e){e?(this.errorLogger=new Vy.Logger(e),pi.settings.errlog=e):(delete this.errorLogger,delete pi.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var gi=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.CLIError=vt.addOclifExitCode=void 0;var Qc=gi(Be()),Ky=gi(
|
|
5
|
+
`).map(i=>`${Wy()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};pn.Logger=Eo});var Kt=E(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.config=void 0;var pi=Pt(),Vy=bo();function Yy(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}mn.config={get debug(){return!!pi.settings.debug},set debug(e){pi.settings.debug=e,e&&Yy()},get errlog(){return pi.settings.errlog},set errlog(e){e?(this.errorLogger=new Vy.Logger(e),pi.settings.errlog=e):(delete this.errorLogger,delete pi.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var gi=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.CLIError=vt.addOclifExitCode=void 0;var Qc=gi(Be()),Ky=gi(yc()),Do=gi(co()),Qy=gi(ho()),Zy=gi(Ve()),ev=Yt(),tv=Kt();function Zc(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?Zy.default.getInstance().get("exitCodes")?.default??2:t.exit,e}vt.addOclifExitCode=Zc;var mi=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),Zc(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return Qc.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Ky.default)(super.stack,{pretty:!0})}render(){if(tv.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,Qy.default)(t,ev.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Do.default)(t,3),t=(0,Do.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Do.default)(t,1),t}};vt.CLIError=mi;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return Qc.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(mi||(vt.CLIError=mi={}))});var yn=E(gn=>{"use strict";y();Object.defineProperty(gn,"__esModule",{value:!0});gn.ExitError=void 0;var rv=Qt(),Co=class extends rv.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};gn.ExitError=Co});var xn=E(Zt=>{"use strict";y();var el=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.applyPrettyPrintOptions=void 0;var vn=el(co()),iv=el(ho()),nv=Yt(),sv=Kt();function ov(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}Zt.applyPrettyPrintOptions=ov;var av=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
|
|
6
6
|
`);return`${t}
|
|
7
7
|
${(0,vn.default)(r,2)}`};function uv(e){if(sv.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,c=i?`${n||"Error"}: ${i}`:void 0,h=r?`Code: ${r}`:void 0,m=av(s),d=o?`Reference: ${o}`:void 0,f=[c,h,m,d].filter(Boolean).join(`
|
|
8
8
|
`),p=(0,iv.default)(f,nv.errtermwidth-6,{hard:!0,trim:!1});return p=(0,vn.default)(p,3),p=(0,vn.default)(p,1,{includeEmptyLines:!0,indent:t||""}),p=(0,vn.default)(p,1),p}Zt.default=uv});var So=E(Oe=>{"use strict";y();var cv=Oe&&Oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),lv=Oe&&Oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hv=Oe&&Oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&cv(t,e,r);return lv(t,e),t},fv=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.error=void 0;var dv=fv(Ot()),tl=Kt(),rl=Qt(),il=hv(xn());function nl(e,t={}){let r;if(typeof e=="string")r=new rl.CLIError(e,t);else if(e instanceof Error)r=(0,rl.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,il.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,il.default)(r);i&&dv.default.stderr(i+`
|
|
9
9
|
`),tl.config.errorLogger&&tl.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=nl;Oe.default=nl});var _o=E(wn=>{"use strict";y();Object.defineProperty(wn,"__esModule",{value:!0});wn.ModuleLoadError=void 0;var pv=Qt(),Ao=class extends pv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};wn.ModuleLoadError=Ao});var ol=E((AT,sl)=>{y();sl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var cl=E((FT,ul)=>{"use strict";y();var mv=ol(),gv=Array.prototype.concat,yv=Array.prototype.slice,al=ul.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];mv(o)?r=gv.call(r,yv.call(o)):r.push(o)}return r};al.wrap=function(e){return function(){return e(al(arguments))}}});var dl=E((TT,fl)=>{y();var yi=iy(),vi=cl(),ll=Object.hasOwnProperty,hl=Object.create(null);for(En in yi)ll.call(yi,En)&&(hl[yi[En]]=En);var En,Pe=fl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,m;if(c=e.match(r)){for(m=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(c=e.match(t)){for(c=c[1],m=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:ll.call(yi,c[1])?(s=yi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=vi(arguments);return"#"+bn(e[0])+bn(e[1])+bn(e[2])+(e[3]<1?bn(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=vi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=vi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=vi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=vi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return hl[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function bn(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var gl=E((PT,ml)=>{y();var Fr=dl(),Ie=ny(),pl=["keyword","gray","hex"],Fo={};for(let e of Object.keys(Ie))Fo[[...Ie[e].labels].sort().join("")]=e;var Dn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in pl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=ko(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Fo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Fo[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=ko(c)}if(Dn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=Dn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(xv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(pl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...wv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=ko(r,t)),new he(i,e)}}function vv(e,t){return Number(e.toFixed(t))}function xv(e){return function(t){return vv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(Dn[i]||(Dn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function wv(e){return Array.isArray(e)?e:[e]}function ko(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}ml.exports=he});var yl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["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"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var Ev=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),bv=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ev(t,e,r);return bv(t,e),t},Cv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var vl=Cv(Be()),Sv=Dv(gl()),Av=yl();function xl(e){return Av.STANDARD_CHALK.includes(e)}function _v(e,t){return xl(e)?vl.default[e](t):e?vl.default.hex(e)(t):t}ye.colorize=_v;function Fv(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,wl(r)]).filter(([t,r])=>r))}ye.parseTheme=Fv;function wl(e){try{return xl(e)?e:new Sv.default(e).hex()}catch{}}ye.getColor=wl});var Cn=E(xt=>{"use strict";y();var Cl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var kv=Cl(Ot()),El=Kt(),bl=Qt(),Tv=Cl(xn());function To(e){let t;if(typeof e=="string")t=new bl.CLIError.Warn(e);else if(e instanceof Error)t=(0,bl.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,Tv.default)(t);r&&kv.default.stderr(r+`
|
|
10
|
-
`),El.config.errorLogger&&El.config.errorLogger.log(t?.stack??"")}xt.warn=To;var Dl=new Set;function Ov(e){Dl.has(e)||To(e),Dl.add(e)}xt.memoizedWarn=Ov;xt.default=To});var Tl=E(Tr=>{"use strict";y();var Pv=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Iv=Pv(et()),Sl=F("node:fs/promises"),Fl=F("node:path"),Nv=Cn(),Al=oe(),Mv=(0,Iv.default)("read-tsconfig");function _l(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function kl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Fl.dirname)(e);if(i!==e)return kl(i,t)}async function jv(e,t="tsconfig.json"){let r=[],i;try{i=oy()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Nv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await kl(o,async c=>(await(0,Sl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Sl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=_l(s,h.extends);return d?n(d):void 0}let m=_l(s,h.extends);if(m)return n(m)}return h}catch(c){Mv(c)}};return await n((0,Fl.join)(e,t)),{compilerOptions:(0,Al.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Al.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=jv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Ol=et();function Bv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Rv(...e){if(!Ol)return(...r)=>{};let t=Ol(["config",...e].join(":"));return t.enabled&&Bv(),(...r)=>t(...r)}nt.Debug=Rv;function Oo(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Oo(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let m=s.slice(0,c),d=s.slice(c),f=[...m,i,...d];t.push(f)}}return t}nt.getPermutations=Oo;function Lv(e){return Oo(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Lv;var $v=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=$v});var Pr=E(Re=>{"use strict";y();var qv=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Pl=F("node:fs/promises"),Se=F("node:path"),Uv=qv(Ve()),xi=Cn(),Il=Pt(),Hv=yt(),zv=Tl(),Ml=oe(),Jv=Or(),te=(0,Jv.Debug)("ts-path");Re.TS_CONFIGS={};var Nl=new Set;function Wv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Sn=Wv();function Gv(e){return"code"in e&&e.code==="ENOENT"}async function Xv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,zv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Gv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,xi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Vv(e,t){if(Nl.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,xi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,m={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",m),i.register(m),Nl.add(e)}function Yv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Kv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Sn==="ts-node"&&i>=20}async function Qv(e,t){let r=await Xv(e);if(!r)return t;te(`Determining path for ${t}`),Sn==="tsx"||Sn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Sn}`):await Vv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),m=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(m,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${m}`),te(`src directory to find: ${f}`),(0,Hv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Pl.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Pl.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Ml.isProd)()||(0,xi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Zv(e,t,r){let i=r?.options.isRoot?r:Uv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Il.settings.enableAutoTranspile??Il.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Ml.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Yv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,xi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Kv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,xi.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."),t;try{return await Qv(e,t)}catch(s){return te(s),t}}Re.tsPath=Zv});var wi=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var ex=F("node:fs"),An=F("node:path"),No=F("node:url"),jl=Pr(),Po=_o(),Rl=yt(),tx=ay(),rx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],ix=e=>e.type!==void 0;function Mo(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Po.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function nx(e,t){let r,i;try{return{filePath:r,isESM:i}=await Ll(e,t),i?await import((0,No.pathToFileURL)(r).href):F(r)}catch(n){Mo(n,i,r??t)}}st.load=nx;async function sx(e,t){let r,i;try{({filePath:r,isESM:i}=await Ll(e,t));let n=i?await import((0,No.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Mo(n,i,r??t)}}st.loadWithData=sx;async function ox(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Po.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Po.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,An.join)(t,n.join(An.sep));try{let s=i?await import((0,No.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Mo(s,i,o??t)}}st.loadWithDataFromManifest=ox;function Io(e){switch((0,An.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return tx.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Io;async function Ll(e,t){let r,i;try{i=F.resolve(t),r=Io(i)}catch{i=(ix(e)?await(0,jl.tsPath)(e.root,t,e):await(0,jl.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Rl.existsSync)(i)){n=!0;try{(0,ex.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Bl(i);!s&&o&&(s=Bl((0,An.join)(i,"index"))),s&&(i=s)}r=Io(i)}return{filePath:i,isESM:r}}function Bl(e){for(let t of rx){let r=`${e}${t}`;if((0,Rl.existsSync)(r))return r}return null}});var Fn=E(_n=>{"use strict";y();Object.defineProperty(_n,"__esModule",{value:!0});_n.SINGLE_COMMAND_CLI_SYMBOL=void 0;_n.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var jo=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.cacheDefaultValue=void 0;var ax=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};kn.cacheDefaultValue=ax});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ux(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ux;function cx(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=cx});var On=E(Tn=>{"use strict";y();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.ensureArgObject=void 0;function lx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}Tn.ensureArgObject=lx});var $l=E(Pn=>{"use strict";y();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DocOpts=void 0;var hx=On(),Bo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,hx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};Pn.DocOpts=Bo});var Mr=E(ie=>{"use strict";y();var fx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),dx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),px=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fx(t,e,r);return dx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var mx=px(vc()),gx=Or(),yx=Nr();function vx(e){function t(r){return mx.render(r,e)}return t}ie.template=vx;var xx=e=>e.startsWith("-"),wx=e=>e.includes("=");function Ex(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,gx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),m=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(wx(d)||xx(d)||m())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function ql(e,t){return e.length===0||(t.topicSeparator===" "?e=Ex(e,t):t.topicSeparator!==":"&&(e[0]=(0,yx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=ql;function bx(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=bx;function Dx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=Dx;function Cx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Cx;function Sx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=ql(t,e)),t}ie.normalizeArgv=Sx});var In=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Ax=Br(Be()),_x=Br(co()),Fx=Br(lo()),Ei=Br(Dr()),kx=Br(uy()),Tx=Br(ho()),Ul=er(),Ox=Yt(),Px=Mr(),Ro=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Ox.stdtermwidth,...r},this.render=(0,Px.template)(this)}indent(t,r=this.indentSpacing){return(0,_x.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[m,d]of t)!m&&!d||(m&&(r.stripAnsi&&(m=(0,Ei.default)(m)),h+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,Ei.default)(d)),h+=`
|
|
10
|
+
`),El.config.errorLogger&&El.config.errorLogger.log(t?.stack??"")}xt.warn=To;var Dl=new Set;function Ov(e){Dl.has(e)||To(e),Dl.add(e)}xt.memoizedWarn=Ov;xt.default=To});var Tl=E(Tr=>{"use strict";y();var Pv=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Iv=Pv(et()),Sl=F("node:fs/promises"),Fl=F("node:path"),Nv=Cn(),Al=oe(),Mv=(0,Iv.default)("read-tsconfig");function _l(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function kl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Fl.dirname)(e);if(i!==e)return kl(i,t)}async function jv(e,t="tsconfig.json"){let r=[],i;try{i=oy()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Nv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await kl(o,async c=>(await(0,Sl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Sl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=_l(s,h.extends);return d?n(d):void 0}let m=_l(s,h.extends);if(m)return n(m)}return h}catch(c){Mv(c)}};return await n((0,Fl.join)(e,t)),{compilerOptions:(0,Al.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Al.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=jv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Ol=et();function Bv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Rv(...e){if(!Ol)return(...r)=>{};let t=Ol(["config",...e].join(":"));return t.enabled&&Bv(),(...r)=>t(...r)}nt.Debug=Rv;function Oo(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Oo(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let m=s.slice(0,c),d=s.slice(c),f=[...m,i,...d];t.push(f)}}return t}nt.getPermutations=Oo;function Lv(e){return Oo(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Lv;var $v=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=$v});var Pr=E(Re=>{"use strict";y();var qv=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Pl=F("node:fs/promises"),Se=F("node:path"),Uv=qv(Ve()),xi=Cn(),Il=Pt(),Hv=yt(),zv=Tl(),Ml=oe(),Jv=Or(),te=(0,Jv.Debug)("ts-path");Re.TS_CONFIGS={};var Nl=new Set;function Wv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Sn=Wv();function Gv(e){return"code"in e&&e.code==="ENOENT"}async function Xv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,zv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Gv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,xi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Vv(e,t){if(Nl.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,xi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,m={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",m),i.register(m),Nl.add(e)}function Yv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Kv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Sn==="ts-node"&&i>=20}async function Qv(e,t){let r=await Xv(e);if(!r)return t;te(`Determining path for ${t}`),Sn==="tsx"||Sn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Sn}`):await Vv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),m=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(m,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${m}`),te(`src directory to find: ${f}`),(0,Hv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Pl.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Pl.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Ml.isProd)()||(0,xi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Zv(e,t,r){let i=r?.options.isRoot?r:Uv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Il.settings.enableAutoTranspile??Il.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Ml.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Yv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,xi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Kv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,xi.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."),t;try{return await Qv(e,t)}catch(s){return te(s),t}}Re.tsPath=Zv});var wi=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var ex=F("node:fs"),An=F("node:path"),No=F("node:url"),jl=Pr(),Po=_o(),Rl=yt(),tx=ay(),rx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],ix=e=>e.type!==void 0;function Mo(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Po.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function nx(e,t){let r,i;try{return{filePath:r,isESM:i}=await Ll(e,t),i?await import((0,No.pathToFileURL)(r).href):F(r)}catch(n){Mo(n,i,r??t)}}st.load=nx;async function sx(e,t){let r,i;try{({filePath:r,isESM:i}=await Ll(e,t));let n=i?await import((0,No.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Mo(n,i,r??t)}}st.loadWithData=sx;async function ox(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Po.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Po.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,An.join)(t,n.join(An.sep));try{let s=i?await import((0,No.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Mo(s,i,o??t)}}st.loadWithDataFromManifest=ox;function Io(e){switch((0,An.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return tx.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Io;async function Ll(e,t){let r,i;try{i=F.resolve(t),r=Io(i)}catch{i=(ix(e)?await(0,jl.tsPath)(e.root,t,e):await(0,jl.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Rl.existsSync)(i)){n=!0;try{(0,ex.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Bl(i);!s&&o&&(s=Bl((0,An.join)(i,"index"))),s&&(i=s)}r=Io(i)}return{filePath:i,isESM:r}}function Bl(e){for(let t of rx){let r=`${e}${t}`;if((0,Rl.existsSync)(r))return r}return null}});var Fn=E(_n=>{"use strict";y();Object.defineProperty(_n,"__esModule",{value:!0});_n.SINGLE_COMMAND_CLI_SYMBOL=void 0;_n.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var jo=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.cacheDefaultValue=void 0;var ax=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};kn.cacheDefaultValue=ax});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ux(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ux;function cx(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=cx});var On=E(Tn=>{"use strict";y();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.ensureArgObject=void 0;function lx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}Tn.ensureArgObject=lx});var $l=E(Pn=>{"use strict";y();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DocOpts=void 0;var hx=On(),Bo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,hx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};Pn.DocOpts=Bo});var Mr=E(ie=>{"use strict";y();var fx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),dx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),px=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fx(t,e,r);return dx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var mx=px(gc()),gx=Or(),yx=Nr();function vx(e){function t(r){return mx.render(r,e)}return t}ie.template=vx;var xx=e=>e.startsWith("-"),wx=e=>e.includes("=");function Ex(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,gx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),m=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(wx(d)||xx(d)||m())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function ql(e,t){return e.length===0||(t.topicSeparator===" "?e=Ex(e,t):t.topicSeparator!==":"&&(e[0]=(0,yx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=ql;function bx(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=bx;function Dx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=Dx;function Cx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Cx;function Sx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=ql(t,e)),t}ie.normalizeArgv=Sx});var In=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Ax=Br(Be()),_x=Br(co()),Fx=Br(lo()),Ei=Br(Dr()),kx=Br(uy()),Tx=Br(ho()),Ul=er(),Ox=Yt(),Px=Mr(),Ro=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Ox.stdtermwidth,...r},this.render=(0,Px.template)(this)}indent(t,r=this.indentSpacing){return(0,_x.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[m,d]of t)!m&&!d||(m&&(r.stripAnsi&&(m=(0,Ei.default)(m)),h+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,Ei.default)(d)),h+=`
|
|
11
11
|
`,h+=this.indent(this.wrap(d.trim(),r.indentation+2),4)),h+=`
|
|
12
12
|
|
|
13
13
|
`);return h.trim()};if(r.multiline)return i();let n=(0,kx.default)(t.map(h=>h[0]).join(`
|
|
@@ -67,10 +67,10 @@ ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
|
|
|
67
67
|
`),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
|
|
68
68
|
`)[0])):t.description&&(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
|
|
69
69
|
`)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};fe.Help=jn;function Qx(e){return e&&e.default?e.default:e}async function Zx(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,Hx.tsPath)(e.root,r)??r,n=await(0,Jx.load)(e,i);return Qx(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
|
|
70
|
-
${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();var zo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var ew=zo(
|
|
70
|
+
${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();var zo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var ew=zo(yc()),tw=zo(Ve()),rw=Si(),Ho=Kt(),iw=Qt(),nw=yn(),sw=zo(xn());Le.Exit={exit(e=0){process.exit(e)}};async function ow(e){try{e||(e=new iw.CLIError("no error?")),e.message==="SIGINT"&&Le.Exit.exit(1);let t=!(e instanceof nw.ExitError)&&!e.skipOclifErrorHandling,r=(0,sw.default)(e),i=(0,ew.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=tw.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new rw.Help(o,s);console.error(),await c.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;Ho.config.errorLogger&&e.code!=="EEXIT"?(i&&Ho.config.errorLogger.log(i),await Ho.config.errorLogger.flush().then(()=>Le.Exit.exit(n)).catch(console.error)):Le.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Le.Exit.exit(1)}}Le.handle=ow});var $e=E(ne=>{"use strict";y();Object.defineProperty(ne,"__esModule",{value:!0});ne.warn=ne.exit=ne.Logger=ne.handle=ne.ModuleLoadError=ne.ExitError=ne.CLIError=ne.error=ne.config=void 0;var aw=yn(),uw=Kt();Object.defineProperty(ne,"config",{enumerable:!0,get:function(){return uw.config}});var cw=So();Object.defineProperty(ne,"error",{enumerable:!0,get:function(){return cw.error}});var lw=Qt();Object.defineProperty(ne,"CLIError",{enumerable:!0,get:function(){return lw.CLIError}});var hw=yn();Object.defineProperty(ne,"ExitError",{enumerable:!0,get:function(){return hw.ExitError}});var fw=_o();Object.defineProperty(ne,"ModuleLoadError",{enumerable:!0,get:function(){return fw.ModuleLoadError}});var dw=Bn();Object.defineProperty(ne,"handle",{enumerable:!0,get:function(){return dw.handle}});var pw=bo();Object.defineProperty(ne,"Logger",{enumerable:!0,get:function(){return pw.Logger}});function mw(e=0){throw new aw.ExitError(e)}ne.exit=mw;var gw=Cn();Object.defineProperty(ne,"warn",{enumerable:!0,get:function(){return gw.warn}})});var Ln=E(Rn=>{"use strict";y();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ActionBase=void 0;var Kl=F("node:util"),Ql=oe(),Jo=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
|
|
71
71
|
`&&this._write(r,`
|
|
72
72
|
`)}catch(t){this._write("stderr",(0,Kl.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,Kl.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,Ql.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,Ql.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};Rn.ActionBase=Jo});var Zl=E(Go=>{"use strict";y();Object.defineProperty(Go,"__esModule",{value:!0});var yw=Ln(),Wo=class extends yw.ActionBase{type="simple";_flush(){this._write(this.std,`
|
|
73
|
-
`),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Go.default=Wo});var eh=E(Xo=>{"use strict";y();Object.defineProperty(Xo,"__esModule",{value:!0});Xo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var rh=E(Ye=>{"use strict";y();var vw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),xw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ww=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vw(t,e,r);return xw(t,e),t},$n=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var Ew=$n(
|
|
73
|
+
`),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Go.default=Wo});var eh=E(Xo=>{"use strict";y();Object.defineProperty(Xo,"__esModule",{value:!0});Xo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var rh=E(Ye=>{"use strict";y();var vw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),xw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ww=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vw(t,e,r);return xw(t,e),t},$n=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var Ew=$n(vc()),bw=$n(Be()),Dw=$n(Dr()),Vo=ww(ty()),Cw=Yt(),Sw=Ln(),th=$n(eh()),Yo=fo();function Aw(e){return Vo?(Vo.stdout?Vo.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${Ew.default.reset.open}`:bw.default.magenta(e):e}var Ko=class extends Sw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Aw(t)}_lines(t){return(0,Dw.default)(t).split(`
|
|
74
74
|
`).map(r=>Math.ceil(r.length/Cw.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
|
|
75
75
|
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Yo.cursorLeft+Yo.cursorUp(t)+Yo.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),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(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?th.default[t.style].frames:th.default[process.platform==="win32"?"line":"dots2"].frames}};Ye.default=Ko});var Un=E(at=>{"use strict";y();var Qo=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.config=at.Config=void 0;var _w=Qo(Ve()),Fw=Qo(Zl()),kw=Qo(rh()),ih=global,Nt=ih.ux||(ih.ux={}),Tw=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",Ow=Tw==="spinner"?kw.default:Fw.default,qn=class{action=new Ow;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Nt.context||{}}set context(t){Nt.context=t}get debug(){return Nt.debug||process.env.DEBUG==="*"}set debug(t){Nt.debug=t}};at.Config=qn;function Pw(){let t=_w.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Nt[t]||(Nt[t]=new qn),Nt[t]}at.config=Pw();at.default=at.config});var zn=E(Hn=>{"use strict";y();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.flush=void 0;var Iw=$e();function Nw(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,Iw.error)("timed out"))])}async function Mw(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function jw(e=1e4){await Nw(Mw(),e)}Hn.flush=jw});var oh=E((IO,sh)=>{"use strict";y();var Mt=process.stdin,ut=process.stderr,Jn={hide:(e,t={})=>Jn.raw(e,!1,t),mask:(e,t={})=>Jn.raw(e,!0,t),raw:(e,t,r={})=>!Mt.setRawMode||process.env.TERM==="dumb"?Jn.notty(e):new Promise(function(i,n){let o=fo(),s="";ut.write(o.eraseLine),ut.write(o.cursorLeft),ut.write(e),Mt.resume(),Mt.setRawMode(!0);function c(){t?ut.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
|
|
76
76
|
`+o.cursorShow):ut.write(`
|
|
@@ -108,7 +108,7 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
|
|
|
108
108
|
`+e.slice(n,o),n=o+1),s=c;return h+=`
|
|
109
109
|
`,e.length-n>t&&s>n?h+=e.slice(n,s)+`
|
|
110
110
|
`+e.slice(s+1):h+=e.slice(n),h.slice(1)}function UD(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=ud((r-55296)*1024+i-56320+65536),o++;continue}n=xe[r],t+=!n&&Gr(r)?e[o]:n||ud(r)}return t}function HD(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)cr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function zD(e,t,r,i){var n="",o=e.tag,s,c;for(s=0,c=r.length;s<c;s+=1)cr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=ya(e,t)),e.dump&&Oi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function JD(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,c,h,m,d;for(s=0,c=o.length;s<c;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),h=o[s],m=r[h],cr(e,t,h,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),cr(e,t,m,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function WD(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),c,h,m,d,f,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ii("sortKeys must be a boolean or a function");for(c=0,h=s.length;c<h;c+=1)p="",(!i||c!==0)&&(p+=ya(e,t)),m=s[c],d=r[m],cr(e,t+1,m,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Oi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=ya(e,t)),cr(e,t+1,d,!0,f)&&(e.dump&&Oi===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=o,e.dump=n||"{}"}function pd(e,t,r){var i,n,o,s,c,h;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(c=n[o],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(e.tag=r?c.tag:"?",c.represent){if(h=e.styleMap[c.tag]||c.defaultStyle,md.call(c.represent)==="[object Function]")i=c.represent(t,h);else if(gd.call(c.represent,h))i=c.represent[h](t,h);else throw new Ii("!<"+c.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}function cr(e,t,r,i,n,o){e.tag=null,e.dump=r,pd(e,r,!1)||pd(e,r,!0);var s=md.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",h,m;if(c&&(h=e.duplicates.indexOf(r),m=h!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(c&&m&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(WD(e,t,e.dump,n),m&&(e.dump="&ref_"+h+e.dump)):(JD(e,t,e.dump),m&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(zD(e,d,e.dump,n),m&&(e.dump="&ref_"+h+e.dump)):(HD(e,d,e.dump),m&&(e.dump="&ref_"+h+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&$D(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Ii("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function GD(e,t){var r=[],i=[],n,o;for(va(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function va(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)va(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)va(e[i[n]],t,r)}function kd(e,t){t=t||{};var r=new MD(t);return r.noRefs||GD(e,r),cr(r,0,e,!0,!0)?r.dump+`
|
|
111
|
-
`:""}function XD(e,t){return kd(e,Pi.extend({schema:gD},t))}wa.exports.dump=kd;wa.exports.safeDump=XD});var Pd=E((A2,K)=>{"use strict";y();var ts=ad(),Od=Td();function rs(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Xn();K.exports.JSON_SCHEMA=ha();K.exports.CORE_SCHEMA=fa();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=ki();K.exports.load=ts.load;K.exports.loadAll=ts.loadAll;K.exports.safeLoad=ts.safeLoad;K.exports.safeLoadAll=ts.safeLoadAll;K.exports.dump=Od.dump;K.exports.safeDump=Od.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Xn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=ki();K.exports.scan=rs("scan");K.exports.parse=rs("parse");K.exports.compose=rs("compose");K.exports.addConstructor=rs("addConstructor")});var Nd=E((F2,Id)=>{"use strict";y();var VD=Pd();Id.exports=VD});var Ud=E(is=>{"use strict";y();Object.defineProperty(is,"__esModule",{value:!0});var Rd=function(t,r){return t<r?-1:t>r?1:0},YD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Ld=/^\s+|\s+$/g,KD=/\s+/g,QD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,ZD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,eC=/^0+[1-9]{1}[0-9]*$/,tC=/[^\x00-\x80]/,rC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Md=function(t,r){return t<r?-1:t>r?1:0},iC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var m=Rd(c.parsedNumber,h.parsedNumber);return m===0?Md(c.normalizedString,h.normalizedString):m}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:tC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?rC(c.normalizedString,h.normalizedString):Md(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},nC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},$d=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Rd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?iC(t.chunks,r.chunks):nC(t,r)},sC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,m=i.length,d=0;d<h;d++){var f=d<m?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=$d(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},oC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},aC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Ld,""):""},qd=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},uC=function(t){if(ZD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},cC=function(t){var r=qd(t);return r!==void 0?r:uC(t)},lC=function(t){return t.replace(YD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},hC=function(t){return t.replace(KD," ").replace(Ld,"")},fC=function(t,r,i){if(QD.test(t)&&(!eC.test(t)||r===0||i[r-1]!=="."))return qd(t)||0},dC=function(t,r,i){return{parsedNumber:fC(t,r,i),normalizedString:hC(t)}},pC=function(t){var r=lC(t).map(dC);return r},mC=function(t){return typeof t=="function"},jd=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},gC=function(t){return t===null},yC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},vC=function(t){return typeof t=="symbol"},xC=function(t){return t===void 0},Ea=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!jd(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=aC(t),i=cC(r),n=pC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:mC(t),isNaN:jd(t),isNull:gC(t),isObject:yC(t),isSymbol:vC(t),isUndefined:xC(t),value:t}},wC=function(t,r){return r(t)},EC=function(t,r){return t[r]},bC=function(t,r,i){var n=r.length?r.map(oC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(m){return wC(s,m)}).map(Ea);return{index:c,values:h}});return o.sort(function(s,c){return sC(s,c,i)}),o.map(function(s){return EC(t,s.index)})},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},CC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function SC(e,t,r){if(!e||!Array.isArray(e))return[];var i=DC(t),n=CC(r);return bC(e,i,n)}var AC=function(t){return function(r,i){var n=Ea(r),o=Ea(i),s=$d(n,o);return s*(t.order==="desc"?-1:1)}},Bd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},_C=function(t){var r="asc";return typeof t=="string"&&Bd(t)?r=t:t&&typeof t=="object"&&t.order&&Bd(t.order)&&(r=t.order),{order:r}};function FC(e){var t=_C(e);return AC(t)}is.orderBy=SC;is.compare=FC});var Jd=E((P2,zd)=>{"use strict";y();var Hd="[\uD800-\uDBFF][\uDC00-\uDFFF]",kC=e=>e&&e.exact?new RegExp(`^${Hd}$`):new RegExp(Hd,"g");zd.exports=kC});var Yd=E((N2,Vd)=>{"use strict";y();var TC=ry(),OC=Jd(),Wd=wc(),Xd=["\x1B","\x9B"],ns=e=>`${Xd[0]}[${e}m`,Gd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Wd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(ns(t?s:o)):e.splice(c,1)}else if(t){i.push(ns(0));break}else i.push(ns(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=ns(Wd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Vd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,m="";for(let[d,f]of i.entries()){let p=!1;if(Xd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!OC({exact:!0}).test(f)&&TC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)m+=f;else if(h===t&&!s&&c!==void 0)m=Gd(n);else if(h>=o){m+=Gd(n,!0,c);break}}return m}});var os=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var PC=F("node:url"),ss=$e(),IC=Si(),Kd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function ba(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=ba;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ss.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ss.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ss.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Kd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Kd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new PC.URL(e)}catch{throw new ss.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var NC=(e={})=>ba({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=NC;var MC=(e={})=>ba({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,IC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=MC;function jC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=jC});var Zd=E(Ne=>{"use strict";y();var BC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return RC(t,e),t},as=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Qd=as(Be()),$C=Nd(),qC=Ud(),UC=F("node:util"),HC=as(Yd()),lr=as(lo()),Rt=LC(os()),zC=Yt(),Da=oe(),JC=as(Ot()),Ca=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),g=typeof a.header=="string"?a.header:(0,Da.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(g)+1);return{extended:u,get:l,header:g,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:m,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:m??(p=>JC.default.stdout(p+`
|
|
111
|
+
`:""}function XD(e,t){return kd(e,Pi.extend({schema:gD},t))}wa.exports.dump=kd;wa.exports.safeDump=XD});var Pd=E((A2,K)=>{"use strict";y();var ts=ad(),Od=Td();function rs(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Xn();K.exports.JSON_SCHEMA=ha();K.exports.CORE_SCHEMA=fa();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=ki();K.exports.load=ts.load;K.exports.loadAll=ts.loadAll;K.exports.safeLoad=ts.safeLoad;K.exports.safeLoadAll=ts.safeLoadAll;K.exports.dump=Od.dump;K.exports.safeDump=Od.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Xn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=ki();K.exports.scan=rs("scan");K.exports.parse=rs("parse");K.exports.compose=rs("compose");K.exports.addConstructor=rs("addConstructor")});var Nd=E((F2,Id)=>{"use strict";y();var VD=Pd();Id.exports=VD});var Ud=E(is=>{"use strict";y();Object.defineProperty(is,"__esModule",{value:!0});var Rd=function(t,r){return t<r?-1:t>r?1:0},YD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Ld=/^\s+|\s+$/g,KD=/\s+/g,QD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,ZD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,eC=/^0+[1-9]{1}[0-9]*$/,tC=/[^\x00-\x80]/,rC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Md=function(t,r){return t<r?-1:t>r?1:0},iC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var m=Rd(c.parsedNumber,h.parsedNumber);return m===0?Md(c.normalizedString,h.normalizedString):m}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:tC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?rC(c.normalizedString,h.normalizedString):Md(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},nC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},$d=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Rd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?iC(t.chunks,r.chunks):nC(t,r)},sC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,m=i.length,d=0;d<h;d++){var f=d<m?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=$d(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},oC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},aC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Ld,""):""},qd=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},uC=function(t){if(ZD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},cC=function(t){var r=qd(t);return r!==void 0?r:uC(t)},lC=function(t){return t.replace(YD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},hC=function(t){return t.replace(KD," ").replace(Ld,"")},fC=function(t,r,i){if(QD.test(t)&&(!eC.test(t)||r===0||i[r-1]!=="."))return qd(t)||0},dC=function(t,r,i){return{parsedNumber:fC(t,r,i),normalizedString:hC(t)}},pC=function(t){var r=lC(t).map(dC);return r},mC=function(t){return typeof t=="function"},jd=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},gC=function(t){return t===null},yC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},vC=function(t){return typeof t=="symbol"},xC=function(t){return t===void 0},Ea=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!jd(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=aC(t),i=cC(r),n=pC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:mC(t),isNaN:jd(t),isNull:gC(t),isObject:yC(t),isSymbol:vC(t),isUndefined:xC(t),value:t}},wC=function(t,r){return r(t)},EC=function(t,r){return t[r]},bC=function(t,r,i){var n=r.length?r.map(oC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(m){return wC(s,m)}).map(Ea);return{index:c,values:h}});return o.sort(function(s,c){return sC(s,c,i)}),o.map(function(s){return EC(t,s.index)})},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},CC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function SC(e,t,r){if(!e||!Array.isArray(e))return[];var i=DC(t),n=CC(r);return bC(e,i,n)}var AC=function(t){return function(r,i){var n=Ea(r),o=Ea(i),s=$d(n,o);return s*(t.order==="desc"?-1:1)}},Bd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},_C=function(t){var r="asc";return typeof t=="string"&&Bd(t)?r=t:t&&typeof t=="object"&&t.order&&Bd(t.order)&&(r=t.order),{order:r}};function FC(e){var t=_C(e);return AC(t)}is.orderBy=SC;is.compare=FC});var Jd=E((P2,zd)=>{"use strict";y();var Hd="[\uD800-\uDBFF][\uDC00-\uDFFF]",kC=e=>e&&e.exact?new RegExp(`^${Hd}$`):new RegExp(Hd,"g");zd.exports=kC});var Yd=E((N2,Vd)=>{"use strict";y();var TC=ry(),OC=Jd(),Wd=vc(),Xd=["\x1B","\x9B"],ns=e=>`${Xd[0]}[${e}m`,Gd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Wd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(ns(t?s:o)):e.splice(c,1)}else if(t){i.push(ns(0));break}else i.push(ns(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=ns(Wd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Vd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,m="";for(let[d,f]of i.entries()){let p=!1;if(Xd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!OC({exact:!0}).test(f)&&TC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)m+=f;else if(h===t&&!s&&c!==void 0)m=Gd(n);else if(h>=o){m+=Gd(n,!0,c);break}}return m}});var os=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var PC=F("node:url"),ss=$e(),IC=Si(),Kd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function ba(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=ba;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ss.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ss.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ss.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Kd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Kd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new PC.URL(e)}catch{throw new ss.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var NC=(e={})=>ba({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=NC;var MC=(e={})=>ba({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,IC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=MC;function jC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=jC});var Zd=E(Ne=>{"use strict";y();var BC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return RC(t,e),t},as=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Qd=as(Be()),$C=Nd(),qC=Ud(),UC=F("node:util"),HC=as(Yd()),lr=as(lo()),Rt=LC(os()),zC=Yt(),Da=oe(),JC=as(Ot()),Ca=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),g=typeof a.header=="string"?a.header:(0,Da.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(g)+1);return{extended:u,get:l,header:g,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:m,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:m??(p=>JC.default.stdout(p+`
|
|
112
112
|
`)),rowStart:" ",sort:d,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,UC.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let c=new RegExp(i),m=s[o.key].match(c);return n?!m:m})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>c=>c[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,qC.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
|
|
113
113
|
`)||n.includes(`\r
|
|
114
114
|
`)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let c=Math.max((0,lr.default)(".".padEnd(s.minWidth-1)),(0,lr.default)(s.header),WC(t,s.key))+1;return{...s,maxWidth:c,width:c}}),n=zC.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Da.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let h=(0,Da.sumBy)(i,f=>f.minWidth);if(h>=n)return;let m=n-h,d=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,p)=>f.needs-p.needs);for(let{key:f,needs:p}of d){if(!p)continue;let a=i.find(u=>f===u.key);a&&(m>p?(a.width=a.width+p,m-=p):m&&(a.width=a.width+m,m=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,c)=>s+c.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let h of i){let m=h.header;s+=m.padEnd(h.width)}r.printLine(Qd.default.bold(s));let c=r.rowStart;for(let h of i){let m="".padEnd(h.width-1,"\u2500")+" ";c+=m.padEnd(h.width)}r.printLine(Qd.default.bold(c))}for(let s of t){let c=1;for(let m of i){let f=s[m.key].split(`
|
|
@@ -127,14 +127,14 @@ Should be of format "before:after"`);return x.length===1||x[1].length===0?x.inde
|
|
|
127
127
|
`)+1),v=Array.apply(0,Array(P.length)).join(" ")+`
|
|
128
128
|
`+v.substr(P.length)),T?(B=C.parse(v,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),L=B.tokens,z=B.comments):(L=[],z=[],C.tokenize(v,{range:!0,loc:!0,comment:!0},function(re){re.type==="LineComment"?(re.type="Line",z.push(re)):re.type==="BlockComment"?(re.type="Block",z.push(re)):(re.type==="Identifier"&&re.value==="static"&&(re.type="Keyword"),L.push(re))})),u(x);function so(re,De,We){var je,Ge=De.range[0];for(je=We;je<re.length;je++)if(re[je].range[0]===Ge)return je;throw new Error("Token %s not found at or after index: %d",De,We)}function oo(re){var De,We,je,Ge=0,Ft;return De=re(v.slice(Er,Xt),Wt),h(De)?(pe.push(De.replacement),We=Wt.tokenIndex,je=so(Wt.tokens,De.skipPastToken,We),Ge=je-We,Ft=Ge>0?L[je-1].range[1]:Xt):(pe.push(De),Ft=Xt),{skip:Ge,splitEnd:Ft}}function di(re,De,We,je){var Ge,Ft=0;if(!(re>=De))return We?(Ge=oo(We),Ft=Ge.skip,G=Ge.splitEnd):(pe.push(v.slice(re,De)),G=De),Ft}wr=l(L,z);for(var Gt=0;Gt<wr.length;Gt++){var dt=wr[Gt],pt=x[dt.type],rn,Er,Xt;pt&&(rn=pt&&pt.hasOwnProperty(dt.value)&&pt[dt.value]&&s(pt[dt.value])?pt[dt.value]:pt._default,Er=dt.range[0],Xt=dt.range[1],di(G,Er),Wt={tokenIndex:Gt,tokens:wr,ast:B,code:v},Gt+=di(Er,Xt,rn,Wt))}return G<v.length&&di(G,v.length),w.nojoin||(_t=pe.join(""),P.length>0&&(_t=P+_t.substr(P.length))),{ast:B,tokens:L,comments:z,splits:pe,code:_t}}return o?o(g):g}})()});var ls=E((eI,lp)=>{"use strict";y();var up={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},cp={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Ta={},Oa={},ji={};Object.keys(up).forEach(function(e){var t=Ta[e]="\x1B["+up[e]+"m",r=Oa[e]="\x1B[39m";ji[e]=function(i){return t+i+r}});Object.keys(cp).forEach(function(e){var t=Ta[e]="\x1B["+cp[e]+"m",r=Oa[e]="\x1B[49m";ji[e]=function(i){return t+i+r}});lp.exports=ji;ji.open=Ta;ji.close=Oa});var fp=E((rI,hp)=>{y();var j=ls();hp.exports={Boolean:{true:void 0,false:void 0,_default:j.brightRed},Identifier:{undefined:j.brightBlack,self:j.brightRed,console:j.blue,log:j.blue,warn:j.red,error:j.brightRed,_default:j.white},Null:{_default:j.brightBlack},Numeric:{_default:j.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?j.green(e):j.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:j.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:j.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:j.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:j.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:j.red,static:void 0,super:void 0,switch:void 0,this:j.brightRed,throw:void 0,try:j.cyan,typeof:void 0,var:j.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:j.brightBlue},Punctuator:{";":j.brightBlack,".":j.green,",":j.green,"{":j.yellow,"}":j.yellow,"(":j.brightBlack,")":j.brightBlack,"[":j.yellow,"]":j.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:j.brightYellow},Line:{_default:j.brightBlack},Block:{_default:j.brightBlack},JSXAttribute:{_default:j.magenta},JSXClosingElement:{_default:j.magenta},JSXElement:{_default:j.magenta},JSXEmptyExpression:{_default:j.magenta},JSXExpressionContainer:{_default:j.magenta},JSXIdentifier:{className:j.blue,_default:j.magenta},JSXMemberExpression:{_default:j.magenta},JSXNamespacedName:{_default:j.magenta},JSXOpeningElement:{_default:j.magenta},JSXSpreadAttribute:{_default:j.magenta},JSXText:{_default:j.brightGreen},_default:void 0}});var hs=E((nI,dp)=>{"use strict";y();var rS=ap(),iS=fp(),nS=ls(),sS=nS.brightBlack,oS="\x1B[39m";function aS(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function uS(e,t){var r=e.split(`
|
|
129
129
|
`);aS(r);var i=r.length,n=[],o,s;function c(d){return d<10?1:d<100?2:d<1e3?3:d<1e4?4:5}function h(d,f){var p=f-c(d);switch(p){case 0:return""+d;case 1:return" "+d;case 2:return" "+d;case 3:return" "+d;case 4:return" "+d;case 5:return" "+d}}o=c(i+t-1);for(var m=0;m<i;m++)s=sS(h(m+t,o)+": ").replace(oS,""),n.push(s+r[m]);return n.join(`
|
|
130
|
-
`)}dp.exports=function(t,r){r=r||{};try{var i=rS(t,r.theme||iS,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?uS(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var mp=E((oI,pp)=>{"use strict";y();var cS=F("fs"),lS=hs();function hS(e){return toString.call(e)==="[object Function]"}pp.exports=function(t,r,i){hS(r)&&(i=r,r={}),r=r||{},cS.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,lS(o,r))}catch(s){i(s)}})}});var yp=E((uI,gp)=>{"use strict";y();var fS=F("fs"),dS=hs();gp.exports=function(t,r){var i=fS.readFileSync(t,"utf-8");return r=r||{},dS(i,r)}});var xp=E((lI,vp)=>{"use strict";y();vp.exports={highlight:hs(),highlightFile:mp(),highlightFileSync:yp()}});var Ep=E((fI,wp)=>{y();var $=ls();wp.exports={Boolean:{true:void 0,false:void 0,_default:$.brightRed},Identifier:{undefined:$.brightBlack,self:$.brightRed,console:$.blue,log:$.blue,warn:$.red,error:$.brightRed,_default:$.white},Null:{_default:$.brightBlack},Numeric:{_default:$.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?$.brightBlue(e):$.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:$.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:$.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:$.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:$.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:$.red,static:void 0,super:void 0,switch:void 0,this:$.brightRed,throw:void 0,try:$.cyan,typeof:void 0,var:$.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:$.brightBlue},Punctuator:{";":$.brightBlack,".":$.green,",":$.green,"{":$.brightWhite,"}":$.brightWhite,"(":$.brightBlack,")":$.brightBlack,"[":$.brightWhite,"]":$.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:$.brightYellow},Line:{_default:$.brightBlack},Block:{_default:$.brightBlack},_default:void 0}});var bp=E(fs=>{"use strict";y();Object.defineProperty(fs,"__esModule",{value:!0});fs.ExitError=void 0;var Pa=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};fs.ExitError=Pa});var Ri=E(_=>{"use strict";y();var pS=_&&_.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),mS=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ja=_&&_.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&pS(t,e,r);return mS(t,e),t},ms=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0});_.write=_.colorize=_.Table=_.ExitError=_.config=_.Config=_.ActionBase=_.warn=_.wait=_.url=_.tree=_.trace=_.table=_.styledObject=_.styledJSON=_.styledHeader=_.prompt=_.progress=_.logToStderr=_.log=_.info=_.flush=_.exit=_.error=_.done=_.debug=_.confirm=_.anykey=_.annotation=_.action=_.ux=void 0;var Ia=ms(Be()),ds=F("node:util"),gS=ja($e()),Na=Un(),yS=zn(),Ma=ja(fh()),ps=ja(_a()),vS=ms(ip()),Dp=ms(Ot()),xS=sp(),Bi=class{static config=Na.config;static get action(){return Na.config.action}static annotation(t,r){
|
|
130
|
+
`)}dp.exports=function(t,r){r=r||{};try{var i=rS(t,r.theme||iS,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?uS(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var mp=E((oI,pp)=>{"use strict";y();var cS=F("fs"),lS=hs();function hS(e){return toString.call(e)==="[object Function]"}pp.exports=function(t,r,i){hS(r)&&(i=r,r={}),r=r||{},cS.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,lS(o,r))}catch(s){i(s)}})}});var yp=E((uI,gp)=>{"use strict";y();var fS=F("fs"),dS=hs();gp.exports=function(t,r){var i=fS.readFileSync(t,"utf-8");return r=r||{},dS(i,r)}});var xp=E((lI,vp)=>{"use strict";y();vp.exports={highlight:hs(),highlightFile:mp(),highlightFileSync:yp()}});var Ep=E((fI,wp)=>{y();var $=ls();wp.exports={Boolean:{true:void 0,false:void 0,_default:$.brightRed},Identifier:{undefined:$.brightBlack,self:$.brightRed,console:$.blue,log:$.blue,warn:$.red,error:$.brightRed,_default:$.white},Null:{_default:$.brightBlack},Numeric:{_default:$.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?$.brightBlue(e):$.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:$.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:$.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:$.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:$.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:$.red,static:void 0,super:void 0,switch:void 0,this:$.brightRed,throw:void 0,try:$.cyan,typeof:void 0,var:$.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:$.brightBlue},Punctuator:{";":$.brightBlack,".":$.green,",":$.green,"{":$.brightWhite,"}":$.brightWhite,"(":$.brightBlack,")":$.brightBlack,"[":$.brightWhite,"]":$.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:$.brightYellow},Line:{_default:$.brightBlack},Block:{_default:$.brightBlack},_default:void 0}});var bp=E(fs=>{"use strict";y();Object.defineProperty(fs,"__esModule",{value:!0});fs.ExitError=void 0;var Pa=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};fs.ExitError=Pa});var Ri=E(_=>{"use strict";y();var pS=_&&_.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),mS=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ja=_&&_.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&pS(t,e,r);return mS(t,e),t},ms=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0});_.write=_.colorize=_.Table=_.ExitError=_.config=_.Config=_.ActionBase=_.warn=_.wait=_.url=_.tree=_.trace=_.table=_.styledObject=_.styledJSON=_.styledHeader=_.prompt=_.progress=_.logToStderr=_.log=_.info=_.flush=_.exit=_.error=_.done=_.debug=_.confirm=_.anykey=_.annotation=_.action=_.ux=void 0;var Ia=ms(Be()),ds=F("node:util"),gS=ja($e()),Na=Un(),yS=zn(),Ma=ja(fh()),ps=ja(_a()),vS=ms(ip()),Dp=ms(Ot()),xS=sp(),Bi=class{static config=Na.config;static get action(){return Na.config.action}static annotation(t,r){Pc().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Ma.anykey}static get confirm(){return Ma.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,ds.format)(t,...r)+`
|
|
131
131
|
`)}static async done(){Na.config.action.stop()}static async flush(t=1e4){await(0,yS.flush)(t)}static info(t,...r){Dp.default.stdout((0,ds.format)(t,...r)+`
|
|
132
132
|
`)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){Dp.default.stderr((0,ds.format)(t,...r)+`
|
|
133
133
|
`)}static get progress(){return ps.progress}static get prompt(){return Ma.prompt}static styledHeader(t){this.info(Ia.default.dim("=== ")+Ia.default.bold(t)+`
|
|
134
134
|
`)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Ia.default.level){this.info(r);return}let i=xp(),n=Ep();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(ps.styledObject(t,r))}static get table(){return ps.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,ds.format)(t,...r)+`
|
|
135
|
-
`)}static get tree(){return ps.tree}static url(t,r,i={}){yc().stdout?this.log(xS(t,r,i)):this.log(r)}static get wait(){return vS.default}};_.ux=Bi;var{action:wS,annotation:ES,anykey:bS,confirm:DS,debug:CS,done:SS,flush:AS,info:_S,log:FS,logToStderr:kS,progress:TS,prompt:OS,styledHeader:PS,styledJSON:IS,styledObject:NS,table:MS,trace:jS,tree:BS,url:RS,wait:LS}=Bi;_.action=wS;_.annotation=ES;_.anykey=bS;_.confirm=DS;_.debug=CS;_.done=SS;_.flush=AS;_.info=_S;_.log=FS;_.logToStderr=kS;_.progress=TS;_.prompt=OS;_.styledHeader=PS;_.styledJSON=IS;_.styledObject=NS;_.table=MS;_.trace=jS;_.tree=BS;_.url=RS;_.wait=LS;var{error:$S,exit:qS,warn:US}=gS;_.error=$S;_.exit=qS;_.warn=US;var Cp=async()=>{try{await Bi.done()}catch(e){console.error(e),process.exitCode=1}},HS=process.listeners("exit").find(e=>e.name===Cp.name);HS||process.once("exit",Cp);var zS=Ln();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return zS.ActionBase}});var Sp=Un();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Sp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Sp.config}});var JS=bp();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return JS.ExitError}});var WS=_a();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return WS.Table}});var GS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return GS.colorize}});var XS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ms(XS).default}})});var Ap=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var gs=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new gs("stdout");Vr.stderr=new gs("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var Li=F("node:perf_hooks"),VS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ba=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,Li.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Li.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Li.performance.mark(this.stopMarker)}},Ra=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new Li.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}Li.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return VS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ba(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=Ra});var Fp=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var _p=F("node:os");function YS(){return(0,_p.homedir)()}Kr.getHomeDir=YS;function KS(){return(0,_p.platform)()}Kr.getPlatform=KS});var kp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertValidPattern=void 0;var QS=1024*64,ZS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>QS)throw new TypeError("pattern is too long")};ys.assertValidPattern=ZS});var Op=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.parseClass=void 0;var eA={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},$i=e=>e.replace(/[[\]\\-]/g,"\\$&"),tA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Tp=e=>e.join(""),rA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,m=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){m=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[g,[v,x,w]]of Object.entries(eA))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push($i(f)+"-"+$i(l)):l===f&&i.push($i(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push($i(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push($i(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let l=i[0].length===2?i[0].slice(-1):i[0];return[tA(l),!1,d-r,!1]}let p="["+(m?"^":"")+Tp(i)+"]",a="["+(m?"":"^")+Tp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};vs.parseClass=rA});var ws=E(xs=>{"use strict";y();Object.defineProperty(xs,"__esModule",{value:!0});xs.unescape=void 0;var iA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");xs.unescape=iA});var qa=E(Cs=>{"use strict";y();var _e;Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AST=void 0;var nA=Op(),Es=ws(),sA=new Set(["!","?","+","*","@"]),La=e=>sA.has(e),Pp=e=>La(e.type),oA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),aA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Ip=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cA="(?!(?:^|/)\\.\\.?(?:$|/))",bs="(?!\\.)",lA=new Set(["[","."]),hA=new Set(["..","."]),fA=new Set("().*{}+?[]^$\\!"),dA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$a="[^/]",Np=$a+"*?",Mp=$a+"+?",Ds=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,m=-1,d=!1;if(r.type===null){let l=i,g="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,g+=v;continue}if(h){l===m+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===m+2&&d)&&(h=!1),g+=v;continue}else if(v==="["){h=!0,m=l,d=!1,g+=v;continue}if(!n.noext&&La(v)&&t.charAt(l)==="("&&o<=s){r.push(g),g="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}g+=v}return r.push(g),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===m+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===m+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,m=f,d=!1,u+=l;continue}if(La(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,aA)}#p(t,r=oA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=uA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Ip.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Ip.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Pp(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Pp(this)){let h=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[u,l,g,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&hA.has(this.#e[0]))){let u=lA,l=r&&u.has(m.charAt(0))||m.startsWith("\\.")&&u.has(m.charAt(2))||m.startsWith("\\.\\.")&&u.has(m.charAt(4)),g=!r&&!t&&u.has(m.charAt(0));d=l?cA:g?bs:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+m+f,(0,Es.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),m=this;return m.#e=[h],m.type=null,m.#i=void 0,[h,(0,Es.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!bs?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?bs:"")+Mp;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?bs:"")+Np+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,Es.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let m=t.charAt(h);if(n){n=!1,o+=(fA.has(m)?"\\":"")+m,c=!1;continue}if(m==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[d,f,p,a]=(0,nA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(m==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Mp:Np,r=!0;continue}else c=!1;if(m==="?"){o+=$a,r=!0;continue}o+=dA(m)}return[o,(0,Es.unescape)(t),!!r,s]}};Cs.AST=Ds;_e=Ds});var Ua=E(Ss=>{"use strict";y();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.escape=void 0;var pA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Ss.escape=pA});var Up=E(k=>{"use strict";y();var mA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var gA=mA(Q0()),As=kp(),Rp=qa(),yA=Ua(),vA=ws(),xA=(e,t,r={})=>((0,As.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=xA;var wA=/^\*+([^+@!?\*\[\(]*)$/,EA=e=>t=>!t.startsWith(".")&&t.endsWith(e),bA=e=>t=>t.endsWith(e),DA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),CA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),SA=/^\*+\.\*+$/,AA=e=>!e.startsWith(".")&&e.includes("."),_A=e=>e!=="."&&e!==".."&&e.includes("."),FA=/^\.\*+$/,kA=e=>e!=="."&&e!==".."&&e.startsWith("."),TA=/^\*+$/,OA=e=>e.length!==0&&!e.startsWith("."),PA=e=>e.length!==0&&e!=="."&&e!=="..",IA=/^\?+([^+@!?\*\[\(]*)?$/,NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=$p([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},jA=([e,t=""])=>{let r=$p([e]);return t?i=>r(i)&&i.endsWith(t):r},BA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},Lp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},$p=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},qp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",jp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=qp==="win32"?jp.win32.sep:jp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var RA="[^/]",LA=RA+"*?",$A="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qA="(?:(?!(?:\\/|^)\\.).)*?",UA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=UA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),HA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=HA;k.minimatch.defaults=k.defaults;var zA=(e,t={})=>((0,As.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gA.default)(e));k.braceExpand=zA;k.minimatch.braceExpand=k.braceExpand;var JA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=JA;k.minimatch.makeRe=k.makeRe;var WA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=WA;k.minimatch.match=k.match;var Bp=/[?*]|[+@!]\(.*?\)|\[|\]/,GA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,As.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||qp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!Bp.test(o[2]))&&!Bp.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(m)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],m=i[n+3];if(c!==".."||!h||h==="."||h===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:m?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,m,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!m.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of m)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let g=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[g--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[m,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,m;for(s=n,c=o,m=t.length,h=r.length;s<m&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===m&&c===h)return!0;if(s===m)return i;if(c===h)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,As.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(TA))?n=r.dot?PA:OA:(i=t.match(wA))?n=(r.nocase?r.dot?CA:DA:r.dot?bA:EA)(i[1]):(i=t.match(IA))?n=(r.nocase?r.dot?MA:NA:r.dot?jA:BA)(i):(i=t.match(SA))?n=r.dot?_A:AA:(i=t.match(FA))&&(n=kA);let o=Rp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?LA:r.dot?$A:qA,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let m=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?GA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return m.forEach((d,f)=>{let p=m[f+1],a=m[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+p:m[f]=i:p===void 0?m[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,m[f+1]=k.GLOBSTAR))}),m.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],m=n;if(i.matchBase&&h.length===1&&(m=[s]),this.matchOne(m,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var XA=qa();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return XA.AST}});var VA=Ua();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return VA.escape}});var YA=ws();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return YA.unescape}});k.minimatch.AST=Rp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=yA.escape;k.minimatch.unescape=vA.unescape});var zp=E((RI,Hp)=>{"use strict";y();Hp.exports=(...e)=>[...new Set([].concat(...e))]});var Wp=E(dr=>{"use strict";y();var{promisify:KA}=F("util"),Jp=F("fs");async function Ha(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await KA(Jp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function za(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Jp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=Ha.bind(null,"stat","isFile");dr.isDirectory=Ha.bind(null,"stat","isDirectory");dr.isSymlink=Ha.bind(null,"lstat","isSymbolicLink");dr.isFileSync=za.bind(null,"statSync","isFile");dr.isDirectorySync=za.bind(null,"statSync","isDirectory");dr.isSymlinkSync=za.bind(null,"lstatSync","isSymbolicLink")});var Kp=E((UI,Ja)=>{"use strict";y();var pr=F("path"),Gp=Wp(),Xp=e=>e.length>1?`{${e.join(",")}}`:e[0],Vp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},QA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Xp(t)}`,Yp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,QA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Xp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ja.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Gp.isDirectory(Vp(i,t.cwd))?Yp(i,t):i));return[].concat.apply([],r)};Ja.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Gp.isDirectorySync(Vp(i,t.cwd))?Yp(i,t):i);return[].concat.apply([],r)}});var om=E((zI,sm)=>{y();function Qp(e){return Array.isArray(e)?e:[e]}var Xa="",Zp=" ",Wa="\\",ZA=/^\s+$/,e1=/(?:[^\\]|^)\\$/,t1=/^\\!/,r1=/^\\#/,i1=/\r?\n/g,n1=/^\.*\/|^\.+$/,Ga="/",rm="node-ignore";typeof Symbol<"u"&&(rm=Symbol.for("node-ignore"));var em=rm,s1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),o1=/([0-z])-([0-z])/g,im=()=>!1,a1=e=>e.replace(o1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Xa),u1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},c1=[[/^\uFEFF/,()=>Xa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Zp:Xa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Zp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Wa],[/\\\\/g,()=>Wa],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Wa?`\\[${r}${u1(i)}${n}`:n==="]"&&i.length%2===0?`[${a1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],tm=Object.create(null),l1=(e,t)=>{let r=tm[e];return r||(r=c1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),tm[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Ka=e=>typeof e=="string",h1=e=>e&&Ka(e)&&!ZA.test(e)&&!e1.test(e)&&e.indexOf("#")!==0,f1=e=>e.split(i1),Va=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},d1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(t1,"!").replace(r1,"#");let n=l1(e,t);return new Va(r,e,i,n)},p1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Ka(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),nm=e=>n1.test(e);Et.isNotRelative=nm;Et.convert=e=>e;var Ya=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){s1(this,em,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[em]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(h1(t)){let r=d1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Qp(Ka(t)?f1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?im:p1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ga)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ga)+Ga,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Qp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},_s=e=>new Ya(e),m1=e=>Et(e&&Et.convert(e),e,im);_s.isPathValid=m1;_s.default=_s;sm.exports=_s;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||nm(r)}});var um=E((WI,am)=>{"use strict";y();am.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var mm=E((XI,Qa)=>{"use strict";y();var{promisify:g1}=F("util"),cm=F("fs"),bt=F("path"),lm=dc(),y1=om(),qi=um(),hm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],v1=g1(cm.readFile),x1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),w1=(e,t)=>{let r=qi(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(x1(r))},fm=e=>{let t=y1();for(let r of e)t.add(w1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},E1=(e,t)=>{if(e=qi(e),bt.isAbsolute(t)){if(qi(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},dm=(e,t)=>r=>e.ignores(qi(bt.relative(t,E1(t,r.path||r)))),b1=async(e,t)=>{let r=bt.join(t,e),i=await v1(r,"utf8");return{cwd:t,filePath:r,content:i}},D1=(e,t)=>{let r=bt.join(t,e),i=cm.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},pm=({ignore:e=[],cwd:t=qi(process.cwd())}={})=>({ignore:e,cwd:t});Qa.exports=async e=>{e=pm(e);let t=await lm("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>b1(n,e.cwd))),i=fm(r);return dm(i,e.cwd)};Qa.exports.sync=e=>{e=pm(e);let r=lm.sync("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}).map(n=>D1(n,e.cwd)),i=fm(r);return dm(i,e.cwd)}});var ym=E((YI,gm)=>{"use strict";y();var{Transform:C1}=F("stream"),Fs=class extends C1{constructor(){super({objectMode:!0})}},Za=class extends Fs{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},eu=class extends Fs{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};gm.exports={FilterStream:Za,UniqueStream:eu}});var bm=E((QI,mr)=>{"use strict";y();var xm=F("fs"),ks=zp(),S1=Z0(),Ts=dc(),Os=Kp(),tu=mm(),{FilterStream:A1,UniqueStream:_1}=ym(),wm=()=>!1,vm=e=>e[0]==="!",F1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},k1=(e={})=>{if(!e.cwd)return;let t;try{t=xm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},T1=e=>e.stats instanceof xm.Stats?e.path:e,Ps=(e,t)=>{e=ks([].concat(e)),F1(e),k1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(vm(n))continue;let o=e.slice(i).filter(c=>vm(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},O1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ru=(e,t)=>e.options.expandDirectories?O1(e,t):[e.pattern],Em=e=>e&&e.gitignore?tu.sync({cwd:e.cwd,ignore:e.ignore}):wm,iu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Os.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Ps(e,t),i=async()=>t&&t.gitignore?tu({cwd:t.cwd,ignore:t.ignore}):wm,n=async()=>{let h=await Promise.all(r.map(async m=>{let d=await ru(m,Os);return Promise.all(d.map(iu(m)))}));return ks(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>Ts(h.pattern,h.options)));return ks(...c).filter(h=>!o(T1(h)))};mr.exports.sync=(e,t)=>{let r=Ps(e,t),i=[];for(let s of r){let c=ru(s,Os.sync).map(iu(s));i.push(...c)}let n=Em(t),o=[];for(let s of i)o=ks(o,Ts.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Ps(e,t),i=[];for(let c of r){let h=ru(c,Os.sync).map(iu(c));i.push(...h)}let n=Em(t),o=new A1(c=>!n(c)),s=new _1;return S1(i.map(c=>Ts.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Ps;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>Ts.isDynamicPattern(r,t));mr.exports.gitignore=tu});var nu=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.aggregateFlags=void 0;var P1=os(),I1=(0,P1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function N1(e,t,r){let i={...t,...e};return r?{json:I1,...i}:i}Is.aggregateFlags=N1});var Sm=E(Ns=>{"use strict";y();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.cacheCommand=void 0;var M1=nu(),Dm=jo(),j1=On(),B1=oe();function Cm(e,t){let r=Object.getPrototypeOf(t),i=(0,B1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Cm({...i,...e},r):e}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,Dm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,Dm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function $1(e,t,r=!1){let i=Cm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await R1((0,M1.aggregateFlags)(n,o,i.enableJsonFlag),r),await L1((0,j1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...m]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Ns.cacheCommand=$1});var _m=E(Qr=>{"use strict";y();var q1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var U1=q1(et()),Fe=F("node:path"),Ms=yt(),Me=(0,U1.default)("find-root");function*su(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Am(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of su(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of su(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ms.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function H1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of su(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ms.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function z1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var ou=e=>JSON.stringify(e),J1=(e,t,r)=>ou(e?.packageDependencies.get(r))===ou(t?.packageDependencies.get(r));function W1(e,t){if(z1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=ou(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,m]of c.packageDependencies){if(m===null||o!==null&&J1(c,o,h))continue;let d=Lt.getLocator(h,m),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function G1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Am((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?W1(e,t):await H1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Am(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=G1});var lu=E(ti=>{"use strict";y();var Nm=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var X1=Nm(bm()),ei=F("node:path"),Fm=F("node:util"),V1=Nm(Ve()),Ui=$e(),js=wi(),Zr=Yr(),Mm=Fn(),Y1=Sm(),K1=_m(),km=yt(),Tm=oe(),au=Pr(),Bs=Or(),Om=V1.default.getInstance().get("@oclif/core");function uu(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>uu(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...uu(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var Q1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Pm=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Im=e=>{if(e&&typeof e.run=="function")return e},jm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Z1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Mm.SINGLE_COMMAND_CLI_SYMBOL:o})}function e_(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:jm,strategy:"pattern",target:e};if(!e.target)throw new Ui.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new Ui.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function t_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var cu=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Om.name}@${Om.version}`;_debug=(0,Bs.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return uu(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,m;try{({filePath:m,isESM:h,module:c}=Q1(this.manifest,t)?await(0,js.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,js.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Pm(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,m||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Im(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,Ui.error)(`command ${t} not found`),i?.stop(),o}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 t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,K1.findRoot)(this.options.name,this.options.root);if(!t)throw new Ui.CLIError(`could not find package.json with ${(0,Fm.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,km.readJson)((0,ei.join)(t,"package.json")),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 Ui.CLIError(`no name in package.json (${t})`);this._debug=(0,Bs.Debug)(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(([r,i])=>[r,(0,Tm.castArray)(i).map(n=>t_(n))])),this.commandDiscoveryOpts=e_(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),m=await(0,km.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
|
|
135
|
+
`)}static get tree(){return ps.tree}static url(t,r,i={}){Pc().stdout?this.log(xS(t,r,i)):this.log(r)}static get wait(){return vS.default}};_.ux=Bi;var{action:wS,annotation:ES,anykey:bS,confirm:DS,debug:CS,done:SS,flush:AS,info:_S,log:FS,logToStderr:kS,progress:TS,prompt:OS,styledHeader:PS,styledJSON:IS,styledObject:NS,table:MS,trace:jS,tree:BS,url:RS,wait:LS}=Bi;_.action=wS;_.annotation=ES;_.anykey=bS;_.confirm=DS;_.debug=CS;_.done=SS;_.flush=AS;_.info=_S;_.log=FS;_.logToStderr=kS;_.progress=TS;_.prompt=OS;_.styledHeader=PS;_.styledJSON=IS;_.styledObject=NS;_.table=MS;_.trace=jS;_.tree=BS;_.url=RS;_.wait=LS;var{error:$S,exit:qS,warn:US}=gS;_.error=$S;_.exit=qS;_.warn=US;var Cp=async()=>{try{await Bi.done()}catch(e){console.error(e),process.exitCode=1}},HS=process.listeners("exit").find(e=>e.name===Cp.name);HS||process.once("exit",Cp);var zS=Ln();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return zS.ActionBase}});var Sp=Un();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Sp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Sp.config}});var JS=bp();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return JS.ExitError}});var WS=_a();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return WS.Table}});var GS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return GS.colorize}});var XS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ms(XS).default}})});var Ap=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var gs=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new gs("stdout");Vr.stderr=new gs("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var Li=F("node:perf_hooks"),VS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ba=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,Li.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Li.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Li.performance.mark(this.stopMarker)}},Ra=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new Li.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}Li.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return VS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ba(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=Ra});var Fp=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var _p=F("node:os");function YS(){return(0,_p.homedir)()}Kr.getHomeDir=YS;function KS(){return(0,_p.platform)()}Kr.getPlatform=KS});var kp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertValidPattern=void 0;var QS=1024*64,ZS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>QS)throw new TypeError("pattern is too long")};ys.assertValidPattern=ZS});var Op=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.parseClass=void 0;var eA={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},$i=e=>e.replace(/[[\]\\-]/g,"\\$&"),tA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Tp=e=>e.join(""),rA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,m=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){m=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[g,[v,x,w]]of Object.entries(eA))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push($i(f)+"-"+$i(l)):l===f&&i.push($i(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push($i(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push($i(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let l=i[0].length===2?i[0].slice(-1):i[0];return[tA(l),!1,d-r,!1]}let p="["+(m?"^":"")+Tp(i)+"]",a="["+(m?"":"^")+Tp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};vs.parseClass=rA});var ws=E(xs=>{"use strict";y();Object.defineProperty(xs,"__esModule",{value:!0});xs.unescape=void 0;var iA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");xs.unescape=iA});var qa=E(Cs=>{"use strict";y();var _e;Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AST=void 0;var nA=Op(),Es=ws(),sA=new Set(["!","?","+","*","@"]),La=e=>sA.has(e),Pp=e=>La(e.type),oA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),aA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Ip=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cA="(?!(?:^|/)\\.\\.?(?:$|/))",bs="(?!\\.)",lA=new Set(["[","."]),hA=new Set(["..","."]),fA=new Set("().*{}+?[]^$\\!"),dA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$a="[^/]",Np=$a+"*?",Mp=$a+"+?",Ds=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,m=-1,d=!1;if(r.type===null){let l=i,g="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,g+=v;continue}if(h){l===m+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===m+2&&d)&&(h=!1),g+=v;continue}else if(v==="["){h=!0,m=l,d=!1,g+=v;continue}if(!n.noext&&La(v)&&t.charAt(l)==="("&&o<=s){r.push(g),g="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}g+=v}return r.push(g),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===m+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===m+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,m=f,d=!1,u+=l;continue}if(La(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,aA)}#p(t,r=oA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=uA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Ip.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Ip.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Pp(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Pp(this)){let h=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[u,l,g,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&hA.has(this.#e[0]))){let u=lA,l=r&&u.has(m.charAt(0))||m.startsWith("\\.")&&u.has(m.charAt(2))||m.startsWith("\\.\\.")&&u.has(m.charAt(4)),g=!r&&!t&&u.has(m.charAt(0));d=l?cA:g?bs:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+m+f,(0,Es.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),m=this;return m.#e=[h],m.type=null,m.#i=void 0,[h,(0,Es.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!bs?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?bs:"")+Mp;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?bs:"")+Np+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,Es.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let m=t.charAt(h);if(n){n=!1,o+=(fA.has(m)?"\\":"")+m,c=!1;continue}if(m==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[d,f,p,a]=(0,nA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(m==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Mp:Np,r=!0;continue}else c=!1;if(m==="?"){o+=$a,r=!0;continue}o+=dA(m)}return[o,(0,Es.unescape)(t),!!r,s]}};Cs.AST=Ds;_e=Ds});var Ua=E(Ss=>{"use strict";y();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.escape=void 0;var pA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Ss.escape=pA});var Up=E(k=>{"use strict";y();var mA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var gA=mA(Q0()),As=kp(),Rp=qa(),yA=Ua(),vA=ws(),xA=(e,t,r={})=>((0,As.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=xA;var wA=/^\*+([^+@!?\*\[\(]*)$/,EA=e=>t=>!t.startsWith(".")&&t.endsWith(e),bA=e=>t=>t.endsWith(e),DA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),CA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),SA=/^\*+\.\*+$/,AA=e=>!e.startsWith(".")&&e.includes("."),_A=e=>e!=="."&&e!==".."&&e.includes("."),FA=/^\.\*+$/,kA=e=>e!=="."&&e!==".."&&e.startsWith("."),TA=/^\*+$/,OA=e=>e.length!==0&&!e.startsWith("."),PA=e=>e.length!==0&&e!=="."&&e!=="..",IA=/^\?+([^+@!?\*\[\(]*)?$/,NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=$p([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},jA=([e,t=""])=>{let r=$p([e]);return t?i=>r(i)&&i.endsWith(t):r},BA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},Lp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},$p=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},qp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",jp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=qp==="win32"?jp.win32.sep:jp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var RA="[^/]",LA=RA+"*?",$A="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qA="(?:(?!(?:\\/|^)\\.).)*?",UA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=UA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),HA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=HA;k.minimatch.defaults=k.defaults;var zA=(e,t={})=>((0,As.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gA.default)(e));k.braceExpand=zA;k.minimatch.braceExpand=k.braceExpand;var JA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=JA;k.minimatch.makeRe=k.makeRe;var WA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=WA;k.minimatch.match=k.match;var Bp=/[?*]|[+@!]\(.*?\)|\[|\]/,GA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,As.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||qp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!Bp.test(o[2]))&&!Bp.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(m)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],m=i[n+3];if(c!==".."||!h||h==="."||h===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:m?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,m,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!m.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of m)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let g=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[g--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[m,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,m;for(s=n,c=o,m=t.length,h=r.length;s<m&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===m&&c===h)return!0;if(s===m)return i;if(c===h)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,As.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(TA))?n=r.dot?PA:OA:(i=t.match(wA))?n=(r.nocase?r.dot?CA:DA:r.dot?bA:EA)(i[1]):(i=t.match(IA))?n=(r.nocase?r.dot?MA:NA:r.dot?jA:BA)(i):(i=t.match(SA))?n=r.dot?_A:AA:(i=t.match(FA))&&(n=kA);let o=Rp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?LA:r.dot?$A:qA,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let m=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?GA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return m.forEach((d,f)=>{let p=m[f+1],a=m[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+p:m[f]=i:p===void 0?m[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,m[f+1]=k.GLOBSTAR))}),m.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],m=n;if(i.matchBase&&h.length===1&&(m=[s]),this.matchOne(m,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var XA=qa();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return XA.AST}});var VA=Ua();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return VA.escape}});var YA=ws();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return YA.unescape}});k.minimatch.AST=Rp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=yA.escape;k.minimatch.unescape=vA.unescape});var zp=E((RI,Hp)=>{"use strict";y();Hp.exports=(...e)=>[...new Set([].concat(...e))]});var Wp=E(dr=>{"use strict";y();var{promisify:KA}=F("util"),Jp=F("fs");async function Ha(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await KA(Jp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function za(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Jp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=Ha.bind(null,"stat","isFile");dr.isDirectory=Ha.bind(null,"stat","isDirectory");dr.isSymlink=Ha.bind(null,"lstat","isSymbolicLink");dr.isFileSync=za.bind(null,"statSync","isFile");dr.isDirectorySync=za.bind(null,"statSync","isDirectory");dr.isSymlinkSync=za.bind(null,"lstatSync","isSymbolicLink")});var Kp=E((UI,Ja)=>{"use strict";y();var pr=F("path"),Gp=Wp(),Xp=e=>e.length>1?`{${e.join(",")}}`:e[0],Vp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},QA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Xp(t)}`,Yp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,QA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Xp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ja.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Gp.isDirectory(Vp(i,t.cwd))?Yp(i,t):i));return[].concat.apply([],r)};Ja.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Gp.isDirectorySync(Vp(i,t.cwd))?Yp(i,t):i);return[].concat.apply([],r)}});var om=E((zI,sm)=>{y();function Qp(e){return Array.isArray(e)?e:[e]}var Xa="",Zp=" ",Wa="\\",ZA=/^\s+$/,e1=/(?:[^\\]|^)\\$/,t1=/^\\!/,r1=/^\\#/,i1=/\r?\n/g,n1=/^\.*\/|^\.+$/,Ga="/",rm="node-ignore";typeof Symbol<"u"&&(rm=Symbol.for("node-ignore"));var em=rm,s1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),o1=/([0-z])-([0-z])/g,im=()=>!1,a1=e=>e.replace(o1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Xa),u1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},c1=[[/^\uFEFF/,()=>Xa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Zp:Xa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Zp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Wa],[/\\\\/g,()=>Wa],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Wa?`\\[${r}${u1(i)}${n}`:n==="]"&&i.length%2===0?`[${a1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],tm=Object.create(null),l1=(e,t)=>{let r=tm[e];return r||(r=c1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),tm[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Ka=e=>typeof e=="string",h1=e=>e&&Ka(e)&&!ZA.test(e)&&!e1.test(e)&&e.indexOf("#")!==0,f1=e=>e.split(i1),Va=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},d1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(t1,"!").replace(r1,"#");let n=l1(e,t);return new Va(r,e,i,n)},p1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Ka(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),nm=e=>n1.test(e);Et.isNotRelative=nm;Et.convert=e=>e;var Ya=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){s1(this,em,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[em]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(h1(t)){let r=d1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Qp(Ka(t)?f1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?im:p1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ga)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ga)+Ga,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Qp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},_s=e=>new Ya(e),m1=e=>Et(e&&Et.convert(e),e,im);_s.isPathValid=m1;_s.default=_s;sm.exports=_s;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||nm(r)}});var um=E((WI,am)=>{"use strict";y();am.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var mm=E((XI,Qa)=>{"use strict";y();var{promisify:g1}=F("util"),cm=F("fs"),bt=F("path"),lm=dc(),y1=om(),qi=um(),hm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],v1=g1(cm.readFile),x1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),w1=(e,t)=>{let r=qi(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(x1(r))},fm=e=>{let t=y1();for(let r of e)t.add(w1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},E1=(e,t)=>{if(e=qi(e),bt.isAbsolute(t)){if(qi(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},dm=(e,t)=>r=>e.ignores(qi(bt.relative(t,E1(t,r.path||r)))),b1=async(e,t)=>{let r=bt.join(t,e),i=await v1(r,"utf8");return{cwd:t,filePath:r,content:i}},D1=(e,t)=>{let r=bt.join(t,e),i=cm.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},pm=({ignore:e=[],cwd:t=qi(process.cwd())}={})=>({ignore:e,cwd:t});Qa.exports=async e=>{e=pm(e);let t=await lm("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>b1(n,e.cwd))),i=fm(r);return dm(i,e.cwd)};Qa.exports.sync=e=>{e=pm(e);let r=lm.sync("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}).map(n=>D1(n,e.cwd)),i=fm(r);return dm(i,e.cwd)}});var ym=E((YI,gm)=>{"use strict";y();var{Transform:C1}=F("stream"),Fs=class extends C1{constructor(){super({objectMode:!0})}},Za=class extends Fs{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},eu=class extends Fs{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};gm.exports={FilterStream:Za,UniqueStream:eu}});var bm=E((QI,mr)=>{"use strict";y();var xm=F("fs"),ks=zp(),S1=Z0(),Ts=dc(),Os=Kp(),tu=mm(),{FilterStream:A1,UniqueStream:_1}=ym(),wm=()=>!1,vm=e=>e[0]==="!",F1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},k1=(e={})=>{if(!e.cwd)return;let t;try{t=xm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},T1=e=>e.stats instanceof xm.Stats?e.path:e,Ps=(e,t)=>{e=ks([].concat(e)),F1(e),k1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(vm(n))continue;let o=e.slice(i).filter(c=>vm(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},O1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ru=(e,t)=>e.options.expandDirectories?O1(e,t):[e.pattern],Em=e=>e&&e.gitignore?tu.sync({cwd:e.cwd,ignore:e.ignore}):wm,iu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Os.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Ps(e,t),i=async()=>t&&t.gitignore?tu({cwd:t.cwd,ignore:t.ignore}):wm,n=async()=>{let h=await Promise.all(r.map(async m=>{let d=await ru(m,Os);return Promise.all(d.map(iu(m)))}));return ks(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>Ts(h.pattern,h.options)));return ks(...c).filter(h=>!o(T1(h)))};mr.exports.sync=(e,t)=>{let r=Ps(e,t),i=[];for(let s of r){let c=ru(s,Os.sync).map(iu(s));i.push(...c)}let n=Em(t),o=[];for(let s of i)o=ks(o,Ts.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Ps(e,t),i=[];for(let c of r){let h=ru(c,Os.sync).map(iu(c));i.push(...h)}let n=Em(t),o=new A1(c=>!n(c)),s=new _1;return S1(i.map(c=>Ts.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Ps;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>Ts.isDynamicPattern(r,t));mr.exports.gitignore=tu});var nu=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.aggregateFlags=void 0;var P1=os(),I1=(0,P1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function N1(e,t,r){let i={...t,...e};return r?{json:I1,...i}:i}Is.aggregateFlags=N1});var Sm=E(Ns=>{"use strict";y();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.cacheCommand=void 0;var M1=nu(),Dm=jo(),j1=On(),B1=oe();function Cm(e,t){let r=Object.getPrototypeOf(t),i=(0,B1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Cm({...i,...e},r):e}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,Dm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,Dm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function $1(e,t,r=!1){let i=Cm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await R1((0,M1.aggregateFlags)(n,o,i.enableJsonFlag),r),await L1((0,j1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...m]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Ns.cacheCommand=$1});var _m=E(Qr=>{"use strict";y();var q1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var U1=q1(et()),Fe=F("node:path"),Ms=yt(),Me=(0,U1.default)("find-root");function*su(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Am(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of su(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of su(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ms.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function H1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of su(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ms.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function z1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var ou=e=>JSON.stringify(e),J1=(e,t,r)=>ou(e?.packageDependencies.get(r))===ou(t?.packageDependencies.get(r));function W1(e,t){if(z1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=ou(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,m]of c.packageDependencies){if(m===null||o!==null&&J1(c,o,h))continue;let d=Lt.getLocator(h,m),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function G1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Am((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?W1(e,t):await H1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Am(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=G1});var lu=E(ti=>{"use strict";y();var Nm=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var X1=Nm(bm()),ei=F("node:path"),Fm=F("node:util"),V1=Nm(Ve()),Ui=$e(),js=wi(),Zr=Yr(),Mm=Fn(),Y1=Sm(),K1=_m(),km=yt(),Tm=oe(),au=Pr(),Bs=Or(),Om=V1.default.getInstance().get("@oclif/core");function uu(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>uu(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...uu(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var Q1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Pm=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Im=e=>{if(e&&typeof e.run=="function")return e},jm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Z1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Mm.SINGLE_COMMAND_CLI_SYMBOL:o})}function e_(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:jm,strategy:"pattern",target:e};if(!e.target)throw new Ui.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new Ui.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function t_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var cu=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Om.name}@${Om.version}`;_debug=(0,Bs.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return uu(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,m;try{({filePath:m,isESM:h,module:c}=Q1(this.manifest,t)?await(0,js.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,js.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Pm(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,m||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Im(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,Ui.error)(`command ${t} not found`),i?.stop(),o}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 t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,K1.findRoot)(this.options.name,this.options.root);if(!t)throw new Ui.CLIError(`could not find package.json with ${(0,Fm.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,km.readJson)((0,ei.join)(t,"package.json")),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 Ui.CLIError(`no name in package.json (${t})`);this._debug=(0,Bs.Debug)(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(([r,i])=>[r,(0,Tm.castArray)(i).map(n=>t_(n))])),this.commandDiscoveryOpts=e_(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),m=await(0,km.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
|
|
136
136
|
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",h),this.hasManifest=!0,m}catch(h){if(h.code==="ENOENT"){if(!c)return n(!0)}else this.warn(h,"readManifest")}},o=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let c=await n();if(c)return o?.addDetails({commandCount:Object.keys(c.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(c.commands),c}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async c=>{try{let h=await this.findCommand(c,{must:!0}),m=await(0,Y1.cacheCommand)(h,this,i);if(m.id=c,this.flexibleTaxonomy){let d=(0,Bs.getCommandIdPermutations)(c),f=m.aliases.flatMap(p=>(0,Bs.getCommandIdPermutations)(p));return[c,{...m,aliasPermutations:f,permutations:d}]}return[c,m]}catch(h){let m=`findCommand (${c})`;if(!r)this.warn(h,m);else throw this.addErrorScope(h,m)}}))).filter(c=>!!c).reduce((c,[h,m])=>(c[h]=m,c),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,Fm.inspect)(t).trim(),t.detail=(0,Tm.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
|
|
137
|
-
`),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,X1.default)(this.commandDiscoveryOpts?.globPatterns??jm,{cwd:t});return Z1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Im(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,au.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 t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,js.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,js.load)(this,t);return this.commandCache={[Mm.SINGLE_COMMAND_CLI_SYMBOL]:Pm(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=cu});var Lm=E(Dt=>{"use strict";y();var r_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),i_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),n_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&r_(t,e,r);return i_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var s_=Up(),hu=F("node:path"),ri=Yr(),fu=yt(),o_=oe(),Bm=n_(lu()),a_=Or(),Rm=(0,a_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,s_.minimatch)(r,i)))}var du=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new Bm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,o_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Rm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let m=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new Bm.Plugin(h);if(await d.load(),m?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),m?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,hu.join)(t.dataDir,"package.json");Rm("reading user plugins pjson %s",r);let i=await(0,fu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=du});var Wm=E((Ue,Jm)=>{"use strict";y();var u_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),c_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),l_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&u_(t,e,r);return c_(t,e),t},yu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var h_=l_(vc()),f_=yu(ey()),ii=F("node:os"),Ct=F("node:path"),$m=F("node:url"),zm=yu(Ve()),d_=Ri(),p_=er(),ni=$e(),m_=Mr(),g_=wi(),we=Yr(),pu=Pt(),qm=yt(),Um=Fp(),Rs=oe(),y_=yu(Lm()),v_=Pr(),zi=Or(),Hi=(0,zi.Debug)(),Hm=zm.default.getInstance().get("@oclif/core"),mu=`${Hm.name}@${Hm.version}`,x_=new Set(["preparse"]);function w_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function E_(e){return e&&!!e._base}var Ls=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,zi.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},gu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=mu;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Ls;pluginLoader;rootPlugin;topicPermutations=new Ls;constructor(t){this.options=t}static async load(t=Jm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,$m.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),E_(t)){if(mu!==t._base){Hi(`reloading config from ${t._base} to ${mu}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Rs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,m_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,m])=>m.char?[m.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){pu.settings.performanceEnabled=(pu.settings.performanceEnabled===void 0?this.options.enablePerf:pu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new y_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=zm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.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||w_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=f_.default?"wsl":(0,Um.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.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Um.getHomeDir)()||(0,ii.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.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.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 %>",...i.templates&&i.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 %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),Hi("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,qm.safeReadJson)(t):void 0,await(0,qm.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,p_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);Hi("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,m=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:m});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);Hi("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(x_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,g={}){(0,ni.error)(l,g)},exit(l=0){(0,ni.exit)(l)},log(l,...g){d_.ux.info(l,...g)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let g=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,g_.loadWithData)(f,await(0,v_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}g?.addDetails({event:t,hook:l.target,plugin:f.name}),g?.stop()}});return await Promise.all(d),Hi("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return h_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new $m.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
137
|
+
`),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,X1.default)(this.commandDiscoveryOpts?.globPatterns??jm,{cwd:t});return Z1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Im(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,au.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 t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,js.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,js.load)(this,t);return this.commandCache={[Mm.SINGLE_COMMAND_CLI_SYMBOL]:Pm(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=cu});var Lm=E(Dt=>{"use strict";y();var r_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),i_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),n_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&r_(t,e,r);return i_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var s_=Up(),hu=F("node:path"),ri=Yr(),fu=yt(),o_=oe(),Bm=n_(lu()),a_=Or(),Rm=(0,a_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,s_.minimatch)(r,i)))}var du=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new Bm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,o_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Rm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let m=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new Bm.Plugin(h);if(await d.load(),m?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),m?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,hu.join)(t.dataDir,"package.json");Rm("reading user plugins pjson %s",r);let i=await(0,fu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=du});var Wm=E((Ue,Jm)=>{"use strict";y();var u_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),c_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),l_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&u_(t,e,r);return c_(t,e),t},yu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var h_=l_(gc()),f_=yu(ey()),ii=F("node:os"),Ct=F("node:path"),$m=F("node:url"),zm=yu(Ve()),d_=Ri(),p_=er(),ni=$e(),m_=Mr(),g_=wi(),we=Yr(),pu=Pt(),qm=yt(),Um=Fp(),Rs=oe(),y_=yu(Lm()),v_=Pr(),zi=Or(),Hi=(0,zi.Debug)(),Hm=zm.default.getInstance().get("@oclif/core"),mu=`${Hm.name}@${Hm.version}`,x_=new Set(["preparse"]);function w_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function E_(e){return e&&!!e._base}var Ls=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,zi.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},gu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=mu;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Ls;pluginLoader;rootPlugin;topicPermutations=new Ls;constructor(t){this.options=t}static async load(t=Jm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,$m.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),E_(t)){if(mu!==t._base){Hi(`reloading config from ${t._base} to ${mu}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Rs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,m_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,m])=>m.char?[m.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){pu.settings.performanceEnabled=(pu.settings.performanceEnabled===void 0?this.options.enablePerf:pu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new y_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=zm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.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||w_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=f_.default?"wsl":(0,Um.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.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Um.getHomeDir)()||(0,ii.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.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.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 %>",...i.templates&&i.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 %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),Hi("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,qm.safeReadJson)(t):void 0,await(0,qm.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,p_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);Hi("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,m=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:m});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);Hi("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(x_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,g={}){(0,ni.error)(l,g)},exit(l=0){(0,ni.exit)(l)},log(l,...g){d_.ux.info(l,...g)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let g=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,g_.loadWithData)(f,await(0,v_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}g?.addDetails({event:t,hook:l.target,plugin:f.name}),g?.stop()}});return await Promise.all(d),Hi("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return h_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new $m.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
138
138
|
`),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
139
139
|
`),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),m=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,zi.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,zi.getCommandIdPermutations)(s):i.permutations??[s];for(let m of h)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Rs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,zi.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=gu});var $s=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var b_=Wm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return b_.Config}});var D_=lu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return D_.Plugin}});var C_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return C_.tsPath}})});var Gm=E(qs=>{"use strict";y();Object.defineProperty(qs,"__esModule",{value:!0});qs.renderList=void 0;var S_=Yt(),A_=oe(),__=cy();function F_(e,t){return __(e,S_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function k_(e){if(e.length===0)return"";let t=(0,A_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=F_(t+2,o),`${n} ${o}`):n}).join(`
|
|
140
140
|
`)}qs.renderList=k_});var Su=E(Z=>{"use strict";y();var Xm=Z&&Z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z,"__esModule",{value:!0});Z.FailedFlagValidationError=Z.ArgInvalidOptionError=Z.FlagInvalidOptionError=Z.NonExistentFlagsError=Z.UnexpectedArgsError=Z.RequiredArgsError=Z.InvalidArgsSpecError=Z.CLIParseError=Z.CLIError=void 0;var T_=Xm(Be()),Ji=Xm(Ve()),Vm=Gm(),O_=$e(),P_=oe(),I_=$e();Object.defineProperty(Z,"CLIError",{enumerable:!0,get:function(){return I_.CLIError}});var lt=class extends O_.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
|
|
@@ -148,14 +148,14 @@ Alternatively, you can use "--" to signify the end of the flags and the beginnin
|
|
|
148
148
|
`))}`;super({exit:Ji.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:c,parse:i})}};Z.FailedFlagValidationError=Cu});var Km=E(ht=>{"use strict";y();var N_=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Parser=ht.readStdin=void 0;var M_=F("node:readline"),Ym=N_(Ve()),qt=oe(),yr=Su(),Ke;try{Ke=process.env.CLI_FLAGS_DEBUG==="1"?et()("../parser"):()=>{}}catch{Ke=()=>{}}var j_=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(Ke("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),c=(0,M_.createInterface)({input:e,output:t,terminal:!1});c.on("line",h=>{i+=h}),c.once("close",()=>{clearTimeout(s),Ke("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{Ke("stdin aborted"),clearTimeout(s),c.close(),r(null)},{once:!0})})};ht.readStdin=j_;function B_(e){return/^-\d/g.test(e)}var Us=(e,t)=>{if(e.options&&!e.options.includes(t))throw new yr.FlagInvalidOptionError(e,t);return t},Au=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,qt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:p,name:a}=this.findFlag(f);if(!a){let l=f.indexOf("=");if(l!==-1){let g=f.slice(l+1);this.argv.unshift(g);let v=await t(f.slice(0,l));return v||this.argv.shift(),v}return!1}let u=this.input.flags[a];if(u.type==="option"){if(!u.multiple&&this.raw.some(g=>g.type==="flag"&&g.flag===a))throw new yr.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=u;let l=p||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(u.allowStdin==="only"&&l!=="-"&&l!==void 0&&!this.findFlag(l).name)throw new yr.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(u.allowStdin&&l==="-"||u.allowStdin==="only"){let g=await(0,ht.readStdin)();g&&(l=g.trim())}if(typeof l!="string"||this.findFlag(l).name)throw u.options?new yr.CLIError(`Flag --${a} expects one of these values: ${u.options.join(", ")}`):new yr.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:u.name,input:l,type:"flag"})}else this.raw.push({flag:u.name,input:f,type:"flag"}),!p&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!B_(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let p=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:p,input:f,type:"arg"})}let[{args:s,argv:c},{flags:h,metadata:m}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(c,s,h);let d=n?[...c,...i,"--"]:[...c,...i];return{args:s,argv:d.sort((f,p)=>o.indexOf(f)-o.indexOf(p)),flags:h,metadata:m,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,c]of Object.entries(this.input.args)){let h=i.find(m=>m.arg===s);if(o.token=h,h){if(c.options&&!c.options.includes(h.input))throw new yr.ArgInvalidOptionError(c,h.input);let m=await c.parse(h.input,o,c);t.push(m),r[h.arg]=m}else if(!c.ignoreStdin&&!n){let m=await(0,ht.readStdin)();if(m){m=m.trim();let d=await c.parse(m,o,c);t.push(d),r[s]=d}n=!0}if(!r[s]&&(c.default||c.default===!1))if(typeof c.default=="function"){let m=await c.default();t.push(m),r[s]=m}else t.push(c.default),r[s]=c.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){Ke("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&Ke("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&Ke("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&Ke("argv: %o",i),Object.keys(t).length>0&&Ke("args: %o",t),Object.keys(r).length>0&&Ke("flags: %o",r)}async _flags(){let t=async(f,p,a,u)=>{if(!p.parse)return f;let l={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:u,warn:a?.warn};try{return p.type==="boolean"?await p.parse(f,l,p):await p.parse(f,l,p)}catch(g){throw g.message=`Parsing --${p.name}
|
|
149
149
|
${g.message}
|
|
150
150
|
See more help with --help`,Ym.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:Ym.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,qt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,qt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,qt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(u=>u.input.split(a.inputFlag.flag.delimiter??",")).map(u=>u.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async u=>t(u,a.inputFlag.flag,this.context,{...(0,qt.last)(a.tokens),input:u})))).map(u=>Us(a.inputFlag.flag,u))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(u=>t(Us(a.inputFlag.flag,u.input),a.inputFlag.flag,this.context,u)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(Us(a.inputFlag.flag,(0,qt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,qt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async u=>t(Us(u.inputFlag.flag,a),u.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async u=>(0,qt.isTruthy)(process.env[u.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,u={})=>f.inputFlag.flag.default({flags:u,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(p,a,...u)=>p.inputFlag.flag.defaultHelp({flags:a,options:p.inputFlag},...u):p=>p.inputFlag.flag.defaultHelp}:f,n=async f=>{let p=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,p,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),s=this.mapAndValidateFlags(),c=await Promise.all(Object.entries(this.input.flags).filter(([f,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||s.has(f)).map(([f,p])=>({inputFlag:{flag:p,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),h=o(c.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(c.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,h)}:f)),d=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(d),metadata:{flags:Object.fromEntries(d.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new yr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};ht.Parser=Au});var Qm=E(Hs=>{"use strict";y();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.validate=void 0;var R_=oe(),Wi=Su();async function L_(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new Wi.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let p=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>p){let l=e.output.argv.slice(p);throw new Wi.UnexpectedArgsError({args:l,parse:e})}let a=[],u=!1;for(let[l,g]of Object.entries(e.input.args)){if(!g.required)u=!0;else if(u)throw new Wi.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[l]===void 0&&a.push(g)}if(a.length>0){let l=Object.entries(e.input.flags).filter(([g,v])=>v.type==="option"&&!!v.multiple).map(([g])=>g);throw new Wi.RequiredArgsError({args:a,flagsWithMultiple:l,parse:e})}}async function i(){let p=Object.entries(e.input.flags).flatMap(([l,g])=>e.output.flags[l]!==void 0?[...g.relationships?f(l,g):[],...g.dependsOn?[m(l,g.dependsOn)]:[],...g.exclusive?[c(l,g.exclusive)]:[],...g.exactlyOne?[h(l,g.exactlyOne)]:[]]:g.required?[{name:l,reason:`Missing required flag ${l}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),u=(await Promise.all(p)).filter(l=>l.status==="failed");if(u.length>0)throw new Wi.FailedFlagValidationError({failed:u,parse:e})}async function n(p){if(t)return t;let a=p.map(async l=>typeof l=="string"?[l,e.output.flags[l]]:await l.when(e.output.flags)?[l.name,e.output.flags[l.name]]:null),u=await Promise.all(a);return t=Object.fromEntries(u.filter(l=>l!==null)),t}let o=p=>Object.keys(p).filter(a=>a!==void 0);function s(p){let a={name:p.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(l=>l[0]).filter(l=>e.output.flags[l]!==void 0).filter(l=>p.exactlyOne&&p.exactlyOne.includes(l)).length===0){let g=`Exactly one of the following must be provided: ${(0,R_.uniq)(p.exactlyOne?.map(v=>`--${v}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function c(p,a){let u={name:p,validationFn:"validateExclusive"},l=await n(a),g=o(l);for(let v of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[v]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[p]?.setFromDefault)&&e.output.flags[v]!==void 0){let x=e.output.metadata.flags?.[v]?.defaultHelp??e.output.flags[v];return{...u,reason:`--${v}=${x} cannot also be provided when using --${p}`,status:"failed"}}return{...u,status:"success"}}async function h(p,a){let u={name:p,validationFn:"validateExactlyOne"},l=await n(a),g=o(l);for(let v of g)if(v!==p&&e.output.flags[v]!==void 0)return{...u,reason:`--${v} cannot also be provided when using --${p}`,status:"failed"};return{...u,status:"success"}}async function m(p,a){let u={name:p,validationFn:"validateDependsOn"},l=await n(a);if(!Object.values(l).every(v=>v!==void 0)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`All of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}async function d(p,a){let u={name:p,validationFn:"validateSome"},l=await n(a);if(!Object.values(l).some(Boolean)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`One of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}function f(p,a){return(a.relationships??[]).map(u=>{switch(u.type){case"all":return m(p,u.flags);case"some":return d(p,u.flags);case"none":return c(p,u.flags);default:throw new Error(`Unknown relationship type: ${u.type}`)}})}return r(),i()}Hs.validate=L_});var eg=E(Ut=>{"use strict";y();var $_=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.flagUsages=Ut.flagUsage=void 0;var q_=$_(Be()),U_=oe();function Zm(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?q_.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Ut.flagUsage=Zm;function H_(e,t={}){return e.length===0?[]:(0,U_.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>Zm(r,t))}Ut.flagUsages=H_});var _u=E(si=>{"use strict";y();Object.defineProperty(si,"__esModule",{value:!0});si.parse=si.flagUsages=void 0;var z_=Km(),J_=Qm(),W_=eg();Object.defineProperty(si,"flagUsages",{enumerable:!0,get:function(){return W_.flagUsages}});async function G_(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new z_.Parser(r).parse();return await(0,J_.validate)({input:r,output:n}),n}si.parse=G_});var ag=E(He=>{"use strict";y();var X_=He&&He.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),V_=He&&He.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ng=He&&He.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&X_(t,e,r);return V_(t,e),t},sg=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(He,"__esModule",{value:!0});He.Command=void 0;var Y_=sg(Be()),K_=F("node:url"),tg=F("node:util"),og=sg(Ve()),zs=Ri(),Q_=$s(),oi=ng($e()),Gi=Mr(),Z_=ng(_u()),rg=nu(),Fu=Nr(),eF=oe(),ig=og.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var ku=class{argv;config;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;static _base=`${ig.name}@${ig.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=et()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,K_.fileURLToPath)(r));let i=await Q_.Config.load(r||F.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{zs.ux.action.stop(Y_.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return oi.error(t,r)}exit(t=0){oi.exit(t)}async finally(t){try{let{config:r}=oi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(oi.config.debug=!0),this.config.errlog&&(oi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["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 t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,tg.inspect)(t),zs.ux.info(t,...r))}logJson(t){zs.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,tg.inspect)(t),zs.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,rg.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(c=>c.plugin.root===og.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await Z_.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||oi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,Gi.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,Fu.toConfiguredId)(this.ctor.id,this.config),i=(0,Fu.toConfiguredId)(t,this.config);this.warn((0,Gi.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,Fu.toConfiguredId)(this.ctor.id,this.config);this.warn((0,Gi.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,rg.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,Gi.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let c=(0,eF.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(c.length===0)return;let h=c.filter(m=>this.argv.some(d=>d.startsWith(m)));for(let m of h){let d=`--${n?.name}`;n?.char&&(d+=` | -${n?.char}`),this.warn((0,Gi.formatFlagDeprecationWarning)(m,{to:d}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};He.Command=ku});var Pu=E(ze=>{"use strict";y();var tF=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.run=ze.versionAddition=ze.helpAddition=void 0;var ug=F("node:url"),rF=tF(Ve()),iF=Ri(),nF=$s(),Ou=Si(),ai=Yr(),sF=Fn(),Tu=et()("oclif:main"),oF=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Ou.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};ze.helpAddition=oF;var aF=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};ze.versionAddition=aF;async function uF(e,t){let r=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run"),i=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await ai.Performance.collect(),ai.Performance.debug()},o=async d=>{let f=await(0,Ou.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(d)};Tu(`process.execPath: ${process.execPath}`),Tu(`process.execArgv: ${process.execArgv}`),Tu("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof ug.URL)&&(t=(0,ug.fileURLToPath)(t));let s=await nF.Config.load(t??F.main?.filename??__dirname);rF.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[sF.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[c,...h]=(0,Ou.normalizeArgv)(s,e);if(await s.runHook("init",{argv:h,id:c}),(0,ze.versionAddition)(e,s)){iF.ux.log(s.userAgent),await n();return}if((0,ze.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(c);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(c))){await o([c]),await n();return}i?.stop();try{return await s.runCommand(c,h,m)}finally{await n()}}ze.run=uF});var cg=E(Js=>{"use strict";y();Object.defineProperty(Js,"__esModule",{value:!0});Js.execute=void 0;var cF=zn(),lF=$e(),hF=Bn(),fF=Pu(),dF=Pt();async function pF(e){if(!e.dir&&!e.loadOptions)throw new lF.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",dF.settings.debug=!0),(0,fF.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,cF.flush)(),t)).catch(async t=>(0,hF.handle)(t))}Js.execute=pF});var hg=E(lg=>{"use strict";y();Object.defineProperty(lg,"__esModule",{value:!0})});var Gs=E(O=>{"use strict";y();var mF=O&&O.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),gF=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vr=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&mF(t,e,r);return gF(t,e),t},yF=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.toStandardizedId=O.toConfiguredId=O.settings=O.Performance=O.Parser=O.ModuleLoader=O.run=O.Interfaces=O.loadHelpClass=O.HelpBase=O.Help=O.CommandHelp=O.Flags=O.execute=O.handle=O.Errors=O.Plugin=O.Config=O.Command=O.stdout=O.stderr=O.flush=O.ux=O.Args=void 0;var vF=yF(Ot());function xF(){try{process.cwd()}catch(e){e.code==="ENOENT"&&vF.default.stderr(`WARNING: current directory does not exist
|
|
151
|
-
`)}}xF();O.Args=vr(Gc());O.ux=vr(Ri());var wF=zn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return wF.flush}});var fg=Ap();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return fg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return fg.stdout}});var EF=ag();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return EF.Command}});var dg=$s();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return dg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return dg.Plugin}});O.Errors=vr($e());var bF=Bn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return bF.handle}});var DF=cg();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return DF.execute}});O.Flags=vr(os());var Ws=Si();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Ws.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Ws.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Ws.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Ws.loadHelpClass}});O.Interfaces=vr(hg());var CF=Pu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return CF.run}});O.ModuleLoader=vr(wi());O.Parser=vr(_u());var SF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return SF.Performance}});var AF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return AF.settings}});var pg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return pg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return pg.toStandardizedId}})});y();import{createRequire as fy}from"node:module";import{pathToFileURL as qc}from"node:url";var Uc=fy(import.meta.url);async function Hc(e){let t;try{t=Uc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(o){throw o instanceof Error&&o.code==="MODULE_NOT_FOUND"?new I("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):o}let r=await
|
|
151
|
+
`)}}xF();O.Args=vr(Gc());O.ux=vr(Ri());var wF=zn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return wF.flush}});var fg=Ap();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return fg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return fg.stdout}});var EF=ag();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return EF.Command}});var dg=$s();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return dg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return dg.Plugin}});O.Errors=vr($e());var bF=Bn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return bF.handle}});var DF=cg();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return DF.execute}});O.Flags=vr(os());var Ws=Si();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Ws.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Ws.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Ws.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Ws.loadHelpClass}});O.Interfaces=vr(hg());var CF=Pu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return CF.run}});O.ModuleLoader=vr(wi());O.Parser=vr(_u());var SF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return SF.Performance}});var AF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return AF.settings}});var pg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return pg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return pg.toStandardizedId}})});y();import{createRequire as fy}from"node:module";import{pathToFileURL as qc}from"node:url";var Uc=fy(import.meta.url);async function Hc(e){let t;try{t=Uc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(o){throw o instanceof Error&&o.code==="MODULE_NOT_FOUND"?new I("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):o}let r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(le(r.path),i);return import(qc(n).href)}function dy(e,t){let r=Uc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(qc(r).href)}y();var io=nn(Gs(),1);y();var ee=nn(Gs(),1);y();y();y();import{fileURLToPath as mg}from"node:url";import{existsSync as kF}from"node:fs";y();import{exec as _F}from"node:child_process";import{promisify as FF}from"node:util";var Qe=FF(_F);function $N(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Nu=new URL("../../..",import.meta.url).pathname,Xi=(()=>{try{let e=N(le(Nu),"templates","skeleton");return kF(e)}catch{return!1}})(),VN=Xi?Nu:void 0,TF="assets/hydrogen",OF="starter",Ht="routes",Iu;async function PF(){if(Iu??=await mc("package.json",{cwd:mg(import.meta.url),type:"file"}),!Iu)throw new I("Could not find assets directory","Please report this error.");return Iu}async function Ze(e,...t){return N(le(await PF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${TF}`,e??"",...t)}async function Vi(e,t){t??=await Mu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?mg(r):r.toString()}function Mu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Xs():Ze(OF)}function Xs(){if(!Xi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(le(Nu),"templates","skeleton")}function IF(){return N(Xs(),"node_modules")}async function gg(){if(Xi)return IF();let{stdout:e}=await Qe("npm root");return e.trim()}var ju=["tailwind","vanilla-extract","css-modules","postcss"];async function yg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(N(n,o));await V(N(r,s),i(c,o))}))}async function vg(e,t,r){let i=Object.values(e).map(o=>U(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as NF}from"node:fs/promises";y();hy();import*as xg from"fs/promises";import*as wg from"path";var Bu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await xg.lstat(e)).isFile()?e:wg.resolve(e,"prettier.file");try{return await Rc(t)||Bu}catch{return Bu}}async function zt(e,t=Bu,r=""){let i=sn(r);return Lc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var MF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=MF){let i=await NF(e);if(i.includes(t)){let n=J(e,t);if(!await un(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var Eg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Vs(e,t,r){let i=await po(N(t,"package.json")),n=await po(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!Eg.includes(h));for(let h of s){if(o.has(h))continue;let m=n[h],d=i[h],f=Array.isArray(m)&&Array.isArray(d)?[...d,...m]:typeof m=="object"&&typeof d=="object"?{...d,...m}:m;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of Eg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((m,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),m[d]=f,m},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Yi(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function bg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Yi(n)).parse(o).root(),m=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=m.find(l=>l.text().includes(".css"))||m.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
|
|
152
152
|
`+s).replace(a,u+`
|
|
153
153
|
`+a)})}async function Ys(e,t,r,i){let{filepath:n,astType:o}=await be(e,"vite.config");if(!n||!o)throw new I(`Could not find vite.config file in ${e}`);await ui(n,t,async s=>{let c=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await Yi(o)).parse(s).root(),d=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(jF);if(!d||!f)throw new I('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),u=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
|
|
154
|
-
`+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-
|
|
154
|
+
`+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-77RHJICZ.js");return i(e,t,r)}y();var Fg={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},BF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Fg)]);function RF(e,t=!1){let r={compilerOptions:{...Fg}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of BF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function $u(e,t=!0){let r=N(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await pc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await an(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await an(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=N(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
|
|
155
155
|
`+o.stack)}try{let o=N(e,"tsconfig.json"),s=await X(o),c=RF(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await an(o),await V(N(e,"jsconfig.json"),JSON.stringify(c,null,2))}catch(o){me(`Could not transpile tsconfig.json:
|
|
156
156
|
`+o.stack)}try{let o=JSON.parse(await X(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[c,h]of Object.entries(o.scripts||{}))typeof h=="string"&&h.includes("react-router typegen")&&(o.scripts[c]=h.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let h of Object.keys(o.devDependencies))h.startsWith("@types/")&&delete o.devDependencies[h];let c=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(c,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(c,""))}await V(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){me(`Could not remove TS dependencies from package.json:
|
|
157
157
|
`+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await be(e,".eslintrc",["cjs","js"]),s=await X(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await V(o,await zt(s,n))}catch(o){me(`Could not remove TS rules from .eslintrc:
|
|
158
|
-
`+o.stack)}}async function kg({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await $F({rootDirectory:e,contextCreate:t}),c=await X(i),h=await LF({rootDirectory:e,contextCreate:t},r,i);await ui(o,r,async m=>{let f=(await Yi(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",u=c.match(/^(export )?function (\w+)/m)?.[2];if(!u)throw new Error("Could not find the i18n function name");let l=`${u}(${a})`,g="@shopify/hydrogen",v="createHydrogenContext",x=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${v}`}}}),[w,C]=x?.text().split(/\s+as\s+/)||[];if(w=C??w,!w)throw new I(`Could not find a Hydrogen import in ${t}`,`Please import "${v}" from "${g}"`);let S=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:w}}}}});if(!S)throw new I(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${w}({...})`);let P=S.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(u))throw new I("An i18n strategy is already set up.",`Remove the existing i18n property in the ${w}({...}) call to set up a new one.`);let{start:G,end:pe}=P.range();m=m.slice(0,G.index)+l+m.slice(pe.index)}else{let{end:G}=S.range(),pe=m.slice(0,G.index-1);m=pe+((/,\s*$/.test(pe)?"":",")+`i18n: ${l}`)+m.slice(G.index-1)}let L=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},z=N("~",kt(N(e,"app"),h.slice(0,-sn(h).length)));return m=m.slice(0,L.end.index)+`import {getLocaleFromRequest} from "${z}";`+m.slice(L.end.index),m})}async function LF({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,le(t),n?"i18n.js":"i18n.ts");if(await U(o))throw new I(`${o} already exist. Renamed or remove the existing file before continue.`);return await br(i,o),await ui(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await Jt(s,i)),s)),o}async function $F({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:J(e,t),astType:r}:await be(e,N(t));if(!i||!n)throw new I(`Could not find a context create file at ${J(e,t)}`);return{filepath:i,astType:n}}var qF=["subfolders","domains","subdomains"],qu={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},Uu=[...qF,"none"];async function Tg(e,t){let r=await Ze("i18n",`${e}.ts`);if(!await U(r))throw new Error("Unknown strategy");let i=await ft(t.rootDirectory);await kg(t,i,r)}async function Og(e){let t=Object.entries({...qu,...e?.extraChoices});return tt({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var UF=3e3,HF=9229,ci={path:{path:ee.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:ee.Flags.integer({description:`The port to run the server on. Defaults to ${UF}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:ee.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:ee.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>cn(e)})},installDeps:{"install-deps":ee.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:ee.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":ee.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":ee.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:ee.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:ee.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":ee.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:ee.Flags.string({description:`Sets the styling strategy to use. One of ${Ru.map(e=>`\`${e}\``).join(", ")}.`,choices:Ru,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:ee.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${Uu.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:Uu,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:ee.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:ee.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":ee.Flags.integer({description:`The port where the inspector is available. Defaults to ${HF}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:ee.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":ee.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":ee.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":ee.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:ee.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Ki(e){return Object.entries(e).reduce((t,[r,i])=>(t[hc(r)]=i,t),{})}function Aj(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let c=o.replace(/^\-{1,2}/,""),h=!s||s.startsWith("-")?!0:s;h===!0&&c.startsWith("no-")&&(h=!1,c=c.replace("no-","")),i[t[c]||c]=h}}return Ki(i)}function _j(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();var zF=[{pattern:"app is not installed",abort:["Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"]},{pattern:"Access denied for hydrogenStorefrontCreate field",abort:["Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]]},{pattern:"Access denied for hydrogenStorefronts field",abort:["Couldn't access Hydrogen storefronts",["Common reasons for this error include:",{list:{items:["You don't have full access to apps or access to the Hydrogen channel.","The Hydrogen sales channel isn't installed on the store."]}}]]}];async function Je(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await
|
|
158
|
+
`+o.stack)}}async function kg({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await $F({rootDirectory:e,contextCreate:t}),c=await X(i),h=await LF({rootDirectory:e,contextCreate:t},r,i);await ui(o,r,async m=>{let f=(await Yi(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",u=c.match(/^(export )?function (\w+)/m)?.[2];if(!u)throw new Error("Could not find the i18n function name");let l=`${u}(${a})`,g="@shopify/hydrogen",v="createHydrogenContext",x=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${v}`}}}),[w,C]=x?.text().split(/\s+as\s+/)||[];if(w=C??w,!w)throw new I(`Could not find a Hydrogen import in ${t}`,`Please import "${v}" from "${g}"`);let S=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:w}}}}});if(!S)throw new I(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${w}({...})`);let P=S.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(u))throw new I("An i18n strategy is already set up.",`Remove the existing i18n property in the ${w}({...}) call to set up a new one.`);let{start:G,end:pe}=P.range();m=m.slice(0,G.index)+l+m.slice(pe.index)}else{let{end:G}=S.range(),pe=m.slice(0,G.index-1);m=pe+((/,\s*$/.test(pe)?"":",")+`i18n: ${l}`)+m.slice(G.index-1)}let L=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},z=N("~",kt(N(e,"app"),h.slice(0,-sn(h).length)));return m=m.slice(0,L.end.index)+`import {getLocaleFromRequest} from "${z}";`+m.slice(L.end.index),m})}async function LF({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,le(t),n?"i18n.js":"i18n.ts");if(await U(o))throw new I(`${o} already exist. Renamed or remove the existing file before continue.`);return await br(i,o),await ui(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await Jt(s,i)),s)),o}async function $F({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:J(e,t),astType:r}:await be(e,N(t));if(!i||!n)throw new I(`Could not find a context create file at ${J(e,t)}`);return{filepath:i,astType:n}}var qF=["subfolders","domains","subdomains"],qu={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},Uu=[...qF,"none"];async function Tg(e,t){let r=await Ze("i18n",`${e}.ts`);if(!await U(r))throw new Error("Unknown strategy");let i=await ft(t.rootDirectory);await kg(t,i,r)}async function Og(e){let t=Object.entries({...qu,...e?.extraChoices});return tt({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var UF=3e3,HF=9229,ci={path:{path:ee.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:ee.Flags.integer({description:`The port to run the server on. Defaults to ${UF}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:ee.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:ee.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>cn(e)})},installDeps:{"install-deps":ee.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:ee.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":ee.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":ee.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:ee.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:ee.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":ee.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:ee.Flags.string({description:`Sets the styling strategy to use. One of ${Ru.map(e=>`\`${e}\``).join(", ")}.`,choices:Ru,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:ee.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${Uu.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:Uu,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:ee.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:ee.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":ee.Flags.integer({description:`The port where the inspector is available. Defaults to ${HF}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:ee.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":ee.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":ee.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":ee.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:ee.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Ki(e){return Object.entries(e).reduce((t,[r,i])=>(t[hc(r)]=i,t),{})}function Aj(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let c=o.replace(/^\-{1,2}/,""),h=!s||s.startsWith("-")?!0:s;h===!0&&c.startsWith("no-")&&(h=!1,c=c.replace("no-","")),i[t[c]||c]=h}}return Ki(i)}function _j(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();var zF=[{pattern:"app is not installed",abort:["Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"]},{pattern:"Access denied for hydrogenStorefrontCreate field",abort:["Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]]},{pattern:"Access denied for hydrogenStorefronts field",abort:["Couldn't access Hydrogen storefronts",["Common reasons for this error include:",{list:{items:["You don't have full access to apps or access to the Hydrogen channel.","The Hydrogen sales channel isn't installed on the store."]}}]]}];async function Je(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Dc({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;for(let{pattern:c,abort:h}of zF)if(s?.some?.(m=>m.message.includes(c)))throw new I(...h);throw o}}y();var JF=/gid:\/\/shopify\/\w*\/(\d+)/;function Pg(e){let t=JF.exec(e);if(t&&t[1]!==void 0)return t[1];throw new I(`Invalid Global ID: ${e}`)}var WF=`#graphql
|
|
159
159
|
query LinkStorefront {
|
|
160
160
|
hydrogenStorefronts {
|
|
161
161
|
id
|
|
@@ -212,7 +212,7 @@ $profileContent = Get-Content -Path $PROFILE
|
|
|
212
212
|
if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
|
|
213
213
|
Add-Content -Path $PROFILE -Value '${ik}'
|
|
214
214
|
}
|
|
215
|
-
`;async function nk(){let e=[];return await Lg(qg,"powershell.exe")&&e.push("PowerShell"),await Lg(qg,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function eo(e=process.cwd(),t){if(await ek())return ke;let r="npx",i=t??await
|
|
215
|
+
`;async function nk(){let e=[];return await Lg(qg,"powershell.exe")&&e.push("PowerShell"),await Lg(qg,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function eo(e=process.cwd(),t){if(await ek())return ke;let r="npx",i=t??await _c(e).catch(()=>null);return(i==="bun"||i==="pnpm"||i==="yarn")&&(r=i),`${r} shopify hydrogen`}y();y();var sk=`#graphql
|
|
216
216
|
query currentUserAccount {
|
|
217
217
|
currentUserAccount {
|
|
218
218
|
email
|
|
@@ -264,9 +264,9 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
|
|
|
264
264
|
status
|
|
265
265
|
webUrl
|
|
266
266
|
}
|
|
267
|
-
`;async function Wg(e){let{currentUserAccount:t}=await
|
|
267
|
+
`;async function Wg(e){let{currentUserAccount:t}=await Cc(sk,e);if(!t)throw new I("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();y();function fi({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var Gg={...console},Xg=new Set,Vg=new Set,Yg=[];function Qi(e,...t){Vg.has(e)||(Vg.add(e),Yg.push(...t))}var Gu=new Set;function ok(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Gu.has(r)?!0:(Gu.add(r),t!==!0&&setTimeout(()=>Gu.delete(r),t??1e3),!1)}function Zi([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function St(e,t){Xg.has(e)||(Xg.add(e),console[e]=(...r)=>{if(t!==!1&&ok(r,t?.(r)))return;let i=Yg.reduce((o,[s,c])=>(s(r,o.length)&&o.push(c),o),[]);if(i.length===0)return Gg[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return Gg[e](...n)})}function DB({workerReload:e}={}){St("log"),St("error"),St("warn",Zi),St("debug",!1);let t=!0;Qi("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let c=s[0];if(e!==!1&&c.includes("Worker reloaded")){if(t){t=!1;return}return[c.replace("[mf:inf] ","\u{1F504} ")+`
|
|
268
268
|
`,...s.slice(1)]}c.includes("[mf:err]")}]),Qi("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return typeof c=="string"&&/^Network connection lost/i.test(c)},()=>{}]);let r=!1,i=!1;Qi("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return/virtual-routes/.test(c)&&/(Failed to load url|Could not resolve module for file)/i.test(c)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],c)=>{if(c===0&&typeof s=="string"){let h=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(h&&!i||!h&&i)&&process.stdout.write(`
|
|
269
|
-
`),i=h,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function to(e=!1){St("log",Zi),Qi("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(
|
|
269
|
+
`),i=h,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function to(e=!1){St("log",Zi),Qi("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(Oc.eraseLines(e?5:6))}])}function CB(e){St("error"),St("warn",Zi),St("log",Zi),St("info",Zi),Qi("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,c]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!c)return t;let h=`In Hydrogen's \`${s.trim()}\`:
|
|
270
270
|
|
|
271
271
|
`,m=c.split(`
|
|
272
272
|
`),d=m.at(-1)??"",f=/https?:\/\//.test(d),p=/`h2 [^`]+`/.test(d);if(p&&d&&(d=d.replace(/`(h2) ([^`]+)`/g,W.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||p)&&m.pop(),o==="error"||i){let l=f||p?d:void 0,g=i?.stack,v=i?.cause;if(typeof v=="string")try{v=JSON.parse(v)}catch{}if(typeof v!="string"&&v?.graphql?.query){let P=fi({host:e.host,graphql:v.graphql}),[,B,L]=v.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];l=(l?`${l}
|
|
@@ -276,7 +276,7 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
|
|
|
276
276
|
`).trim()||void 0);let T=new hn(h+W.bold(m.join(`
|
|
277
277
|
`).replace(" - Request",`
|
|
278
278
|
Request`)),l);T.cause=v,T.stack=g,ln(T);return}let a;if(f){a=[];for(let l of d.matchAll(/https?:\/\/[^\s]+/g))a.push(l[0])}(o==="warn"?Xe:mt)({body:h+W.bold(m.join(`
|
|
279
|
-
`)),reference:a,nextSteps:p?[d]:void 0})}])}function SB(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function AB(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function jB(e){await Cc(),await Ig(e)}async function At(e,t){to(!1);let r=t===!0,i=e?await hi(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await cn(t)),!t||!o||!n||r||t!==i.shop){let h=await Dc().catch(()=>{throw new I("Unable to authenticate with Shopify. Please report this issue.")}),m=await Wg(h),f=!r&&t&&m.activeShops.find(({fqdn:p})=>t===p)||await tt({message:"Select a shop to log in to",choices:m.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await bc(t).catch(()=>{throw new I("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),c=e?await Ng(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:c}}function Kg(e){Cr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as Sk,readdir as Ak}from"node:fs/promises";y();import{readdir as n0}from"node:fs/promises";y();import{createRequire as ak}from"module";function Qg(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function $B(){try{return ak(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as pk}from"node:module";import ro from"node:path";y();y();var Zg="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function uk(e){return!!(await be(e,"vite.config")).filepath}async function Vu(e){let t=await uk(e);return t&&await Xu(e)&&Xe({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function e0(e,t){let r=await Hc(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:c,clientOutDir:h,serverBuildFile:m,serverOutDir:d,routes:f}=lk(s),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},u=N(d,typeof a=="string"?a:m??"index.js"),l=t??s.build.ssr,g=J(s.root,typeof l=="string"?l:"server");return{clientOutDir:h,serverOutDir:d,serverOutFile:u,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:f??{},appDirectory:c??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await be(le(g),Tt(g))).filepath||g}}}function ck({routingBuildDirectory:e,serverEnvironmentOutDir:t,clientEnvironmentOutDir:r,buildOutDir:i}){if(e)return{clientOutDir:N(e,"client"),serverOutDir:N(e,"server")};let n=t??i;return{clientOutDir:r&&r!==n?r:n.replace(/server$/,"client"),serverOutDir:n}}function lk(e){let t=hk(e)??fk(e),{clientOutDir:r,serverOutDir:i}=ck({routingBuildDirectory:t?.buildDirectory,serverEnvironmentOutDir:e.environments?.ssr?.build.outDir,clientEnvironmentOutDir:e.environments?.client?.build.outDir,buildOutDir:e.build.outDir});return{...t,clientOutDir:r,serverOutDir:i}}function hk(e){if(!e.__reactRouterPluginContext)return;let{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}}function fk(e){let{remixConfig:t}=dk(e)?.api?.getPluginOptions()??{};if(t)return{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}}function t0(e,t){return e.plugins.find(r=>r.name===t)}function dk(e){return t0(e,"hydrogen:main")}function KB(e){return t0(e,"oxygen:main")}async function Xu(e){return!!(await be(e,"remix.config")).filepath}async function uR(e){return await Vu(e)?!1:Xu(e)}var mk="dist",gk="client",yk="worker";function cR(e){let t=e??process.cwd(),r=ro.join(t,"public"),i=ro.join(t,mk),n=ro.join(i,gk),o=ro.join(i,yk,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function lR(e){return be(e,"remix.config").then(({filepath:t})=>{if(!t)throw new I("No remix.config.js file found.");return pk(import.meta.url)(t)})}async function r0(e,t=process.env.NODE_ENV){if(!await Vu(e))throw new I(Zg);return(await e0(e)).remixConfig}var vk=[/robots\.txt/],Ku={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},Yu=[];async function i0(e=Object.keys(Ku)){Yu.length===0&&(Yu=(await n0(await Vi(Ht))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=Ku[i];if(!n)throw new I(`No route found for ${i}. Try one of ${xk.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let c=s.replace("*","");t[i].push(...Yu.filter(h=>h.startsWith(c)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var xk=[...Object.keys(Ku),"all"];async function s0(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await i0():await i0([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await r0(e.directory),s=i.flatMap(p=>Ht+"/"+p),c=await ft(n),h=N(o,Ht),m=await wk(h,e),d=!!(e.typescript??await U(N(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await Qu(p,{...e,typescript:d,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:c}));return m&&await Dk({typescript:d,localePrefix:m,routesDirectory:h,formatOptions:c,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:c}}async function wk(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await n0(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(c=>o.test(c));if(s)return s.match(o)?.[1]}async function Qu(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:c,localePrefix:h,v1RouteConvention:m=!1,signal:d,overwriteFileDeps:f=!0}){s??=await Mu();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=N(r,Ek(e,h,{v1RouteConvention:m})+(i?p:p.replace(".ts",".js"))),u={operation:"created",sourceRoute:e,destinationRoute:uc(a,t)};if(!n&&await U(a)){if(!await rt({message:`The file ${u.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...u,operation:"skipped"};u.operation="replaced"}let l=await Vi(e+p,s),g=await bk(l,await Vi("",s));for(let v of g){let w=v.startsWith(Ht+"/")?a:N(r,v.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await U(w))continue;await U(le(w))||await on(le(w));let C=await Vi(v,s);if(!/\.[jt]sx?$/.test(v)){await br(C,w);continue}let S=await X(C);i||(S=await Jt(S,C)),o&&(S=o0(S,o)),S=await zt(S,c,w),await V(w,S)}return u}function o0(e,t){return e.replace(/(from\s+['"])react-router(['"])/g,`$1${t}$2`)}function Ek(e,t,r){let i=e.replace(Ht+"/",""),n=t&&!vk.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Ht+"/"+n+(r.v1RouteConvention?Qg(i):i)}async function bk(e,t){let r=new Set([e]),i=new Set([kt(t,e)]);for(let n of r){let o=(await X(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",kt(le(n),t)||"."),s.includes("/+types/")))continue;let c=J(le(n),s),h=(await be(le(c),Tt(c))).filepath||c;h.includes(`/${Ht}/`)||(i.add(kt(t,h)),/\.[jt]sx?$/.test(h)&&r.add(h))}}return[...i]}function Dk({typescript:e,localePrefix:t,...r}){return Ck({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function Ck({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await U(s))return;let c=await Ze("routes",e);if(!await U(c))throw new Error("Unknown strategy");let h=await X(c);o&&(h=o0(h,o)),n||(h=await Jt(h,c)),h=await zt(h,i,s),await V(s,h)}var _k={js:"JavaScript",ts:"TypeScript"};async function XR(e,t,r){let i=r??await Og({abortSignal:e.signal,extraChoices:{none:"Set up later "+W.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Tg(n,o)}}}function VR(e){return{setupRoutes:async(t,r,i)=>(await s0({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function YR(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>Qu(t,e)))}async function KR(e,t,r){return t===ke?{}:r??await rt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:ke},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await Jg()).length>0}catch(n){return me("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>mt({body:`You'll need to restart your terminal session to make \`${ke}\` alias available.`})}:{}}async function QR(e){to(!0);let{session:t,config:r}=await At();Kg(r);let i=await Ks(t),n=await Zu(i),o;return n?o=n.title:o=await Sr({message:"New storefront name",defaultValue:Zs(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function Zu(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await tt({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function ZR({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&fc(e.title),o=i??n??await Sr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=J(process.cwd(),o);if(await a0(s)){if(!r&&n&&(o=await Sr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=J(process.cwd(),o),await a0(s)||(r=!0)),!r&&!await rt({message:`The directory ${W.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){mt({body:`Destination path ${W.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await uo(s,{force:!0})}return{name:Tt(o),location:o,directory:s,storefrontTitle:e?.title}}async function eL(e,t,r){let i=r??await tt({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await $u(e)}}}async function tL(e,t,r){let i=r??await _g({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Ag(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function rL(e,t,r,i){let n=r??Fc(),o="npm";if(i!==!1)if(n==="unknown"){let s=await tt({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await rt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return Xi&&(await br(N(Xs(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await Sk(await gg(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Tc({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var Fk=`
|
|
279
|
+
`)),reference:a,nextSteps:p?[d]:void 0})}])}function SB(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function AB(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function jB(e){await bc(),await Ig(e)}async function At(e,t){to(!1);let r=t===!0,i=e?await hi(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await cn(t)),!t||!o||!n||r||t!==i.shop){let h=await Ec().catch(()=>{throw new I("Unable to authenticate with Shopify. Please report this issue.")}),m=await Wg(h),f=!r&&t&&m.activeShops.find(({fqdn:p})=>t===p)||await tt({message:"Select a shop to log in to",choices:m.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await wc(t).catch(()=>{throw new I("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),c=e?await Ng(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:c}}function Kg(e){Cr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as Sk,readdir as Ak}from"node:fs/promises";y();import{readdir as n0}from"node:fs/promises";y();import{createRequire as ak}from"module";function Qg(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function $B(){try{return ak(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as pk}from"node:module";import ro from"node:path";y();y();var Zg="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function uk(e){return!!(await be(e,"vite.config")).filepath}async function Vu(e){let t=await uk(e);return t&&await Xu(e)&&Xe({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function e0(e,t){let r=await Hc(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:c,clientOutDir:h,serverBuildFile:m,serverOutDir:d,routes:f}=lk(s),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},u=N(d,typeof a=="string"?a:m??"index.js"),l=t??s.build.ssr,g=J(s.root,typeof l=="string"?l:"server");return{clientOutDir:h,serverOutDir:d,serverOutFile:u,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:f??{},appDirectory:c??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await be(le(g),Tt(g))).filepath||g}}}function ck({routingBuildDirectory:e,serverEnvironmentOutDir:t,clientEnvironmentOutDir:r,buildOutDir:i}){if(e)return{clientOutDir:N(e,"client"),serverOutDir:N(e,"server")};let n=t??i;return{clientOutDir:r&&r!==n?r:n.replace(/server$/,"client"),serverOutDir:n}}function lk(e){let t=hk(e)??fk(e),{clientOutDir:r,serverOutDir:i}=ck({routingBuildDirectory:t?.buildDirectory,serverEnvironmentOutDir:e.environments?.ssr?.build.outDir,clientEnvironmentOutDir:e.environments?.client?.build.outDir,buildOutDir:e.build.outDir});return{...t,clientOutDir:r,serverOutDir:i}}function hk(e){if(!e.__reactRouterPluginContext)return;let{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}}function fk(e){let{remixConfig:t}=dk(e)?.api?.getPluginOptions()??{};if(t)return{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}}function t0(e,t){return e.plugins.find(r=>r.name===t)}function dk(e){return t0(e,"hydrogen:main")}function KB(e){return t0(e,"oxygen:main")}async function Xu(e){return!!(await be(e,"remix.config")).filepath}async function uR(e){return await Vu(e)?!1:Xu(e)}var mk="dist",gk="client",yk="worker";function cR(e){let t=e??process.cwd(),r=ro.join(t,"public"),i=ro.join(t,mk),n=ro.join(i,gk),o=ro.join(i,yk,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function lR(e){return be(e,"remix.config").then(({filepath:t})=>{if(!t)throw new I("No remix.config.js file found.");return pk(import.meta.url)(t)})}async function r0(e,t=process.env.NODE_ENV){if(!await Vu(e))throw new I(Zg);return(await e0(e)).remixConfig}var vk=[/robots\.txt/],Ku={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},Yu=[];async function i0(e=Object.keys(Ku)){Yu.length===0&&(Yu=(await n0(await Vi(Ht))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=Ku[i];if(!n)throw new I(`No route found for ${i}. Try one of ${xk.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let c=s.replace("*","");t[i].push(...Yu.filter(h=>h.startsWith(c)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var xk=[...Object.keys(Ku),"all"];async function s0(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await i0():await i0([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await r0(e.directory),s=i.flatMap(p=>Ht+"/"+p),c=await ft(n),h=N(o,Ht),m=await wk(h,e),d=!!(e.typescript??await U(N(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await Qu(p,{...e,typescript:d,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:c}));return m&&await Dk({typescript:d,localePrefix:m,routesDirectory:h,formatOptions:c,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:c}}async function wk(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await n0(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(c=>o.test(c));if(s)return s.match(o)?.[1]}async function Qu(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:c,localePrefix:h,v1RouteConvention:m=!1,signal:d,overwriteFileDeps:f=!0}){s??=await Mu();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=N(r,Ek(e,h,{v1RouteConvention:m})+(i?p:p.replace(".ts",".js"))),u={operation:"created",sourceRoute:e,destinationRoute:uc(a,t)};if(!n&&await U(a)){if(!await rt({message:`The file ${u.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...u,operation:"skipped"};u.operation="replaced"}let l=await Vi(e+p,s),g=await bk(l,await Vi("",s));for(let v of g){let w=v.startsWith(Ht+"/")?a:N(r,v.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await U(w))continue;await U(le(w))||await on(le(w));let C=await Vi(v,s);if(!/\.[jt]sx?$/.test(v)){await br(C,w);continue}let S=await X(C);i||(S=await Jt(S,C)),o&&(S=o0(S,o)),S=await zt(S,c,w),await V(w,S)}return u}function o0(e,t){return e.replace(/(from\s+['"])react-router(['"])/g,`$1${t}$2`)}function Ek(e,t,r){let i=e.replace(Ht+"/",""),n=t&&!vk.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Ht+"/"+n+(r.v1RouteConvention?Qg(i):i)}async function bk(e,t){let r=new Set([e]),i=new Set([kt(t,e)]);for(let n of r){let o=(await X(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",kt(le(n),t)||"."),s.includes("/+types/")))continue;let c=J(le(n),s),h=(await be(le(c),Tt(c))).filepath||c;h.includes(`/${Ht}/`)||(i.add(kt(t,h)),/\.[jt]sx?$/.test(h)&&r.add(h))}}return[...i]}function Dk({typescript:e,localePrefix:t,...r}){return Ck({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function Ck({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await U(s))return;let c=await Ze("routes",e);if(!await U(c))throw new Error("Unknown strategy");let h=await X(c);o&&(h=o0(h,o)),n||(h=await Jt(h,c)),h=await zt(h,i,s),await V(s,h)}var _k={js:"JavaScript",ts:"TypeScript"};async function XR(e,t,r){let i=r??await Og({abortSignal:e.signal,extraChoices:{none:"Set up later "+W.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Tg(n,o)}}}function VR(e){return{setupRoutes:async(t,r,i)=>(await s0({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function YR(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>Qu(t,e)))}async function KR(e,t,r){return t===ke?{}:r??await rt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:ke},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await Jg()).length>0}catch(n){return me("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>mt({body:`You'll need to restart your terminal session to make \`${ke}\` alias available.`})}:{}}async function QR(e){to(!0);let{session:t,config:r}=await At();Kg(r);let i=await Ks(t),n=await Zu(i),o;return n?o=n.title:o=await Sr({message:"New storefront name",defaultValue:Zs(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function Zu(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await tt({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function ZR({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&fc(e.title),o=i??n??await Sr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=J(process.cwd(),o);if(await a0(s)){if(!r&&n&&(o=await Sr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=J(process.cwd(),o),await a0(s)||(r=!0)),!r&&!await rt({message:`The directory ${W.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){mt({body:`Destination path ${W.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await uo(s,{force:!0})}return{name:Tt(o),location:o,directory:s,storefrontTitle:e?.title}}async function eL(e,t,r){let i=r??await tt({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await $u(e)}}}async function tL(e,t,r){let i=r??await _g({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Ag(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function rL(e,t,r,i){let n=r??Ac(),o="npm";if(i!==!1)if(n==="unknown"){let s=await tt({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await rt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return Xi&&(await br(N(Xs(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await Sk(await gg(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Fc({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var Fk=`
|
|
280
280
|
node_modules
|
|
281
281
|
/.cache
|
|
282
282
|
/build
|
|
@@ -292,7 +292,7 @@ node_modules
|
|
|
292
292
|
\u2022 ${cc(g)} ${W.dim("("+x.join(" & ")+")")}`}}let u=1+p.reduce((g,[v])=>Math.max(g,v.length),0);(f?Xe:Cr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:p.map(([g,v])=>` ${(g+":").padEnd(u," ")} ${W.dim(v)}`).join(`
|
|
293
293
|
`)+a,customSections:[f&&{title:`Warnings
|
|
294
294
|
`,body:[{list:{items:[h&&["Failed to install dependencies:",{subdued:h.message}],m&&["Failed to scaffold Markets:",{subdued:m.message}],d&&["Failed to scaffold routes:",{subdued:d.message}]].filter(g=>!!g)}}]},{title:`Next steps
|
|
295
|
-
`,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,
|
|
295
|
+
`,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Sc()?"npm run dev":Nc(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function sL(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await uo(t.directory,{force:!0}).catch(()=>{}),ln(new I("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function a0(e){return await U(e)&&await un(e)&&(await Ak(e)).length>0}function Tk(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function u0(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var c0=class e extends fn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
|
|
296
296
|
|
|
297
297
|
Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.
|
|
298
298
|
|
|
@@ -349,7 +349,7 @@ ${i?.message}`)}))}async function ic(e,t){if(t)return t;let{session:r,config:i}=
|
|
|
349
349
|
|
|
350
350
|
`)}),v0())):v0(),o?{variables:o}:ac(e,i)]),m=Object.keys(c),d=Object.keys(s),f=Object.keys(h);function p(){(f.length>0||d.length+m.length>0)&&(it(`
|
|
351
351
|
Environment variables injected into MiniOxygen:
|
|
352
|
-
`),it(lc([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[W.dim(a),W.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:c,localVariables:h,allVariables:{...c,...s,...h}}}async function Uk(e,t,r){let{session:i,config:n}=await At(e);if(r){let h=(await m0(i,n.storefront.id))?.environments||[];t=g0(h,r).handle}let o=(await p0(i,n.storefront.id,t))?.environmentVariables||[],s={},c={};for(let{key:h,value:m,isSecret:d}of o)d?c[h]=m:s[h]=m;return{remoteVariables:s,remoteSecrets:c}}async function ac(e,t){let r=J(e,t);return await U(r).then(i=>i?$c(r):{variables:{}})}y();async function x0(e,t,r){let i=await
|
|
352
|
+
`),it(lc([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[W.dim(a),W.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:c,localVariables:h,allVariables:{...c,...s,...h}}}async function Uk(e,t,r){let{session:i,config:n}=await At(e);if(r){let h=(await m0(i,n.storefront.id))?.environments||[];t=g0(h,r).handle}let o=(await p0(i,n.storefront.id,t))?.environmentVariables||[],s={},c={};for(let{key:h,value:m,isSecret:d}of o)d?c[h]=m:s[h]=m;return{remoteVariables:s,remoteSecrets:c}}async function ac(e,t){let r=J(e,t);return await U(r).then(i=>i?$c(r):{variables:{}})}y();async function x0(e,t,r){let i=await xc(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new hn(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new I(`${r} failed to start the tunnel.
|
|
353
353
|
${o.error.message}`);return o.value}async function w0(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(me(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new I(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function Hk(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function H3(e){mt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function z3(e,t,r){return ac(e,r).then(async({variables:i})=>{let n=t&&!Hk(i);n&&await ic(e);let{shop:o,storefront:s}=await hi(e),c=s?.id;return{storefrontId:c,customerAccountPush:n,fetchRemote:!!o&&!!c,localVariables:i,storefrontTitle:s?.title}})}var E0=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function J3(e,t,r,i){it(`
|
|
354
354
|
Starting tunnel...
|
|
355
355
|
`);let n=await x0(t,r,"cloudflare"),o=await w0(n).then(c=>c.replace(E0.ORIGINAL,E0.REBRANDED)),s=await rc({path:e,devOrigin:o,storefrontId:i}).catch(c=>{c instanceof I&&mt({headline:"Customer Account Application setup update fail.",body:c.tryMessage||void 0,nextSteps:c.nextSteps})});return{host:o,cleanup:s}}function W3(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return Ar`Debugging enabled on port ${String(e)}.\nAttach a ${gt.link(W.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://127.0.0.1:${String(e)}.`.value}function G3(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser:
|