shopify 3.94.3 → 4.0.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.
Files changed (295) hide show
  1. package/bin/run.js +5 -1
  2. package/dist/analytics-6IHHYAV6.js +1 -0
  3. package/dist/analytics-KKVP5DT3.js +1 -0
  4. package/dist/bootstrap.d.ts +5 -0
  5. package/dist/bootstrap.js +3 -0
  6. package/dist/chunk-22PCRFG4.js +1 -0
  7. package/dist/chunk-26D72ZNV.js +1 -0
  8. package/dist/chunk-2APPXD5Z.js +2 -0
  9. package/dist/chunk-2I4PRX2I.js +1 -0
  10. package/dist/chunk-2VQJQ36C.js +103 -0
  11. package/dist/chunk-323UTVMM.js +1 -0
  12. package/dist/chunk-3DQIVE24.js +9 -0
  13. package/dist/chunk-3F6NZK7S.js +2 -0
  14. package/dist/chunk-3LVGAQB4.js +1 -0
  15. package/dist/chunk-3TNEIDOD.js +1 -0
  16. package/dist/chunk-3VZEETAV.js +1 -0
  17. package/dist/chunk-4G7J6HIV.js +1 -0
  18. package/dist/chunk-4HHXSMD7.js +10 -0
  19. package/dist/chunk-4LNCYIS3.js +1 -0
  20. package/dist/chunk-4ZGSSQC6.js +1 -0
  21. package/dist/chunk-52GC6XUT.js +1 -0
  22. package/dist/chunk-5CH3B62S.js +2 -0
  23. package/dist/chunk-5Y7GIF2W.js +1 -0
  24. package/dist/chunk-66RJ5T7A.js +102 -0
  25. package/dist/chunk-6B53BWJW.js +1 -0
  26. package/dist/chunk-6BMMB2UO.js +1 -0
  27. package/dist/chunk-6HBRBQAN.js +6 -0
  28. package/dist/chunk-6M3ZYNGO.js +451 -0
  29. package/dist/chunk-6TZAAS5H.js +1 -0
  30. package/dist/chunk-72F3YBNA.js +1 -0
  31. package/dist/chunk-74HYYXXE.js +17 -0
  32. package/dist/chunk-75VPUOC5.js +1 -0
  33. package/dist/chunk-7BGM2GAH.js +1 -0
  34. package/dist/chunk-7UYZQN4V.js +18 -0
  35. package/dist/chunk-A74GETYC.js +1 -0
  36. package/dist/chunk-AIV5RI3X.js +1 -0
  37. package/dist/chunk-ALKTLKQ6.js +5 -0
  38. package/dist/chunk-B2EHO7ZC.js +847 -0
  39. package/dist/chunk-B2IVY4V5.js +1 -0
  40. package/dist/chunk-BDVAE5MS.js +28 -0
  41. package/dist/chunk-CERXUPGC.js +14 -0
  42. package/dist/chunk-D3TSJA5S.js +1 -0
  43. package/dist/chunk-D6JARNEH.js +1 -0
  44. package/dist/chunk-DFMQWJQ3.js +3 -0
  45. package/dist/chunk-DJONKJSZ.js +1 -0
  46. package/dist/chunk-DJQVNH7P.js +567 -0
  47. package/dist/chunk-DU4WR4OP.js +1 -0
  48. package/dist/chunk-ELVFJ7BR.js +4 -0
  49. package/dist/chunk-ELYP4KFP.js +8 -0
  50. package/dist/chunk-FFQ5EWII.js +294 -0
  51. package/dist/chunk-FUOIGXI4.js +1 -0
  52. package/dist/chunk-GD7FWXJ5.js +2 -0
  53. package/dist/chunk-GFEAKSGV.js +374 -0
  54. package/dist/chunk-GFJ7UV74.js +1 -0
  55. package/dist/chunk-GNPS5SBU.js +1 -0
  56. package/dist/chunk-GOJ2QHSR.js +1 -0
  57. package/dist/chunk-HSK7YMRE.js +359 -0
  58. package/dist/chunk-HUZUORYM.js +19 -0
  59. package/dist/chunk-HZA6IAA4.js +1 -0
  60. package/dist/chunk-IASVAERO.js +1 -0
  61. package/dist/chunk-IIIVWD4R.js +1 -0
  62. package/dist/chunk-INEU4XKS.js +6 -0
  63. package/dist/chunk-IOLVEXM6.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-J3KVONB3.js +6 -0
  67. package/dist/chunk-JGXWQULI.js +1 -0
  68. package/dist/chunk-JHPRFW5B.js +19 -0
  69. package/dist/chunk-JLBH7RCF.js +4 -0
  70. package/dist/chunk-JPGO36XP.js +1 -0
  71. package/dist/chunk-JUVAGMIH.js +1 -0
  72. package/dist/chunk-JVIKCGDY.js +1 -0
  73. package/dist/chunk-K2WUCOQJ.js +32 -0
  74. package/dist/chunk-K5YV6UVF.js +4 -0
  75. package/dist/chunk-KBQ4LGFB.js +1 -0
  76. package/dist/chunk-KGXQS7LS.js +1 -0
  77. package/dist/chunk-KL5Z3T6L.js +1 -0
  78. package/dist/chunk-KLMDWDT2.js +1 -0
  79. package/dist/chunk-KNVM7N3U.js +1 -0
  80. package/dist/chunk-KWJ562F2.js +12 -0
  81. package/dist/chunk-LALIKZPS.js +5 -0
  82. package/dist/chunk-LAZJ47DZ.js +6 -0
  83. package/dist/chunk-LDGAHMS7.js +159 -0
  84. package/dist/chunk-LNHLDRC5.js +1 -0
  85. package/dist/chunk-LW7U753G.js +1 -0
  86. package/dist/chunk-LX3ZOW52.js +12 -0
  87. package/dist/chunk-LXFJDCNG.js +1 -0
  88. package/dist/chunk-MBAFWQSZ.js +7 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MQNYGGAM.js +1 -0
  91. package/dist/chunk-N5YIPQ6J.js +1 -0
  92. package/dist/chunk-N7RBSKYT.js +1 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NRAFVIU3.js +1 -0
  95. package/dist/chunk-OCOY5MV2.js +1 -0
  96. package/dist/chunk-ODNGDO4H.js +50 -0
  97. package/dist/chunk-OHY4ZL3U.js +2 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OUOYKNMY.js +1 -0
  100. package/dist/chunk-OXPWCC7I.js +64 -0
  101. package/dist/chunk-P5VVOLGV.js +1 -0
  102. package/dist/chunk-P6XE4MH5.js +1 -0
  103. package/dist/chunk-P7R7FBY2.js +3 -0
  104. package/dist/chunk-PD5ZHJWI.js +1 -0
  105. package/dist/chunk-PIBY5DDZ.js +1 -0
  106. package/dist/chunk-Q7ING5F5.js +1 -0
  107. package/dist/chunk-QFWIDATO.js +1 -0
  108. package/dist/chunk-QRRNOVJ3.js +1 -0
  109. package/dist/chunk-QSTEVZFQ.js +1 -0
  110. package/dist/chunk-R466TU3N.js +2 -0
  111. package/dist/chunk-RF2DPBA6.js +1 -0
  112. package/dist/chunk-RFG5RMPL.js +1 -0
  113. package/dist/chunk-RM5SJJN6.js +559 -0
  114. package/dist/chunk-RVNMVBPM.js +1 -0
  115. package/dist/chunk-SBEZBZM7.js +144 -0
  116. package/dist/chunk-SGQ6D3LU.js +15 -0
  117. package/dist/chunk-SRCQVUMC.js +1 -0
  118. package/dist/chunk-TFSBQ4RY.js +5 -0
  119. package/dist/chunk-TQYMC7TH.js +1 -0
  120. package/dist/chunk-UGDBJTLP.js +6 -0
  121. package/dist/chunk-UGXYQ23Y.js +1411 -0
  122. package/dist/chunk-UWJ73J4B.js +1 -0
  123. package/dist/chunk-V2CNCPIE.js +2 -0
  124. package/dist/chunk-VBUZWRUL.js +1 -0
  125. package/dist/chunk-VS3T5YOG.js +264 -0
  126. package/dist/chunk-VWYM4OWK.js +1 -0
  127. package/dist/chunk-VY6SNDKW.js +3 -0
  128. package/dist/chunk-WDC3KIZT.js +2 -0
  129. package/dist/chunk-WFXRSKRK.js +1 -0
  130. package/dist/chunk-WXVZJJOR.js +16 -0
  131. package/dist/chunk-WZBSLU4Q.js +6 -0
  132. package/dist/chunk-XBXMPFXM.js +1 -0
  133. package/dist/chunk-XEFQQPL4.js +1 -0
  134. package/dist/chunk-XLELNRFF.js +3 -0
  135. package/dist/chunk-XNO6DZYP.js +1 -0
  136. package/dist/chunk-Y5JKV2AI.js +1 -0
  137. package/dist/chunk-YC6G4MHD.js +3 -0
  138. package/dist/chunk-YI232QLS.js +1 -0
  139. package/dist/chunk-YMWHHINU.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YZDDTYTU.js +11 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZR76GGZ6.js +5 -0
  144. package/dist/chunk-ZTMSBSYD.js +1 -0
  145. package/dist/chunk-ZV6NCNI4.js +586 -0
  146. package/dist/chunk-ZVJVDCIM.js +1 -0
  147. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  148. package/dist/cli/commands/app/build.js +1 -0
  149. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  150. package/dist/cli/commands/app/bulk/execute.js +9 -0
  151. package/dist/cli/commands/app/bulk/status.js +5 -0
  152. package/dist/cli/commands/app/config/link.js +4 -0
  153. package/dist/cli/commands/app/config/pull.js +1 -0
  154. package/dist/cli/commands/app/config/use.js +1 -0
  155. package/dist/cli/commands/app/config/validate.js +3 -0
  156. package/dist/cli/commands/app/demo/watcher.js +1 -0
  157. package/dist/cli/commands/app/deploy.js +22 -0
  158. package/dist/cli/commands/app/dev/clean.js +5 -0
  159. package/dist/cli/commands/app/dev.js +320 -0
  160. package/dist/cli/commands/app/env/pull.js +11 -0
  161. package/dist/cli/commands/app/env/show.js +1 -0
  162. package/dist/cli/commands/app/execute.js +1 -0
  163. package/dist/cli/commands/app/function/build.js +1 -0
  164. package/dist/cli/commands/app/function/info.js +16 -0
  165. package/dist/cli/commands/app/function/replay.js +5 -0
  166. package/dist/cli/commands/app/function/run.js +1 -0
  167. package/dist/cli/commands/app/function/schema.js +1 -0
  168. package/dist/cli/commands/app/function/typegen.js +1 -0
  169. package/dist/cli/commands/app/generate/extension.js +5 -0
  170. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  171. package/dist/cli/commands/app/import-extensions.js +1 -0
  172. package/dist/cli/commands/app/info.js +11 -0
  173. package/dist/cli/commands/app/init.js +10 -0
  174. package/dist/cli/commands/app/logs.js +2 -0
  175. package/dist/cli/commands/app/release.js +4 -0
  176. package/dist/cli/commands/app/versions/list.js +1 -0
  177. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  178. package/dist/cli/commands/auth/login.js +1 -20
  179. package/dist/cli/commands/auth/logout.js +1 -12
  180. package/dist/cli/commands/cache/clear.js +1 -11
  181. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  182. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  183. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  184. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  186. package/dist/cli/commands/debug/command-flags.js +1 -79
  187. package/dist/cli/commands/docs/generate.js +1 -157
  188. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  189. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  190. package/dist/cli/commands/help.js +1 -26
  191. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  192. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  193. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  195. package/dist/cli/commands/notifications/generate.js +1 -11
  196. package/dist/cli/commands/notifications/list.js +1 -33
  197. package/dist/cli/commands/organization/list.js +1 -0
  198. package/dist/cli/commands/search.js +1 -27
  199. package/dist/cli/commands/theme/check.js +1 -0
  200. package/dist/cli/commands/theme/console.js +15 -0
  201. package/dist/cli/commands/theme/delete.js +7 -0
  202. package/dist/cli/commands/theme/dev.js +26 -0
  203. package/dist/cli/commands/theme/duplicate.js +32 -0
  204. package/dist/cli/commands/theme/info.js +1 -0
  205. package/dist/cli/commands/theme/init.js +8 -0
  206. package/dist/cli/commands/theme/language-server.js +1 -0
  207. package/dist/cli/commands/theme/list.js +1 -0
  208. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  209. package/dist/cli/commands/theme/open.js +8 -0
  210. package/dist/cli/commands/theme/package.js +7 -0
  211. package/dist/cli/commands/theme/preview.js +1 -0
  212. package/dist/cli/commands/theme/profile.js +3 -0
  213. package/dist/cli/commands/theme/publish.js +7 -0
  214. package/dist/cli/commands/theme/pull.js +3 -0
  215. package/dist/cli/commands/theme/push.js +28 -0
  216. package/dist/cli/commands/theme/rename.js +6 -0
  217. package/dist/cli/commands/theme/share.js +3 -0
  218. package/dist/cli/commands/upgrade.js +1 -17
  219. package/dist/cli/commands/version.js +1 -10
  220. package/dist/command-registry.d.ts +8 -0
  221. package/dist/command-registry.js +1 -0
  222. package/dist/conf-store-U5ZITKJN.js +1 -0
  223. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  224. package/dist/deprecations-TU5UQJVV.js +1 -0
  225. package/dist/dist-2Z5TND4U.js +1 -0
  226. package/dist/dist-GYHFDHKP.js +1 -0
  227. package/dist/environments-Z5PR7DSI.js +1 -0
  228. package/dist/error-IJGNYKZ3.js +1 -0
  229. package/dist/error-handler-WSCGNS2P.js +1 -0
  230. package/dist/fs-5BDEA2KD.js +1 -0
  231. package/dist/hooks/app-init.d.ts +9 -0
  232. package/dist/hooks/app-init.js +1 -0
  233. package/dist/hooks/did-you-mean.d.ts +1 -0
  234. package/dist/hooks/did-you-mean.js +1 -0
  235. package/dist/hooks/hydrogen-init.d.ts +7 -0
  236. package/dist/hooks/hydrogen-init.js +1 -0
  237. package/dist/hooks/plugin-plugins.d.ts +1 -0
  238. package/dist/hooks/plugin-plugins.js +1 -0
  239. package/dist/hooks/postrun.js +1 -1
  240. package/dist/hooks/prerun.js +1 -1
  241. package/dist/hooks/public-metadata.d.ts +1 -0
  242. package/dist/hooks/public-metadata.js +1 -0
  243. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  244. package/dist/hooks/sensitive-metadata.js +1 -0
  245. package/dist/hooks/tunnel-provider.d.ts +1 -0
  246. package/dist/hooks/tunnel-provider.js +1 -0
  247. package/dist/hooks/tunnel-start.d.ts +1 -0
  248. package/dist/hooks/tunnel-start.js +1 -0
  249. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  250. package/dist/index.js +254 -3668
  251. package/dist/is-global-V4ZRHQG2.js +1 -0
  252. package/dist/latest-version-EFWBOTWM.js +49 -0
  253. package/dist/lib-5L7UKDEK.js +1 -0
  254. package/dist/lib-C3VO2BQW.js +1 -0
  255. package/dist/lib-QB6I6CTC.js +1 -0
  256. package/dist/local-6QPX4GCJ.js +1 -0
  257. package/dist/local-storage-JLXBZVWO.js +1 -0
  258. package/dist/metadata-UDMOTRS7.js +1 -0
  259. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  260. package/dist/node-package-manager-HAFRYGUM.js +1 -0
  261. package/dist/notifications-system-MP7WDOCS.js +1 -0
  262. package/dist/npa-ICFSA3NL.js +1 -0
  263. package/dist/output-YGMHXEIS.js +1 -0
  264. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  265. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  266. package/dist/system-KLXD4FXF.js +1 -0
  267. package/dist/tsconfig.tsbuildinfo +1 -1
  268. package/dist/typescript-K5CWIA4V.js +1 -0
  269. package/dist/ui-GHG3UGB3.js +1 -0
  270. package/dist/upgrade-OPZGPM5J.js +1 -0
  271. package/dist/version-D5PJZIRW.js +1 -0
  272. package/dist/version-KRQBMYCH.js +1 -0
  273. package/dist/workerd-L2EJKIAQ.js +18 -0
  274. package/oclif.manifest.json +5247 -6056
  275. package/package.json +17 -41
  276. package/dist/chunk-45T5XUIM.js +0 -1
  277. package/dist/chunk-52KHWFYF.js +0 -1
  278. package/dist/chunk-66TIGB4U.js +0 -415
  279. package/dist/chunk-675GKVCB.js +0 -3
  280. package/dist/chunk-7ES6PV7M.js +0 -847
  281. package/dist/chunk-BF7JM4FH.js +0 -396
  282. package/dist/chunk-FU2Y2M3M.js +0 -5
  283. package/dist/chunk-IDQ4X47Z.js +0 -3
  284. package/dist/chunk-JBSYWYIP.js +0 -2
  285. package/dist/chunk-PBKIXB7L.js +0 -63
  286. package/dist/chunk-SVA22NZQ.js +0 -607
  287. package/dist/error-handler-LC7FITE7.js +0 -1
  288. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  289. package/dist/lib-3WHF5XD3.js +0 -1
  290. package/dist/local-TWIGLQ7X.js +0 -1
  291. package/dist/node-package-manager-3UCLJPGW.js +0 -1
  292. package/dist/npa-OKDXXRCU.js +0 -1
  293. package/dist/ui-UYE67X4Y.js +0 -1
  294. package/dist/workerd-37BZZEVW.js +0 -18
  295. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1 @@
