shopify 4.9.0 → 4.9.1

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 (323) hide show
  1. package/dist/analytics-EPKJADE2.js +1 -0
  2. package/dist/analytics-TVCGKQGZ.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-ZPCCSPAE.js → chunk-23ITMFUO.js} +1 -1
  5. package/dist/{chunk-CHLSNYF7.js → chunk-254XYKPN.js} +1 -1
  6. package/dist/{chunk-4Y22EM45.js → chunk-2AAHKMPP.js} +1 -1
  7. package/dist/{chunk-P3Z5RLVV.js → chunk-2AZXDU2R.js} +1 -1
  8. package/dist/{chunk-7Y4X5I6N.js → chunk-2FHVYY3B.js} +1 -1
  9. package/dist/{chunk-DGMRL5DQ.js → chunk-2KBTFKSM.js} +1 -1
  10. package/dist/{chunk-2OHSGC4Q.js → chunk-2NBNVDDA.js} +1 -1
  11. package/dist/{chunk-CACPRKUF.js → chunk-2QV5FHXJ.js} +1 -1
  12. package/dist/{chunk-7DRKDQRT.js → chunk-2RVMF4QP.js} +1 -1
  13. package/dist/{chunk-PGTKKP2B.js → chunk-2TOIR7YQ.js} +1 -1
  14. package/dist/chunk-32B4LIKH.js +1 -0
  15. package/dist/{chunk-Q3O3AFZT.js → chunk-33D7HGAI.js} +1 -1
  16. package/dist/{chunk-QJST4LZX.js → chunk-3GVSG4S6.js} +1 -1
  17. package/dist/{chunk-Y5ZN62VF.js → chunk-3MEL3WLG.js} +1 -1
  18. package/dist/{chunk-ZHJ6KA43.js → chunk-3UZYLXCB.js} +1 -1
  19. package/dist/{chunk-6DHY67FO.js → chunk-3VOMVINB.js} +1 -1
  20. package/dist/{chunk-3ZK5JZLY.js → chunk-3VXXYY6S.js} +1 -1
  21. package/dist/{chunk-D3K42KBL.js → chunk-3WMFKHIM.js} +1 -1
  22. package/dist/{chunk-Q34PKJRR.js → chunk-46IUD46F.js} +1 -1
  23. package/dist/{chunk-5HONV6NQ.js → chunk-4AXLWDKW.js} +1 -1
  24. package/dist/{chunk-55PABKRC.js → chunk-55JDA75S.js} +1 -1
  25. package/dist/{chunk-NGN7U2UF.js → chunk-5CANB25O.js} +1 -1
  26. package/dist/{chunk-IISE7SBT.js → chunk-5I5HKOQU.js} +1 -1
  27. package/dist/{chunk-DKJPE42V.js → chunk-5KILOX2V.js} +1 -1
  28. package/dist/{chunk-XBSWZ6BT.js → chunk-5MJX7RKQ.js} +1 -1
  29. package/dist/{chunk-QBGSSUJP.js → chunk-5UDBNXNH.js} +1 -1
  30. package/dist/{chunk-JOJRABPY.js → chunk-5ZSN73EA.js} +1 -1
  31. package/dist/{chunk-BPIQ4YTW.js → chunk-63GEZEYP.js} +1 -1
  32. package/dist/{chunk-LSWFHTJT.js → chunk-6WGHVCYY.js} +1 -1
  33. package/dist/{chunk-2Q3WIH7S.js → chunk-77QKJLBG.js} +1 -1
  34. package/dist/{chunk-CPFAATMO.js → chunk-77QYKF34.js} +1 -1
  35. package/dist/{chunk-6RBCFXJT.js → chunk-7AD5YCLL.js} +1 -1
  36. package/dist/{chunk-HSZC2LBB.js → chunk-7H4IM6PX.js} +1 -1
  37. package/dist/{chunk-7ZSN2QT5.js → chunk-7IS6Q756.js} +1 -1
  38. package/dist/{chunk-7QQPAT4L.js → chunk-7UV53AU2.js} +1 -1
  39. package/dist/{chunk-GQZPGTG7.js → chunk-7UZO72KN.js} +2 -2
  40. package/dist/{chunk-3AASYIOA.js → chunk-7WWPAHVE.js} +1 -1
  41. package/dist/{chunk-SDFO7P2M.js → chunk-7ZONBOEZ.js} +1 -1
  42. package/dist/chunk-A6OSIGQI.js +1 -0
  43. package/dist/{chunk-SXPWOYLT.js → chunk-ADIHYUQC.js} +1 -1
  44. package/dist/{chunk-IUZZWXJG.js → chunk-AJOTU26E.js} +1 -1
  45. package/dist/{chunk-2KLXRVGQ.js → chunk-AKSOCKVF.js} +38 -38
  46. package/dist/{chunk-2YFB3PTV.js → chunk-AZCPTV4A.js} +1 -1
  47. package/dist/{chunk-TJJVX7CU.js → chunk-B4YDR22W.js} +1 -1
  48. package/dist/{chunk-SDJNAUU6.js → chunk-B7Y2LMPU.js} +1 -1
  49. package/dist/{chunk-YQQHBFMA.js → chunk-BATQEAGE.js} +1 -1
  50. package/dist/{chunk-SGBLCVUX.js → chunk-C4QR7Z4N.js} +1 -1
  51. package/dist/{chunk-3DMDSAWK.js → chunk-C7YSU4R5.js} +1 -1
  52. package/dist/{chunk-E75DJTAF.js → chunk-CKLS5LTU.js} +1 -1
  53. package/dist/{chunk-YJWNM4XO.js → chunk-COFGQT76.js} +2 -2
  54. package/dist/{chunk-2LZQM5JG.js → chunk-CPKLTBLZ.js} +1 -1
  55. package/dist/{chunk-FW5HGFSZ.js → chunk-CUZQRXTV.js} +3 -3
  56. package/dist/{chunk-W7CBJNXD.js → chunk-DCSSFNW7.js} +1 -1
  57. package/dist/{chunk-2YRVHJEY.js → chunk-DEY5P63E.js} +1 -1
  58. package/dist/{chunk-OBYY45BX.js → chunk-DP7SBNLN.js} +1 -1
  59. package/dist/{chunk-77B77IGP.js → chunk-DREP3FRJ.js} +1 -1
  60. package/dist/{chunk-OG7SF4FU.js → chunk-DUWS6Q7C.js} +1 -1
  61. package/dist/{chunk-SJARQZVN.js → chunk-DUWU7CL7.js} +1 -1
  62. package/dist/{chunk-6IL3B5Z5.js → chunk-DYHRCMH6.js} +1 -1
  63. package/dist/{chunk-C6FZII5S.js → chunk-DZS4GBQX.js} +1 -1
  64. package/dist/{chunk-VFP3PUGZ.js → chunk-EDLID4PK.js} +1 -1
  65. package/dist/{chunk-2W6M7YDY.js → chunk-EVQPVO4P.js} +1 -1
  66. package/dist/{chunk-GDQLA5NB.js → chunk-EYB45DUG.js} +1 -1
  67. package/dist/{chunk-44QTWXOJ.js → chunk-F34MAI7X.js} +1 -1
  68. package/dist/{chunk-72HS7MHV.js → chunk-FJCNEHTH.js} +1 -1
  69. package/dist/{chunk-FL34EOXG.js → chunk-FNITLQDL.js} +1 -1
  70. package/dist/{chunk-A54V5UCD.js → chunk-FROK2K3X.js} +1 -1
  71. package/dist/{chunk-LQLFMDVD.js → chunk-GF75CMTJ.js} +1 -1
  72. package/dist/{chunk-74HXMIDM.js → chunk-GHO2S3W3.js} +1 -1
  73. package/dist/{chunk-ADW7ECNU.js → chunk-GILHUPUG.js} +1 -1
  74. package/dist/{chunk-YD66PU3Y.js → chunk-GPRUQBQX.js} +1 -1
  75. package/dist/{chunk-XTYSJIZY.js → chunk-GRKZRK4G.js} +1 -1
  76. package/dist/{chunk-G7OIACY5.js → chunk-H3QLPW7Q.js} +1 -1
  77. package/dist/{chunk-3SG5EJFC.js → chunk-HJ3DOUAL.js} +1 -1
  78. package/dist/{chunk-IBTQO3JD.js → chunk-HKNFZUAM.js} +1 -1
  79. package/dist/{chunk-53U6XS3J.js → chunk-HQK6QRXN.js} +1 -1
  80. package/dist/{chunk-OASB6XPV.js → chunk-HT2JVMLK.js} +1 -1
  81. package/dist/{chunk-55NKAIIT.js → chunk-HVOYSAB3.js} +1 -1
  82. package/dist/{chunk-LV2IWYGL.js → chunk-I4FS7HYY.js} +1 -1
  83. package/dist/{chunk-QTEWTPAQ.js → chunk-ICFM55ZS.js} +1 -1
  84. package/dist/{chunk-ZO4IBP4B.js → chunk-IPWU2ALH.js} +1 -1
  85. package/dist/{chunk-AD4S2VEI.js → chunk-IQ4VOPT7.js} +1 -1
  86. package/dist/{chunk-JWDUSMCA.js → chunk-ISIPFEFB.js} +1 -1
  87. package/dist/{chunk-5RL6DKWR.js → chunk-IUUKRTKF.js} +1 -1
  88. package/dist/{chunk-VFO5OYQ4.js → chunk-J4SJHG3M.js} +1 -1
  89. package/dist/{chunk-O6E7YL7N.js → chunk-JCOQDVEB.js} +1 -1
  90. package/dist/{chunk-5HEBS5DG.js → chunk-JCVQB6MX.js} +1 -1
  91. package/dist/{chunk-EYSZRIUL.js → chunk-JF47WERF.js} +1 -1
  92. package/dist/{chunk-UFU2LGFK.js → chunk-JJ4MYCVU.js} +1 -1
  93. package/dist/{chunk-IWML2HLC.js → chunk-JOEWOCHY.js} +1 -1
  94. package/dist/{chunk-E5ND6RBL.js → chunk-JSGOBMF6.js} +1 -1
  95. package/dist/{chunk-4WACZNFF.js → chunk-JWQBRHVY.js} +1 -1
  96. package/dist/{chunk-RHNFWHFY.js → chunk-K5KUOPEF.js} +1 -1
  97. package/dist/{chunk-SKRUMRB4.js → chunk-KCHERKZO.js} +1 -1
  98. package/dist/{chunk-JQKB3D37.js → chunk-KVZXRZ7U.js} +1 -1
  99. package/dist/{chunk-XCNJL7ES.js → chunk-KXSUEB4Y.js} +1 -1
  100. package/dist/{chunk-NTVEJYKI.js → chunk-LAHZ6FO5.js} +1 -1
  101. package/dist/{chunk-4TQFTZVD.js → chunk-LBBYCPZP.js} +1 -1
  102. package/dist/{chunk-6ILP6QCH.js → chunk-LEFAUWKH.js} +1 -1
  103. package/dist/{chunk-GVRFO4CV.js → chunk-LIB64ZJW.js} +1 -1
  104. package/dist/{chunk-4A7FPJVT.js → chunk-LOKVWZD2.js} +2 -2
  105. package/dist/{chunk-Z3XIZMEM.js → chunk-LRKJSNM3.js} +1 -1
  106. package/dist/{chunk-3WVEL423.js → chunk-MDMKTILJ.js} +1 -1
  107. package/dist/{chunk-WCAGYCT7.js → chunk-MEFJND2V.js} +1 -1
  108. package/dist/{chunk-SW5EWGBJ.js → chunk-MFXBSQDH.js} +1 -1
  109. package/dist/{chunk-B4RPJYDH.js → chunk-MIMOKFDI.js} +1 -1
  110. package/dist/chunk-MINDMVTH.js +1 -0
  111. package/dist/{chunk-QSKOR3ED.js → chunk-MZJKZLCC.js} +1 -1
  112. package/dist/{chunk-DYA5UUXL.js → chunk-NE32WJR5.js} +1 -1
  113. package/dist/{chunk-BOFCBTX7.js → chunk-NGQDG4CJ.js} +1 -1
  114. package/dist/{chunk-VZUHMW5E.js → chunk-NHEUJKAO.js} +1 -1
  115. package/dist/{chunk-R757TSQ6.js → chunk-NSHKVJST.js} +1 -1
  116. package/dist/{chunk-6GA56I3E.js → chunk-NTFIW3VK.js} +1 -1
  117. package/dist/{chunk-WU7MSL3I.js → chunk-NWBAD3AV.js} +1 -1
  118. package/dist/{chunk-7IGMIDKK.js → chunk-NYNSMHKY.js} +1 -1
  119. package/dist/{chunk-ECEOBSGD.js → chunk-NZRQKFUB.js} +1 -1
  120. package/dist/{chunk-WPUQTUDX.js → chunk-OJ7KRWUH.js} +1 -1
  121. package/dist/{chunk-KLYJDAP6.js → chunk-OKX6PKAW.js} +1 -1
  122. package/dist/{chunk-3T2WMZHC.js → chunk-ON3YXHON.js} +1 -1
  123. package/dist/{chunk-5BLXN5WU.js → chunk-OSA6BKSU.js} +1 -1
  124. package/dist/{chunk-AS2O62JX.js → chunk-OUSRNKZG.js} +1 -1
  125. package/dist/{chunk-PZHE37Z4.js → chunk-OVOOQFRY.js} +1 -1
  126. package/dist/{chunk-CMICT4XI.js → chunk-P676C7UT.js} +1 -1
  127. package/dist/{chunk-LYPNQFWX.js → chunk-P6ID3ULA.js} +1 -1
  128. package/dist/chunk-PCKWLJW2.js +1 -0
  129. package/dist/{chunk-BJOJNAKH.js → chunk-PTS7J2JO.js} +1 -1
  130. package/dist/{chunk-LOTGSNS5.js → chunk-QEEA2KEN.js} +1 -1
  131. package/dist/{chunk-ZUVAHONX.js → chunk-QEF43PR2.js} +1 -1
  132. package/dist/{chunk-QAXFCAOV.js → chunk-QF6EH4HX.js} +1 -1
  133. package/dist/{chunk-KVROYIUQ.js → chunk-QH5R32AA.js} +1 -1
  134. package/dist/{chunk-QILWHHAQ.js → chunk-QNR3U4IO.js} +1 -1
  135. package/dist/{chunk-TO7TXDLU.js → chunk-QPCDSJ4J.js} +1 -1
  136. package/dist/{chunk-MRVQ6XRW.js → chunk-QZDFPNYT.js} +1 -1
  137. package/dist/{chunk-XFZDFDZV.js → chunk-RDCHRPKV.js} +1 -1
  138. package/dist/{chunk-I4FGM6UH.js → chunk-RFB7RXTA.js} +1 -1
  139. package/dist/{chunk-JTPVSO6Y.js → chunk-RFDOSK57.js} +1 -1
  140. package/dist/{chunk-4XSYMLQG.js → chunk-RNXWL6DS.js} +1 -1
  141. package/dist/{chunk-VDDNDA5K.js → chunk-RRBI2IRE.js} +1 -1
  142. package/dist/{chunk-Z35PUKKP.js → chunk-RX27ER4R.js} +1 -1
  143. package/dist/{chunk-OETFY7FE.js → chunk-S3IDGHAZ.js} +1 -1
  144. package/dist/{chunk-YAH5WFYR.js → chunk-S3J3BYQ3.js} +1 -1
  145. package/dist/{chunk-7HDJBEBP.js → chunk-S6YUSGTF.js} +1 -1
  146. package/dist/{chunk-23K3B23N.js → chunk-SHDGD2WJ.js} +1 -1
  147. package/dist/{chunk-GJJBOCKD.js → chunk-SKK7CPUY.js} +1 -1
  148. package/dist/{chunk-TMV37ENR.js → chunk-SMZ74TME.js} +1 -1
  149. package/dist/{chunk-JROJL6RV.js → chunk-STLYSBD5.js} +1 -1
  150. package/dist/{chunk-22LJALHJ.js → chunk-T7BUP75N.js} +1 -1
  151. package/dist/{chunk-ZSJXZCAW.js → chunk-TGUAZMI2.js} +1 -1
  152. package/dist/{chunk-OEZATTOS.js → chunk-TH4D7IGZ.js} +1 -1
  153. package/dist/{chunk-5BYVVXGD.js → chunk-U2WUTGPI.js} +1 -1
  154. package/dist/{chunk-OM243CQ6.js → chunk-UJD7OQ3I.js} +1 -1
  155. package/dist/{chunk-PVOWU77O.js → chunk-UVSXPMUN.js} +1 -1
  156. package/dist/{chunk-YX5GRXRS.js → chunk-UZTL2UET.js} +1 -1
  157. package/dist/{chunk-TSLZNTFM.js → chunk-VEIZLSMG.js} +1 -1
  158. package/dist/{chunk-QWDJRSJJ.js → chunk-VEQDI5AB.js} +1 -1
  159. package/dist/{chunk-I7GYNNCU.js → chunk-VL3XMULV.js} +1 -1
  160. package/dist/{chunk-ZSVR5NEO.js → chunk-VPH2AAHJ.js} +1 -1
  161. package/dist/{chunk-L5XWYTHY.js → chunk-VWYZCCRE.js} +3 -3
  162. package/dist/{chunk-QQN4PJZD.js → chunk-VX2CDHRQ.js} +1 -1
  163. package/dist/{chunk-ASUARYJD.js → chunk-VXHLE5UQ.js} +1 -1
  164. package/dist/{chunk-PXD2WJOI.js → chunk-VY7UGJZK.js} +1 -1
  165. package/dist/{chunk-CSRNHTHO.js → chunk-W6TPRWEE.js} +1 -1
  166. package/dist/{chunk-Q45XAEG2.js → chunk-WBTR5JZ6.js} +1 -1
  167. package/dist/{chunk-N4DE5H65.js → chunk-WGBUSO27.js} +1 -1
  168. package/dist/{chunk-G54BKNIX.js → chunk-WR2MMFJO.js} +1 -1
  169. package/dist/{chunk-RCIU7NHA.js → chunk-WR6KP7RT.js} +1 -1
  170. package/dist/{chunk-T234RERA.js → chunk-WRVB4JCZ.js} +1 -1
  171. package/dist/{chunk-ZVDFCUJT.js → chunk-X3WFHNF5.js} +1 -1
  172. package/dist/{chunk-BL5JWD3Y.js → chunk-X6Y3HDXN.js} +1 -1
  173. package/dist/{chunk-NF7MOA4K.js → chunk-XCXQPV5W.js} +1 -1
  174. package/dist/{chunk-FCULF3JA.js → chunk-XUJURYN5.js} +1 -1
  175. package/dist/{chunk-MVVHISCR.js → chunk-XW33ZO7F.js} +1 -1
  176. package/dist/{chunk-S7536EWZ.js → chunk-XY2SSJQD.js} +1 -1
  177. package/dist/{chunk-TNXZWQZU.js → chunk-YACDI6IK.js} +1 -1
  178. package/dist/{chunk-YBQKJHZW.js → chunk-YFR53MWF.js} +1 -1
  179. package/dist/{chunk-GALDYSEX.js → chunk-YQZPL4K3.js} +1 -1
  180. package/dist/{chunk-PK4ID32C.js → chunk-YS5RZ6D5.js} +1 -1
  181. package/dist/{chunk-PXXTSW6I.js → chunk-Z6VWYOKN.js} +1 -1
  182. package/dist/{chunk-PBBZNGS4.js → chunk-ZDRQUKLN.js} +1 -1
  183. package/dist/{chunk-NYABB6XW.js → chunk-ZQKZC2KN.js} +1 -1
  184. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  185. package/dist/cli/commands/app/build.js +1 -1
  186. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  187. package/dist/cli/commands/app/bulk/execute.js +1 -1
  188. package/dist/cli/commands/app/bulk/status.js +1 -1
  189. package/dist/cli/commands/app/config/link.js +1 -1
  190. package/dist/cli/commands/app/config/pull.js +1 -1
  191. package/dist/cli/commands/app/config/use.js +1 -1
  192. package/dist/cli/commands/app/config/validate.js +1 -1
  193. package/dist/cli/commands/app/demo/watcher.js +1 -1
  194. package/dist/cli/commands/app/deploy.js +1 -1
  195. package/dist/cli/commands/app/dev/clean.js +1 -1
  196. package/dist/cli/commands/app/dev.js +1 -1
  197. package/dist/cli/commands/app/env/pull.js +1 -1
  198. package/dist/cli/commands/app/env/show.js +1 -1
  199. package/dist/cli/commands/app/execute.js +1 -1
  200. package/dist/cli/commands/app/function/build.js +1 -1
  201. package/dist/cli/commands/app/function/info.js +1 -1
  202. package/dist/cli/commands/app/function/replay.js +1 -1
  203. package/dist/cli/commands/app/function/run.js +1 -1
  204. package/dist/cli/commands/app/function/schema.js +1 -1
  205. package/dist/cli/commands/app/function/typegen.js +1 -1
  206. package/dist/cli/commands/app/generate/extension.js +1 -1
  207. package/dist/cli/commands/app/graphiql.js +1 -1
  208. package/dist/cli/commands/app/import/channel-config.js +1 -1
  209. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  210. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  211. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  212. package/dist/cli/commands/app/import-extensions.js +1 -1
  213. package/dist/cli/commands/app/info.js +1 -1
  214. package/dist/cli/commands/app/init.js +1 -1
  215. package/dist/cli/commands/app/logs.js +1 -1
  216. package/dist/cli/commands/app/release.js +1 -1
  217. package/dist/cli/commands/app/security/check.js +1 -1
  218. package/dist/cli/commands/app/security/clean.js +1 -1
  219. package/dist/cli/commands/app/security/instructions.js +1 -1
  220. package/dist/cli/commands/app/security/record.js +1 -1
  221. package/dist/cli/commands/app/security/review.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  226. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  227. package/dist/cli/commands/app/versions/list.js +1 -1
  228. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  229. package/dist/cli/commands/auth/login.js +1 -1
  230. package/dist/cli/commands/auth/logout.js +1 -1
  231. package/dist/cli/commands/cache/clear.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  234. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  235. package/dist/cli/commands/debug/command-flags.js +1 -1
  236. package/dist/cli/commands/doc/fetch.js +1 -1
  237. package/dist/cli/commands/doc/search.js +1 -1
  238. package/dist/cli/commands/docs/generate.js +1 -1
  239. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  240. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  241. package/dist/cli/commands/help.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  245. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  246. package/dist/cli/commands/notifications/generate.js +1 -1
  247. package/dist/cli/commands/notifications/list.js +1 -1
  248. package/dist/cli/commands/organization/list.js +1 -1
  249. package/dist/cli/commands/search.js +1 -1
  250. package/dist/cli/commands/send-analytics.js +1 -1
  251. package/dist/cli/commands/theme/check.js +1 -1
  252. package/dist/cli/commands/theme/console.js +1 -1
  253. package/dist/cli/commands/theme/delete.js +1 -1
  254. package/dist/cli/commands/theme/dev.js +1 -1
  255. package/dist/cli/commands/theme/duplicate.js +1 -1
  256. package/dist/cli/commands/theme/info.js +1 -1
  257. package/dist/cli/commands/theme/init.js +1 -1
  258. package/dist/cli/commands/theme/language-server.js +1 -1
  259. package/dist/cli/commands/theme/list.js +1 -1
  260. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  261. package/dist/cli/commands/theme/open.js +1 -1
  262. package/dist/cli/commands/theme/package.js +1 -1
  263. package/dist/cli/commands/theme/preview.js +1 -1
  264. package/dist/cli/commands/theme/profile.js +1 -1
  265. package/dist/cli/commands/theme/publish.js +1 -1
  266. package/dist/cli/commands/theme/pull.js +1 -1
  267. package/dist/cli/commands/theme/push.js +1 -1
  268. package/dist/cli/commands/theme/rename.js +1 -1
  269. package/dist/cli/commands/theme/share.js +1 -1
  270. package/dist/cli/commands/upgrade.js +1 -1
  271. package/dist/cli/commands/version.js +1 -1
  272. package/dist/cli/help.js +1 -1
  273. package/dist/{command-json-schema-Y3N2NUZN.js → command-json-schema-SU56F3T4.js} +1 -1
  274. package/dist/command-registry.js +1 -1
  275. package/dist/{conf-store-5ZA3ILWV.js → conf-store-WDYDHG6V.js} +1 -1
  276. package/dist/{custom-oclif-loader-VQKMCXNH.js → custom-oclif-loader-CP4XJAPS.js} +1 -1
  277. package/dist/{deprecations-PFQXWNF6.js → deprecations-CBSMNYL3.js} +1 -1
  278. package/dist/dist-HI6AAP5V.js +1 -0
  279. package/dist/dist-W25ND3PJ.js +1 -0
  280. package/dist/environments-PUH6A5BU.js +1 -0
  281. package/dist/{error-FBSXLW22.js → error-LNWX6IWE.js} +1 -1
  282. package/dist/error-handler-24QGAUUD.js +1 -0
  283. package/dist/{fs-ZLV5W4TV.js → fs-Y33QBYY5.js} +1 -1
  284. package/dist/hooks/did-you-mean.js +1 -1
  285. package/dist/hooks/hydrogen-init.js +1 -1
  286. package/dist/hooks/postrun.js +1 -1
  287. package/dist/hooks/prerun.js +1 -1
  288. package/dist/hooks/public-metadata.js +1 -1
  289. package/dist/hooks/sensitive-metadata.js +1 -1
  290. package/dist/hooks/tunnel-provider.js +1 -1
  291. package/dist/hooks/tunnel-start.js +1 -1
  292. package/dist/index.js +1 -1
  293. package/dist/{is-global-GZ5CIXQA.js → is-global-KY3QE3OZ.js} +1 -1
  294. package/dist/{json-error-2BL3UZ7H.js → json-error-UR2OILQ6.js} +1 -1
  295. package/dist/{local-KAZJAYLX.js → local-77XQ4CX3.js} +1 -1
  296. package/dist/{metadata-M3ZE24WB.js → metadata-BC3BGHRY.js} +1 -1
  297. package/dist/{node-package-manager-RVPONQBY.js → node-package-manager-6UZUTDCP.js} +1 -1
  298. package/dist/notifications-system-4UDT72DQ.js +1 -0
  299. package/dist/{os-DRUILZZR.js → os-U3LELTCV.js} +1 -1
  300. package/dist/{output-SDE274Y5.js → output-GGY66WEM.js} +1 -1
  301. package/dist/{system-5FQ3L5PA.js → system-MCWAHFXK.js} +1 -1
  302. package/dist/tsconfig.tsbuildinfo +1 -1
  303. package/dist/{ui-TEZZM7SE.js → ui-SYB4LLWY.js} +1 -1
  304. package/dist/upgrade-V4GCQJBN.js +1 -0
  305. package/dist/version-HQPFW4QN.js +1 -0
  306. package/dist/version-VOSHQCYM.js +1 -0
  307. package/dist/{workerd-WRW4ZUYM.js → workerd-MEAM3XYI.js} +1 -1
  308. package/oclif.manifest.json +1 -1
  309. package/package.json +7 -7
  310. package/dist/analytics-QK4RFCB6.js +0 -1
  311. package/dist/analytics-R6I5APDB.js +0 -1
  312. package/dist/chunk-RGIUP4FW.js +0 -1
  313. package/dist/chunk-WXV35TPE.js +0 -1
  314. package/dist/chunk-YGFEUXKQ.js +0 -1
  315. package/dist/chunk-ZOYSMJ27.js +0 -1
  316. package/dist/dist-4X53WJBQ.js +0 -1
  317. package/dist/dist-5M2V3YCM.js +0 -1
  318. package/dist/environments-3RUZ7F4Q.js +0 -1
  319. package/dist/error-handler-D5BURRJ7.js +0 -1
  320. package/dist/notifications-system-MYEMV7JF.js +0 -1
  321. package/dist/upgrade-3PIVJYBL.js +0 -1
  322. package/dist/version-FMWTVLMF.js +0 -1
  323. package/dist/version-IAMVSP7U.js +0 -1
