shopify 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/{analytics-SOXP4UBD.js → analytics-DMUNCDGT.js} +1 -1
  2. package/dist/{analytics-DWUYMFHO.js → analytics-GAPN4I6R.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-2NWWMNU5.js → chunk-235JVI2J.js} +1 -1
  5. package/dist/{chunk-Y3WIZSRU.js → chunk-24RF5KN3.js} +1 -1
  6. package/dist/{chunk-OORCODNK.js → chunk-2IPVQRMI.js} +1 -1
  7. package/dist/{chunk-J5TNYNR5.js → chunk-2MDFREEW.js} +1 -1
  8. package/dist/{chunk-V3RZ3DTW.js → chunk-2MZACB7V.js} +1 -1
  9. package/dist/{chunk-WVHB2HCQ.js → chunk-2ROG5NK3.js} +1 -1
  10. package/dist/{chunk-NY5OGHM5.js → chunk-2VUG6LRN.js} +1 -1
  11. package/dist/{chunk-FZKKKGUJ.js → chunk-32KQKGSY.js} +1 -1
  12. package/dist/{chunk-5W443CKL.js → chunk-3EQY5B4S.js} +1 -1
  13. package/dist/{chunk-RF6NUGCU.js → chunk-3JAC5SI7.js} +1 -1
  14. package/dist/{chunk-LCPD2BYX.js → chunk-3JZKWK2V.js} +1 -1
  15. package/dist/{chunk-APN3VWN4.js → chunk-3NMVMCOM.js} +1 -1
  16. package/dist/{chunk-UYK6CXAU.js → chunk-3OE5HXHO.js} +1 -1
  17. package/dist/{chunk-45MEVWH5.js → chunk-4EYTWWYF.js} +1 -1
  18. package/dist/{chunk-X4DIJTIK.js → chunk-4LML2QWN.js} +1 -1
  19. package/dist/{chunk-4N6YTHFD.js → chunk-4Q54UDO3.js} +1 -1
  20. package/dist/{chunk-7UOPCYMV.js → chunk-4U3NC3UU.js} +1 -1
  21. package/dist/{chunk-J3HXFQ2L.js → chunk-52H2R2FU.js} +1 -1
  22. package/dist/{chunk-5JNEWYD5.js → chunk-57IRHKV3.js} +1 -1
  23. package/dist/{chunk-QPN2M26G.js → chunk-5A7EMVAP.js} +1 -1
  24. package/dist/{chunk-H6WN7GP4.js → chunk-5EVFLUUA.js} +1 -1
  25. package/dist/{chunk-TQUSREKP.js → chunk-5O7PY44R.js} +1 -1
  26. package/dist/{chunk-ZIXWWU2N.js → chunk-63NFEXJR.js} +2 -2
  27. package/dist/{chunk-RYGZCBO4.js → chunk-663TS34D.js} +1 -1
  28. package/dist/{chunk-DQ4HA72R.js → chunk-6I3FNLT3.js} +1 -1
  29. package/dist/{chunk-ZEENHLSC.js → chunk-6LTJMYUD.js} +1 -1
  30. package/dist/{chunk-ZAMDXIVC.js → chunk-6V37CHBZ.js} +1 -1
  31. package/dist/{chunk-UKK5P74A.js → chunk-74IG3ZE3.js} +3 -3
  32. package/dist/{chunk-T5GSCWN5.js → chunk-7BVXGS44.js} +1 -1
  33. package/dist/{chunk-GKRCTMWY.js → chunk-7DYZVU7H.js} +1 -1
  34. package/dist/{chunk-OAI7VSLW.js → chunk-7EOQVQND.js} +1 -1
  35. package/dist/{chunk-FPLUMESQ.js → chunk-7HZG7FBK.js} +1 -1
  36. package/dist/{chunk-VOJWKGCW.js → chunk-7KHYEIA7.js} +1 -1
  37. package/dist/{chunk-PJYNAUQB.js → chunk-7ZIO3X22.js} +1 -1
  38. package/dist/{chunk-I73E3BD5.js → chunk-A2O3MBPH.js} +1 -1
  39. package/dist/{chunk-JAW32T6G.js → chunk-ABCU552E.js} +1 -1
  40. package/dist/{chunk-YGKQCEVG.js → chunk-AP6FNGTA.js} +1 -1
  41. package/dist/{chunk-WKBVT5WG.js → chunk-AUZCENYI.js} +1 -1
  42. package/dist/{chunk-UUC5YKAS.js → chunk-AYKRKE6O.js} +1 -1
  43. package/dist/{chunk-WAGAC3YI.js → chunk-AYSS2ERL.js} +1 -1
  44. package/dist/{chunk-Z4LC3WE5.js → chunk-B367FOQA.js} +1 -1
  45. package/dist/{chunk-U73TPLFE.js → chunk-BBATKR3B.js} +1 -1
  46. package/dist/{chunk-O6KTFMCD.js → chunk-BCEWCYZD.js} +1 -1
  47. package/dist/{chunk-SP2WUATO.js → chunk-BH34ZLZ4.js} +1 -1
  48. package/dist/{chunk-LOQIRLTD.js → chunk-BLI7DUNV.js} +1 -1
  49. package/dist/{chunk-YYL356OX.js → chunk-BNX4MZMV.js} +1 -1
  50. package/dist/{chunk-47MGPVED.js → chunk-BU7R7NFL.js} +1 -1
  51. package/dist/{chunk-5GVXMNC4.js → chunk-BVHBMOIB.js} +1 -1
  52. package/dist/{chunk-DONEJHDG.js → chunk-BXDZX3BS.js} +3 -3
  53. package/dist/{chunk-SKLUHLS2.js → chunk-CVRAATZ5.js} +1 -1
  54. package/dist/{chunk-CD5O2BIT.js → chunk-DBBU6OVN.js} +1 -1
  55. package/dist/{chunk-B7S23DLF.js → chunk-DKVU7LYY.js} +1 -1
  56. package/dist/{chunk-HCN6HXA5.js → chunk-DLZPP33V.js} +1 -1
  57. package/dist/{chunk-733R5OKQ.js → chunk-DQOS54HN.js} +1 -1
  58. package/dist/{chunk-JOZXRV5K.js → chunk-E4GW6OXT.js} +1 -1
  59. package/dist/chunk-E64BQS4D.js +1 -0
  60. package/dist/{chunk-BCD4KTLJ.js → chunk-F447QKVX.js} +1 -1
  61. package/dist/{chunk-HZSAUZBX.js → chunk-FA25RL4G.js} +1 -1
  62. package/dist/{chunk-CZXGQ53M.js → chunk-FJOEHMXM.js} +1 -1
  63. package/dist/{chunk-HA6NISOZ.js → chunk-G6YOP2SJ.js} +1 -1
  64. package/dist/{chunk-WZVQHMGI.js → chunk-GOAKZ2IL.js} +1 -1
  65. package/dist/{chunk-VQW35HIQ.js → chunk-H2JU5BGK.js} +1 -1
  66. package/dist/{chunk-QMXKGSFH.js → chunk-H3V6Y5JO.js} +1 -1
  67. package/dist/{chunk-EKHWL542.js → chunk-HHA322FT.js} +1 -1
  68. package/dist/{chunk-GBZL4TTY.js → chunk-HP3NDE7S.js} +1 -1
  69. package/dist/{chunk-GW3VY3FZ.js → chunk-HX3TALXV.js} +1 -1
  70. package/dist/{chunk-POAICASX.js → chunk-I3Y6XTKN.js} +1 -1
  71. package/dist/{chunk-5QWYIBE6.js → chunk-ICHNVDFU.js} +1 -1
  72. package/dist/{chunk-MZMYBFZQ.js → chunk-ICXHUPP5.js} +1 -1
  73. package/dist/{chunk-CPE7XCC6.js → chunk-IE4SSSXU.js} +1 -1
  74. package/dist/{chunk-QS3FMN67.js → chunk-IFVYCKX5.js} +1 -1
  75. package/dist/{chunk-67KMRBSZ.js → chunk-J2ZES5K5.js} +1 -1
  76. package/dist/{chunk-7EJ4UVYI.js → chunk-J5U2FUIX.js} +1 -1
  77. package/dist/{chunk-DO2SHYFU.js → chunk-JC3PRJJS.js} +1 -1
  78. package/dist/{chunk-D6YDSGR4.js → chunk-JGN7YG5X.js} +1 -1
  79. package/dist/{chunk-HZYRCG4R.js → chunk-JZVNNQWE.js} +1 -1
  80. package/dist/{chunk-DZLA2RJP.js → chunk-K2CIMJJW.js} +1 -1
  81. package/dist/{chunk-IIOIDMG3.js → chunk-K7I5BGFC.js} +1 -1
  82. package/dist/{chunk-DHBYYHBT.js → chunk-KESQOMEW.js} +1 -1
  83. package/dist/{chunk-ATXODH6C.js → chunk-KJQAJUDU.js} +1 -1
  84. package/dist/{chunk-7SVMAJTR.js → chunk-KNEF6NAG.js} +1 -1
  85. package/dist/{chunk-XH6ZP7M5.js → chunk-KUKYAIOR.js} +1 -1
  86. package/dist/{chunk-2MMGFZDP.js → chunk-KZDI2BXR.js} +1 -1
  87. package/dist/{chunk-OQORDQLH.js → chunk-LMPD55L6.js} +1 -1
  88. package/dist/{chunk-ZULTG2D2.js → chunk-LXZM6Z4F.js} +1 -1
  89. package/dist/{chunk-KKUDXLK2.js → chunk-MGPLKG23.js} +1 -1
  90. package/dist/{chunk-2EROVVCL.js → chunk-MSJDZLZT.js} +1 -1
  91. package/dist/{chunk-ZQ5JVD5X.js → chunk-N4LCWB56.js} +1 -1
  92. package/dist/{chunk-WRRUFK4Y.js → chunk-N5U5Q2MG.js} +1 -1
  93. package/dist/{chunk-YQH2JHFA.js → chunk-N5YIZJ4S.js} +1 -1
  94. package/dist/{chunk-BIMOHK2P.js → chunk-N625VE5T.js} +1 -1
  95. package/dist/{chunk-J2WCMQZZ.js → chunk-NJLSZS27.js} +1 -1
  96. package/dist/{chunk-3CYHS4W2.js → chunk-O7OQK2OC.js} +1 -1
  97. package/dist/{chunk-V6ZSIUO3.js → chunk-P375IGKT.js} +1 -1
  98. package/dist/{chunk-3OZ6ZZ4T.js → chunk-P3RGC53U.js} +1 -1
  99. package/dist/{chunk-G2S346IS.js → chunk-P4243GCY.js} +1 -1
  100. package/dist/{chunk-MFLQRQQT.js → chunk-PFEC2NUB.js} +1 -1
  101. package/dist/{chunk-GTUKM3ZW.js → chunk-PH7F4BMG.js} +1 -1
  102. package/dist/{chunk-IX4KP6E3.js → chunk-PK6NOLT5.js} +1 -1
  103. package/dist/chunk-PLHJQQVZ.js +1 -0
  104. package/dist/{chunk-GFCLUGAG.js → chunk-PVD544NN.js} +1 -1
  105. package/dist/chunk-Q3WOWDUU.js +1 -0
  106. package/dist/{chunk-FA4K3JRN.js → chunk-QAM7VCLV.js} +1 -1
  107. package/dist/{chunk-AT2GDXN7.js → chunk-QCBAFI6Z.js} +1 -1
  108. package/dist/{chunk-J7UQBC45.js → chunk-QHWF3S7U.js} +1 -1
  109. package/dist/{chunk-TKG42KLM.js → chunk-QJL3SXYA.js} +1 -1
  110. package/dist/{chunk-C3CVLSLS.js → chunk-QRETBFXI.js} +1 -1
  111. package/dist/{chunk-4TST2MNC.js → chunk-RBOYWA2D.js} +1 -1
  112. package/dist/{chunk-NWDP5IZ2.js → chunk-ROQXPIEZ.js} +1 -1
  113. package/dist/{chunk-5QQN3SKH.js → chunk-RUKK4KXX.js} +1 -1
  114. package/dist/{chunk-Z74QYLNC.js → chunk-RY2ESY3P.js} +1 -1
  115. package/dist/{chunk-QJ7TI6CK.js → chunk-RY5CY3ZW.js} +1 -1
  116. package/dist/{chunk-IG6LPVS4.js → chunk-S442LGHR.js} +1 -1
  117. package/dist/{chunk-H5C3QTOO.js → chunk-S5JJL3BP.js} +1 -1
  118. package/dist/{chunk-ZZFZBFVM.js → chunk-SF53RKMO.js} +1 -1
  119. package/dist/{chunk-PETINPMX.js → chunk-SY2AH7C2.js} +1 -1
  120. package/dist/{chunk-WNWQSHEC.js → chunk-TEXYUUTD.js} +1 -1
  121. package/dist/{chunk-G24L7MB3.js → chunk-TGM7L6RV.js} +1 -1
  122. package/dist/{chunk-PMXCJIBP.js → chunk-TKW3Z7XL.js} +1 -1
  123. package/dist/{chunk-KN3FTJDU.js → chunk-TM534QSE.js} +1 -1
  124. package/dist/{chunk-TJGUNVRI.js → chunk-U44HRKSU.js} +1 -1
  125. package/dist/{chunk-442S5SDM.js → chunk-UEC23KAO.js} +1 -1
  126. package/dist/{chunk-G2I2ZUBV.js → chunk-UFGDNIYX.js} +1 -1
  127. package/dist/{chunk-75LJTY7F.js → chunk-UGGFSV7N.js} +1 -1
  128. package/dist/{chunk-F5QG42MA.js → chunk-UJVYIWUI.js} +1 -1
  129. package/dist/{chunk-DLNBTHKL.js → chunk-UP7H24B3.js} +1 -1
  130. package/dist/{chunk-VFWWZMOQ.js → chunk-UQZ7HZ47.js} +1 -1
  131. package/dist/{chunk-NADNFSKS.js → chunk-UTLRP527.js} +1 -1
  132. package/dist/{chunk-73W5BGAZ.js → chunk-UTPJAU5S.js} +1 -1
  133. package/dist/{chunk-3FBSBMSQ.js → chunk-V66IHWQO.js} +1 -1
  134. package/dist/{chunk-GUO7S4NW.js → chunk-V774I3FW.js} +1 -1
  135. package/dist/{chunk-PUAMSBXS.js → chunk-VKFDDZD3.js} +1 -1
  136. package/dist/{chunk-LOHUNOQ7.js → chunk-VNYKNAT5.js} +1 -1
  137. package/dist/{chunk-KSZ5K6LJ.js → chunk-VUACOGOX.js} +1 -1
  138. package/dist/{chunk-WLO5H255.js → chunk-WFB3FHKV.js} +1 -1
  139. package/dist/{chunk-HZMP62GK.js → chunk-WPITBIL5.js} +1 -1
  140. package/dist/{chunk-SXTDVUT3.js → chunk-WTYH2O47.js} +1 -1
  141. package/dist/{chunk-AY4GIVME.js → chunk-WU6GIY22.js} +1 -1
  142. package/dist/{chunk-6DIHOMCB.js → chunk-XA5JA7DK.js} +1 -1
  143. package/dist/{chunk-YLGSM42I.js → chunk-XSXX75VV.js} +1 -1
  144. package/dist/{chunk-XV3I45NA.js → chunk-XXUWTD7A.js} +1 -1
  145. package/dist/{chunk-6YPEONHB.js → chunk-XZWAX4FI.js} +1 -1
  146. package/dist/{chunk-IPQH2RHD.js → chunk-YF4HKJB5.js} +1 -1
  147. package/dist/{chunk-SWI3LCPE.js → chunk-YJAX22JK.js} +1 -1
  148. package/dist/{chunk-7LATYPLU.js → chunk-YT3NPMWK.js} +1 -1
  149. package/dist/{chunk-6EZ7JWBK.js → chunk-YYLEWVO6.js} +4 -4
  150. package/dist/chunk-Z2Y6G2QF.js +1 -0
  151. package/dist/{chunk-PZYP3MCL.js → chunk-Z66NZ2HC.js} +1 -1
  152. package/dist/{chunk-ZIREP3EZ.js → chunk-ZFOWAMFK.js} +1 -1
  153. package/dist/{chunk-6RL7FUPD.js → chunk-ZKBWEHIY.js} +1 -1
  154. package/dist/{chunk-Y66GQ6V2.js → chunk-ZZ3SMI2A.js} +1 -1
  155. package/dist/{chunk-B7BUEEBR.js → chunk-ZZWSMRKT.js} +1 -1
  156. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  157. package/dist/cli/commands/app/build.js +1 -1
  158. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  159. package/dist/cli/commands/app/bulk/execute.js +1 -1
  160. package/dist/cli/commands/app/bulk/status.js +1 -1
  161. package/dist/cli/commands/app/config/link.js +1 -1
  162. package/dist/cli/commands/app/config/pull.js +1 -1
  163. package/dist/cli/commands/app/config/use.js +1 -1
  164. package/dist/cli/commands/app/config/validate.js +1 -1
  165. package/dist/cli/commands/app/demo/watcher.js +1 -1
  166. package/dist/cli/commands/app/deploy.js +1 -1
  167. package/dist/cli/commands/app/dev/clean.js +1 -1
  168. package/dist/cli/commands/app/dev.js +1 -1
  169. package/dist/cli/commands/app/env/pull.js +1 -1
  170. package/dist/cli/commands/app/env/show.js +1 -1
  171. package/dist/cli/commands/app/execute.js +1 -1
  172. package/dist/cli/commands/app/function/build.js +1 -1
  173. package/dist/cli/commands/app/function/info.js +1 -1
  174. package/dist/cli/commands/app/function/replay.js +1 -1
  175. package/dist/cli/commands/app/function/run.js +1 -1
  176. package/dist/cli/commands/app/function/schema.js +1 -1
  177. package/dist/cli/commands/app/function/typegen.js +1 -1
  178. package/dist/cli/commands/app/generate/extension.js +1 -1
  179. package/dist/cli/commands/app/graphiql.js +1 -1
  180. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  181. package/dist/cli/commands/app/import-extensions.js +1 -1
  182. package/dist/cli/commands/app/info.js +1 -1
  183. package/dist/cli/commands/app/init.js +1 -1
  184. package/dist/cli/commands/app/logs.js +1 -1
  185. package/dist/cli/commands/app/release.js +1 -1
  186. package/dist/cli/commands/app/versions/list.js +1 -1
  187. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  188. package/dist/cli/commands/auth/login.js +1 -1
  189. package/dist/cli/commands/auth/logout.js +1 -1
  190. package/dist/cli/commands/cache/clear.js +1 -1
  191. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  192. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  193. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  194. package/dist/cli/commands/debug/command-flags.js +1 -1
  195. package/dist/cli/commands/doc/fetch.js +1 -1
  196. package/dist/cli/commands/doc/search.js +1 -1
  197. package/dist/cli/commands/docs/generate.js +1 -1
  198. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  199. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  200. package/dist/cli/commands/help.js +1 -1
  201. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  202. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  203. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  204. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  205. package/dist/cli/commands/notifications/generate.js +1 -1
  206. package/dist/cli/commands/notifications/list.js +1 -1
  207. package/dist/cli/commands/organization/list.js +1 -1
  208. package/dist/cli/commands/search.js +1 -1
  209. package/dist/cli/commands/theme/check.js +1 -1
  210. package/dist/cli/commands/theme/console.js +1 -1
  211. package/dist/cli/commands/theme/delete.js +1 -1
  212. package/dist/cli/commands/theme/dev.js +1 -1
  213. package/dist/cli/commands/theme/duplicate.js +1 -1
  214. package/dist/cli/commands/theme/info.js +1 -1
  215. package/dist/cli/commands/theme/init.js +1 -1
  216. package/dist/cli/commands/theme/language-server.js +1 -1
  217. package/dist/cli/commands/theme/list.js +1 -1
  218. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  219. package/dist/cli/commands/theme/open.js +1 -1
  220. package/dist/cli/commands/theme/package.js +1 -1
  221. package/dist/cli/commands/theme/preview.js +1 -1
  222. package/dist/cli/commands/theme/profile.js +1 -1
  223. package/dist/cli/commands/theme/publish.js +1 -1
  224. package/dist/cli/commands/theme/pull.js +1 -1
  225. package/dist/cli/commands/theme/push.js +1 -1
  226. package/dist/cli/commands/theme/rename.js +1 -1
  227. package/dist/cli/commands/theme/share.js +1 -1
  228. package/dist/cli/commands/upgrade.js +1 -1
  229. package/dist/cli/commands/version.js +1 -1
  230. package/dist/command-registry.js +1 -1
  231. package/dist/{conf-store-C2LOYIOU.js → conf-store-V6ILVUUO.js} +1 -1
  232. package/dist/{deprecations-QOHE6JG6.js → deprecations-MOEFN6OW.js} +1 -1
  233. package/dist/dist-2BL5GGMG.js +1 -0
  234. package/dist/{dist-FF6C4ZHS.js → dist-E6QKEULH.js} +1 -1
  235. package/dist/{environments-EGD263DV.js → environments-5KA3OBIZ.js} +1 -1
  236. package/dist/{error-66U2HJ37.js → error-NYYI6HVX.js} +1 -1
  237. package/dist/{error-handler-SW2ALZ5Z.js → error-handler-BOESDKZA.js} +1 -1
  238. package/dist/{fs-JPQRUGZI.js → fs-XE6SBVBF.js} +1 -1
  239. package/dist/hooks/app-init.js +1 -1
  240. package/dist/hooks/did-you-mean.js +1 -1
  241. package/dist/hooks/hydrogen-init.js +1 -1
  242. package/dist/hooks/postrun.js +1 -1
  243. package/dist/hooks/prerun.js +1 -1
  244. package/dist/hooks/public-metadata.js +1 -1
  245. package/dist/hooks/sensitive-metadata.js +1 -1
  246. package/dist/hooks/tunnel-provider.js +1 -1
  247. package/dist/hooks/tunnel-start.js +1 -1
  248. package/dist/index.js +14 -14
  249. package/dist/{is-global-QWTDUPNR.js → is-global-JOHCPSKZ.js} +1 -1
  250. package/dist/{local-FRYN3NWL.js → local-BTQDUX72.js} +1 -1
  251. package/dist/{local-storage-DFH3LT5G.js → local-storage-WUSIVDTQ.js} +1 -1
  252. package/dist/{metadata-KZVLHQII.js → metadata-APVOKTBV.js} +1 -1
  253. package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-AC34ZJZD.js} +1 -1
  254. package/dist/notifications-system-4ODOESG2.js +1 -0
  255. package/dist/{output-NH4I5Y3C.js → output-EAPQ7OWD.js} +1 -1
  256. package/dist/{system-GNOF6HMI.js → system-D7CH26HU.js} +1 -1
  257. package/dist/tsconfig.tsbuildinfo +1 -1
  258. package/dist/{ui-QOGKADWB.js → ui-AXZBGWIQ.js} +1 -1
  259. package/dist/upgrade-SLPJF6LD.js +1 -0
  260. package/dist/version-3IYH4V5U.js +1 -0
  261. package/dist/{version-FJFTTOZU.js → version-FAU37PQN.js} +1 -1
  262. package/dist/{workerd-U6WWWY73.js → workerd-XXPWKQOM.js} +1 -1
  263. package/oclif.manifest.json +2 -6
  264. package/package.json +7 -7
  265. package/dist/chunk-FU232KQ7.js +0 -1
  266. package/dist/chunk-HM5H7WBE.js +0 -1
  267. package/dist/chunk-MQICT2LR.js +0 -1
  268. package/dist/chunk-UMT7DWR4.js +0 -1
  269. package/dist/dist-Q676YGVI.js +0 -1
  270. package/dist/notifications-system-DP443VTE.js +0 -1
  271. package/dist/upgrade-K4S6JW64.js +0 -1
  272. package/dist/version-ZI4GZX72.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as F}from"./chunk-UYK6CXAU.js";import{a as I,b as L,c as x,f as S,j as $,k as N,m as _,t as q}from"./chunk-AY4GIVME.js";import{a as P}from"./chunk-HM5H7WBE.js";import{a as z}from"./chunk-ZAMDXIVC.js";import{R as w,z as E}from"./chunk-5W443CKL.js";import{b as B}from"./chunk-H5C3QTOO.js";import{C,u as c,v as T,x as D}from"./chunk-6EZ7JWBK.js";import{g as b}from"./chunk-WKBVT5WG.js";import{Fb as d,Hb as u,Rb as A,ca as y,ha as g}from"./chunk-DONEJHDG.js";import{u as f}from"./chunk-A4SBXDZB.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as K,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;c({headline:"Checking bulk operation status.",body:[{list:{items:F({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new b("No API secret keys found for app");let l=await w(t,a.apiKey,s),i=await $({adminSession:l,operationId:r,version:await S({adminSession:l,minimumDefaultVersion:I})});i?V(i):D({headline:"Bulk operation not found.",body:u`ID: ${d.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;c({headline:"Listing bulk operations.",body:[{list:{items:F({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new b("No API secret keys found for app");let s=await w(t,r.apiKey,a),i=(await N({adminSession:s,version:await S({adminSession:s,minimumDefaultVersion:I})})).map(n=>({id:x(n.id),status:H(n.status),count:W(n.objectCount),dateCreated:y(new Date(String(n.createdAt))),dateFinished:n.completedAt?y(new Date(String(n.completedAt))):"",results:Y(n.url??n.partialDataUrl)}));A(),i.length===0?c({body:"No bulk operations found in the last 7 days."}):C({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),A()}function V(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:l}=e,i=_(e).value,n=G(r,a),h=u`ID: ${d.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let k=s?d.link("Download results",s):"";T({headline:i,body:u`${h}\n${k}`.value})}else if(t==="FAILED"){let k=l?d.link("Download partial results",l):"";D({headline:i,body:u`${h}\n${k}`.value})}else c({headline:i,body:h})}function G(e,o){let t=new Date;return o?`Finished ${g(new Date(String(o)),t)}`:`Started ${g(new Date(String(e)),t)}`}function H(e){return e==="COMPLETED"?f.green(e):e==="FAILED"?f.red(e):f.dim(e)}function W(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Y(e){return e?u`${d.link("download",e)}`.value:""}var O=K(U(),1);var v,p=class extends P{async run(){let{flags:o}=await this.parse(v),{appContextResult:t,store:r}=await q(o);return o.id?await M({organization:t.organization,storeFqdn:r.shopDomain,operationId:L(o.id),remoteApp:t.remoteApp}):await R({organization:t.organization,storeFqdn:r.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};v=p;p.summary="Check the status of bulk operations.";p.descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
