@shopify/cli 3.94.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/run.js +5 -1
- package/dist/analytics-5TEIW43T.js +1 -0
- package/dist/analytics-GG7CYCGL.js +1 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chunk-2AJ5FI2K.js +7 -0
- package/dist/chunk-2GK56X53.js +1 -0
- package/dist/chunk-3D4JXJPS.js +2 -0
- package/dist/chunk-3NBK56IK.js +1 -0
- package/dist/chunk-3TNEIDOD.js +1 -0
- package/dist/chunk-3VZEETAV.js +1 -0
- package/dist/chunk-4DCQNGUV.js +19 -0
- package/dist/chunk-4IC626OL.js +1 -0
- package/dist/chunk-4LNCYIS3.js +1 -0
- package/dist/chunk-4ZGSSQC6.js +1 -0
- package/dist/chunk-54CAKCYR.js +144 -0
- package/dist/chunk-5CH3B62S.js +2 -0
- package/dist/chunk-5UHQVR2Z.js +1 -0
- package/dist/chunk-5WVAHE5E.js +1 -0
- package/dist/chunk-5Y7GIF2W.js +1 -0
- package/dist/chunk-67MH4AXG.js +1 -0
- package/dist/chunk-6CYMJ76C.js +9 -0
- package/dist/chunk-6G6TMKXF.js +28 -0
- package/dist/chunk-6HBRBQAN.js +6 -0
- package/dist/chunk-6ITDI2SD.js +1 -0
- package/dist/chunk-6M3ZYNGO.js +451 -0
- package/dist/chunk-6RE2SNCU.js +6 -0
- package/dist/chunk-6SF3ZETE.js +1 -0
- package/dist/chunk-6WL4GA2M.js +15 -0
- package/dist/chunk-75VPUOC5.js +1 -0
- package/dist/chunk-76R52ODR.js +1 -0
- package/dist/chunk-7ESSIN27.js +567 -0
- package/dist/chunk-7NH7CHVI.js +6 -0
- package/dist/chunk-7QIOUDCX.js +8 -0
- package/dist/chunk-7UYZQN4V.js +18 -0
- package/dist/chunk-7ZT57XT7.js +2 -0
- package/dist/chunk-AGNMOFJS.js +1 -0
- package/dist/chunk-BS3BKORT.js +16 -0
- package/dist/chunk-C2IK2HY3.js +4 -0
- package/dist/chunk-C7BTJ32Z.js +1 -0
- package/dist/chunk-CBXSPL4W.js +1 -0
- package/dist/chunk-CEIQFLCN.js +1 -0
- package/dist/chunk-CERXUPGC.js +14 -0
- package/dist/chunk-DCPBRWVC.js +1 -0
- package/dist/chunk-DN2IE3VY.js +1 -0
- package/dist/chunk-DRFGABEB.js +1 -0
- package/dist/chunk-E3EMHAJB.js +1 -0
- package/dist/chunk-EKXY5COY.js +1 -0
- package/dist/chunk-EQU4MUQJ.js +1 -0
- package/dist/chunk-F2QU6WWX.js +1 -0
- package/dist/chunk-FFQ5EWII.js +294 -0
- package/dist/chunk-FKMC5OFF.js +1 -0
- package/dist/chunk-FQWB2F75.js +3 -0
- package/dist/chunk-FUOIGXI4.js +1 -0
- package/dist/chunk-FYFNUDOC.js +19 -0
- package/dist/chunk-G4BPGWJC.js +1 -0
- package/dist/chunk-GVQIPEZT.js +1 -0
- package/dist/chunk-GZS44BUW.js +102 -0
- package/dist/chunk-HIBX234C.js +6 -0
- package/dist/chunk-HRUGYZZ4.js +2 -0
- package/dist/chunk-HUIJMGVJ.js +586 -0
- package/dist/chunk-HZA6IAA4.js +1 -0
- package/dist/chunk-IU2ZQ6TE.js +2 -0
- package/dist/chunk-IX5ICOBV.js +7 -0
- package/dist/chunk-IZ3C5J7G.js +5 -0
- package/dist/chunk-JAO53IH2.js +1 -0
- package/dist/chunk-JCL2RRU6.js +1 -0
- package/dist/chunk-JQJBBXMX.js +17 -0
- package/dist/chunk-JUVAGMIH.js +1 -0
- package/dist/chunk-JXW374CL.js +359 -0
- package/dist/chunk-K2WUCOQJ.js +32 -0
- package/dist/chunk-K6CTUBFC.js +12 -0
- package/dist/chunk-KHSYW7I4.js +1 -0
- package/dist/chunk-KHTV6PBV.js +12 -0
- package/dist/chunk-KKTW6ZCA.js +5 -0
- package/dist/chunk-KLMDWDT2.js +1 -0
- package/dist/chunk-KN3WTTHZ.js +1 -0
- package/dist/chunk-KR6QDE7D.js +2 -0
- package/dist/chunk-KZOBF55B.js +1 -0
- package/dist/chunk-L2MGAEV3.js +6 -0
- package/dist/chunk-LDGAHMS7.js +159 -0
- package/dist/chunk-M2D7USAX.js +1 -0
- package/dist/chunk-M2ZHFKPN.js +6 -0
- package/dist/chunk-M3RYUB22.js +1 -0
- package/dist/chunk-M56NDIMD.js +1 -0
- package/dist/chunk-MCVRONUY.js +1 -0
- package/dist/chunk-MHWV5RQV.js +10 -0
- package/dist/chunk-MOA33ZFO.js +1 -0
- package/dist/chunk-MWGBTOO3.js +1 -0
- package/dist/chunk-MWY3A7O3.js +4 -0
- package/dist/chunk-N5PQPIBF.js +374 -0
- package/dist/chunk-NF2ABOOU.js +1 -0
- package/dist/chunk-NMBBTTIH.js +2 -0
- package/dist/chunk-NPEVESCV.js +3 -0
- package/dist/chunk-OBEWZXOQ.js +2 -0
- package/dist/chunk-OCOY5MV2.js +1 -0
- package/dist/chunk-OLZHWPZP.js +1 -0
- package/dist/chunk-OTY24J2W.js +1 -0
- package/dist/chunk-OY3PNHPZ.js +103 -0
- package/dist/chunk-P6XE4MH5.js +1 -0
- package/dist/chunk-PAP22IQO.js +264 -0
- package/dist/chunk-PD5ZHJWI.js +1 -0
- package/dist/chunk-PIBY5DDZ.js +1 -0
- package/dist/chunk-PYVAWAUO.js +5 -0
- package/dist/chunk-Q33IBIVJ.js +1 -0
- package/dist/chunk-Q4T2T2QE.js +15 -0
- package/dist/chunk-QA23HIH4.js +1 -0
- package/dist/chunk-QBSKKQBN.js +1 -0
- package/dist/chunk-QFWIDATO.js +1 -0
- package/dist/chunk-QSTEVZFQ.js +1 -0
- package/dist/chunk-S6EJHWJL.js +1 -0
- package/dist/chunk-SIMFNECG.js +1 -0
- package/dist/chunk-SXTMSGUE.js +1 -0
- package/dist/chunk-T542UQBY.js +1 -0
- package/dist/chunk-TQ6HYDVC.js +1 -0
- package/dist/chunk-TYZXGSHO.js +3 -0
- package/dist/chunk-UHJYPEY2.js +1 -0
- package/dist/chunk-UJVH7FZS.js +1 -0
- package/dist/chunk-UJXUSRQK.js +1 -0
- package/dist/chunk-ULFWK45W.js +64 -0
- package/dist/chunk-ULQG3XQS.js +1 -0
- package/dist/chunk-URZPVSJZ.js +559 -0
- package/dist/chunk-UWJ73J4B.js +1 -0
- package/dist/chunk-UXVZ2P63.js +1411 -0
- package/dist/chunk-UYXEA3Y6.js +1 -0
- package/dist/chunk-VBUZWRUL.js +1 -0
- package/dist/chunk-VICYNG2W.js +1 -0
- package/dist/chunk-WDC3KIZT.js +2 -0
- package/dist/chunk-WFXRSKRK.js +1 -0
- package/dist/chunk-WSDN25F5.js +1 -0
- package/dist/chunk-XEFQQPL4.js +1 -0
- package/dist/chunk-XITQULK4.js +3 -0
- package/dist/chunk-XONFGLJQ.js +847 -0
- package/dist/chunk-XOTA6JTZ.js +11 -0
- package/dist/chunk-XR6GMMEU.js +1 -0
- package/dist/chunk-XULPJ6UG.js +1 -0
- package/dist/chunk-XXVEHDVO.js +1 -0
- package/dist/chunk-Y7JGYGV7.js +1 -0
- package/dist/chunk-YOZNRLFC.js +1 -0
- package/dist/chunk-YTNDFQJT.js +3 -0
- package/dist/chunk-Z35BTAM6.js +2 -0
- package/dist/chunk-ZBRRJDGW.js +1 -0
- package/dist/chunk-ZGK3LGCH.js +4 -0
- package/dist/chunk-ZR76GGZ6.js +5 -0
- package/dist/chunk-ZSBA6VIC.js +1 -0
- package/dist/chunk-ZTMSBSYD.js +1 -0
- package/dist/cli/commands/app/app-logs/sources.js +2 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +9 -0
- package/dist/cli/commands/app/bulk/status.js +5 -0
- package/dist/cli/commands/app/config/link.js +4 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +3 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +22 -0
- package/dist/cli/commands/app/dev/clean.js +5 -0
- package/dist/cli/commands/app/dev.js +320 -0
- package/dist/cli/commands/app/env/pull.js +11 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +16 -0
- package/dist/cli/commands/app/function/replay.js +5 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +5 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +11 -0
- package/dist/cli/commands/app/init.js +10 -0
- package/dist/cli/commands/app/logs.js +2 -0
- package/dist/cli/commands/app/release.js +4 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +25 -0
- package/dist/cli/commands/auth/login.js +1 -20
- package/dist/cli/commands/auth/logout.js +1 -12
- package/dist/cli/commands/cache/clear.js +1 -11
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
- package/dist/cli/commands/config/autoupgrade/off.js +1 -22
- package/dist/cli/commands/config/autoupgrade/on.js +1 -22
- package/dist/cli/commands/config/autoupgrade/status.js +1 -30
- package/dist/cli/commands/debug/command-flags.js +1 -79
- package/dist/cli/commands/docs/generate.d.ts +0 -8
- package/dist/cli/commands/docs/generate.js +1 -157
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
- package/dist/cli/commands/doctor-release/theme/index.js +1 -56
- package/dist/cli/commands/help.js +1 -26
- package/dist/cli/commands/kitchen-sink/async.js +1 -16
- package/dist/cli/commands/kitchen-sink/index.js +1 -21
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
- package/dist/cli/commands/kitchen-sink/static.js +1 -16
- package/dist/cli/commands/notifications/generate.js +1 -11
- package/dist/cli/commands/notifications/list.js +1 -33
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.js +1 -27
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +15 -0
- package/dist/cli/commands/theme/delete.js +7 -0
- package/dist/cli/commands/theme/dev.js +26 -0
- package/dist/cli/commands/theme/duplicate.js +32 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +8 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +3 -0
- package/dist/cli/commands/theme/open.js +8 -0
- package/dist/cli/commands/theme/package.js +7 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +3 -0
- package/dist/cli/commands/theme/publish.js +7 -0
- package/dist/cli/commands/theme/pull.js +3 -0
- package/dist/cli/commands/theme/push.js +28 -0
- package/dist/cli/commands/theme/rename.js +6 -0
- package/dist/cli/commands/theme/share.js +3 -0
- package/dist/cli/commands/upgrade.js +1 -17
- package/dist/cli/commands/version.js +1 -10
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-BMZFATRQ.js +1 -0
- package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
- package/dist/deprecations-7LHRXPXU.js +1 -0
- package/dist/dist-LDXPBYSZ.js +1 -0
- package/dist/dist-V63ILV6L.js +1 -0
- package/dist/environments-5X7S2O5U.js +1 -0
- package/dist/error-ZRLNNGIQ.js +1 -0
- package/dist/error-handler-PRZFHPRG.js +1 -0
- package/dist/fs-H7V6IRSH.js +1 -0
- package/dist/hooks/app-init.d.ts +9 -0
- package/dist/hooks/app-init.js +1 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
- package/dist/index.js +254 -3668
- package/dist/is-global-IOWPCT2U.js +1 -0
- package/dist/latest-version-EFWBOTWM.js +49 -0
- package/dist/lib-5L7UKDEK.js +1 -0
- package/dist/lib-C3VO2BQW.js +1 -0
- package/dist/lib-QB6I6CTC.js +1 -0
- package/dist/local-MTKXSZ3I.js +1 -0
- package/dist/local-storage-CYEL4MXF.js +1 -0
- package/dist/metadata-NOVBMKLM.js +1 -0
- package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
- package/dist/node-package-manager-N5CVNHA3.js +1 -0
- package/dist/notifications-system-YX2GPLDW.js +1 -0
- package/dist/npa-ICFSA3NL.js +1 -0
- package/dist/output-Q46DT46U.js +1 -0
- package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
- package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
- package/dist/system-E6Q3OBX3.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-K5CWIA4V.js +1 -0
- package/dist/ui-WRS2IDPP.js +1 -0
- package/dist/upgrade-TKUN2M5P.js +1 -0
- package/dist/version-5W5RVAPA.js +1 -0
- package/dist/version-BQJ3FPXD.js +1 -0
- package/dist/workerd-GOK6GWEX.js +18 -0
- package/oclif.manifest.json +5136 -5945
- package/package.json +17 -41
- package/dist/chunk-45T5XUIM.js +0 -1
- package/dist/chunk-52KHWFYF.js +0 -1
- package/dist/chunk-66TIGB4U.js +0 -415
- package/dist/chunk-675GKVCB.js +0 -3
- package/dist/chunk-7ES6PV7M.js +0 -847
- package/dist/chunk-BF7JM4FH.js +0 -396
- package/dist/chunk-FU2Y2M3M.js +0 -5
- package/dist/chunk-IDQ4X47Z.js +0 -3
- package/dist/chunk-JBSYWYIP.js +0 -2
- package/dist/chunk-PBKIXB7L.js +0 -63
- package/dist/chunk-SVA22NZQ.js +0 -607
- package/dist/error-handler-LC7FITE7.js +0 -1
- package/dist/http-proxy-node16-TTURN6MD.js +0 -38
- package/dist/lib-3WHF5XD3.js +0 -1
- package/dist/local-TWIGLQ7X.js +0 -1
- package/dist/node-package-manager-3UCLJPGW.js +0 -1
- package/dist/npa-OKDXXRCU.js +0 -1
- package/dist/ui-UYE67X4Y.js +0 -1
- package/dist/workerd-37BZZEVW.js +0 -18
- /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{b as $}from"./chunk-MOA33ZFO.js";import{a as F}from"./chunk-JUVAGMIH.js";import{R as _}from"./chunk-6G6TMKXF.js";import{d as T}from"./chunk-WSDN25F5.js";import{d}from"./chunk-M56NDIMD.js";import{r as I}from"./chunk-LDGAHMS7.js";import{Gb as h,Ib as g,Mb as P,aa as E}from"./chunk-N5PQPIBF.js";import{c as O}from"./chunk-YTNDFQJT.js";import{a as b}from"./chunk-ULQG3XQS.js";import{e as S,g as w}from"./chunk-VPRTJUIN.js";w();var u=S(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-PRZFHPRG.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),$(this.id??""),!O()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-PRZFHPRG.js");await r(this.config)}await x(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-YX2GPLDW.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-WRS2IDPP.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(P(`
|
|
2
|
+
SHOPIFY_CLI_TIMESTAMP_START
|
|
3
|
+
{ "timestamp": ${Date.now()} }
|
|
4
|
+
SHOPIFY_CLI_TIMESTAMP_END
|
|
5
|
+
`),process.exit(0))}async parse(n,r){let e=await super.parse(n,r);return e=await this.resultWithEnvironment(e,n,r),await j(e.flags),{...e,argv:e.argv}}environmentsFilename(){}failMissingNonTTYFlags(n,r){_()||r.forEach(e=>{if(!(e in n))throw new d(g`Flag not specified:
|
|
6
|
+
|
|
7
|
+
${h.cyan(e)}
|
|
8
|
+
|
|
9
|
+
This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-5X7S2O5U.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!C(r?.flags,"environment"))return n;let v=await super.parse(N(r),e),y=await super.parse(r,[...e??this.argv,...W(l,r,v),...f?["--environment","default"]:[]]);return A(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-5X7S2O5U.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await T(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function A(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-WRS2IDPP.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function N(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function W(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=C(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function C(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function x(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
|
|
10
|
+
`),{renderWarning:o}=await import("./ui-WRS2IDPP.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
11
|
+
${i}`]})}let t=n.filter(i=>!r.includes(i.name));a.plugins=new Map(t.map(i=>[i.name,i]))}var q=p;export{N as a,q as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as C}from"./chunk-LDGAHMS7.js";import{a as i,c as u}from"./chunk-ULQG3XQS.js";import{e as h,g as s}from"./chunk-VPRTJUIN.js";s();s();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-MTKXSZ3I.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-DVFFWCBV.js"),t=await import("./lib-C3VO2BQW.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-PRZFHPRG.js");return await l(r),d.handle(r)}}var c=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-WRS2IDPP.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function O(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||i(o.NO_COLOR)||i(o.SHOPIFY_FLAG_NO_COLOR)||i(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await b(e,n),O(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function b(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-N5CVNHA3.js"),{moduleDirectory:t}=await import("./path-CWUNINMX.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var E={"no-color":c.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:c.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},F={json:c.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})};async function S(){let{cacheClear:e}=await import("./conf-store-BMZFATRQ.js");e()}export{_ as a,E as b,F as c,S as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,d as t,l as h}from"./chunk-M56NDIMD.js";import{g as i}from"./chunk-VPRTJUIN.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-QA23HIH4.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-XR6GMMEU.js";import{tb as n}from"./chunk-N5PQPIBF.js";import{g as e}from"./chunk-VPRTJUIN.js";e();function s(o){o.verbose&&(process.env[r.verbose.env]="true"),o.noColor&&(n.level=0,process.env.FORCE_COLOR="0")}export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./chunk-VPRTJUIN.js";e();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as l,c as a,d as B,f as C}from"./chunk-ULQG3XQS.js";import{a as I,c as d,e as Q,g as u}from"./chunk-VPRTJUIN.js";var b=d((he,R)=>{"use strict";u();var g={},X=process.nextTick||global.setImmediate||global.setTimeout;g.nextTick=function(e){X(e)};g.parallel=function(e,r){var n=[],t=[],i=0,o=0;function c(s,f,m){f?t[s]=f:n[s]=m,o+=1,o>=i&&r((t.length>0,t),n)}Object.keys(e).forEach(function(s){i+=1;var f=e[s];g.nextTick(function(){f(c.bind(null,s),1)})})};g.promisify=function(e){return new Promise(function(r,n){e(function(t,i){if(t){!t instanceof Error&&(t=new Error(t)),n(t);return}r(i)})})};g.iterate=function(e,r,n){var t=[],i=function(){if(e.length===0){g.nextTick(n.bind(null,t));return}var o=e.shift();if(typeof o=="function"){o(function(c,s){if(c)t.push(c);else for(;s.length>0;)e.unshift(s.pop());i()});return}r(o,function(c,s){c?(t.push(c),i()):g.nextTick(n.bind(null,null,s))})};g.nextTick(i)};R.exports=g});var L=d((_e,y)=>{u();var Z=I("child_process").execFile,ee=/[-\/\\^$*+?.()|[\]{}]/g;function re(e){return e.replace(ee,"\\$&")}y.exports=function(e,r){Z("ipconfig",["/all"],function(n,t){if(n){r(n,null);return}var i=new RegExp(re(e)).exec(t);if(!i){r("did not find interface in `ipconfig /all`",null);return}if(t=t.substring(i.index+e.length),i=/[A-Fa-f0-9]{2}(\-[A-Fa-f0-9]{2}){5}/.exec(t),!i){r("did not find a mac address",null);return}r(null,i[0].toLowerCase().replace(/\-/g,":"))})}});var A=d((ve,w)=>{u();var te=I("child_process").execFile;w.exports=function(e,r){te("/bin/cat",["/sys/class/net/"+e+"/address"],function(n,t){if(n){r(n,null);return}r(null,t.trim().toLowerCase())})}});var U=d((Ce,M)=>{u();var ne=I("child_process").execFile;M.exports=function(e,r){ne("ifconfig",[e],function(n,t){if(n){r(n,null);return}var i=/[a-f0-9]{2}(:[a-f0-9]{2}){5}/.exec(t.toLowerCase());if(!i){r("did not find a mac address",null);return}r(null,i[0].toLowerCase())})}});var S=d((be,O)=>{u();var ie=I("os"),h,N="^[a-z0-9]+$";switch(ie.platform()){case"win32":N="^[a-z0-9 -]+$",h=L();break;case"linux":h=A();break;case"darwin":case"sunos":case"freebsd":h=U();break;default:console.warn("node-macaddress: Unknown os.platform(), defaulting to 'unix'."),h=U();break}var D=new RegExp(N,"i");O.exports=function(e,r){if(!D.test(e)){r(new Error(["invalid iface: '",e,"' (must conform to reg exp /",D,"/)"].join("")),null);return}h(e,r)}});var q=d((Le,k)=>{"use strict";u();var oe=I("child_process").execFile;k.exports=function(e){oe("wmic",["nic","get","NetConnectionID"],function(r,n){if(r){e(r,null);return}for(var t=n.trim().replace(/\s{2,}/g,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`).slice(1),i=[],o=0;o<t.length;o+=1){var c=t[o].trim();c!==""&&i.push(c)}e(null,i)})}});var K=d((Ae,F)=>{u();var se=I("child_process").execFile;F.exports=function(e){se("/bin/ls",["/sys/class/net"],function(r,n){if(r){e(r,null);return}for(var t=n.split(/[ \t\n]+/),i=[],o=0;o<t.length;o+=1){var c=t[o].trim();c!==""&&i.push(c)}e(null,i)})}});var v=d((De,G)=>{"use strict";u();var ue=I("child_process").execFile;G.exports=function(e){ue("/sbin/ifconfig",["-l"],function(r,n){if(r){e(r,null);return}for(var t=n.split(/[ \t]+/),i=[],o=0;o<t.length;o+=1){var c=t[o].trim();c!==""&&i.push(c)}e(null,i)})}});var P=d((Oe,H)=>{u();var ae=I("os"),T;switch(ae.platform()){case"win32":T=q();break;case"linux":T=K();break;case"darwin":case"sunos":case"freebsd":T=v();break;default:console.warn("node-macaddress: Unknown os.platform(), defaulting to 'unix'."),T=v();break}H.exports=T});var j=d((ke,$)=>{u();var ce=I("os");$.exports=function(){var e={};try{var r=ce.networkInterfaces()}catch(n){if(n.syscall==="uv_interface_addresses")return e;throw n}return Object.keys(r).forEach(function(n){var t={},i=!1;r[n].forEach(function(o){if(!o.internal){var c=typeof o.family=="number"?"ipv"+o.family:(o.family||"").toLowerCase();t[c]=o.address,i=!0,o.mac&&o.mac!=="00:00:00:00:00:00"&&(t.mac=o.mac)}}),i&&(e[n]=t)}),e}});var V=d((Fe,z)=>{"use strict";u();var E=b(),p={};p.getMacAddress=S();p.getAllInterfaces=P();p.networkInterfaces=j();var fe=new RegExp("^((en|eth)[0-9]+|ethernet)$","i"),le=new RegExp("^(vboxnet[0-9]+)$","i");p.one=function(){var e=null,r=null;if(arguments.length>=1&&(typeof arguments[0]=="function"?r=arguments[0]:typeof arguments[0]=="string"&&(e=arguments[0]),arguments.length>=2&&typeof arguments[1]=="function"&&(r=arguments[1])),!r)return E.promisify(function(s){p.one(e,s)});if(e){p.getMacAddress(e,r);return}var n=p.networkInterfaces(),t={},i=[],o=[];if(Object.keys(n).forEach(function(s){o.push(s);var f=0,m=n[s];typeof m.mac=="string"&&m.mac!=="00:00:00:00:00:00"&&(t[s]=m.mac,m.ipv4&&(f+=1),m.ipv6&&(f+=1),fe.test(s)&&(f+=2),le.test(s)&&(f-=3),i.push({name:s,score:f,mac:m.mac}))}),i.length>0){i.sort(function(s,f){var m=f.score-s.score;return m!==0?m:s.name<f.name?-1:s.name>f.name?1:0}),E.nextTick(r.bind(null,null,i[0].mac));return}o.push(p.getAllInterfaces);var c=function(s,f){if(t[s]){f(null,t[s]);return}p.getMacAddress(s,f)};E.iterate(o,c,r)};p.all=function(e){if(typeof e!="function")return E.promisify(p.all);var r=p.networkInterfaces(),n={};return Object.keys(r).forEach(function(t){r[t].mac||(n[t]=p.getMacAddress.bind(null,t))}),Object.keys(n).length===0?(typeof e=="function"&&E.nextTick(e.bind(null,null,r)),r):(E.parallel(n,function(t,i){Object.keys(i).forEach(function(o){r[o].mac=i[o]}),typeof e=="function"&&e(null,r)}),null)};z.exports=p});u();u();function x(e){return!(e===void 0||e.trim()==="")}function _(e,r){switch(e){case"bitbucket":return{branch:r.BITBUCKET_BRANCH,build:r.BITBUCKET_BUILD_NUMBER,commitSha:r.BITBUCKET_COMMIT,run:r.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${r.BITBUCKET_WORKSPACE}/${r.BITBUCKET_REPO_SLUG}/pipelines/results/${r.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:r.CIRCLE_USERNAME,branch:r.CIRCLE_BRANCH,build:r.CIRCLE_BUILD_NUM,commitSha:r.CIRCLE_SHA1,run:r.CIRCLE_WORKFLOW_ID,url:r.CIRCLE_BUILD_URL};case"github":return{actor:r.GITHUB_ACTOR,attempt:r.GITHUB_RUN_ATTEMPT,branch:r.GITHUB_REF_NAME,build:r.GITHUB_RUN_ID,commitSha:r.GITHUB_SHA,run:r.GITHUB_RUN_ID,runNumber:r.GITHUB_RUN_NUMBER,url:`${r.GITHUB_SERVER_URL}/${r.GITHUB_REPOSITORY}/actions/runs/${r.GITHUB_RUN_ID}`};case"gitlab":return{actor:r.GITLAB_USER_LOGIN,branch:r.CI_COMMIT_REF_NAME,build:r.CI_PIPELINE_ID,commitSha:r.CI_COMMIT_SHA,commitMessage:r.CI_COMMIT_MESSAGE,run:r.CI_RUNNER_ID,url:r.CI_PIPELINE_URL};case"buildkite":return{branch:r.BUILDKITE_BRANCH,build:r.BUILDKITE_BUILD_NUMBER,commitSha:r.BUILDKITE_COMMIT,commitMessage:r.BUILDKITE_MESSAGE,run:r.BUILDKITE_BUILD_NUMBER,url:r.BUILDKITE_BUILD_URL};default:return{}}}var J=Q(V(),1);import{homedir as pe}from"os";async function me(e){let{fileExists:r}=await import("./fs-H7V6IRSH.js");return r(e)}async function de(e,r){let{exec:n}=await import("./system-E6Q3OBX3.js");await n(e,r)}function je(){return!!(process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function ze(){return pe()}var W,Y;function Ie(e=process.env){return e[a.env]==="development"}function Ve(e=process.env){return e===process.env?W??(W=l(e[a.verbose])||process.argv.includes("--verbose")):l(e[a.verbose])||process.argv.includes("--verbose")}async function We(e=process.env){return Object.prototype.hasOwnProperty.call(e,a.runAsUser)?!l(e[a.runAsUser]):await me(C.executables.dev)}function Ye(e=process.env){return e===process.env?Y??(Y=l(e[a.unitTest])):l(e[a.unitTest])}function Je(e=process.env){return l(e[a.noAnalytics])||l(e[a.optOutInstrumentation])||Ie(e)}function Qe(e=process.env){return l(e[a.alwaysLogAnalytics])}function Xe(e=process.env){return l(e[a.alwaysLogMetrics])}function Ze(e=process.env){return l(e[a.firstPartyDev])}function er(e=process.env){return l(e[a.doctor])}function rr(e=process.env){return e[a.gitpod]}function tr(e=process.env){return e[a.codespaceName]}function nr(e=process.env){return e[a.codespacePortForwardingDomain]}function ir(e=process.env){return xe(e).platform!=="localhost"}function or(e=process.env){return e[a.themeToken]}function xe(e=process.env){return x(e[a.codespaces])?{platform:"codespaces",editor:!0}:x(e[a.gitpod])?{platform:"gitpod",editor:!0}:x(e[a.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function sr(){try{return await de("git",["--version"]),!0}catch{return!1}}function ur(e=process.env){if(l(e.CI)){let r="unknown";return x(e.BITBUCKET_BUILD_NUMBER)?r="bitbucket":l(e.CIRCLECI)?r="circleci":x(e.GITHUB_ACTION)?r="github":l(e.GITLAB_CI)?r="gitlab":x(e.BUILDKITE)&&(r="buildkite"),{isCI:!0,name:r,metadata:_(r,e)}}else if(l(e.TF_BUILD))return{isCI:!0,name:"azure",metadata:_("azure",e)};return{isCI:!1}}function ar(){return J.default.one()}function cr(e=process.env){let r=e[a.themeKitAccessDomain];return x(r)?r:B}function fr(e=process.env){let r=e[a.otelURL];return x(r)?r:"https://otlp-http-production-cli.shopifysvc.com"}export{je as a,ze as b,Ie as c,Ve as d,We as e,Ye as f,Je as g,Qe as h,Xe as i,Ze as j,er as k,rr as l,tr as m,nr as n,ir as o,or as p,xe as q,sr as r,ur as s,ar as t,cr as u,fr as v};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as h}from"./chunk-VPRTJUIN.js";h();h();var o=(i,e)=>{if(!i)throw new Error(e)};var b=i=>{let e={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",separator:": ",renderFn:n=>["boolean","string","number"].includes(typeof n)?n:void 0,sortFn:null,breakCircularWith:" (circular ref.)",...i};return o(Object.keys(e).length===9,"Unexpected Option(s) provided"),o(typeof e.joined=="boolean",'Option "joined" has invalid format'),o(typeof e.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),o(typeof e.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),o(typeof e.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),o(typeof e.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),o(typeof e.separator=="string",'Option "separator" has invalid format'),o(typeof e.renderFn=="function",'Option "renderFn" has invalid format'),o(typeof e.sortFn=="function"||e.sortFn===null,'Option "sortFn" has invalid format'),o(typeof e.breakCircularWith=="string"||e.breakCircularWith===null,'Option "breakCircularWith" has invalid format'),e},m=(i,e={})=>{let n=b(e),s=[],g=n.renderFn(i);g!==void 0&&s.push(String(g));let d=r=>n.sortFn===null?r.reverse():r.sort((t,l)=>n.sortFn(l,t)),u=[],a=d(Object.keys(i)).map(r=>[r]),c=[i];for(;a.length!==0;){let r=a.pop(),t=c[r.length-1][r[r.length-1]],l=n.breakCircularWith!==null&&c.includes(t);u[r.length-1]=a.length!==0&&a[a.length-1].length===r.length;let f=n.renderFn(t);s.push([u.slice(0,r.length-1).map(p=>p?n.spacerNeighbour:n.spacerNoNeighbour).join(""),u[r.length-1]?n.keyNeighbour:n.keyNoNeighbour,r[r.length-1],f===void 0?"":`${n.separator}${t}`,l?n.breakCircularWith:""].join("")),t instanceof Object&&!Array.isArray(t)&&!l&&(a.push(...d(Object.keys(t)).map(p=>r.concat(p))),c[r.length]=t)}return n.joined===!0?s.join(`
|
|
2
|
+
`):s};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as t}from"./chunk-L2MGAEV3.js";import{D as n}from"./chunk-6G6TMKXF.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function c(e){await n([{title:"Installing dependencies",task:async()=>{await t({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{c as w}from"./chunk-QBSKKQBN.js";import{c as F,e as x}from"./chunk-FQWB2F75.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-L2MGAEV3.js";import{o as $,q as m}from"./chunk-ZSBA6VIC.js";import{a as c}from"./chunk-F2QU6WWX.js";import{O as V,S as y,v as R}from"./chunk-6G6TMKXF.js";import{Cb as U,Db as D,Gb as u,Ib as p,Nb as d,Qb as l,Rb as E,zb as A}from"./chunk-N5PQPIBF.js";import{c as _}from"./chunk-YTNDFQJT.js";import{p as C,q as b,r as I}from"./chunk-IU2ZQ6TE.js";import{g as v}from"./chunk-VPRTJUIN.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
|
|
2
|
+
Now upgrading by running: ${u.genericShellCommand(a)}...`),await V(r,i,{stdio:"inherit"}),R({headline:"Shopify CLI upgraded.",body:s?`You're now on version ${s}.`:"You're now on the latest version."})}else if(o)await Y(o,c);else throw new Error("Could not determine the local project directory")}function ie(){let e=c,n=f("@shopify/cli",e);if(!n){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),n;if(!m()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(y()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(w(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return n}async function se(){try{let{notifications:e}=await F();return x(e,"",["autoupgrade"]).some(o=>o.type==="error")}catch{return!1}}async function ce(){if(y()||w(c)||m())return;let e=f("@shopify/cli",c);e&&await $("warn-on-available-upgrade",{days:1},async()=>{E(G(e))})}function G(e,n=!1){let o=M(),t=o?p`💡 Version ${e} available! Run ${u.genericShellCommand(o)}`.value:p`💡 Version ${e} available!`.value;if(n){let a=`https://github.com/Shopify/cli/releases/tag/${e}`,r=p`⚠️ This is a major version — review breaking changes before upgrading:\n ${u.link(a,a)}`.value;return`${t}
|
|
3
|
+
|
|
4
|
+
${r}`}return t}async function Y(e,n){let o=(await h(e)).content,t=o.dependencies??{},a=o.devDependencies??{},i={...t,...a}[await k()];if(!i){l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");return}i.slice(0,1).match(/[\^~]/)&&(i=n);let s=await P(await k(),i);s?q(i,s):W(i),await J("prod",t,e),await J("dev",a,e)}async function J(e,n,o){let t=[await k(),...await j()].filter(r=>!!n[r]).map(r=>({name:r,version:"latest"})),a=await L(o);t.length>0&&await N(t,{packageManager:await S(o),type:e,directory:o,stdout:process.stdout,stderr:process.stderr,addToRootDirectory:a})}async function k(){return(await O()).name}async function j(){return(await O())?.oclif?.plugins??[]}var g;async function O(){if(!g){let e=await h(C(import.meta.url));g=g??e.content}return g}function W(e){d(p`You're on the latest version, ${u.yellow(e)}, no need to upgrade!`)}function q(e,n){d(p`Upgrading CLI from ${u.yellow(e)} to ${u.yellow(n)}...`)}export{M as a,re as b,ie as c,se as d,ce as e,G as f};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as X}from"./chunk-PIBY5DDZ.js";import{a as x,c as O,g as p}from"./chunk-VPRTJUIN.js";var q=O((Re,j)=>{p();var w=1e3,v=w*60,E=v*60,y=E*24,ee=y*7,re=y*365.25;j.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return te(e);if(r==="number"&&isFinite(e))return t.long?se(e):ne(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function te(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*re;case"weeks":case"week":case"w":return r*ee;case"days":case"day":case"d":return r*y;case"hours":case"hour":case"hrs":case"hr":case"h":return r*E;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*w;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ne(e){var t=Math.abs(e);return t>=y?Math.round(e/y)+"d":t>=E?Math.round(e/E)+"h":t>=v?Math.round(e/v)+"m":t>=w?Math.round(e/w)+"s":e+"ms"}function se(e){var t=Math.abs(e);return t>=y?T(e,t,y,"day"):t>=E?T(e,t,E,"hour"):t>=v?T(e,t,v,"minute"):t>=w?T(e,t,w,"second"):e+" ms"}function T(e,t,r,o){var l=t>=r*1.5;return Math.round(e/r)+" "+o+(l?"s":"")}});var k=O((Te,G)=>{p();function oe(e){r.debug=r,r.default=r,r.coerce=W,r.disable=F,r.enable=l,r.enabled=J,r.humanize=q(),r.destroy=Z,Object.keys(e).forEach(n=>{r[n]=e[n]}),r.names=[],r.skips=[],r.formatters={};function t(n){let s=0;for(let i=0;i<n.length;i++)s=(s<<5)-s+n.charCodeAt(i),s|=0;return r.colors[Math.abs(s)%r.colors.length]}r.selectColor=t;function r(n){let s,i=null,a,b;function f(...d){if(!f.enabled)return;let g=f,I=Number(new Date),H=I-(s||I);g.diff=H,g.prev=s,g.curr=I,s=I,d[0]=r.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");let R=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,(N,K)=>{if(N==="%%")return"%";R++;let D=r.formatters[K];if(typeof D=="function"){let Q=d[R];N=D.call(g,Q),d.splice(R,1),R--}return N}),r.formatArgs.call(g,d),(g.log||r.log).apply(g,d)}return f.namespace=n,f.useColors=r.useColors(),f.color=r.selectColor(n),f.extend=o,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>i!==null?i:(a!==r.namespaces&&(a=r.namespaces,b=r.enabled(n)),b),set:d=>{i=d}}),typeof r.init=="function"&&r.init(f),f}function o(n,s){let i=r(this.namespace+(typeof s>"u"?":":s)+n);return i.log=this.log,i}function l(n){r.save(n),r.namespaces=n,r.names=[],r.skips=[];let s=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let i of s)i[0]==="-"?r.skips.push(i.slice(1)):r.names.push(i)}function m(n,s){let i=0,a=0,b=-1,f=0;for(;i<n.length;)if(a<s.length&&(s[a]===n[i]||s[a]==="*"))s[a]==="*"?(b=a,f=i,a++):(i++,a++);else if(b!==-1)a=b+1,f++,i=f;else return!1;for(;a<s.length&&s[a]==="*";)a++;return a===s.length}function F(){let n=[...r.names,...r.skips.map(s=>"-"+s)].join(",");return r.enable(""),n}function J(n){for(let s of r.skips)if(m(n,s))return!1;for(let s of r.names)if(m(n,s))return!0;return!1}function W(n){return n instanceof Error?n.stack||n.message:n}function Z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}G.exports=oe});var U=O((C,A)=>{p();C.formatArgs=ce;C.save=ue;C.load=ae;C.useColors=ie;C.storage=le();C.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ie(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ce(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+A.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(r++,l==="%c"&&(o=r))}),e.splice(o,0,t)}C.log=console.debug||console.log||(()=>{});function ue(e){try{e?C.storage.setItem("debug",e):C.storage.removeItem("debug")}catch{}}function ae(){let e;try{e=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function le(){try{return localStorage}catch{}}A.exports=k()(C);var{formatters:fe}=A.exports;fe.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var z=O((_e,Y)=>{"use strict";p();var Ce=x("os"),P=x("tty"),h=X(),{env:c}=process,M;h("no-color")||h("no-colors")||h("color=false")||h("color=never")?M=0:(h("color")||h("colors")||h("color=true")||h("color=always"))&&(M=1);function de(){if("FORCE_COLOR"in c)return c.FORCE_COLOR==="true"?1:c.FORCE_COLOR==="false"?0:c.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(c.FORCE_COLOR,10),3)}function pe(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function he(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=de();o!==void 0&&(M=o);let l=r?M:o;if(l===0)return 0;if(r){if(h("color=16m")||h("color=full")||h("color=truecolor"))return 3;if(h("color=256"))return 2}if(e&&!t&&l===void 0)return 0;let m=l||0;if(c.TERM==="dumb")return m;if(process.platform==="win32"){let F=Ce.release().split(".");return Number(F[0])>=10&&Number(F[2])>=10586?Number(F[2])>=14931?3:2:1}if("CI"in c)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(F=>F in c)||c.CI_NAME==="codeship"?1:m;if("TEAMCITY_VERSION"in c)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(c.TEAMCITY_VERSION)?1:0;if(c.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in c){let F=Number.parseInt((c.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(c.TERM_PROGRAM){case"iTerm.app":return F>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(c.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(c.TERM)||"COLORTERM"in c?1:m}function B(e,t={}){let r=he(e,{streamIsTTY:e&&e.isTTY,...t});return pe(r)}Y.exports={supportsColor:B,stdout:B({isTTY:P.isatty(1)}),stderr:B({isTTY:P.isatty(2)})}});var V=O((u,L)=>{p();var me=x("tty"),_=x("util");u.init=ve;u.log=be;u.formatArgs=ge;u.save=Oe;u.load=we;u.useColors=Fe;u.destroy=_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");u.colors=[6,2,3,4,5,1];try{let e=z();e&&(e.stderr||e).level>=2&&(u.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}u.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(l,m)=>m.toUpperCase()),o=process.env[t];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),e[r]=o,e},{});function Fe(){return"colors"in u.inspectOpts?!!u.inspectOpts.colors:me.isatty(process.stderr.fd)}function ge(e){let{namespace:t,useColors:r}=this;if(r){let o=this.color,l="\x1B[3"+(o<8?o:"8;5;"+o),m=` ${l};1m${t} \x1B[0m`;e[0]=m+e[0].split(`
|
|
2
|
+
`).join(`
|
|
3
|
+
`+m),e.push(l+"m+"+L.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ye()+t+" "+e[0]}function ye(){return u.inspectOpts.hideDate?"":new Date().toISOString()+" "}function be(...e){return process.stderr.write(_.formatWithOptions(u.inspectOpts,...e)+`
|
|
4
|
+
`)}function Oe(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function we(){return process.env.DEBUG}function ve(e){e.inspectOpts={};let t=Object.keys(u.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=u.inspectOpts[t[r]]}L.exports=k()(u);var{formatters:$}=L.exports;$.o=function(e){return this.inspectOpts.colors=this.useColors,_.inspect(e,this.inspectOpts).split(`
|
|
5
|
+
`).map(t=>t.trim()).join(" ")};$.O=function(e){return this.inspectOpts.colors=this.useColors,_.inspect(e,this.inspectOpts)}});var Ee=O((ke,S)=>{p();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?S.exports=U():S.exports=V()});export{q as a,z as b,Ee as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as h}from"./chunk-MHWV5RQV.js";import{Ib as a,Qb as u}from"./chunk-N5PQPIBF.js";import{f as I}from"./chunk-YTNDFQJT.js";import{c as D}from"./chunk-ULQG3XQS.js";import{g as f}from"./chunk-VPRTJUIN.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./chunk-VPRTJUIN.js";r();function t(e){try{return new URL(e)}catch{return}}export{t as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v as d}from"../../../../chunk-IZ3C5J7G.js";import{a as l}from"../../../../chunk-JCL2RRU6.js";import{a as u}from"../../../../chunk-AGNMOFJS.js";import{Ba as f}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-XEFQQPL4.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as m}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import{Mb as a,Yb as c}from"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as i}from"../../../../chunk-VPRTJUIN.js";i();i();function g(n){let o=d(n),t=new Map;o.forEach(e=>{let s=e.split(".");if(s.length>=2){let r=s[0];t.has(r)||t.set(r,[]),t.set(r,[...t.get(r),e])}});for(let[e,s]of t)a(c(e,s.join(`
|
|
2
|
+
`)))}var p=class n extends l{static{this.summary="Print out a list of sources that may be used with the logs command."}static{this.descriptionWithMarkdown="The output source names can be used with the `--source` argument of `shopify app logs` to filter log output. Currently only function extensions are supported as sources."}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...m,...u}}async run(){let{flags:o}=await this.parse(n),{app:t}=await f({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config});return t.errors.isEmpty()?g(t):process.exit(2),{app:t}}};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as W}from"../../../chunk-G4BPGWJC.js";import{a as h}from"../../../chunk-ZBRRJDGW.js";import{a as b}from"../../../chunk-AGNMOFJS.js";import{Ca as y,f as g}from"../../../chunk-54CAKCYR.js";import"../../../chunk-7ESSIN27.js";import"../../../chunk-GZS44BUW.js";import"../../../chunk-K2WUCOQJ.js";import"../../../chunk-7QIOUDCX.js";import"../../../chunk-7MUKLZOL.js";import"../../../chunk-VBUZWRUL.js";import"../../../chunk-DCPBRWVC.js";import"../../../chunk-KR6QDE7D.js";import"../../../chunk-UXVZ2P63.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-EKXY5COY.js";import"../../../chunk-4DCQNGUV.js";import"../../../chunk-QBSKKQBN.js";import"../../../chunk-FQWB2F75.js";import"../../../chunk-XONFGLJQ.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-L2MGAEV3.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-ZSBA6VIC.js";import"../../../chunk-F2QU6WWX.js";import"../../../chunk-XULPJ6UG.js";import{b as u}from"../../../chunk-XR6GMMEU.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-MHWV5RQV.js";import"../../../chunk-XOTA6JTZ.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import{O as f,t as d,v as m}from"../../../chunk-6G6TMKXF.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import{d as c}from"../../../chunk-WSDN25F5.js";import"../../../chunk-M56NDIMD.js";import"../../../chunk-PD5ZHJWI.js";import{r as x}from"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-OBEWZXOQ.js";import"../../../chunk-N5PQPIBF.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YTNDFQJT.js";import"../../../chunk-ULQG3XQS.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{e as S,g as o}from"../../../chunk-VPRTJUIN.js";o();o();o();async function s(e,{web:i,stdout:t,stderr:n,signal:a,env:r={}}){let l=i.configuration.commands[e];if(!l)return;let[I,...k]=l.split(" ");await f(I,k,{cwd:i.directory,stdout:t,stderr:n,signal:a,env:r}),t.write("Web successfully built.")}async function P(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await h(e.project);let i={};e.apiKey&&(i.SHOPIFY_API_KEY=e.apiKey),await g(e.app),await d({processes:[...e.app.webs.map(t=>({prefix:["web",...t.configuration.roles].join("-"),action:async(n,a,r)=>{await s("build",{web:t,stdout:n,stderr:a,signal:r,env:i})}})),...e.app.allExtensions.map(t=>({prefix:t.localIdentifier,action:async(n,a,r)=>{await t.build({stdout:n,stderr:a,signal:r,app:e.app,environment:"production"})}}))],showTimestamps:!1}),m({headline:[{userInput:e.app.name},"built!"]})}var w=P;var A=S(x(),1);var p=class e extends W{static{this.summary="Build the app, including extensions."}static{this.descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid."}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...u,...b,"skip-dependencies-installation":A.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})}}async run(){let{flags:i}=await this.parse(e),t=i["client-id"];await c(()=>({cmd_app_dependency_installation_skipped:i["skip-dependencies-installation"]}));let{app:n,project:a}=await y({directory:i.path,userProvidedConfigName:i.config});return await w({app:n,project:a,skipDependenciesInstallation:i["skip-dependencies-installation"],apiKey:t}),{app:n}}};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,h as D,i as I}from"../../../../chunk-NPEVESCV.js";import{a as N,d as S,g as A}from"../../../../chunk-M3RYUB22.js";import"../../../../chunk-TQ6HYDVC.js";import{a as F}from"../../../../chunk-JCL2RRU6.js";import{a as C}from"../../../../chunk-AGNMOFJS.js";import"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import{b as y}from"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import{z as k}from"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as g}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{u as d,v as c,w as O,x as b}from"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import{r as x}from"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import{Gb as f,Ib as v}from"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{e as h,g as a}from"../../../../chunk-VPRTJUIN.js";a();a();a();var T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationCancel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationCancel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"fileSize"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"rootObjectCount"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var E="2026-01";async function w(o){let{organization:e,storeFqdn:n,operationId:t,remoteApp:p}=o;d({headline:"Canceling bulk operation.",body:[{list:{items:[`ID: ${t}`,...S({organization:e,remoteApp:p,storeFqdn:n})]}}]});let z=await N(p,n),r=await y({query:T,session:z,variables:{id:t},version:E});if(r.bulkOperationCancel?.userErrors?.length){D(r.bulkOperationCancel.userErrors,"Failed to cancel bulk operation.");return}let m=r.bulkOperationCancel?.bulkOperation;if(m){let i=I(m),l={headline:i.headline,...i.body&&{body:i.body},...i.customSections&&{customSections:i.customSections}};switch(i.renderType){case"success":c(l);break;case"warning":O(l);break;case"info":d(l);break}}else b({headline:"Bulk operation not found or could not be canceled.",body:v`ID: ${f.yellow(t)}`.value})}var s=h(x(),1);var u=class o extends F{static{this.summary="Cancel a bulk operation."}static{this.description="Cancels a running bulk operation by ID."}static{this.flags={...g,...C,id:s.Flags.string({description:"The bulk operation ID to cancel (numeric ID or full GID).",env:"SHOPIFY_FLAG_ID",required:!0}),store:s.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>k(e)})}}async run(){let{flags:e}=await this.parse(o),{appContextResult:n,store:t}=await A(e);return await w({organization:n.organization,storeFqdn:t.shopDomain,operationId:B(e.id),remoteApp:n.remoteApp}),{app:n.app}}};export{u as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as w,b as W,d as H,g as B}from"../../../../chunk-NPEVESCV.js";import{a as j,c as z,d as G,e as N,f as J,h as K}from"../../../../chunk-M3RYUB22.js";import"../../../../chunk-TQ6HYDVC.js";import{a as $}from"../../../../chunk-JCL2RRU6.js";import{a as q,b as Q}from"../../../../chunk-AGNMOFJS.js";import"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import{b as c}from"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import{n as b}from"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as V}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{E as f,P as F,a as _,u as E,v as y,w as C,x as R}from"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import{d,g as x}from"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import{Gb as m,Ib as u,Mb as L,Ta as P,ma as I,ua as D}from"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as r}from"../../../../chunk-VPRTJUIN.js";r();r();r();r();var X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function Y(n){let{adminSession:e,query:a,version:i}=n;return(await c({query:X,session:e,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}r();r();r();var Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ee(n){let{adminSession:e,variablesJsonl:a}=n,i=Buffer.from(a??"","utf-8"),t="bulk-variables.jsonl",s=i.length,o=await pe(e,t,s),p=me(o);return await ke(i,p.url,p.parameters,t),p.stagedUploadKey}async function pe(n,e,a){return c({query:Z,session:n,variables:{input:[{filename:e,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function me(n){if(!n.stagedUploadsCreate)throw new d("No response received from stagedUploadsCreate mutation");if(n.stagedUploadsCreate.userErrors.length>0){let i=n.stagedUploadsCreate.userErrors.map(t=>t.message).join(", ");throw new d(`Failed to create staged upload: ${i}`)}let e=n.stagedUploadsCreate.stagedTargets?.[0];if(!e)throw new d("No staged upload target returned from Shopify");if(!e.url||!e.resourceUrl)throw new d("Invalid staged upload target: missing required URLs");let a=e.parameters.find(i=>i.name==="key")?.value;if(!a)throw new d("No key parameter found in staged upload target");return{url:e.url,resourceUrl:e.resourceUrl,parameters:e.parameters,stagedUploadKey:a}}async function ke(n,e,a,i){let t=new FormData;for(let o of a)t.append(o.name,o.value);t.append("file",new Blob([new Uint8Array(n)],{type:"text/jsonl"}),i);let s=await f({title:u`Uploading bulk operation variables`,task:async()=>b(e,{method:"POST",body:t},"slow-request"),renderOptions:{stdout:process.stderr}});if(!s.ok){let o=await s.text();throw new d(`Failed to upload file to staged URL: ${s.statusText}
|
|
2
|
+
${o}`)}}r();var ne={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(n){let{adminSession:e,query:a,variablesJsonl:i,version:t}=n,s=await ee({adminSession:e,variablesJsonl:i});return(await c({query:ne,session:e,variables:{mutation:a,stagedUploadPath:s},...t&&{version:t}})).bulkOperationRunMutation}r();var ce=["COMPLETED","FAILED","CANCELED","EXPIRED"],ie=1,fe=5,ae=10,ge=3e3,ye=300;async function oe(n,e){return f({title:u`Starting bulk operation`,task:async()=>{let a=Date.now(),i=se({adminSession:n,operationId:e,pollIntervalSeconds:ye/1e3,useAdaptivePolling:!1}),t;do{let{value:s,done:o}=await i.next();if(t=s,o)return t}while(Date.now()-a<ge);return t},renderOptions:{stdout:process.stderr}})}async function re(n,e,a,i){return f({title:u`Polling bulk operation`,task:async t=>{let s=se({adminSession:n,operationId:e,pollIntervalSeconds:fe,initialPollIntervalSeconds:ie,initialPollCount:ae,useAdaptivePolling:!0,abortSignal:a});for(;;){let{value:o,done:p}=await s.next();if(p)return o;t(B(o))}},onAbort:i,renderOptions:{stdout:process.stderr}})}async function*se({adminSession:n,operationId:e,pollIntervalSeconds:a,useAdaptivePolling:i=!1,initialPollIntervalSeconds:t=ie,initialPollCount:s=ae,abortSignal:o}){let p=0;for(;;){let O=await ve(n,e);if(!O.bulkOperation)throw new Error("bulk operation not found");let v=O.bulkOperation;if(ce.includes(v.status)||o?.aborted)return v;yield v,p++;let k=a;i&&p<=s&&(k=t),o?await Promise.race([F(k),new Promise(S=>o.addEventListener("abort",S))]):await F(k)}}async function ve(n,e){return c({query:W,session:n,variables:{id:e},version:w})}r();async function le(n){let e=await b(n);if(!e.ok)throw new d(`Failed to download bulk operation results: ${e.statusText}`);return e.text()}async function Se(n,e){if(n)return n.join(`
|
|
3
|
+
`);if(e){if(!await P(e))throw new d(u`Variable file not found at ${m.path(e)}. Please check the path and try again.`);return I(e,{encoding:"utf8"})}else return}async function de(n){let{organization:e,remoteApp:a,store:i,query:t,variables:s,variableFile:o,outputFile:p,watch:O=!1,version:v}=n,{adminSession:k,version:S}=await f({title:u`Authenticating`,task:async()=>{let l=await j(a,i.shopDomain),g=await z({adminSession:l,userSpecifiedVersion:v,minimumDefaultVersion:w});return{adminSession:l,version:g}},renderOptions:{stdout:process.stderr}}),U=await Se(s,o);be(t,U),J(t,i),E({headline:"Starting bulk operation.",body:[{list:{items:G({organization:e,remoteApp:a,storeFqdn:i.shopDomain,version:S})}}]});let A=N(t)?await te({adminSession:k,query:t,variablesJsonl:U,version:S}):await Y({adminSession:k,query:t,version:S});if(A?.userErrors?.length){R({headline:"Error creating bulk operation.",body:{list:{items:A.userErrors.map(l=>l.field?`${l.field.join(".")}: ${l.message}`:l.message)}}});return}let T=A?.bulkOperation;if(T)if(O){let l=new _,g=await re(k,T.id,l.signal,()=>l.abort());l.signal.aborted?E({headline:`Bulk operation ${g.id} is still running in the background.`,body:h(g.id)}):await ue(g,p)}else{let l=await oe(k,T.id);["FAILED","CANCELED","EXPIRED"].includes(l.status)?await ue(l,p):y({headline:"Bulk operation is running.",body:h(l.id),customSections:[{body:[{list:{items:[u`ID: ${m.cyan(l.id)}`.value]}}]}]})}else throw C({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new x("Bulk operation response returned null with no error message.")}async function ue(n,e){let a=B(n).value,t=[{body:[{list:{items:[u`ID: ${m.cyan(n.id)}`.value,u`Status: ${m.yellow(n.status)}`.value,u`Created at: ${m.gray(String(n.createdAt))}`.value,...n.completedAt?[u`Completed at: ${m.gray(String(n.completedAt))}`.value]:[]]}}]}];switch(n.status){case"CREATED":y({headline:"Bulk operation started.",body:h(n.id),customSections:t});break;case"RUNNING":y({headline:"Bulk operation is running.",body:h(n.id),customSections:t});break;case"COMPLETED":if(n.url){let s=await le(n.url),o=Oe(s);e?await D(e,s):L(s),o?C({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:t}):y({headline:a,body:e?[`Results written to ${e}`]:void 0,customSections:t})}else y({headline:a,customSections:t});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":R({headline:a,customSections:t});break}}function Oe(n){return n.trim().split(`
|
|
4
|
+
`).some(a=>{let i=JSON.parse(a);if(!i.data)return!1;let t=Object.values(i.data)[0];return t?.userErrors!==void 0&&t.userErrors.length>0})}function be(n,e){if(N(n)&&!e)throw new d(u`Bulk mutations require variables. Provide a JSONL file with ${m.yellow("--variable-file")} or individual JSON objects with ${m.yellow("--variables")}.`);if(!N(n)&&e)throw new d(u`The ${m.yellow("--variables")} and ${m.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(n){return[`Monitor its progress with:
|
|
5
|
+
`,{command:`shopify app bulk status --id=${H(n)}`}]}var M=class n extends ${static{this.summary="Execute bulk operations."}static{this.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
6
|
+
|
|
7
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
8
|
+
|
|
9
|
+
Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...V,...q,...Q}}async run(){let{flags:e}=await this.parse(n),{query:a,appContextResult:i,store:t}=await K(e);return await de({organization:i.organization,remoteApp:i.remoteApp,store:t,query:a,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:i.app}}};export{M as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{c as d,e as m,f as c}from"../../../../chunk-NPEVESCV.js";import{g as u}from"../../../../chunk-M3RYUB22.js";import"../../../../chunk-TQ6HYDVC.js";import{a as l}from"../../../../chunk-JCL2RRU6.js";import{a as n}from"../../../../chunk-AGNMOFJS.js";import"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import{z as p}from"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as r}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import{r as f}from"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{e as k,g as s}from"../../../../chunk-VPRTJUIN.js";s();var e=k(f(),1);var a=class h extends l{static{this.summary="Check the status of bulk operations."}static{this.descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
|
|
2
|
+
|
|
3
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
4
|
+
|
|
5
|
+
Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...r,...n,id:e.Flags.string({description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",env:"SHOPIFY_FLAG_ID"}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>p(o)})}}async run(){let{flags:o}=await this.parse(h),{appContextResult:t,store:i}=await u(o);return o.id?await m({organization:t.organization,storeFqdn:i.shopDomain,operationId:d(o.id),remoteApp:t.remoteApp}):await c({organization:t.organization,storeFqdn:i.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};export{a as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as p}from"../../../../chunk-JCL2RRU6.js";import{a as e}from"../../../../chunk-AGNMOFJS.js";import{Ba as n,ya as r}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as a}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as i}from"../../../../chunk-VPRTJUIN.js";i();var o=class s extends p{static{this.summary="Fetch your app configuration from the Developer Dashboard."}static{this.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
|
|
2
|
+
|
|
3
|
+
For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
|
|
4
|
+
`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...a,...e}}async run(){let{flags:t}=await this.parse(s),c={directory:t.path,apiKey:t["client-id"],configName:t.config},f=await r(c),{app:d}=await n({directory:t.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:f.configFileName});return{app:d}}};export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w}from"../../../../chunk-JCL2RRU6.js";import{a as A}from"../../../../chunk-AGNMOFJS.js";import{Aa as y,Ba as P,xa as C,za as k}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as h}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v as u}from"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import{d}from"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import{j as r}from"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as a}from"../../../../chunk-VPRTJUIN.js";a();a();async function f(p){let{directory:i,configName:o,configPath:n,configuration:e,remoteApp:t}=p;if(!e.client_id)throw new d("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=t.developerPlatformClient,m=await C({developerPlatformClient:c,app:t}),l=t.flags,O={directory:i,configName:o,developerPlatformClient:c,apiKey:e.client_id},g=await k(O,m,l,t.apiKey),F=r(n),N=await y({remoteApp:t,developerPlatformClient:c,specifications:m,flags:l,configFileName:F,appDirectory:g.appDirectory??i,localAppOptions:g});return{configPath:n,configuration:N,remoteApp:t}}var s=class p extends w{static{this.summary="Refresh an already-linked app configuration without prompts."}static{this.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one."}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...h,...A}}async run(){let{flags:i}=await this.parse(p),{app:o,remoteApp:n}=await P({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),{configuration:e,configPath:t}=await f({directory:i.path,configName:i.config,configPath:o.configPath,configuration:o.configuration,remoteApp:n});return u({headline:`Pulled latest configuration for "${e.name}"`,body:`Updated ${r(t)} with the remote data.`}),{app:o}}};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"../../../../chunk-G4BPGWJC.js";import{a as n}from"../../../../chunk-AGNMOFJS.js";import{A as p,Ca as s,D as e}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as r}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import{r as u}from"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{e as l,g as i}from"../../../../chunk-VPRTJUIN.js";i();var m=l(u(),1);var{config:F,...d}=n,o=class f extends c{static{this.summary="Activate an app configuration."}static{this.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project."}static{this.description=this.descriptionWithoutMarkdown()}static{this.usage="app config use [config] [flags]"}static{this.flags={...r,...d}}static{this.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})}}async run(){let{flags:t,args:a}=await this.parse(f),{app:g}=await s({directory:t.path,userProvidedConfigName:a.config});return await e(t.path),await p({directory:t.path,configName:a.config,reset:t.reset}),{app:g}}};export{o as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as V}from"../../../../chunk-JCL2RRU6.js";import{a as A}from"../../../../chunk-AGNMOFJS.js";import{B as C,Ba as O,C as S,l as c,y as b,z as E}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as y,c as j}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v,x as m}from"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import{d as u,f as o}from"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import{Mb as s,Tb as g,Wb as w}from"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as f}from"../../../../chunk-VPRTJUIN.js";f();f();async function k(l,t){let e=new Set(t.map(n=>n.file)).size;await c.addPublicMetadata(()=>({cmd_app_validate_valid:l,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:e}))}async function x(l,t={json:!1}){let e=l.errors;if(!e||e.isEmpty()){if(await k(!0,[]),t.json){s(JSON.stringify({valid:!0,issues:[]},null,2));return}v({headline:"App configuration is valid."});return}let n=e.getErrors();if(await k(!1,n),t.json){let p=n.map(({file:d,message:a,path:i,code:r})=>({file:d,message:a,path:i,code:r}));throw s(JSON.stringify({valid:!1,issues:p},null,2)),new o}throw m({headline:"Validation errors found.",body:n.map(p=>`\u2022 ${S(p)}`).join(`
|
|
2
|
+
`)}),new o}async function h(l,t){await c.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:l,cmd_app_validate_file_count:t}))}var _=class l extends V{static{this.summary="Validate your app configuration and extensions."}static{this.descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found."}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...y,...A,...j}}async run(){let{flags:t}=await this.parse(l);await c.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let e;try{e=await b.load(t.path)}catch(a){if(a instanceof u&&t.json){await h(1,1);let i=w(g(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new o}throw a}let n;try{n=await C(e,t.config)}catch(a){if(a instanceof u&&t.json){await h(1,1);let i=w(g(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new o}throw a}let p=E(e,n.file);if(p.length>0){let a=p.map(r=>({file:r.path,message:r.message})),i=new Set(p.map(r=>r.path)).size;throw await h(a.length,i),t.json?(s(JSON.stringify({valid:!1,issues:a},null,2)),new o):(m({headline:"Validation errors found.",body:a.map(r=>`\u2022 ${r.message}`).join(`
|
|
3
|
+
`)}),new o)}let d;try{d=(await O({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config,unsafeTolerateErrors:!0})).app}catch(a){let i=a instanceof u?w(g(a.message)).trim():"";throw i.startsWith("Validation errors in ")&&t.json?(await h(1,1),s(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new o):a}return await x(d,{json:t.json}),{app:d}}};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"../../../../chunk-HIBX234C.js";import{a as l}from"../../../../chunk-JCL2RRU6.js";import{a as m}from"../../../../chunk-AGNMOFJS.js";import{Ba as c}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import{b as d}from"../../../../chunk-WFXRSKRK.js";import"../../../../chunk-XEFQQPL4.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as s}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import{Nb as e,tb as n}from"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{g as p}from"../../../../chunk-VPRTJUIN.js";p();var r=class u extends l{static{this.summary="Watch and prints out changes to an app."}static{this.hidden=!0}static{this.flags={...s,...m}}async run(){let{flags:t}=await this.parse(u),{app:o}=await c({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=new f(o);return await i.start(),e(`Watching for changes in ${o.name}...`),i.onEvent(async({app:w,extensionEvents:h,startTime:g,path:k})=>{e(`\u{1F195} Event [${d(g)}ms]`),e(` \u{1F4C2} ${k}`),h.forEach(a=>{switch(a.type){case"created":e(` \u2705 Extension created - ${n.green(a.extension.handle)}`);break;case"deleted":e(` \u274C Extension deleted: ${n.red(a.extension.handle)}`);break;case"changed":e(` \u{1F504} Updated: ${n.yellow(a.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:o}}};export{r as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{c as te,e as oe,f as O,g as ie}from"../../../chunk-3D4JXJPS.js";import{a as Q,c as X,d as ee,e as ne}from"../../../chunk-OTY24J2W.js";import{a as Z}from"../../../chunk-JCL2RRU6.js";import{a as W}from"../../../chunk-AGNMOFJS.js";import{$ as q,Ba as J,F as M,I as H,X as P,f as G,l as K}from"../../../chunk-54CAKCYR.js";import"../../../chunk-7ESSIN27.js";import"../../../chunk-ULFWK45W.js";import"../../../chunk-KHTV6PBV.js";import"../../../chunk-NKQBEFPS.js";import{k as I}from"../../../chunk-GZS44BUW.js";import"../../../chunk-K2WUCOQJ.js";import"../../../chunk-7QIOUDCX.js";import"../../../chunk-7MUKLZOL.js";import"../../../chunk-VBUZWRUL.js";import"../../../chunk-DCPBRWVC.js";import"../../../chunk-KR6QDE7D.js";import"../../../chunk-UXVZ2P63.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-EKXY5COY.js";import"../../../chunk-4DCQNGUV.js";import"../../../chunk-QBSKKQBN.js";import"../../../chunk-FQWB2F75.js";import"../../../chunk-XONFGLJQ.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-L2MGAEV3.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-ZSBA6VIC.js";import"../../../chunk-F2QU6WWX.js";import"../../../chunk-XULPJ6UG.js";import{b as Y}from"../../../chunk-XR6GMMEU.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-MHWV5RQV.js";import"../../../chunk-XOTA6JTZ.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import{A as S,D as V,I as C,t as $,u as j,v as A}from"../../../chunk-6G6TMKXF.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import{d as N}from"../../../chunk-WSDN25F5.js";import{d as y,f as z}from"../../../chunk-M56NDIMD.js";import"../../../chunk-PD5ZHJWI.js";import{r as me}from"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-OBEWZXOQ.js";import{Ca as U,Hb as D,L as F,Nb as k,Sb as _,wa as w}from"../../../chunk-N5PQPIBF.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YTNDFQJT.js";import"../../../chunk-ULQG3XQS.js";import{d as E,i as B}from"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{e as ue,g}from"../../../chunk-VPRTJUIN.js";g();g();g();async function se(e){let n,t;e.bundlePath&&(n=await ne(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await ee(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let i=await e.developerPlatformClient.deploy(o);if(!i.appDeploy.appVersion){let r=fe(i.appDeploy.userErrors??[],e.extensionIds,e.appModules,{version:e.version});throw new y({bold:"Version couldn't be created."},null,[],r)}return i.appDeploy.userErrors?.length>0&&(t=i.appDeploy.userErrors.map(r=>r.message).join(", ")),{validationErrors:i.appDeploy.appVersion.appModuleVersions.filter(r=>r.validationErrors.length>0).map(r=>({uuid:r.registrationUuid,errors:r.validationErrors})),versionTag:i.appDeploy.appVersion.versionTag,location:i.appDeploy.appVersion.location,message:i.appDeploy.appVersion.message,deployError:t}}var v=`
|
|
2
|
+
Validation errors`,T=`
|
|
3
|
+
`;function fe(e,n,t,o={}){let i=d=>d.details?.some(x=>x.extension_id)??!1,s=(d,x)=>{let b=d.details?.find(R=>typeof R.extension_id<"u")?.extension_id??"";return Object.values(x).includes(b.toString())},r=d=>{let x=d.on?d.on[0]:void 0;return t.some(b=>b.uid===x?.user_identifier)},[a,l]=I(e,d=>r(d)),[m,c]=I(l,d=>i(d)),[f,p]=I(m,d=>s(d,n));return[...ge(c,{version:o.version}),...ye(f,n),...xe(p),...he(a,t)]}function ge(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function ye(e,n){return e.reduce((t,o)=>{let i=(o.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=i==="base"?o.message:`${i}: ${o.message}`,r=o.details.find(p=>typeof p.extension_title<"u")?.extension_title,a=o.details.find(p=>typeof p.specification_identifier<"u")?.specification_identifier,l=o.details.find(p=>typeof p.extension_id<"u")?.extension_id?.toString(),c=Object.keys(n).find(p=>n[p]===l)??r;a==="webhook_subscription"&&(c="Webhook Subscription");let f=t.find(p=>p.title===c);if(f){let p=f.body,u=o.category==="invalid"?p.find(d=>d.list.title===v):p.find(d=>d.list.title===T);u?u.list.items.includes(s)||u.list.items.push(s):p.push({list:{title:o.category==="invalid"?v:T,items:[s]}})}else t.push({title:c,body:[{list:{title:o.category==="invalid"?v:T,items:[s]}}]});return t.forEach(p=>{p.body.sort((u,d)=>u.list.title===v?1:d.list.title===v?-1:0)}),t},[])}function he(e,n){return e.reduce((t,o)=>{let s=(o.on?o.on[0]:void 0)?.user_identifier,r=n.find(p=>p.uid===s),a=s?`Extension with uid: ${s}`:"Unknown Extension",l=r?.handle??a,c=`${(o.field??["unknown"]).join(".")}: ${o.message}`,f=t.find(p=>p.title===l);if(f){let u=f.body.find(d=>d.list.title===v);u&&(u.list.items.includes(c)||u.list.items.push(c))}else t.push({title:l,body:[{list:{title:v,items:[c]}}]});return t},[])}function xe(e){return e.reduce((n,t)=>{let o=t.details.find(s=>typeof s.extension_title<"u")?.extension_title,i=n.find(s=>s.title===o);return i?i.errorCount+=1:n.push({title:o,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
|
|
4
|
+
${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function re(e){let n=E(e.app.directory,".shopify","deploy-bundle");await U(n,{force:!0}),await w(n),await Q(e.appManifest,n),e.skipBuild||await G(e.app);let t=e.app.allExtensions.map(i=>({prefix:i.localIdentifier,action:async(s,r,a)=>{let l=e.isDevDashboardApp?void 0:e.identifiers?.extensions[i.localIdentifier];e.skipBuild?await i.copyIntoBundle({stderr:r,stdout:s,signal:a,app:e.app,environment:"production"},n,l):await i.buildForBundle({stderr:r,stdout:s,signal:a,app:e.app,environment:"production"},n,l)}}));if(await $({processes:t,showTimestamps:!1}),e.app.allExtensions.some(i=>i.hasDeploySteps))return await X(n,e.bundlePath),e.bundlePath}async function be(e){let{app:n,remoteApp:t,developerPlatformClient:o,force:i,extensions:s}=e;if(i||!C())return n;let r=[`App includes legacy extensions that will be deprecated soon:
|
|
5
|
+
`,s.map(l=>` - ${l.title}`).join(`
|
|
6
|
+
`),`
|
|
7
|
+
|
|
8
|
+
Run `,{command:"shopify app import-extensions"},"to add legacy extensions now?"];return await S({message:r,confirmationMessage:"Yes, add legacy extensions and deploy",cancellationMessage:"No, skip for now"})?(await O({app:n,remoteApp:t,developerPlatformClient:o,extensions:s}),M(n)):n}async function ve(e){let{app:n,remoteApp:t,developerPlatformClient:o,force:i,extensions:s}=e,r=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
|
|
9
|
+
`,s.map(c=>` - ${c.title}`).join(`
|
|
10
|
+
`)],a=[`
|
|
11
|
+
|
|
12
|
+
Run `,{command:"shopify app import-extensions"},"to add legacy extensions."];if(i||!C())throw new y(r,a);let l=[`
|
|
13
|
+
|
|
14
|
+
Run `,{command:"shopify app import-extensions"}," to add legacy extensions now?"];if(await S({message:[...r,...l],confirmationMessage:"Yes, add legacy extensions and deploy",cancellationMessage:"No, don't add legacy extensions"}))return await O({app:n,remoteApp:t,developerPlatformClient:o,extensions:s}),M(n);throw new z}async function Ee(e){let{app:n,remoteApp:t,developerPlatformClient:o}=e,i=await ie({developerPlatformClient:o,apiKey:t.apiKey,organizationId:t.organizationId,extensionTypes:te,onlyDashboardManaged:!0}),s=oe(e.app,i);return s.length===0?n:o.supportsDashboardManagedExtensions?be({...e,extensions:s}):ve({...e,extensions:s})}async function ae(e){let{remoteApp:n,developerPlatformClient:t,noRelease:o,force:i,allowUpdates:s,allowDeletes:r}=e,a=await Ee({app:e.app,remoteApp:n,developerPlatformClient:t,force:i}),{identifiers:l,didMigrateExtensionsToDevDash:m}=await q({...e,app:a,developerPlatformClient:t,allowUpdates:s,allowDeletes:r}),c=!o,f=n.apiKey;_(),c?k(`Releasing a new app version as part of ${n.title}`):k(`Creating a new app version as part of ${n.title}`),_();let p;try{let u=E(e.app.directory,".shopify",`deploy-bundle.${t.bundleFormat}`);await w(B(u));let d=await a.manifest(l),x=await re({app:a,appManifest:d,bundlePath:u,identifiers:l,skipBuild:e.skipBuild,isDevDashboardApp:t.supportsAtomicDeployments}),b;c?b="Releasing an app version":b="Creating an app version",await V([{title:"Running validation",task:async()=>{await a.preDeployValidation()}},{title:b,task:async()=>{let de=await Promise.all(a.allExtensions.flatMap(ce=>ce.bundleConfig({identifiers:l,developerPlatformClient:t,apiKey:f,appConfiguration:a.configuration})));p=await se({appManifest:d,appId:n.id,apiKey:f,name:a.name,organizationId:n.organizationId,bundlePath:x,appModules:F(de),release:c,developerPlatformClient:t,extensionIds:l.extensionIds,message:e.message,version:e.version,commitReference:e.commitReference}),await P({app:a,identifiers:l,command:"deploy",developerPlatformClient:t})}}]),await we({app:a,project:e.project,release:c,uploadExtensionsBundleResult:p,didMigrateExtensionsToDevDash:m})}catch(u){throw await P({app:a,identifiers:l,command:"deploy",developerPlatformClient:t}),u}return{app:a}}async function we({app:e,project:n,release:t,uploadExtensionsBundleResult:o,didMigrateExtensionsToDevDash:i}){let s=[{link:{label:o.versionTag??"version",url:o.location}},o.message?`
|
|
15
|
+
${o.message}`:""],r=[];if(i){let a=await H(e.directory),l=Object.values(a).filter(c=>c!==a[e.configuration.client_id]),m=[];l.length>0&&m.push("\u2022 Map extension IDs to other copies of your app by running",{command:D(n.packageManager,"shopify app deploy")},"for: ",{list:{items:l}}),m.push("\u2022 Commit to source control to ensure your extension IDs aren't regenerated on the next deploy."),r=[{title:"Next steps",body:m},{title:"Reference",body:["\u2022 ",{link:{label:"Migrating from the Partner Dashboard",url:"https://shopify.dev/docs/apps/build/dev-dashboard/migrate-from-partners"}}]}]}return t?o.deployError?j({headline:"New version created, but not released.",body:[...s,`
|
|
16
|
+
|
|
17
|
+
${o.deployError}`],customSections:r}):A({headline:"New version released to users.",body:s,customSections:r}):A({headline:"New version created.",body:s,customSections:r,nextSteps:[["Run",{command:D(n.packageManager,"shopify app release",`--version=${o.versionTag}`)},"to release this version to users."]]})}g();function pe(e){if(typeof e>"u")return;let n=["Invalid version name:",{userInput:e}],t=100;if(e.length>t)throw new y(n,`Version name must be ${t} characters or less.`);let o=[".",".."];if(o.find(s=>e===s))throw new y(n,`Version name may not be any of: ${o.map(s=>`'${s}'`).join(" , ")}`);let i=/^[a-zA-Z0-9.\-_]+$/;if(!e.match(i))throw new y(n,["Version name can only contain alphanumeric characters, periods, hyphens, and underscores"])}g();function le(e){if(typeof e>"u")return;let n=["Invalid message:",{userInput:e}],t=200;if(e.length>t)throw new y(n,`Message name must be ${t} characters or less.`)}var h=ue(me(),1);var L=class e extends Z{static{this.summary="Deploy your Shopify app."}static{this.descriptionWithMarkdown=`[Builds the app](https://shopify.dev/docs/api/shopify-cli/app/app-build), then deploys your app configuration and extensions.
|
|
18
|
+
|
|
19
|
+
This command creates an app version, which is a snapshot of your app configuration and all extensions. This version is then released to users.
|
|
20
|
+
|
|
21
|
+
This command doesn't deploy your [web app](https://shopify.dev/docs/apps/tools/cli/structure#web-components). You need to [deploy your web app](https://shopify.dev/docs/apps/deployment/web) to your own hosting solution.
|
|
22
|
+
`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...Y,...W,"allow-updates":h.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":h.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),"no-release":h.Flags.boolean({hidden:!1,description:"Creates a version but doesn't release it - it's not made available to merchants. With this flag, a user confirmation is not required.",env:"SHOPIFY_FLAG_NO_RELEASE",default:!1,exclusive:["allow-updates","allow-deletes"]}),"no-build":h.Flags.boolean({description:"Use with caution: Skips building any elements of the app that require building. You should ensure your app has been prepared in advance, such as by running `shopify app build` or by caching build artifacts.",env:"SHOPIFY_FLAG_NO_BUILD",default:!1}),message:h.Flags.string({hidden:!1,description:"Optional message that will be associated with this version. This is for internal use only and won't be available externally.",env:"SHOPIFY_FLAG_MESSAGE"}),version:h.Flags.string({hidden:!1,description:"Optional version tag that will be associated with this app version. If not provided, an auto-generated identifier will be generated for this app version.",env:"SHOPIFY_FLAG_VERSION"}),"source-control-url":h.Flags.string({hidden:!1,description:"URL associated with the new app version.",env:"SHOPIFY_FLAG_SOURCE_CONTROL_URL"})}}async run(){let{flags:n}=await this.parse(e);await K.addPublicMetadata(()=>({cmd_deploy_flag_message_used:!!n.message,cmd_deploy_flag_version_used:!!n.version,cmd_deploy_flag_source_url_used:!!n["source-control-url"]})),pe(n.version),le(n.message);let t=n["client-id"];await N(()=>({cmd_app_reset_used:n.reset}));let o=n["no-release"],i=[];o||n["allow-updates"]||n["allow-deletes"]||i.push("allow-updates"),this.failMissingNonTTYFlags(n,i);let{app:r,project:a,remoteApp:l,developerPlatformClient:m,organization:c}=await J({directory:n.path,clientId:t,forceRelink:n.reset,userProvidedConfigName:n.config}),f=o||n["allow-updates"],p=o||n["allow-deletes"];return{app:(await ae({app:r,project:a,remoteApp:l,organization:c,developerPlatformClient:m,reset:n.reset,force:o,allowUpdates:f,allowDeletes:p,noRelease:n["no-release"],message:n.message,version:n.version,commitReference:n["source-control-url"],skipBuild:n["no-build"]})).app}}};export{L as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as v}from"../../../../chunk-TQ6HYDVC.js";import{a as c}from"../../../../chunk-JCL2RRU6.js";import{a as m}from"../../../../chunk-AGNMOFJS.js";import{Ba as l}from"../../../../chunk-54CAKCYR.js";import"../../../../chunk-7ESSIN27.js";import"../../../../chunk-GZS44BUW.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-7QIOUDCX.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-DCPBRWVC.js";import"../../../../chunk-KR6QDE7D.js";import"../../../../chunk-UXVZ2P63.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-EKXY5COY.js";import"../../../../chunk-4DCQNGUV.js";import"../../../../chunk-QBSKKQBN.js";import"../../../../chunk-FQWB2F75.js";import{z as n}from"../../../../chunk-XONFGLJQ.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-L2MGAEV3.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-ZSBA6VIC.js";import"../../../../chunk-F2QU6WWX.js";import"../../../../chunk-XULPJ6UG.js";import{b as d}from"../../../../chunk-XR6GMMEU.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-MHWV5RQV.js";import"../../../../chunk-XOTA6JTZ.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v as a}from"../../../../chunk-6G6TMKXF.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-WSDN25F5.js";import{d as p}from"../../../../chunk-M56NDIMD.js";import"../../../../chunk-PD5ZHJWI.js";import{r as g}from"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-OBEWZXOQ.js";import"../../../../chunk-N5PQPIBF.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YTNDFQJT.js";import"../../../../chunk-ULQG3XQS.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import{e as C,g as s}from"../../../../chunk-VPRTJUIN.js";s();s();async function f(t){let e=t.appContextResult.developerPlatformClient,o=t.appContextResult.remoteApp;if(!e.supportsDevSessions)throw new p("Dev preview is not supported for this app. It's valid only for apps created on the Next-Gen Dev Platform.");let r=await e.devSessionDelete({shopFqdn:t.store.shopDomain,appId:o.id});if(r.devSessionDelete?.userErrors.length){let u=r.devSessionDelete.userErrors.map(w=>w.message).join(`
|
|
2
|
+
`);throw new p(`Failed to stop the dev preview: ${u}`)}a({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${t.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var h=C(g(),1);var i=class t extends c{static{this.summary="Cleans up the dev preview from the selected store."}static{this.descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
|
|
3
|
+
|
|
4
|
+
It restores the app's active version to the selected development store.
|
|
5
|
+
`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...d,...m,store:h.Flags.string({hidden:!1,char:"s",description:"Store URL. Must be an existing development store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>n(e)})}}async run(){let{flags:e}=await this.parse(t),o=await l({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),r=await v({appContextResult:o,storeFqdn:e.store,forceReselectStore:e.reset});return await f({appContextResult:o,store:r}),{app:o.app}}};export{i as default};
|