import{g as o}from"../chunk-VKWPEFWQ.js";o();o();var s=async n=>{let a=c({id:n.Command.id,aliases:n.Command.aliases,pluginAlias:n.Command.plugin?.alias}),i=n.argv,[{outputDebug:e},r,t]=await Promise.all([import("../output-FYS764MJ.js"),import("../analytics-CIKTYXZ6.js"),import("../notifications-system-76GJJAJP.js")]);f(),e(`Running command ${a.command}`),await r.startAnalytics({commandContent:a,args:i,commandClass:n.Command}),t.fetchNotificationsInBackground(n.Command.id)};function c(n){let a=d(n.pluginAlias);return a??(a=m(n.id,n.aliases)),a}function m(n,a){return{command:n.replace(/:/g," "),topic:l(n),alias:u(a)}}function d(n){if(n?.startsWith("@shopify/create-"))return{command:n.substring(n.indexOf("/")+1)}}function l(n){if(n.lastIndexOf(":")!==-1)return n.slice(0,n.lastIndexOf(":")).replace(/:/g," ")}function u(n){let a=n.find(i=>i.split(":").every(e=>process.argv.includes(e)));if(a)return a.replace(/:/g," ")}async function f(){let[{CLI_KIT_VERSION:n},{isPreReleaseVersion:a},{checkForNewVersion:i}]=await Promise.all([import("../version-WIERCO5R.js"),import("../version-LULWCT5R.js"),import("../node-package-manager-FA3Y6DPG.js")]),e=n;a(e)||i("@shopify/cli",e,{cacheExpiryInHours:24})}export{s as default};