1
+ import{Da as e}from"./chunk-SBEZBZM7.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var p=class extends e{};export{p as a};
@@ -0,0 +1,2 @@
1
+ import{v as d}from"../../../../chunk-ALKTLKQ6.js";import{a as l}from"../../../../chunk-D3TSJA5S.js";import{a as u}from"../../../../chunk-RF2DPBA6.js";import{Ba as f}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-XEFQQPL4.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as m}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Mb as a,Yb as c}from"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-ZVJVDCIM.js";import{a as h}from"../../../chunk-N5YIPQ6J.js";import{a as b}from"../../../chunk-RF2DPBA6.js";import{Ca as y,f as g}from"../../../chunk-SBEZBZM7.js";import"../../../chunk-DJQVNH7P.js";import"../../../chunk-66RJ5T7A.js";import"../../../chunk-K2WUCOQJ.js";import"../../../chunk-ELYP4KFP.js";import"../../../chunk-7MUKLZOL.js";import"../../../chunk-VBUZWRUL.js";import"../../../chunk-XBXMPFXM.js";import"../../../chunk-R466TU3N.js";import"../../../chunk-UGXYQ23Y.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-TQYMC7TH.js";import"../../../chunk-HUZUORYM.js";import"../../../chunk-52GC6XUT.js";import"../../../chunk-XLELNRFF.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import{b as u}from"../../../chunk-323UTVMM.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import{O as f,t as d,v as m}from"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import{d as c}from"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.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-VY6SNDKW.js";import{a as N,d as S,g as A}from"../../../../chunk-LXFJDCNG.js";import"../../../../chunk-QRRNOVJ3.js";import{a as F}from"../../../../chunk-D3TSJA5S.js";import{a as C}from"../../../../chunk-RF2DPBA6.js";import"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import{b as y}from"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import{z as k}from"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as g}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{u as d,v as c,w as O,x as b}from"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Gb as f,Ib as v}from"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-VY6SNDKW.js";import{a as j,c as z,d as G,e as N,f as J,h as K}from"../../../../chunk-LXFJDCNG.js";import"../../../../chunk-QRRNOVJ3.js";import{a as $}from"../../../../chunk-D3TSJA5S.js";import{a as q,b as Q}from"../../../../chunk-RF2DPBA6.js";import"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import{b as c}from"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import{n as b}from"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as V}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.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-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import{d,g as x}from"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Gb as m,Ib as u,Mb as L,Ta as P,ma as I,ua as D}from"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-VY6SNDKW.js";import{g as u}from"../../../../chunk-LXFJDCNG.js";import"../../../../chunk-QRRNOVJ3.js";import{a as l}from"../../../../chunk-D3TSJA5S.js";import{a as n}from"../../../../chunk-RF2DPBA6.js";import"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import{z as p}from"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as r}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-D3TSJA5S.js";import{a as e}from"../../../../chunk-RF2DPBA6.js";import{Ba as n,ya as r}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as a}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-D3TSJA5S.js";import{a as A}from"../../../../chunk-RF2DPBA6.js";import{Aa as y,Ba as P,xa as C,za as k}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as h}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v as u}from"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import{d}from"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-ZVJVDCIM.js";import{a as n}from"../../../../chunk-RF2DPBA6.js";import{A as p,Ca as s,D as e}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as r}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-D3TSJA5S.js";import{a as A}from"../../../../chunk-RF2DPBA6.js";import{B as C,Ba as O,C as S,l as c,y as b,z as E}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as y,c as j}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v,x as m}from"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import{d as u,f as o}from"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Mb as s,Tb as g,Wb as w}from"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-J3KVONB3.js";import{a as l}from"../../../../chunk-D3TSJA5S.js";import{a as m}from"../../../../chunk-RF2DPBA6.js";import{Ba as c}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import{b as d}from"../../../../chunk-WFXRSKRK.js";import"../../../../chunk-XEFQQPL4.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as s}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Nb as e,tb as n}from"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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-3F6NZK7S.js";import{a as Q,c as X,d as ee,e as ne}from"../../../chunk-6BMMB2UO.js";import{a as Z}from"../../../chunk-D3TSJA5S.js";import{a as W}from"../../../chunk-RF2DPBA6.js";import{$ as q,Ba as J,F as M,I as H,X as P,f as G,l as K}from"../../../chunk-SBEZBZM7.js";import"../../../chunk-DJQVNH7P.js";import"../../../chunk-OXPWCC7I.js";import"../../../chunk-LX3ZOW52.js";import"../../../chunk-NKQBEFPS.js";import{k as I}from"../../../chunk-66RJ5T7A.js";import"../../../chunk-K2WUCOQJ.js";import"../../../chunk-ELYP4KFP.js";import"../../../chunk-7MUKLZOL.js";import"../../../chunk-VBUZWRUL.js";import"../../../chunk-XBXMPFXM.js";import"../../../chunk-R466TU3N.js";import"../../../chunk-UGXYQ23Y.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-TQYMC7TH.js";import"../../../chunk-HUZUORYM.js";import"../../../chunk-52GC6XUT.js";import"../../../chunk-XLELNRFF.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import{b as Y}from"../../../chunk-323UTVMM.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.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-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import{d as N}from"../../../chunk-IASVAERO.js";import{d as y,f as z}from"../../../chunk-JPGO36XP.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-V2CNCPIE.js";import{Ca as U,Hb as D,L as F,Nb as k,Sb as _,wa as w}from"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.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-QRRNOVJ3.js";import{a as c}from"../../../../chunk-D3TSJA5S.js";import{a as m}from"../../../../chunk-RF2DPBA6.js";import{Ba as l}from"../../../../chunk-SBEZBZM7.js";import"../../../../chunk-DJQVNH7P.js";import"../../../../chunk-66RJ5T7A.js";import"../../../../chunk-K2WUCOQJ.js";import"../../../../chunk-ELYP4KFP.js";import"../../../../chunk-7MUKLZOL.js";import"../../../../chunk-VBUZWRUL.js";import"../../../../chunk-XBXMPFXM.js";import"../../../../chunk-R466TU3N.js";import"../../../../chunk-UGXYQ23Y.js";import"../../../../chunk-QSTEVZFQ.js";import"../../../../chunk-5Y7GIF2W.js";import"../../../../chunk-TQYMC7TH.js";import"../../../../chunk-HUZUORYM.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import{z as n}from"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import{b as d}from"../../../../chunk-323UTVMM.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import{v as a}from"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import{d as p}from"../../../../chunk-JPGO36XP.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-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.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};