1
+ import{b as F}from"./chunk-3OE5HXHO.js";import{a as I,b as L,c as x,f as S,j as $,k as N,m as _,t as q}from"./chunk-WU6GIY22.js";import{a as P}from"./chunk-PLHJQQVZ.js";import{a as z}from"./chunk-6V37CHBZ.js";import{R as w,z as E}from"./chunk-3EQY5B4S.js";import{b as B}from"./chunk-S5JJL3BP.js";import{C,u as c,v as T,x as D}from"./chunk-YYLEWVO6.js";import{g as b}from"./chunk-AUZCENYI.js";import{Fb as d,Hb as u,Rb as A,ca as y,ha as g}from"./chunk-BXDZX3BS.js";import{u as f}from"./chunk-A4SBXDZB.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as K,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;c({headline:"Checking bulk operation status.",body:[{list:{items:F({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new b("No API secret keys found for app");let l=await w(t,a.apiKey,s),i=await $({adminSession:l,operationId:r,version:await S({adminSession:l,minimumDefaultVersion:I})});i?V(i):D({headline:"Bulk operation not found.",body:u`ID: ${d.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;c({headline:"Listing bulk operations.",body:[{list:{items:F({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new b("No API secret keys found for app");let s=await w(t,r.apiKey,a),i=(await N({adminSession:s,version:await S({adminSession:s,minimumDefaultVersion:I})})).map(n=>({id:x(n.id),status:H(n.status),count:W(n.objectCount),dateCreated:y(new Date(String(n.createdAt))),dateFinished:n.completedAt?y(new Date(String(n.completedAt))):"",results:Y(n.url??n.partialDataUrl)}));A(),i.length===0?c({body:"No bulk operations found in the last 7 days."}):C({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),A()}function V(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:l}=e,i=_(e).value,n=G(r,a),h=u`ID: ${d.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let k=s?d.link("Download results",s):"";T({headline:i,body:u`${h}\n${k}`.value})}else if(t==="FAILED"){let k=l?d.link("Download partial results",l):"";D({headline:i,body:u`${h}\n${k}`.value})}else c({headline:i,body:h})}function G(e,o){let t=new Date;return o?`Finished ${g(new Date(String(o)),t)}`:`Started ${g(new Date(String(e)),t)}`}function H(e){return e==="COMPLETED"?f.green(e):e==="FAILED"?f.red(e):f.dim(e)}function W(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Y(e){return e?u`${d.link("download",e)}`.value:""}var O=K(U(),1);var v,p=class extends P{async run(){let{flags:o}=await this.parse(v),{appContextResult:t,store:r}=await q(o);return o.id?await M({organization:t.organization,storeFqdn:r.shopDomain,operationId:L(o.id),remoteApp:t.remoteApp}):await R({organization:t.organization,storeFqdn:r.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};v=p;p.summary="Check the status of bulk operations.";p.descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
2
2
 
