@shopify/cli 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/dist/{analytics-DWUYMFHO.js → analytics-CIKTYXZ6.js} +1 -1
  2. package/dist/{analytics-SOXP4UBD.js → analytics-DM7CBV2M.js} +1 -1
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +8 -0
  4. package/dist/assets/hydrogen/starter/README.md +4 -4
  5. package/dist/assets/hydrogen/starter/package.json +1 -1
  6. package/dist/assets/hydrogen/starter/vite.config.ts +6 -0
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-DLNBTHKL.js → chunk-2FIDORHT.js} +1 -1
  9. package/dist/{chunk-HA6NISOZ.js → chunk-2GDACKZF.js} +1 -1
  10. package/dist/{chunk-5W443CKL.js → chunk-2HZMOK4U.js} +2 -2
  11. package/dist/{chunk-7UOPCYMV.js → chunk-2MNOWKMI.js} +1 -1
  12. package/dist/{chunk-J3HXFQ2L.js → chunk-2WDKXDFM.js} +1 -1
  13. package/dist/{chunk-ZEENHLSC.js → chunk-3GMW7IEC.js} +2 -2
  14. package/dist/{chunk-WRRUFK4Y.js → chunk-3QVXHF6I.js} +1 -1
  15. package/dist/{chunk-POAICASX.js → chunk-3SJHCEQR.js} +1 -1
  16. package/dist/{chunk-7LATYPLU.js → chunk-3YCTWCHH.js} +1 -1
  17. package/dist/{chunk-2EROVVCL.js → chunk-4E354M4H.js} +1 -1
  18. package/dist/{chunk-47MGPVED.js → chunk-4TC4M4RC.js} +1 -1
  19. package/dist/{chunk-J5TNYNR5.js → chunk-5JCREGSD.js} +1 -1
  20. package/dist/{chunk-QPN2M26G.js → chunk-5K4DONQJ.js} +1 -1
  21. package/dist/{chunk-2NWWMNU5.js → chunk-5NY4HKJF.js} +1 -1
  22. package/dist/{chunk-BIMOHK2P.js → chunk-5PLLJPEW.js} +1 -1
  23. package/dist/{chunk-PJYNAUQB.js → chunk-5T3OVTF5.js} +1 -1
  24. package/dist/{chunk-73W5BGAZ.js → chunk-5U6MXSNY.js} +1 -1
  25. package/dist/{chunk-AY4GIVME.js → chunk-5UXPTCSD.js} +1 -1
  26. package/dist/{chunk-G2I2ZUBV.js → chunk-6XLVKD6Q.js} +1 -1
  27. package/dist/{chunk-DZLA2RJP.js → chunk-6Y3QXASG.js} +1 -1
  28. package/dist/{chunk-DHBYYHBT.js → chunk-6ZMNEURG.js} +1 -1
  29. package/dist/chunk-6ZRHK4ON.js +1 -0
  30. package/dist/{chunk-GTUKM3ZW.js → chunk-72K36DID.js} +1 -1
  31. package/dist/{chunk-FPLUMESQ.js → chunk-7USHLXEN.js} +1 -1
  32. package/dist/{chunk-ZAMDXIVC.js → chunk-7XQDZF73.js} +1 -1
  33. package/dist/{chunk-OORCODNK.js → chunk-7ZLKT2TB.js} +1 -1
  34. package/dist/{chunk-HCN6HXA5.js → chunk-AH2ZJ73H.js} +1 -1
  35. package/dist/{chunk-SP2WUATO.js → chunk-AI756VJI.js} +1 -1
  36. package/dist/{chunk-UYK6CXAU.js → chunk-ALQKJAHP.js} +1 -1
  37. package/dist/{chunk-PMXCJIBP.js → chunk-APYASWBA.js} +1 -1
  38. package/dist/{chunk-J2WCMQZZ.js → chunk-ASOT7VNB.js} +1 -1
  39. package/dist/{chunk-MFLQRQQT.js → chunk-AVMNXIXF.js} +1 -1
  40. package/dist/{chunk-7SVMAJTR.js → chunk-BEXQB4RT.js} +1 -1
  41. package/dist/{chunk-Y3WIZSRU.js → chunk-BVFIJSD7.js} +1 -1
  42. package/dist/{chunk-45MEVWH5.js → chunk-BZAZMLII.js} +1 -1
  43. package/dist/{chunk-HZYRCG4R.js → chunk-C5U4NLNU.js} +1 -1
  44. package/dist/{chunk-PETINPMX.js → chunk-CGULQAB5.js} +1 -1
  45. package/dist/{chunk-HZSAUZBX.js → chunk-CNOL26GA.js} +1 -1
  46. package/dist/{chunk-V3RZ3DTW.js → chunk-COTYR5RC.js} +1 -1
  47. package/dist/{chunk-NADNFSKS.js → chunk-DA4LHFJQ.js} +1 -1
  48. package/dist/{chunk-Y66GQ6V2.js → chunk-DCUAVLTM.js} +1 -1
  49. package/dist/{chunk-FA4K3JRN.js → chunk-DDVT2K7E.js} +1 -1
  50. package/dist/{chunk-OQORDQLH.js → chunk-DE3WCNP6.js} +1 -1
  51. package/dist/{chunk-V6ZSIUO3.js → chunk-DKKBJ4H5.js} +1 -1
  52. package/dist/{chunk-ZZFZBFVM.js → chunk-DQE7XRCK.js} +1 -1
  53. package/dist/{chunk-PZYP3MCL.js → chunk-DU5LZYQX.js} +1 -1
  54. package/dist/{chunk-6EZ7JWBK.js → chunk-E24W34C4.js} +4 -4
  55. package/dist/{chunk-TKG42KLM.js → chunk-E7OLCSAL.js} +1 -1
  56. package/dist/{chunk-5QWYIBE6.js → chunk-EAXEV45I.js} +1 -1
  57. package/dist/{chunk-I73E3BD5.js → chunk-EDSKA6UB.js} +1 -1
  58. package/dist/{chunk-WKBVT5WG.js → chunk-ELIH6GCC.js} +1 -1
  59. package/dist/{chunk-QJ7TI6CK.js → chunk-EXQXGSGY.js} +1 -1
  60. package/dist/{chunk-DONEJHDG.js → chunk-EYDNSYYE.js} +2 -2
  61. package/dist/{chunk-SKLUHLS2.js → chunk-FO6FNY6P.js} +1 -1
  62. package/dist/{chunk-UUC5YKAS.js → chunk-FOPGI6GO.js} +1 -1
  63. package/dist/{chunk-H6WN7GP4.js → chunk-FPCPFECH.js} +1 -1
  64. package/dist/{chunk-YGKQCEVG.js → chunk-G7QLHXVA.js} +1 -1
  65. package/dist/{chunk-3OZ6ZZ4T.js → chunk-GAYQKMOM.js} +1 -1
  66. package/dist/{chunk-SWI3LCPE.js → chunk-GKQ6CSJZ.js} +1 -1
  67. package/dist/{chunk-IPQH2RHD.js → chunk-GQG6WELZ.js} +1 -1
  68. package/dist/{chunk-YQH2JHFA.js → chunk-GXUZ3V7S.js} +1 -1
  69. package/dist/{chunk-TJGUNVRI.js → chunk-H3QZN45D.js} +1 -1
  70. package/dist/{chunk-X4DIJTIK.js → chunk-H7DDRARV.js} +1 -1
  71. package/dist/{chunk-G24L7MB3.js → chunk-H7PNMMDO.js} +1 -1
  72. package/dist/{chunk-733R5OKQ.js → chunk-HHSUBF73.js} +1 -1
  73. package/dist/{chunk-IX4KP6E3.js → chunk-HXYWEKMS.js} +1 -1
  74. package/dist/{chunk-GKRCTMWY.js → chunk-IBBFRL3Y.js} +1 -1
  75. package/dist/{chunk-5GVXMNC4.js → chunk-ICFFBMFB.js} +1 -1
  76. package/dist/{chunk-UKK5P74A.js → chunk-IDKUJQIG.js} +3 -3
  77. package/dist/{chunk-EKHWL542.js → chunk-IHUCBI6L.js} +47 -47
  78. package/dist/{chunk-G2S346IS.js → chunk-IIHPONSQ.js} +1 -1
  79. package/dist/{chunk-JAW32T6G.js → chunk-IOU6EKTT.js} +1 -1
  80. package/dist/{chunk-3CYHS4W2.js → chunk-IQYZAALJ.js} +1 -1
  81. package/dist/{chunk-442S5SDM.js → chunk-IRH6IGFT.js} +1 -1
  82. package/dist/{chunk-WNWQSHEC.js → chunk-IRTCLR3F.js} +1 -1
  83. package/dist/chunk-J3KRY2SD.js +1 -0
  84. package/dist/{chunk-KKUDXLK2.js → chunk-JCNRQYRP.js} +1 -1
  85. package/dist/{chunk-F5QG42MA.js → chunk-JNEGEJH6.js} +1 -1
  86. package/dist/{chunk-J7UQBC45.js → chunk-JO4ZHVOD.js} +1 -1
  87. package/dist/{chunk-JOZXRV5K.js → chunk-JOYM7AEQ.js} +1 -1
  88. package/dist/{chunk-ZULTG2D2.js → chunk-JVMYTC3J.js} +1 -1
  89. package/dist/{chunk-PUAMSBXS.js → chunk-KC2TN7AR.js} +1 -1
  90. package/dist/{chunk-CD5O2BIT.js → chunk-KHXDP3SF.js} +1 -1
  91. package/dist/{chunk-6YPEONHB.js → chunk-KOB6T6NK.js} +1 -1
  92. package/dist/{chunk-YLGSM42I.js → chunk-KOUKBXOZ.js} +1 -1
  93. package/dist/{chunk-KN3FTJDU.js → chunk-LUG2BZJP.js} +1 -1
  94. package/dist/{chunk-AT2GDXN7.js → chunk-M2AS5BWX.js} +1 -1
  95. package/dist/{chunk-67KMRBSZ.js → chunk-MCATVWHC.js} +1 -1
  96. package/dist/{chunk-DQ4HA72R.js → chunk-MKCXLBQ4.js} +1 -1
  97. package/dist/{chunk-C3CVLSLS.js → chunk-MMKBIMMC.js} +1 -1
  98. package/dist/{chunk-2MMGFZDP.js → chunk-MOCD7GFI.js} +1 -1
  99. package/dist/{chunk-XH6ZP7M5.js → chunk-MQXSMZQZ.js} +1 -1
  100. package/dist/{chunk-VQW35HIQ.js → chunk-MYQQOOGA.js} +1 -1
  101. package/dist/{chunk-75LJTY7F.js → chunk-N5HGT3TE.js} +1 -1
  102. package/dist/{chunk-VFWWZMOQ.js → chunk-NGPJXONG.js} +1 -1
  103. package/dist/{chunk-U73TPLFE.js → chunk-NV5IDANV.js} +1 -1
  104. package/dist/{chunk-GFCLUGAG.js → chunk-O2PI2PYG.js} +1 -1
  105. package/dist/{chunk-KSZ5K6LJ.js → chunk-O7MONSF7.js} +1 -1
  106. package/dist/{chunk-VOJWKGCW.js → chunk-OASPW2P2.js} +1 -1
  107. package/dist/{chunk-Z4LC3WE5.js → chunk-OCYPWE2O.js} +1 -1
  108. package/dist/{chunk-SXTDVUT3.js → chunk-ODH2U44N.js} +1 -1
  109. package/dist/{chunk-4N6YTHFD.js → chunk-OHASEW7T.js} +1 -1
  110. package/dist/{chunk-IIOIDMG3.js → chunk-OVLTFTZW.js} +1 -1
  111. package/dist/{chunk-Z74QYLNC.js → chunk-P6S5YLOP.js} +1 -1
  112. package/dist/{chunk-GUO7S4NW.js → chunk-PGKP7W5T.js} +1 -1
  113. package/dist/{chunk-LOHUNOQ7.js → chunk-PGN5EZTI.js} +1 -1
  114. package/dist/chunk-PGODIZ64.js +1 -0
  115. package/dist/{chunk-D6YDSGR4.js → chunk-PTIJDS6I.js} +1 -1
  116. package/dist/{chunk-3FBSBMSQ.js → chunk-Q2UHGP2Z.js} +1 -1
  117. package/dist/{chunk-RF6NUGCU.js → chunk-Q2X7IXPQ.js} +1 -1
  118. package/dist/{chunk-H5C3QTOO.js → chunk-Q6LCSRIW.js} +1 -1
  119. package/dist/{chunk-ZIREP3EZ.js → chunk-QDYDB7DY.js} +1 -1
  120. package/dist/{chunk-WLO5H255.js → chunk-QMSYJIAU.js} +1 -1
  121. package/dist/{chunk-T5GSCWN5.js → chunk-QPJQ67GU.js} +1 -1
  122. package/dist/{chunk-QS3FMN67.js → chunk-QPY6WJTT.js} +1 -1
  123. package/dist/{chunk-WAGAC3YI.js → chunk-QVYZZNAS.js} +1 -1
  124. package/dist/{chunk-CZXGQ53M.js → chunk-RFDT525K.js} +1 -1
  125. package/dist/{chunk-NY5OGHM5.js → chunk-RIRSTGFU.js} +1 -1
  126. package/dist/{chunk-APN3VWN4.js → chunk-SFMXFH33.js} +1 -1
  127. package/dist/{chunk-NWDP5IZ2.js → chunk-SKM44SK5.js} +1 -1
  128. package/dist/{chunk-O6KTFMCD.js → chunk-SRAHMYWJ.js} +1 -1
  129. package/dist/{chunk-OAI7VSLW.js → chunk-T3AJL2M5.js} +1 -1
  130. package/dist/{chunk-B7S23DLF.js → chunk-T5DF2GGD.js} +1 -1
  131. package/dist/{chunk-6DIHOMCB.js → chunk-TDCY3BRI.js} +1 -1
  132. package/dist/{chunk-5JNEWYD5.js → chunk-TDSR2X7X.js} +1 -1
  133. package/dist/{chunk-IG6LPVS4.js → chunk-TVU4YD2H.js} +1 -1
  134. package/dist/{chunk-FZKKKGUJ.js → chunk-TXJEP4FB.js} +1 -1
  135. package/dist/{chunk-LOQIRLTD.js → chunk-U2LQBJJL.js} +1 -1
  136. package/dist/{chunk-WZVQHMGI.js → chunk-U7ZRDNZU.js} +1 -1
  137. package/dist/{chunk-RYGZCBO4.js → chunk-UB5BVO76.js} +1 -1
  138. package/dist/{chunk-LCPD2BYX.js → chunk-UHJ65YFN.js} +1 -1
  139. package/dist/{chunk-5QQN3SKH.js → chunk-UYNCJGMC.js} +1 -1
  140. package/dist/{chunk-ATXODH6C.js → chunk-UZ7U322K.js} +1 -1
  141. package/dist/{chunk-HZMP62GK.js → chunk-VHAZBDFE.js} +1 -1
  142. package/dist/{chunk-GW3VY3FZ.js → chunk-VRRDIXFQ.js} +2 -2
  143. package/dist/{chunk-MZMYBFZQ.js → chunk-VSZS3FAJ.js} +1 -1
  144. package/dist/{chunk-B7BUEEBR.js → chunk-WIXW233Y.js} +1 -1
  145. package/dist/{chunk-CPE7XCC6.js → chunk-WMDYHUPS.js} +1 -1
  146. package/dist/{chunk-DO2SHYFU.js → chunk-WO5YOBQ7.js} +1 -1
  147. package/dist/{chunk-4TST2MNC.js → chunk-XDEAZP2I.js} +1 -1
  148. package/dist/{chunk-GBZL4TTY.js → chunk-XH5FCMS5.js} +1 -1
  149. package/dist/chunk-XU6CCL4P.js +278 -0
  150. package/dist/{chunk-XV3I45NA.js → chunk-XWQ72WTQ.js} +1 -1
  151. package/dist/chunk-YB3SGPFF.js +1 -0
  152. package/dist/{chunk-QMXKGSFH.js → chunk-YBFCDINU.js} +1 -1
  153. package/dist/{chunk-BCD4KTLJ.js → chunk-YJCJDCVP.js} +1 -1
  154. package/dist/{chunk-TQUSREKP.js → chunk-YYHCPLBX.js} +1 -1
  155. package/dist/{chunk-6RL7FUPD.js → chunk-YZY4M6IH.js} +1 -1
  156. package/dist/{chunk-WVHB2HCQ.js → chunk-ZDQNCYRH.js} +1 -1
  157. package/dist/{chunk-7EJ4UVYI.js → chunk-ZHPXJRHR.js} +1 -1
  158. package/dist/{chunk-YYL356OX.js → chunk-ZNWFTUFV.js} +1 -1
  159. package/dist/{chunk-ZQ5JVD5X.js → chunk-ZVQBSXE4.js} +1 -1
  160. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  161. package/dist/cli/commands/app/build.js +1 -1
  162. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  163. package/dist/cli/commands/app/bulk/execute.js +1 -1
  164. package/dist/cli/commands/app/bulk/status.js +1 -1
  165. package/dist/cli/commands/app/config/link.js +1 -1
  166. package/dist/cli/commands/app/config/pull.js +1 -1
  167. package/dist/cli/commands/app/config/use.js +1 -1
  168. package/dist/cli/commands/app/config/validate.js +1 -1
  169. package/dist/cli/commands/app/demo/watcher.js +1 -1
  170. package/dist/cli/commands/app/deploy.js +1 -1
  171. package/dist/cli/commands/app/dev/clean.js +1 -1
  172. package/dist/cli/commands/app/dev.js +1 -1
  173. package/dist/cli/commands/app/env/pull.js +1 -1
  174. package/dist/cli/commands/app/env/show.js +1 -1
  175. package/dist/cli/commands/app/execute.js +1 -1
  176. package/dist/cli/commands/app/function/build.js +1 -1
  177. package/dist/cli/commands/app/function/info.js +1 -1
  178. package/dist/cli/commands/app/function/replay.js +1 -1
  179. package/dist/cli/commands/app/function/run.js +1 -1
  180. package/dist/cli/commands/app/function/schema.js +1 -1
  181. package/dist/cli/commands/app/function/typegen.js +1 -1
  182. package/dist/cli/commands/app/generate/extension.js +1 -1
  183. package/dist/cli/commands/app/graphiql.js +1 -1
  184. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  185. package/dist/cli/commands/app/import-extensions.js +1 -1
  186. package/dist/cli/commands/app/info.js +1 -1
  187. package/dist/cli/commands/app/init.js +1 -1
  188. package/dist/cli/commands/app/logs.js +1 -1
  189. package/dist/cli/commands/app/release.js +1 -1
  190. package/dist/cli/commands/app/versions/list.js +1 -1
  191. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  192. package/dist/cli/commands/auth/login.js +1 -1
  193. package/dist/cli/commands/auth/logout.js +1 -1
  194. package/dist/cli/commands/cache/clear.js +1 -1
  195. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  196. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  197. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  198. package/dist/cli/commands/debug/command-flags.js +1 -1
  199. package/dist/cli/commands/doc/fetch.js +1 -1
  200. package/dist/cli/commands/doc/search.js +1 -1
  201. package/dist/cli/commands/docs/generate.js +1 -1
  202. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  203. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  204. package/dist/cli/commands/help.js +1 -1
  205. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  206. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  207. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  209. package/dist/cli/commands/notifications/generate.js +1 -1
  210. package/dist/cli/commands/notifications/list.js +1 -1
  211. package/dist/cli/commands/organization/list.js +1 -1
  212. package/dist/cli/commands/search.js +1 -1
  213. package/dist/cli/commands/theme/check.js +1 -1
  214. package/dist/cli/commands/theme/console.js +1 -1
  215. package/dist/cli/commands/theme/delete.js +1 -1
  216. package/dist/cli/commands/theme/dev.js +1 -1
  217. package/dist/cli/commands/theme/duplicate.js +1 -1
  218. package/dist/cli/commands/theme/info.js +1 -1
  219. package/dist/cli/commands/theme/init.js +1 -1
  220. package/dist/cli/commands/theme/language-server.js +1 -1
  221. package/dist/cli/commands/theme/list.js +1 -1
  222. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  223. package/dist/cli/commands/theme/open.js +1 -1
  224. package/dist/cli/commands/theme/package.js +1 -1
  225. package/dist/cli/commands/theme/preview.js +1 -1
  226. package/dist/cli/commands/theme/profile.js +1 -1
  227. package/dist/cli/commands/theme/publish.js +1 -1
  228. package/dist/cli/commands/theme/pull.js +1 -1
  229. package/dist/cli/commands/theme/push.js +1 -1
  230. package/dist/cli/commands/theme/rename.js +1 -1
  231. package/dist/cli/commands/theme/share.js +1 -1
  232. package/dist/cli/commands/upgrade.js +1 -1
  233. package/dist/cli/commands/version.js +1 -1
  234. package/dist/command-registry.js +1 -1
  235. package/dist/{conf-store-C2LOYIOU.js → conf-store-OC4XCP45.js} +1 -1
  236. package/dist/{deprecations-QOHE6JG6.js → deprecations-M5JGGK47.js} +1 -1
  237. package/dist/dist-3SP7TISC.js +1 -0
  238. package/dist/{dist-FF6C4ZHS.js → dist-Z4H2OM7V.js} +1 -1
  239. package/dist/{environments-EGD263DV.js → environments-ZLSO534C.js} +1 -1
  240. package/dist/{error-66U2HJ37.js → error-ZBG2MA5U.js} +1 -1
  241. package/dist/{error-handler-SW2ALZ5Z.js → error-handler-MCUV4RZV.js} +1 -1
  242. package/dist/{fs-JPQRUGZI.js → fs-7LCRIUF3.js} +1 -1
  243. package/dist/hooks/app-init.js +1 -1
  244. package/dist/hooks/did-you-mean.js +1 -1
  245. package/dist/hooks/hydrogen-init.js +1 -1
  246. package/dist/hooks/postrun.js +1 -1
  247. package/dist/hooks/prerun.js +1 -1
  248. package/dist/hooks/public-metadata.js +1 -1
  249. package/dist/hooks/sensitive-metadata.js +1 -1
  250. package/dist/hooks/tunnel-provider.js +1 -1
  251. package/dist/hooks/tunnel-start.js +1 -1
  252. package/dist/index.js +14 -14
  253. package/dist/{is-global-QWTDUPNR.js → is-global-RURDJZDU.js} +1 -1
  254. package/dist/{local-FRYN3NWL.js → local-5AKD7T5X.js} +1 -1
  255. package/dist/{local-storage-DFH3LT5G.js → local-storage-TJU77VRQ.js} +1 -1
  256. package/dist/{metadata-KZVLHQII.js → metadata-D5GLZOLV.js} +1 -1
  257. package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-FA3Y6DPG.js} +1 -1
  258. package/dist/notifications-system-76GJJAJP.js +1 -0
  259. package/dist/{output-NH4I5Y3C.js → output-FYS764MJ.js} +1 -1
  260. package/dist/{system-GNOF6HMI.js → system-KDM2BB7R.js} +1 -1
  261. package/dist/tsconfig.tsbuildinfo +1 -1
  262. package/dist/{ui-QOGKADWB.js → ui-QIHGXICT.js} +1 -1
  263. package/dist/upgrade-DY4L43H4.js +1 -0
  264. package/dist/{version-FJFTTOZU.js → version-LULWCT5R.js} +1 -1
  265. package/dist/version-WIERCO5R.js +1 -0
  266. package/dist/{workerd-U6WWWY73.js → workerd-N25GY5MX.js} +1 -1
  267. package/oclif.manifest.json +21 -7
  268. package/package.json +8 -8
  269. package/dist/chunk-FU232KQ7.js +0 -1
  270. package/dist/chunk-HM5H7WBE.js +0 -1
  271. package/dist/chunk-MQICT2LR.js +0 -1
  272. package/dist/chunk-UMT7DWR4.js +0 -1
  273. package/dist/chunk-ZIXWWU2N.js +0 -275
  274. package/dist/dist-Q676YGVI.js +0 -1
  275. package/dist/notifications-system-DP443VTE.js +0 -1
  276. package/dist/upgrade-K4S6JW64.js +0 -1
  277. package/dist/version-ZI4GZX72.js +0 -1
  278. /package/dist/{morph-CG6HEMCQ.js → morph-QZGREMO2.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as X,b as H,c as K}from"./chunk-UYK6CXAU.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-AY4GIVME.js";import{a as W}from"./chunk-HM5H7WBE.js";import{a as G,b as J}from"./chunk-ZAMDXIVC.js";import{b as L}from"./chunk-H5C3QTOO.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-6EZ7JWBK.js";import{d as f,g as x}from"./chunk-WKBVT5WG.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-DONEJHDG.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
