@shopify/cli 4.5.0 → 4.5.2

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 (283) hide show
  1. package/dist/{analytics-GAPN4I6R.js → analytics-M7ZU437S.js} +1 -1
  2. package/dist/{analytics-DMUNCDGT.js → analytics-ZRM4FEOE.js} +1 -1
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +8 -0
  4. package/dist/assets/hydrogen/starter/README.md +4 -4
  5. package/dist/assets/hydrogen/starter/package.json +1 -1
  6. package/dist/assets/hydrogen/starter/vite.config.ts +6 -0
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-WFB3FHKV.js → chunk-23LZNWB5.js} +1 -1
  9. package/dist/{chunk-LMPD55L6.js → chunk-2ACN7JIZ.js} +1 -1
  10. package/dist/{chunk-B367FOQA.js → chunk-2TJ6LOCC.js} +1 -1
  11. package/dist/{chunk-KUKYAIOR.js → chunk-34SINZ7L.js} +1 -1
  12. package/dist/{chunk-3OE5HXHO.js → chunk-35FS2NTM.js} +1 -1
  13. package/dist/{chunk-P3RGC53U.js → chunk-3EJGRQTH.js} +1 -1
  14. package/dist/{chunk-K2CIMJJW.js → chunk-3IFZECSI.js} +1 -1
  15. package/dist/{chunk-SF53RKMO.js → chunk-3OCR7P3S.js} +1 -1
  16. package/dist/{chunk-XXUWTD7A.js → chunk-42RVM4EZ.js} +1 -1
  17. package/dist/{chunk-KJQAJUDU.js → chunk-4MLEL3VK.js} +1 -1
  18. package/dist/{chunk-JGN7YG5X.js → chunk-4P54DKG4.js} +1 -1
  19. package/dist/chunk-4ROX2TCK.js +1 -0
  20. package/dist/{chunk-RY2ESY3P.js → chunk-4UJNCOE6.js} +1 -1
  21. package/dist/{chunk-2MZACB7V.js → chunk-4VJ5VBSR.js} +1 -1
  22. package/dist/{chunk-WU6GIY22.js → chunk-523SJVNT.js} +1 -1
  23. package/dist/{chunk-QCBAFI6Z.js → chunk-5CV7GFWZ.js} +1 -1
  24. package/dist/{chunk-6I3FNLT3.js → chunk-5GVE4ILZ.js} +1 -1
  25. package/dist/{chunk-GOAKZ2IL.js → chunk-5N7H4PJJ.js} +1 -1
  26. package/dist/{chunk-F447QKVX.js → chunk-5VC4XXYH.js} +1 -1
  27. package/dist/{chunk-NJLSZS27.js → chunk-5VRU3BT5.js} +1 -1
  28. package/dist/{chunk-K7I5BGFC.js → chunk-6AWRW3GS.js} +1 -1
  29. package/dist/{chunk-SY2AH7C2.js → chunk-6K4DVV37.js} +1 -1
  30. package/dist/{chunk-ZFOWAMFK.js → chunk-6VR22Z5R.js} +1 -1
  31. package/dist/{chunk-2IPVQRMI.js → chunk-6ZWMXMNM.js} +1 -1
  32. package/dist/{chunk-ICXHUPP5.js → chunk-75DBVSVI.js} +1 -1
  33. package/dist/{chunk-N5U5Q2MG.js → chunk-7AY6HLQG.js} +1 -1
  34. package/dist/{chunk-4LML2QWN.js → chunk-7AYYQUJG.js} +1 -1
  35. package/dist/{chunk-J5U2FUIX.js → chunk-7KWBVZPI.js} +1 -1
  36. package/dist/{chunk-2MDFREEW.js → chunk-7PVNAILK.js} +1 -1
  37. package/dist/{chunk-I3Y6XTKN.js → chunk-7RJPTSL6.js} +1 -1
  38. package/dist/{chunk-PH7F4BMG.js → chunk-7TQ6HVHN.js} +1 -1
  39. package/dist/{chunk-KZDI2BXR.js → chunk-AAK3WGD7.js} +1 -1
  40. package/dist/chunk-AATUQ2AY.js +278 -0
  41. package/dist/{chunk-WPITBIL5.js → chunk-ADKFAPED.js} +1 -1
  42. package/dist/{chunk-P4243GCY.js → chunk-ANH2V6DJ.js} +1 -1
  43. package/dist/{chunk-N4LCWB56.js → chunk-AUAUAK6P.js} +1 -1
  44. package/dist/chunk-B5MFFERE.js +1 -0
  45. package/dist/{chunk-DLZPP33V.js → chunk-BLSWUNOK.js} +1 -1
  46. package/dist/{chunk-QJL3SXYA.js → chunk-BQARKSGG.js} +1 -1
  47. package/dist/{chunk-24RF5KN3.js → chunk-BUVP2UUA.js} +1 -1
  48. package/dist/{chunk-2VUG6LRN.js → chunk-BVWQZKNK.js} +1 -1
  49. package/dist/{chunk-UQZ7HZ47.js → chunk-CEBDKIVH.js} +1 -1
  50. package/dist/{chunk-3JZKWK2V.js → chunk-CX44CQFL.js} +1 -1
  51. package/dist/{chunk-663TS34D.js → chunk-DELISRUH.js} +1 -1
  52. package/dist/{chunk-UFGDNIYX.js → chunk-DI5ZPWNA.js} +1 -1
  53. package/dist/{chunk-QHWF3S7U.js → chunk-DIPTSBQM.js} +1 -1
  54. package/dist/{chunk-235JVI2J.js → chunk-DN3BB4IO.js} +2 -2
  55. package/dist/{chunk-FJOEHMXM.js → chunk-DZMXYETH.js} +1 -1
  56. package/dist/{chunk-P375IGKT.js → chunk-EAOT5CK5.js} +1 -1
  57. package/dist/{chunk-YYLEWVO6.js → chunk-EEEKSYWV.js} +1 -1
  58. package/dist/{chunk-N5YIZJ4S.js → chunk-EOJNSPIH.js} +1 -1
  59. package/dist/{chunk-YF4HKJB5.js → chunk-FSVSM57K.js} +1 -1
  60. package/dist/{chunk-PK6NOLT5.js → chunk-G6BFXMOV.js} +1 -1
  61. package/dist/{chunk-UTLRP527.js → chunk-GMAZ2BQY.js} +1 -1
  62. package/dist/{chunk-QAM7VCLV.js → chunk-HOAVZLEG.js} +1 -1
  63. package/dist/{chunk-A2O3MBPH.js → chunk-HQE5B2CF.js} +1 -1
  64. package/dist/{chunk-XZWAX4FI.js → chunk-HSVZU7MP.js} +1 -1
  65. package/dist/{chunk-N625VE5T.js → chunk-HYF3VJYS.js} +1 -1
  66. package/dist/{chunk-7ZIO3X22.js → chunk-I5X3IP6T.js} +1 -1
  67. package/dist/{chunk-UTPJAU5S.js → chunk-ICRQZAXP.js} +1 -1
  68. package/dist/{chunk-AUZCENYI.js → chunk-IIFRDOYG.js} +1 -1
  69. package/dist/{chunk-YJAX22JK.js → chunk-JADXT2DY.js} +1 -1
  70. package/dist/{chunk-VKFDDZD3.js → chunk-JOKLZMTP.js} +1 -1
  71. package/dist/{chunk-KNEF6NAG.js → chunk-K4APB7O3.js} +1 -1
  72. package/dist/{chunk-ROQXPIEZ.js → chunk-KB6H5LQJ.js} +1 -1
  73. package/dist/{chunk-BCEWCYZD.js → chunk-KFUOVO3X.js} +1 -1
  74. package/dist/{chunk-3JAC5SI7.js → chunk-KIAMA3L2.js} +1 -1
  75. package/dist/{chunk-XSXX75VV.js → chunk-KMQE7WFZ.js} +1 -1
  76. package/dist/{chunk-JC3PRJJS.js → chunk-KPNNGJAW.js} +1 -1
  77. package/dist/{chunk-52H2R2FU.js → chunk-KQTVJMV6.js} +1 -1
  78. package/dist/{chunk-7BVXGS44.js → chunk-L42FYXFW.js} +144 -144
  79. package/dist/{chunk-V774I3FW.js → chunk-LGFOE4XL.js} +1 -1
  80. package/dist/{chunk-4EYTWWYF.js → chunk-LSCDB36D.js} +1 -1
  81. package/dist/{chunk-BNX4MZMV.js → chunk-LVLDPYH5.js} +1 -1
  82. package/dist/{chunk-PVD544NN.js → chunk-LXOBFJZO.js} +1 -1
  83. package/dist/{chunk-VNYKNAT5.js → chunk-MC466GSO.js} +2 -2
  84. package/dist/{chunk-32KQKGSY.js → chunk-ML6SILEL.js} +1 -1
  85. package/dist/{chunk-ICHNVDFU.js → chunk-MYQTAM77.js} +1 -1
  86. package/dist/{chunk-H3V6Y5JO.js → chunk-N6IFIMC6.js} +1 -1
  87. package/dist/{chunk-S5JJL3BP.js → chunk-NGCPVRDM.js} +1 -1
  88. package/dist/{chunk-5O7PY44R.js → chunk-NIVGP4LB.js} +1 -1
  89. package/dist/{chunk-HHA322FT.js → chunk-NSADN5S2.js} +47 -47
  90. package/dist/{chunk-CVRAATZ5.js → chunk-NVA2354A.js} +1 -1
  91. package/dist/{chunk-BH34ZLZ4.js → chunk-NWH3TAHK.js} +1 -1
  92. package/dist/{chunk-QRETBFXI.js → chunk-NYG2VQFQ.js} +1 -1
  93. package/dist/{chunk-UJVYIWUI.js → chunk-OC5PD4ID.js} +1 -1
  94. package/dist/{chunk-AP6FNGTA.js → chunk-OCBGHOH2.js} +1 -1
  95. package/dist/{chunk-YT3NPMWK.js → chunk-ODSMT2ZC.js} +1 -1
  96. package/dist/{chunk-DKVU7LYY.js → chunk-OJZT3NA2.js} +1 -1
  97. package/dist/{chunk-ZZ3SMI2A.js → chunk-OMXKQY2L.js} +1 -1
  98. package/dist/{chunk-VUACOGOX.js → chunk-P2SBE77Z.js} +1 -1
  99. package/dist/{chunk-TKW3Z7XL.js → chunk-P6LVSNTT.js} +1 -1
  100. package/dist/{chunk-FA25RL4G.js → chunk-P7OSUECN.js} +1 -1
  101. package/dist/chunk-P7U6BWKN.js +1 -0
  102. package/dist/{chunk-6LTJMYUD.js → chunk-PEYYIWP6.js} +1 -1
  103. package/dist/{chunk-J2ZES5K5.js → chunk-Q7DSLGTN.js} +1 -1
  104. package/dist/{chunk-BU7R7NFL.js → chunk-QEVGRNUE.js} +1 -1
  105. package/dist/{chunk-DQOS54HN.js → chunk-QFXJNFMI.js} +1 -1
  106. package/dist/{chunk-7DYZVU7H.js → chunk-R6A754UW.js} +1 -1
  107. package/dist/{chunk-UEC23KAO.js → chunk-R7QYSC6T.js} +1 -1
  108. package/dist/{chunk-E4GW6OXT.js → chunk-RE652L3G.js} +1 -1
  109. package/dist/{chunk-KESQOMEW.js → chunk-RFOALCVH.js} +1 -1
  110. package/dist/{chunk-5A7EMVAP.js → chunk-RLB5QHWG.js} +1 -1
  111. package/dist/{chunk-RUKK4KXX.js → chunk-RTINXD5Z.js} +1 -1
  112. package/dist/{chunk-HP3NDE7S.js → chunk-SG5TRPJ7.js} +1 -1
  113. package/dist/{chunk-BBATKR3B.js → chunk-SH6Q5CLM.js} +1 -1
  114. package/dist/{chunk-HX3TALXV.js → chunk-SSDEWKDZ.js} +2 -2
  115. package/dist/{chunk-MGPLKG23.js → chunk-SZM6ANMN.js} +1 -1
  116. package/dist/{chunk-V66IHWQO.js → chunk-T35C6NC7.js} +1 -1
  117. package/dist/{chunk-BXDZX3BS.js → chunk-TB7HFPBB.js} +3 -3
  118. package/dist/{chunk-3NMVMCOM.js → chunk-TH6CLNGO.js} +1 -1
  119. package/dist/{chunk-3EQY5B4S.js → chunk-TIU7MMRT.js} +1 -1
  120. package/dist/{chunk-7KHYEIA7.js → chunk-TM44Z7U7.js} +1 -1
  121. package/dist/{chunk-BVHBMOIB.js → chunk-TNUY66EE.js} +1 -1
  122. package/dist/{chunk-G6YOP2SJ.js → chunk-TPGREOWO.js} +1 -1
  123. package/dist/{chunk-4U3NC3UU.js → chunk-TSEPNC3O.js} +1 -1
  124. package/dist/{chunk-TEXYUUTD.js → chunk-TTEY5PLR.js} +1 -1
  125. package/dist/{chunk-RY5CY3ZW.js → chunk-U3MSTPZP.js} +1 -1
  126. package/dist/{chunk-UGGFSV7N.js → chunk-U4HLIXRH.js} +1 -1
  127. package/dist/{chunk-74IG3ZE3.js → chunk-UAYIFFYJ.js} +3 -3
  128. package/dist/chunk-UHIP5CFI.js +1 -0
  129. package/dist/{chunk-H2JU5BGK.js → chunk-UHMRDG6J.js} +1 -1
  130. package/dist/{chunk-XA5JA7DK.js → chunk-UMB4BWCK.js} +1 -1
  131. package/dist/{chunk-UP7H24B3.js → chunk-UMFVRG33.js} +1 -1
  132. package/dist/{chunk-5EVFLUUA.js → chunk-UVIGXZMV.js} +1 -1
  133. package/dist/{chunk-IFVYCKX5.js → chunk-UW6YEKST.js} +1 -1
  134. package/dist/{chunk-BLI7DUNV.js → chunk-V6QZF5YS.js} +1 -1
  135. package/dist/{chunk-57IRHKV3.js → chunk-VCWESQBC.js} +1 -1
  136. package/dist/{chunk-AYSS2ERL.js → chunk-VGSH33QU.js} +1 -1
  137. package/dist/{chunk-6V37CHBZ.js → chunk-VJQJ5PTQ.js} +1 -1
  138. package/dist/{chunk-PFEC2NUB.js → chunk-WDSBR7KX.js} +1 -1
  139. package/dist/{chunk-TGM7L6RV.js → chunk-WN5VTUWJ.js} +1 -1
  140. package/dist/{chunk-7HZG7FBK.js → chunk-WTRKTFVE.js} +1 -1
  141. package/dist/{chunk-4Q54UDO3.js → chunk-X3VG75LO.js} +1 -1
  142. package/dist/{chunk-ZKBWEHIY.js → chunk-XCGV3IJ5.js} +1 -1
  143. package/dist/{chunk-RBOYWA2D.js → chunk-XDV4PRFT.js} +1 -1
  144. package/dist/{chunk-DBBU6OVN.js → chunk-XHTICMA7.js} +1 -1
  145. package/dist/{chunk-ZZWSMRKT.js → chunk-XS7WK4YK.js} +1 -1
  146. package/dist/{chunk-2ROG5NK3.js → chunk-XSUZPWYV.js} +1 -1
  147. package/dist/{chunk-7EOQVQND.js → chunk-XUAAQI5N.js} +1 -1
  148. package/dist/{chunk-WTYH2O47.js → chunk-XXLGM6OZ.js} +1 -1
  149. package/dist/{chunk-S442LGHR.js → chunk-YKNMNGV7.js} +1 -1
  150. package/dist/{chunk-AYKRKE6O.js → chunk-YNX4DT2O.js} +1 -1
  151. package/dist/{chunk-IE4SSSXU.js → chunk-YWQPSMRZ.js} +1 -1
  152. package/dist/{chunk-JZVNNQWE.js → chunk-YXNKDX56.js} +1 -1
  153. package/dist/{chunk-MSJDZLZT.js → chunk-Z33MWGCG.js} +1 -1
  154. package/dist/{chunk-LXZM6Z4F.js → chunk-Z6VNPAY7.js} +1 -1
  155. package/dist/{chunk-O7OQK2OC.js → chunk-ZAN7AZTX.js} +1 -1
  156. package/dist/{chunk-ABCU552E.js → chunk-ZIM2G3EP.js} +1 -1
  157. package/dist/{chunk-U44HRKSU.js → chunk-ZSYMRT3S.js} +1 -1
  158. package/dist/{chunk-TM534QSE.js → chunk-ZT4PUH7L.js} +1 -1
  159. package/dist/{chunk-Z66NZ2HC.js → chunk-ZUWEGJA7.js} +1 -1
  160. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  161. package/dist/cli/commands/app/build.js +1 -1
  162. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  163. package/dist/cli/commands/app/bulk/execute.js +1 -1
  164. package/dist/cli/commands/app/bulk/status.js +1 -1
  165. package/dist/cli/commands/app/config/link.js +1 -1
  166. package/dist/cli/commands/app/config/pull.js +1 -1
  167. package/dist/cli/commands/app/config/use.js +1 -1
  168. package/dist/cli/commands/app/config/validate.js +1 -1
  169. package/dist/cli/commands/app/demo/watcher.js +1 -1
  170. package/dist/cli/commands/app/deploy.js +1 -1
  171. package/dist/cli/commands/app/dev/clean.js +1 -1
  172. package/dist/cli/commands/app/dev.js +1 -1
  173. package/dist/cli/commands/app/env/pull.js +1 -1
  174. package/dist/cli/commands/app/env/show.js +1 -1
  175. package/dist/cli/commands/app/execute.js +1 -1
  176. package/dist/cli/commands/app/function/build.js +1 -1
  177. package/dist/cli/commands/app/function/info.js +1 -1
  178. package/dist/cli/commands/app/function/replay.js +1 -1
  179. package/dist/cli/commands/app/function/run.js +1 -1
  180. package/dist/cli/commands/app/function/schema.js +1 -1
  181. package/dist/cli/commands/app/function/typegen.js +1 -1
  182. package/dist/cli/commands/app/generate/extension.js +1 -1
  183. package/dist/cli/commands/app/graphiql.js +1 -1
  184. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  185. package/dist/cli/commands/app/import-extensions.js +1 -1
  186. package/dist/cli/commands/app/info.js +1 -1
  187. package/dist/cli/commands/app/init.js +1 -1
  188. package/dist/cli/commands/app/logs.js +1 -1
  189. package/dist/cli/commands/app/release.js +1 -1
  190. package/dist/cli/commands/app/versions/list.js +1 -1
  191. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  192. package/dist/cli/commands/auth/login.js +1 -1
  193. package/dist/cli/commands/auth/logout.js +1 -1
  194. package/dist/cli/commands/cache/clear.js +1 -1
  195. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  196. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  197. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  198. package/dist/cli/commands/debug/command-flags.js +1 -1
  199. package/dist/cli/commands/doc/fetch.js +1 -1
  200. package/dist/cli/commands/doc/search.js +1 -1
  201. package/dist/cli/commands/docs/generate.js +1 -1
  202. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  203. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  204. package/dist/cli/commands/help.js +1 -1
  205. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  206. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  207. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  209. package/dist/cli/commands/notifications/generate.js +1 -1
  210. package/dist/cli/commands/notifications/list.js +1 -1
  211. package/dist/cli/commands/organization/list.js +1 -1
  212. package/dist/cli/commands/search.js +1 -1
  213. package/dist/cli/commands/theme/check.js +1 -1
  214. package/dist/cli/commands/theme/console.js +1 -1
  215. package/dist/cli/commands/theme/delete.js +1 -1
  216. package/dist/cli/commands/theme/dev.js +1 -1
  217. package/dist/cli/commands/theme/duplicate.js +1 -1
  218. package/dist/cli/commands/theme/info.js +1 -1
  219. package/dist/cli/commands/theme/init.js +1 -1
  220. package/dist/cli/commands/theme/language-server.js +1 -1
  221. package/dist/cli/commands/theme/list.js +1 -1
  222. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  223. package/dist/cli/commands/theme/open.js +1 -1
  224. package/dist/cli/commands/theme/package.js +1 -1
  225. package/dist/cli/commands/theme/preview.js +1 -1
  226. package/dist/cli/commands/theme/profile.js +1 -1
  227. package/dist/cli/commands/theme/publish.js +1 -1
  228. package/dist/cli/commands/theme/pull.js +1 -1
  229. package/dist/cli/commands/theme/push.js +1 -1
  230. package/dist/cli/commands/theme/rename.js +1 -1
  231. package/dist/cli/commands/theme/share.js +1 -1
  232. package/dist/cli/commands/upgrade.js +1 -1
  233. package/dist/cli/commands/version.js +1 -1
  234. package/dist/command-registry.js +1 -1
  235. package/dist/{conf-store-V6ILVUUO.js → conf-store-HOA62HKK.js} +1 -1
  236. package/dist/configs/all.yml +3 -0
  237. package/dist/configs/recommended.yml +3 -0
  238. package/dist/data/filters.json +1 -1
  239. package/dist/data/objects.json +30 -3
  240. package/dist/data/shopify_system_translations.json +48 -4
  241. package/dist/{deprecations-MOEFN6OW.js → deprecations-2FTB7JEW.js} +1 -1
  242. package/dist/{dist-E6QKEULH.js → dist-63JMGNUL.js} +1 -1
  243. package/dist/dist-6TY6L7OW.js +1 -0
  244. package/dist/{environments-5KA3OBIZ.js → environments-XVYTKHRZ.js} +1 -1
  245. package/dist/{error-NYYI6HVX.js → error-SDU6RPQQ.js} +1 -1
  246. package/dist/{error-handler-BOESDKZA.js → error-handler-4YEBBCUH.js} +1 -1
  247. package/dist/{fs-XE6SBVBF.js → fs-B4UJTUCD.js} +1 -1
  248. package/dist/hooks/app-init.js +1 -1
  249. package/dist/hooks/did-you-mean.js +1 -1
  250. package/dist/hooks/hydrogen-init.js +1 -1
  251. package/dist/hooks/postrun.js +1 -1
  252. package/dist/hooks/prerun.js +1 -1
  253. package/dist/hooks/public-metadata.js +1 -1
  254. package/dist/hooks/sensitive-metadata.js +1 -1
  255. package/dist/hooks/tunnel-provider.js +1 -1
  256. package/dist/hooks/tunnel-start.js +1 -1
  257. package/dist/index.js +1 -1
  258. package/dist/{is-global-JOHCPSKZ.js → is-global-5LFZDDNH.js} +1 -1
  259. package/dist/{local-BTQDUX72.js → local-VTYGIJVD.js} +1 -1
  260. package/dist/{local-storage-WUSIVDTQ.js → local-storage-A6NBLBB2.js} +1 -1
  261. package/dist/{metadata-APVOKTBV.js → metadata-FREAI3KR.js} +1 -1
  262. package/dist/{node-package-manager-AC34ZJZD.js → node-package-manager-N5SUT2WN.js} +1 -1
  263. package/dist/notifications-system-P3SUTD25.js +1 -0
  264. package/dist/{output-EAPQ7OWD.js → output-VUR2QZPW.js} +1 -1
  265. package/dist/{system-D7CH26HU.js → system-OXF2P5CT.js} +1 -1
  266. package/dist/tsconfig.tsbuildinfo +1 -1
  267. package/dist/{ui-AXZBGWIQ.js → ui-N2C5FC3G.js} +1 -1
  268. package/dist/upgrade-AJ36IT7H.js +1 -0
  269. package/dist/{version-FAU37PQN.js → version-DSFP332V.js} +1 -1
  270. package/dist/version-HUOO3XOE.js +1 -0
  271. package/dist/{workerd-XXPWKQOM.js → workerd-KPQTFQD4.js} +1 -1
  272. package/oclif.manifest.json +20 -2
  273. package/package.json +8 -8
  274. package/dist/chunk-63NFEXJR.js +0 -275
  275. package/dist/chunk-E64BQS4D.js +0 -1
  276. package/dist/chunk-PLHJQQVZ.js +0 -1
  277. package/dist/chunk-Q3WOWDUU.js +0 -1
  278. package/dist/chunk-Z2Y6G2QF.js +0 -1
  279. package/dist/dist-2BL5GGMG.js +0 -1
  280. package/dist/notifications-system-4ODOESG2.js +0 -1
  281. package/dist/upgrade-SLPJF6LD.js +0 -1
  282. package/dist/version-3IYH4V5U.js +0 -1
  283. /package/dist/{morph-CG6HEMCQ.js → morph-QZGREMO2.js} +0 -0
