@shopify/cli 4.9.4 → 4.9.5

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 (326) hide show
  1. package/dist/analytics-PBZEKUGU.js +1 -0
  2. package/dist/analytics-WVGBNFGK.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-WEPO4J2F.js → chunk-2EC5SUGK.js} +1 -1
  5. package/dist/{chunk-ZEBMW5KS.js → chunk-2II4W4ZF.js} +1 -1
  6. package/dist/{chunk-YYA5VGDW.js → chunk-2QENUJVG.js} +1 -1
  7. package/dist/{chunk-FO2R6KHG.js → chunk-2RONPKOD.js} +1 -1
  8. package/dist/{chunk-DYPZX7MW.js → chunk-2VGPNRHH.js} +1 -1
  9. package/dist/{chunk-O5FFMTJE.js → chunk-2WDJXERZ.js} +1 -1
  10. package/dist/{chunk-GPRZYFDE.js → chunk-32NWVYUC.js} +1 -1
  11. package/dist/{chunk-73D5O7A3.js → chunk-32RRWGNS.js} +1 -1
  12. package/dist/{chunk-YBSX53QP.js → chunk-32VQQ6EU.js} +1 -1
  13. package/dist/{chunk-IPZ6LUJV.js → chunk-34RFTE5T.js} +1 -1
  14. package/dist/{chunk-LJIJEGND.js → chunk-35NTERVR.js} +1 -1
  15. package/dist/{chunk-PP4VCR4Y.js → chunk-35VQQKVX.js} +1 -1
  16. package/dist/{chunk-AYIU6Z4C.js → chunk-3N6NKC2U.js} +1 -1
  17. package/dist/{chunk-6A4H3HPY.js → chunk-3Q5BAPQK.js} +1 -1
  18. package/dist/{chunk-BVB3DTNE.js → chunk-3XAD2E55.js} +1 -1
  19. package/dist/{chunk-XWQM2NZ2.js → chunk-42DMJGOW.js} +1 -1
  20. package/dist/{chunk-WEXOA4C4.js → chunk-4BXQTW5G.js} +1 -1
  21. package/dist/{chunk-I5PQZRYM.js → chunk-4CTTWXUX.js} +1 -1
  22. package/dist/{chunk-Q37WAD6F.js → chunk-4HBKQUKY.js} +1 -1
  23. package/dist/{chunk-VS7QVU3Z.js → chunk-4IAGBAQD.js} +1 -1
  24. package/dist/{chunk-UIC7K2HX.js → chunk-4MQXMIWQ.js} +1 -1
  25. package/dist/{chunk-AVMNIZAJ.js → chunk-4VS7YD53.js} +1 -1
  26. package/dist/{chunk-HQJ62PII.js → chunk-5APLAJCB.js} +1 -1
  27. package/dist/{chunk-ZEE32UH6.js → chunk-5AQNISGC.js} +1 -1
  28. package/dist/{chunk-DEF2G7S4.js → chunk-5GFVMGAZ.js} +1 -1
  29. package/dist/{chunk-B3M3KIOU.js → chunk-5NCWBBRW.js} +1 -1
  30. package/dist/{chunk-7556AIVG.js → chunk-5O7JTVO2.js} +1 -1
  31. package/dist/{chunk-SNE4RHM4.js → chunk-5OM72O4N.js} +1 -1
  32. package/dist/chunk-5SLKHURV.js +1 -0
  33. package/dist/chunk-5VRB3FBD.js +6 -0
  34. package/dist/{chunk-LOWSU4BB.js → chunk-5XTJ4OL4.js} +1 -1
  35. package/dist/{chunk-UWI76E2L.js → chunk-62GA7XR3.js} +3 -3
  36. package/dist/{chunk-WLWHCUPZ.js → chunk-62LMVFR7.js} +1 -1
  37. package/dist/{chunk-D3KFKT4D.js → chunk-65GNYRYR.js} +2 -2
  38. package/dist/{chunk-OE3HSNSE.js → chunk-72CBJYAG.js} +1 -1
  39. package/dist/{chunk-TFXUDHCP.js → chunk-762IKULK.js} +1 -1
  40. package/dist/{chunk-67EBF76X.js → chunk-7BWSN3SG.js} +1 -1
  41. package/dist/{chunk-GSE6FXZU.js → chunk-7DSH4CRU.js} +1 -1
  42. package/dist/{chunk-QAJZUJR5.js → chunk-7HZU7CYS.js} +1 -1
  43. package/dist/{chunk-BOE2ST6J.js → chunk-7LB6DPB6.js} +1 -1
  44. package/dist/{chunk-UQ6ALA3Y.js → chunk-7Q4EKY3E.js} +1 -1
  45. package/dist/{chunk-47IQIIFX.js → chunk-7YXHILW4.js} +2 -2
  46. package/dist/{chunk-Q43LBSPT.js → chunk-7Z6IX7MU.js} +1 -1
  47. package/dist/{chunk-VNFUCH6T.js → chunk-A4XREDFZ.js} +1 -1
  48. package/dist/{chunk-BIWG3FQQ.js → chunk-AHNLGCHF.js} +1 -1
  49. package/dist/{chunk-7VAKNVFD.js → chunk-AJMJQA4J.js} +1 -1
  50. package/dist/{chunk-XNPUZRWP.js → chunk-ANG44FIF.js} +1 -1
  51. package/dist/{chunk-QTLGMJDW.js → chunk-AODTY2BL.js} +1 -1
  52. package/dist/{chunk-CQF5NDTJ.js → chunk-ARRRFY6S.js} +1 -1
  53. package/dist/{chunk-FQL2WEKX.js → chunk-BAHM64B4.js} +1 -1
  54. package/dist/{chunk-7HNRK2CR.js → chunk-BAP2CHI2.js} +1 -1
  55. package/dist/{chunk-ZTICX3AO.js → chunk-BD2L6YE5.js} +1 -1
  56. package/dist/{chunk-Z6X2GT6Q.js → chunk-BQWK222Q.js} +1 -1
  57. package/dist/{chunk-VMNOSVPT.js → chunk-C3PXIZY3.js} +1 -1
  58. package/dist/{chunk-RUHQNF2W.js → chunk-C6HGU77I.js} +1 -1
  59. package/dist/{chunk-DMNWSUKV.js → chunk-CBFAU5AF.js} +1 -1
  60. package/dist/{chunk-R7YJNDXW.js → chunk-CEQ5S3HH.js} +1 -1
  61. package/dist/{chunk-DMDLJRLW.js → chunk-COP2Q2YT.js} +1 -1
  62. package/dist/{chunk-4IFY7V7W.js → chunk-CSWDRG3E.js} +1 -1
  63. package/dist/{chunk-RJSQMKKS.js → chunk-CVBWEUWX.js} +1 -1
  64. package/dist/{chunk-FK7GA4QQ.js → chunk-D3NVUE65.js} +1 -1
  65. package/dist/{chunk-4ZNBEMRT.js → chunk-DCKRQZLE.js} +3 -3
  66. package/dist/{chunk-MW3IMZJ5.js → chunk-DO5YFMTJ.js} +1 -1
  67. package/dist/{chunk-R74WHKHH.js → chunk-DYH3ZXJS.js} +1 -1
  68. package/dist/{chunk-TPHHQAUD.js → chunk-EAVD3OH2.js} +1 -1
  69. package/dist/{chunk-YTR5JHNJ.js → chunk-EBX6DYDX.js} +1 -1
  70. package/dist/{chunk-C6IBY7NW.js → chunk-EDRCFY3K.js} +1 -1
  71. package/dist/{chunk-UNHT4ZFP.js → chunk-EEAY7HFW.js} +1 -1
  72. package/dist/{chunk-YT27FIQN.js → chunk-EJMLNBZA.js} +2 -2
  73. package/dist/{chunk-MCNK5SJ6.js → chunk-EO3S2TFI.js} +1 -1
  74. package/dist/{chunk-UU6BRRYS.js → chunk-EO422KZZ.js} +1 -1
  75. package/dist/{chunk-J6LQR2F6.js → chunk-EOIGDOUD.js} +1 -1
  76. package/dist/{chunk-K3HUQLIC.js → chunk-EYKXHMEJ.js} +1 -1
  77. package/dist/{chunk-MUM34KUM.js → chunk-EZG5EB7D.js} +1 -1
  78. package/dist/{chunk-N55MSO3X.js → chunk-FHV2H3Z2.js} +1 -1
  79. package/dist/{chunk-LYIXRMQJ.js → chunk-FVTP7EO4.js} +1 -1
  80. package/dist/{chunk-4O7LK5RG.js → chunk-FYIC4JHB.js} +1 -1
  81. package/dist/{chunk-CLD3NZYD.js → chunk-G362JEAV.js} +1 -1
  82. package/dist/{chunk-GE4MLO3C.js → chunk-GF36WNMH.js} +1 -1
  83. package/dist/{chunk-QPQS2YU3.js → chunk-GJ3QUZO6.js} +1 -1
  84. package/dist/{chunk-LJZTSQRD.js → chunk-GJZVUEMP.js} +1 -1
  85. package/dist/{chunk-5JIJDUXX.js → chunk-GP6O7YRO.js} +1 -1
  86. package/dist/{chunk-2PDVBGQH.js → chunk-GW424AJO.js} +1 -1
  87. package/dist/{chunk-6HPUOCFF.js → chunk-GXSF6NCR.js} +1 -1
  88. package/dist/chunk-GYVQIRBD.js +1 -0
  89. package/dist/{chunk-JYGZD4HM.js → chunk-H3ZPYOQV.js} +1 -1
  90. package/dist/{chunk-RXTLNUPF.js → chunk-H7YSZKZ2.js} +1 -1
  91. package/dist/{chunk-3V4VL3SD.js → chunk-HB4YI2PF.js} +4 -4
  92. package/dist/{chunk-37BGAWAW.js → chunk-HMWQOQAQ.js} +1 -1
  93. package/dist/{chunk-HPM3HF7A.js → chunk-HNSRF4SQ.js} +1 -1
  94. package/dist/{chunk-HASIOUH2.js → chunk-HTODXNY6.js} +1 -1
  95. package/dist/{chunk-7A3RW2VM.js → chunk-HY6EXJBZ.js} +1 -1
  96. package/dist/{chunk-LLPB6JN5.js → chunk-IUYVJJKE.js} +1 -1
  97. package/dist/{chunk-KQFA5YTT.js → chunk-JM2CQP64.js} +1 -1
  98. package/dist/{chunk-43URS56H.js → chunk-JPFHPVIO.js} +1 -1
  99. package/dist/{chunk-W4KE7AO6.js → chunk-K4AF7A25.js} +1 -1
  100. package/dist/{chunk-FEQHCE2E.js → chunk-K6FH5JSY.js} +2 -2
  101. package/dist/{chunk-2YVSZFXJ.js → chunk-KDV4WR5A.js} +1 -1
  102. package/dist/{chunk-4TFJ5RW7.js → chunk-KF7NL5YM.js} +1 -1
  103. package/dist/{chunk-SZI6G247.js → chunk-KMJTO7CU.js} +1 -1
  104. package/dist/{chunk-AMLCWRHU.js → chunk-KN3MUEWA.js} +1 -1
  105. package/dist/{chunk-MMQZO2W2.js → chunk-KOS53Z7E.js} +1 -1
  106. package/dist/{chunk-MJZSSCGD.js → chunk-KYB4JX76.js} +1 -1
  107. package/dist/{chunk-PB5ZZET5.js → chunk-LCMDVUVO.js} +1 -1
  108. package/dist/{chunk-45SZ5PSE.js → chunk-LG6DGIFX.js} +1 -1
  109. package/dist/{chunk-SQAS5RVZ.js → chunk-LJAU6YHF.js} +1 -1
  110. package/dist/{chunk-YPCXVZ2N.js → chunk-LLNUIGHP.js} +1 -1
  111. package/dist/{chunk-VGBUN3CZ.js → chunk-LMQOFVRC.js} +1 -1
  112. package/dist/{chunk-Y3PY5LP7.js → chunk-LQSD25YS.js} +1 -1
  113. package/dist/{chunk-QO5RNGWA.js → chunk-M2HQFHNO.js} +1 -1
  114. package/dist/{chunk-GM4EFJJF.js → chunk-M5WBYWSQ.js} +1 -1
  115. package/dist/{chunk-NYYXH2SX.js → chunk-MF7IHOM5.js} +1 -1
  116. package/dist/{chunk-PVAZCZSY.js → chunk-MQ4WV4B6.js} +1 -1
  117. package/dist/{chunk-PO5T44H3.js → chunk-MTBABHUB.js} +1 -1
  118. package/dist/{chunk-DSS4ECIH.js → chunk-MWWULCLD.js} +1 -1
  119. package/dist/{chunk-LKXFHYLI.js → chunk-MZL6VM3W.js} +1 -1
  120. package/dist/{chunk-4JGWKUJN.js → chunk-N47RQHEI.js} +1 -1
  121. package/dist/{chunk-G7JW4UIM.js → chunk-ND6O6KT6.js} +1 -1
  122. package/dist/{chunk-CVFPY2SH.js → chunk-NHE46R6C.js} +1 -1
  123. package/dist/{chunk-QUXQM3S3.js → chunk-NRG2WPSM.js} +1 -1
  124. package/dist/{chunk-6MC2BEW4.js → chunk-O2CP7DQE.js} +1 -1
  125. package/dist/chunk-O6FXUKI2.js +2 -0
  126. package/dist/chunk-OHJUEUSA.js +1 -0
  127. package/dist/{chunk-YHESTFMZ.js → chunk-OOKTWSGP.js} +1 -1
  128. package/dist/{chunk-K7D53KSJ.js → chunk-OONMCK7X.js} +1 -1
  129. package/dist/{chunk-R3KSOCMB.js → chunk-OWK2RI4O.js} +1 -1
  130. package/dist/{chunk-PG4S5HJJ.js → chunk-P2UEQJJ4.js} +1 -1
  131. package/dist/{chunk-MW3JKGJH.js → chunk-PFXDXD5O.js} +1 -1
  132. package/dist/{chunk-IGDVKRB4.js → chunk-PIGERIRY.js} +1 -1
  133. package/dist/{chunk-UEBUGSBT.js → chunk-PT3OZEBI.js} +1 -1
  134. package/dist/{chunk-IDKRJ2F4.js → chunk-QBIYAMSH.js} +1 -1
  135. package/dist/{chunk-PHG4DASY.js → chunk-QBJ74XPX.js} +1 -1
  136. package/dist/{chunk-N5AZZYQA.js → chunk-QGFJOTOH.js} +1 -1
  137. package/dist/chunk-QLHPTMIH.js +1 -0
  138. package/dist/{chunk-4TZCRMBJ.js → chunk-QUO4RD3W.js} +1 -1
  139. package/dist/{chunk-HJHS23Q3.js → chunk-RIO5HKD5.js} +1 -1
  140. package/dist/{chunk-ENQXB532.js → chunk-RUDHGUIM.js} +1 -1
  141. package/dist/{chunk-7HWMURCW.js → chunk-RW3P3UMU.js} +2 -2
  142. package/dist/{chunk-RSC5NQAT.js → chunk-S6A7TMR4.js} +1 -1
  143. package/dist/{chunk-66YRAUWX.js → chunk-S7EKUSO6.js} +1 -1
  144. package/dist/{chunk-NGSEF3UX.js → chunk-SEXH4EP5.js} +1 -1
  145. package/dist/{chunk-ONF7XXEL.js → chunk-SJ2ROSXG.js} +1 -1
  146. package/dist/{chunk-HSYMUYEZ.js → chunk-SNTRSP5K.js} +1 -1
  147. package/dist/{chunk-NU5WLZ6Y.js → chunk-SUTVPAJF.js} +1 -1
  148. package/dist/{chunk-ALK66U3O.js → chunk-SYCN2GT2.js} +1 -1
  149. package/dist/{chunk-S36VGP37.js → chunk-T3UCIWRH.js} +1 -1
  150. package/dist/{chunk-3LHE4GIX.js → chunk-TBNEN73P.js} +1 -1
  151. package/dist/{chunk-Y743UVBS.js → chunk-TVI7TQ4C.js} +1 -1
  152. package/dist/{chunk-TVCWDEVS.js → chunk-UEQT7TA4.js} +1 -1
  153. package/dist/{chunk-7SJHVJ3W.js → chunk-UUM367NR.js} +1 -1
  154. package/dist/{chunk-XNVOKAF2.js → chunk-V5FZRNXI.js} +1 -1
  155. package/dist/{chunk-EO4YJFMY.js → chunk-VG5ZDVDQ.js} +1 -1
  156. package/dist/{chunk-EMH7OHCW.js → chunk-VNG2I7NM.js} +1 -1
  157. package/dist/{chunk-3G2ZQ2EF.js → chunk-VSFZEGIK.js} +1 -1
  158. package/dist/{chunk-PFXNBHQQ.js → chunk-VTOPYXHO.js} +1 -1
  159. package/dist/{chunk-HLPAVELJ.js → chunk-WEICJ4GW.js} +1 -1
  160. package/dist/{chunk-5BTLE67Z.js → chunk-WGO2GC6I.js} +1 -1
  161. package/dist/{chunk-GZ7VGCVW.js → chunk-WJJXJNNP.js} +1 -1
  162. package/dist/{chunk-NCRWOW6F.js → chunk-WKVFVT3H.js} +1 -1
  163. package/dist/{chunk-XGKCPD6W.js → chunk-XAQUXFN5.js} +1 -1
  164. package/dist/{chunk-RK2V6OIJ.js → chunk-XE6EUHSS.js} +1 -1
  165. package/dist/{chunk-YHCP326A.js → chunk-XFEJS652.js} +1 -1
  166. package/dist/chunk-XI4QEULN.js +1 -0
  167. package/dist/{chunk-35WQTGN3.js → chunk-XP63T4KZ.js} +1 -1
  168. package/dist/{chunk-4OCVXE5Y.js → chunk-XPDHT3Z4.js} +1 -1
  169. package/dist/{chunk-6IMHGT7F.js → chunk-XRCAUZAZ.js} +1 -1
  170. package/dist/{chunk-Y62EMOQA.js → chunk-XSRZWJIJ.js} +1 -1
  171. package/dist/{chunk-F3PZGSOY.js → chunk-XTOOTN4P.js} +1 -1
  172. package/dist/{chunk-LWU5TKNA.js → chunk-XVFQ6CNO.js} +1 -1
  173. package/dist/{chunk-NT4A37HG.js → chunk-Y5VFOLNQ.js} +1 -1
  174. package/dist/{chunk-J4NBPC57.js → chunk-YFJELEVH.js} +1 -1
  175. package/dist/{chunk-6YDLNP4G.js → chunk-YIZAQABE.js} +1 -1
  176. package/dist/{chunk-Q2XLIWG4.js → chunk-YLCYRG2T.js} +1 -1
  177. package/dist/{chunk-A2VCTDKH.js → chunk-YN4FSUFF.js} +1 -1
  178. package/dist/{chunk-4O5GQ3DS.js → chunk-YNJIDLI3.js} +1 -1
  179. package/dist/{chunk-NCVGCVQ5.js → chunk-YRX4E67D.js} +1 -1
  180. package/dist/{chunk-HQY6JM6G.js → chunk-Z2NL6XQK.js} +1 -1
  181. package/dist/{chunk-J4J2YXH3.js → chunk-Z4DESIR5.js} +1 -1
  182. package/dist/{chunk-4ES7BJEK.js → chunk-Z6Z5DPKS.js} +1 -1
  183. package/dist/{chunk-XSMCQLJW.js → chunk-ZOE6WXW6.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-SS4GDJTQ.js → command-json-schema-3RP5P43D.js} +1 -1
  274. package/dist/command-registry.js +1 -1
  275. package/dist/{conf-store-54YJCIDK.js → conf-store-XORTWCKZ.js} +1 -1
  276. package/dist/{custom-oclif-loader-3UBH7Q7R.js → custom-oclif-loader-ZRYPPYIP.js} +1 -1
  277. package/dist/{deprecations-ZX7ZKF6L.js → deprecations-AZDMCRNN.js} +1 -1
  278. package/dist/dist-DTBXLVHF.js +1 -0
  279. package/dist/dist-SOYIDACZ.js +1 -0
  280. package/dist/environments-L42SEHB4.js +1 -0
  281. package/dist/{error-AA6LW3PN.js → error-H6B5BHYC.js} +1 -1
  282. package/dist/error-handler-JB752NKM.js +1 -0
  283. package/dist/{fs-4QZCAEP7.js → fs-XHZY6MNM.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-FKG327CG.js → is-global-2NBDZWLC.js} +1 -1
  294. package/dist/{json-error-32ETFU3V.js → json-error-OHV2KQFY.js} +1 -1
  295. package/dist/{local-R3UAQN7T.js → local-ZZGRGYUP.js} +1 -1
  296. package/dist/{metadata-JWJG4JV4.js → metadata-YQNVKC2R.js} +1 -1
  297. package/dist/{node-package-manager-M4XHUTQR.js → node-package-manager-LN2Y7FQ2.js} +1 -1
  298. package/dist/notifications-system-HWJ3F44U.js +1 -0
  299. package/dist/{os-FEHBQQKP.js → os-MHOCCDIB.js} +1 -1
  300. package/dist/{output-2LS5AOAH.js → output-GILH4S6M.js} +1 -1
  301. package/dist/{system-TMD2LYZM.js → system-6WYK24ET.js} +1 -1
  302. package/dist/tsconfig.tsbuildinfo +1 -1
  303. package/dist/{ui-FNPICAAH.js → ui-RP6SVJUK.js} +1 -1
  304. package/dist/upgrade-5G7FBJJV.js +1 -0
  305. package/dist/version-TOBC7X2C.js +1 -0
  306. package/dist/version-UIRCT6RC.js +1 -0
  307. package/dist/{workerd-TKVRZK2F.js → workerd-ARH2OCYL.js} +1 -1
  308. package/oclif.manifest.json +1 -1
  309. package/package.json +7 -7
  310. package/dist/analytics-APDNTBDE.js +0 -1
  311. package/dist/analytics-LX52KYSE.js +0 -1
  312. package/dist/chunk-3C4WVKSO.js +0 -6
  313. package/dist/chunk-BQ3U3CQV.js +0 -1
  314. package/dist/chunk-GN66BRYF.js +0 -1
  315. package/dist/chunk-KTD7VLHL.js +0 -2
  316. package/dist/chunk-L4DFMMOI.js +0 -1
  317. package/dist/chunk-PWS4VFSD.js +0 -1
  318. package/dist/chunk-XUUIBSLW.js +0 -1
  319. package/dist/dist-JMNE7MP6.js +0 -1
  320. package/dist/dist-M2AXGBOL.js +0 -1
  321. package/dist/environments-KD2IDYPG.js +0 -1
  322. package/dist/error-handler-4VW3AV2G.js +0 -1
  323. package/dist/notifications-system-QVM2JWKB.js +0 -1
  324. package/dist/upgrade-YYPP5VZY.js +0 -1
  325. package/dist/version-OX3MORI6.js +0 -1
  326. package/dist/version-P7D5ME4Z.js +0 -1