3
3
  Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
4
4
 
@@ -1 +1 @@
1
- import{a as f}from"./chunk-MQICT2LR.js";import{a as n}from"./chunk-ZAMDXIVC.js";import{C as p,F as s,Ga as c}from"./chunk-ATXODH6C.js";import{b as e}from"./chunk-H5C3QTOO.js";import{r as d}from"./chunk-T6CC5WUU.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
1
+ import{a as f}from"./chunk-Z2Y6G2QF.js";import{a as n}from"./chunk-6V37CHBZ.js";import{C as p,F as s,Ga as c}from"./chunk-KJQAJUDU.js";import{b as e}from"./chunk-S5JJL3BP.js";import{r as d}from"./chunk-T6CC5WUU.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk-VQW35HIQ.js";import{p as r,q as m,v as a}from"./chunk-D6YDSGR4.js";import{ua as i}from"./chunk-5W443CKL.js";import{b as s,c as h}from"./chunk-H5C3QTOO.js";import{r as v}from"./chunk-T6CC5WUU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
1
+ import{a as l}from"./chunk-H2JU5BGK.js";import{p as r,q as m,v as a}from"./chunk-JGN7YG5X.js";import{ua as i}from"./chunk-3EQY5B4S.js";import{b as s,c as h}from"./chunk-S5JJL3BP.js";import{r as v}from"./chunk-T6CC5WUU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
4
4
 