@@ -1 +1 @@
1
- import{c as m,d as f,e as p}from"./chunk-J2ZES5K5.js";import{d as c,f as w,j as T}from"./chunk-7ZIO3X22.js";import{g as d}from"./chunk-JGN7YG5X.js";import{B as u}from"./chunk-YYLEWVO6.js";import{d as l}from"./chunk-AUZCENYI.js";import{U as i}from"./chunk-BXDZX3BS.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
1
+ import{c as m,d as f,e as p}from"./chunk-Q7DSLGTN.js";import{d as c,f as w,j as T}from"./chunk-I5X3IP6T.js";import{g as d}from"./chunk-4P54DKG4.js";import{B as u}from"./chunk-EEEKSYWV.js";import{d as l}from"./chunk-IIFRDOYG.js";import{U as i}from"./chunk-TB7HFPBB.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
@@ -1 +1 @@
1
- import{K as i}from"./chunk-YYLEWVO6.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
1
+ import{K as i}from"./chunk-EEEKSYWV.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
@@ -1 +1 @@
1
- import{b as u,c as h,f}from"./chunk-KJQAJUDU.js";import{O as c}from"./chunk-YYLEWVO6.js";import{d as e}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function s(n){if(n.features.includes("function")&&n.isJavaScript){let r=await f(n);return u(r.functionRunner)}return u()}function d(n){return n.configuration.build?.path?e(n.directory,n.configuration.build.path):n.outputPath}async function g(n){let r=n.functionExtension,i=await s(r);await h(i);let t=[];n.inputPath&&t.push("--input",n.inputPath),n.export&&t.push("--export",n.export),n.json&&t.push("--json"),n.schemaPath&&n.queryPath&&(t.push("--schema-path",n.schemaPath),t.push("--query-path",n.queryPath));let o=d(r);return c(i.path,["-f",o,...t],{cwd:n.functionExtension.directory,stdin:n.stdin,stdout:n.stdout??"inherit",stderr:n.stderr??"inherit",input:n.input})}export{g as a};
1
+ import{b as u,c as h,f}from"./chunk-4MLEL3VK.js";import{O as c}from"./chunk-EEEKSYWV.js";import{d as e}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function s(n){if(n.features.includes("function")&&n.isJavaScript){let r=await f(n);return u(r.functionRunner)}return u()}function d(n){return n.configuration.build?.path?e(n.directory,n.configuration.build.path):n.outputPath}async function g(n){let r=n.functionExtension,i=await s(r);await h(i);let t=[];n.inputPath&&t.push("--input",n.inputPath),n.export&&t.push("--export",n.export),n.json&&t.push("--json"),n.schemaPath&&n.queryPath&&(t.push("--schema-path",n.schemaPath),t.push("--query-path",n.queryPath));let o=d(r);return c(i.path,["-f",o,...t],{cwd:n.functionExtension.directory,stdin:n.stdin,stdout:n.stdout??"inherit",stderr:n.stderr??"inherit",input:n.input})}export{g as a};
@@ -1 +1 @@
1
- import{Fa as x,p as A}from"./chunk-KJQAJUDU.js";import{B as F}from"./chunk-YYLEWVO6.js";import{d as s}from"./chunk-AUZCENYI.js";import{Hb as f,Lb as I,Mb as P,Ta as p,ua as v}from"./chunk-BXDZX3BS.js";import{a as S}from"./chunk-MGPLKG23.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{r as D}from"./chunk-T6CC5WUU.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
1
+ import{Fa as x,p as A}from"./chunk-4MLEL3VK.js";import{B as F}from"./chunk-EEEKSYWV.js";import{d as s}from"./chunk-IIFRDOYG.js";import{Hb as f,Lb as I,Mb as P,Ta as p,ua as v}from"./chunk-TB7HFPBB.js";import{a as S}from"./chunk-SZM6ANMN.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{r as D}from"./chunk-T6CC5WUU.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
@@ -1,4 +1,4 @@
1
- import{b as we}from"./chunk-UFGDNIYX.js";import{a as he,c as ye}from"./chunk-ICXHUPP5.js";import{b as ue}from"./chunk-6LTJMYUD.js";import{a as Fe}from"./chunk-PLHJQQVZ.js";import{Ca as Re,Fa as Le,G as ve,L as Pe,O as Ae,Q as ke,ca as Ce,ea as xe,h as ge}from"./chunk-KJQAJUDU.js";import{$ as G,da as Ie,o as be}from"./chunk-UEC23KAO.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-HX3TALXV.js";import{a as U}from"./chunk-Q3WOWDUU.js";import{b as de}from"./chunk-S5JJL3BP.js";import{b as X}from"./chunk-BU7R7NFL.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-YYLEWVO6.js";import{d as pe}from"./chunk-N5U5Q2MG.js";import{d as f}from"./chunk-AUZCENYI.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-BXDZX3BS.js";import{e as fe}from"./chunk-MGPLKG23.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{r as De}from"./chunk-T6CC5WUU.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=we(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
1
+ import{b as we}from"./chunk-DI5ZPWNA.js";import{a as he,c as ye}from"./chunk-75DBVSVI.js";import{b as ue}from"./chunk-PEYYIWP6.js";import{a as Fe}from"./chunk-UHIP5CFI.js";import{Ca as Re,Fa as Le,G as ve,L as Pe,O as Ae,Q as ke,ca as Ce,ea as xe,h as ge}from"./chunk-4MLEL3VK.js";import{$ as G,da as Ie,o as be}from"./chunk-R7QYSC6T.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-SSDEWKDZ.js";import{a as U}from"./chunk-B5MFFERE.js";import{b as de}from"./chunk-NGCPVRDM.js";import{b as X}from"./chunk-QEVGRNUE.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-EEEKSYWV.js";import{d as pe}from"./chunk-7AY6HLQG.js";import{d as f}from"./chunk-IIFRDOYG.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-TB7HFPBB.js";import{e as fe}from"./chunk-SZM6ANMN.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{r as De}from"./chunk-T6CC5WUU.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=we(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
2
  Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await V(async i=>{let d=p(i,"download"),m=o.filePath?p(d,o.filePath):d,u=p(i,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await K(d);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:d,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(m,u,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let l=(await re(u)).content;l.name=a,l.author=await se()??"",l.private=!0;let v=["extensions/*"].concat(We(u));switch(t){case"npm":case"yarn":case"bun":l.workspaces=v;break;case"pnpm":{await qe(u,v),await _(p(u,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new ae}await _e({packageJSON:l,local:e.local,directory:u,useGlobalCLI:e.useGlobalCLI}),await ie(u,l)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let l=p(u,".gitignore");if(await C(l)){let v=await Y(l);R.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await $(l,v.trim())}}}),await fe()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let l=p(u,".npmrc");await _(l,`@shopify:registry=https://registry.npmjs.org
4
4
  `)}});let M=!1;w.push({title:"Preparing project directory",task:async()=>{await Se(r,a),M=!0,await W(u,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await $e({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await j(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await me(w)}catch(l){throw M&&await I(r).catch(()=>{}),l}});let n;if(e.selectedAppOrNameResult.result==="new"){let i=await ve(r,e.name),d=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(d,i)}else n=e.selectedAppOrNameResult.app;await Re({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return ce({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(t,"shopify app generate extension")}],["To see your app, run",{command:L(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(t,"shopify app","--help")}]]}),{app:s.app}}async function Se(e,t){if(await C(e))throw new f(`
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as e}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
1
+ import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-ZT4PUH7L.js";import{b as r}from"./chunk-UAYIFFYJ.js";import{u as e}from"./chunk-EEEKSYWV.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-PLHJQQVZ.js";import{a as E}from"./chunk-6V37CHBZ.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-KJQAJUDU.js";import{b as I}from"./chunk-S5JJL3BP.js";import{D as A,v,x as h}from"./chunk-YYLEWVO6.js";import{d as w}from"./chunk-N5U5Q2MG.js";import{f as k}from"./chunk-AUZCENYI.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
1
+ import{a as C}from"./chunk-UHIP5CFI.js";import{a as E}from"./chunk-VJQJ5PTQ.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-4MLEL3VK.js";import{b as I}from"./chunk-NGCPVRDM.js";import{D as A,v,x as h}from"./chunk-EEEKSYWV.js";import{d as w}from"./chunk-7AY6HLQG.js";import{f as k}from"./chunk-IIFRDOYG.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
2
2
  ${r.message}`:""];if(i.userErrors&&i.userErrors.length>0){let t=i.userErrors?.map(R=>R.message).join(", ");h({headline:"Version couldn't be released.",body:[...u,`${u.length>0?`
3
3
 
4
4
  `:""}${t}`]})}else v({headline:"Version released to users.",body:u})}var p=T(b(),1);var g,s=class extends C{async run(){let{flags:e}=await this.parse(g),m=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],a=e["allow-deletes"],r=!!(o&&a),l=[];!o&&!a&&l.push("allow-updates"),this.failMissingNonTTYFlags(e,l);let{app:c,remoteApp:f,developerPlatformClient:i}=await y({directory:e.path,clientId:m,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:c,remoteApp:f,developerPlatformClient:i,force:r,allowUpdates:o,allowDeletes:a,version:e.version}),{app:c}}};g=s;s.summary="Release an app version.";s.usage="app release --version <version>";s.descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";s.description=g.descriptionWithoutMarkdown();s.flags={...I,...E,"allow-updates":p.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":p.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"}),version:p.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};var G=s;export{G as a};
@@ -1,4 +1,4 @@
1
- import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";import{R as _}from"./chunk-YYLEWVO6.js";import{d as T}from"./chunk-N5U5Q2MG.js";import{d}from"./chunk-AUZCENYI.js";import{Fb as h,Hb as g,Lb as P,aa as E}from"./chunk-BXDZX3BS.js";import{c as O}from"./chunk-MGPLKG23.js";import{a as b}from"./chunk-NNOSZ447.js";import{r as I}from"./chunk-T6CC5WUU.js";import{e as S,g as w}from"./chunk-VKWPEFWQ.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-BOESDKZA.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-BOESDKZA.js");await r(this.config)}await x(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-4ODOESG2.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-AXZBGWIQ.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(`
1
+ import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";import{R as _}from"./chunk-EEEKSYWV.js";import{d as T}from"./chunk-7AY6HLQG.js";import{d}from"./chunk-IIFRDOYG.js";import{Fb as h,Hb as g,Lb as P,aa as E}from"./chunk-TB7HFPBB.js";import{c as O}from"./chunk-SZM6ANMN.js";import{a as b}from"./chunk-NNOSZ447.js";import{r as I}from"./chunk-T6CC5WUU.js";import{e as S,g as w}from"./chunk-VKWPEFWQ.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-4YEBBCUH.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-4YEBBCUH.js");await r(this.config)}await x(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-P3SUTD25.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-N2C5FC3G.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
2
  SHOPIFY_CLI_TIMESTAMP_START
3
3
  { "timestamp": ${Date.now()} }
4
4
  SHOPIFY_CLI_TIMESTAMP_END
@@ -6,6 +6,6 @@ import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";
6
6
 
7
7
  ${h.cyan(e)}
8
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-5KA3OBIZ.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-5KA3OBIZ.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-AXZBGWIQ.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-AXZBGWIQ.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:
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-XVYTKHRZ.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-XVYTKHRZ.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-N2C5FC3G.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-N2C5FC3G.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
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{a as o}from"./chunk-4ROX2TCK.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as V}from"./chunk-N5YIZJ4S.js";import{a as N}from"./chunk-F447QKVX.js";import{a as F}from"./chunk-7KHYEIA7.js";import{k as q,l as H,n as I}from"./chunk-235JVI2J.js";import{a as Y}from"./chunk-LMPD55L6.js";import{a as y,c as U}from"./chunk-H3V6Y5JO.js";import{b as L}from"./chunk-AP6FNGTA.js";import{a as p,b as w}from"./chunk-STJ3LWFL.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-7ZIO3X22.js";import{r as k}from"./chunk-JGN7YG5X.js";import{aa as B}from"./chunk-7BVXGS44.js";import{O as b,ua as a,va as O}from"./chunk-3EQY5B4S.js";import{A as P,v as f,w as d,x as C}from"./chunk-YYLEWVO6.js";import{d as S}from"./chunk-AUZCENYI.js";import{Lb as $}from"./chunk-BXDZX3BS.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
1
+ import{a as V}from"./chunk-EOJNSPIH.js";import{a as N}from"./chunk-5VC4XXYH.js";import{a as F}from"./chunk-TM44Z7U7.js";import{k as q,l as H,n as I}from"./chunk-DN3BB4IO.js";import{a as Y}from"./chunk-2ACN7JIZ.js";import{a as y,c as U}from"./chunk-N6IFIMC6.js";import{b as L}from"./chunk-OCBGHOH2.js";import{a as p,b as w}from"./chunk-STJ3LWFL.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-I5X3IP6T.js";import{r as k}from"./chunk-4P54DKG4.js";import{aa as B}from"./chunk-L42FYXFW.js";import{O as b,ua as a,va as O}from"./chunk-TIU7MMRT.js";import{A as P,v as f,w as d,x as C}from"./chunk-EEEKSYWV.js";import{d as S}from"./chunk-IIFRDOYG.js";import{Lb as $}from"./chunk-TB7HFPBB.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -1,4 +1,4 @@
1
- import{p as _,v as R}from"./chunk-JGN7YG5X.js";import{c as g,l as P}from"./chunk-ICXHUPP5.js";import{b as N}from"./chunk-S5JJL3BP.js";import{D as w,F as v,R as L,w as T,z as C}from"./chunk-YYLEWVO6.js";import{d as F}from"./chunk-AUZCENYI.js";import{Aa as I,Ca as k,Ta as A,Va as E,ka as b,ma as f,ua as y}from"./chunk-BXDZX3BS.js";import{d as r}from"./chunk-773TIA5M.js";import{r as H}from"./chunk-T6CC5WUU.js";import{e as D,g as d}from"./chunk-VKWPEFWQ.js";d();d();var h="https://github.com/Shopify/skeleton-theme.git",q="https://github.com/Shopify/theme-liquid-docs.git",S={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function G(t,e){await U(t,e)}async function O(t,e){await U(t,e,!0)}async function U(t,e,o){await w([{title:`Cloning ${t} into ${e}`,task:async()=>{await g({repoUrl:t,destination:e,latestTag:o,shallow:!0}),await P(e),t===h&&(await Promise.all(Object.keys(S).map(async c=>x(r(e,`.${c}`)))),await x(r(e,".git")))}}])}async function x(t){await A(t)&&await k(t)}async function M(){return await C({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(S).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function $(t,e){let o=[];await w([{title:`Adding AI instructions into ${t}`,task:async()=>{await b(async c=>{await g({repoUrl:q,destination:c,shallow:!0});let l=e==="all"?Object.keys(S).filter(a=>a!=="all"):[e];try{let a=r(c,"ai","github","copilot-instructions.md"),s=await f(a),n=r(t,"AGENTS.md"),u=`# AGENTS.md
1
+ import{p as _,v as R}from"./chunk-4P54DKG4.js";import{c as g,l as P}from"./chunk-75DBVSVI.js";import{b as N}from"./chunk-NGCPVRDM.js";import{D as w,F as v,R as L,w as T,z as C}from"./chunk-EEEKSYWV.js";import{d as F}from"./chunk-IIFRDOYG.js";import{Aa as I,Ca as k,Ta as A,Va as E,ka as b,ma as f,ua as y}from"./chunk-TB7HFPBB.js";import{d as r}from"./chunk-773TIA5M.js";import{r as H}from"./chunk-T6CC5WUU.js";import{e as D,g as d}from"./chunk-VKWPEFWQ.js";d();d();var h="https://github.com/Shopify/skeleton-theme.git",q="https://github.com/Shopify/theme-liquid-docs.git",S={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function G(t,e){await U(t,e)}async function O(t,e){await U(t,e,!0)}async function U(t,e,o){await w([{title:`Cloning ${t} into ${e}`,task:async()=>{await g({repoUrl:t,destination:e,latestTag:o,shallow:!0}),await P(e),t===h&&(await Promise.all(Object.keys(S).map(async c=>x(r(e,`.${c}`)))),await x(r(e,".git")))}}])}async function x(t){await A(t)&&await k(t)}async function M(){return await C({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(S).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function $(t,e){let o=[];await w([{title:`Adding AI instructions into ${t}`,task:async()=>{await b(async c=>{await g({repoUrl:q,destination:c,shallow:!0});let l=e==="all"?Object.keys(S).filter(a=>a!=="all"):[e];try{let a=r(c,"ai","github","copilot-instructions.md"),s=await f(a),n=r(t,"AGENTS.md"),u=`# AGENTS.md
2
2
 
3
3
  ${s}`;await y(n,u),(await Promise.all(l.map(p=>W(t,n,p)))).forEach(p=>{p.copiedFile&&o.push(p.copiedFile)})}catch{throw new F("Failed to create AI instructions")}})}}]),o.length>0&&T({headline:"Files created instead of symlinks.",body:`Shopify CLI attempted to create symbolic links between AGENTS.md and ${o.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`})}async function W(t,e,o){if(o==="cursor")return{};let l={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],a=r(t,l);try{return await I(e,a),{}}catch(s){if(s instanceof Error){let n=await f(e);return await y(a,n),{copiedFile:l}}else throw s}}var m=D(H(),1);var j,i=class extends R{async command(e,o,c,l){let a=l.name??await this.promptName(e.path),s=e["clone-url"],n=r(e.path,a);if(e.latest?await O(s,n):await G(s,n),!L())return;let u=await M();u&&await $(n,u)}async promptName(e){let o=await E({suffix:"theme",directory:e,family:"creative"});return v({message:"Name of the new theme",defaultValue:o})}};j=i;i.summary="Clones a Git repository to use as a starting point for building a new theme.";i.descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as te,b as ne}from"./chunk-ROQXPIEZ.js";import{c as Y}from"./chunk-ICXHUPP5.js";import{b as E}from"./chunk-6LTJMYUD.js";import{a as ee}from"./chunk-PLHJQQVZ.js";import{a as W}from"./chunk-6V37CHBZ.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-KJQAJUDU.js";import{f as H,h as J}from"./chunk-UEC23KAO.js";import{a as T}from"./chunk-2MDFREEW.js";import{C as R,p as F,x as L,y as P}from"./chunk-HX3TALXV.js";import{b as V}from"./chunk-S5JJL3BP.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-YYLEWVO6.js";import{d as y}from"./chunk-AUZCENYI.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-BXDZX3BS.js";import{e as $}from"./chunk-MGPLKG23.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{r as me}from"./chunk-T6CC5WUU.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await E(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await E(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await E(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
1
+ import{a as te,b as ne}from"./chunk-KB6H5LQJ.js";import{c as Y}from"./chunk-75DBVSVI.js";import{b as E}from"./chunk-PEYYIWP6.js";import{a as ee}from"./chunk-UHIP5CFI.js";import{a as W}from"./chunk-VJQJ5PTQ.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-4MLEL3VK.js";import{f as H,h as J}from"./chunk-R7QYSC6T.js";import{a as T}from"./chunk-7PVNAILK.js";import{C as R,p as F,x as L,y as P}from"./chunk-SSDEWKDZ.js";import{b as V}from"./chunk-NGCPVRDM.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-EEEKSYWV.js";import{d as y}from"./chunk-IIFRDOYG.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-TB7HFPBB.js";import{e as $}from"./chunk-SZM6ANMN.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{r as me}from"./chunk-T6CC5WUU.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await E(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await E(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await E(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
2
2
  The following extension types are supported: ${s.join(", ")}`,o)}if(le(t,a,n))throw new y(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${n.type} per app`);return n}var pe=ke;var x=fe(me(),1);var O,m=class extends ee{async run(){let{flags:t}=await this.parse(O);await T.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await B(t.path);let{app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}=await Z({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}),{app:r}}};O=m;m.summary="Generate a new app Extension.";m.descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
3
3
 
4
4
  Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
@@ -1,4 +1,4 @@
1
- import{a as u}from"./chunk-F447QKVX.js";import{a as y}from"./chunk-7KHYEIA7.js";import{a as w}from"./chunk-H3V6Y5JO.js";import{a as c,b as v}from"./chunk-STJ3LWFL.js";import{p as d,v as f}from"./chunk-JGN7YG5X.js";import{b as s}from"./chunk-S5JJL3BP.js";import{J as h,u as p}from"./chunk-YYLEWVO6.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as I,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function F(o,t){let i=new u(o),E=(await(t.development?i.find():i.fetch()))?.id,n=await y(o,{header:"Select a theme to open",filter:{live:t.live,theme:t.development?`${E}`:t.theme}}),l=c(n,o),a=v(n,o);p({body:["Preview information for theme",...w(n),`
1
+ import{a as u}from"./chunk-5VC4XXYH.js";import{a as y}from"./chunk-TM44Z7U7.js";import{a as w}from"./chunk-N6IFIMC6.js";import{a as c,b as v}from"./chunk-STJ3LWFL.js";import{p as d,v as f}from"./chunk-4P54DKG4.js";import{b as s}from"./chunk-NGCPVRDM.js";import{J as h,u as p}from"./chunk-EEEKSYWV.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as I,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function F(o,t){let i=new u(o),E=(await(t.development?i.find():i.fetch()))?.id,n=await y(o,{header:"Select a theme to open",filter:{live:t.live,theme:t.development?`${E}`:t.theme}}),l=c(n,o),a=v(n,o);p({body:["Preview information for theme",...w(n),`
2
2
 
3
3
  `,{list:{items:[{link:{label:"Preview your theme",url:l}},{link:{label:"Customize your theme at the theme editor",url:a}}]}}]}),t.editor?await h(a):await h(l)}var r=I(O(),1);var g,e=class extends f{async command(t,i){await F(i,t)}};g=e;e.summary="Opens the preview of your remote theme.";e.descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:
4
4
 
@@ -1 +1 @@
1
- import{a as i}from"./chunk-RUKK4KXX.js";import{b as e}from"./chunk-74IG3ZE3.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
1
+ import{a as i}from"./chunk-RTINXD5Z.js";import{b as e}from"./chunk-UAYIFFYJ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-CVRAATZ5.js";import{a as m}from"./chunk-PLHJQQVZ.js";import{a as p}from"./chunk-6V37CHBZ.js";import{Fa as s}from"./chunk-KJQAJUDU.js";import{b as n}from"./chunk-S5JJL3BP.js";import{Lb as r}from"./chunk-BXDZX3BS.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o,t=class extends m{async run(){let{flags:a}=await this.parse(o),{app:e,remoteApp:l,organization:c}=await s({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config});return r(await d(e,l,c)),{app:e}}};o=t;t.summary="Display app and extensions environment variables.";t.descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";t.description=o.descriptionWithoutMarkdown();t.flags={...n,...p};var w=t;export{w as a};
1
+ import{a as d}from"./chunk-NVA2354A.js";import{a as m}from"./chunk-UHIP5CFI.js";import{a as p}from"./chunk-VJQJ5PTQ.js";import{Fa as s}from"./chunk-4MLEL3VK.js";import{b as n}from"./chunk-NGCPVRDM.js";import{Lb as r}from"./chunk-TB7HFPBB.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o,t=class extends m{async run(){let{flags:a}=await this.parse(o),{app:e,remoteApp:l,organization:c}=await s({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config});return r(await d(e,l,c)),{app:e}}};o=t;t.summary="Display app and extensions environment variables.";t.descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";t.description=o.descriptionWithoutMarkdown();t.flags={...n,...p};var w=t;export{w as a};
@@ -1,4 +1,4 @@
1
- import{H,S as U}from"./chunk-KJQAJUDU.js";import{a as G}from"./chunk-VJEKDBGZ.js";import{f as T}from"./chunk-UEC23KAO.js";import{b as D,l as O,s as k}from"./chunk-YYLEWVO6.js";import{d as N}from"./chunk-AUZCENYI.js";import{Ca as P,Pb as u,Ta as A,Ua as I,bb as _,na as R,wa as w}from"./chunk-BXDZX3BS.js";import{f as S}from"./chunk-MGPLKG23.js";import{d as x,e as E,g as F,i as C}from"./chunk-773TIA5M.js";import{e as q,g as m}from"./chunk-VKWPEFWQ.js";m();function b(){return process.hrtime()}function M(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}m();m();var $=q(G(),1),K=200,Q=6e4,L=200,Y=500,v=class{constructor(t,s,i=K){this.currentEvents=[],this.extensionPaths=[],this.ignored={},this.extensionWatchedFiles=new Map,this.emitEvents=()=>{let e=this.currentEvents;this.currentEvents=[];let n=`\u{1F509} ${e.length} EVENTS EMITTED in files: ${e.map(o=>o.path).join(`
1
+ import{H,S as U}from"./chunk-4MLEL3VK.js";import{a as G}from"./chunk-VJEKDBGZ.js";import{f as T}from"./chunk-R7QYSC6T.js";import{b as D,l as O,s as k}from"./chunk-EEEKSYWV.js";import{d as N}from"./chunk-IIFRDOYG.js";import{Ca as P,Pb as u,Ta as A,Ua as I,bb as _,na as R,wa as w}from"./chunk-TB7HFPBB.js";import{f as S}from"./chunk-SZM6ANMN.js";import{d as x,e as E,g as F,i as C}from"./chunk-773TIA5M.js";import{e as q,g as m}from"./chunk-VKWPEFWQ.js";m();function b(){return process.hrtime()}function M(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}m();m();var $=q(G(),1),K=200,Q=6e4,L=200,Y=500,v=class{constructor(t,s,i=K){this.currentEvents=[],this.extensionPaths=[],this.ignored={},this.extensionWatchedFiles=new Map,this.emitEvents=()=>{let e=this.currentEvents;this.currentEvents=[];let n=`\u{1F509} ${e.length} EVENTS EMITTED in files: ${e.map(o=>o.path).join(`
2
2
  `)}`;u(n,this.options.stdout),this.onChangeCallback?.(e)},this.handleFileEvent=(e,n)=>{let o=b(),d=E(n),h=n===this.app.configPath,l=n.endsWith(".extension.toml");if(u(`\u{1F300}: ${e} ${n.replace(this.app.directory,"")}
3
3
  `),h)this.handleEventForExtension(e,n,this.app.directory,o,!1);else{let a=this.extensionWatchedFiles.get(d),p=a===void 0||a.size===0;if(p&&e==="add"&&!l){let c=this.discoverFileOwners(d);c.size>0&&(this.extensionWatchedFiles.set(d,c),a=c,p=!1)}if(p&&!l&&!h){u(`\u{1F300}: File ${n} is not watched by any extension`,this.options.stdout);return}for(let c of a??[]){let g=this.app.realExtensions.find(X=>X.handle===c),y=g?E(g.directory):this.app.directory;this.handleEventForExtension(e,n,y,o,!1,c)}p&&this.handleEventForExtension(e,n,this.app.directory,o,!0)}this.debouncedEmit()},this.close=()=>{this.watcher&&(u("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>u("File watching closed",this.options.stdout)).catch(e=>u(`File watching failed to close: ${e.message}`,this.options.stderr)))},this.app=t,this.options=s,this.debouncedEmit=k(this.emitEvents.bind(this),i,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let s=[...this.app.configuration.extension_directories??["extensions"]].map(o=>x(this.app.directory,o));await Promise.all(s.map(async o=>{try{await w(o.replace(/\/\*+$/,""))}catch{}}));let i=[this.app.configPath,...s],e=this.getAllWatchedFiles();i.push(...e),this.close();let{default:n}=await import("./chokidar-VDIVGBZH.js");this.watcher=n.watch(i,{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),u(`File watcher started with ${i.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(s=>E(s.directory)).filter(s=>s!==this.app.directory),this.extensionPaths.forEach(s=>{var i;(i=this.ignored)[s]??(i[s]=this.createIgnoreInstance(s))})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(i=>({extension:i,watchedFiles:i.watchedFiles()})),s=new Set;for(let{extension:i,watchedFiles:e}of t)for(let n of e){let o=E(n);s.add(o);let d=this.extensionWatchedFiles.get(o)??new Set;d.add(i.handle),this.extensionWatchedFiles.set(o,d)}return Array.from(s)}pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(s=>s.path===t.path&&s.type===t.type&&s.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(E(t.path))?.has(t.extensionHandle))return!1;let i=(t.extensionHandle?this.app.realExtensions.find(n=>n.handle===t.extensionHandle):void 0)?.watchedFiles(),e=this.ignored[t.extensionPath];if(i)return!i.some(o=>_(t.path,o));if(e){let n=F(t.extensionPath,t.path);return e.ignores(n)}return!1}discoverFileOwners(t){let s=new Set;for(let i of this.app.realExtensions){let e=E(i.directory);e!==this.app.directory&&t.startsWith(`${e}/`)&&this.pathMatchesWatchPatterns(t,i)&&s.add(i.handle)}return s}pathMatchesWatchPatterns(t,s){let{paths:i,ignore:e}=s.watchPatterns(),n=F(E(s.directory),t);return e.some(o=>_(n,o))?!1:i.some(o=>_(n,o))}handleEventForExtension(t,s,i,e,n,o){let d=s.endsWith(".extension.toml"),h=s===this.app.configPath;switch(t){case"change":if(n)break;d||h?this.pushEvent({type:"extensions_config_updated",path:s,extensionPath:i,extensionHandle:o,startTime:e}):this.pushEvent({type:"file_updated",path:s,extensionPath:i,extensionHandle:o,startTime:e});break;case"add":if(!d){this.pushEvent({type:"file_created",path:s,extensionPath:i,extensionHandle:o,startTime:e});break}let l=0,a=C(s),p=setInterval(()=>{I(x(a,T.lockFile))?(u(`Waiting for extension to complete creation: ${s}
4
4
  `),l+=L):(clearInterval(p),this.extensionPaths.push(a),this.pushEvent({type:"extension_folder_created",path:a,extensionPath:i,startTime:e}),this.debouncedEmit()),l>=Q&&(clearInterval(p),this.options.stderr.write(`Error loading new extension at path: ${s}.
@@ -1,4 +1,4 @@
1
- import{a as i}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as e}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Enable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Enable automatic upgrades for Shopify CLI.
1
+ import{a as i}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-ZT4PUH7L.js";import{b as r}from"./chunk-UAYIFFYJ.js";import{u as e}from"./chunk-EEEKSYWV.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Enable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Enable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version once per day. Major version upgrades are skipped and must be done manually.
4
4
 
@@ -1 +1 @@
1
- import{z as r}from"./chunk-3EQY5B4S.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{r as o}from"./chunk-T6CC5WUU.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
1
+ import{z as r}from"./chunk-TIU7MMRT.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{r as o}from"./chunk-T6CC5WUU.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk-H2JU5BGK.js";import{p as r,q as m,v as a}from"./chunk-JGN7YG5X.js";import{ua as i}from"./chunk-3EQY5B4S.js";import{b as s,c as h}from"./chunk-S5JJL3BP.js";import{r as v}from"./chunk-T6CC5WUU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
1
+ import{a as l}from"./chunk-UHMRDG6J.js";import{p as r,q as m,v as a}from"./chunk-4P54DKG4.js";import{ua as i}from"./chunk-TIU7MMRT.js";import{b as s,c as h}from"./chunk-NGCPVRDM.js";import{r as v}from"./chunk-T6CC5WUU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
4
4
 
@@ -1 +1 @@
1
- import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-TM534QSE.js";import{d as p,g as F}from"./chunk-AUZCENYI.js";import{Fb as V,Hb as h}from"./chunk-BXDZX3BS.js";import{j as q}from"./chunk-NNOSZ447.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??(s=await b(e,n));let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
1
+ import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-TIU7MMRT.js";import{b as l}from"./chunk-ZT4PUH7L.js";import{d as p,g as F}from"./chunk-IIFRDOYG.js";import{Fb as V,Hb as h}from"./chunk-TB7HFPBB.js";import{j as q}from"./chunk-NNOSZ447.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??(s=await b(e,n));let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
@@ -1,2 +1,2 @@
1
- import{Pb as m}from"./chunk-BXDZX3BS.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as h}from"child_process";function g(e=process.pid,i="SIGTERM",r=!0,s){k(e,i,r,s??(n=>{n&&m(`Failed to kill process ${e}: ${n}`)}))}function k(e,i,r,s){let t=typeof e=="number"?e.toString():e;if(!/^\d+$/.test(t))if(s){s(new Error("pid must be a number"));return}else throw new Error("pid must be a number");let n={};n[t]=[];let o=new Set;switch(o.add(t),process.platform){case"win32":{h("taskkill",["/pid",t,"/T","/F"]).on("close",u=>{s&&(u===0?s():s(new Error(`taskkill exited with code ${u}`)))});break}case"darwin":l(t,n,o,function(f){return h("pgrep",["-lfP",f])},function(){w(n,i,t,r,s)});break;default:l(t,n,o,function(f){return h("ps",["-o","pid command","--no-headers","--ppid",f])},function(){w(n,i,t,r,s)});break}}function w(e,i,r,s,t){let n=new Set;try{Object.keys(e).forEach(function(o){e[o].forEach(function(f){n.has(f)||(E(f,i),n.add(f))}),o===r&&s&&!n.has(o)&&(E(o,i),n.add(o))})}catch(o){if(t){t(o);return}else throw o}t&&t()}function E(e,i){try{process.kill(parseInt(e,10),i)}catch(r){if(r.code!=="ESRCH")throw r}}function l(e,i,r,s,t){let n=s(e),o="";n.stdout?.on("data",function(u){let a=u.toString("ascii");o+=a});let f=u=>{if(r.delete(e),u!==0){if(r.size===0){t();return}return}o.trim().split(`
1
+ import{Pb as m}from"./chunk-TB7HFPBB.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as h}from"child_process";function g(e=process.pid,i="SIGTERM",r=!0,s){k(e,i,r,s??(n=>{n&&m(`Failed to kill process ${e}: ${n}`)}))}function k(e,i,r,s){let t=typeof e=="number"?e.toString():e;if(!/^\d+$/.test(t))if(s){s(new Error("pid must be a number"));return}else throw new Error("pid must be a number");let n={};n[t]=[];let o=new Set;switch(o.add(t),process.platform){case"win32":{h("taskkill",["/pid",t,"/T","/F"]).on("close",u=>{s&&(u===0?s():s(new Error(`taskkill exited with code ${u}`)))});break}case"darwin":l(t,n,o,function(f){return h("pgrep",["-lfP",f])},function(){w(n,i,t,r,s)});break;default:l(t,n,o,function(f){return h("ps",["-o","pid command","--no-headers","--ppid",f])},function(){w(n,i,t,r,s)});break}}function w(e,i,r,s,t){let n=new Set;try{Object.keys(e).forEach(function(o){e[o].forEach(function(f){n.has(f)||(E(f,i),n.add(f))}),o===r&&s&&!n.has(o)&&(E(o,i),n.add(o))})}catch(o){if(t){t(o);return}else throw o}t&&t()}function E(e,i){try{process.kill(parseInt(e,10),i)}catch(r){if(r.code!=="ESRCH")throw r}}function l(e,i,r,s,t){let n=s(e),o="";n.stdout?.on("data",function(u){let a=u.toString("ascii");o+=a});let f=u=>{if(r.delete(e),u!==0){if(r.size===0){t();return}return}o.trim().split(`
2
2
  `).forEach(function(a){let d=a.match(/^(\d+)\s(.*)$/);if(d){let c=d[1],$=d[2];i[e].push(c),i[c]=[],m(`Killing process ${c}: ${$}`),r.add(c),l(c,i,r,s,t)}})};n.on("close",f)}export{g as a};
@@ -1 +1 @@
1
- import{Y as u,aa as l,ba as p}from"./chunk-UEC23KAO.js";import{b as d,c as f}from"./chunk-S5JJL3BP.js";import{b as c}from"./chunk-74IG3ZE3.js";import{C as m}from"./chunk-YYLEWVO6.js";import{Lb as s}from"./chunk-BXDZX3BS.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
1
+ import{Y as u,aa as l,ba as p}from"./chunk-R7QYSC6T.js";import{b as d,c as f}from"./chunk-NGCPVRDM.js";import{b as c}from"./chunk-UAYIFFYJ.js";import{C as m}from"./chunk-EEEKSYWV.js";import{Lb as s}from"./chunk-TB7HFPBB.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
@@ -1,4 +1,4 @@
1
- import{l as O}from"./chunk-YYLEWVO6.js";import{d as E}from"./chunk-AUZCENYI.js";import{Pb as i,Qb as m,Z as b,da as N}from"./chunk-BXDZX3BS.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();u();var l=class{constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:w,inputQueryVariablesMetafieldValue:g,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:C}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=w,this.inputQueryVariablesMetafieldValue=g,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=C}},h=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};u();function R(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&R(t)||e?.deep&&Array.isArray(t)?p(t,e):t}function p(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?p(r,e):r);if(R(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=M(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,U="function_run",z="function_network_access",V="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var k={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:k[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(i(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){i(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=p({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
1
+ import{l as O}from"./chunk-EEEKSYWV.js";import{d as E}from"./chunk-IIFRDOYG.js";import{Pb as i,Qb as m,Z as b,da as N}from"./chunk-TB7HFPBB.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();u();var l=class{constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:w,inputQueryVariablesMetafieldValue:g,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:C}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=w,this.inputQueryVariablesMetafieldValue=g,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=C}},h=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};u();function R(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&R(t)||e?.deep&&Array.isArray(t)?p(t,e):t}function p(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?p(r,e):r);if(R(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=M(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,U="function_run",z="function_network_access",V="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var k={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:k[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(i(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){i(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=p({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
2
2
  `).filter(Boolean),a.payload.inputQueryVariablesMetafieldValue&&(a.payload.inputQueryVariablesMetafieldValue=x(a.payload.inputQueryVariablesMetafieldValue))),o?JSON.stringify(a,null,2):JSON.stringify(a)},pe=(t,e)=>{let r=p(JSON.parse(t));return e===U?new l(r):e===V?new h(r):e===q?new d(r):e===J?new y(r):r},ce=async(t,e,r,o)=>{let n=await t.subscribeToAppLogs(e,r);if(!n.appLogsSubscribe)throw new E("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:a,errors:f}=n.appLogsSubscribe;if(i(`Token: ${s}
3
3
  `),i(`API Key: ${e.apiKey}
4
4
  `),f&&f.length>0){let c=f.join(", ");throw await O({stripAnsi:!1},()=>{m(`Errors subscribing to app logs: ${c}`,o),m("App log streaming is not available in this session.",o)}),new E(c)}else{if(!s)throw new E("Failed to subscribe to app logs: No response received");let c=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];i(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),a!==void 0&&i(`Success: ${a}
@@ -1 +1 @@
1
- import{b}from"./chunk-PK6NOLT5.js";import{a as F}from"./chunk-7KHYEIA7.js";import{j as h,l as u,o as T}from"./chunk-XZWAX4FI.js";import{p as y,v as O}from"./chunk-JGN7YG5X.js";import{o as f,ua as v}from"./chunk-3EQY5B4S.js";import{b as I}from"./chunk-S5JJL3BP.js";import{v as _}from"./chunk-YYLEWVO6.js";import{d as s}from"./chunk-AUZCENYI.js";import{Mb as S,Ua as l,ma as c}from"./chunk-BXDZX3BS.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
1
+ import{b}from"./chunk-G6BFXMOV.js";import{a as F}from"./chunk-TM44Z7U7.js";import{j as h,l as u,o as T}from"./chunk-HSVZU7MP.js";import{p as y,v as O}from"./chunk-4P54DKG4.js";import{o as f,ua as v}from"./chunk-TIU7MMRT.js";import{b as I}from"./chunk-NGCPVRDM.js";import{v as _}from"./chunk-EEEKSYWV.js";import{d as s}from"./chunk-IIFRDOYG.js";import{Mb as S,Ua as l,ma as c}from"./chunk-TB7HFPBB.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
@@ -1 +1 @@
1
- import{a as c,b as d,c as f}from"./chunk-4U3NC3UU.js";import{a as p}from"./chunk-PLHJQQVZ.js";import{a as r}from"./chunk-6V37CHBZ.js";import{Fa as s}from"./chunk-KJQAJUDU.js";import{b as n}from"./chunk-S5JJL3BP.js";import{r as y}from"./chunk-T6CC5WUU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var m=g(y(),1);var a,t=class extends p{async run(){let{flags:e}=await this.parse(a),{app:o,developerPlatformClient:u,organization:h}=await s({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),l=await f(o,e.path);return await c({app:o,extension:l,stdout:e.stdout,developerPlatformClient:u,orgId:h.id}),{app:o}}};a=t;t.summary="Fetch the latest GraphQL schema for a function.";t.descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...r,...d,stdout:m.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};var T=t;export{T as a};
1
+ import{a as c,b as d,c as f}from"./chunk-TSEPNC3O.js";import{a as p}from"./chunk-UHIP5CFI.js";import{a as r}from"./chunk-VJQJ5PTQ.js";import{Fa as s}from"./chunk-4MLEL3VK.js";import{b as n}from"./chunk-NGCPVRDM.js";import{r as y}from"./chunk-T6CC5WUU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var m=g(y(),1);var a,t=class extends p{async run(){let{flags:e}=await this.parse(a),{app:o,developerPlatformClient:u,organization:h}=await s({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),l=await f(o,e.path);return await c({app:o,extension:l,stdout:e.stdout,developerPlatformClient:u,orgId:h.id}),{app:o}}};a=t;t.summary="Fetch the latest GraphQL schema for a function.";t.descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...r,...d,stdout:m.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};var T=t;export{T as a};
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-74IG3ZE3.js";import{C as f}from"./chunk-YYLEWVO6.js";import{Lb as c}from"./chunk-BXDZX3BS.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static{this.description="View all the available command flags"}static{this.hidden=!0}static{this.flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})}}async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
1
+ import{b as m}from"./chunk-UAYIFFYJ.js";import{C as f}from"./chunk-EEEKSYWV.js";import{Lb as c}from"./chunk-TB7HFPBB.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static{this.description="View all the available command flags"}static{this.hidden=!0}static{this.flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})}}async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
2
2
  `,o=s.map(n=>t.map(e=>n[e]).join(",")).join(`
3
3
  `),l=`${a}${o}
4
4
  `;c(l)}else f({rows:s,columns:{pluginName:{header:"plugin",color:"red"},command:{},flagName:{header:"long flag",color:"green"},flagChar:{header:"short flag",color:"green"},flagEnv:{header:"env variable",color:"blueBright"}}})}};export{i as a};
@@ -1,4 +1,4 @@
1
- import{a as h}from"./chunk-E4GW6OXT.js";import{a as v}from"./chunk-PLHJQQVZ.js";import{a as m}from"./chunk-6V37CHBZ.js";import{Fa as c}from"./chunk-KJQAJUDU.js";import{z as n}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-S5JJL3BP.js";import{v as d}from"./chunk-YYLEWVO6.js";import{d as a}from"./chunk-AUZCENYI.js";import{r as x}from"./chunk-T6CC5WUU.js";import{e as S,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function f(o){let e=o.appContextResult.developerPlatformClient,r=o.appContextResult.remoteApp;if(!e.supportsDevSessions)throw new a("Dev preview is not supported for this app. It's valid only for apps created on the Next-Gen Dev Platform.");let s=await e.devSessionDelete({shopFqdn:o.store.shopDomain,appId:r.id});if(s.devSessionDelete?.userErrors.length){let u=s.devSessionDelete.userErrors.map(g=>g.message).join(`
1
+ import{a as h}from"./chunk-RE652L3G.js";import{a as v}from"./chunk-UHIP5CFI.js";import{a as m}from"./chunk-VJQJ5PTQ.js";import{Fa as c}from"./chunk-4MLEL3VK.js";import{z as n}from"./chunk-TIU7MMRT.js";import{b as l}from"./chunk-NGCPVRDM.js";import{v as d}from"./chunk-EEEKSYWV.js";import{d as a}from"./chunk-IIFRDOYG.js";import{r as x}from"./chunk-T6CC5WUU.js";import{e as S,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function f(o){let e=o.appContextResult.developerPlatformClient,r=o.appContextResult.remoteApp;if(!e.supportsDevSessions)throw new a("Dev preview is not supported for this app. It's valid only for apps created on the Next-Gen Dev Platform.");let s=await e.devSessionDelete({shopFqdn:o.store.shopDomain,appId:r.id});if(s.devSessionDelete?.userErrors.length){let u=s.devSessionDelete.userErrors.map(g=>g.message).join(`
2
2
  `);throw new a(`Failed to stop the dev preview: ${u}`)}d({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${o.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var w=S(x(),1);var i,t=class extends v{async run(){let{flags:e}=await this.parse(i),r=await c({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),s=await h({appContextResult:r,storeFqdn:e.store,forceReselectStore:e.reset});return await f({appContextResult:r,store:s}),{app:r.app}}};i=t;t.summary="Cleans up the dev preview from the selected store.";t.descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
3
3
 
4
4
  It restores the app's active version to the selected development store.
@@ -1 +1 @@
1
- import{a as n}from"./chunk-4EYTWWYF.js";import{b as i}from"./chunk-74IG3ZE3.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static{this.description="Generate a notifications.json file for the the CLI, appending a new notification to the current file."}static{this.hidden=!0}async run(){await n()}};export{t as a};
1
+ import{a as n}from"./chunk-LSCDB36D.js";import{b as i}from"./chunk-UAYIFFYJ.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static{this.description="Generate a notifications.json file for the the CLI, appending a new notification to the current file."}static{this.hidden=!0}async run(){await n()}};export{t as a};
@@ -1 +1 @@
1
- import{c as u,d as t,l as h}from"./chunk-AUZCENYI.js";import{g as i}from"./chunk-VKWPEFWQ.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};
1
+ import{c as u,d as t,l as h}from"./chunk-IIFRDOYG.js";import{g as i}from"./chunk-VKWPEFWQ.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};
@@ -1,4 +1,4 @@
1
- import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-PLHJQQVZ.js";import{a as C}from"./chunk-6V37CHBZ.js";import{Fa as P,I as x,ha as y,i as F}from"./chunk-KJQAJUDU.js";import{b as f}from"./chunk-KUKYAIOR.js";import{b as w}from"./chunk-S5JJL3BP.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-BXDZX3BS.js";import{f as u}from"./chunk-773TIA5M.js";import{r as $}from"./chunk-T6CC5WUU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
1
+ import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-UHIP5CFI.js";import{a as C}from"./chunk-VJQJ5PTQ.js";import{Fa as P,I as x,ha as y,i as F}from"./chunk-4MLEL3VK.js";import{b as f}from"./chunk-34SINZ7L.js";import{b as w}from"./chunk-NGCPVRDM.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-TB7HFPBB.js";import{f as u}from"./chunk-773TIA5M.js";import{r as $}from"./chunk-T6CC5WUU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
2
2
 
3
3
  ${s}
4
4
 
@@ -1,2 +1,2 @@
1
- import{a as B,b as E}from"./chunk-3OE5HXHO.js";import{b as y,c as A,l as C,n as F,o as S,t as x}from"./chunk-WU6GIY22.js";import{a as D}from"./chunk-PLHJQQVZ.js";import{a as w}from"./chunk-6V37CHBZ.js";import{z as f}from"./chunk-3EQY5B4S.js";import{b as O}from"./chunk-S5JJL3BP.js";import{u as l,v as k,w as b,x as g}from"./chunk-YYLEWVO6.js";import{Fb as h,Hb as I}from"./chunk-BXDZX3BS.js";import{r as _}from"./chunk-T6CC5WUU.js";import{e as z,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function T(n){let{organization:a,storeFqdn:o,operationId:r,remoteApp:u}=n;l({headline:"Canceling bulk operation.",body:[{list:{items:[`ID: ${r}`,...E({organization:a,remoteApp:u,storeFqdn:o})]}}]});let v=await B(u,o),p=await C({adminSession:v,operationId:r});if(p?.userErrors?.length){F(p.userErrors,"Failed to cancel bulk operation.");return}let i=p?.bulkOperation;if(i){let t=S(i),d=i.status==="CANCELING"?[`This may take a few moments. Check the status with:
1
+ import{a as B,b as E}from"./chunk-35FS2NTM.js";import{b as y,c as A,l as C,n as F,o as S,t as x}from"./chunk-523SJVNT.js";import{a as D}from"./chunk-UHIP5CFI.js";import{a as w}from"./chunk-VJQJ5PTQ.js";import{z as f}from"./chunk-TIU7MMRT.js";import{b as O}from"./chunk-NGCPVRDM.js";import{u as l,v as k,w as b,x as g}from"./chunk-EEEKSYWV.js";import{Fb as h,Hb as I}from"./chunk-TB7HFPBB.js";import{r as _}from"./chunk-T6CC5WUU.js";import{e as z,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function T(n){let{organization:a,storeFqdn:o,operationId:r,remoteApp:u}=n;l({headline:"Canceling bulk operation.",body:[{list:{items:[`ID: ${r}`,...E({organization:a,remoteApp:u,storeFqdn:o})]}}]});let v=await B(u,o),p=await C({adminSession:v,operationId:r});if(p?.userErrors?.length){F(p.userErrors,"Failed to cancel bulk operation.");return}let i=p?.bulkOperation;if(i){let t=S(i),d=i.status==="CANCELING"?[`This may take a few moments. Check the status with:
2
2
  `,{command:`shopify app bulk status --id=${A(i.id)}`}]:t.body,c={headline:t.headline,...d&&{body:d},...t.customSections&&{customSections:t.customSections}};switch(t.renderType){case"success":k(c);break;case"warning":b(c);break;case"info":l(c);break}}else g({headline:"Bulk operation not found or could not be canceled.",body:I`ID: ${h.yellow(r)}`.value})}var m=z(_(),1);var q,e=class extends D{async run(){let{flags:a}=await this.parse(q),{appContextResult:o,store:r}=await x(a);return await T({organization:o.organization,storeFqdn:r.shopDomain,operationId:y(a.id),remoteApp:o.remoteApp}),{app:o.app}}};q=e;e.summary="Cancel a bulk operation.";e.description="Cancels a running bulk operation by ID.";e.flags={...O,...w,id:m.Flags.string({description:"The bulk operation ID to cancel (numeric ID or full GID).",env:"SHOPIFY_FLAG_ID",required:!0}),store:m.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async n=>f(n)})};var K=e;export{K as a};
@@ -1,4 +1,4 @@
1
- import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-6LTJMYUD.js";import{a as aA}from"./chunk-KJQAJUDU.js";import{c as tA,e as rA}from"./chunk-TGM7L6RV.js";import{A as vI,S as pCe,g as mCe,n as R4,z as tf}from"./chunk-3EQY5B4S.js";import{a as jF}from"./chunk-Q3WOWDUU.js";import{g as $F}from"./chunk-YYLEWVO6.js";import{d as eA}from"./chunk-AUZCENYI.js";import{Pb as b7,eb as b}from"./chunk-BXDZX3BS.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1
+ import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-PEYYIWP6.js";import{a as aA}from"./chunk-4MLEL3VK.js";import{c as tA,e as rA}from"./chunk-WN5VTUWJ.js";import{A as vI,S as pCe,g as mCe,n as R4,z as tf}from"./chunk-TIU7MMRT.js";import{a as jF}from"./chunk-B5MFFERE.js";import{g as $F}from"./chunk-EEEKSYWV.js";import{d as eA}from"./chunk-IIFRDOYG.js";import{Pb as b7,eb as b}from"./chunk-TB7HFPBB.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
2
  1. You might have mismatching versions of React and the renderer (such as React DOM)
3
3
  2. You might be breaking the Rules of Hooks
4
4
  3. You might have more than one copy of React in the same app
@@ -1,4 +1,4 @@
1
- import{b as i}from"./chunk-S5JJL3BP.js";import{b as o}from"./chunk-74IG3ZE3.js";import{J as t}from"./chunk-YYLEWVO6.js";import{r as p}from"./chunk-T6CC5WUU.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static{this.description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
1
+ import{b as i}from"./chunk-NGCPVRDM.js";import{b as o}from"./chunk-UAYIFFYJ.js";import{J as t}from"./chunk-EEEKSYWV.js";import{r as p}from"./chunk-T6CC5WUU.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static{this.description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
2
2
  shopify search
3
3
 
4
4
  # search for a term on Shopify.dev
@@ -1 +1 @@
1
- import{a as C,c as F}from"./chunk-3OE5HXHO.js";import{d as k,f as A,u as q}from"./chunk-WU6GIY22.js";import{a as N}from"./chunk-PLHJQQVZ.js";import{a as E,c as J}from"./chunk-6V37CHBZ.js";import{b as x}from"./chunk-TGM7L6RV.js";import{g as z,h as y}from"./chunk-3EQY5B4S.js";import{b}from"./chunk-S5JJL3BP.js";import{E as m,v as f,x as S}from"./chunk-YYLEWVO6.js";import{d as u}from"./chunk-AUZCENYI.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-BXDZX3BS.js";import{e as I,g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await C(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);k(r),F(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends N{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await q(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...E,...J};var oe=a;export{oe as a};
1
+ import{a as C,c as F}from"./chunk-35FS2NTM.js";import{d as k,f as A,u as q}from"./chunk-523SJVNT.js";import{a as N}from"./chunk-UHIP5CFI.js";import{a as E,c as J}from"./chunk-VJQJ5PTQ.js";import{b as x}from"./chunk-WN5VTUWJ.js";import{g as z,h as y}from"./chunk-TIU7MMRT.js";import{b}from"./chunk-NGCPVRDM.js";import{E as m,v as f,x as S}from"./chunk-EEEKSYWV.js";import{d as u}from"./chunk-IIFRDOYG.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-TB7HFPBB.js";import{e as I,g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await C(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);k(r),F(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends N{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await q(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...E,...J};var oe=a;export{oe as a};