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
@@ -0,0 +1 @@
1
+ import{ja as a,ka as b,la as c}from"./chunk-VWYZCCRE.js";import"./chunk-ZDF5N422.js";import"./chunk-NTFIW3VK.js";import"./chunk-MPW2YJWU.js";import"./chunk-QF6EH4HX.js";import"./chunk-32B4LIKH.js";import"./chunk-GHO2S3W3.js";import"./chunk-T7KHS6RF.js";import"./chunk-KCHERKZO.js";import"./chunk-7Y7AZRL3.js";import"./chunk-HQK6QRXN.js";import"./chunk-TH4D7IGZ.js";import"./chunk-5HBIIYSK.js";import"./chunk-GB3YC4TI.js";import"./chunk-YTJ3EPD3.js";import"./chunk-YRHFPXC3.js";import"./chunk-IUUKRTKF.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-WR2MMFJO.js";import"./chunk-XUJURYN5.js";import"./chunk-636CTEW7.js";import"./chunk-PTS7J2JO.js";import"./chunk-COFGQT76.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-C4QR7Z4N.js";import"./chunk-5XO6PAMV.js";import"./chunk-WNO2V53C.js";import"./chunk-JA2QZ635.js";import"./chunk-JD5P5RAJ.js";import"./chunk-3VYOLEQE.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
@@ -0,0 +1 @@
1
+ import{ma as a,na as b,oa as c,pa as d,qa as e,ra as f,sa as g}from"./chunk-VWYZCCRE.js";import"./chunk-ZDF5N422.js";import"./chunk-NTFIW3VK.js";import"./chunk-MPW2YJWU.js";import"./chunk-QF6EH4HX.js";import"./chunk-32B4LIKH.js";import"./chunk-GHO2S3W3.js";import"./chunk-T7KHS6RF.js";import"./chunk-KCHERKZO.js";import"./chunk-7Y7AZRL3.js";import"./chunk-HQK6QRXN.js";import"./chunk-TH4D7IGZ.js";import"./chunk-5HBIIYSK.js";import"./chunk-GB3YC4TI.js";import"./chunk-YTJ3EPD3.js";import"./chunk-YRHFPXC3.js";import"./chunk-IUUKRTKF.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-WR2MMFJO.js";import"./chunk-XUJURYN5.js";import"./chunk-636CTEW7.js";import"./chunk-PTS7J2JO.js";import"./chunk-COFGQT76.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-C4QR7Z4N.js";import"./chunk-5XO6PAMV.js";import"./chunk-WNO2V53C.js";import"./chunk-JA2QZ635.js";import"./chunk-JD5P5RAJ.js";import"./chunk-3VYOLEQE.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-VKWPEFWQ.js";export{g as compileData,d as recordError,f as recordEvent,e as recordRetry,c as recordTiming,b as reportAnalyticsEvent,a as sendAnalyticsEventFromStdin};
package/dist/bootstrap.js CHANGED
@@ -1 +1 @@
1
- import{a as r,b as c}from"./chunk-VZUHMW5E.js";import{a as n}from"./chunk-DGMRL5DQ.js";import{a as t}from"./chunk-GALDYSEX.js";import"./chunk-T7KHS6RF.js";import"./chunk-5XO6PAMV.js";import"./chunk-WNO2V53C.js";import"./chunk-JA2QZ635.js";import"./chunk-JD5P5RAJ.js";import"./chunk-3VYOLEQE.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import{e as i,g as e}from"./chunk-VKWPEFWQ.js";e();var s=i(c(),1);(0,s.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{await r(o),process.exit(1)});var m=["SIGINT","SIGTERM","SIGQUIT"];m.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function p({development:o}){await n({moduleURL:import.meta.url,development:o,lazyCommandLoader:t})}var I=p;export{I as default};
1
+ import{a as r,b as c}from"./chunk-NHEUJKAO.js";import{a as n}from"./chunk-2KBTFKSM.js";import{a as t}from"./chunk-YQZPL4K3.js";import"./chunk-T7KHS6RF.js";import"./chunk-5XO6PAMV.js";import"./chunk-WNO2V53C.js";import"./chunk-JA2QZ635.js";import"./chunk-JD5P5RAJ.js";import"./chunk-3VYOLEQE.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import{e as i,g as e}from"./chunk-VKWPEFWQ.js";e();var s=i(c(),1);(0,s.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{await r(o),process.exit(1)});var m=["SIGINT","SIGTERM","SIGQUIT"];m.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function p({development:o}){await n({moduleURL:import.meta.url,development:o,lazyCommandLoader:t})}var I=p;export{I as default};
@@ -1,3 +1,3 @@
1
- import{a as h}from"./chunk-YBQKJHZW.js";import{p as m,v as a}from"./chunk-P3Z5RLVV.js";import{b as n}from"./chunk-DGMRL5DQ.js";import{oa as t}from"./chunk-L5XWYTHY.js";import{W as s}from"./chunk-YJWNM4XO.js";import{b as f}from"./chunk-JA2QZ635.js";import{e as u,g as i}from"./chunk-VKWPEFWQ.js";i();var r=u(f(),1);var o=class extends a{static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as h}from"./chunk-YFR53MWF.js";import{p as m,v as a}from"./chunk-2AZXDU2R.js";import{b as n}from"./chunk-2KBTFKSM.js";import{oa as t}from"./chunk-VWYZCCRE.js";import{W as s}from"./chunk-COFGQT76.js";import{b as f}from"./chunk-JA2QZ635.js";import{e as u,g as i}from"./chunk-VKWPEFWQ.js";i();var r=u(f(),1);var o=class extends a{static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
2
2
 
3
3
  This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;static description=this.descriptionForHelp();static flags={...n,...m,force:r.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:r.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};static multiEnvironmentsFlags=["store","password","path"];async command(e,p,d,g,c){let l={environment:e.environment,force:e.force,noColor:e["no-color"],password:e.password,path:e.path,store:e.store,theme:s("creative"),unpublished:!0,listing:e.listing};t("theme-command:share"),await h(l,p,d,c),t("theme-command:share")}};export{o as a};
@@ -1,4 +1,4 @@
1
- import{Aa as bt,Cb as kt,Eb as gs,Ia as cs,Nb as ms,Ta as hs,Ua as us,Xa as fs,_a as ds,fb as ps,qa as wt,ta as be,ya as ls}from"./chunk-YJWNM4XO.js";import{d as we,g as yt,i as as}from"./chunk-3VYOLEQE.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
1
+ import{Aa as bt,Cb as kt,Eb as gs,Ia as cs,Nb as ms,Ta as hs,Ua as us,Xa as fs,_a as ds,fb as ps,qa as wt,ta as be,ya as ls}from"./chunk-COFGQT76.js";import{d as we,g as yt,i as as}from"./chunk-3VYOLEQE.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
2
2
  `?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},wi=Object.prototype.toString,ys=String.prototype.toLowerCase,Qt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function bi(t){return t&&x(t.then)}function _e(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Kt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function h(t){return t=m(t),d(t)?t:k(t)?"":S(t)?t.map(e=>h(e)).join(""):String(t)}function ge(t){return t=m(t),S(t)?t:d(t)&&t.length>0?[t]:Ti(t)?Array.from(t):dt(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=m(t),k(t)?[]:S(t)?t:[t]}function m(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function xt(t){return+m(t)||0}function ft(t){return typeof t=="number"}function Vs(t){return t&&x(t.toLiquid)?Vs(t.toLiquid()):t}function k(t){return t==null}function ki(t){return t===void 0}function S(t){return wi.call(t)==="[object Array]"}function Ps(t){return t&&ft(t.length)}function Ti(t){return dt(t)&&Symbol.iterator in t}function ws(t,e){t=t||{};for(let s in t)if(Qt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function xi(t){return t[t.length-1]}function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Cs(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function oe(t,e,s=" "){return $s(t,e,s,(i,r)=>r+i)}function Si(t,e,s=" "){return $s(t,e,s,(i,r)=>i+r)}function $s(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function js(t){return t}function _i(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function Li(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Oi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=ys.call(t),e=ys.call(e),t<e)?-1:t>e?1:0}function pt(t){return function(...e){return t.call(this,...e.map(m))}}function V(t){return function(...e){return t.call(this,...e.map(xt))}}function*ke(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var bs="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,bs,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:vi(this.token),enumerable:!1}),this.message=zi(this.message,this.token),this.stack=this.message+`