@@ -1 +1 @@
1
- import{b as a}from"./chunk-45MEVWH5.js";import{Fa as i}from"./chunk-5W443CKL.js";import{b as s}from"./chunk-UKK5P74A.js";import{r as m}from"./chunk-T6CC5WUU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
1
+ import{b as a}from"./chunk-4EYTWWYF.js";import{Fa as i}from"./chunk-3EQY5B4S.js";import{b as s}from"./chunk-74IG3ZE3.js";import{r as m}from"./chunk-T6CC5WUU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-J3JPJCWP.js";import{a as fe}from"./chunk-YQH2JHFA.js";import{b as re,c as oe,d as se,e as ne,f as ie,h as ae,i as le,k as ce,l as me,n as de}from"./chunk-2NWWMNU5.js";import{c as ee,e as te}from"./chunk-QMXKGSFH.js";import{a as X}from"./chunk-J3HXFQ2L.js";import{c as Q,e as v,m as Z,n as x}from"./chunk-6YPEONHB.js";import{k as P,l as V,n as y}from"./chunk-PJYNAUQB.js";import{s as C,u as k}from"./chunk-D6YDSGR4.js";import{a as B,b as N}from"./chunk-O6KTFMCD.js";import{o as K,s as J,t as z,u as Y,w as j}from"./chunk-Q7BOSHWX.js";import{ta as $,xa as L}from"./chunk-5W443CKL.js";import{a as O}from"./chunk-5C7HDTHJ.js";import{J as U,s as W,u as I,v as M,w as R,y as q,z as G}from"./chunk-6EZ7JWBK.js";import{d as _,e as H}from"./chunk-WRRUFK4Y.js";import{d as g}from"./chunk-WKBVT5WG.js";import{Fb as w,Hb as E,Mb as T,Pb as u}from"./chunk-DONEJHDG.js";import{u as p}from"./chunk-A4SBXDZB.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var he={workPromise:Promise.resolve()};async function ue(e,t,o,r,s){if(o.length===0)return he;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l}=Ce(o,r),n=a.length===0&&i.length===0&&l.length===0;if(L(`theme-service:theme-reconciliation:manual:${n}`),n)return u("Local and remote checksums match - no need to reconcile theme assets"),he;let c=await Se({filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l},s);return{workPromise:Ae(e,t,r,c)}}function Ce(e,t){let o=new Set,r=[],s=[];for(let i of e){o.add(i.key);let l=t.files.get(i.key);l?i.checksum!==l.checksum&&s.push(i):r.push(i)}let a=Array.from(t.files.values()).filter(i=>!o.has(i.key));return{filesOnlyPresentOnRemote:A(r,t),filesOnlyPresentLocally:A(a,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function S(e,t,o){if(e.length===0)return;I({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:pe}]})===D?o.remote.callback(e):o.local.callback(e)}async function Ae(e,t,o,r){let{localFilesToDelete:s,filesToDownload:a,remoteFilesToDelete:i}=r,l=s.map(m=>o.delete(m.key)),n=b(a,k,async m=>{let f=await P(e.id,m.map(h=>h.key),t);return Promise.all(f.map(h=>{if(h)return o.write(h)}))}),c=V(e.id,i.map(m=>m.key),t);await Promise.all([...l,...n,c])}async function Se(e,t){let{filesOnlyPresentLocally:o,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:s}=e,a=[],i=[],l=[];return t.noDelete||await S(o,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:n=>{a.push(...n)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await S(r,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:n=>{i.push(...n)}},local:{label:"Delete files from the remote theme",callback:n=>{l.push(...n)}}}),await S(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:n=>{i.push(...n)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:a,filesToDownload:i,remoteFilesToDelete:l}}d();var De=3e3,F=class extends Error{};function we(e,t,o,r,s,a){u("Listening for changes in the theme editor");let i=5,l=0,n="",c=o,m=async()=>{await new Promise(f=>setTimeout(f,De)),c=await Fe(e,t,c,r,s).then(f=>(l=0,n="",f)).catch(f=>{if(l++,f.message!==n&&(n=f.message,v("Error while polling for changes.",f)),l>=i){let h=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(h),a(h)}return c})};setTimeout(async()=>{for(;;)await m()})}async function Fe(e,t,o,r,s){let a=new Set(r.unsyncedFileKeys),i=ye(o,r,a),l=await y(e.id,t).then(m=>ye(m,r,a)),n=$e(i,l),c=Oe(l,i);return await He(r,n),await Le(e,t,r,n),await _e(r,c,s),l}function Oe(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>o.get(s.key)===void 0)}function $e(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let a=o.get(s.key);if(!a||a.checksum!==s.checksum)return!0})}async function Le(e,t,o,r){let s=r.filter(i=>o.files.get(i.key)?.checksum!==i.checksum),a=b(s,k,async i=>P(e.id,i.map(l=>l.key),t).then(l=>Promise.all(l.map(async n=>{n&&(await o.write(n),T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`download ${n.key} from remote theme`)}`))}))));await Promise.all(a)}async function _e(e,t,o){if(!o.noDelete)return Promise.all(t.map(r=>{if(e.files.get(r.key))return e.delete(r.key).then(()=>{T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`remove ${r.key} from local theme`)}`)})}))}async function He(e,t){let o=new Map(e.files);await Promise.all(t.map(r=>e.read(r.key)));for(let r of t){let s=o.get(r.key)?.checksum,a=e.files.get(r.key)?.checksum;if(s!==a)throw new F(`Detected changes to the file '${r.key}' on both local and remote sources. Aborting...`)}}function ye(e,t,o){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!o.has(s.key))}var pe="local",D="remote";async function ge(e,t,o,r,s,a){u("Initiating theme asset reconciliation process"),await r.ready();let{workPromise:i}=await ue(e,t,o,r,s);return{updatedRemoteChecksumsPromise:i.then(async()=>{let n=await y(e.id,t);return we(e,t,n,r,s,a),n}),workPromise:i}}d();function ke(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}import{createServer as We}from"node:http";function Pe(e,t){let{promise:o,resolve:r,reject:s}=ke(),a=ae(e,t),i=Ie(e,t,s),l=Promise.all([a,i.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),n=qe(e,t,l);return{workPromise:l,serverStart:n.start,dispatchEvent:n.dispatch,renderDevSetupProgress:i.renderProgress,backgroundJobPromise:o,resolveBackgroundJob:r}}function Ie(e,t,o){let r=n=>(v("Failed to perform the initial theme synchronization.",n),o(n),new Promise(()=>{})),a=y(e.id,t.session).then(n=>Me(e,t,n,o)),i=a.then(async({updatedRemoteChecksumsPromise:n})=>{let c=await n;return fe(e,t.session,c,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:r})});return{workPromise:i.then(n=>n.workPromise).catch(r),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:c}=await a;await te([{title:"Performing file synchronization. This may take a while...",task:async()=>{await c}}])}let{renderThemeSyncProgress:n}=await i;await n()}}}function Me(e,t,o,r){return t.options.themeEditorSync?ge(e,t.session,o,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},r):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(o),workPromise:Promise.resolve()})}function qe(e,t,o){let r=Y(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];r.use(ne(t.options.host,t.options.port)),r.use(z(async()=>(await o,J(i=>{i.node.req.headers.origin&&K(i,{origin:n=>s.includes(n),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&r.use(le(e,t)),r.use(se(e,t)),r.use(re(e,t)),r.use(oe(e,t));let a=We(j(r));return{dispatch:r.handler.bind(r),start:async()=>new Promise(i=>a.listen({port:t.options.port,host:t.options.host},()=>i({close:async()=>{await Promise.all([new Promise(l=>{a.closeAllConnections(),a.close(l)})])}})))}}import Ge from"readline";var Ue="127.0.0.1",Ke=9292,ve=!1;async function xt(e){if(!await de(e.directory)&&!await ee(e.force))return;e.password?.startsWith("shpat_")&&R({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
1
+ import{a as b}from"./chunk-J3JPJCWP.js";import{a as fe}from"./chunk-N5YIZJ4S.js";import{b as re,c as oe,d as se,e as ne,f as ie,h as ae,i as le,k as ce,l as me,n as de}from"./chunk-235JVI2J.js";import{c as ee,e as te}from"./chunk-H3V6Y5JO.js";import{a as X}from"./chunk-52H2R2FU.js";import{c as Q,e as v,m as Z,n as x}from"./chunk-XZWAX4FI.js";import{k as P,l as V,n as y}from"./chunk-7ZIO3X22.js";import{s as C,u as k}from"./chunk-JGN7YG5X.js";import{a as B,b as N}from"./chunk-BCEWCYZD.js";import{o as K,s as J,t as z,u as Y,w as j}from"./chunk-Q7BOSHWX.js";import{ta as $,xa as L}from"./chunk-3EQY5B4S.js";import{a as O}from"./chunk-5C7HDTHJ.js";import{J as U,s as W,u as I,v as M,w as R,y as q,z as G}from"./chunk-YYLEWVO6.js";import{d as _,e as H}from"./chunk-N5U5Q2MG.js";import{d as g}from"./chunk-AUZCENYI.js";import{Fb as w,Hb as E,Mb as T,Pb as u}from"./chunk-BXDZX3BS.js";import{u as p}from"./chunk-A4SBXDZB.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var he={workPromise:Promise.resolve()};async function ue(e,t,o,r,s){if(o.length===0)return he;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l}=Ce(o,r),n=a.length===0&&i.length===0&&l.length===0;if(L(`theme-service:theme-reconciliation:manual:${n}`),n)return u("Local and remote checksums match - no need to reconcile theme assets"),he;let c=await Se({filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l},s);return{workPromise:Ae(e,t,r,c)}}function Ce(e,t){let o=new Set,r=[],s=[];for(let i of e){o.add(i.key);let l=t.files.get(i.key);l?i.checksum!==l.checksum&&s.push(i):r.push(i)}let a=Array.from(t.files.values()).filter(i=>!o.has(i.key));return{filesOnlyPresentOnRemote:A(r,t),filesOnlyPresentLocally:A(a,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function S(e,t,o){if(e.length===0)return;I({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:pe}]})===D?o.remote.callback(e):o.local.callback(e)}async function Ae(e,t,o,r){let{localFilesToDelete:s,filesToDownload:a,remoteFilesToDelete:i}=r,l=s.map(m=>o.delete(m.key)),n=b(a,k,async m=>{let f=await P(e.id,m.map(h=>h.key),t);return Promise.all(f.map(h=>{if(h)return o.write(h)}))}),c=V(e.id,i.map(m=>m.key),t);await Promise.all([...l,...n,c])}async function Se(e,t){let{filesOnlyPresentLocally:o,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:s}=e,a=[],i=[],l=[];return t.noDelete||await S(o,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:n=>{a.push(...n)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await S(r,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:n=>{i.push(...n)}},local:{label:"Delete files from the remote theme",callback:n=>{l.push(...n)}}}),await S(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:n=>{i.push(...n)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:a,filesToDownload:i,remoteFilesToDelete:l}}d();var De=3e3,F=class extends Error{};function we(e,t,o,r,s,a){u("Listening for changes in the theme editor");let i=5,l=0,n="",c=o,m=async()=>{await new Promise(f=>setTimeout(f,De)),c=await Fe(e,t,c,r,s).then(f=>(l=0,n="",f)).catch(f=>{if(l++,f.message!==n&&(n=f.message,v("Error while polling for changes.",f)),l>=i){let h=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(h),a(h)}return c})};setTimeout(async()=>{for(;;)await m()})}async function Fe(e,t,o,r,s){let a=new Set(r.unsyncedFileKeys),i=ye(o,r,a),l=await y(e.id,t).then(m=>ye(m,r,a)),n=$e(i,l),c=Oe(l,i);return await He(r,n),await Le(e,t,r,n),await _e(r,c,s),l}function Oe(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>o.get(s.key)===void 0)}function $e(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let a=o.get(s.key);if(!a||a.checksum!==s.checksum)return!0})}async function Le(e,t,o,r){let s=r.filter(i=>o.files.get(i.key)?.checksum!==i.checksum),a=b(s,k,async i=>P(e.id,i.map(l=>l.key),t).then(l=>Promise.all(l.map(async n=>{n&&(await o.write(n),T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`download ${n.key} from remote theme`)}`))}))));await Promise.all(a)}async function _e(e,t,o){if(!o.noDelete)return Promise.all(t.map(r=>{if(e.files.get(r.key))return e.delete(r.key).then(()=>{T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`remove ${r.key} from local theme`)}`)})}))}async function He(e,t){let o=new Map(e.files);await Promise.all(t.map(r=>e.read(r.key)));for(let r of t){let s=o.get(r.key)?.checksum,a=e.files.get(r.key)?.checksum;if(s!==a)throw new F(`Detected changes to the file '${r.key}' on both local and remote sources. Aborting...`)}}function ye(e,t,o){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!o.has(s.key))}var pe="local",D="remote";async function ge(e,t,o,r,s,a){u("Initiating theme asset reconciliation process"),await r.ready();let{workPromise:i}=await ue(e,t,o,r,s);return{updatedRemoteChecksumsPromise:i.then(async()=>{let n=await y(e.id,t);return we(e,t,n,r,s,a),n}),workPromise:i}}d();function ke(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}import{createServer as We}from"node:http";function Pe(e,t){let{promise:o,resolve:r,reject:s}=ke(),a=ae(e,t),i=Ie(e,t,s),l=Promise.all([a,i.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),n=qe(e,t,l);return{workPromise:l,serverStart:n.start,dispatchEvent:n.dispatch,renderDevSetupProgress:i.renderProgress,backgroundJobPromise:o,resolveBackgroundJob:r}}function Ie(e,t,o){let r=n=>(v("Failed to perform the initial theme synchronization.",n),o(n),new Promise(()=>{})),a=y(e.id,t.session).then(n=>Me(e,t,n,o)),i=a.then(async({updatedRemoteChecksumsPromise:n})=>{let c=await n;return fe(e,t.session,c,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:r})});return{workPromise:i.then(n=>n.workPromise).catch(r),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:c}=await a;await te([{title:"Performing file synchronization. This may take a while...",task:async()=>{await c}}])}let{renderThemeSyncProgress:n}=await i;await n()}}}function Me(e,t,o,r){return t.options.themeEditorSync?ge(e,t.session,o,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},r):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(o),workPromise:Promise.resolve()})}function qe(e,t,o){let r=Y(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];r.use(ne(t.options.host,t.options.port)),r.use(z(async()=>(await o,J(i=>{i.node.req.headers.origin&&K(i,{origin:n=>s.includes(n),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&r.use(le(e,t)),r.use(se(e,t)),r.use(re(e,t)),r.use(oe(e,t));let a=We(j(r));return{dispatch:r.handler.bind(r),start:async()=>new Promise(i=>a.listen({port:t.options.port,host:t.options.host},()=>i({close:async()=>{await Promise.all([new Promise(l=>{a.closeAllConnections(),a.close(l)})])}})))}}import Ge from"readline";var Ue="127.0.0.1",Ke=9292,ve=!1;async function xt(e){if(!await de(e.directory)&&!await ee(e.force))return;e.password?.startsWith("shpat_")&&R({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
2
2
  `,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await ce(e.directory,e.listing);let[t,o]=await Promise.all([Z(e.adminSession),Q(e.adminSession)]),r=o?await X(e.storePassword,e.adminSession.storeFqdn,t):void 0,s=ie(),a=me(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),i=e.host??Ue,l;if(e.port){if(!await N(e.port))throw new g(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);l=e.port}else l=await B(Ke);let n={local:`http://${i}:${l}`,giftCard:`http://${i}:${l}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${l}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},m={session:await x(e.theme.id.toString(),e.adminSession,e.password,r,t),localThemeFileSystem:a,localThemeExtensionFileSystem:s,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],host:i,port:l,open:e.open,liveReload:e["live-reload"],standardEventsDevBundle:!0,standardEventsInspector:e["standard-events-inspector"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:f,renderDevSetupProgress:h,backgroundJobPromise:Re,resolveBackgroundJob:Ee}=Pe(e.theme,m);Ge.emitKeypressEvents(process.stdin);let Te=ze(n,m,Ee);process.stdin.on("keypress",Te),await Promise.all([Re,h().then(f).then(()=>{process.stdin.isTTY&&process.stdin.setRawMode(!0),je(n),e.open&&be(n.local,"development server")})]),await Je(e.commandConfig,e.adminSession),process.exit(0)}async function Je(e,t){if(!ve){ve=!0;try{await _(()=>({store_fqdn_hash:O(t.storeFqdn)})),await H(()=>({store_fqdn:t.storeFqdn})),await $({config:e,exitMode:"ok"})}catch{}}}function ze(e,t,o){let r=W(be,100,{leading:!0,trailing:!1});return(s,a)=>{if(a.ctrl&&a.name==="c"){o();return}switch(a.name){case void 0:break;case"t":r(e.local,"localhost");break;case"p":r(e.preview,"theme preview");break;case"e":r(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":r(e.giftCard,"gift card preview");break;default:break}}}function be(e,t){U(e).catch(Ye(t))}function Ye(e){return t=>{R({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function je(e){M({body:[{list:{title:p.bold("Preview your theme ")+p.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${p.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${p.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${p.cyan("(g)")}`,url:e.giftCard}}]]})}export{xt as a,be as b};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-E64BQS4D.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-J2WCMQZZ.js";import{w as c}from"./chunk-6EZ7JWBK.js";import{e as s}from"./chunk-WRRUFK4Y.js";import{$a as d}from"./chunk-DONEJHDG.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