@@ -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-GE4MLO3C.js";import{a as se}from"./chunk-EMH7OHCW.js";import{a as re}from"./chunk-PWS4VFSD.js";import{a as K}from"./chunk-PO5T44H3.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-UNHT4ZFP.js";import{sa as W}from"./chunk-Y743UVBS.js";import{b as Q,c as Y}from"./chunk-NU5WLZ6Y.js";import{u as $}from"./chunk-3V4VL3SD.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-47IQIIFX.js";import{i as C}from"./chunk-Q37WAD6F.js";import{Ib as F,Kb as I,ga as V}from"./chunk-UWI76E2L.js";import{b as Ce}from"./chunk-I3J63RFV.js";import{i as j}from"./chunk-6IDEDOXW.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-GF36WNMH.js";import{a as se}from"./chunk-VNG2I7NM.js";import{a as re}from"./chunk-5SLKHURV.js";import{a as K}from"./chunk-MTBABHUB.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-EEAY7HFW.js";import{sa as W}from"./chunk-TVI7TQ4C.js";import{b as Q,c as Y}from"./chunk-SUTVPAJF.js";import{u as $}from"./chunk-HB4YI2PF.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-7YXHILW4.js";import{i as C}from"./chunk-4HBKQUKY.js";import{Ib as F,Kb as I,ga as V}from"./chunk-62GA7XR3.js";import{b as Ce}from"./chunk-I3J63RFV.js";import{i as j}from"./chunk-6IDEDOXW.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 +1 @@
1
- import{a as l,c as b,d as D,e as _}from"./chunk-XGKCPD6W.js";import{g as T,p as y,v as O}from"./chunk-Y3PY5LP7.js";import{b as L,c as S}from"./chunk-NU5WLZ6Y.js";import{e as d}from"./chunk-QTLGMJDW.js";import{y as v}from"./chunk-47IQIIFX.js";import{Eb as s,Ib as F,Nb as a}from"./chunk-UWI76E2L.js";import{b as G}from"./chunk-I3J63RFV.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
1
+ import{a as l,c as b,d as D,e as _}from"./chunk-XAQUXFN5.js";import{g as T,p as y,v as O}from"./chunk-LQSD25YS.js";import{b as L,c as S}from"./chunk-SUTVPAJF.js";import{e as d}from"./chunk-AODTY2BL.js";import{y as v}from"./chunk-7YXHILW4.js";import{Eb as s,Ib as F,Nb as a}from"./chunk-62GA7XR3.js";import{b as G}from"./chunk-I3J63RFV.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
@@ -1,3 +1,3 @@
1
- import{a as h}from"./chunk-35WQTGN3.js";import{p as m,v as a}from"./chunk-Y3PY5LP7.js";import{b as n}from"./chunk-NU5WLZ6Y.js";import{oa as t}from"./chunk-3V4VL3SD.js";import{W as s}from"./chunk-UWI76E2L.js";import{b as f}from"./chunk-I3J63RFV.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-XP63T4KZ.js";import{p as m,v as a}from"./chunk-LQSD25YS.js";import{b as n}from"./chunk-SUTVPAJF.js";import{oa as t}from"./chunk-HB4YI2PF.js";import{W as s}from"./chunk-62GA7XR3.js";import{b as f}from"./chunk-I3J63RFV.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 +1 @@
1
- import{e as c}from"./chunk-BVB3DTNE.js";import{N as s}from"./chunk-3V4VL3SD.js";import{i as p,l as a}from"./chunk-Q37WAD6F.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
1
+ import{e as c}from"./chunk-3XAD2E55.js";import{N as s}from"./chunk-HB4YI2PF.js";import{i as p,l as a}from"./chunk-4HBKQUKY.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
@@ -1,4 +1,4 @@
1
- import{b as u,c as m}from"./chunk-NU5WLZ6Y.js";import{b as h}from"./chunk-4ZNBEMRT.js";import{N as i}from"./chunk-47IQIIFX.js";import{a as n}from"./chunk-7VAKNVFD.js";import{Ib as p,b as s}from"./chunk-UWI76E2L.js";import{b as g}from"./chunk-I3J63RFV.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-SUTVPAJF.js";import{b as h}from"./chunk-DCKRQZLE.js";import{N as i}from"./chunk-7YXHILW4.js";import{a as n}from"./chunk-AJMJQA4J.js";import{Ib as p,b as s}from"./chunk-62GA7XR3.js";import{b as g}from"./chunk-I3J63RFV.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,4 +1,4 @@
1
- import{a as d}from"./chunk-PO5T44H3.js";import{_ as a}from"./chunk-UNHT4ZFP.js";import{b as l,c as g,f as S}from"./chunk-NU5WLZ6Y.js";import{e as o}from"./chunk-3V4VL3SD.js";import{b as C}from"./chunk-I3J63RFV.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-MTBABHUB.js";import{_ as a}from"./chunk-EEAY7HFW.js";import{b as l,c as g,f as S}from"./chunk-SUTVPAJF.js";import{e as o}from"./chunk-HB4YI2PF.js";import{b as C}from"./chunk-I3J63RFV.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 +1 @@
1
- import{a as r}from"./chunk-B3M3KIOU.js";import{a as t}from"./chunk-CQF5NDTJ.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-5NCWBBRW.js";import{a as t}from"./chunk-ARRRFY6S.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 +1 @@
1
- import{b as O,c as b,f as F}from"./chunk-NU5WLZ6Y.js";import{b as L}from"./chunk-4ZNBEMRT.js";import{F as g,t as f,w as p,x as d,y as h,z as S}from"./chunk-3V4VL3SD.js";import{j as r}from"./chunk-QTLGMJDW.js";import{D as w,J as y}from"./chunk-47IQIIFX.js";import{a as m}from"./chunk-7VAKNVFD.js";import{Ib as A,Mb as I,b as n}from"./chunk-UWI76E2L.js";import{b as j}from"./chunk-I3J63RFV.js";import{e as C,g as i}from"./chunk-VKWPEFWQ.js";i();i();var a=m({name:"AuthLoginResult",schema:n.object({status:n.literal("success"),alias:n.string()}).strict()});i();var c="NEW_LOGIN";function _(s,e){let t=[],o=s[e];if(o)for(let[l,x]of Object.entries(o))t.push({label:x.identity.alias??l,value:l});return t}async function q(){let s=await g({},{forceNewSession:!0}),e=await d(s.userId);if(!e){let t=await y({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await h(s.userId,t),t}return e}async function E(){let s=await p(),e=await f(),t=[];return s&&t.push(..._(s,e)),t.length>0&&t.push({label:"Log in with a different account",value:c}),t}async function N(s){if(s){let o=await S(s);if(o)return r(o),s}let e=await E(),t=c;return e.length>0&&(t=await w({message:"Which account would you like to use?",choices:e})),t===c?q():(r(t),e.find(o=>o.value===t)?.label??t)}var v=C(j(),1);var u=class s extends L{static descriptionWithMarkdown="Logs you in to your Shopify account.";static description=this.descriptionForHelp();static flags={...O,...b,alias:F(v.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};static get jsonOutputSchema(){return a}async run(){let{flags:e}=await this.parse(s),t=await N(e.alias);e.json?A(a.encode({status:"success",alias:t})):I(`Current account: ${t}.`)}};export{u as a};
1
+ import{b as O,c as b,f as F}from"./chunk-SUTVPAJF.js";import{b as L}from"./chunk-DCKRQZLE.js";import{F as g,t as f,w as p,x as d,y as h,z as S}from"./chunk-HB4YI2PF.js";import{j as r}from"./chunk-AODTY2BL.js";import{D as w,J as y}from"./chunk-7YXHILW4.js";import{a as m}from"./chunk-AJMJQA4J.js";import{Ib as A,Mb as I,b as n}from"./chunk-62GA7XR3.js";import{b as j}from"./chunk-I3J63RFV.js";import{e as C,g as i}from"./chunk-VKWPEFWQ.js";i();i();var a=m({name:"AuthLoginResult",schema:n.object({status:n.literal("success"),alias:n.string()}).strict()});i();var c="NEW_LOGIN";function _(s,e){let t=[],o=s[e];if(o)for(let[l,x]of Object.entries(o))t.push({label:x.identity.alias??l,value:l});return t}async function q(){let s=await g({},{forceNewSession:!0}),e=await d(s.userId);if(!e){let t=await y({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await h(s.userId,t),t}return e}async function E(){let s=await p(),e=await f(),t=[];return s&&t.push(..._(s,e)),t.length>0&&t.push({label:"Log in with a different account",value:c}),t}async function N(s){if(s){let o=await S(s);if(o)return r(o),s}let e=await E(),t=c;return e.length>0&&(t=await w({message:"Which account would you like to use?",choices:e})),t===c?q():(r(t),e.find(o=>o.value===t)?.label??t)}var v=C(j(),1);var u=class s extends L{static descriptionWithMarkdown="Logs you in to your Shopify account.";static description=this.descriptionForHelp();static flags={...O,...b,alias:F(v.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};static get jsonOutputSchema(){return a}async run(){let{flags:e}=await this.parse(s),t=await N(e.alias);e.json?A(a.encode({status:"success",alias:t})):I(`Current account: ${t}.`)}};export{u as a};
@@ -1,3 +1,3 @@
1
- import{a as S}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-DYPZX7MW.js";import{f as k}from"./chunk-DSS4ECIH.js";import{i}from"./chunk-Q37WAD6F.js";import{Cb as o,Eb as a,Ia as v,Nb as d,Xa as I,_a as E,oa as C}from"./chunk-UWI76E2L.js";import{a as D,r as m}from"./chunk-UEBUGSBT.js";import{p}from"./chunk-6IDEDOXW.js";import{a as T}from"./chunk-CX5CC6P5.js";import{e as G,g as b}from"./chunk-VKWPEFWQ.js";b();var A=G(T()),O=G(S());async function s(t,e){try{return(await f("git",t,{cwd:e})).stdout}catch(r){if(r instanceof Error){let n=new i(r.message);throw n.stack=r.stack,"exitCode"in r&&Object.assign(n,{exitCode:r.exitCode}),n}throw r}}async function Z(t,e="main"){if(e.startsWith("-"))throw new i(`Invalid initial branch name: ${e}. Branch names can't start with a hyphen.`);d(a`Initializing git repository at ${o.path(t)}...`),await w(),await s(["init"],t),await s(["checkout","-b",e],t)}async function V(t,e){try{return(await s(["check-ignore",...e],t)).split(`
2
- `).filter(Boolean)}catch(r){if(r instanceof i&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function tt(t){return k("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:r,shallow:n,latestTag:c}=t;if(d(a`Git-cloning repository ${e} into ${o.path(r)}...`),await w(),await I(r)){if(!await v(r))throw new i(a`Can't clone to ${o.path(r)}`,"The path exists but isn't a directory.");if((await E(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new i(a`Directory ${o.path(r)} already exists and is not empty`,a`Choose a different name or remove the existing directory first.`)}let[h,g]=e.split("#");if(g&&c)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&c)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let l=["clone","--recurse-submodules"];g&&l.push("--branch",g),n&&l.push("--depth","1"),D()||l.push("-c","core.askpass=true"),l.push(h,r);try{if(await f("git",l),c){let u=await _(r,e);await s(["checkout",u],r)}}catch(u){if(u instanceof i)throw u;if(u instanceof Error){let $=new i(u.message);throw $.stack=u.stack,$}throw u}})}async function _(t,e){let r=await L(t);if(!r)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return r}async function et(t){let r=await s(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!r.trim())throw new i("Must have at least one commit to run command",a`Run ${o.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=r.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function rt(t){await s(["add","--all"],t)}async function nt(t,e){let r=["commit","-m",t];if(e?.author){if(e.author.startsWith("-"))throw new i(`Invalid commit author: ${e.author}. Author name/email can't start with a hyphen.`);r.push("--author",e.author)}return await s(r,e?.directory),(await s(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await m())throw new i("Git is necessary in the environment to continue",a`Install ${o.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}function F(t){let e=/^git version (?<version>\d+\.\d+\.\d+)(?<suffix>[.\s-].*)?$/.exec(t.trim()),r=e?.groups?.version;if(!r)return;let c=/^(?:\.rc|-rc\.?)(?<number>\d+)(?:[.\s-].*)?$/.exec(e.groups?.suffix??"")?.groups?.number;return c?`${r}-rc.${c}`:r}async function it(t,e={}){let r=await C(c=>H(t,{cwd:e.cwd,env:{GIT_DIR:c}})),n=F(r);if(!n)throw d(a`Unrecognized git --version output: ${o.raw(JSON.stringify(r.slice(0,200)))}`),new i("Couldn't determine the installed Git version.",`Install Git ${t} or later, then try again.`);if((0,A.lt)(n,t))throw new i(`Git ${t} or later is required, but version ${n} is installed.`,`Upgrade Git to version ${t} or later, then try again.`)}async function H(t,e){let{captureOutput:r}=await import("./system-TMD2LYZM.js");try{return await r("git",["--version"],e)}catch(n){if(n instanceof i)throw n;if(n instanceof Error&&"code"in n&&n.code==="ENOENT")throw new i(`Git ${t} or later is required, but Git isn't installed.`,`Install Git ${t} or later, then try again.`);let c=n instanceof Error?n.message:String(n);d(a`Couldn't run git --version: ${o.raw(c)}`);let h=n instanceof Error&&"stderr"in n&&typeof n.stderr=="string"?n.stderr.trim():"";throw new i(h?`Couldn't run Git to check its version: ${h}`:"Couldn't run Git to check its version.",`Check that Git ${t} or later is installed and can run, then try again.`)}}var y=class extends i{};async function ot(t){if(await w(),!await R(t))throw new y(`${o.path(t??p())} is not a Git directory`)}async function at(t){return await m()?R(t):!1}async function R(t){try{return await f("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var x=class extends i{};async function st(t){if(!await j(t))throw new x(`${o.path(t??p())} is not a clean Git directory`)}async function j(t){return(await s(["status","--porcelain"],t)).trim()===""}async function L(t){try{return(await s(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof i&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ct(t,e="origin"){if(d(a`Removing git remote ${e} from ${o.path(t)}...`),await w(),!(await s(["remote"],t)).split(`
1
+ import{a as S}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-2VGPNRHH.js";import{f as k}from"./chunk-MWWULCLD.js";import{i}from"./chunk-4HBKQUKY.js";import{Cb as o,Eb as a,Ia as v,Nb as d,Xa as I,_a as E,oa as C}from"./chunk-62GA7XR3.js";import{a as D,r as m}from"./chunk-PT3OZEBI.js";import{p}from"./chunk-6IDEDOXW.js";import{a as T}from"./chunk-CX5CC6P5.js";import{e as G,g as b}from"./chunk-VKWPEFWQ.js";b();var A=G(T()),O=G(S());async function s(t,e){try{return(await f("git",t,{cwd:e})).stdout}catch(r){if(r instanceof Error){let n=new i(r.message);throw n.stack=r.stack,"exitCode"in r&&Object.assign(n,{exitCode:r.exitCode}),n}throw r}}async function Z(t,e="main"){if(e.startsWith("-"))throw new i(`Invalid initial branch name: ${e}. Branch names can't start with a hyphen.`);d(a`Initializing git repository at ${o.path(t)}...`),await w(),await s(["init"],t),await s(["checkout","-b",e],t)}async function V(t,e){try{return(await s(["check-ignore",...e],t)).split(`
2
+ `).filter(Boolean)}catch(r){if(r instanceof i&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function tt(t){return k("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:r,shallow:n,latestTag:c}=t;if(d(a`Git-cloning repository ${e} into ${o.path(r)}...`),await w(),await I(r)){if(!await v(r))throw new i(a`Can't clone to ${o.path(r)}`,"The path exists but isn't a directory.");if((await E(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new i(a`Directory ${o.path(r)} already exists and is not empty`,a`Choose a different name or remove the existing directory first.`)}let[h,g]=e.split("#");if(g&&c)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&c)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let l=["clone","--recurse-submodules"];g&&l.push("--branch",g),n&&l.push("--depth","1"),D()||l.push("-c","core.askpass=true"),l.push(h,r);try{if(await f("git",l),c){let u=await _(r,e);await s(["checkout",u],r)}}catch(u){if(u instanceof i)throw u;if(u instanceof Error){let $=new i(u.message);throw $.stack=u.stack,$}throw u}})}async function _(t,e){let r=await L(t);if(!r)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return r}async function et(t){let r=await s(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!r.trim())throw new i("Must have at least one commit to run command",a`Run ${o.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=r.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function rt(t){await s(["add","--all"],t)}async function nt(t,e){let r=["commit","-m",t];if(e?.author){if(e.author.startsWith("-"))throw new i(`Invalid commit author: ${e.author}. Author name/email can't start with a hyphen.`);r.push("--author",e.author)}return await s(r,e?.directory),(await s(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await m())throw new i("Git is necessary in the environment to continue",a`Install ${o.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}function F(t){let e=/^git version (?<version>\d+\.\d+\.\d+)(?<suffix>[.\s-].*)?$/.exec(t.trim()),r=e?.groups?.version;if(!r)return;let c=/^(?:\.rc|-rc\.?)(?<number>\d+)(?:[.\s-].*)?$/.exec(e.groups?.suffix??"")?.groups?.number;return c?`${r}-rc.${c}`:r}async function it(t,e={}){let r=await C(c=>H(t,{cwd:e.cwd,env:{GIT_DIR:c}})),n=F(r);if(!n)throw d(a`Unrecognized git --version output: ${o.raw(JSON.stringify(r.slice(0,200)))}`),new i("Couldn't determine the installed Git version.",`Install Git ${t} or later, then try again.`);if((0,A.lt)(n,t))throw new i(`Git ${t} or later is required, but version ${n} is installed.`,`Upgrade Git to version ${t} or later, then try again.`)}async function H(t,e){let{captureOutput:r}=await import("./system-6WYK24ET.js");try{return await r("git",["--version"],e)}catch(n){if(n instanceof i)throw n;if(n instanceof Error&&"code"in n&&n.code==="ENOENT")throw new i(`Git ${t} or later is required, but Git isn't installed.`,`Install Git ${t} or later, then try again.`);let c=n instanceof Error?n.message:String(n);d(a`Couldn't run git --version: ${o.raw(c)}`);let h=n instanceof Error&&"stderr"in n&&typeof n.stderr=="string"?n.stderr.trim():"";throw new i(h?`Couldn't run Git to check its version: ${h}`:"Couldn't run Git to check its version.",`Check that Git ${t} or later is installed and can run, then try again.`)}}var y=class extends i{};async function ot(t){if(await w(),!await R(t))throw new y(`${o.path(t??p())} is not a Git directory`)}async function at(t){return await m()?R(t):!1}async function R(t){try{return await f("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var x=class extends i{};async function st(t){if(!await j(t))throw new x(`${o.path(t??p())} is not a clean Git directory`)}async function j(t){return(await s(["status","--porcelain"],t)).trim()===""}async function L(t){try{return(await s(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof i&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ct(t,e="origin"){if(d(a`Removing git remote ${e} from ${o.path(t)}...`),await w(),!(await s(["remote"],t)).split(`
3
3
  `).filter(Boolean).includes(e)){d(a`Remote ${e} does not exist, no action needed`);return}await s(["remote","remove",e],t)}export{Z as a,V as b,tt as c,et as d,rt as e,nt as f,it as g,ot as h,at as i,x as j,st as k,j as l,ct as m};
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-PWS4VFSD.js";import{a as k}from"./chunk-PO5T44H3.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-UNHT4ZFP.js";import{b as R}from"./chunk-NU5WLZ6Y.js";import{B as v,H as h,z as g}from"./chunk-47IQIIFX.js";import{d as w}from"./chunk-DSS4ECIH.js";import{k as A}from"./chunk-Q37WAD6F.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
1
+ import{a as C}from"./chunk-5SLKHURV.js";import{a as k}from"./chunk-MTBABHUB.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-EEAY7HFW.js";import{b as R}from"./chunk-SUTVPAJF.js";import{B as v,H as h,z as g}from"./chunk-7YXHILW4.js";import{d as w}from"./chunk-MWWULCLD.js";import{k as A}from"./chunk-4HBKQUKY.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
2
2
  ${s.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
3
3
 
4
4
  `:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class n extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionForHelp();static flags={...R,...k,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(n),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],r=e["allow-deletes"],s=!!(o&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await x({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:s,allowUpdates:o,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};
@@ -1,4 +1,4 @@
1
- import{a as w}from"./chunk-QO5RNGWA.js";import{a as u}from"./chunk-BOE2ST6J.js";import{a as v,b as f}from"./chunk-YY6TFARF.js";import{a as y}from"./chunk-QUXQM3S3.js";import{p as d,v as c}from"./chunk-Y3PY5LP7.js";import{b as p}from"./chunk-NU5WLZ6Y.js";import{N as m,y as s}from"./chunk-47IQIIFX.js";import{b as E}from"./chunk-I3J63RFV.js";import{e as T,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function F(t,e){let r=new u(t),g=(await(e.development?r.find():r.fetch()))?.id,n=await y(t,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${g}`:e.theme}}),l=v(n,t),a=f(n,t);s({body:["Preview information for theme",...w(n),`
1
+ import{a as w}from"./chunk-M2HQFHNO.js";import{a as u}from"./chunk-7LB6DPB6.js";import{a as v,b as f}from"./chunk-YY6TFARF.js";import{a as y}from"./chunk-NRG2WPSM.js";import{p as d,v as c}from"./chunk-LQSD25YS.js";import{b as p}from"./chunk-SUTVPAJF.js";import{N as m,y as s}from"./chunk-7YXHILW4.js";import{b as E}from"./chunk-I3J63RFV.js";import{e as T,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function F(t,e){let r=new u(t),g=(await(e.development?r.find():r.fetch()))?.id,n=await y(t,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${g}`:e.theme}}),l=v(n,t),a=f(n,t);s({body:["Preview information for theme",...w(n),`
2
2
 
3
3
  `,{list:{items:[{link:{label:"Preview your theme",url:l}},{link:{label:"Customize your theme at the theme editor",url:a}}]}}]}),e.editor?await m(a):await m(l)}var o=T(E(),1);var h=class extends c{static summary="Opens the preview of your remote theme.";static descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-LYIXRMQJ.js";import{a as M,l as gt,m as yt}from"./chunk-3LHE4GIX.js";import{s as ie,t as W}from"./chunk-Y3PY5LP7.js";import{a as D,b as O,e as nt,g as rt,i as ot,j as it,k as at,n as ct,p as lt,q as dt,r as oe,s as b,u as ut,w as pt}from"./chunk-Q7BOSHWX.js";import{da as mt}from"./chunk-NCRWOW6F.js";import{pa as L,ra as H}from"./chunk-3V4VL3SD.js";import{A as I,B as te,C as tt,T as st,y as et}from"./chunk-47IQIIFX.js";import{c as Ke}from"./chunk-HILYTMVA.js";import{i as se}from"./chunk-Q37WAD6F.js";import{Aa as Ze,Ca as Qe,Cb as j,Eb as ne,Kb as re,Nb as P,Ob as N,S as Xe,Xa as $,_a as C,ba as $e,fb as ke,qa as k,ya as be}from"./chunk-UWI76E2L.js";import{c as T,f as V,i as Ve,j as q}from"./chunk-6IDEDOXW.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=_e(s),[a=[],u=[]]=_e(n),[p=[],c=[]]=_e(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Xe(l,x=>x.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(P(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=T(e,rs);return await $(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function _e(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),I({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}h();import Ft from"fs/promises";var le=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&N("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{P(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),N(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Ft.writeFile(this.notifyPath,t),await Ft.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),m=de(c,l),x=typeof l=="string"?l:"",f=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:m,value:x,attachment:f})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let m=V(e,l),x=o(m).then(()=>{let f=t.get(m);return s.add(f.key),f.value??f.attachment??""});st(5).then(()=>{s.delete(m)}).catch(()=>{}),r(c,{fileKey:m,onContent:f=>{x.then(g=>{g&&f(g)}).catch(()=>{})},onSync:f=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:m=>m()})},p=new Set(Pt.map(c=>T(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
1
+ import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-FVTP7EO4.js";import{a as M,l as gt,m as yt}from"./chunk-TBNEN73P.js";import{s as ie,t as W}from"./chunk-LQSD25YS.js";import{a as D,b as O,e as nt,g as rt,i as ot,j as it,k as at,n as ct,p as lt,q as dt,r as oe,s as b,u as ut,w as pt}from"./chunk-Q7BOSHWX.js";import{da as mt}from"./chunk-WKVFVT3H.js";import{pa as L,ra as H}from"./chunk-HB4YI2PF.js";import{A as I,B as te,C as tt,T as st,y as et}from"./chunk-7YXHILW4.js";import{c as Ke}from"./chunk-HILYTMVA.js";import{i as se}from"./chunk-4HBKQUKY.js";import{Aa as Ze,Ca as Qe,Cb as j,Eb as ne,Kb as re,Nb as P,Ob as N,S as Xe,Xa as $,_a as C,ba as $e,fb as ke,qa as k,ya as be}from"./chunk-62GA7XR3.js";import{c as T,f as V,i as Ve,j as q}from"./chunk-6IDEDOXW.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=_e(s),[a=[],u=[]]=_e(n),[p=[],c=[]]=_e(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Xe(l,x=>x.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(P(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=T(e,rs);return await $(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function _e(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),I({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}h();import Ft from"fs/promises";var le=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&N("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{P(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),N(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Ft.writeFile(this.notifyPath,t),await Ft.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),m=de(c,l),x=typeof l=="string"?l:"",f=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:m,value:x,attachment:f})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let m=V(e,l),x=o(m).then(()=>{let f=t.get(m);return s.add(f.key),f.value??f.attachment??""});st(5).then(()=>{s.delete(m)}).catch(()=>{}),r(c,{fileKey:m,onContent:f=>{x.then(g=>{g&&f(g)}).catch(()=>{})},onSync:f=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:m=>m()})},p=new Set(Pt.map(c=>T(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <title>${e.title}</title>
@@ -1,4 +1,4 @@
1
- import{b as U,c as w}from"./chunk-TFXUDHCP.js";import{c as O,e as T}from"./chunk-F3PZGSOY.js";import{B as y,m as E,t as N,u as R,v as g,z as _}from"./chunk-3C4WVKSO.js";import{q as S,s as h}from"./chunk-QTLGMJDW.js";import{a as s}from"./chunk-XUUIBSLW.js";import{S as F,W as C,z as x}from"./chunk-47IQIIFX.js";import{i as v}from"./chunk-Q37WAD6F.js";import{Cb as c,Eb as p,Kb as d,Nb as u,Ob as M,tb as D,wb as V,xb as P}from"./chunk-UWI76E2L.js";import{d as J}from"./chunk-UEBUGSBT.js";import{o as $,p as A,q as L}from"./chunk-6IDEDOXW.js";import{a as H}from"./chunk-CX5CC6P5.js";import{e as B,g as I}from"./chunk-VKWPEFWQ.js";I();var Y=B(H());function j(){let e=V();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function fe(e={}){let n=L()??A(),o=P(n),t=D();if(J()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let r=j();if(!r)throw new Error("Could not determine the package manager");let[a,...i]=r.split(" ");if(!a)throw new Error("Could not determine the command to run");let l=g("@shopify/cli",s),q=l?`\u2728 New version of Shopify CLI available! (${s} \u2192 ${l})`:"\u2728 New version of Shopify CLI available!";d(p`${q}
1
+ import{b as U,c as w}from"./chunk-762IKULK.js";import{c as O,e as T}from"./chunk-XTOOTN4P.js";import{B as y,m as E,t as N,u as R,v as g,z as _}from"./chunk-5VRB3FBD.js";import{q as S,s as h}from"./chunk-AODTY2BL.js";import{a as s}from"./chunk-GYVQIRBD.js";import{S as F,W as C,z as x}from"./chunk-7YXHILW4.js";import{i as v}from"./chunk-4HBKQUKY.js";import{Cb as c,Eb as p,Kb as d,Nb as u,Ob as M,tb as D,wb as V,xb as P}from"./chunk-62GA7XR3.js";import{d as J}from"./chunk-PT3OZEBI.js";import{o as $,p as A,q as L}from"./chunk-6IDEDOXW.js";import{a as H}from"./chunk-CX5CC6P5.js";import{e as B,g as I}from"./chunk-VKWPEFWQ.js";I();var Y=B(H());function j(){let e=V();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function fe(e={}){let n=L()??A(),o=P(n),t=D();if(J()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let r=j();if(!r)throw new Error("Could not determine the package manager");let[a,...i]=r.split(" ");if(!a)throw new Error("Could not determine the command to run");let l=g("@shopify/cli",s),q=l?`\u2728 New version of Shopify CLI available! (${s} \u2192 ${l})`:"\u2728 New version of Shopify CLI available!";d(p`${q}
2
2
  Now upgrading by running: ${c.genericShellCommand(r)}...`),await F(a,i,{stdio:"inherit"});let f=await U();if(!f)throw new v("Couldn't verify the Shopify CLI version after upgrading.",p`Check the installed version by running ${c.genericShellCommand("shopify version")}.`);let k=l??s;if((0,Y.lt)(f,k))throw new v(`Failed to upgrade Shopify CLI. Expected to be on version ${k}, but version ${f} is now installed.`,"Your package manager may be resolving @shopify/cli from a registry with outdated versions. Check your npm registry configuration and try again.");x({headline:"Shopify CLI upgraded.",body:`You're now on version ${f}.`})}else if(o)await z(o,s);else throw new Error("Could not determine the local project directory")}function ge(){let e=s,n=g("@shopify/cli",e);if(!n){u("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return u("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),n;if(!h()){u("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(C()){u("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(w(e)){u("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return n}async function me(){try{let{notifications:e}=await O();return T(e,"",["autoupgrade"]).some(o=>o.type==="error")}catch{return!1}}async function he(){if(C()||w(s)||h())return;let e=g("@shopify/cli",s);e&&await S("warn-on-available-upgrade",{days:1},async()=>{M(K(e))})}function K(e,n=!1){let o=j(),t=o?p`💡 Version ${e} available! Run ${c.genericShellCommand(o)}`.value:p`💡 Version ${e} available!`.value;if(n){let r=`https://github.com/Shopify/cli/releases/tag/${e}`,a=p`⚠️ This is a major version — review breaking changes before upgrading:\n ${c.link(r,r)}`.value;return`${t}
3
3
 
4
4
  ${a}`}return t}async function z(e,n){let o=(await y(e)).content,t=o.dependencies??{},r=o.devDependencies??{},i={...t,...r}[await b()];if(!i){u("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");return}i.slice(0,1).match(/[\^~]/)&&(i=n);let l=await R(await b(),i);l?Z(i,l):X(i),await G("prod",t,e),await G("dev",r,e)}async function G(e,n,o){let t=[await b(),...await Q()].filter(a=>!!n[a]).map(a=>({name:a,version:"latest"})),r=await N(o);t.length>0&&await _(t,{packageManager:await E(o),type:e,directory:o,stdout:process.stdout,stderr:process.stderr,addToRootDirectory:r})}async function b(){return(await W()).name}async function Q(){return(await W())?.oclif?.plugins??[]}var m;async function W(){if(!m){let e=await y($(import.meta.url));m=m??e.content}return m}function X(e){d(p`You're on the latest version, ${c.yellow(e)}, no need to upgrade!`)}function Z(e,n){d(p`Upgrading CLI from ${c.yellow(e)} to ${c.yellow(n)}...`)}export{j as a,fe as b,ge as c,me as d,he as e,K as f};
@@ -1 +1 @@
1
- import{Ia as r}from"./chunk-UNHT4ZFP.js";import{a}from"./chunk-45SZ5PSE.js";import{p as i}from"./chunk-6IDEDOXW.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-EEAY7HFW.js";import{a}from"./chunk-LG6DGIFX.js";import{p as i}from"./chunk-6IDEDOXW.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,4 +1,4 @@
1
- import{a as C}from"./chunk-YBSX53QP.js";import{b as ne,c as re}from"./chunk-YYA5VGDW.js";import{c as ee,d as te}from"./chunk-NCVGCVQ5.js";import{A as M}from"./chunk-GE4MLO3C.js";import{a as Z}from"./chunk-PWS4VFSD.js";import{a as Q}from"./chunk-PO5T44H3.js";import{Ha as X}from"./chunk-UNHT4ZFP.js";import{b as z,c as Y,f as V}from"./chunk-NU5WLZ6Y.js";import{F as K,a as b,d as v,e as l,f as s,g as j,h as H,i as G,l as J,m as q,n as x,t as R}from"./chunk-47IQIIFX.js";import{i as O}from"./chunk-Q37WAD6F.js";import{a as B}from"./chunk-4JGWKUJN.js";import{qa as N}from"./chunk-UWI76E2L.js";import{g as U}from"./chunk-UEBUGSBT.js";import{b as ye}from"./chunk-I3J63RFV.js";import{c as I}from"./chunk-6IDEDOXW.js";import{e as S,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var h=S(v(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,h.useState)([]),[p,m]=(0,h.useState)([a,a]),[y,d]=(0,h.useState)(void 0),{input:E,export:_}=e.payload,[fe,k]=(0,h.useState)(`Watching for changes to ${e.source}...`);return(0,h.useEffect)(()=>{let A=new b;t.signal.addEventListener("abort",()=>{A.abort()});let $=async()=>{let w=await Ee(r,JSON.stringify(E),_);m(g=>[w,g[0]]),k(`Watching for changes to ${e.source}...`),f(g=>[...g,w])},de=async()=>{k("Replaying log with local function..."),await $()},ge=async()=>{i.onEvent(async g=>{let F=g.extensionEvents.find(L=>L.extension.handle===r.handle);if(!(!F||F.type!==ee.Updated)){if(F.buildResult?.status==="error"){d(`Error while reloading and building extension: ${F.buildResult?.error}`);return}d(void 0),k("Re-running with latest changes..."),await $()}});let w=new oe({write(g,F,L){f(he=>[...he,{type:"systemMessage",message:g.toString()}]),L()}});await i.start({stdout:w,stderr:w,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,_,o,r]),R(t.signal,async()=>{setTimeout(()=>{U()||B(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:y}}async function Ee(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await C({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=S(v(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=R(t.signal),{isRawModeSupported:a}=H(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:y}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return G((d,E)=>{q(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Re,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,x.pointerSmall," ",p)),n.default.createElement(be,{recentFunctionRuns:m}),n.default.createElement(s,null,x.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",x.lineVertical," quit")):null,y?n.default.createElement(s,{color:"red"},y):null))};function D({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
1
+ import{a as C}from"./chunk-32VQQ6EU.js";import{b as ne,c as re}from"./chunk-2QENUJVG.js";import{c as ee,d as te}from"./chunk-YRX4E67D.js";import{A as M}from"./chunk-GF36WNMH.js";import{a as Z}from"./chunk-5SLKHURV.js";import{a as Q}from"./chunk-MTBABHUB.js";import{Ha as X}from"./chunk-EEAY7HFW.js";import{b as z,c as Y,f as V}from"./chunk-SUTVPAJF.js";import{F as K,a as b,d as v,e as l,f as s,g as j,h as H,i as G,l as J,m as q,n as x,t as R}from"./chunk-7YXHILW4.js";import{i as O}from"./chunk-4HBKQUKY.js";import{a as B}from"./chunk-N47RQHEI.js";import{qa as N}from"./chunk-62GA7XR3.js";import{g as U}from"./chunk-PT3OZEBI.js";import{b as ye}from"./chunk-I3J63RFV.js";import{c as I}from"./chunk-6IDEDOXW.js";import{e as S,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var h=S(v(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,h.useState)([]),[p,m]=(0,h.useState)([a,a]),[y,d]=(0,h.useState)(void 0),{input:E,export:_}=e.payload,[fe,k]=(0,h.useState)(`Watching for changes to ${e.source}...`);return(0,h.useEffect)(()=>{let A=new b;t.signal.addEventListener("abort",()=>{A.abort()});let $=async()=>{let w=await Ee(r,JSON.stringify(E),_);m(g=>[w,g[0]]),k(`Watching for changes to ${e.source}...`),f(g=>[...g,w])},de=async()=>{k("Replaying log with local function..."),await $()},ge=async()=>{i.onEvent(async g=>{let F=g.extensionEvents.find(L=>L.extension.handle===r.handle);if(!(!F||F.type!==ee.Updated)){if(F.buildResult?.status==="error"){d(`Error while reloading and building extension: ${F.buildResult?.error}`);return}d(void 0),k("Re-running with latest changes..."),await $()}});let w=new oe({write(g,F,L){f(he=>[...he,{type:"systemMessage",message:g.toString()}]),L()}});await i.start({stdout:w,stderr:w,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,_,o,r]),R(t.signal,async()=>{setTimeout(()=>{U()||B(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:y}}async function Ee(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await C({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=S(v(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=R(t.signal),{isRawModeSupported:a}=H(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:y}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return G((d,E)=>{q(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Re,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,x.pointerSmall," ",p)),n.default.createElement(be,{recentFunctionRuns:m}),n.default.createElement(s,null,x.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",x.lineVertical," quit")):null,y?n.default.createElement(s,{color:"red"},y):null))};function D({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
2
2
 
3
3
  `,r,e,r,`
4
4
  `)}function we({input:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(D,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,M(e)))}function Fe({logs:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(D,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function xe({output:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(D,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,M(e)))}function Se({functionRun:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(D,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function be({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(s,null,x.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Re({log:e}){switch(e.type){case"functionRun":return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(we,{input:e.input}),n.default.createElement(Fe,{logs:e.logs}),n.default.createElement(xe,{output:e.output}),n.default.createElement(Se,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var se=S(v(),1);async function ce({selectedRun:e,abortController:t,app:o,extension:r}){return J(se.default.createElement(ae,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function le(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await K({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as Ce,readdirSync as De}from"fs";var T=100;async function ue(e){let{watch:t,extension:o,app:r}=e,i=new b;try{let a=r.getLogsDir(),u=e.log?await ke(a,o.handle,e.log):await Le(a,o.handle),{input:f,export:p}=u.payload;t?await ce({selectedRun:u,abortController:i,app:r,extension:o}):await C({functionExtension:o,json:e.json,input:JSON.stringify(f),export:p})}catch(a){throw i.abort(),a}}async function ke(e,t,o){let r=await Ae(e,t,o);if(r===void 0)throw new O(`No log found for '${o}'.
@@ -1,4 +1,4 @@
1
- import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-7HWMURCW.js";import{a as aA}from"./chunk-UNHT4ZFP.js";import{c as tA,e as rA}from"./chunk-WLWHCUPZ.js";import{O as pCe,b as mCe,j as R4,u as tf,v as vI}from"./chunk-3V4VL3SD.js";import{a as jF}from"./chunk-XUUIBSLW.js";import{d as b}from"./chunk-47IQIIFX.js";import{d as $F}from"./chunk-DYPZX7MW.js";import{i as eA}from"./chunk-Q37WAD6F.js";import{Nb as b7}from"./chunk-UWI76E2L.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1
+ import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-RW3P3UMU.js";import{a as aA}from"./chunk-EEAY7HFW.js";import{c as tA,e as rA}from"./chunk-62LMVFR7.js";import{O as pCe,b as mCe,j as R4,u as tf,v as vI}from"./chunk-HB4YI2PF.js";import{a as jF}from"./chunk-GYVQIRBD.js";import{d as b}from"./chunk-7YXHILW4.js";import{d as $F}from"./chunk-2VGPNRHH.js";import{i as eA}from"./chunk-4HBKQUKY.js";import{Nb as b7}from"./chunk-62GA7XR3.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
2
  1. You might have mismatching versions of React and the renderer (such as React DOM)
3
3
  2. You might be breaking the Rules of Hooks
4
4
  3. You might have more than one copy of React in the same app
@@ -1 +1 @@
1
- import{a as e}from"./chunk-DSS4ECIH.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
1
+ import{a as e}from"./chunk-MWWULCLD.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -1,4 +1,4 @@
1
- import{c as ge}from"./chunk-ZTICX3AO.js";import{a as he,c as ye}from"./chunk-FEQHCE2E.js";import{b as ue}from"./chunk-7HWMURCW.js";import{a as Te}from"./chunk-PWS4VFSD.js";import{Da as Fe,Ha as Le,J as ve,R as Pe,T as Ae,V as ke,da as xe,ga as Ce,h as we}from"./chunk-UNHT4ZFP.js";import{A as be,ma as Ie,ra as Re}from"./chunk-Y743UVBS.js";import{b as fe,f as de}from"./chunk-NU5WLZ6Y.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-3C4WVKSO.js";import{e as Q}from"./chunk-QTLGMJDW.js";import{a as z}from"./chunk-XUUIBSLW.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-47IQIIFX.js";import{c as ne}from"./chunk-DYPZX7MW.js";import{d as se}from"./chunk-DSS4ECIH.js";import{i as m}from"./chunk-Q37WAD6F.js";import{Aa as Y,Cb as h,Db as F,Eb as b,Ga as I,Na as V,Sa as K,Xa as R,Ya as x,Za as B,_a as W,ca as H,db as Z,oa as q,qa as O,ub as X,vb as J,wa as T,ya as _}from"./chunk-UWI76E2L.js";import{f as me}from"./chunk-UEBUGSBT.js";import{b as He}from"./chunk-I3J63RFV.js";import{c as l,d as k,e as M,o as U,p as D}from"./chunk-6IDEDOXW.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
1
+ import{c as ge}from"./chunk-BD2L6YE5.js";import{a as he,c as ye}from"./chunk-K6FH5JSY.js";import{b as ue}from"./chunk-RW3P3UMU.js";import{a as Te}from"./chunk-5SLKHURV.js";import{Da as Fe,Ha as Le,J as ve,R as Pe,T as Ae,V as ke,da as xe,ga as Ce,h as we}from"./chunk-EEAY7HFW.js";import{A as be,ma as Ie,ra as Re}from"./chunk-TVI7TQ4C.js";import{b as fe,f as de}from"./chunk-SUTVPAJF.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-5VRB3FBD.js";import{e as Q}from"./chunk-AODTY2BL.js";import{a as z}from"./chunk-GYVQIRBD.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-7YXHILW4.js";import{c as ne}from"./chunk-2VGPNRHH.js";import{d as se}from"./chunk-MWWULCLD.js";import{i as m}from"./chunk-4HBKQUKY.js";import{Aa as Y,Cb as h,Db as F,Eb as b,Ga as I,Na as V,Sa as K,Xa as R,Ya as x,Za as B,_a as W,ca as H,db as Z,oa as q,qa as O,ub as X,vb as J,wa as T,ya as _}from"./chunk-62GA7XR3.js";import{f as me}from"./chunk-PT3OZEBI.js";import{b as He}from"./chunk-I3J63RFV.js";import{c as l,d as k,e as M,o as U,p as D}from"./chunk-6IDEDOXW.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
2
  Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await q(async o=>{let f=l(o,"download"),u=i.filePath?l(f,i.filePath):f,d=l(o,"app"),A=i.branch?`${i.baseURL}#${i.branch}`:i.baseURL;await Y(f);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:f,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(u,d,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let p=(await ie(d)).content;p.name=a,p.author=await ne()??"",p.private=!0;let v=["extensions/*"].concat(We(d));switch(t){case"npm":case"yarn":case"bun":p.workspaces=v;break;case"pnpm":{await Ze(d,v),await T(l(d,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new te}await Se({packageJSON:p,local:e.local,directory:d,useGlobalCLI:e.useGlobalCLI}),await re(d,p)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let p=l(d,".gitignore");if(await R(p)){let v=await O(p);C.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await _(p,v.trim())}}}),await me()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let p=l(d,".npmrc");await T(p,`@shopify:registry=https://registry.npmjs.org
4
4
  `)}});let N=!1;w.push({title:"Preparing project directory",task:async()=>{await Ee(r,a),N=!0,await K(d,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await Ge({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await G(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await ce(w)}catch(p){throw N&&await I(r).catch(()=>{}),p}});let n;if(e.selectedAppOrNameResult.result==="new"){let o=await ve(r,e.name),f=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(f,o)}else n=e.selectedAppOrNameResult.app;await Fe({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return pe({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:F(t,"shopify app generate extension")}],["To see your app, run",{command:F(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:F(t,"shopify app","--help")}]]}),{app:s.app}}async function Ee(e,t){if(await R(e))throw new m(`