@@ -1,4 +1,4 @@
1
- import{p as C,v as Y}from"./chunk-P3Z5RLVV.js";import{$ as re,aa as q}from"./chunk-IBTQO3JD.js";import{b as H}from"./chunk-DGMRL5DQ.js";import{r as L}from"./chunk-6GA56I3E.js";import{y as w,z as E}from"./chunk-SKRUMRB4.js";import{i as $}from"./chunk-FCULF3JA.js";import{Ib as p,Kb as P,Lb as G,Nb as j,R as I,Xa as N,db as A,ya as T}from"./chunk-YJWNM4XO.js";import{b as oe}from"./chunk-JA2QZ635.js";import{d as O,f as S,p as b}from"./chunk-3VYOLEQE.js";import{e as k,g as v}from"./chunk-VKWPEFWQ.js";v();v();var r=k(q(),1),l=k(re(),1);function se(e,t){return e instanceof Error&&"code"in e&&e.code==="ENOENT"&&"path"in e&&typeof e.path=="string"&&S(e.path)===S(t)}async function F(e,t){try{return await t()}catch(n){throw e!==void 0&&se(n,e)?new $(`Theme Check config file not found: ${e}`):n}}function ce(e){switch(e){case"error":return r.Severity.ERROR;case"suggestion":case"warning":return r.Severity.WARNING;case"style":case"info":return r.Severity.INFO;case"crash":return}}function U(e){switch(e){case r.Severity.ERROR:return"error";case r.Severity.WARNING:return"warning";case r.Severity.INFO:return"info"}}function ae(e){return new Map(e.map(t=>[t.uri,t.source]))}function ue(e,t,n){let o=e.split(`
1
+ import{p as C,v as Y}from"./chunk-2AZXDU2R.js";import{$ as re,aa as q}from"./chunk-HKNFZUAM.js";import{b as H}from"./chunk-2KBTFKSM.js";import{r as L}from"./chunk-NTFIW3VK.js";import{y as w,z as E}from"./chunk-KCHERKZO.js";import{i as $}from"./chunk-XUJURYN5.js";import{Ib as p,Kb as P,Lb as G,Nb as j,R as I,Xa as N,db as A,ya as T}from"./chunk-COFGQT76.js";import{b as oe}from"./chunk-JA2QZ635.js";import{d as O,f as S,p as b}from"./chunk-3VYOLEQE.js";import{e as k,g as v}from"./chunk-VKWPEFWQ.js";v();v();var r=k(q(),1),l=k(re(),1);function se(e,t){return e instanceof Error&&"code"in e&&e.code==="ENOENT"&&"path"in e&&typeof e.path=="string"&&S(e.path)===S(t)}async function F(e,t){try{return await t()}catch(n){throw e!==void 0&&se(n,e)?new $(`Theme Check config file not found: ${e}`):n}}function ce(e){switch(e){case"error":return r.Severity.ERROR;case"suggestion":case"warning":return r.Severity.WARNING;case"style":case"info":return r.Severity.INFO;case"crash":return}}function U(e){switch(e){case r.Severity.ERROR:return"error";case r.Severity.WARNING:return"warning";case r.Severity.INFO:return"info"}}function ae(e){return new Map(e.map(t=>[t.uri,t.source]))}function ue(e,t,n){let o=e.split(`
2
2
  `).slice(t,n+1),s=o.length===1;return o.map((c,a)=>{let u=t+a+1,d=s?c.trim():c;return`${u} ${d}`}).join(`
3
3
  `)}function fe(e){switch(e){case r.Severity.ERROR:return{error:`
4
4
  [error]:`};case r.Severity.WARNING:return{warn:`
@@ -1,4 +1,4 @@
1
- import{b as A}from"./chunk-DGMRL5DQ.js";import{b as w}from"./chunk-FW5HGFSZ.js";import{j as g}from"./chunk-L5XWYTHY.js";import{i as a}from"./chunk-FCULF3JA.js";import{Aa as m,Ib as y,Kb as v,ya as u}from"./chunk-YJWNM4XO.js";import{b as L}from"./chunk-JA2QZ635.js";import{f as h,i as f}from"./chunk-3VYOLEQE.js";import{e as x,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",b="X-Shopify-Surface",R="cli",F=["shopify.dev"];async function S(t,e,p){let c;try{c=new URL(t)}catch{throw new a(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new a(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await g(t,{headers:{Accept:U,[b]:R,...p?{"Accept-Language":p}:{}}});if(!i.ok)throw new a(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let l=await i.text();if(e){let o=h(e);await m(f(o)),await u(o,l),v(`Saved ${t} to ${o}`);return}y(l)}var n=x(L(),1),r=class t extends w{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. Pass `--language` for the language of the app you are building so code examples match your stack. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
1
+ import{b as A}from"./chunk-2KBTFKSM.js";import{b as w}from"./chunk-CUZQRXTV.js";import{j as g}from"./chunk-VWYZCCRE.js";import{i as a}from"./chunk-XUJURYN5.js";import{Aa as m,Ib as y,Kb as v,ya as u}from"./chunk-COFGQT76.js";import{b as L}from"./chunk-JA2QZ635.js";import{f as h,i as f}from"./chunk-3VYOLEQE.js";import{e as x,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",b="X-Shopify-Surface",R="cli",F=["shopify.dev"];async function S(t,e,p){let c;try{c=new URL(t)}catch{throw new a(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new a(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await g(t,{headers:{Accept:U,[b]:R,...p?{"Accept-Language":p}:{}}});if(!i.ok)throw new a(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let l=await i.text();if(e){let o=h(e);await m(f(o)),await u(o,l),v(`Saved ${t} to ${o}`);return}y(l)}var n=x(L(),1),r=class t extends w{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. Pass `--language` for the language of the app you are building so code examples match your stack. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
2
2
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# filter code examples to the language of the app you are building
3
3
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --language ruby`,`# save the document to a file instead of printing it
4
4
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`];static flags={...A,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),language:n.Flags.string({description:"Filter code examples in the returned Markdown to this language. Supply the language of the app you are building so examples match your stack. Optional \u2014 if omitted, or if shopify.dev does not recognize the language for a given page, the document includes examples in every language.",env:"SHOPIFY_FLAG_LANGUAGE",options:["javascript","typescript","python","ruby","php","rust","curl","liquid","graphql","html"]}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})};async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output,e.language)}};export{r as a};
@@ -1 +1 @@
1
- import{h as l}from"./chunk-R757TSQ6.js";import{K as c}from"./chunk-L5XWYTHY.js";import{i as u}from"./chunk-FCULF3JA.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function x(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function b(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,x as b,p as c,b as d,a as e};
1
+ import{h as l}from"./chunk-NSHKVJST.js";import{K as c}from"./chunk-VWYZCCRE.js";import{i as u}from"./chunk-XUJURYN5.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function x(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function b(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,x as b,p as c,b as d,a as e};
@@ -1 +1 @@
1
- import{g as o}from"./chunk-DGMRL5DQ.js";import{b as s}from"./chunk-FW5HGFSZ.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{g as o}from"./chunk-2KBTFKSM.js";import{b as s}from"./chunk-CUZQRXTV.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1 +1 @@
1
- import{b as u}from"./chunk-5XO6PAMV.js";import{b as r,c as I,e as p}from"./chunk-WNO2V53C.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-ZLV5W4TV.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-5FQ3L5PA.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=o(t[r.unitTest]):o(t[r.unitTest])}function G(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
1
+ import{b as u}from"./chunk-5XO6PAMV.js";import{b as r,c as I,e as p}from"./chunk-WNO2V53C.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-Y33QBYY5.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-MCWAHFXK.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=o(t[r.unitTest]):o(t[r.unitTest])}function G(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
@@ -1,4 +1,4 @@
1
- import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-SXPWOYLT.js";import{b as Tr}from"./chunk-JOJRABPY.js";import{a as _r}from"./chunk-OETFY7FE.js";import{a as Cr}from"./chunk-OM243CQ6.js";import{a as Ir}from"./chunk-ZPCCSPAE.js";import{a as gr}from"./chunk-WU7MSL3I.js";import{a as wr}from"./chunk-CSRNHTHO.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-6ILP6QCH.js";import{a as Rr}from"./chunk-TSLZNTFM.js";import{a as Er}from"./chunk-44QTWXOJ.js";import{a as br}from"./chunk-ADW7ECNU.js";import{a as Ar}from"./chunk-LQLFMDVD.js";import{a as Sr}from"./chunk-O6E7YL7N.js";import{a as ar}from"./chunk-2YFB3PTV.js";import{a as lr}from"./chunk-7IGMIDKK.js";import{a as pr}from"./chunk-22LJALHJ.js";import{a as dr}from"./chunk-GJJBOCKD.js";import{g as ur}from"./chunk-NTVEJYKI.js";import{a as Xe}from"./chunk-QBGSSUJP.js";import{c as Je,m as Ze}from"./chunk-ZHJ6KA43.js";import{a as mr}from"./chunk-5HEBS5DG.js";import{a as fr}from"./chunk-WPUQTUDX.js";import{a as cr}from"./chunk-72HS7MHV.js";import{b as ir,g as _e,j as Qe}from"./chunk-R757TSQ6.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-PVOWU77O.js";import{d as hr}from"./chunk-QJST4LZX.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-PBBZNGS4.js";import{a as M,b as Ye}from"./chunk-Z3XIZMEM.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-CHLSNYF7.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-KVROYIUQ.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-55PABKRC.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-7Y4X5I6N.js";import{a as Lr}from"./chunk-Q3O3AFZT.js";import{a as Xr}from"./chunk-JROJL6RV.js";import{a as Jr}from"./chunk-YGFEUXKQ.js";import{a as kr}from"./chunk-JTPVSO6Y.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-2KLXRVGQ.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-Q45XAEG2.js";import{d as Yt}from"./chunk-4A7FPJVT.js";import{a as K}from"./chunk-6RBCFXJT.js";import{b as Qt,e as Re}from"./chunk-DGMRL5DQ.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-L5XWYTHY.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-SKRUMRB4.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-YTJ3EPD3.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-G54BKNIX.js";import{i as A,l as X}from"./chunk-FCULF3JA.js";import{a as _o}from"./chunk-TO7TXDLU.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-YJWNM4XO.js";import{e as Vt,g as zt}from"./chunk-SGBLCVUX.js";import{b as Cn}from"./chunk-JA2QZ635.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-3VYOLEQE.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
1
+ import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-ADIHYUQC.js";import{b as Tr}from"./chunk-5ZSN73EA.js";import{a as _r}from"./chunk-S3IDGHAZ.js";import{a as Cr}from"./chunk-UJD7OQ3I.js";import{a as Ir}from"./chunk-23ITMFUO.js";import{a as gr}from"./chunk-NWBAD3AV.js";import{a as wr}from"./chunk-W6TPRWEE.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-LEFAUWKH.js";import{a as Rr}from"./chunk-VEIZLSMG.js";import{a as Er}from"./chunk-F34MAI7X.js";import{a as br}from"./chunk-GILHUPUG.js";import{a as Ar}from"./chunk-GF75CMTJ.js";import{a as Sr}from"./chunk-JCOQDVEB.js";import{a as ar}from"./chunk-AZCPTV4A.js";import{a as lr}from"./chunk-NYNSMHKY.js";import{a as pr}from"./chunk-T7BUP75N.js";import{a as dr}from"./chunk-SKK7CPUY.js";import{g as ur}from"./chunk-LAHZ6FO5.js";import{a as Xe}from"./chunk-5UDBNXNH.js";import{c as Je,m as Ze}from"./chunk-3UZYLXCB.js";import{a as mr}from"./chunk-JCVQB6MX.js";import{a as fr}from"./chunk-OJ7KRWUH.js";import{a as cr}from"./chunk-FJCNEHTH.js";import{b as ir,g as _e,j as Qe}from"./chunk-NSHKVJST.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-UVSXPMUN.js";import{d as hr}from"./chunk-3GVSG4S6.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-ZDRQUKLN.js";import{a as M,b as Ye}from"./chunk-LRKJSNM3.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-254XYKPN.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-QH5R32AA.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-55JDA75S.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-2FHVYY3B.js";import{a as Lr}from"./chunk-33D7HGAI.js";import{a as Xr}from"./chunk-STLYSBD5.js";import{a as Jr}from"./chunk-MINDMVTH.js";import{a as kr}from"./chunk-RFDOSK57.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-AKSOCKVF.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-WBTR5JZ6.js";import{d as Yt}from"./chunk-LOKVWZD2.js";import{a as K}from"./chunk-7AD5YCLL.js";import{b as Qt,e as Re}from"./chunk-2KBTFKSM.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-VWYZCCRE.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-KCHERKZO.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-YTJ3EPD3.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-WR2MMFJO.js";import{i as A,l as X}from"./chunk-XUJURYN5.js";import{a as _o}from"./chunk-QPCDSJ4J.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-COFGQT76.js";import{e as Vt,g as zt}from"./chunk-C4QR7Z4N.js";import{b as Cn}from"./chunk-JA2QZ635.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-3VYOLEQE.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
2
2
  ${P.json(s)}
3
3
  `,e.stdout),n===j.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===j.Dispatch){let a=cs(o,e);Do(t,a,e)}else n===j.Log&&as(s,e)}}function Fo(t,e){return r=>{let o={event:j.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};g(b`Sending websocket update event to the websocket clients:
4
4
  ${P.json(o)}
@@ -1 +1 @@
1
- import{n as A}from"./chunk-NTVEJYKI.js";import{a as P}from"./chunk-UFU2LGFK.js";import{c as C}from"./chunk-ECEOBSGD.js";import{s as T}from"./chunk-R757TSQ6.js";import{r as w}from"./chunk-P3Z5RLVV.js";import{a as D}from"./chunk-5HONV6NQ.js";import{K as u}from"./chunk-L5XWYTHY.js";import{B as y,z as h}from"./chunk-SKRUMRB4.js";import{Nb as O,za as p}from"./chunk-YJWNM4XO.js";import{d,q as m}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
1
+ import{n as A}from"./chunk-LAHZ6FO5.js";import{a as P}from"./chunk-JJ4MYCVU.js";import{c as C}from"./chunk-NZRQKFUB.js";import{s as T}from"./chunk-NSHKVJST.js";import{r as w}from"./chunk-2AZXDU2R.js";import{a as D}from"./chunk-4AXLWDKW.js";import{K as u}from"./chunk-VWYZCCRE.js";import{B as y,z as h}from"./chunk-KCHERKZO.js";import{Nb as O,za as p}from"./chunk-COFGQT76.js";import{d,q as m}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};