1
+ import{c as u}from"./chunk-NJLSZS27.js";import{w as c}from"./chunk-YYLEWVO6.js";import{e as s}from"./chunk-N5U5Q2MG.js";import{$a as d}from"./chunk-BXDZX3BS.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
@@ -0,0 +1 @@
1
+ import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.5.0";export{o as a};
@@ -1,4 +1,4 @@
1
- import{a as D}from"./chunk-BCD4KTLJ.js";import{a as _,c as b}from"./chunk-VOJWKGCW.js";import{a as c,b as F}from"./chunk-QMXKGSFH.js";import{e as y,q as T}from"./chunk-PJYNAUQB.js";import{i as v,p as g,v as w}from"./chunk-D6YDSGR4.js";import{b as u}from"./chunk-H5C3QTOO.js";import{A as p,v as d}from"./chunk-6EZ7JWBK.js";import{V as f}from"./chunk-DONEJHDG.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as Y,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
1
+ import{a as D}from"./chunk-F447QKVX.js";import{a as _,c as b}from"./chunk-7KHYEIA7.js";import{a as c,b as F}from"./chunk-H3V6Y5JO.js";import{e as y,q as T}from"./chunk-7ZIO3X22.js";import{i as v,p as g,v as w}from"./chunk-JGN7YG5X.js";import{b as u}from"./chunk-S5JJL3BP.js";import{A as p,v as d}from"./chunk-YYLEWVO6.js";import{V as f}from"./chunk-BXDZX3BS.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as Y,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
2
2
 
3
3
  `}]:[];d({body:f(s,o=>[...l,`The following themes were deleted from ${n}:`,F(o)],o=>[...l,"The theme",...c(o),`was deleted from ${n}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let i=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${i}`,filter:{development:e.development}})]}async function M(t,e){let r={message:f(t,n=>[`Delete the following themes from ${e}?`],n=>["Delete",...c(n),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(r.infoTable={"":t.map(c)}),p(r)}var a=Y(C(),1);var O,m=class extends w{async command(e,i,r){let{environment:n,development:s,force:l,theme:o}=e,E=o??[];await I(i,{selectTheme:e["show-all"],environment:n,development:s,themes:E,force:l},r)}};O=m;m.summary="Delete remote themes from the connected store. This command can't be undone.";m.descriptionWithMarkdown=`Deletes a theme from your store.
4
4
 