3
3
  `+this.context+`
4
4
  `+this.stack,this.originalError&&(this.stack+=`
@@ -1,4 +1,4 @@
1
- import{a as d}from"./chunk-JTPVSO6Y.js";import{_ as a}from"./chunk-2KLXRVGQ.js";import{b as l,c as g,f as S}from"./chunk-DGMRL5DQ.js";import{e as o}from"./chunk-L5XWYTHY.js";import{b as C}from"./chunk-JA2QZ635.js";import{e as h,g as e}from"./chunk-VKWPEFWQ.js";e();e();var P=["HONOR_BILLING_PRICE","PLAN_PRICE"],T=["OPT_OUT","WHEN_REQUIRED"],f=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=h(C(),1);var u={...l,...d,...g},F={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},y={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},R={...u,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...f]})()},L={...u,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:S(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...F},_={...u,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},v={..._,...y};e();e();var I=o`
1
+ import{a as d}from"./chunk-RFDOSK57.js";import{_ as a}from"./chunk-AKSOCKVF.js";import{b as l,c as g,f as S}from"./chunk-2KBTFKSM.js";import{e as o}from"./chunk-VWYZCCRE.js";import{b as C}from"./chunk-JA2QZ635.js";import{e as h,g as e}from"./chunk-VKWPEFWQ.js";e();e();var P=["HONOR_BILLING_PRICE","PLAN_PRICE"],T=["OPT_OUT","WHEN_REQUIRED"],f=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=h(C(),1);var u={...l,...d,...g},F={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},y={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},R={...u,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...f]})()},L={...u,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:S(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...F},_={...u,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},v={..._,...y};e();e();var I=o`
2
2
  query MigratableAppSubscriptions(
3
3
  $apiKey: String!
4
4
  $first: Int!
@@ -1,3 +1,3 @@
1
- import{a as ne}from"./chunk-XFZDFDZV.js";import{d as ie}from"./chunk-DGMRL5DQ.js";import{a as se,b as q}from"./chunk-FW5HGFSZ.js";import{B as C,K as L,pa as V,ra as U,sa as X,u as w}from"./chunk-L5XWYTHY.js";import{e as x}from"./chunk-QAXFCAOV.js";import{A as N,B as I,E as re,a as Q,x as te}from"./chunk-SKRUMRB4.js";import{b as K}from"./chunk-YTJ3EPD3.js";import{d as Z,e as ee}from"./chunk-G54BKNIX.js";import{i as F,l as oe}from"./chunk-FCULF3JA.js";import{Cb as R,Eb as l,Ja as W,Nb as h,Ya as _}from"./chunk-YJWNM4XO.js";import{b as Ie}from"./chunk-JA2QZ635.js";import{d as Y,f as k,i as J,q as $}from"./chunk-3VYOLEQE.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?W(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${J(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function j(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function D(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function M(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function B(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),j().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),j().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),j().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),D().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),D().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),D().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),M().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),M().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),M().delete(e)}function v(t=S()){let e=B(t);if(!e)throw new oe("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??B();if(!e)throw V(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(O.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var G="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${G}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function H(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${G}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=H(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=H(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=H(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var z=class extends q{static baseFlags={...q.baseFlags,...ie};environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(se(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await ne(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),re(s)}async runConcurrent(e){let o=new Q,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await te({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
1
+ import{a as ne}from"./chunk-RDCHRPKV.js";import{d as ie}from"./chunk-2KBTFKSM.js";import{a as se,b as q}from"./chunk-CUZQRXTV.js";import{B as C,K as L,pa as V,ra as U,sa as X,u as w}from"./chunk-VWYZCCRE.js";import{e as x}from"./chunk-QF6EH4HX.js";import{A as N,B as I,E as re,a as Q,x as te}from"./chunk-KCHERKZO.js";import{b as K}from"./chunk-YTJ3EPD3.js";import{d as Z,e as ee}from"./chunk-WR2MMFJO.js";import{i as F,l as oe}from"./chunk-XUJURYN5.js";import{Cb as R,Eb as l,Ja as W,Nb as h,Ya as _}from"./chunk-COFGQT76.js";import{b as Ie}from"./chunk-JA2QZ635.js";import{d as Y,f as k,i as J,q as $}from"./chunk-3VYOLEQE.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?W(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${J(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function j(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function D(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function M(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function B(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),j().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),j().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),j().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),D().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),D().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),D().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),M().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),M().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),M().delete(e)}function v(t=S()){let e=B(t);if(!e)throw new oe("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??B();if(!e)throw V(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(O.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var G="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${G}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function H(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${G}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=H(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=H(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=H(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var z=class extends q{static baseFlags={...q.baseFlags,...ie};environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(se(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await ne(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),re(s)}async runConcurrent(e){let o=new Q,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await te({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
2
2
 
3
3
  ${A.message}`,I({body:[A.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(i=>!i.some(s=>s.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await L(r,n):o??await this.storeAuthSessionForTheme({store:r})??await L(r,n)}async storeAuthSessionForTheme(e){let o=this.storeAuthScopes();if(!o)return;let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!r||n)return;let i=w(r),s=Ae(i);if(s)return this.adminSessionFromStoreAuthSession(s,i,o)}storeAuthSessionsForTheme(e){let o=this.storeAuthScopes();if(!o)return new Map;let r=new Set(e.filter(({store:n,password:i})=>typeof n=="string"&&!i).map(({store:n})=>w(n)));return r.size===0?new Map:new Map(we().map(n=>{let i=w(n.store);if(!r.has(i))return;let s=this.adminSessionFromStoreAuthSession(n,i,o);return s?[i,s]:void 0}).filter(n=>n!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(w(r))}adminSessionFromStoreAuthSession(e,o,r){if(ve(e)){h(`Ignoring stored store auth session for ${o}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){h(`Ignoring stored store auth session for ${o}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return h(`Using stored store auth session for ${o} (scopes: ${e.scopes.join(", ")}).`),C(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e,o){let r=this.expandImpliedStoreAuthScopes(e);return o.every(n=>r.has(n))}validConfig(e,o,r,n){let i=o.filter(s=>Array.isArray(s)?!s.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,s,n)).map(s=>Array.isArray(s)?s.join(" or "):s);return i.length>0?(N({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:i}}]}),i):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Y($(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=X();await Z(()=>({store_fqdn_hash:K(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ee(()=>({store_fqdn:e.storeFqdn}))}};export{G as a,we as b,Ae as c,wt as d,At as e,B as f,He as g,ze as h,Ye as i,Je as j,We as k,Ke as l,Qe as m,Ve as n,Xe as o,O as p,qe as q,le as r,ct as s,ut as t,mt as u,z as v};
@@ -1 +1 @@
1
- import{a as h,b as w}from"./chunk-TMV37ENR.js";import{j as f}from"./chunk-L5XWYTHY.js";import{T as d}from"./chunk-SKRUMRB4.js";import{i}from"./chunk-FCULF3JA.js";import{Ka as m,ra as p}from"./chunk-YJWNM4XO.js";import{d as u}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
1
+ import{a as h,b as w}from"./chunk-SMZ74TME.js";import{j as f}from"./chunk-VWYZCCRE.js";import{T as d}from"./chunk-KCHERKZO.js";import{i}from"./chunk-XUJURYN5.js";import{Ka as m,ra as p}from"./chunk-COFGQT76.js";import{d as u}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-5XO6PAMV.js";import{b as p}from"./chunk-WNO2V53C.js";import{b as C}from"./chunk-JA2QZ635.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as L,g as u}from"./chunk-VKWPEFWQ.js";u();u();import{fileURLToPath as y}from"node:url";async function g(e){let{isDevelopment:o}=await import("./local-KAZJAYLX.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-VQKMCXNH.js"),r=await import("./lib-AD2G3QH3.js"),{run:s,flush:m,Errors:l,settings:f}=r.default??r;o()&&(f.debug=!0);try{let t=new n({root:y(e.moduleURL)});await t.load(),e.lazyCommandLoader&&t.setLazyCommandLoader(e.lazyCommandLoader);let a=e.argv??process.argv.slice(2),i=a.indexOf("--");if((i===-1?a:a.slice(0,i)).includes("--json-schema")||c(process.env.SHOPIFY_FLAG_JSON_SCHEMA)){let{printCommandJsonSchema:I}=await import("./command-json-schema-Y3N2NUZN.js");await I(t,a,e.lazyCommandLoader);return}await s(a,t),await m()}catch(t){let{errorHandler:a}=await import("./error-handler-D5BURRJ7.js");await a(t);let i=t;return l.handle({...i,name:i?.name??"Error",message:i?.message??String(t),stack:i?.stack,skipOclifErrorHandling:!0})}}var d=L(C());async function O(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:s}=await import("./ui-TEZZM7SE.js");s({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function v(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[p.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function H(e,o=g,n=process.argv,r=process.env,s=process.versions){return v(e,n,r),e.runInCreateMode&&await w(e,n),b(n,r),await O(s),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function w(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-RVPONQBY.js"),{moduleDirectory:r}=await import("./path-6YMSTSWG.js"),l=(await n(r(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(t=>t.includes("init"))===-1){let t=o.findIndex(a=>a.match(new RegExp(`bin(\\/|\\\\)+(create-${l}|dev|run)`)))+1;o.splice(t,0,"init")}}var k={...h,"no-color":d.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:d.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},U={json:d.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:p.json})},V={"auth-alias":d.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},P=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return d.Flags.integer({min:1,max:65535,...e,description:o})};function D(e){let o=e.description?.trimEnd(),r=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:r,requiredIfNonInteractive:!0}}async function M(){let{cacheClear:e}=await import("./conf-store-5ZA3ILWV.js");e()}export{H as a,k as b,U as c,V as d,P as e,D as f,M as g};
1
+ import{a as h}from"./chunk-5XO6PAMV.js";import{b as p}from"./chunk-WNO2V53C.js";import{b as C}from"./chunk-JA2QZ635.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as L,g as u}from"./chunk-VKWPEFWQ.js";u();u();import{fileURLToPath as y}from"node:url";async function g(e){let{isDevelopment:o}=await import("./local-77XQ4CX3.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-CP4XJAPS.js"),r=await import("./lib-AD2G3QH3.js"),{run:s,flush:m,Errors:l,settings:f}=r.default??r;o()&&(f.debug=!0);try{let t=new n({root:y(e.moduleURL)});await t.load(),e.lazyCommandLoader&&t.setLazyCommandLoader(e.lazyCommandLoader);let a=e.argv??process.argv.slice(2),i=a.indexOf("--");if((i===-1?a:a.slice(0,i)).includes("--json-schema")||c(process.env.SHOPIFY_FLAG_JSON_SCHEMA)){let{printCommandJsonSchema:I}=await import("./command-json-schema-SU56F3T4.js");await I(t,a,e.lazyCommandLoader);return}await s(a,t),await m()}catch(t){let{errorHandler:a}=await import("./error-handler-24QGAUUD.js");await a(t);let i=t;return l.handle({...i,name:i?.name??"Error",message:i?.message??String(t),stack:i?.stack,skipOclifErrorHandling:!0})}}var d=L(C());async function O(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:s}=await import("./ui-SYB4LLWY.js");s({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function v(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[p.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function H(e,o=g,n=process.argv,r=process.env,s=process.versions){return v(e,n,r),e.runInCreateMode&&await w(e,n),b(n,r),await O(s),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function w(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-6UZUTDCP.js"),{moduleDirectory:r}=await import("./path-6YMSTSWG.js"),l=(await n(r(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(t=>t.includes("init"))===-1){let t=o.findIndex(a=>a.match(new RegExp(`bin(\\/|\\\\)+(create-${l}|dev|run)`)))+1;o.splice(t,0,"init")}}var k={...h,"no-color":d.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:d.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},U={json:d.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:p.json})},V={"auth-alias":d.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},P=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return d.Flags.integer({min:1,max:65535,...e,description:o})};function D(e){let o=e.description?.trimEnd(),r=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:r,requiredIfNonInteractive:!0}}async function M(){let{cacheClear:e}=await import("./conf-store-WDYDHG6V.js");e()}export{H as a,k as b,U as c,V as d,P as e,D as f,M as g};
@@ -1 +1 @@
1
- import{a as p}from"./chunk-ZUVAHONX.js";import{a as r,b as c}from"./chunk-SDFO7P2M.js";import{d as s}from"./chunk-4Y22EM45.js";import{a}from"./chunk-YGFEUXKQ.js";import{Ha as n}from"./chunk-2KLXRVGQ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class d extends a{static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...s};async run(){let{flags:i}=await this.parse(d),{app:m,remoteApp:l}=await n({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),u=await p({action:"schedule",input:i.input??"-",clientId:l.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:r}:{}}),e=c(u,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:m}}};export{t as a};
1
+ import{a as p}from"./chunk-QEF43PR2.js";import{a as r,b as c}from"./chunk-7ZONBOEZ.js";import{d as s}from"./chunk-2AAHKMPP.js";import{a}from"./chunk-MINDMVTH.js";import{Ha as n}from"./chunk-AKSOCKVF.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class d extends a{static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...s};async run(){let{flags:i}=await this.parse(d),{app:m,remoteApp:l}=await n({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),u=await p({action:"schedule",input:i.input??"-",clientId:l.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:r}:{}}),e=c(u,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:m}}};export{t as a};
@@ -1 +1 @@
1
- import{Ia as r}from"./chunk-2KLXRVGQ.js";import{a}from"./chunk-6RBCFXJT.js";import{q as i}from"./chunk-3VYOLEQE.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=3e3;async function n(o){let t;try{if(a.getAllPublicMetadata().api_key!==void 0)return;await Promise.race([r({directory:o,skipPrompts:!0}),new Promise(l=>{t=setTimeout(l,c)})])}catch{}finally{t&&clearTimeout(t)}}var m=async()=>(await n(i()),a.getAllPublicMetadata()),f=m;export{f as a};
1
+ import{Ia as r}from"./chunk-AKSOCKVF.js";import{a}from"./chunk-7AD5YCLL.js";import{q as i}from"./chunk-3VYOLEQE.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=3e3;async function n(o){let t;try{if(a.getAllPublicMetadata().api_key!==void 0)return;await Promise.race([r({directory:o,skipPrompts:!0}),new Promise(l=>{t=setTimeout(l,c)})])}catch{}finally{t&&clearTimeout(t)}}var m=async()=>(await n(i()),a.getAllPublicMetadata()),f=m;export{f as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-HB3MJYBK.js";import{a as I}from"./chunk-RCIU7NHA.js";import{a as x}from"./chunk-QQN4PJZD.js";import{A as R,D as T,F,I as d,L as u,a as A,e as b,f as k,r as _,v}from"./chunk-YX5GRXRS.js";import{b as S}from"./chunk-DGMRL5DQ.js";import{b as w}from"./chunk-FW5HGFSZ.js";import{_ as y,z as g}from"./chunk-SKRUMRB4.js";import{i as a}from"./chunk-FCULF3JA.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var B=5e6,$={readStdin:y,engineVersion:k,writeAgentFindings:v,recordMetadata:I};function E(t){return u(t.record)}function s(t,e){throw new a("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:E(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}])}async function z(t,e){try{return await e.readStdin()}catch(i){throw i instanceof a&&s([i.message],t),i}}async function V(t,e){let i=await z(t,e);if(i===void 0)throw new a("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:E(t)}]]);let n=Buffer.byteLength(i,"utf8");n>B&&s([`The findings document is ${n} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(o){let r=o instanceof Error?o.message:String(o);s([`The findings document is not valid JSON: ${r}`],t)}}async function f(t,e=$){let{selection:i}=t,n=d(i,t.path),o=await V(n,e),r=b(o,{engineVersion:e.engineVersion()});r.ok||s(r.errors,n);let h=R(r.document);h>_&&s([`The recorded findings would be stored as ${h} bytes; the limit is 5 MB. Shorten or remove findings.`],n);let C=await e.writeAgentFindings(i.appDirectory,T(i),r.document),l=r.document.checks.reduce((D,N)=>D+N.findings.length,0);return await e.recordMetadata({num_security_findings:l}),{path:C,checks:r.document.checks.length,findings:l}}function M(t,e,i){let n=d(e,i);g({headline:"Agent findings recorded.",body:[`Recorded ${m(t.checks,"check")} and ${m(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:u(n.review)},"to see the results."]]})}var p=class t extends w{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.";static description=this.descriptionForHelp();static flags={...S,...A};async run(){let{flags:e}=await this.parse(t),i=await F({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await x(i,e.path);let n=await f({selection:i,path:e.path});M(n,i,e.path)}};export{p as a};
1
+ import{a as m}from"./chunk-HB3MJYBK.js";import{a as I}from"./chunk-WR6KP7RT.js";import{a as x}from"./chunk-VX2CDHRQ.js";import{A as R,D as T,F,I as d,L as u,a as A,e as b,f as k,r as _,v}from"./chunk-UZTL2UET.js";import{b as S}from"./chunk-2KBTFKSM.js";import{b as w}from"./chunk-CUZQRXTV.js";import{_ as y,z as g}from"./chunk-KCHERKZO.js";import{i as a}from"./chunk-XUJURYN5.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var B=5e6,$={readStdin:y,engineVersion:k,writeAgentFindings:v,recordMetadata:I};function E(t){return u(t.record)}function s(t,e){throw new a("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:E(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}])}async function z(t,e){try{return await e.readStdin()}catch(i){throw i instanceof a&&s([i.message],t),i}}async function V(t,e){let i=await z(t,e);if(i===void 0)throw new a("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:E(t)}]]);let n=Buffer.byteLength(i,"utf8");n>B&&s([`The findings document is ${n} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(o){let r=o instanceof Error?o.message:String(o);s([`The findings document is not valid JSON: ${r}`],t)}}async function f(t,e=$){let{selection:i}=t,n=d(i,t.path),o=await V(n,e),r=b(o,{engineVersion:e.engineVersion()});r.ok||s(r.errors,n);let h=R(r.document);h>_&&s([`The recorded findings would be stored as ${h} bytes; the limit is 5 MB. Shorten or remove findings.`],n);let C=await e.writeAgentFindings(i.appDirectory,T(i),r.document),l=r.document.checks.reduce((D,N)=>D+N.findings.length,0);return await e.recordMetadata({num_security_findings:l}),{path:C,checks:r.document.checks.length,findings:l}}function M(t,e,i){let n=d(e,i);g({headline:"Agent findings recorded.",body:[`Recorded ${m(t.checks,"check")} and ${m(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:u(n.review)},"to see the results."]]})}var p=class t extends w{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.";static description=this.descriptionForHelp();static flags={...S,...A};async run(){let{flags:e}=await this.parse(t),i=await F({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await x(i,e.path);let n=await f({selection:i,path:e.path});M(n,i,e.path)}};export{p as a};
@@ -1,4 +1,4 @@
1
- import{a as E}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-YGFEUXKQ.js";import{a as w}from"./chunk-JTPVSO6Y.js";import{Ha as y,L as F,i as C,ja as x}from"./chunk-2KLXRVGQ.js";import{b as f}from"./chunk-LV2IWYGL.js";import{b as v}from"./chunk-DGMRL5DQ.js";import{Cb as o,Eb as p,Ib as h,Xa as g,qa as u,ya as l}from"./chunk-YJWNM4XO.js";import{b as $}from"./chunk-JA2QZ635.js";import{f as c}from"./chunk-3VYOLEQE.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=E(i??"",r);return p`Updated ${o.path(e)} to be:
1
+ import{a as E}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-MINDMVTH.js";import{a as w}from"./chunk-RFDOSK57.js";import{Ha as y,L as F,i as C,ja as x}from"./chunk-AKSOCKVF.js";import{b as f}from"./chunk-I4FS7HYY.js";import{b as v}from"./chunk-2KBTFKSM.js";import{Cb as o,Eb as p,Ib as h,Xa as g,qa as u,ya as l}from"./chunk-COFGQT76.js";import{b as $}from"./chunk-JA2QZ635.js";import{f as c}from"./chunk-3VYOLEQE.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=E(i??"",r);return p`Updated ${o.path(e)} to be:
2
2
 
3
3
  ${r}
4
4
 
@@ -0,0 +1 @@
1
+ import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.9.1";export{o as a};
@@ -1 +1 @@
1
- import{o as n}from"./chunk-6GA56I3E.js";import{H as s}from"./chunk-SKRUMRB4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
1
+ import{o as n}from"./chunk-NTFIW3VK.js";import{H as s}from"./chunk-KCHERKZO.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
@@ -1 +1 @@
1
- import{j as m}from"./chunk-L5XWYTHY.js";import{a as k,b as G}from"./chunk-74HXMIDM.js";import{f as H}from"./chunk-G54BKNIX.js";import{i as u}from"./chunk-FCULF3JA.js";import{Aa as x,Cb as p,Eb as l,Nb as h,Sa as R,Ta as T,oa as g,ya as y}from"./chunk-YJWNM4XO.js";import{d as $,i as b}from"./chunk-3VYOLEQE.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
1
+ import{j as m}from"./chunk-VWYZCCRE.js";import{a as k,b as G}from"./chunk-GHO2S3W3.js";import{f as H}from"./chunk-WR2MMFJO.js";import{i as u}from"./chunk-XUJURYN5.js";import{Aa as x,Cb as p,Eb as l,Nb as h,Sa as R,Ta as T,oa as g,ya as y}from"./chunk-COFGQT76.js";import{d as $,i as b}from"./chunk-3VYOLEQE.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-AS2O62JX.js";import{a as t}from"./chunk-6IL3B5Z5.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
1
+ import{a as r}from"./chunk-OUSRNKZG.js";import{a as t}from"./chunk-DYHRCMH6.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
@@ -1,4 +1,4 @@
1
- import{k as P,t as F}from"./chunk-R757TSQ6.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-NYABB6XW.js";import{I as H,K as q,k as $,pa as d,ra as h}from"./chunk-L5XWYTHY.js";import{a as x}from"./chunk-RGIUP4FW.js";import{B as I,C as L,T as v}from"./chunk-SKRUMRB4.js";import{i as l}from"./chunk-FCULF3JA.js";import{Cb as C,Eb as U,Nb as c}from"./chunk-YJWNM4XO.js";import{u as O}from"./chunk-SGBLCVUX.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
1
+ import{k as P,t as F}from"./chunk-NSHKVJST.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-ZQKZC2KN.js";import{I as H,K as q,k as $,pa as d,ra as h}from"./chunk-VWYZCCRE.js";import{a as x}from"./chunk-32B4LIKH.js";import{B as I,C as L,T as v}from"./chunk-KCHERKZO.js";import{i as l}from"./chunk-XUJURYN5.js";import{Cb as C,Eb as U,Nb as c}from"./chunk-COFGQT76.js";import{u as O}from"./chunk-C4QR7Z4N.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
2
2
 
3
3
  -Request ID: ${i.headers.get("x-request-id")??"unknown"}
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as s,c as i,d as n}from"./chunk-QILWHHAQ.js";import{b as a,c as r}from"./chunk-DGMRL5DQ.js";import{b as e}from"./chunk-FW5HGFSZ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends e{static summary="Check whether auto-upgrade is enabled, disabled, or not yet configured.";static descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
1
+ import{a as s,c as i,d as n}from"./chunk-QNR3U4IO.js";import{b as a,c as r}from"./chunk-2KBTFKSM.js";import{b as e}from"./chunk-CUZQRXTV.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends e{static summary="Check whether auto-upgrade is enabled, disabled, or not yet configured.";static 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,2 +1,2 @@
1
- import{a as N,b as $,c as w}from"./chunk-TNXZWQZU.js";import{j as T}from"./chunk-L5XWYTHY.js";import{a as D,b}from"./chunk-74HXMIDM.js";import{S as P,T as k,a as F}from"./chunk-SKRUMRB4.js";import{l as A}from"./chunk-FCULF3JA.js";import{Ba as y,Da as _,Ma as U,Nb as u,Pa as I,R as x,Ta as O,Ya as p}from"./chunk-YJWNM4XO.js";import{g as h}from"./chunk-SGBLCVUX.js";import{d as m,i as l,j as S}from"./chunk-3VYOLEQE.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let i=B(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!K(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{port;provider=w;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
1
+ import{a as N,b as $,c as w}from"./chunk-YACDI6IK.js";import{j as T}from"./chunk-VWYZCCRE.js";import{a as D,b}from"./chunk-GHO2S3W3.js";import{S as P,T as k,a as F}from"./chunk-KCHERKZO.js";import{l as A}from"./chunk-XUJURYN5.js";import{Ba as y,Da as _,Ma as U,Nb as u,Pa as I,R as x,Ta as O,Ya as p}from"./chunk-COFGQT76.js";import{g as h}from"./chunk-C4QR7Z4N.js";import{d as m,i as l,j as S}from"./chunk-3VYOLEQE.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let i=B(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!K(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{port;provider=w;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
2
2
  `);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;a??=at(s),ct(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
@@ -1,4 +1,4 @@
1
- import{b as u,c as m}from"./chunk-DGMRL5DQ.js";import{b as h}from"./chunk-FW5HGFSZ.js";import{N as i}from"./chunk-SKRUMRB4.js";import{a as n}from"./chunk-5RL6DKWR.js";import{Ib as p,b as s}from"./chunk-YJWNM4XO.js";import{b as g}from"./chunk-JA2QZ635.js";import{e as S,g as e}from"./chunk-VKWPEFWQ.js";e();e();async function f(t){let r=new URLSearchParams;return r.append("search",t??""),{url:`https://shopify.dev/docs?${r.toString()}`}}e();e();var o=n({name:"SearchResult",schema:s.object({url:s.string().url()})});async function l(t,r){r==="json"?p(o.encode(t)):await i(t.url)}var d=S(g(),1),a=class t extends h{static descriptionWithMarkdown="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 description=this.descriptionForHelp();static usage="search [query]";static examples=[`# open the search modal on Shopify.dev
1
+ import{b as u,c as m}from"./chunk-2KBTFKSM.js";import{b as h}from"./chunk-CUZQRXTV.js";import{N as i}from"./chunk-KCHERKZO.js";import{a as n}from"./chunk-IUUKRTKF.js";import{Ib as p,b as s}from"./chunk-COFGQT76.js";import{b as g}from"./chunk-JA2QZ635.js";import{e as S,g as e}from"./chunk-VKWPEFWQ.js";e();e();async function f(t){let r=new URLSearchParams;return r.append("search",t??""),{url:`https://shopify.dev/docs?${r.toString()}`}}e();e();var o=n({name:"SearchResult",schema:s.object({url:s.string().url()})});async function l(t,r){r==="json"?p(o.encode(t)):await i(t.url)}var d=S(g(),1),a=class t extends h{static descriptionWithMarkdown="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 description=this.descriptionForHelp();static usage="search [query]";static 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 i}from"./chunk-2W6M7YDY.js";import{b as e}from"./chunk-FW5HGFSZ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static description="View the UI kit components prompts";static hidden=!0;async run(){await i()}};export{t as a};
1
+ import{a as i}from"./chunk-EVQPVO4P.js";import{b as e}from"./chunk-CUZQRXTV.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static description="View the UI kit components prompts";static hidden=!0;async run(){await i()}};export{t as a};
@@ -1,2 +1,2 @@
1
- import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-YJWNM4XO.js";import{d as i}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
1
+ import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-COFGQT76.js";import{d as i}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
2
2
  *`)),t}export{c as a};
@@ -1,4 +1,4 @@
1
- import{o as R}from"./chunk-SKRUMRB4.js";import{i as E}from"./chunk-FCULF3JA.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-YJWNM4XO.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){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=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;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{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;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}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="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 Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[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(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`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=u({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
1
+ import{o as R}from"./chunk-KCHERKZO.js";import{i as E}from"./chunk-XUJURYN5.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-COFGQT76.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){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=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;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{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;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}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="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 Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[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(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`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=u({...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=u(JSON.parse(t));return e===V?new l(r):e===U?new h(r):e===q?new d(r):e===J?new y(r):r},ue=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(p(`Token: ${s}
3
3
  `),p(`API Key: ${e.apiKey}
4
4
  `),f&&f.length>0){let c=f.join(", ");throw await R({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];p(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),a!==void 0&&p(`Success: ${a}
@@ -1 +1 @@
1
- import{b as E}from"./chunk-DGMRL5DQ.js";import{b}from"./chunk-FW5HGFSZ.js";import{Q as F,R as N}from"./chunk-SKRUMRB4.js";import{Kb as k,W as C,Xa as w,qa as O}from"./chunk-YJWNM4XO.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-SGBLCVUX.js";import{b as U}from"./chunk-JA2QZ635.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-3VYOLEQE.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
1
+ import{b as E}from"./chunk-2KBTFKSM.js";import{b}from"./chunk-CUZQRXTV.js";import{Q as F,R as N}from"./chunk-KCHERKZO.js";import{Kb as k,W as C,Xa as w,qa as O}from"./chunk-COFGQT76.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-C4QR7Z4N.js";import{b as U}from"./chunk-JA2QZ635.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-3VYOLEQE.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
@@ -1,3 +1,3 @@
1
- import{a as A}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-OEZATTOS.js";import{f as C}from"./chunk-G54BKNIX.js";import{i as n}from"./chunk-FCULF3JA.js";import{Cb as a,Eb as s,Ia as b,Nb as u,Xa as I,_a as G}from"./chunk-YJWNM4XO.js";import{a as k,r as g}from"./chunk-SGBLCVUX.js";import{q as w}from"./chunk-3VYOLEQE.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var R=D(A());async function r(e,t){try{return(await f("git",e,{cwd:t})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(e,t="main"){if(t.startsWith("-"))throw new n(`Invalid initial branch name: ${t}. Branch names can't start with a hyphen.`);u(s`Initializing git repository at ${a.path(e)}...`),await m(),await r(["init"],e),await r(["checkout","-b",t],e)}async function Q(e,t){try{return(await r(["check-ignore",...t],e)).split(`
1
+ import{a as A}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-TH4D7IGZ.js";import{f as C}from"./chunk-WR2MMFJO.js";import{i as n}from"./chunk-XUJURYN5.js";import{Cb as a,Eb as s,Ia as b,Nb as u,Xa as I,_a as G}from"./chunk-COFGQT76.js";import{a as k,r as g}from"./chunk-C4QR7Z4N.js";import{q as w}from"./chunk-3VYOLEQE.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var R=D(A());async function r(e,t){try{return(await f("git",e,{cwd:t})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(e,t="main"){if(t.startsWith("-"))throw new n(`Invalid initial branch name: ${t}. Branch names can't start with a hyphen.`);u(s`Initializing git repository at ${a.path(e)}...`),await m(),await r(["init"],e),await r(["checkout","-b",t],e)}async function Q(e,t){try{return(await r(["check-ignore",...t],e)).split(`
2
2
  `).filter(Boolean)}catch(o){if(o instanceof n&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(e){return C("cmd_all_timing_network_ms")(async()=>{let{repoUrl:t,destination:o,shallow:i,latestTag:l}=e;if(u(s`Git-cloning repository ${t} into ${a.path(o)}...`),await m(),await I(o)){if(!await b(o))throw new n(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await G(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new n(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[E,d]=t.split("#");if(d&&l)throw new n("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&l)throw new n("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let h=["clone","--recurse-submodules"];d&&h.push("--branch",d),i&&h.push("--depth","1"),k()||h.push("-c","core.askpass=true"),h.push(E,o);try{if(await f("git",h),l){let c=await S(o,t);await r(["checkout",c],o)}}catch(c){if(c instanceof n)throw c;if(c instanceof Error){let x=new n(c.message);throw x.stack=c.stack,x}throw c}})}async function S(e,t){let o=await F(e);if(!o)throw new n(`Couldn't obtain the most recent tag of the repository ${t}`);return o}async function X(e){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],e);if(!o.trim())throw new n("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=o.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Y(e){await r(["add","--all"],e)}async function Z(e,t){let o=["commit","-m",e];if(t?.author){if(t.author.startsWith("-"))throw new n(`Invalid commit author: ${t.author}. Author name/email can't start with a hyphen.`);o.push("--author",t.author)}return await r(o,t?.directory),(await r(["rev-parse","HEAD"],t?.directory)).trim()}async function m(){if(!await g())throw new n("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var p=class extends n{};async function N(e){if(await m(),!await v(e))throw new p(`${a.path(e??w())} is not a Git directory`)}async function tt(e){return await g()?v(e):!1}async function v(e){try{return await f("git",["rev-parse","--git-dir"],{cwd:e}),!0}catch(t){if(t instanceof Error&&"exitCode"in t&&t.exitCode===128)return!1;throw t}}var y=class extends n{};async function et(e){if(!await T(e))throw new y(`${a.path(e??w())} is not a clean Git directory`)}async function T(e){return(await r(["status","--porcelain"],e)).trim()===""}async function F(e){try{return(await r(["describe","--tags","--abbrev=0"],e)).trim()||void 0}catch(t){if(t instanceof n&&"exitCode"in t&&t.exitCode===128)return;throw t}}async function ot(e,t="origin"){if(u(s`Removing git remote ${t} from ${a.path(e)}...`),await m(),!(await r(["remote"],e)).split(`
3
3
  `).filter(Boolean).includes(t)){u(s`Remote ${t} does not exist, no action needed`);return}await r(["remote","remove",t],e)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,tt as h,y as i,et as j,T as k,ot as l};
@@ -1,2 +1,2 @@
1
- import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as A}from"./chunk-55PABKRC.js";import{a as se}from"./chunk-JROJL6RV.js";import{a as re}from"./chunk-YGFEUXKQ.js";import{a as K}from"./chunk-JTPVSO6Y.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-2KLXRVGQ.js";import{sa as W}from"./chunk-Q45XAEG2.js";import{b as Q,c as Y}from"./chunk-DGMRL5DQ.js";import{u as $}from"./chunk-L5XWYTHY.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-SKRUMRB4.js";import{i as C}from"./chunk-FCULF3JA.js";import{Ib as F,Kb as I,ga as V}from"./chunk-YJWNM4XO.js";import{b as Ce}from"./chunk-JA2QZ635.js";import{j}from"./chunk-3VYOLEQE.js";import{e as k,g}from"./chunk-VKWPEFWQ.js";g();g();g();g();g();g();var _=k(N(),1);function be(t){let s=(0,_.useRef)(t);(0,_.useEffect)(()=>{s.current=t},[t]),(0,_.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:l})=>{l&&(n=setTimeout(i,l))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}g();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:a})=>{let l=await i.appLogs({jwtToken:t,cursor:s},a),{errors:f,status:u}=l;if(u!==200){if(u===401||u===429||u>=500)return{errors:f.map(y=>({status:u,message:y}))};throw new C(`${f.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=l,E=_e(c,n);return{cursor:r,appLogs:E}};function _e(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let a=s.status===void 0?!0:i.status===s.status,l=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return a&&l})),n}var R=k(N(),1);async function Ne({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:a,setErrors:l,setAppLogOutputs:f,resubscribeCallback:u,developerPlatformClient:r}){let c=t,E=L,y=s,b=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:a}),p="not_attempted",w=b;if(w.errors){let h=await v({response:w,onThrottle:d=>{l(["Request throttled while polling app logs.",`Retrying in ${d/1e3}s`])},onUnknownError:d=>{l(["Error while polling app logs",`Retrying in ${d/1e3}s`])},onResubscribe:()=>u()});p=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),E=h.retryIntervalMs}else{l(d=>d.length?[]:d);let{appLogs:h}=b;if(y=b.cursor,h)for(let d of h){let T,S,q,J=i.get(d.shop_id.toString());if(J===void 0)continue;switch(d.log_type){case ce:T=fe(d.payload),S=`export "${T.export}" executed in ${(T.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:T=de(d.payload),S="network access response retrieved from cache";break;case pe:T=ge(d.payload),S="network access request executing in background";break;case me:T=Ee(d.payload),q=T.connectTimeMs&&T.writeReadTimeMs?T.connectTimeMs+T.writeReadTimeMs:null,S=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let Se={status:d.status==="success"?"Success":"Failure",source:d.source,storeName:J,description:S,logTimestamp:V(d.log_timestamp)};T&&f(ke=>[...ke,{appLog:T,prefix:Se}])}}return{nextJwtToken:c,retryIntervalMs:E,cursor:y??s,resubscribeResult:p}}function we({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l}){let[f,u]=(0,R.useState)([]),[r,c]=(0,R.useState)([]),E=(0,R.useRef)(t),y=(0,R.useRef)(0),b=(0,R.useRef)(""),p=(0,R.useRef)(0),w=(0,R.useCallback)(async()=>{let h=await Ne({jwtToken:E.current,cursor:b.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:a,organizationId:l});if(h.resubscribeResult==="failed"){if(p.current+=1,p.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(p.current=0);return E.current=h.nextJwtToken,b.current=h.cursor,y.current=h.retryIntervalMs,{retryIntervalMs:y.current}},[]);return be(w),{appLogOutputs:r,errors:f}}var e=k(N(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l})=>{let{appLogOutputs:f,errors:u}=we({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l});return e.default.createElement(e.default.Fragment,null,f.map(({appLog:r,prefix:c},E)=>e.default.createElement(m,{flexDirection:"column",key:E},e.default.createElement(m,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(m,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(m,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(m,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(m,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(m,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(N(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a}){let l=async()=>A(n,s,a);return H(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:l,storeNameById:i,developerPlatformClient:n,organizationId:a}))}g();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:l=0}){let f=await U({pollOptions:t,developerPlatformClient:n,organizationId:a}),u=L,r=t.jwtToken,c=l,E=f;if(E.errors){let p=await v({response:E,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,a)});if(p.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else p.resubscribeResult==="succeeded"&&(c=0);p.nextJwtToken&&(r=p.nextJwtToken),u=p.retryIntervalMs}else c=0;let{cursor:y,appLogs:b}=f;b&&b.forEach(p=>{let w=i.get(p.shop_id?.toString());w!==void 0&&F(ye({appLog:p,appLogPayload:Te(p.payload,p.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:y??t.cursor,filters:t.filters},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:c}).catch(p=>{throw p})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,a=await Me(t),l=he(s);if(l.length===0)throw new C("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let y=t.sources.filter(b=>!l.includes(b));if(y.length)throw new C(`Invalid sources: ${y.join(", ")}. Valid sources are: ${l.join(", ")}`)}let f={shopIds:a.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,f,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"&&F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(`Waiting for app logs...
1
+ import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as A}from"./chunk-55JDA75S.js";import{a as se}from"./chunk-STLYSBD5.js";import{a as re}from"./chunk-MINDMVTH.js";import{a as K}from"./chunk-RFDOSK57.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-AKSOCKVF.js";import{sa as W}from"./chunk-WBTR5JZ6.js";import{b as Q,c as Y}from"./chunk-2KBTFKSM.js";import{u as $}from"./chunk-VWYZCCRE.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-KCHERKZO.js";import{i as C}from"./chunk-XUJURYN5.js";import{Ib as F,Kb as I,ga as V}from"./chunk-COFGQT76.js";import{b as Ce}from"./chunk-JA2QZ635.js";import{j}from"./chunk-3VYOLEQE.js";import{e as k,g}from"./chunk-VKWPEFWQ.js";g();g();g();g();g();g();var _=k(N(),1);function be(t){let s=(0,_.useRef)(t);(0,_.useEffect)(()=>{s.current=t},[t]),(0,_.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:l})=>{l&&(n=setTimeout(i,l))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}g();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:a})=>{let l=await i.appLogs({jwtToken:t,cursor:s},a),{errors:f,status:u}=l;if(u!==200){if(u===401||u===429||u>=500)return{errors:f.map(y=>({status:u,message:y}))};throw new C(`${f.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=l,E=_e(c,n);return{cursor:r,appLogs:E}};function _e(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let a=s.status===void 0?!0:i.status===s.status,l=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return a&&l})),n}var R=k(N(),1);async function Ne({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:a,setErrors:l,setAppLogOutputs:f,resubscribeCallback:u,developerPlatformClient:r}){let c=t,E=L,y=s,b=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:a}),p="not_attempted",w=b;if(w.errors){let h=await v({response:w,onThrottle:d=>{l(["Request throttled while polling app logs.",`Retrying in ${d/1e3}s`])},onUnknownError:d=>{l(["Error while polling app logs",`Retrying in ${d/1e3}s`])},onResubscribe:()=>u()});p=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),E=h.retryIntervalMs}else{l(d=>d.length?[]:d);let{appLogs:h}=b;if(y=b.cursor,h)for(let d of h){let T,S,q,J=i.get(d.shop_id.toString());if(J===void 0)continue;switch(d.log_type){case ce:T=fe(d.payload),S=`export "${T.export}" executed in ${(T.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:T=de(d.payload),S="network access response retrieved from cache";break;case pe:T=ge(d.payload),S="network access request executing in background";break;case me:T=Ee(d.payload),q=T.connectTimeMs&&T.writeReadTimeMs?T.connectTimeMs+T.writeReadTimeMs:null,S=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let Se={status:d.status==="success"?"Success":"Failure",source:d.source,storeName:J,description:S,logTimestamp:V(d.log_timestamp)};T&&f(ke=>[...ke,{appLog:T,prefix:Se}])}}return{nextJwtToken:c,retryIntervalMs:E,cursor:y??s,resubscribeResult:p}}function we({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l}){let[f,u]=(0,R.useState)([]),[r,c]=(0,R.useState)([]),E=(0,R.useRef)(t),y=(0,R.useRef)(0),b=(0,R.useRef)(""),p=(0,R.useRef)(0),w=(0,R.useCallback)(async()=>{let h=await Ne({jwtToken:E.current,cursor:b.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:a,organizationId:l});if(h.resubscribeResult==="failed"){if(p.current+=1,p.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(p.current=0);return E.current=h.nextJwtToken,b.current=h.cursor,y.current=h.retryIntervalMs,{retryIntervalMs:y.current}},[]);return be(w),{appLogOutputs:r,errors:f}}var e=k(N(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l})=>{let{appLogOutputs:f,errors:u}=we({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l});return e.default.createElement(e.default.Fragment,null,f.map(({appLog:r,prefix:c},E)=>e.default.createElement(m,{flexDirection:"column",key:E},e.default.createElement(m,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(m,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(m,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(m,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(m,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(m,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(N(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a}){let l=async()=>A(n,s,a);return H(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:l,storeNameById:i,developerPlatformClient:n,organizationId:a}))}g();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:l=0}){let f=await U({pollOptions:t,developerPlatformClient:n,organizationId:a}),u=L,r=t.jwtToken,c=l,E=f;if(E.errors){let p=await v({response:E,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,a)});if(p.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else p.resubscribeResult==="succeeded"&&(c=0);p.nextJwtToken&&(r=p.nextJwtToken),u=p.retryIntervalMs}else c=0;let{cursor:y,appLogs:b}=f;b&&b.forEach(p=>{let w=i.get(p.shop_id?.toString());w!==void 0&&F(ye({appLog:p,appLogPayload:Te(p.payload,p.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:y??t.cursor,filters:t.filters},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:c}).catch(p=>{throw p})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,a=await Me(t),l=he(s);if(l.length===0)throw new C("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let y=t.sources.filter(b=>!l.includes(b));if(y.length)throw new C(`Invalid sources: ${y.join(", ")}. Valid sources are: ${l.join(", ")}`)}let f={shopIds:a.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,f,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"&&F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(`Waiting for app logs...
2
2
  `),await(t.format==="json"?D:Ie)({options:{variables:f,developerPlatformClient:i},pollOptions:c,storeNameById:a.storeNameById,organizationId:t.organization.id})}async function Me(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:a,organization:l}=t,f=j(s.configPath);Le(n.title,a.shopDomain,t.storeFqdns,f,l.businessName);let u=new Map;return u.set(a.shopId,a.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let E=await W(l,c,i);u.set(E.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Le(t,s,n,i,a){let l=n&&n.length>0?n:[s],f=i?X(i):void 0;G({headline:i?`Using ${f} for default values:`:"Using these settings:",body:Z({appName:t,org:a,devStores:l,messages:[ee]})})}var O=k(Ce(),1);var B=class t extends re{static summary="Stream detailed logs for your Shopify app.";static descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";static description=this.descriptionForHelp();static flags={...Q,...K,...Y,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async s=>$(s)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};async run(){let{flags:s}=await this.parse(t);await z(s.path);let n=await te({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await se({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),a={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(a),{app:n.app}}};export{B as a};
@@ -1,4 +1,4 @@
1
- import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as H,i as _}from"./chunk-PVOWU77O.js";import{a as I}from"./chunk-YGFEUXKQ.js";import{a as b}from"./chunk-JTPVSO6Y.js";import{Ha as T,ia as P}from"./chunk-2KLXRVGQ.js";import{f as l}from"./chunk-DGMRL5DQ.js";import{D as p,F as g,J as v}from"./chunk-SKRUMRB4.js";import{Lb as h,Ob as m,Qb as w}from"./chunk-YJWNM4XO.js";import{b as G}from"./chunk-JA2QZ635.js";import{j as y}from"./chunk-3VYOLEQE.js";import{e as q,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function M(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!k(o,e))return`Invalid address.
1
+ import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as H,i as _}from"./chunk-UVSXPMUN.js";import{a as I}from"./chunk-MINDMVTH.js";import{a as b}from"./chunk-RFDOSK57.js";import{Ha as T,ia as P}from"./chunk-AKSOCKVF.js";import{f as l}from"./chunk-2KBTFKSM.js";import{D as p,F as g,J as v}from"./chunk-KCHERKZO.js";import{Lb as h,Ob as m,Qb as w}from"./chunk-COFGQT76.js";import{b as G}from"./chunk-JA2QZ635.js";import{j as y}from"./chunk-3VYOLEQE.js";import{e as q,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function M(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!k(o,e))return`Invalid address.
2
2
  ${d(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
3
3
  `)}async function x(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:c}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(P({appName:s.title,configFile:y(c.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function O(e,t,r){let o=await A(e,r);return t?L(t,o):C(o)}async function B(e,t,r,o){let s=await M(e,t,o);return r?H(r,t,s):V(s)}async function N(e,t){let r=e??_(t)??await R(),o=t??await D(r);return F(o,r)}async function Y(e){let t=await z(e);await W(t)}async function z(e){let t=await O(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await N(e.deliveryMethod,e.address),c=await x(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:c.apiKey,clientSecret:c.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function W(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await S(e.developerPlatformClient,t,e.organizationId);if(!r.success){m(`Request errors:
4
4
  ${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await E(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}m("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
@@ -1 +1 @@
1
- import{d as l}from"./chunk-ZHJ6KA43.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-P3Z5RLVV.js";import{J as n}from"./chunk-SKRUMRB4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
1
+ import{d as l}from"./chunk-3UZYLXCB.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-2AZXDU2R.js";import{J as n}from"./chunk-KCHERKZO.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
@@ -1,3 +1,3 @@
1
- import{b as R}from"./chunk-J3JPJCWP.js";import{a as x,l as M,n as Y}from"./chunk-NTVEJYKI.js";import{a as U}from"./chunk-UFU2LGFK.js";import{a as G,c as p}from"./chunk-ECEOBSGD.js";import{a as O}from"./chunk-GVRFO4CV.js";import{a as S,b as L}from"./chunk-YY6TFARF.js";import{a as H}from"./chunk-LYPNQFWX.js";import{k as A,n as I}from"./chunk-R757TSQ6.js";import{p as D,q as E,r as P,u as _,v as C}from"./chunk-P3Z5RLVV.js";import{h as $,k as V}from"./chunk-IISE7SBT.js";import{b}from"./chunk-DGMRL5DQ.js";import{K as g,oa as m}from"./chunk-L5XWYTHY.js";import{H as k,z as F}from"./chunk-SKRUMRB4.js";import{_a as T}from"./chunk-YJWNM4XO.js";import{b as Q}from"./chunk-JA2QZ635.js";import{q as f}from"./chunk-3VYOLEQE.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function B(e,t,o,n,r,l){let i=W(o,n,r),a=X(o,e,n,t),s=[...i,...a,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await k(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function W(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function X(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let h=s.checksum;return o.files.get(s.key)?.checksum!==h});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return R(l,_,(s,h)=>({title:`Downloading files from remote theme ${i({current:h,total:l.length})}`,task:async()=>J(t,o,s,n)}))}async function J(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function K(e,t,o,n){m("theme-service:pull:setup"),U({verbose:e.verbose,noColor:e.noColor});let r=t??await g(P({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:a,nodelete:s,live:h,development:u,only:q,ignore:N,force:y,environment:w}=e;if(!await te(a??f(),y??!1,w?.[0],o))return;let j=await H(r,{header:"Select a theme to open",filter:{live:h,theme:u?`${i?.id}`:e.theme}});m("theme-service:pull:setup"),await Z(j,r,{environment:w?.[0],force:y??!1,ignore:N??[],multiEnvironment:o,nodelete:s??!1,only:q??[],path:a??f()},n)}async function Z(e,t,o,n){m("theme-service:pull:file-system");let r=M(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);m("theme-service:pull:file-system"),await B(e,t,i,r,o,n);let a=o.environment?`Environment: ${o.environment}`:"";F({headline:a,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function ee(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function te(e,t,o,n){return t?!0:!(!await ee(e)&&!await Y(e)&&!await p(t,void 0,o,n)||await $(e)&&!await V(e)&&!await p(t,"The current Git directory has uncommitted changes.",o,n))}var d=z(Q(),1);var v=class extends C{static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
1
+ import{b as R}from"./chunk-J3JPJCWP.js";import{a as x,l as M,n as Y}from"./chunk-LAHZ6FO5.js";import{a as U}from"./chunk-JJ4MYCVU.js";import{a as G,c as p}from"./chunk-NZRQKFUB.js";import{a as O}from"./chunk-LIB64ZJW.js";import{a as S,b as L}from"./chunk-YY6TFARF.js";import{a as H}from"./chunk-P6ID3ULA.js";import{k as A,n as I}from"./chunk-NSHKVJST.js";import{p as D,q as E,r as P,u as _,v as C}from"./chunk-2AZXDU2R.js";import{h as $,k as V}from"./chunk-5I5HKOQU.js";import{b}from"./chunk-2KBTFKSM.js";import{K as g,oa as m}from"./chunk-VWYZCCRE.js";import{H as k,z as F}from"./chunk-KCHERKZO.js";import{_a as T}from"./chunk-COFGQT76.js";import{b as Q}from"./chunk-JA2QZ635.js";import{q as f}from"./chunk-3VYOLEQE.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function B(e,t,o,n,r,l){let i=W(o,n,r),a=X(o,e,n,t),s=[...i,...a,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await k(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function W(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function X(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let h=s.checksum;return o.files.get(s.key)?.checksum!==h});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return R(l,_,(s,h)=>({title:`Downloading files from remote theme ${i({current:h,total:l.length})}`,task:async()=>J(t,o,s,n)}))}async function J(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function K(e,t,o,n){m("theme-service:pull:setup"),U({verbose:e.verbose,noColor:e.noColor});let r=t??await g(P({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:a,nodelete:s,live:h,development:u,only:q,ignore:N,force:y,environment:w}=e;if(!await te(a??f(),y??!1,w?.[0],o))return;let j=await H(r,{header:"Select a theme to open",filter:{live:h,theme:u?`${i?.id}`:e.theme}});m("theme-service:pull:setup"),await Z(j,r,{environment:w?.[0],force:y??!1,ignore:N??[],multiEnvironment:o,nodelete:s??!1,only:q??[],path:a??f()},n)}async function Z(e,t,o,n){m("theme-service:pull:file-system");let r=M(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);m("theme-service:pull:file-system"),await B(e,t,i,r,o,n);let a=o.environment?`Environment: ${o.environment}`:"";F({headline:a,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function ee(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function te(e,t,o,n){return t?!0:!(!await ee(e)&&!await Y(e)&&!await p(t,void 0,o,n)||await $(e)&&!await V(e)&&!await p(t,"The current Git directory has uncommitted changes.",o,n))}var d=z(Q(),1);var v=class extends C{static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;static description=this.descriptionForHelp();static flags={...b,...D,...E("download"),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),development:d.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:d.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:d.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:d.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(t,o,n,r,l){m("theme-command:pull"),await K({...t,noColor:t["no-color"]},o,n,l),m("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};export{K as a,v as b};
@@ -1 +1 @@
1
- import{c as n}from"./chunk-DGMRL5DQ.js";import{a as r,b as c,c as l}from"./chunk-LOTGSNS5.js";import{b as i}from"./chunk-FW5HGFSZ.js";import{b as h}from"./chunk-JA2QZ635.js";import{e as f,g as o}from"./chunk-VKWPEFWQ.js";o();var t=f(h(),1);var e=class p extends i{static args={command:t.Args.string({description:"Command to show help for.",required:!1})};static descriptionWithMarkdown="Display help for Shopify CLI";static description=this.descriptionForHelp();static usage="help [command] [flags]";static flags={...n,"nested-commands":t.Flags.boolean({char:"n",description:"Include all nested commands in the output.",env:"SHOPIFY_FLAG_CLI_NESTED_COMMANDS",default:!1})};static strict=!1;static get jsonOutputSchema(){return r}async run(){let{argv:a,flags:s}=await this.parse(p);if(s.json){let d=await c(this.config,a,s["nested-commands"]);l(d);return}let m=await(0,t.loadHelpClass)(this.config);await new m(this.config,{all:s["nested-commands"]}).showHelp(a)}};export{e as a};
1
+ import{c as n}from"./chunk-2KBTFKSM.js";import{a as r,b as c,c as l}from"./chunk-QEEA2KEN.js";import{b as i}from"./chunk-CUZQRXTV.js";import{b as h}from"./chunk-JA2QZ635.js";import{e as f,g as o}from"./chunk-VKWPEFWQ.js";o();var t=f(h(),1);var e=class p extends i{static args={command:t.Args.string({description:"Command to show help for.",required:!1})};static descriptionWithMarkdown="Display help for Shopify CLI";static description=this.descriptionForHelp();static usage="help [command] [flags]";static flags={...n,"nested-commands":t.Flags.boolean({char:"n",description:"Include all nested commands in the output.",env:"SHOPIFY_FLAG_CLI_NESTED_COMMANDS",default:!1})};static strict=!1;static get jsonOutputSchema(){return r}async run(){let{argv:a,flags:s}=await this.parse(p);if(s.json){let d=await c(this.config,a,s["nested-commands"]);l(d);return}let m=await(0,t.loadHelpClass)(this.config);await new m(this.config,{all:s["nested-commands"]}).showHelp(a)}};export{e as a};
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-FW5HGFSZ.js";import{G as f}from"./chunk-SKRUMRB4.js";import{Ib as c}from"./chunk-YJWNM4XO.js";import{b as N}from"./chunk-JA2QZ635.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static 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-CUZQRXTV.js";import{G as f}from"./chunk-KCHERKZO.js";import{Ib as c}from"./chunk-COFGQT76.js";import{b as N}from"./chunk-JA2QZ635.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static 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};