1
+ import{a as X,b as H,c as K}from"./chunk-ALQKJAHP.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-5UXPTCSD.js";import{a as W}from"./chunk-6ZRHK4ON.js";import{a as G,b as J}from"./chunk-7XQDZF73.js";import{b as L}from"./chunk-Q6LCSRIW.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-E24W34C4.js";import{d as f,g as x}from"./chunk-ELIH6GCC.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-EYDNSYYE.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
2
2
  `);if(e){if(!await $(e))throw new f(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return S(e,{encoding:"utf8"})}else return}async function Z(t){let{organization:e,remoteApp:i,store:n,query:a,variables:p,variableFile:k,outputFile:B,watch:ee=!1,version:te}=t,{adminSession:c,version:w}=await R({title:s`Authenticating`,task:async()=>{let o=await X(i,n.shopDomain),u=await T({adminSession:o,userSpecifiedVersion:te,minimumDefaultVersion:M});return{adminSession:o,version:u}},renderOptions:{stdout:process.stderr}}),C=await oe(p,k);ae(a,C),K(a,n),v({headline:"Starting bulk operation.",body:[{list:{items:H({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:w})}}]});let y=h(a)?await V({adminSession:c,query:a,variablesJsonl:C,version:w}):await q({adminSession:c,query:a,version:w});if(y?.userErrors?.length){A({headline:"Error creating bulk operation.",body:{list:{items:y.userErrors.map(o=>o.field?`${o.field.join(".")}: ${o.message}`:o.message)}}});return}let g=y?.bulkOperation;if(g)if(ee){let o=new D,u=await F(c,g.id,o.signal,()=>o.abort());o.signal.aborted?v({headline:`Bulk operation ${u.id} is still running in the background.`,body:b(u.id)}):await Y(u,B)}else{let o=await _(c,g.id);["FAILED","CANCELED","EXPIRED"].includes(o.status)?await Y(o,B):d({headline:"Bulk operation is running.",body:b(o.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(o.id)}`.value]}}]}]})}else throw E({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new x("Bulk operation response returned null with no error message.")}async function Y(t,e){let i=U(t).value,a=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":d({headline:"Bulk operation started.",body:b(t.id),customSections:a});break;case"RUNNING":d({headline:"Bulk operation is running.",body:b(t.id),customSections:a});break;case"COMPLETED":if(t.url){let p=await j(t.url),k=z(p);e?await I(e,p):N(p),k?E({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:a}):d({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:a})}else d({headline:i,customSections:a});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":A({headline:i,customSections:a});break}}function ae(t,e){if(h(t)&&!e)throw new f(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!h(t)&&e)throw new f(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function b(t){return[`Monitor its progress with:
3
3
  `,{command:`shopify app bulk status --id=${P(t)}`}]}var O,l=class extends W{async run(){let{flags:e}=await this.parse(O),{query:i,appContextResult:n,store:a}=await Q(e);return await Z({organization:n.organization,remoteApp:n.remoteApp,store:a,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};O=l;l.summary="Execute bulk operations.";l.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-733R5OKQ.js";import{a as E}from"./chunk-HM5H7WBE.js";import{a as P}from"./chunk-ZAMDXIVC.js";import{Fa as I,ga as S}from"./chunk-ATXODH6C.js";import{O as b,P as T,Q as A}from"./chunk-442S5SDM.js";import{B as g,F as v,z as p}from"./chunk-6EZ7JWBK.js";import{Nb as h,Qb as m,Sb as w}from"./chunk-DONEJHDG.js";import{j as y}from"./chunk-773TIA5M.js";import{r as q}from"./chunk-T6CC5WUU.js";import{e as G,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!F(o,e))return`Invalid address.
1
+ import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-HHSUBF73.js";import{a as E}from"./chunk-6ZRHK4ON.js";import{a as P}from"./chunk-7XQDZF73.js";import{Fa as I,ga as S}from"./chunk-UZ7U322K.js";import{O as b,P as T,Q as A}from"./chunk-IRH6IGFT.js";import{B as g,F as v,z as p}from"./chunk-E24W34C4.js";import{Nb as h,Qb as m,Sb as w}from"./chunk-EYDNSYYE.js";import{j as y}from"./chunk-773TIA5M.js";import{r as q}from"./chunk-T6CC5WUU.js";import{e as G,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!F(o,e))return`Invalid address.
2
2
  ${c(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function c(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
3
3
  `)}async function O(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:l}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(S({appName:s.title,configFile:y(l.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function x(e,t,r){let o=await T(e,r);return t?_(t,o):C(o)}async function B(e,t,r,o){let s=await A(e,t,o);return r?M(r,t,s):V(s)}async function Y(e,t){let r=e??H(t)??await R(),o=t??await D(r);return L(o,r)}async function N(e){let t=await W(e);await z(t)}async function W(e){let t=await x(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await Y(e.deliveryMethod,e.address),l=await O(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:l.apiKey,clientSecret:l.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await b(e.developerPlatformClient,t,e.organizationId);if(!r.success){m(`Request errors:
4
4
  ${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await k(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}m("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
@@ -1,4 +1,4 @@
1
- import{a as B,j as C,m as P}from"./chunk-2NWWMNU5.js";import{e as g}from"./chunk-QMXKGSFH.js";import{e as U,f as _}from"./chunk-6YPEONHB.js";import{l as v,m as w}from"./chunk-PJYNAUQB.js";import{xa as E}from"./chunk-5W443CKL.js";import{Pb as m}from"./chunk-DONEJHDG.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
1
+ import{a as B,j as C,m as P}from"./chunk-5NY4HKJF.js";import{e as g}from"./chunk-YBFCDINU.js";import{e as U,f as _}from"./chunk-KOB6T6NK.js";import{l as v,m as w}from"./chunk-5T3OVTF5.js";import{xa as E}from"./chunk-2HZMOK4U.js";import{Pb as m}from"./chunk-EYDNSYYE.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
2
2
  `);_(f.key,"delete")(new Error(`Failed to delete ${f.key}: ${y}`))}}),c.current+=k.length});u.push(a)}let h=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:h}}function L(t,e){let s=e.applyIgnoreFilters(t).filter(o=>!e.files.has(o.key));return m(`Files to be deleted:
3
3
  ${s.map(o=>`-${o.key}`).join(`
4
4
  `)}`),s}function x(t){let e=P(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configSchemaFile,...e.staticAssetFiles]}var D=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function R(t,e,r){let s=new Set(r.map(l=>l.key)),o=D.filter(({key:l})=>!s.has(l));o.length>0&&await w(t.id,o,e)}function q(t,e,r,s,o){let l=I(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=z(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(S(a).map(d=>N(d,e,s,r.id,o).then(()=>{c.current+=d.length,d.forEach(f=>e.unsyncedFileKeys.delete(f.key))}))).then(()=>{}),h=i.reduce((a,d)=>a.then(()=>u(d)),Promise.resolve()),p=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([h,p]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function I(t,e){let r=K(t),s=t.applyIgnoreFilters(r),o=new Map(e.map(n=>[n.key,n])),l=s.filter(n=>{let i=o.get(n.key);return!i||i.checksum!==n.checksum});return m(`Files to be uploaded:
@@ -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-6ZRHK4ON.js";import{a as r}from"./chunk-7XQDZF73.js";import{Ca as n,Fa as p}from"./chunk-UZ7U322K.js";import{b as e}from"./chunk-Q6LCSRIW.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{a as y}from"./chunk-VOJWKGCW.js";import{a as d}from"./chunk-QMXKGSFH.js";import{a as p}from"./chunk-STJ3LWFL.js";import{p as u}from"./chunk-PJYNAUQB.js";import{p as c,v as f}from"./chunk-D6YDSGR4.js";import{b as l}from"./chunk-H5C3QTOO.js";import{A as s,v as h}from"./chunk-6EZ7JWBK.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as b,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function v(r,o,m){let t=await y(r,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:o.theme}}),a=p({...t,role:"live"},r);!o.force&&!m&&!await s({message:`Do you want to make '${t.name}' the new live theme on ${r.storeFqdn}?`,confirmationMessage:`Yes, make '${t.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await u(t.id,r),h({headline:o.environment?`Environment: ${o.environment}`:void 0,body:["The theme",...d(t),"is now live at",{link:{label:a,url:a}},{char:"."}]}))}var n=b(g(),1);var w,e=class extends f{async command(o,m,t){await v(m,o,t)}};w=e;e.summary="Set a remote theme as the live theme.";e.descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
1
+ import{a as y}from"./chunk-OASPW2P2.js";import{a as d}from"./chunk-YBFCDINU.js";import{a as p}from"./chunk-STJ3LWFL.js";import{p as u}from"./chunk-5T3OVTF5.js";import{p as c,v as f}from"./chunk-PTIJDS6I.js";import{b as l}from"./chunk-Q6LCSRIW.js";import{A as s,v as h}from"./chunk-E24W34C4.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as b,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function v(r,o,m){let t=await y(r,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:o.theme}}),a=p({...t,role:"live"},r);!o.force&&!m&&!await s({message:`Do you want to make '${t.name}' the new live theme on ${r.storeFqdn}?`,confirmationMessage:`Yes, make '${t.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await u(t.id,r),h({headline:o.environment?`Environment: ${o.environment}`:void 0,body:["The theme",...d(t),"is now live at",{link:{label:a,url:a}},{char:"."}]}))}var n=b(g(),1);var w,e=class extends f{async command(o,m,t){await v(m,o,t)}};w=e;e.summary="Set a remote theme as the live theme.";e.descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
2
2
 
3
3
  If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
4
4
 
@@ -1 +1 @@
1
- import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-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-2HZMOK4U.js";import{b as l}from"./chunk-LUG2BZJP.js";import{d as p,g as F}from"./chunk-ELIH6GCC.js";import{Fb as V,Hb as h}from"./chunk-EYDNSYYE.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{n as a}from"./chunk-5W443CKL.js";import{d as o}from"./chunk-WKBVT5WG.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=h(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function f(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function E(t,e){if(!c(t,e))throw new o(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",l(e));let r=e;return f(t)&&(r=n.LOCALHOST),[t.trim(),r]}function l(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new o(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function L(t,e,r){if(r.length===0)throw new o(`No topics found for '${e}'`);let i=T(t.trim(),r);if(i===void 0)throw new o(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return i}function T(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function h(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(f(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}u();async function H(t,e,r){let i={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},s=await a(t,i);return s.status>=200&&s.status<300}export{H as a,n as b,c,E as d,g as e,L as f,h as g};
1
+ import{n as a}from"./chunk-2HZMOK4U.js";import{d as o}from"./chunk-ELIH6GCC.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=h(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function f(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function E(t,e){if(!c(t,e))throw new o(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",l(e));let r=e;return f(t)&&(r=n.LOCALHOST),[t.trim(),r]}function l(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new o(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function L(t,e,r){if(r.length===0)throw new o(`No topics found for '${e}'`);let i=T(t.trim(),r);if(i===void 0)throw new o(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return i}function T(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function h(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(f(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}u();async function H(t,e,r){let i={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},s=await a(t,i);return s.status>=200&&s.status<300}export{H as a,n as b,c,E as d,g as e,L as f,h as g};
@@ -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-GXUZ3V7S.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-5NY4HKJF.js";import{c as ee,e as te}from"./chunk-YBFCDINU.js";import{a as X}from"./chunk-2WDKXDFM.js";import{c as Q,e as v,m as Z,n as x}from"./chunk-KOB6T6NK.js";import{k as P,l as V,n as y}from"./chunk-5T3OVTF5.js";import{s as C,u as k}from"./chunk-PTIJDS6I.js";import{a as B,b as N}from"./chunk-SRAHMYWJ.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-2HZMOK4U.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-E24W34C4.js";import{d as _,e as H}from"./chunk-3QVXHF6I.js";import{d as g}from"./chunk-ELIH6GCC.js";import{Fb as w,Hb as E,Mb as T,Pb as u}from"./chunk-EYDNSYYE.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};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-MQICT2LR.js";import{a as g}from"./chunk-2MMGFZDP.js";import{a as y}from"./chunk-ZAMDXIVC.js";import{Ga as w,g as b}from"./chunk-ATXODH6C.js";import{b as h}from"./chunk-H5C3QTOO.js";import{O as u,t as m,v as f}from"./chunk-6EZ7JWBK.js";import{d}from"./chunk-WRRUFK4Y.js";import{r as S}from"./chunk-T6CC5WUU.js";import{e as A,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();async function r(e,{web:i,stdout:t,stderr:a,signal:s,env:p={}}){let l=i.configuration.commands[e];if(!l)return;let[_,...v]=l.split(" ");await u(_,v,{cwd:i.directory,stdout:t,stderr:a,signal:s,env:p}),t.write("Web successfully built.")}async function P(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await g(e.project);let i={};e.apiKey&&(i.SHOPIFY_API_KEY=e.apiKey),await b(e.app),await m({processes:[...e.app.webs.map(t=>({prefix:["web",...t.configuration.roles].join("-"),action:async(a,s,p)=>{await r("build",{web:t,stdout:a,stderr:s,signal:p,env:i})}})),...e.app.allExtensions.map(t=>({prefix:t.localIdentifier,action:async(a,s,p)=>{await t.build({stdout:a,stderr:s,signal:p,app:e.app,environment:"production"})}}))],showTimestamps:!1}),f({headline:[{userInput:e.app.name},"built!"]})}var x=P;var I=A(S(),1);var c,n=class extends k{async run(){let{flags:i}=await this.parse(c),t=i["client-id"];await d(()=>({cmd_app_dependency_installation_skipped:i["skip-dependencies-installation"]}));let{app:a,project:s}=await w({directory:i.path,userProvidedConfigName:i.config});return await x({app:a,project:s,skipDependenciesInstallation:i["skip-dependencies-installation"],apiKey:t}),{app:a}}};c=n;n.summary="Build the app, including extensions.";n.descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";n.description=c.descriptionWithoutMarkdown();n.flags={...h,...y,"skip-dependencies-installation":I.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};var J=n;export{J as a};
1
+ import{a as k}from"./chunk-YB3SGPFF.js";import{a as g}from"./chunk-MOCD7GFI.js";import{a as y}from"./chunk-7XQDZF73.js";import{Ga as w,g as b}from"./chunk-UZ7U322K.js";import{b as h}from"./chunk-Q6LCSRIW.js";import{O as u,t as m,v as f}from"./chunk-E24W34C4.js";import{d}from"./chunk-3QVXHF6I.js";import{r as S}from"./chunk-T6CC5WUU.js";import{e as A,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();async function r(e,{web:i,stdout:t,stderr:a,signal:s,env:p={}}){let l=i.configuration.commands[e];if(!l)return;let[_,...v]=l.split(" ");await u(_,v,{cwd:i.directory,stdout:t,stderr:a,signal:s,env:p}),t.write("Web successfully built.")}async function P(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await g(e.project);let i={};e.apiKey&&(i.SHOPIFY_API_KEY=e.apiKey),await b(e.app),await m({processes:[...e.app.webs.map(t=>({prefix:["web",...t.configuration.roles].join("-"),action:async(a,s,p)=>{await r("build",{web:t,stdout:a,stderr:s,signal:p,env:i})}})),...e.app.allExtensions.map(t=>({prefix:t.localIdentifier,action:async(a,s,p)=>{await t.build({stdout:a,stderr:s,signal:p,app:e.app,environment:"production"})}}))],showTimestamps:!1}),f({headline:[{userInput:e.app.name},"built!"]})}var x=P;var I=A(S(),1);var c,n=class extends k{async run(){let{flags:i}=await this.parse(c),t=i["client-id"];await d(()=>({cmd_app_dependency_installation_skipped:i["skip-dependencies-installation"]}));let{app:a,project:s}=await w({directory:i.path,userProvidedConfigName:i.config});return await x({app:a,project:s,skipDependenciesInstallation:i["skip-dependencies-installation"],apiKey:t}),{app:a}}};c=n;n.summary="Build the app, including extensions.";n.descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";n.description=c.descriptionWithoutMarkdown();n.flags={...h,...y,"skip-dependencies-installation":I.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};var J=n;export{J as a};
@@ -1 +1 @@
1
- import{K as i}from"./chunk-6EZ7JWBK.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
1
+ import{K as i}from"./chunk-E24W34C4.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
@@ -1,4 +1,4 @@
1
- import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";import{R as _}from"./chunk-6EZ7JWBK.js";import{d as T}from"./chunk-WRRUFK4Y.js";import{d}from"./chunk-WKBVT5WG.js";import{Fb as h,Hb as g,Lb as P,aa as E}from"./chunk-DONEJHDG.js";import{c as O}from"./chunk-KKUDXLK2.js";import{a as b}from"./chunk-NNOSZ447.js";import{r as I}from"./chunk-T6CC5WUU.js";import{e as S,g as w}from"./chunk-VKWPEFWQ.js";w();var u=S(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-SW2ALZ5Z.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),$(this.id??""),!O()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-SW2ALZ5Z.js");await r(this.config)}await x(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-DP443VTE.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-QOGKADWB.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(P(`
1
+ import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";import{R as _}from"./chunk-E24W34C4.js";import{d as T}from"./chunk-3QVXHF6I.js";import{d}from"./chunk-ELIH6GCC.js";import{Fb as h,Hb as g,Lb as P,aa as E}from"./chunk-EYDNSYYE.js";import{c as O}from"./chunk-JCNRQYRP.js";import{a as b}from"./chunk-NNOSZ447.js";import{r as I}from"./chunk-T6CC5WUU.js";import{e as S,g as w}from"./chunk-VKWPEFWQ.js";w();var u=S(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-MCUV4RZV.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),$(this.id??""),!O()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-MCUV4RZV.js");await r(this.config)}await x(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-76GJJAJP.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-QIHGXICT.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(P(`
2
2
  SHOPIFY_CLI_TIMESTAMP_START
3
3
  { "timestamp": ${Date.now()} }
4
4
  SHOPIFY_CLI_TIMESTAMP_END
@@ -6,6 +6,6 @@ import{b as $}from"./chunk-WW7TENNA.js";import{a as F}from"./chunk-5C7HDTHJ.js";
6
6
 
7
7
  ${h.cyan(e)}
8
8
 
9
- This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-EGD263DV.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!C(r?.flags,"environment"))return n;let v=await super.parse(N(r),e),y=await super.parse(r,[...e??this.argv,...W(l,r,v),...f?["--environment","default"]:[]]);return A(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-EGD263DV.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await T(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function A(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-QOGKADWB.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function N(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function W(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=C(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function C(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function x(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
10
- `),{renderWarning:o}=await import("./ui-QOGKADWB.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
9
+ This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-ZLSO534C.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!C(r?.flags,"environment"))return n;let v=await super.parse(N(r),e),y=await super.parse(r,[...e??this.argv,...W(l,r,v),...f?["--environment","default"]:[]]);return A(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-ZLSO534C.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await T(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function A(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-QIHGXICT.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function N(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function W(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=C(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function C(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function x(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
10
+ `),{renderWarning:o}=await import("./ui-QIHGXICT.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
11
11
  ${i}`]})}let t=n.filter(i=>!r.includes(i.name));a.plugins=new Map(t.map(i=>[i.name,i]))}var q=p;export{N as a,q as b};