@@ -1,4 +1,4 @@
1
- import{b as $}from"./chunk-SKLUHLS2.js";import{a as O}from"./chunk-HM5H7WBE.js";import{a as T}from"./chunk-ZAMDXIVC.js";import{Fa as N,i as k}from"./chunk-ATXODH6C.js";import{f as l}from"./chunk-442S5SDM.js";import{H as S,I as b}from"./chunk-5W443CKL.js";import{a as h}from"./chunk-FU232KQ7.js";import{b as P,c as I}from"./chunk-H5C3QTOO.js";import{g as v,u as E}from"./chunk-6EZ7JWBK.js";import{Gb as C,Hb as _,Lb as w,N as y,Wb as A}from"./chunk-DONEJHDG.js";import{g as p,j as g}from"./chunk-773TIA5M.js";import{r as W}from"./chunk-T6CC5WUU.js";import{e as U,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function x(n,e,t,o,i){return i.webEnv?F(n,e,t,i):R(n,e,o,i)}async function F(n,e,t,{format:o}){return $(n,e,t,o)}async function R(n,e,t,o){if(o.format==="json"){let i=j(n.allExtensions.filter(s=>s.isReturnedAsInfo())),r={...n,packageManager:t.packageManager,nodeDependencies:t.nodeDependencies,usesWorkspaces:t.usesWorkspaces,allExtensions:i};return"realExtensions"in r&&(r.realExtensions=j(r.realExtensions)),"specifications"in r&&(r={...r,specifications:r.specifications?.map(s=>D(s))}),_`${JSON.stringify(Object.fromEntries(Object.entries(r).filter(([s])=>s!=="configSchema")),null,2)}`}else return new d(n,e,t,o).output()}function D(n){if("schema"in n){let{schema:e,...t}=n;return t}return n}function j(n){return n.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",u={subdued:"Not yet configured"},K="NOT LOADED",d=class{constructor(e,t,o,i){this.app=e,this.remoteApp=t,this.project=o,this.options=i}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=u;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:g(this.app.configPath)||l.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:u],["Client ID",this.remoteApp.apiKey||u],["Access scopes",k(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??u],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
1
+ import{b as $}from"./chunk-CVRAATZ5.js";import{a as O}from"./chunk-PLHJQQVZ.js";import{a as T}from"./chunk-6V37CHBZ.js";import{Fa as N,i as k}from"./chunk-KJQAJUDU.js";import{f as l}from"./chunk-UEC23KAO.js";import{H as S,I as b}from"./chunk-3EQY5B4S.js";import{a as h}from"./chunk-Q3WOWDUU.js";import{b as P,c as I}from"./chunk-S5JJL3BP.js";import{g as v,u as E}from"./chunk-YYLEWVO6.js";import{Gb as C,Hb as _,Lb as w,N as y,Wb as A}from"./chunk-BXDZX3BS.js";import{g as p,j as g}from"./chunk-773TIA5M.js";import{r as W}from"./chunk-T6CC5WUU.js";import{e as U,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function x(n,e,t,o,i){return i.webEnv?F(n,e,t,i):R(n,e,o,i)}async function F(n,e,t,{format:o}){return $(n,e,t,o)}async function R(n,e,t,o){if(o.format==="json"){let i=j(n.allExtensions.filter(s=>s.isReturnedAsInfo())),r={...n,packageManager:t.packageManager,nodeDependencies:t.nodeDependencies,usesWorkspaces:t.usesWorkspaces,allExtensions:i};return"realExtensions"in r&&(r.realExtensions=j(r.realExtensions)),"specifications"in r&&(r={...r,specifications:r.specifications?.map(s=>D(s))}),_`${JSON.stringify(Object.fromEntries(Object.entries(r).filter(([s])=>s!=="configSchema")),null,2)}`}else return new d(n,e,t,o).output()}function D(n){if("schema"in n){let{schema:e,...t}=n;return t}return n}function j(n){return n.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",u={subdued:"Not yet configured"},K="NOT LOADED",d=class{constructor(e,t,o,i){this.app=e,this.remoteApp=t,this.project=o,this.options=i}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=u;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:g(this.app.configPath)||l.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:u],["Client ID",this.remoteApp.apiKey||u],["Access scopes",k(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??u],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
2
2
  Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:r}=o.configuration,s=p(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),r.length>0&&t.push([" roles",r.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:p(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:p(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${l.web}`);e.push(...i.map(r=>r.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(o=>o.isReturnedAsInfo());return y(e.map(o=>o.type)).map(o=>{let i=e.filter(r=>r.type===o);if(i[0])return this.subtableSection(i[0].externalType,i.map(r=>this.extensionSubSection(r)).flat())}).filter(o=>o!==void 0)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||K}`,{filePath:p(this.app.directory,e.directory)}],[" config file",{filePath:p(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let r of i)o.push([{error:" error"},{error:this.formattedError(r.message)}]);return o}formattedError(e){let t=e.trim();if(A())return t;let[o,...i]=t.split(`
3
3
  `);return[`! ${o}`,...i.map(r=>` ${r}`)].join(`
4
4
  `)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",h],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
@@ -1,3 +1,3 @@
1
- import{a as _}from"./chunk-VOJWKGCW.js";import{e as R}from"./chunk-QMXKGSFH.js";import{a as j}from"./chunk-J3HXFQ2L.js";import{c as O,i as k,o as x}from"./chunk-6YPEONHB.js";import{p as v,v as A}from"./chunk-D6YDSGR4.js";import{b as F,c as L}from"./chunk-H5C3QTOO.js";import{J as y}from"./chunk-6EZ7JWBK.js";import{d as T}from"./chunk-WKBVT5WG.js";import{$a as $,Lb as S,Pb as p,la as P,ua as g}from"./chunk-DONEJHDG.js";import{d as m,i as w}from"./chunk-773TIA5M.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as D,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{fileURLToPath as I}from"node:url";async function E(...i){let e=await $("package.json",{cwd:I(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?m(w(e),"assets",...i):m(w(e),"dist","assets",...i)}async function b(i,e,s,t,n,f){let c=await O(i)?await j(f,i.storeFqdn):void 0;if(n)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let d=await x(e,i,n,c),o=await k(d,{method:"GET",path:s,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let u=await o.text();throw new Error(`Bad response: ${o.status}: ${u}`)}let a=await o.text();t?S(a):await J(a)}async function J(i){let e=process.env.WSL_DISTRO_NAME,s=e?`//wsl$/${e}`:"",t=await E("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${t}`);let n="liquid-profile",f=Buffer.from(i).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(n)}, ${JSON.stringify(f)})`,d=`speedscope-${Number(new Date)}-${process.pid}`,o=m(P(),`${d}.js`);p(`[Theme Profile] writing JS file to: ${o}`),await g(o,c),p(`[Theme Profile] JS file created successfully: ${o}`),t=`${s}${t}`,o=`${s}${o}`,t+=`#localProfilePath=${o}`;let a=m(P(),`${d}.html`);p(`[Theme Profile] writing HTML file to: ${a}`),await g(a,`<script>window.location=${JSON.stringify(t)}</script>`),p(`[Theme Profile] HTML file created successfully: ${a}`),a=`${s}${a}`,t=`file://${a}`,p(`[Theme Profile] Opening URL: ${t}`);let u=await y(t);p(`[Theme Profile] URL opened successfully: ${u}`)}var h=D(U(),1);var q,r=class extends A{async command(e,s){let{password:t}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await _(s,n),c=[{title:`Generating Liquid profile for ${s.storeFqdn} ${e.url}`,task:async()=>{await b(s,f.id.toString(),e.url,e.json,t,e["store-password"])}}];await R(c)}};q=r;r.summary="Profile the Liquid rendering of a theme page.";r.usage=["theme profile","theme profile --url /products/classic-leather-jacket"];r.descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
1
+ import{a as _}from"./chunk-7KHYEIA7.js";import{e as R}from"./chunk-H3V6Y5JO.js";import{a as j}from"./chunk-52H2R2FU.js";import{c as O,i as k,o as x}from"./chunk-XZWAX4FI.js";import{p as v,v as A}from"./chunk-JGN7YG5X.js";import{b as F,c as L}from"./chunk-S5JJL3BP.js";import{J as y}from"./chunk-YYLEWVO6.js";import{d as T}from"./chunk-AUZCENYI.js";import{$a as $,Lb as S,Pb as p,la as P,ua as g}from"./chunk-BXDZX3BS.js";import{d as m,i as w}from"./chunk-773TIA5M.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as D,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{fileURLToPath as I}from"node:url";async function E(...i){let e=await $("package.json",{cwd:I(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?m(w(e),"assets",...i):m(w(e),"dist","assets",...i)}async function b(i,e,s,t,n,f){let c=await O(i)?await j(f,i.storeFqdn):void 0;if(n)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let d=await x(e,i,n,c),o=await k(d,{method:"GET",path:s,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let u=await o.text();throw new Error(`Bad response: ${o.status}: ${u}`)}let a=await o.text();t?S(a):await J(a)}async function J(i){let e=process.env.WSL_DISTRO_NAME,s=e?`//wsl$/${e}`:"",t=await E("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${t}`);let n="liquid-profile",f=Buffer.from(i).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(n)}, ${JSON.stringify(f)})`,d=`speedscope-${Number(new Date)}-${process.pid}`,o=m(P(),`${d}.js`);p(`[Theme Profile] writing JS file to: ${o}`),await g(o,c),p(`[Theme Profile] JS file created successfully: ${o}`),t=`${s}${t}`,o=`${s}${o}`,t+=`#localProfilePath=${o}`;let a=m(P(),`${d}.html`);p(`[Theme Profile] writing HTML file to: ${a}`),await g(a,`<script>window.location=${JSON.stringify(t)}</script>`),p(`[Theme Profile] HTML file created successfully: ${a}`),a=`${s}${a}`,t=`file://${a}`,p(`[Theme Profile] Opening URL: ${t}`);let u=await y(t);p(`[Theme Profile] URL opened successfully: ${u}`)}var h=D(U(),1);var q,r=class extends A{async command(e,s){let{password:t}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await _(s,n),c=[{title:`Generating Liquid profile for ${s.storeFqdn} ${e.url}`,task:async()=>{await b(s,f.id.toString(),e.url,e.json,t,e["store-password"])}}];await R(c)}};q=r;r.summary="Profile the Liquid rendering of a theme page.";r.usage=["theme profile","theme profile --url /products/classic-leather-jacket"];r.descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
2
2
 
3
3
  This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;r.description=q.descriptionWithoutMarkdown();r.flags={...F,...v,theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:h.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":h.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...L};r.multiEnvironmentsFlags=null;var le=r;export{le as a};
@@ -1,3 +1,3 @@
1
- import{b as $}from"./chunk-J3JPJCWP.js";import{a as O}from"./chunk-BCD4KTLJ.js";import{a as M}from"./chunk-VOJWKGCW.js";import{a as x,l as H,n as Y}from"./chunk-2NWWMNU5.js";import{a as R}from"./chunk-OQORDQLH.js";import{a as G,c as y}from"./chunk-QMXKGSFH.js";import{a as S,b as L}from"./chunk-STJ3LWFL.js";import{k as A,n as I}from"./chunk-PJYNAUQB.js";import{p as D,q as E,r as _,u as P,v as C}from"./chunk-D6YDSGR4.js";import{h as V,k as B}from"./chunk-MZMYBFZQ.js";import{O as g,ua as a}from"./chunk-5W443CKL.js";import{b}from"./chunk-H5C3QTOO.js";import{D as F,v as k}from"./chunk-6EZ7JWBK.js";import{Wa as T}from"./chunk-DONEJHDG.js";import{q as p}from"./chunk-773TIA5M.js";import{r as Q}from"./chunk-T6CC5WUU.js";import{e as z,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function K(e,t,o,n,r,l){let i=X(o,n,r),c=J(o,e,n,t),s=[...i,...c,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await F(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function X(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function J(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let u=s.checksum;return o.files.get(s.key)?.checksum!==u});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return $(l,P,(s,u)=>({title:`Downloading files from remote theme ${i({current:u,total:l.length})}`,task:async()=>Z(t,o,s,n)}))}async function Z(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function N(e,t,o,n){a("theme-service:pull:setup"),R({verbose:e.verbose,noColor:e.noColor});let r=t??await g(_({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:c,nodelete:s,live:u,development:f,only:W,ignore:j,force:w,environment:v}=e;if(!await oe(c??p(),w??!1,v?.[0],o))return;let q=await M(r,{header:"Select a theme to open",filter:{live:u,theme:f?`${i?.id}`:e.theme}});a("theme-service:pull:setup"),await ee(q,r,{environment:v?.[0],force:w??!1,ignore:j??[],multiEnvironment:o,nodelete:s??!1,only:W??[],path:c??p()},n)}async function ee(e,t,o,n){a("theme-service:pull:file-system");let r=H(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);a("theme-service:pull:file-system"),await K(e,t,i,r,o,n);let c=o.environment?`Environment: ${o.environment}`:"";k({headline:c,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function te(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function oe(e,t,o,n){return t?!0:!(!await te(e)&&!await Y(e)&&!await y(t,void 0,o,n)||await V(e)&&!await B(e)&&!await y(t,"The current Git directory has uncommitted changes.",o,n))}var h=z(Q(),1);var U,m=class extends C{async command(t,o,n,r,l){a("theme-command:pull"),await N({...t,noColor:t["no-color"]},o,n,l),a("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};U=m;m.summary="Download your remote theme files locally.";m.descriptionWithMarkdown=`Retrieves theme files from Shopify.
1
+ import{b as $}from"./chunk-J3JPJCWP.js";import{a as O}from"./chunk-F447QKVX.js";import{a as M}from"./chunk-7KHYEIA7.js";import{a as x,l as H,n as Y}from"./chunk-235JVI2J.js";import{a as R}from"./chunk-LMPD55L6.js";import{a as G,c as y}from"./chunk-H3V6Y5JO.js";import{a as S,b as L}from"./chunk-STJ3LWFL.js";import{k as A,n as I}from"./chunk-7ZIO3X22.js";import{p as D,q as E,r as _,u as P,v as C}from"./chunk-JGN7YG5X.js";import{h as V,k as B}from"./chunk-ICXHUPP5.js";import{O as g,ua as a}from"./chunk-3EQY5B4S.js";import{b}from"./chunk-S5JJL3BP.js";import{D as F,v as k}from"./chunk-YYLEWVO6.js";import{Wa as T}from"./chunk-BXDZX3BS.js";import{q as p}from"./chunk-773TIA5M.js";import{r as Q}from"./chunk-T6CC5WUU.js";import{e as z,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function K(e,t,o,n,r,l){let i=X(o,n,r),c=J(o,e,n,t),s=[...i,...c,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await F(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function X(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function J(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let u=s.checksum;return o.files.get(s.key)?.checksum!==u});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return $(l,P,(s,u)=>({title:`Downloading files from remote theme ${i({current:u,total:l.length})}`,task:async()=>Z(t,o,s,n)}))}async function Z(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function N(e,t,o,n){a("theme-service:pull:setup"),R({verbose:e.verbose,noColor:e.noColor});let r=t??await g(_({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:c,nodelete:s,live:u,development:f,only:W,ignore:j,force:w,environment:v}=e;if(!await oe(c??p(),w??!1,v?.[0],o))return;let q=await M(r,{header:"Select a theme to open",filter:{live:u,theme:f?`${i?.id}`:e.theme}});a("theme-service:pull:setup"),await ee(q,r,{environment:v?.[0],force:w??!1,ignore:j??[],multiEnvironment:o,nodelete:s??!1,only:W??[],path:c??p()},n)}async function ee(e,t,o,n){a("theme-service:pull:file-system");let r=H(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);a("theme-service:pull:file-system"),await K(e,t,i,r,o,n);let c=o.environment?`Environment: ${o.environment}`:"";k({headline:c,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function te(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function oe(e,t,o,n){return t?!0:!(!await te(e)&&!await Y(e)&&!await y(t,void 0,o,n)||await V(e)&&!await B(e)&&!await y(t,"The current Git directory has uncommitted changes.",o,n))}var h=z(Q(),1);var U,m=class extends C{async command(t,o,n,r,l){a("theme-command:pull"),await N({...t,noColor:t["no-color"]},o,n,l),a("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};U=m;m.summary="Download your remote theme files locally.";m.descriptionWithMarkdown=`Retrieves theme files from Shopify.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;m.description=U.descriptionWithoutMarkdown();m.flags={...b,...D,...E("download"),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),development:h.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:h.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:h.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};m.multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];var Le=m;export{N as a,Le as b};
@@ -1,4 +1,4 @@
1
- import{o as f}from"./chunk-5W443CKL.js";import{b as l}from"./chunk-H5C3QTOO.js";import{b as u}from"./chunk-UKK5P74A.js";import{d as n}from"./chunk-WKBVT5WG.js";import{Lb as m}from"./chunk-DONEJHDG.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static{this.description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.examples=[`# search shopify.dev for a topic
1
+ import{o as f}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-S5JJL3BP.js";import{b as u}from"./chunk-74IG3ZE3.js";import{d as n}from"./chunk-AUZCENYI.js";import{Lb as m}from"./chunk-BXDZX3BS.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static{this.description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.examples=[`# search shopify.dev for a topic
2
2
  shopify doc search --query "subscribe to webhooks"
3
3
 
4
4
  # narrow the search to a specific API and version
@@ -1 +1 @@
1
- import{b}from"./chunk-IX4KP6E3.js";import{a as F}from"./chunk-VOJWKGCW.js";import{j as h,l as u,o as T}from"./chunk-6YPEONHB.js";import{p as y,v as O}from"./chunk-D6YDSGR4.js";import{o as f,ua as v}from"./chunk-5W443CKL.js";import{b as I}from"./chunk-H5C3QTOO.js";import{v as _}from"./chunk-6EZ7JWBK.js";import{d as s}from"./chunk-WKBVT5WG.js";import{Mb as S,Ua as l,ma as c}from"./chunk-DONEJHDG.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
1
+ import{b}from"./chunk-PK6NOLT5.js";import{a as F}from"./chunk-7KHYEIA7.js";import{j as h,l as u,o as T}from"./chunk-XZWAX4FI.js";import{p as y,v as O}from"./chunk-JGN7YG5X.js";import{o as f,ua as v}from"./chunk-3EQY5B4S.js";import{b as I}from"./chunk-S5JJL3BP.js";import{v as _}from"./chunk-YYLEWVO6.js";import{d as s}from"./chunk-AUZCENYI.js";import{Mb as S,Ua as l,ma as c}from"./chunk-BXDZX3BS.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
@@ -1,4 +1,4 @@
1
- import{f as m,i as f}from"./chunk-442S5SDM.js";import{d as s}from"./chunk-WKBVT5WG.js";import{$ as c,Ta as r,qa as h,wa as l}from"./chunk-DONEJHDG.js";import{d as o}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function b(t,i){let n=t?.path??"",e=o(i,n);if(!await r(e))throw new s(`
1
+ import{f as m,i as f}from"./chunk-UEC23KAO.js";import{d as s}from"./chunk-AUZCENYI.js";import{$ as c,Ta as r,qa as h,wa as l}from"./chunk-BXDZX3BS.js";import{d as o}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function b(t,i){let n=t?.path??"",e=o(i,n);if(!await r(e))throw new s(`
2
2
  The extension is not available for ${t?.value}`);return e}async function k({name:t,app:i}){let n=c(t),e=o(i.directory,f.extensions.directoryName,n);if(await r(e))throw new s(`
3
3
  A directory with this name (${n}) already exists.
4
4
  Choose a new name for your extension.`);return await l(e),await h(o(e,m.lockFile)),e}async function v({localApp:t,developerPlatformClient:i,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:x}=(await i.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return x.length>0||t.allExtensions.filter(u=>u.isThemeExtension).length>0||t.allExtensions.length>0}export{b as a,k as b,v as c};
@@ -1 +1 @@
1
- import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-6EZ7JWBK.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
1
+ import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-YYLEWVO6.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-HM5H7WBE.js";import{a as k}from"./chunk-ZAMDXIVC.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-ATXODH6C.js";import{b as y}from"./chunk-H5C3QTOO.js";import{v as u}from"./chunk-6EZ7JWBK.js";import{d as h}from"./chunk-WKBVT5WG.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
1
+ import{a as v}from"./chunk-PLHJQQVZ.js";import{a as k}from"./chunk-6V37CHBZ.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-KJQAJUDU.js";import{b as y}from"./chunk-S5JJL3BP.js";import{v as u}from"./chunk-YYLEWVO6.js";import{d as h}from"./chunk-AUZCENYI.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-KN3FTJDU.js";import{b as r}from"./chunk-UKK5P74A.js";import{u as e}from"./chunk-6EZ7JWBK.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
1
+ import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as e}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-HM5H7WBE.js";import{a as C}from"./chunk-ZAMDXIVC.js";import{Fa as P,I as x,ha as y,i as F}from"./chunk-ATXODH6C.js";import{b as f}from"./chunk-XH6ZP7M5.js";import{b as w}from"./chunk-H5C3QTOO.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-DONEJHDG.js";import{f as u}from"./chunk-773TIA5M.js";import{r as $}from"./chunk-T6CC5WUU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
1
+ import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-PLHJQQVZ.js";import{a as C}from"./chunk-6V37CHBZ.js";import{Fa as P,I as x,ha as y,i as F}from"./chunk-KJQAJUDU.js";import{b as f}from"./chunk-KUKYAIOR.js";import{b as w}from"./chunk-S5JJL3BP.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-BXDZX3BS.js";import{f as u}from"./chunk-773TIA5M.js";import{r as $}from"./chunk-T6CC5WUU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
2
2
 
3
3
  ${s}
4
4
 
@@ -1 +1 @@
1
- import{a as c,c as u}from"./chunk-NNOSZ447.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as h,g as i}from"./chunk-VKWPEFWQ.js";i();i();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-FRYN3NWL.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-3AICQCNU.js"),t=await import("./lib-QJDPPAWN.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-SW2ALZ5Z.js");return await l(r),d.handle(r)}}var s=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-QOGKADWB.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await O(e,n),b(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function O(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-LVFBY4LY.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var F={"no-color":s.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:s.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},E={json:s.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})},S=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return s.Flags.integer({min:1,max:65535,...e,description:o})};async function j(){let{cacheClear:e}=await import("./conf-store-C2LOYIOU.js");e()}export{_ as a,F as b,E as c,S as d,j as e};
1
+ import{a as c,c as u}from"./chunk-NNOSZ447.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as h,g as i}from"./chunk-VKWPEFWQ.js";i();i();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-BTQDUX72.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-3AICQCNU.js"),t=await import("./lib-QJDPPAWN.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-BOESDKZA.js");return await l(r),d.handle(r)}}var s=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-AXZBGWIQ.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await O(e,n),b(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function O(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-AC34ZJZD.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var F={"no-color":s.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:s.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},E={json:s.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})},S=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return s.Flags.integer({min:1,max:65535,...e,description:o})};async function j(){let{cacheClear:e}=await import("./conf-store-V6ILVUUO.js");e()}export{_ as a,F as b,E as c,S as d,j as e};
@@ -1,4 +1,4 @@
1
- import{a as e}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-KN3FTJDU.js";import{b as r}from"./chunk-UKK5P74A.js";import{u as i}from"./chunk-6EZ7JWBK.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Disable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
1
+ import{a as e}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as i}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Disable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
4
4
 
@@ -1 +1 @@
1
- import{a as o}from"./chunk-POAICASX.js";import{b as e}from"./chunk-UKK5P74A.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static{this.description="View the UI kit components that display static output"}static{this.hidden=!0}async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-I3Y6XTKN.js";import{b as e}from"./chunk-74IG3ZE3.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static{this.description="View the UI kit components that display static output"}static{this.hidden=!0}async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{b as we}from"./chunk-G2I2ZUBV.js";import{a as he,c as ye}from"./chunk-MZMYBFZQ.js";import{b as ue}from"./chunk-ZEENHLSC.js";import{a as Fe}from"./chunk-HM5H7WBE.js";import{Ca as Re,Fa as Le,G as ve,L as Pe,O as Ae,Q as ke,ca as Ce,ea as xe,h as ge}from"./chunk-ATXODH6C.js";import{$ as G,da as Ie,o as be}from"./chunk-442S5SDM.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-GW3VY3FZ.js";import{a as U}from"./chunk-FU232KQ7.js";import{b as de}from"./chunk-H5C3QTOO.js";import{b as X}from"./chunk-47MGPVED.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-6EZ7JWBK.js";import{d as pe}from"./chunk-WRRUFK4Y.js";import{d as f}from"./chunk-WKBVT5WG.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-DONEJHDG.js";import{e as fe}from"./chunk-KKUDXLK2.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{r as De}from"./chunk-T6CC5WUU.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=we(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
1
+ import{b as we}from"./chunk-UFGDNIYX.js";import{a as he,c as ye}from"./chunk-ICXHUPP5.js";import{b as ue}from"./chunk-6LTJMYUD.js";import{a as Fe}from"./chunk-PLHJQQVZ.js";import{Ca as Re,Fa as Le,G as ve,L as Pe,O as Ae,Q as ke,ca as Ce,ea as xe,h as ge}from"./chunk-KJQAJUDU.js";import{$ as G,da as Ie,o as be}from"./chunk-UEC23KAO.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-HX3TALXV.js";import{a as U}from"./chunk-Q3WOWDUU.js";import{b as de}from"./chunk-S5JJL3BP.js";import{b as X}from"./chunk-BU7R7NFL.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-YYLEWVO6.js";import{d as pe}from"./chunk-N5U5Q2MG.js";import{d as f}from"./chunk-AUZCENYI.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-BXDZX3BS.js";import{e as fe}from"./chunk-MGPLKG23.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{r as De}from"./chunk-T6CC5WUU.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=we(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
2
  Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await V(async i=>{let d=p(i,"download"),m=o.filePath?p(d,o.filePath):d,u=p(i,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await K(d);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:d,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(m,u,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let l=(await re(u)).content;l.name=a,l.author=await se()??"",l.private=!0;let v=["extensions/*"].concat(We(u));switch(t){case"npm":case"yarn":case"bun":l.workspaces=v;break;case"pnpm":{await qe(u,v),await _(p(u,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new ae}await _e({packageJSON:l,local:e.local,directory:u,useGlobalCLI:e.useGlobalCLI}),await ie(u,l)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let l=p(u,".gitignore");if(await C(l)){let v=await Y(l);R.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await $(l,v.trim())}}}),await fe()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let l=p(u,".npmrc");await _(l,`@shopify:registry=https://registry.npmjs.org
4
4
  `)}});let M=!1;w.push({title:"Preparing project directory",task:async()=>{await Se(r,a),M=!0,await W(u,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await $e({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await j(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await me(w)}catch(l){throw M&&await I(r).catch(()=>{}),l}});let n;if(e.selectedAppOrNameResult.result==="new"){let i=await ve(r,e.name),d=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(d,i)}else n=e.selectedAppOrNameResult.app;await Re({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return ce({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(t,"shopify app generate extension")}],["To see your app, run",{command:L(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(t,"shopify app","--help")}]]}),{app:s.app}}async function Se(e,t){if(await C(e))throw new f(`
@@ -1 +1 @@
1
- import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-5W443CKL.js";import{b as l}from"./chunk-KN3FTJDU.js";import{d as p,g as F}from"./chunk-WKBVT5WG.js";import{Fb as V,Hb as h}from"./chunk-DONEJHDG.js";import{j as q}from"./chunk-NNOSZ447.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??(s=await b(e,n));let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
1
+ import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-TM534QSE.js";import{d as p,g as F}from"./chunk-AUZCENYI.js";import{Fb as V,Hb as h}from"./chunk-BXDZX3BS.js";import{j as q}from"./chunk-NNOSZ447.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??(s=await b(e,n));let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-SXTDVUT3.js";import{l as i}from"./chunk-WKBVT5WG.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
1
+ import{b as n}from"./chunk-WTYH2O47.js";import{l as i}from"./chunk-AUZCENYI.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
@@ -1 +1 @@
1
- import{b as h}from"./chunk-47MGPVED.js";import{Hb as a,Pb as u}from"./chunk-DONEJHDG.js";import{f as I}from"./chunk-KKUDXLK2.js";import{c as D}from"./chunk-NNOSZ447.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
1
+ import{b as h}from"./chunk-BU7R7NFL.js";import{Hb as a,Pb as u}from"./chunk-BXDZX3BS.js";import{f as I}from"./chunk-MGPLKG23.js";import{c as D}from"./chunk-NNOSZ447.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunk-HM5H7WBE.js";import{a as r}from"./chunk-ZAMDXIVC.js";import{Ca as n,Fa as p}from"./chunk-ATXODH6C.js";import{b as e}from"./chunk-H5C3QTOO.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var c=m(g(),1);var t,o=class extends s{async run(){let{flags:i}=await this.parse(t),f={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config},d=await n(f),{app:l}=await p({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=o;o.summary="Fetch your app configuration from the Developer Dashboard.";o.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
1
+ import{a as s}from"./chunk-PLHJQQVZ.js";import{a as r}from"./chunk-6V37CHBZ.js";import{Ca as n,Fa as p}from"./chunk-KJQAJUDU.js";import{b as e}from"./chunk-S5JJL3BP.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var c=m(g(),1);var t,o=class extends s{async run(){let{flags:i}=await this.parse(t),f={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config},d=await n(f),{app:l}=await p({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=o;o.summary="Fetch your app configuration from the Developer Dashboard.";o.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
2
2
 
3
3
  For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
4
4
  `;o.description=t.descriptionWithoutMarkdown();o.flags={...e,...r,"organization-id":c.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var A=o;export{A as a};
@@ -1,4 +1,4 @@
1
- import{c as Me}from"./chunk-5GVXMNC4.js";import{$ as ze,H as Ee,I as $e,K as ie,L as ae,P as te,b as Ie,ba as q,ca as Re,e as X,f as Te,ga as h,ha as Ce,ia as K,j as p,ja as Oe,ka as Le,la as Be,n as Ve,na as U,o as L,oa as Ke,pa as j,r as s,t as ee,v as D,w as qe,x as ne,z as B}from"./chunk-5W443CKL.js";import{b as Pe}from"./chunk-ZDF5N422.js";import{w as oe}from"./chunk-GW3VY3FZ.js";import{b as we}from"./chunk-KN3FTJDU.js";import{a as M}from"./chunk-FU232KQ7.js";import{b as Ue}from"./chunk-47MGPVED.js";import{a as Ge}from"./chunk-WW7TENNA.js";import{B as je}from"./chunk-6EZ7JWBK.js";import{d as k,g as v}from"./chunk-WKBVT5WG.js";import{Fb as We,Hb as Qe,N as be,Pb as x,Ta as De,U as Fe,Wa as xe,ga as _e,ma as Ae}from"./chunk-DONEJHDG.js";import{u as Z}from"./chunk-A4SBXDZB.js";import{f as H,j as He}from"./chunk-KKUDXLK2.js";import{d as he,j as O}from"./chunk-773TIA5M.js";import{e as P,g as o}from"./chunk-VKWPEFWQ.js";o();function E(n,{httpsOnly:e=!1,message:i="Invalid URL"}={}){return n.refine(a=>Je(a,e),{message:i}).refine(a=>!a.includes(`
1
+ import{c as Me}from"./chunk-BVHBMOIB.js";import{$ as ze,H as Ee,I as $e,K as ie,L as ae,P as te,b as Ie,ba as q,ca as Re,e as X,f as Te,ga as h,ha as Ce,ia as K,j as p,ja as Oe,ka as Le,la as Be,n as Ve,na as U,o as L,oa as Ke,pa as j,r as s,t as ee,v as D,w as qe,x as ne,z as B}from"./chunk-3EQY5B4S.js";import{b as Pe}from"./chunk-ZDF5N422.js";import{w as oe}from"./chunk-HX3TALXV.js";import{b as we}from"./chunk-TM534QSE.js";import{a as M}from"./chunk-Q3WOWDUU.js";import{b as Ue}from"./chunk-BU7R7NFL.js";import{a as Ge}from"./chunk-WW7TENNA.js";import{B as je}from"./chunk-YYLEWVO6.js";import{d as k,g as v}from"./chunk-AUZCENYI.js";import{Fb as We,Hb as Qe,N as be,Pb as x,Ta as De,U as Fe,Wa as xe,ga as _e,ma as Ae}from"./chunk-BXDZX3BS.js";import{u as Z}from"./chunk-A4SBXDZB.js";import{f as H,j as He}from"./chunk-MGPLKG23.js";import{d as he,j as O}from"./chunk-773TIA5M.js";import{e as P,g as o}from"./chunk-VKWPEFWQ.js";o();function E(n,{httpsOnly:e=!1,message:i="Invalid URL"}={}){return n.refine(a=>Je(a,e),{message:i}).refine(a=>!a.includes(`
2
2
  `),{message:i})}function mt(n,{message:e="URL must be HTTPS URL or start with /"}={}){return n.refine(i=>i.startsWith("/")||Je(i,!0),{message:e})}function Je(n,e){try{let i=new URL(n);return e?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function pt(n){return typeof n=="string"&&!n.startsWith("/")?`/${n}`:n}var Ji=30;function ut(n){return n.length<=Ji}o();o();o();var Ye=p`
3
3
  mutation AppCreate(
4
4
  $org: Int!
@@ -1 +1 @@
1
- import{n as R}from"./chunk-5W443CKL.js";import{a as T,b as k}from"./chunk-SXTDVUT3.js";import{f as G}from"./chunk-WRRUFK4Y.js";import{d as l}from"./chunk-WKBVT5WG.js";import{Fb as u,Hb as h,Oa as y,Pa as x,Pb as f,ka as $,ua as b,wa as g}from"./chunk-DONEJHDG.js";import{d,i as w}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
1
+ import{n as R}from"./chunk-3EQY5B4S.js";import{a as T,b as k}from"./chunk-WTYH2O47.js";import{f as G}from"./chunk-N5U5Q2MG.js";import{d as l}from"./chunk-AUZCENYI.js";import{Fb as u,Hb as h,Oa as y,Pa as x,Pb as f,ka as $,ua as b,wa as g}from"./chunk-BXDZX3BS.js";import{d,i as w}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-HM5H7WBE.js";import{a as E}from"./chunk-ZAMDXIVC.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-ATXODH6C.js";import{b as I}from"./chunk-H5C3QTOO.js";import{D as A,v,x as h}from"./chunk-6EZ7JWBK.js";import{d as w}from"./chunk-WRRUFK4Y.js";import{f as k}from"./chunk-WKBVT5WG.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
1
+ import{a as C}from"./chunk-PLHJQQVZ.js";import{a as E}from"./chunk-6V37CHBZ.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-KJQAJUDU.js";import{b as I}from"./chunk-S5JJL3BP.js";import{D as A,v,x as h}from"./chunk-YYLEWVO6.js";import{d as w}from"./chunk-N5U5Q2MG.js";import{f as k}from"./chunk-AUZCENYI.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
2
2
  ${r.message}`:""];if(i.userErrors&&i.userErrors.length>0){let t=i.userErrors?.map(R=>R.message).join(", ");h({headline:"Version couldn't be released.",body:[...u,`${u.length>0?`
3
3
 
4
4
  `:""}${t}`]})}else v({headline:"Version released to users.",body:u})}var p=T(b(),1);var g,s=class extends C{async run(){let{flags:e}=await this.parse(g),m=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],a=e["allow-deletes"],r=!!(o&&a),l=[];!o&&!a&&l.push("allow-updates"),this.failMissingNonTTYFlags(e,l);let{app:c,remoteApp:f,developerPlatformClient:i}=await y({directory:e.path,clientId:m,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:c,remoteApp:f,developerPlatformClient:i,force:r,allowUpdates:o,allowDeletes:a,version:e.version}),{app:c}}};g=s;s.summary="Release an app version.";s.usage="app release --version <version>";s.descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";s.description=g.descriptionWithoutMarkdown();s.flags={...I,...E,"allow-updates":p.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":p.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:p.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};var G=s;export{G as a};
@@ -1 +1 @@
1
- import{b as f,c as o,d as h}from"./chunk-5JNEWYD5.js";import{a as l}from"./chunk-HM5H7WBE.js";import{a as c}from"./chunk-ZAMDXIVC.js";import{Fa as m}from"./chunk-ATXODH6C.js";import{b as d}from"./chunk-H5C3QTOO.js";import{Mb as e}from"./chunk-DONEJHDG.js";import{u as r}from"./chunk-A4SBXDZB.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var t=class g extends l{async run(){let{flags:a}=await this.parse(g),{app:s}=await m({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),i=new h(s);return await i.start(),e(`Watching for changes in ${s.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(n=>{switch(n.type){case o.Created:e(` \u2705 Extension created - ${r.green(n.extension.handle)}`);break;case o.Deleted:e(` \u274C Extension deleted: ${r.red(n.extension.handle)}`);break;case o.Updated:e(` \u{1F504} Updated: ${r.yellow(n.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:s}}};t.summary="Watch and prints out changes to an app.";t.hidden=!0;t.flags={...d,...c};var F=t;export{F as a};
1
+ import{b as f,c as o,d as h}from"./chunk-57IRHKV3.js";import{a as l}from"./chunk-PLHJQQVZ.js";import{a as c}from"./chunk-6V37CHBZ.js";import{Fa as m}from"./chunk-KJQAJUDU.js";import{b as d}from"./chunk-S5JJL3BP.js";import{Mb as e}from"./chunk-BXDZX3BS.js";import{u as r}from"./chunk-A4SBXDZB.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var t=class g extends l{async run(){let{flags:a}=await this.parse(g),{app:s}=await m({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),i=new h(s);return await i.start(),e(`Watching for changes in ${s.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(n=>{switch(n.type){case o.Created:e(` \u2705 Extension created - ${r.green(n.extension.handle)}`);break;case o.Deleted:e(` \u274C Extension deleted: ${r.red(n.extension.handle)}`);break;case o.Updated:e(` \u{1F504} Updated: ${r.yellow(n.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:s}}};t.summary="Watch and prints out changes to an app.";t.hidden=!0;t.flags={...d,...c};var F=t;export{F as a};
@@ -1,4 +1,4 @@
1
- import{a as te,b as ne}from"./chunk-NWDP5IZ2.js";import{c as Y}from"./chunk-MZMYBFZQ.js";import{b as E}from"./chunk-ZEENHLSC.js";import{a as ee}from"./chunk-HM5H7WBE.js";import{a as W}from"./chunk-ZAMDXIVC.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-ATXODH6C.js";import{f as H,h as J}from"./chunk-442S5SDM.js";import{a as T}from"./chunk-J5TNYNR5.js";import{C as R,p as F,x as L,y as P}from"./chunk-GW3VY3FZ.js";import{b as V}from"./chunk-H5C3QTOO.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-6EZ7JWBK.js";import{d as y}from"./chunk-WKBVT5WG.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-DONEJHDG.js";import{e as $}from"./chunk-KKUDXLK2.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{r as me}from"./chunk-T6CC5WUU.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await E(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await E(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await E(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
1
+ import{a as te,b as ne}from"./chunk-ROQXPIEZ.js";import{c as Y}from"./chunk-ICXHUPP5.js";import{b as E}from"./chunk-6LTJMYUD.js";import{a as ee}from"./chunk-PLHJQQVZ.js";import{a as W}from"./chunk-6V37CHBZ.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-KJQAJUDU.js";import{f as H,h as J}from"./chunk-UEC23KAO.js";import{a as T}from"./chunk-2MDFREEW.js";import{C as R,p as F,x as L,y as P}from"./chunk-HX3TALXV.js";import{b as V}from"./chunk-S5JJL3BP.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-YYLEWVO6.js";import{d as y}from"./chunk-AUZCENYI.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-BXDZX3BS.js";import{e as $}from"./chunk-MGPLKG23.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{r as me}from"./chunk-T6CC5WUU.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await E(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await E(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await E(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
2
2
  The following extension types are supported: ${s.join(", ")}`,o)}if(le(t,a,n))throw new y(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${n.type} per app`);return n}var pe=ke;var x=fe(me(),1);var O,m=class extends ee{async run(){let{flags:t}=await this.parse(O);await T.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await B(t.path);let{app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}=await Z({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}),{app:r}}};O=m;m.summary="Generate a new app Extension.";m.descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
3
3
 
4
4
  Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
@@ -1 +1 @@
1
- import{a as T}from"./chunk-HA6NISOZ.js";import{b as P,c as w,d as v}from"./chunk-7UOPCYMV.js";import{a as F}from"./chunk-MQICT2LR.js";import{a as x}from"./chunk-ZAMDXIVC.js";import{Ga as y}from"./chunk-ATXODH6C.js";import{b as h,c as m}from"./chunk-H5C3QTOO.js";import{B as d,I as l}from"./chunk-6EZ7JWBK.js";import{Pb as r}from"./chunk-DONEJHDG.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
1
+ import{a as T}from"./chunk-G6YOP2SJ.js";import{b as P,c as w,d as v}from"./chunk-4U3NC3UU.js";import{a as F}from"./chunk-Z2Y6G2QF.js";import{a as x}from"./chunk-6V37CHBZ.js";import{Ga as y}from"./chunk-KJQAJUDU.js";import{b as h,c as m}from"./chunk-S5JJL3BP.js";import{B as d,I as l}from"./chunk-YYLEWVO6.js";import{Pb as r}from"./chunk-BXDZX3BS.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};