shopify 4.7.0 → 4.7.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 (277) hide show
  1. package/dist/analytics-5SII3GTA.js +1 -0
  2. package/dist/{analytics-6LI5GLWS.js → analytics-F56E2NGH.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-LDF4PQ3B.js → chunk-22NROZ5X.js} +1 -1
  5. package/dist/{chunk-XHZ5BWXL.js → chunk-22NWEE5U.js} +1 -1
  6. package/dist/{chunk-2CYVZUYT.js → chunk-26DH5P7S.js} +1 -1
  7. package/dist/{chunk-CIH6LPTG.js → chunk-27UEK3FU.js} +1 -1
  8. package/dist/{chunk-7JIQXGDE.js → chunk-2F2DXTRI.js} +1 -1
  9. package/dist/{chunk-TSLQZTXR.js → chunk-2S3GOPRL.js} +1 -1
  10. package/dist/{chunk-LWJA2DQG.js → chunk-3HCWJRL6.js} +1 -1
  11. package/dist/{chunk-OORWOTAP.js → chunk-3KM2GKXH.js} +1 -1
  12. package/dist/{chunk-Q5DQGV3M.js → chunk-3MN3WLA2.js} +1 -1
  13. package/dist/{chunk-RY2SJVWM.js → chunk-3WV7DQMM.js} +3 -3
  14. package/dist/{chunk-JQ2B3VHR.js → chunk-46BKAF3F.js} +1 -1
  15. package/dist/{chunk-YUVE2I3C.js → chunk-4FCS6PJY.js} +1 -1
  16. package/dist/{chunk-L67BU25M.js → chunk-4FI2YBRF.js} +1 -1
  17. package/dist/{chunk-H5KWM27L.js → chunk-4I7TUB3K.js} +1 -1
  18. package/dist/chunk-4NXLDIW5.js +1 -0
  19. package/dist/{chunk-XAOYKECS.js → chunk-4VJ6YK7U.js} +1 -1
  20. package/dist/{chunk-7DOWT5JZ.js → chunk-4WGJUVXS.js} +1 -1
  21. package/dist/{chunk-6WZYX5RO.js → chunk-53IU36CL.js} +1 -1
  22. package/dist/{chunk-LZ3GZ7NS.js → chunk-5JW4JQWZ.js} +1 -1
  23. package/dist/{chunk-SYADOUBB.js → chunk-5MD7GNEY.js} +1 -1
  24. package/dist/chunk-5QZHJCZM.js +1 -0
  25. package/dist/{chunk-XRT2W5Y2.js → chunk-5WGT45CO.js} +1 -1
  26. package/dist/{chunk-V5SC2RYQ.js → chunk-6AV6GX5W.js} +1 -1
  27. package/dist/{chunk-N6YTJXIS.js → chunk-6ELAWKMY.js} +1 -1
  28. package/dist/{chunk-CTRXLZAJ.js → chunk-6G5TDB45.js} +1 -1
  29. package/dist/{chunk-JQISGC7D.js → chunk-6K3AJTNO.js} +1 -1
  30. package/dist/{chunk-QBIVQXUJ.js → chunk-6QJIGFQJ.js} +1 -1
  31. package/dist/{chunk-EW55WWT7.js → chunk-6R62DGJG.js} +1 -1
  32. package/dist/{chunk-ZO74GSWC.js → chunk-6SM4RY3I.js} +1 -1
  33. package/dist/chunk-76NEIDP5.js +1 -0
  34. package/dist/{chunk-5CADTCJE.js → chunk-77AC3OJQ.js} +1 -1
  35. package/dist/{chunk-MLZLDL6B.js → chunk-7EUIO4ZO.js} +1 -1
  36. package/dist/{chunk-YHPBDS52.js → chunk-7JIYJMRN.js} +1 -1
  37. package/dist/{chunk-VRVP2GQL.js → chunk-7S73765P.js} +1 -1
  38. package/dist/{chunk-AGOEROAI.js → chunk-AFT6ABDE.js} +1 -1
  39. package/dist/{chunk-DMXQLI35.js → chunk-AIA7JVSJ.js} +1 -1
  40. package/dist/{chunk-GKOBFX4A.js → chunk-AWHS336T.js} +1 -1
  41. package/dist/{chunk-R2R6JDNH.js → chunk-BI7LE6CZ.js} +1 -1
  42. package/dist/{chunk-WHLGNDRE.js → chunk-CNMJ6QXM.js} +1 -1
  43. package/dist/{chunk-LJM2DUXN.js → chunk-CRP4PQU2.js} +1 -1
  44. package/dist/{chunk-AH2ZGMDM.js → chunk-CUUCRIGC.js} +1 -1
  45. package/dist/{chunk-PWSI275S.js → chunk-DEMZRLX5.js} +1 -1
  46. package/dist/{chunk-HLNJL4B6.js → chunk-DLSUDLXD.js} +1 -1
  47. package/dist/{chunk-PAAKBWSF.js → chunk-DMFEYI4G.js} +1 -1
  48. package/dist/{chunk-4W3UE2ZI.js → chunk-ELSDVDT7.js} +1 -1
  49. package/dist/{chunk-7AALWJAO.js → chunk-EMETQFFJ.js} +1 -1
  50. package/dist/chunk-ESPT6CGE.js +1 -0
  51. package/dist/{chunk-UPJLZHHR.js → chunk-EULSSTWY.js} +1 -1
  52. package/dist/{chunk-E2W5OYYM.js → chunk-EWS2RNM6.js} +1 -1
  53. package/dist/{chunk-6PDR2IUL.js → chunk-FAXNGDWI.js} +1 -1
  54. package/dist/{chunk-2JDCVEFK.js → chunk-FELV7GWY.js} +1 -1
  55. package/dist/{chunk-VKSR6MJG.js → chunk-FQQXU5IN.js} +1 -1
  56. package/dist/{chunk-ACTDYTAV.js → chunk-GFWXVO72.js} +1 -1
  57. package/dist/{chunk-2SZOPJYI.js → chunk-GJ4A4QKE.js} +1 -1
  58. package/dist/{chunk-KK24VGVE.js → chunk-GW4JHUIA.js} +1 -1
  59. package/dist/{chunk-XLURZ6GL.js → chunk-GXOFJIKQ.js} +1 -1
  60. package/dist/{chunk-X4XP2RQJ.js → chunk-HCQABTQL.js} +1 -1
  61. package/dist/{chunk-TY4W7AYX.js → chunk-HOVIGRE4.js} +1 -1
  62. package/dist/{chunk-Y34LWI3S.js → chunk-HQUWYKSJ.js} +3 -3
  63. package/dist/{chunk-MRCWOOSF.js → chunk-HRHNJFAA.js} +1 -1
  64. package/dist/{chunk-U6HYEGAE.js → chunk-HU4GFVEN.js} +1 -1
  65. package/dist/{chunk-JZMRBJH3.js → chunk-I2LNQKIJ.js} +2 -2
  66. package/dist/{chunk-I3N6NPHF.js → chunk-I6XH7XDX.js} +1 -1
  67. package/dist/{chunk-QKGZWOOY.js → chunk-IA3XNJ56.js} +1 -1
  68. package/dist/{chunk-KIYHEMHD.js → chunk-IENBHP2S.js} +2 -2
  69. package/dist/{chunk-D2K2ZBKH.js → chunk-IF6EYTHG.js} +2 -2
  70. package/dist/{chunk-ZCNIR6YU.js → chunk-IQT6LOA2.js} +1 -1
  71. package/dist/{chunk-JJJTPEMD.js → chunk-IX4IGE5H.js} +1 -1
  72. package/dist/{chunk-WCRZJY3P.js → chunk-J2VRPZFC.js} +1 -1
  73. package/dist/{chunk-P5MNNBSO.js → chunk-JJSV7HNM.js} +1 -1
  74. package/dist/{chunk-E5T4YRGW.js → chunk-JNIPCLAF.js} +1 -1
  75. package/dist/{chunk-HZIX3DIT.js → chunk-JNVCCE6M.js} +1 -1
  76. package/dist/{chunk-LQCR4TGH.js → chunk-JQUEW7CB.js} +1 -1
  77. package/dist/{chunk-GSCWZR22.js → chunk-K3VLFPPI.js} +1 -1
  78. package/dist/{chunk-4JY2P2A5.js → chunk-K63FW7Q7.js} +1 -1
  79. package/dist/{chunk-CZJZCJRX.js → chunk-KBBITJSF.js} +1 -1
  80. package/dist/{chunk-4LRG5YBS.js → chunk-KDBKEVCF.js} +1 -1
  81. package/dist/{chunk-FWPJEL6Q.js → chunk-KNVHXIEB.js} +1 -1
  82. package/dist/{chunk-CMYQXGLO.js → chunk-KRLEEYLL.js} +1 -1
  83. package/dist/{chunk-2U4P6UFZ.js → chunk-KT5MDCII.js} +1 -1
  84. package/dist/{chunk-U2Z5NMXV.js → chunk-LBREJXT6.js} +1 -1
  85. package/dist/{chunk-ZRLEAF7M.js → chunk-LKQ3EJ6Z.js} +1 -1
  86. package/dist/{chunk-HHVHVGRT.js → chunk-LKZQSER3.js} +1 -1
  87. package/dist/{chunk-ZSFAURIH.js → chunk-M5Q74UZM.js} +1 -1
  88. package/dist/{chunk-V2HCVJYF.js → chunk-MK7MOLLI.js} +1 -1
  89. package/dist/{chunk-JUKAWTYY.js → chunk-MTTBBZSR.js} +1 -1
  90. package/dist/{chunk-LRQYUWWB.js → chunk-N4KDWHT2.js} +1 -1
  91. package/dist/{chunk-XCBEYRQI.js → chunk-N7425436.js} +1 -1
  92. package/dist/{chunk-5CR5YJTU.js → chunk-NSZHEXZK.js} +1 -1
  93. package/dist/{chunk-RUFQCXBX.js → chunk-O4G6TE26.js} +1 -1
  94. package/dist/{chunk-XUEMMLXK.js → chunk-O4RHWBBM.js} +1 -1
  95. package/dist/{chunk-AMLWPYNA.js → chunk-O53YIDJL.js} +1 -1
  96. package/dist/{chunk-DHU57LKD.js → chunk-OF6CV5R4.js} +1 -1
  97. package/dist/{chunk-QEB3HUQE.js → chunk-OJSJWGP2.js} +1 -1
  98. package/dist/{chunk-QRT4A2RV.js → chunk-OQWMCJLY.js} +1 -1
  99. package/dist/{chunk-7MHANY34.js → chunk-P5OQUFH6.js} +1 -1
  100. package/dist/{chunk-DQCIORGH.js → chunk-P5WLH64A.js} +1 -1
  101. package/dist/{chunk-OE3F7XXU.js → chunk-PE4TV5IJ.js} +1 -1
  102. package/dist/{chunk-CZPGC2E7.js → chunk-PEHLR7XP.js} +1 -1
  103. package/dist/{chunk-YN6A26QL.js → chunk-PK73ZSND.js} +4 -4
  104. package/dist/{chunk-FULWTZS6.js → chunk-PQG7XSQP.js} +1 -1
  105. package/dist/{chunk-3K6VHXC2.js → chunk-PS2UVFHP.js} +1 -1
  106. package/dist/{chunk-T5JXQ7KO.js → chunk-PU3NATV4.js} +1 -1
  107. package/dist/{chunk-6VRXGEIW.js → chunk-PV6T52KB.js} +1 -1
  108. package/dist/{chunk-JQVXH26X.js → chunk-QASOHYDS.js} +1 -1
  109. package/dist/{chunk-MB7E5GEY.js → chunk-QHLY2IID.js} +1 -1
  110. package/dist/{chunk-SJMTETSU.js → chunk-QT367CYF.js} +1 -1
  111. package/dist/{chunk-2WJAAJVX.js → chunk-R2RULBBV.js} +1 -1
  112. package/dist/{chunk-QXHENYJH.js → chunk-R5EGWWZH.js} +1 -1
  113. package/dist/{chunk-KUNDCAQN.js → chunk-RA3WWB2S.js} +1 -1
  114. package/dist/{chunk-GLWQMLUC.js → chunk-RM3B7AFT.js} +1 -1
  115. package/dist/{chunk-UVQL7RUY.js → chunk-RXUOQZ32.js} +1 -1
  116. package/dist/{chunk-GZ64KWHX.js → chunk-RY4MPX5A.js} +1 -1
  117. package/dist/{chunk-5NO5OXYP.js → chunk-RY4YUBG3.js} +1 -1
  118. package/dist/{chunk-DKL6N3L2.js → chunk-S2WUVD7V.js} +1 -1
  119. package/dist/{chunk-SSJGWLCW.js → chunk-SCXL5UQ4.js} +1 -1
  120. package/dist/{chunk-YIZZ5LZN.js → chunk-SGIMJQEM.js} +1 -1
  121. package/dist/{chunk-KCS75ZM4.js → chunk-SJGPJDGH.js} +1 -1
  122. package/dist/{chunk-F5HCSUXC.js → chunk-SPE2D366.js} +1 -1
  123. package/dist/{chunk-CFWHR74L.js → chunk-SYF6LGQB.js} +1 -1
  124. package/dist/{chunk-PIFW2R3S.js → chunk-TP4Z5OZT.js} +1 -1
  125. package/dist/{chunk-6ENBE43F.js → chunk-U3F6GPCE.js} +1 -1
  126. package/dist/{chunk-SEVSMWNX.js → chunk-U46RPVQA.js} +1 -1
  127. package/dist/{chunk-CYOFLJ3Z.js → chunk-UAJBQEGE.js} +1 -1
  128. package/dist/{chunk-QZBSCOJV.js → chunk-UK4WXL4G.js} +1 -1
  129. package/dist/{chunk-CHMEDVDZ.js → chunk-ULR25PTO.js} +1 -1
  130. package/dist/{chunk-7WTNEG2F.js → chunk-USBP7H7J.js} +1 -1
  131. package/dist/{chunk-4HV6A6UH.js → chunk-UZV5H2JI.js} +1 -1
  132. package/dist/{chunk-6EBLULOC.js → chunk-UZVON6GP.js} +1 -1
  133. package/dist/{chunk-Z5K4J7HQ.js → chunk-VI5FF6SW.js} +1 -1
  134. package/dist/{chunk-6VGJVXZI.js → chunk-VPY47DBW.js} +1 -1
  135. package/dist/{chunk-S3P5WWJD.js → chunk-VRH3HWYA.js} +1 -1
  136. package/dist/{chunk-37TEEITE.js → chunk-VXX4EZ7G.js} +1 -1
  137. package/dist/{chunk-WKUGSFTB.js → chunk-VXYABRFY.js} +1 -1
  138. package/dist/{chunk-KOVAFUYN.js → chunk-WEWLPJK2.js} +1 -1
  139. package/dist/{chunk-TTAPXLI5.js → chunk-WMZS3Y4Z.js} +1 -1
  140. package/dist/{chunk-JZXA3H5K.js → chunk-WOIAYH5U.js} +1 -1
  141. package/dist/{chunk-6OFGSZD6.js → chunk-WR6LRE4I.js} +1 -1
  142. package/dist/{chunk-GMTNOCMS.js → chunk-WSCSFFLH.js} +2 -2
  143. package/dist/{chunk-K4KTNINH.js → chunk-WTES5ZXR.js} +1 -1
  144. package/dist/{chunk-BR6DBMQA.js → chunk-WXSDPMIZ.js} +1 -1
  145. package/dist/{chunk-YOO7DLOT.js → chunk-X5JQU6T7.js} +1 -1
  146. package/dist/{chunk-2HK4MFWP.js → chunk-XMJFT4WP.js} +1 -1
  147. package/dist/{chunk-63CIFL36.js → chunk-XMQFQUUK.js} +1 -1
  148. package/dist/{chunk-EOMCXBCS.js → chunk-XTXYS7LB.js} +1 -1
  149. package/dist/{chunk-QPWMD2VR.js → chunk-Y6UZW73M.js} +1 -1
  150. package/dist/{chunk-FCGKO2KY.js → chunk-YCU7ZCIG.js} +1 -1
  151. package/dist/{chunk-TYIGOVRQ.js → chunk-YFKEESYB.js} +1 -1
  152. package/dist/{chunk-U7R6LYPJ.js → chunk-YXDIHVPY.js} +1 -1
  153. package/dist/{chunk-TCTVI6PK.js → chunk-Z66ZSXKB.js} +1 -1
  154. package/dist/{chunk-PANGX7SA.js → chunk-ZBSC2KZ7.js} +1 -1
  155. package/dist/{chunk-5HPBQ6U5.js → chunk-ZDDLEFVO.js} +1 -1
  156. package/dist/{chunk-DQFSKPKL.js → chunk-ZULQKYJ6.js} +1 -1
  157. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  158. package/dist/cli/commands/app/build.js +1 -1
  159. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  160. package/dist/cli/commands/app/bulk/execute.js +1 -1
  161. package/dist/cli/commands/app/bulk/status.js +1 -1
  162. package/dist/cli/commands/app/config/link.js +1 -1
  163. package/dist/cli/commands/app/config/pull.js +1 -1
  164. package/dist/cli/commands/app/config/use.js +1 -1
  165. package/dist/cli/commands/app/config/validate.js +1 -1
  166. package/dist/cli/commands/app/demo/watcher.js +1 -1
  167. package/dist/cli/commands/app/deploy.js +1 -1
  168. package/dist/cli/commands/app/dev/clean.js +1 -1
  169. package/dist/cli/commands/app/dev.js +1 -1
  170. package/dist/cli/commands/app/env/pull.js +1 -1
  171. package/dist/cli/commands/app/env/show.js +1 -1
  172. package/dist/cli/commands/app/execute.js +1 -1
  173. package/dist/cli/commands/app/function/build.js +1 -1
  174. package/dist/cli/commands/app/function/info.js +1 -1
  175. package/dist/cli/commands/app/function/replay.js +1 -1
  176. package/dist/cli/commands/app/function/run.js +1 -1
  177. package/dist/cli/commands/app/function/schema.js +1 -1
  178. package/dist/cli/commands/app/function/typegen.js +1 -1
  179. package/dist/cli/commands/app/generate/extension.js +1 -1
  180. package/dist/cli/commands/app/graphiql.js +1 -1
  181. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  182. package/dist/cli/commands/app/import-extensions.js +1 -1
  183. package/dist/cli/commands/app/info.js +1 -1
  184. package/dist/cli/commands/app/init.js +1 -1
  185. package/dist/cli/commands/app/logs.js +1 -1
  186. package/dist/cli/commands/app/release.js +1 -1
  187. package/dist/cli/commands/app/versions/list.js +1 -1
  188. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  189. package/dist/cli/commands/auth/login.js +1 -1
  190. package/dist/cli/commands/auth/logout.js +1 -1
  191. package/dist/cli/commands/cache/clear.js +1 -1
  192. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  193. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  194. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  195. package/dist/cli/commands/debug/command-flags.js +1 -1
  196. package/dist/cli/commands/doc/fetch.js +1 -1
  197. package/dist/cli/commands/doc/search.js +1 -1
  198. package/dist/cli/commands/docs/generate.js +1 -1
  199. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  200. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  201. package/dist/cli/commands/help.js +1 -1
  202. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  203. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  204. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  205. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  206. package/dist/cli/commands/notifications/generate.js +1 -1
  207. package/dist/cli/commands/notifications/list.js +1 -1
  208. package/dist/cli/commands/organization/list.js +1 -1
  209. package/dist/cli/commands/search.js +1 -1
  210. package/dist/cli/commands/send-analytics.js +1 -1
  211. package/dist/cli/commands/theme/check.js +1 -1
  212. package/dist/cli/commands/theme/console.js +1 -1
  213. package/dist/cli/commands/theme/delete.js +1 -1
  214. package/dist/cli/commands/theme/dev.js +1 -1
  215. package/dist/cli/commands/theme/duplicate.js +1 -1
  216. package/dist/cli/commands/theme/info.js +1 -1
  217. package/dist/cli/commands/theme/init.js +1 -1
  218. package/dist/cli/commands/theme/language-server.js +1 -1
  219. package/dist/cli/commands/theme/list.js +1 -1
  220. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  221. package/dist/cli/commands/theme/open.js +1 -1
  222. package/dist/cli/commands/theme/package.js +1 -1
  223. package/dist/cli/commands/theme/preview.js +1 -1
  224. package/dist/cli/commands/theme/profile.js +1 -1
  225. package/dist/cli/commands/theme/publish.js +1 -1
  226. package/dist/cli/commands/theme/pull.js +1 -1
  227. package/dist/cli/commands/theme/push.js +1 -1
  228. package/dist/cli/commands/theme/rename.js +1 -1
  229. package/dist/cli/commands/theme/share.js +1 -1
  230. package/dist/cli/commands/upgrade.js +1 -1
  231. package/dist/cli/commands/version.js +1 -1
  232. package/dist/command-registry.js +1 -1
  233. package/dist/{conf-store-OAGJBITE.js → conf-store-QQ4DOFI3.js} +1 -1
  234. package/dist/{deprecations-K3NPRKBF.js → deprecations-43ZQ5RCE.js} +1 -1
  235. package/dist/dist-E7EGYE4D.js +1 -0
  236. package/dist/dist-WRUROUNV.js +1 -0
  237. package/dist/{environments-ALH2N36U.js → environments-RG64VB5R.js} +1 -1
  238. package/dist/{error-YX56C43A.js → error-26WTDNKZ.js} +1 -1
  239. package/dist/error-handler-XFH47Y75.js +1 -0
  240. package/dist/{fs-SKHQZZTQ.js → fs-Y7I3Y5IR.js} +1 -1
  241. package/dist/hooks/did-you-mean.js +1 -1
  242. package/dist/hooks/hydrogen-init.js +1 -1
  243. package/dist/hooks/postrun.js +1 -1
  244. package/dist/hooks/prerun.js +1 -1
  245. package/dist/hooks/public-metadata.js +1 -1
  246. package/dist/hooks/sensitive-metadata.js +1 -1
  247. package/dist/hooks/tunnel-provider.js +1 -1
  248. package/dist/hooks/tunnel-start.js +1 -1
  249. package/dist/index.js +15 -15
  250. package/dist/{is-global-V5VORI3F.js → is-global-WBIBPIVZ.js} +1 -1
  251. package/dist/{local-GX5AN6ZS.js → local-HF4T3FFE.js} +1 -1
  252. package/dist/{metadata-XUJUTBTB.js → metadata-CSQPNQP2.js} +1 -1
  253. package/dist/{node-package-manager-3WIYU7Y3.js → node-package-manager-CVEU22N7.js} +1 -1
  254. package/dist/notifications-system-L3FMN6EX.js +1 -0
  255. package/dist/os-VLZLRAHR.js +1 -0
  256. package/dist/{output-X47P6ICP.js → output-E6OGPGXL.js} +1 -1
  257. package/dist/{system-SR5G7WEW.js → system-ZETSJRKS.js} +1 -1
  258. package/dist/tsconfig.tsbuildinfo +1 -1
  259. package/dist/{ui-VYWSLAQ6.js → ui-7TVGGEWJ.js} +1 -1
  260. package/dist/upgrade-F77O4ZDT.js +1 -0
  261. package/dist/version-3L3ANUTL.js +1 -0
  262. package/dist/{version-FK4ETQ22.js → version-DL4Y6DRX.js} +1 -1
  263. package/dist/{workerd-NAPS5TA7.js → workerd-EHI5ZCEV.js} +1 -1
  264. package/oclif.manifest.json +1 -1
  265. package/package.json +7 -7
  266. package/dist/analytics-UNRIIG4Y.js +0 -1
  267. package/dist/chunk-5CYJG63I.js +0 -1
  268. package/dist/chunk-NEMPLS7C.js +0 -1
  269. package/dist/chunk-OUZGGWFN.js +0 -1
  270. package/dist/chunk-RZFBGBNA.js +0 -1
  271. package/dist/dist-EXJEE23W.js +0 -1
  272. package/dist/dist-S62Z6IFV.js +0 -1
  273. package/dist/error-handler-FDCH72NH.js +0 -1
  274. package/dist/notifications-system-RHULO564.js +0 -1
  275. package/dist/os-M6X7KOR4.js +0 -1
  276. package/dist/upgrade-PFQ7JMXG.js +0 -1
  277. package/dist/version-U4GM2LNG.js +0 -1
@@ -0,0 +1 @@
1
+ import{ra as a,sa as b,ta as c}from"./chunk-PK73ZSND.js";import"./chunk-ZDF5N422.js";import"./chunk-GW4JHUIA.js";import"./chunk-AFT6ABDE.js";import"./chunk-WSCSFFLH.js";import"./chunk-7Y7AZRL3.js";import"./chunk-7UNQOKZW.js";import"./chunk-XTXYS7LB.js";import"./chunk-5HBIIYSK.js";import"./chunk-RJ5VF3QY.js";import"./chunk-GB3YC4TI.js";import"./chunk-76NEIDP5.js";import"./chunk-MPW2YJWU.js";import"./chunk-6K3AJTNO.js";import"./chunk-WMZS3Y4Z.js";import"./chunk-BI7LE6CZ.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-LBREJXT6.js";import"./chunk-HQUWYKSJ.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-4VJ6YK7U.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
@@ -1 +1 @@
1
- import{Aa as g,ua as a,va as b,wa as c,xa as d,ya as e,za as f}from"./chunk-YN6A26QL.js";import"./chunk-ZDF5N422.js";import"./chunk-KK24VGVE.js";import"./chunk-AGOEROAI.js";import"./chunk-GMTNOCMS.js";import"./chunk-7Y7AZRL3.js";import"./chunk-7UNQOKZW.js";import"./chunk-EOMCXBCS.js";import"./chunk-5HBIIYSK.js";import"./chunk-RJ5VF3QY.js";import"./chunk-GB3YC4TI.js";import"./chunk-5CYJG63I.js";import"./chunk-MPW2YJWU.js";import"./chunk-JQISGC7D.js";import"./chunk-TTAPXLI5.js";import"./chunk-R2R6JDNH.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-U2Z5NMXV.js";import"./chunk-Y34LWI3S.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-XAOYKECS.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{g as compileData,d as recordError,f as recordEvent,e as recordRetry,c as recordTiming,b as reportAnalyticsEvent,a as sendAnalyticsEventFromStdin};
1
+ import{Aa as g,ua as a,va as b,wa as c,xa as d,ya as e,za as f}from"./chunk-PK73ZSND.js";import"./chunk-ZDF5N422.js";import"./chunk-GW4JHUIA.js";import"./chunk-AFT6ABDE.js";import"./chunk-WSCSFFLH.js";import"./chunk-7Y7AZRL3.js";import"./chunk-7UNQOKZW.js";import"./chunk-XTXYS7LB.js";import"./chunk-5HBIIYSK.js";import"./chunk-RJ5VF3QY.js";import"./chunk-GB3YC4TI.js";import"./chunk-76NEIDP5.js";import"./chunk-MPW2YJWU.js";import"./chunk-6K3AJTNO.js";import"./chunk-WMZS3Y4Z.js";import"./chunk-BI7LE6CZ.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-LBREJXT6.js";import"./chunk-HQUWYKSJ.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-4VJ6YK7U.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{g as compileData,d as recordError,f as recordEvent,e as recordRetry,c as recordTiming,b as reportAnalyticsEvent,a as sendAnalyticsEventFromStdin};
package/dist/bootstrap.js CHANGED
@@ -1,3 +1,3 @@
1
- import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-JJJTPEMD.js";import{a as s}from"./chunk-2WJAAJVX.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-YX56C43A.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-VYWSLAQ6.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
1
+ import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-IX4IGE5H.js";import{a as s}from"./chunk-R2RULBBV.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-26WTDNKZ.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-7TVGGEWJ.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
2
2
  `)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
3
3
  `)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
@@ -1,4 +1,4 @@
1
- import{a as Mc,e as jc,f as Bc}from"./chunk-ZSFAURIH.js";import{a as $c}from"./chunk-LWJA2DQG.js";import{c as Rc,i as Lc,o as hy}from"./chunk-NJPL5BTN.js";import{b as fn}from"./chunk-RY2SJVWM.js";import{C as cn,R as wc,T as Ec,U as bc,ja as Dc,na as Cc,s as xc}from"./chunk-YN6A26QL.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-KK24VGVE.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-GMTNOCMS.js";import{a as ly}from"./chunk-EOMCXBCS.js";import{h as I,k as hn}from"./chunk-R2R6JDNH.js";import{a as gc,c as yc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as vc,k as ho,m as ay,n as fo,p as uy,u as cy}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as oy}from"./chunk-ET2CGROE.js";import{c as sy}from"./chunk-TOLPNBZK.js";import{$a as mc,Ab as me,Ca as uo,Ea as un,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,gb as Sc,ia as Q0,ma as X,mb as Oc,ob as Pc,pa as br,qb as gt,rb as Nc,sb as Ar,ua as V,wa as on,xb as it,ya as an}from"./chunk-Y34LWI3S.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=Dr(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
1
+ import{a as Mc,e as jc,f as Bc}from"./chunk-M5Q74UZM.js";import{a as $c}from"./chunk-3HCWJRL6.js";import{c as Rc,i as Lc,o as hy}from"./chunk-NJPL5BTN.js";import{b as fn}from"./chunk-3WV7DQMM.js";import{C as cn,R as wc,T as Ec,U as bc,ja as Dc,na as Cc,s as xc}from"./chunk-PK73ZSND.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-GW4JHUIA.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-WSCSFFLH.js";import{a as ly}from"./chunk-XTXYS7LB.js";import{h as I,k as hn}from"./chunk-BI7LE6CZ.js";import{a as gc,c as yc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as vc,k as ho,m as ay,n as fo,p as uy,u as cy}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as oy}from"./chunk-ET2CGROE.js";import{c as sy}from"./chunk-TOLPNBZK.js";import{$a as mc,Ab as me,Ca as uo,Ea as un,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,gb as Sc,ia as Q0,ma as X,mb as Oc,ob as Pc,pa as br,qb as gt,rb as Nc,sb as Ar,ua as V,wa as on,xb as it,ya as an}from"./chunk-HQUWYKSJ.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=Dr(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Gy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,zy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=Jy(Xy(t));let r=t.split(`
@@ -1,4 +1,4 @@
1
- import{b as S}from"./chunk-6ENBE43F.js";import{a as A,b as B,c as L,f as I,j as x,k as $,m as N,t as q}from"./chunk-YIZZ5LZN.js";import{a as P}from"./chunk-NEMPLS7C.js";import{a as z}from"./chunk-KUNDCAQN.js";import{b as C}from"./chunk-JJJTPEMD.js";import{C as E,V as g}from"./chunk-YN6A26QL.js";import{B as w,G as T,y as u,z as v}from"./chunk-GMTNOCMS.js";import{k as D}from"./chunk-R2R6JDNH.js";import{a as K}from"./chunk-CTNBSUVU.js";import{Cb as b,ba as k,ga as y,qb as l,sb as d}from"./chunk-Y34LWI3S.js";import{i as m}from"./chunk-B4OMIONW.js";import{e as _,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;u({headline:"Checking bulk operation status.",body:[{list:{items:S({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new D("No API secret keys found for app");let p=await g(t,a.apiKey,s),i=await x({adminSession:p,operationId:r,version:await I({adminSession:p,minimumDefaultVersion:A})});i?U(i):w({headline:"Bulk operation not found.",body:d`ID: ${l.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;u({headline:"Listing bulk operations.",body:[{list:{items:S({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new D("No API secret keys found for app");let s=await g(t,r.apiKey,a),i=(await $({adminSession:s,version:await I({adminSession:s,minimumDefaultVersion:A})})).map(n=>({id:L(n.id),status:G(n.status),count:H(n.objectCount),dateCreated:k(new Date(String(n.createdAt))),dateFinished:n.completedAt?k(new Date(String(n.completedAt))):"",results:W(n.url??n.partialDataUrl)}));b(),i.length===0?u({body:"No bulk operations found in the last 7 days."}):T({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"}}}),b()}function U(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:p}=e,i=N(e).value,n=V(r,a),f=d`ID: ${l.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let h=s?l.link("Download results",s):"";v({headline:i,body:d`${f}\n${h}`.value})}else if(t==="FAILED"){let h=p?l.link("Download partial results",p):"";w({headline:i,body:d`${f}\n${h}`.value})}else u({headline:i,body:f})}function V(e,o){let t=new Date;return o?`Finished ${y(new Date(String(o)),t)}`:`Started ${y(new Date(String(e)),t)}`}function G(e){return e==="COMPLETED"?m.green(e):e==="FAILED"?m.red(e):m.dim(e)}function H(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function W(e){return e?d`${l.link("download",e)}`.value:""}var F=_(K(),1);var O=class e extends P{static summary="Check the status of bulk operations.";static 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 S}from"./chunk-U3F6GPCE.js";import{a as A,b as B,c as L,f as I,j as x,k as $,m as N,t as q}from"./chunk-SGIMJQEM.js";import{a as P}from"./chunk-ESPT6CGE.js";import{a as z}from"./chunk-RA3WWB2S.js";import{b as C}from"./chunk-IX4IGE5H.js";import{C as E,V as g}from"./chunk-PK73ZSND.js";import{B as w,G as T,y as u,z as v}from"./chunk-WSCSFFLH.js";import{k as D}from"./chunk-BI7LE6CZ.js";import{a as K}from"./chunk-CTNBSUVU.js";import{Cb as b,ba as k,ga as y,qb as l,sb as d}from"./chunk-HQUWYKSJ.js";import{i as m}from"./chunk-B4OMIONW.js";import{e as _,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;u({headline:"Checking bulk operation status.",body:[{list:{items:S({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new D("No API secret keys found for app");let p=await g(t,a.apiKey,s),i=await x({adminSession:p,operationId:r,version:await I({adminSession:p,minimumDefaultVersion:A})});i?U(i):w({headline:"Bulk operation not found.",body:d`ID: ${l.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;u({headline:"Listing bulk operations.",body:[{list:{items:S({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new D("No API secret keys found for app");let s=await g(t,r.apiKey,a),i=(await $({adminSession:s,version:await I({adminSession:s,minimumDefaultVersion:A})})).map(n=>({id:L(n.id),status:G(n.status),count:H(n.objectCount),dateCreated:k(new Date(String(n.createdAt))),dateFinished:n.completedAt?k(new Date(String(n.completedAt))):"",results:W(n.url??n.partialDataUrl)}));b(),i.length===0?u({body:"No bulk operations found in the last 7 days."}):T({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"}}}),b()}function U(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:p}=e,i=N(e).value,n=V(r,a),f=d`ID: ${l.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let h=s?l.link("Download results",s):"";v({headline:i,body:d`${f}\n${h}`.value})}else if(t==="FAILED"){let h=p?l.link("Download partial results",p):"";w({headline:i,body:d`${f}\n${h}`.value})}else u({headline:i,body:f})}function V(e,o){let t=new Date;return o?`Finished ${y(new Date(String(o)),t)}`:`Started ${y(new Date(String(e)),t)}`}function G(e){return e==="COMPLETED"?m.green(e):e==="FAILED"?m.red(e):m.dim(e)}function H(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function W(e){return e?d`${l.link("download",e)}`.value:""}var F=_(K(),1);var O=class e extends P{static summary="Check the status of bulk operations.";static 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,4 +1,4 @@
1
- import{a as V}from"./chunk-WHLGNDRE.js";import{a as N}from"./chunk-CZPGC2E7.js";import{a as F}from"./chunk-DQCIORGH.js";import{k as q,l as H,n as I}from"./chunk-MLZLDL6B.js";import{a as Y}from"./chunk-QPWMD2VR.js";import{a as y,c as U}from"./chunk-KOVAFUYN.js";import{b as L}from"./chunk-QEB3HUQE.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-4JY2P2A5.js";import{r as k}from"./chunk-OORWOTAP.js";import{aa as B}from"./chunk-PIFW2R3S.js";import{S as b,wa as a,xa as O}from"./chunk-YN6A26QL.js";import{A as d,B as C,E as P,z as f}from"./chunk-GMTNOCMS.js";import{h as S}from"./chunk-R2R6JDNH.js";import{wb as $}from"./chunk-Y34LWI3S.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
1
+ import{a as V}from"./chunk-CNMJ6QXM.js";import{a as N}from"./chunk-PEHLR7XP.js";import{a as F}from"./chunk-P5WLH64A.js";import{k as q,l as H,n as I}from"./chunk-7EUIO4ZO.js";import{a as Y}from"./chunk-Y6UZW73M.js";import{a as y,c as U}from"./chunk-WEWLPJK2.js";import{b as L}from"./chunk-OJSJWGP2.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-K63FW7Q7.js";import{r as k}from"./chunk-3KM2GKXH.js";import{aa as B}from"./chunk-TP4Z5OZT.js";import{S as b,wa as a,xa as O}from"./chunk-PK73ZSND.js";import{A as d,B as C,E as P,z as f}from"./chunk-WSCSFFLH.js";import{h as S}from"./chunk-BI7LE6CZ.js";import{wb as $}from"./chunk-HQUWYKSJ.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as e}from"./chunk-GCN4O7HM.js";import{b as r}from"./chunk-RY2SJVWM.js";import{t}from"./chunk-AGOEROAI.js";import{y as i}from"./chunk-GMTNOCMS.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
1
+ import{a as e}from"./chunk-GCN4O7HM.js";import{b as r}from"./chunk-3WV7DQMM.js";import{t}from"./chunk-AFT6ABDE.js";import{y as i}from"./chunk-WSCSFFLH.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static summary="Disable automatic upgrades for Shopify CLI.";static 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,4 +1,4 @@
1
- import{b as i}from"./chunk-JJJTPEMD.js";import{b as o}from"./chunk-RY2SJVWM.js";import{N as t}from"./chunk-GMTNOCMS.js";import{a as p}from"./chunk-CTNBSUVU.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static usage="search [query]";static examples=[`# open the search modal on Shopify.dev
1
+ import{b as i}from"./chunk-IX4IGE5H.js";import{b as o}from"./chunk-3WV7DQMM.js";import{N as t}from"./chunk-WSCSFFLH.js";import{a as p}from"./chunk-CTNBSUVU.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static usage="search [query]";static examples=[`# open the search modal on Shopify.dev
2
2
  shopify search
3
3
 
4
4
  # search for a term on Shopify.dev
@@ -1 +1 @@
1
- import{f as i}from"./chunk-F5HCSUXC.js";import{d as r}from"./chunk-JJJTPEMD.js";import{b as t}from"./chunk-RY2SJVWM.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var e=class extends t{static baseFlags=r;environmentsFilename(){return i.appEnvironments}};export{e as a};
1
+ import{f as i}from"./chunk-SPE2D366.js";import{d as r}from"./chunk-IX4IGE5H.js";import{b as t}from"./chunk-3WV7DQMM.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var e=class extends t{static baseFlags=r;environmentsFilename(){return i.appEnvironments}};export{e as a};
@@ -1,4 +1,4 @@
1
- import{h as E}from"./chunk-R2R6JDNH.js";import{Ab as O,Ta as V,ma as N,qb as $,sb as T}from"./chunk-Y34LWI3S.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
1
+ import{h as E}from"./chunk-BI7LE6CZ.js";import{Ab as O,Ta as V,ma as N,qb as $,sb as T}from"./chunk-HQUWYKSJ.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
2
2
  `);let s;for(;(s=C.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
3
3
  `),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){e=e||{};let n=x(e);e.path=n;let r=l.configDotenv(e);if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=A(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),f=M(r,i);t=l.decrypt(f.ciphertext,f.key);break}catch(i){if(o+1>=a)throw i}return l.parse(t)}function B(e){console.log(`[dotenv@${D}][WARN] ${e}`)}function v(e){console.log(`[dotenv@${D}][DEBUG] ${e}`)}function j(e){console.log(`[dotenv@${D}] ${e}`)}function A(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function M(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let f=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw f.code="INVALID_DOTENV_KEY",f}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function x(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)b.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return b.existsSync(n)?n:null}function k(e){return e[0]==="~"?y.join(q.homedir(),e.slice(1)):e}function W(e){let n=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;(n||!r)&&j("Loading env from encrypted .env.vault");let s=l._parseVault(e),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),l.populate(a,s,e),{parsed:s}}function G(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug),a=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?r=e.encoding:s&&v("No encoding is specified. UTF-8 is used by default");let t=[n];if(e&&e.path)if(!Array.isArray(e.path))t=[k(e.path)];else{t=[];for(let u of e.path)t.push(k(u))}let o,i={};for(let u of t)try{let c=l.parse(b.readFileSync(u,{encoding:r}));l.populate(i,c,e)}catch(c){s&&v(`Failed to load ${u} ${c.message}`),o=c}let f=process.env;if(e&&e.processEnv!=null&&(f=e.processEnv),l.populate(f,i,e),s||!a){let u=Object.keys(i).length,c=[];for(let p of t)try{let h=y.relative(process.cwd(),p);c.push(h)}catch(h){s&&v(`Failed to load ${p} ${h.message}`),o=h}j(`injecting env (${u}) from ${c.join(",")}`)}return o?{parsed:i,error:o}:{parsed:i}}function J(e){if(A(e).length===0)return l.configDotenv(e);let n=x(e);return n?l._configVault(e):(B(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),l.configDotenv(e))}function Q(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=F.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,f=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||f){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function H(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&v(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var l={configDotenv:G,_configVault:W,_parseVault:U,config:J,decrypt:Q,parse:S,populate:H};d.exports.configDotenv=l.configDotenv;d.exports._configVault=l._configVault;d.exports._parseVault=l._parseVault;d.exports.config=l.config;d.exports.decrypt=l.decrypt;d.exports.parse=l.parse;d.exports.populate=l.populate;d.exports=l});m();var L=Y(K());async function oe(e){if(O(T`Reading the .env file at ${$.path(e)}`),!await V(e))throw new E(`The environment file at ${e} does not exist.`);let n=await N(e);return{path:e,variables:(0,L.parse)(n)}}function se(e,n){let r=[],s=e===null?[]:e.split(`
4
4
  `),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=_(t.key,t.value+o.slice(0,-1),t.quote),c=n[t.key];c&&(a.push(t.key),u=_(t.key,c)),r.push(u),t=void 0}else t.value+=`${o}
@@ -1,3 +1,3 @@
1
- import{a as oe}from"./chunk-6VRXGEIW.js";import{d as ie}from"./chunk-JJJTPEMD.js";import{a as ne,b as se}from"./chunk-RY2SJVWM.js";import{Aa as V,C as w,J as C,S as L,a as K,xa as Q,za as U}from"./chunk-YN6A26QL.js";import{e as x}from"./chunk-AGOEROAI.js";import{A as N,B as I,E as te,a as W,x as ee}from"./chunk-GMTNOCMS.js";import{d as X,e as Z}from"./chunk-JQISGC7D.js";import{h as F,k as re}from"./chunk-R2R6JDNH.js";import{a as Ie}from"./chunk-CTNBSUVU.js";import{Ab as h,Fa as J,Ua as _,qb as R,sb as l}from"./chunk-Y34LWI3S.js";import{d as z,f as k,i as Y,q as $}from"./chunk-773TIA5M.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?J(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${Y(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function O(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function j(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function D(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function M(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),O().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),O().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),O().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),j().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),j().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),j().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),D().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),D().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),D().delete(e)}function v(t=S()){let e=M(t);if(!e)throw new re("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??M();if(!e)throw Q(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var B="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${B}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function G(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${B}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=G(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=G(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=G(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var H=class extends se{static baseFlags=ie;environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(ne(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await oe(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),te(s)}async runConcurrent(e){let o=new W,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await ee({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
1
+ import{a as oe}from"./chunk-PV6T52KB.js";import{d as ie}from"./chunk-IX4IGE5H.js";import{a as ne,b as se}from"./chunk-3WV7DQMM.js";import{Aa as V,C as w,J as C,S as L,a as K,xa as Q,za as U}from"./chunk-PK73ZSND.js";import{e as x}from"./chunk-AFT6ABDE.js";import{A as N,B as I,E as te,a as W,x as ee}from"./chunk-WSCSFFLH.js";import{d as X,e as Z}from"./chunk-6K3AJTNO.js";import{h as F,k as re}from"./chunk-BI7LE6CZ.js";import{a as Ie}from"./chunk-CTNBSUVU.js";import{Ab as h,Fa as J,Ua as _,qb as R,sb as l}from"./chunk-HQUWYKSJ.js";import{d as z,f as k,i as Y,q as $}from"./chunk-773TIA5M.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?J(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${Y(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function O(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function j(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function D(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function M(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),O().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),O().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),O().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),j().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),j().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),j().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),D().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),D().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),D().delete(e)}function v(t=S()){let e=M(t);if(!e)throw new re("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??M();if(!e)throw Q(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var B="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${B}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function G(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${B}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=G(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=G(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=G(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var H=class extends se{static baseFlags=ie;environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(ne(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await oe(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),te(s)}async runConcurrent(e){let o=new W,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await ee({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
2
2
 
3
3
  ${A.message}`,I({body:[A.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(i=>!i.some(s=>s.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await L(r,n):o??await this.storeAuthSessionForTheme({store:r})??await L(r,n)}async storeAuthSessionForTheme(e){let o=this.storeAuthScopes();if(!o)return;let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!r||n)return;let i=w(r),s=Ae(i);if(s)return this.adminSessionFromStoreAuthSession(s,i,o)}storeAuthSessionsForTheme(e){let o=this.storeAuthScopes();if(!o)return new Map;let r=new Set(e.filter(({store:n,password:i})=>typeof n=="string"&&!i).map(({store:n})=>w(n)));return r.size===0?new Map:new Map(we().map(n=>{let i=w(n.store);if(!r.has(i))return;let s=this.adminSessionFromStoreAuthSession(n,i,o);return s?[i,s]:void 0}).filter(n=>n!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(w(r))}adminSessionFromStoreAuthSession(e,o,r){if(ve(e)){h(`Ignoring stored store auth session for ${o}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){h(`Ignoring stored store auth session for ${o}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return h(`Using stored store auth session for ${o} (scopes: ${e.scopes.join(", ")}).`),C(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e,o){let r=this.expandImpliedStoreAuthScopes(e);return o.every(n=>r.has(n))}validConfig(e,o,r,n){let i=o.filter(s=>Array.isArray(s)?!s.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,s,n)).map(s=>Array.isArray(s)?s.join(" or "):s);return i.length>0?(N({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:i}}]}),i):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=z($(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=V();await X(()=>({store_fqdn_hash:K(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await Z(()=>({store_fqdn:e.storeFqdn}))}};export{B as a,we as b,Ae as c,wt as d,At as e,M as f,He as g,ze as h,Ye as i,Je as j,We as k,Ke as l,Qe as m,Ve as n,Xe as o,q as p,qe as q,le as r,ct as s,ut as t,mt as u,H as v};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-RY2SJVWM.js";import{y as t}from"./chunk-GMTNOCMS.js";import{j as r}from"./chunk-XAOYKECS.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static description="Run CLI doctor-release tests";static hidden=!0;async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
1
+ import{b as n}from"./chunk-3WV7DQMM.js";import{y as t}from"./chunk-WSCSFFLH.js";import{j as r}from"./chunk-4VJ6YK7U.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static description="Run CLI doctor-release tests";static hidden=!0;async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
@@ -1,4 +1,4 @@
1
- import{b as N}from"./chunk-LFOBYEWG.js";import{K as E,a as b}from"./chunk-YN6A26QL.js";import{V as O}from"./chunk-GMTNOCMS.js";import{d as _}from"./chunk-JQISGC7D.js";import{h as f}from"./chunk-R2R6JDNH.js";import{a as q}from"./chunk-CTNBSUVU.js";import{$ as F,qb as d,sb as g,wb as $}from"./chunk-Y34LWI3S.js";import{c as P}from"./chunk-XAOYKECS.js";import{a as T}from"./chunk-JD5P5RAJ.js";import{e as j,g as w}from"./chunk-VKWPEFWQ.js";w();var u=j(q()),h=class extends u.Command{static baseFlags={};static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-FDCH72NH.js");return await t(e,this.config),u.Errors.handle(e)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-FDCH72NH.js");await t(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-RHULO564.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${F(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-VYWSLAQ6.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){T(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
1
+ import{b as N}from"./chunk-LFOBYEWG.js";import{K as E,a as b}from"./chunk-PK73ZSND.js";import{V as O}from"./chunk-WSCSFFLH.js";import{d as _}from"./chunk-6K3AJTNO.js";import{h as f}from"./chunk-BI7LE6CZ.js";import{a as q}from"./chunk-CTNBSUVU.js";import{$ as F,qb as d,sb as g,wb as $}from"./chunk-HQUWYKSJ.js";import{c as P}from"./chunk-4VJ6YK7U.js";import{a as T}from"./chunk-JD5P5RAJ.js";import{e as j,g as w}from"./chunk-VKWPEFWQ.js";w();var u=j(q()),h=class extends u.Command{static baseFlags={};static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-XFH47Y75.js");return await t(e,this.config),u.Errors.handle(e)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-XFH47Y75.js");await t(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-L3FMN6EX.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${F(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-7TVGGEWJ.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){T(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
2
2
  SHOPIFY_CLI_TIMESTAMP_START
3
3
  { "timestamp": ${Date.now()} }
4
4
  SHOPIFY_CLI_TIMESTAMP_END
@@ -7,6 +7,6 @@ import{b as N}from"./chunk-LFOBYEWG.js";import{K as E,a as b}from"./chunk-YN6A26
7
7
 
8
8
  ${d.cyan(i)}
9
9
 
10
- ${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-ALH2N36U.js"),o=await a(i,{from:r.path}),l=[];r.environment&&(l=Array.isArray(r.environment)?r.environment:[r.environment]);let c=l.length>0;if(!o&&!c||c&&l.length>1)return e;let{environment:m,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,l[0]);if(!m||p&&!S(t?.flags,"environment"))return e;let v=await super.parse(A(t),n),y=await super.parse(t,[...n??this.argv,...R(m,t,v),...p?["--environment","default"]:[]]);return I(v.flags,y.flags,p?"default":l[0],m),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-ALH2N36U.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function C(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function I(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let l=Object.prototype.hasOwnProperty.call(s,a),c=Object.prototype.hasOwnProperty.call(n,a);if(!l&&c){let m=a==="password"?`********${o.substr(-4)}`:o;r[a]=m}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-VYWSLAQ6.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function A(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=S(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(g`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(l=>n.push(`--${r}`,`${l}`)):n.push(`--${r}`,`${i}`)}return n}function S(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}async function M(s){let e=Array.from(s.plugins.values()),t=["@shopify/app","@shopify/plugin-cloudflare"],n=e.filter(i=>t.includes(i.name));if(n.length>0){let i=n.map(o=>` - shopify plugins remove ${o.name}`).join(`
11
- `),{renderWarning:a}=await import("./ui-VYWSLAQ6.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.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:
10
+ ${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-RG64VB5R.js"),o=await a(i,{from:r.path}),l=[];r.environment&&(l=Array.isArray(r.environment)?r.environment:[r.environment]);let c=l.length>0;if(!o&&!c||c&&l.length>1)return e;let{environment:m,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,l[0]);if(!m||p&&!S(t?.flags,"environment"))return e;let v=await super.parse(A(t),n),y=await super.parse(t,[...n??this.argv,...R(m,t,v),...p?["--environment","default"]:[]]);return I(v.flags,y.flags,p?"default":l[0],m),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-RG64VB5R.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function C(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function I(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let l=Object.prototype.hasOwnProperty.call(s,a),c=Object.prototype.hasOwnProperty.call(n,a);if(!l&&c){let m=a==="password"?`********${o.substr(-4)}`:o;r[a]=m}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-7TVGGEWJ.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function A(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=S(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(g`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(l=>n.push(`--${r}`,`${l}`)):n.push(`--${r}`,`${i}`)}return n}function S(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}async function M(s){let e=Array.from(s.plugins.values()),t=["@shopify/app","@shopify/plugin-cloudflare"],n=e.filter(i=>t.includes(i.name));if(n.length>0){let i=n.map(o=>` - shopify plugins remove ${o.name}`).join(`
11
+ `),{renderWarning:a}=await import("./ui-7TVGGEWJ.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.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:
12
12
  ${i}`]})}let r=e.filter(i=>!t.includes(i.name));s.plugins=new Map(r.map(i=>[i.name,i]))}var z=h;export{A as a,z as b};
@@ -1,4 +1,4 @@
1
- import{a as D}from"./chunk-CZPGC2E7.js";import{a as _,c as b}from"./chunk-DQCIORGH.js";import{a as h,b as I}from"./chunk-KOVAFUYN.js";import{e as y,q as F}from"./chunk-4JY2P2A5.js";import{i as w,p as g,v as T}from"./chunk-OORWOTAP.js";import{b as u,f as v}from"./chunk-JJJTPEMD.js";import{E as p,z as d}from"./chunk-GMTNOCMS.js";import{a as C}from"./chunk-CTNBSUVU.js";import{U as c}from"./chunk-Y34LWI3S.js";import{e as E,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function O(t,e,r){let n=e.themes;e.development&&(n=[(await new D(t).find()).id.toString()]);let m=t.storeFqdn,i=await L(t,{...e,themes:n,development:!1});if(!e.force&&!r&&!await M(i,m))return;await Promise.all(i.map(o=>(y(o)&&w(),F(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
1
+ import{a as D}from"./chunk-PEHLR7XP.js";import{a as _,c as b}from"./chunk-P5WLH64A.js";import{a as h,b as I}from"./chunk-WEWLPJK2.js";import{e as y,q as F}from"./chunk-K63FW7Q7.js";import{i as w,p as g,v as T}from"./chunk-3KM2GKXH.js";import{b as u,f as v}from"./chunk-IX4IGE5H.js";import{E as p,z as d}from"./chunk-WSCSFFLH.js";import{a as C}from"./chunk-CTNBSUVU.js";import{U as c}from"./chunk-HQUWYKSJ.js";import{e as E,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function O(t,e,r){let n=e.themes;e.development&&(n=[(await new D(t).find()).id.toString()]);let m=t.storeFqdn,i=await L(t,{...e,themes:n,development:!1});if(!e.force&&!r&&!await M(i,m))return;await Promise.all(i.map(o=>(y(o)&&w(),F(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
2
2
 
3
3
  `}]:[];d({body:c(i,o=>[...l,`The following themes were deleted from ${m}:`,I(o)],o=>[...l,"The theme",...h(o),`was deleted from ${m}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let r=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${r}`,filter:{development:e.development}})]}async function M(t,e){let n={message:c(t,m=>[`Delete the following themes from ${e}?`],m=>["Delete",...h(m),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(n.infoTable={"":t.map(h)}),p(n)}var s=E(C(),1);var f=class extends T{static summary="Delete remote themes from the connected store. This command can't be undone.";static descriptionWithMarkdown=`Deletes a theme from your store.
4
4
 
@@ -1 +1 @@
1
- import{a as C}from"./chunk-NEMPLS7C.js";import{a as y}from"./chunk-KUNDCAQN.js";import{oa as k,qa as w,ra as A,sa as P}from"./chunk-ACTDYTAV.js";import{b as h}from"./chunk-JJJTPEMD.js";import{z as g}from"./chunk-GMTNOCMS.js";import{h as u}from"./chunk-R2R6JDNH.js";import{j as r}from"./chunk-773TIA5M.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function s(p){let{directory:t,configName:o,configPath:e,configuration:a,remoteApp:i}=p;if(!a.client_id)throw new u("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,l=await k({developerPlatformClient:c,app:i}),m=i.flags,b={directory:t,configName:o,developerPlatformClient:c,apiKey:a.client_id},d=await w(b,l,m,i.apiKey),v=r(e),x=await A({remoteApp:i,developerPlatformClient:c,specifications:l,flags:m,configFileName:v,appDirectory:d.appDirectory??t,localAppOptions:d});return{configPath:e,configuration:x,remoteApp:i}}var f=class p extends C{static summary="Refresh an already-linked app configuration without prompts.";static 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.";static description=this.descriptionWithoutMarkdown();static flags={...h,...y};async run(){let{flags:t}=await this.parse(p),{app:o,remoteApp:e}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),{configuration:a,configPath:i}=await s({directory:t.path,configName:t.config,configPath:o.configPath,configuration:o.configuration,remoteApp:e});return g({headline:`Pulled latest configuration for "${a.name}"`,body:`Updated ${r(i)} with the remote data.`}),{app:o}}};export{f as a};
1
+ import{a as C}from"./chunk-ESPT6CGE.js";import{a as y}from"./chunk-RA3WWB2S.js";import{oa as k,qa as w,ra as A,sa as P}from"./chunk-GFWXVO72.js";import{b as h}from"./chunk-IX4IGE5H.js";import{z as g}from"./chunk-WSCSFFLH.js";import{h as u}from"./chunk-BI7LE6CZ.js";import{j as r}from"./chunk-773TIA5M.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function s(p){let{directory:t,configName:o,configPath:e,configuration:a,remoteApp:i}=p;if(!a.client_id)throw new u("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,l=await k({developerPlatformClient:c,app:i}),m=i.flags,b={directory:t,configName:o,developerPlatformClient:c,apiKey:a.client_id},d=await w(b,l,m,i.apiKey),v=r(e),x=await A({remoteApp:i,developerPlatformClient:c,specifications:l,flags:m,configFileName:v,appDirectory:d.appDirectory??t,localAppOptions:d});return{configPath:e,configuration:x,remoteApp:i}}var f=class p extends C{static summary="Refresh an already-linked app configuration without prompts.";static 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.";static description=this.descriptionWithoutMarkdown();static flags={...h,...y};async run(){let{flags:t}=await this.parse(p),{app:o,remoteApp:e}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),{configuration:a,configPath:i}=await s({directory:t.path,configName:t.config,configPath:o.configPath,configuration:o.configuration,remoteApp:e});return g({headline:`Pulled latest configuration for "${a.name}"`,body:`Updated ${r(i)} with the remote data.`}),{app:o}}};export{f as a};
@@ -1,4 +1,4 @@
1
- import{c as w}from"./chunk-LRQYUWWB.js";import{c as F,e as x}from"./chunk-QRT4A2RV.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-KK24VGVE.js";import{q as $,s as m}from"./chunk-AGOEROAI.js";import{S as V,W as y,z as R}from"./chunk-GMTNOCMS.js";import{a as c}from"./chunk-5CYJG63I.js";import{Ab as l,Bb as E,gb as A,jb as U,kb as D,qb as u,sb as p,xb as d}from"./chunk-Y34LWI3S.js";import{c as _}from"./chunk-XAOYKECS.js";import{p as C,q as b,r as I}from"./chunk-773TIA5M.js";import{g as v}from"./chunk-VKWPEFWQ.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
1
+ import{c as w}from"./chunk-N4KDWHT2.js";import{c as F,e as x}from"./chunk-OQWMCJLY.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-GW4JHUIA.js";import{q as $,s as m}from"./chunk-AFT6ABDE.js";import{S as V,W as y,z as R}from"./chunk-WSCSFFLH.js";import{a as c}from"./chunk-76NEIDP5.js";import{Ab as l,Bb as E,gb as A,jb as U,kb as D,qb as u,sb as p,xb as d}from"./chunk-HQUWYKSJ.js";import{c as _}from"./chunk-4VJ6YK7U.js";import{p as C,q as b,r as I}from"./chunk-773TIA5M.js";import{g as v}from"./chunk-VKWPEFWQ.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
2
2
  Now upgrading by running: ${u.genericShellCommand(a)}...`),await V(r,i,{stdio:"inherit"}),R({headline:"Shopify CLI upgraded.",body:s?`You're now on version ${s}.`:"You're now on the latest version."})}else if(o)await Y(o,c);else throw new Error("Could not determine the local project directory")}function ie(){let e=c,n=f("@shopify/cli",e);if(!n){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),n;if(!m()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(y()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(w(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return n}async function se(){try{let{notifications:e}=await F();return x(e,"",["autoupgrade"]).some(o=>o.type==="error")}catch{return!1}}async function ce(){if(y()||w(c)||m())return;let e=f("@shopify/cli",c);e&&await $("warn-on-available-upgrade",{days:1},async()=>{E(G(e))})}function G(e,n=!1){let o=M(),t=o?p`💡 Version ${e} available! Run ${u.genericShellCommand(o)}`.value:p`💡 Version ${e} available!`.value;if(n){let a=`https://github.com/Shopify/cli/releases/tag/${e}`,r=p`⚠️ This is a major version — review breaking changes before upgrading:\n ${u.link(a,a)}`.value;return`${t}
3
3
 
4
4
  ${r}`}return t}async function Y(e,n){let o=(await h(e)).content,t=o.dependencies??{},a=o.devDependencies??{},i={...t,...a}[await k()];if(!i){l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");return}i.slice(0,1).match(/[\^~]/)&&(i=n);let s=await P(await k(),i);s?q(i,s):W(i),await J("prod",t,e),await J("dev",a,e)}async function J(e,n,o){let t=[await k(),...await j()].filter(r=>!!n[r]).map(r=>({name:r,version:"latest"})),a=await L(o);t.length>0&&await N(t,{packageManager:await S(o),type:e,directory:o,stdout:process.stdout,stderr:process.stderr,addToRootDirectory:a})}async function k(){return(await O()).name}async function j(){return(await O())?.oclif?.plugins??[]}var g;async function O(){if(!g){let e=await h(C(import.meta.url));g=g??e.content}return g}function W(e){d(p`You're on the latest version, ${u.yellow(e)}, no need to upgrade!`)}function q(e,n){d(p`Upgrading CLI from ${u.yellow(e)} to ${u.yellow(n)}...`)}export{M as a,re as b,ie as c,se as d,ce as e,G as f};
@@ -1 +1 @@
1
- import{I as T,K as b}from"./chunk-ACTDYTAV.js";import{X as F,ba as y}from"./chunk-F5HCSUXC.js";import{a as f}from"./chunk-U6HYEGAE.js";import{C as D,a as S}from"./chunk-YN6A26QL.js";import{H as _,T as m,y as g}from"./chunk-GMTNOCMS.js";import{f as v,h as c}from"./chunk-R2R6JDNH.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();async function l(e,o,n){let i=n.clientName===F.AppManagement,a=await T({onSearchForStoresByName:async r=>n.devStoresForOrg(o.id,r),...e,showDomainOnPrompt:i});if(!a){if(g({body:await n.getCreateDevStoreLink(o)}),await m(5),!await b(o))throw new v;let t=await O(o.id,n);a=await l({stores:t,hasMorePages:!1},o,n)}return p(a),a}async function O(e,o){let s=[];return await _([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){let{stores:t}=await o.devStoresForOrg(e);if(t.length>0){s=t;return}await m(3)}}}]),s}function p(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new c(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new c(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function W({appContextResult:e,storeFqdn:o,forceReselectStore:n,storeTypes:i=["APP_DEVELOPMENT"]}){let{app:s,organization:a,developerPlatformClient:r}=e,t,P=s.configuration.build?.dev_store_url,h=s.hiddenConfig.dev_store_url,u=P??h,w=o??(n?void 0:u),E=i.length===1&&i[0]==="APP_DEVELOPMENT";if(w)t=await y(a,w,r,i),E&&p(t);else{let M=await r.devStoresForOrg(a.id);t=await l(M,a,r)}return t.shopDomain=D(t.shopDomain),await A(t,n),(t.shopDomain!==u||!h)&&await s.updateHiddenConfig({dev_store_url:t.shopDomain}),await r.ensureUserAccessToStore(a.id,t),t}async function A(e,o){await f.addPublicMetadata(()=>({cmd_app_reset_used:o,store_fqdn_hash:S(e.shopDomain),store_domain:e.shopDomain})),await f.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{W as a};
1
+ import{I as T,K as b}from"./chunk-GFWXVO72.js";import{X as F,ba as y}from"./chunk-SPE2D366.js";import{a as f}from"./chunk-HU4GFVEN.js";import{C as D,a as S}from"./chunk-PK73ZSND.js";import{H as _,T as m,y as g}from"./chunk-WSCSFFLH.js";import{f as v,h as c}from"./chunk-BI7LE6CZ.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();async function l(e,o,n){let i=n.clientName===F.AppManagement,a=await T({onSearchForStoresByName:async r=>n.devStoresForOrg(o.id,r),...e,showDomainOnPrompt:i});if(!a){if(g({body:await n.getCreateDevStoreLink(o)}),await m(5),!await b(o))throw new v;let t=await O(o.id,n);a=await l({stores:t,hasMorePages:!1},o,n)}return p(a),a}async function O(e,o){let s=[];return await _([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){let{stores:t}=await o.devStoresForOrg(e);if(t.length>0){s=t;return}await m(3)}}}]),s}function p(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new c(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new c(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function W({appContextResult:e,storeFqdn:o,forceReselectStore:n,storeTypes:i=["APP_DEVELOPMENT"]}){let{app:s,organization:a,developerPlatformClient:r}=e,t,P=s.configuration.build?.dev_store_url,h=s.hiddenConfig.dev_store_url,u=P??h,w=o??(n?void 0:u),E=i.length===1&&i[0]==="APP_DEVELOPMENT";if(w)t=await y(a,w,r,i),E&&p(t);else{let M=await r.devStoresForOrg(a.id);t=await l(M,a,r)}return t.shopDomain=D(t.shopDomain),await A(t,n),(t.shopDomain!==u||!h)&&await s.updateHiddenConfig({dev_store_url:t.shopDomain}),await r.ensureUserAccessToStore(a.id,t),t}async function A(e,o){await f.addPublicMetadata(()=>({cmd_app_reset_used:o,store_fqdn_hash:S(e.shopDomain),store_domain:e.shopDomain})),await f.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{W as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-2S3GOPRL.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1 +1 @@
1
- import{b as r,c as u,e as I}from"./chunk-DPNZWBT5.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as p}from"crypto";import{homedir as l,networkInterfaces as m}from"os";async function f(t){let{fileExists:e}=await import("./fs-SKHQZZTQ.js");return e(t)}async function U(t,e){let{exec:a}=await import("./system-SR5G7WEW.js");await a(t,e)}function M(){return!!(process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function x(){return l()}var _,T;function B(t=process.env){return t[r.env]==="development"}function N(t=process.env){return t===process.env?_??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function A(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await f(I.executables.dev)}function y(t=process.env){return t===process.env?T??=o(t[r.unitTest]):o(t[r.unitTest])}function g(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function S(t=process.env){return o(t[r.alwaysLogAnalytics])}function K(t=process.env){return o(t[r.alwaysLogMetrics])}function G(t=process.env){return o(t[r.doctor])}function O(t=process.env){return t[r.gitpod]}function H(t=process.env){return t[r.codespaceName]}function w(t=process.env){return t[r.codespacePortForwardingDomain]}function P(t=process.env){return d(t).platform!=="localhost"}function k(t=process.env){return t[r.themeToken]}function d(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function F(){try{return await U("git",["--version"]),!0}catch{return!1}}function z(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function $(){let t="00:00:00:00:00:00",e=Object.values(m()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??p()}function V(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:u}function W(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{M as a,x as b,B as c,N as d,A as e,y as f,g,S as h,K as i,G as j,O as k,H as l,w as m,P as n,k as o,d as p,F as q,z as r,$ as s,V as t,W as u};
1
+ import{b as r,c as u,e as I}from"./chunk-DPNZWBT5.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as p}from"crypto";import{homedir as l,networkInterfaces as m}from"os";async function f(t){let{fileExists:e}=await import("./fs-Y7I3Y5IR.js");return e(t)}async function U(t,e){let{exec:a}=await import("./system-ZETSJRKS.js");await a(t,e)}function M(){return!!(process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function x(){return l()}var _,T;function B(t=process.env){return t[r.env]==="development"}function N(t=process.env){return t===process.env?_??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function A(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await f(I.executables.dev)}function y(t=process.env){return t===process.env?T??=o(t[r.unitTest]):o(t[r.unitTest])}function g(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function S(t=process.env){return o(t[r.alwaysLogAnalytics])}function K(t=process.env){return o(t[r.alwaysLogMetrics])}function G(t=process.env){return o(t[r.doctor])}function O(t=process.env){return t[r.gitpod]}function H(t=process.env){return t[r.codespaceName]}function w(t=process.env){return t[r.codespacePortForwardingDomain]}function P(t=process.env){return d(t).platform!=="localhost"}function k(t=process.env){return t[r.themeToken]}function d(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function F(){try{return await U("git",["--version"]),!0}catch{return!1}}function z(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function $(){let t="00:00:00:00:00:00",e=Object.values(m()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??p()}function V(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:u}function W(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{M as a,x as b,B as c,N as d,A as e,y as f,g,S as h,K as i,G as j,O as k,H as l,w as m,P as n,k as o,d as p,F as q,z as r,$ as s,V as t,W as u};
@@ -1,4 +1,4 @@
1
- import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Cr}from"./chunk-7WTNEG2F.js";import{a as xr}from"./chunk-MRCWOOSF.js";import{a as Er}from"./chunk-PWSI275S.js";import{a as Rr}from"./chunk-X4XP2RQJ.js";import{a as br}from"./chunk-TYIGOVRQ.js";import{a as Sr}from"./chunk-7AALWJAO.js";import{b as Tr}from"./chunk-LQCR4TGH.js";import{a as Ar}from"./chunk-SSJGWLCW.js";import{a as _r}from"./chunk-QBIVQXUJ.js";import{a as pr}from"./chunk-JQ2B3VHR.js";import{a as dr}from"./chunk-2HK4MFWP.js";import{a as mr}from"./chunk-SJMTETSU.js";import{a as fr}from"./chunk-K4KTNINH.js";import{a as hr}from"./chunk-GZ64KWHX.js";import{a as gr}from"./chunk-XLURZ6GL.js";import{a as wr,b as yr,c as Pr,d as vr}from"./chunk-PAAKBWSF.js";import{a as Ur}from"./chunk-4LRG5YBS.js";import{g as ur}from"./chunk-MLZLDL6B.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-FULWTZS6.js";import{a as ar}from"./chunk-QEB3HUQE.js";import{a as lr}from"./chunk-5NO5OXYP.js";import{a as Xe}from"./chunk-E2W5OYYM.js";import{a as cr}from"./chunk-4W3UE2ZI.js";import{c as Je,m as Ze}from"./chunk-LZ3GZ7NS.js";import{b as ir,g as _e,j as Qe}from"./chunk-4JY2P2A5.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-FCGKO2KY.js";import{a as $,b as Ve}from"./chunk-JUKAWTYY.js";import{a as Xt,b as Zt,d as Te,f as er,m as Ae,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{c as kr}from"./chunk-AH2ZGMDM.js";import{a as Jt}from"./chunk-JZMRBJH3.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-63CIFL36.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as Po,k as vo,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as To,x as Ao,z as nt}from"./chunk-U7R6LYPJ.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-TY4W7AYX.js";import{a as Lr}from"./chunk-PANGX7SA.js";import{a as Xr}from"./chunk-H5KWM27L.js";import{a as Jr}from"./chunk-NEMPLS7C.js";import{a as Ir}from"./chunk-KUNDCAQN.js";import{B as Br,D as Kr,F as Z,M as jr,N as Yr,X as Vr,i as $r,j as W,k as Mr,m as Fr,ma as ke,na as Ie,p as et,q as Or,r as Nr,s as qr,sa as Qr,t as Wr,u as Hr,v as Gr}from"./chunk-ACTDYTAV.js";import{X as zr,e as Ce,j as ie,p as Dr}from"./chunk-F5HCSUXC.js";import{c as Vt}from"./chunk-KIYHEMHD.js";import{a as K}from"./chunk-U6HYEGAE.js";import{b as Qt,e as Re}from"./chunk-JJJTPEMD.js";import{C as ye,R as kt,a as Ke,ba as J,c as bt,da as It,e as St,g as Ut,k as Rt,o as Tt,q as At,t as _t,va as Lt,w as Ct,x as we}from"./chunk-YN6A26QL.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as Ye,V as Kt,X as jt,a as Et,d as Pe,e as k,f as L,h as ve,i as xe,j as Dt,k as Ft,l as Ot,m as Nt,n as qt,o as D,p as Wt,q as je,r as ze,s as Ht,t as Gt,y as Ee}from"./chunk-GMTNOCMS.js";import{a as Cn}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-JQISGC7D.js";import{h as T,k as X}from"./chunk-R2R6JDNH.js";import{a as _n}from"./chunk-CTNBSUVU.js";import{a as _o}from"./chunk-E5T4YRGW.js";import{$a as vt,Ab as g,Bb as C,Ea as Pt,Na as he,P as Be,Ta as F,Wa as ge,cb as xt,ma as I,qb as v,sb as b,ua as me,wa as fe,xb as B}from"./chunk-Y34LWI3S.js";import{d as zt,f as Yt}from"./chunk-XAOYKECS.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-773TIA5M.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,In='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await Ln(t,e,r););}async function Ln(t,e,r){let o=await _e(t,e);if(!o||$n(o,r))throw new T(In);return await ae(3),o.processing}function $n(t,e){return t.processing&&Date.now()-e>=kn}var Mn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=wr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){yr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Mn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var Fn={"theme:init":hr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":gr,"theme:list":vr,"theme:metafields:pull":Ur,"theme:open":xr,"theme:package":Er,"theme:profile":br,"theme:publish":Sr,"theme:preview":Rr,"theme:pull":Tr,"theme:push":Ar,"theme:rename":_r,"theme:share":Cr},ka=Fn;async function ko(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([kt(t.storeFqdn),qn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),w=h?await Xe(t.storePassword,l,u):void 0,m=await Nn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:On,options:{theme:m,adminSession:c,storefrontPassword:w,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var On=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function Nn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new T("Could not find or create a host theme for theme app extensions");return r}async function qn(t){return t.developerPlatformClient?.clientName===zr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Wn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function Io(t,e){let r=await Wn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Hn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Hn(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return D({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Io(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Gn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=t.configuration.metafields),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Gn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Bn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l={...i,surface:Ie(c),root:{url:`${e}/${c}`},resource:d||{url:""}},u=a?.[c];if(!u)return l;let w=await Qn(u,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...l,...w}}))}return s}async function Bn(t){try{let e=S(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function Kn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let w=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[w.name]:w}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function jn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Vn(t,s,r,o),{assets:{[a.name]:a}}}async function Vn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await F(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Qn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Jn(o,n)?zn(e,n):Xn(o,n)?Yn(e,o,n):Zn(o,n)?jn(e,o,n):Kn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Jn(t,e){return t==="intents"&&Array.isArray(e)}function Xn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function Zn(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as es}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function Lo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var De=class extends es{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function $o(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,ts(t,e)))}}function ts(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${v.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",as(t,e))}}function rs(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?v.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var os={debug:t=>v.gray(t),warn:t=>v.yellow(t),error:t=>v.errorText(t)};function ns({type:t,message:e}){let r=rs(e);switch(t){case"debug":case"warn":case"error":return b`${os[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function ss(t,e){D({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ns(t))})}function as(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
1
+ import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Cr}from"./chunk-USBP7H7J.js";import{a as xr}from"./chunk-HRHNJFAA.js";import{a as Er}from"./chunk-DEMZRLX5.js";import{a as Rr}from"./chunk-HCQABTQL.js";import{a as br}from"./chunk-YFKEESYB.js";import{a as Sr}from"./chunk-EMETQFFJ.js";import{b as Tr}from"./chunk-JQUEW7CB.js";import{a as Ar}from"./chunk-SCXL5UQ4.js";import{a as _r}from"./chunk-6QJIGFQJ.js";import{a as pr}from"./chunk-46BKAF3F.js";import{a as dr}from"./chunk-XMJFT4WP.js";import{a as mr}from"./chunk-QT367CYF.js";import{a as fr}from"./chunk-WTES5ZXR.js";import{a as hr}from"./chunk-RY4MPX5A.js";import{a as gr}from"./chunk-GXOFJIKQ.js";import{a as wr,b as yr,c as Pr,d as vr}from"./chunk-DMFEYI4G.js";import{a as Ur}from"./chunk-KDBKEVCF.js";import{g as ur}from"./chunk-7EUIO4ZO.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-PQG7XSQP.js";import{a as ar}from"./chunk-OJSJWGP2.js";import{a as lr}from"./chunk-RY4YUBG3.js";import{a as Xe}from"./chunk-EWS2RNM6.js";import{a as cr}from"./chunk-ELSDVDT7.js";import{c as Je,m as Ze}from"./chunk-5JW4JQWZ.js";import{b as ir,g as _e,j as Qe}from"./chunk-K63FW7Q7.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-YCU7ZCIG.js";import{a as $,b as Ve}from"./chunk-MTTBBZSR.js";import{a as Xt,b as Zt,d as Te,f as er,m as Ae,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{c as kr}from"./chunk-CUUCRIGC.js";import{a as Jt}from"./chunk-I2LNQKIJ.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-XMQFQUUK.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as Po,k as vo,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as To,x as Ao,z as nt}from"./chunk-YXDIHVPY.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-HOVIGRE4.js";import{a as Lr}from"./chunk-ZBSC2KZ7.js";import{a as Xr}from"./chunk-4I7TUB3K.js";import{a as Jr}from"./chunk-ESPT6CGE.js";import{a as Ir}from"./chunk-RA3WWB2S.js";import{B as Br,D as Kr,F as Z,M as jr,N as Yr,X as Vr,i as $r,j as W,k as Mr,m as Fr,ma as ke,na as Ie,p as et,q as Or,r as Nr,s as qr,sa as Qr,t as Wr,u as Hr,v as Gr}from"./chunk-GFWXVO72.js";import{X as zr,e as Ce,j as ie,p as Dr}from"./chunk-SPE2D366.js";import{c as Vt}from"./chunk-IENBHP2S.js";import{a as K}from"./chunk-HU4GFVEN.js";import{b as Qt,e as Re}from"./chunk-IX4IGE5H.js";import{C as ye,R as kt,a as Ke,ba as J,c as bt,da as It,e as St,g as Ut,k as Rt,o as Tt,q as At,t as _t,va as Lt,w as Ct,x as we}from"./chunk-PK73ZSND.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as Ye,V as Kt,X as jt,a as Et,d as Pe,e as k,f as L,h as ve,i as xe,j as Dt,k as Ft,l as Ot,m as Nt,n as qt,o as D,p as Wt,q as je,r as ze,s as Ht,t as Gt,y as Ee}from"./chunk-WSCSFFLH.js";import{a as Cn}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-6K3AJTNO.js";import{h as T,k as X}from"./chunk-BI7LE6CZ.js";import{a as _n}from"./chunk-CTNBSUVU.js";import{a as _o}from"./chunk-JNIPCLAF.js";import{$a as vt,Ab as g,Bb as C,Ea as Pt,Na as he,P as Be,Ta as F,Wa as ge,cb as xt,ma as I,qb as v,sb as b,ua as me,wa as fe,xb as B}from"./chunk-HQUWYKSJ.js";import{d as zt,f as Yt}from"./chunk-4VJ6YK7U.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-773TIA5M.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,In='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await Ln(t,e,r););}async function Ln(t,e,r){let o=await _e(t,e);if(!o||$n(o,r))throw new T(In);return await ae(3),o.processing}function $n(t,e){return t.processing&&Date.now()-e>=kn}var Mn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=wr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){yr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Mn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var Fn={"theme:init":hr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":gr,"theme:list":vr,"theme:metafields:pull":Ur,"theme:open":xr,"theme:package":Er,"theme:profile":br,"theme:publish":Sr,"theme:preview":Rr,"theme:pull":Tr,"theme:push":Ar,"theme:rename":_r,"theme:share":Cr},ka=Fn;async function ko(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([kt(t.storeFqdn),qn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),w=h?await Xe(t.storePassword,l,u):void 0,m=await Nn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:On,options:{theme:m,adminSession:c,storefrontPassword:w,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var On=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function Nn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new T("Could not find or create a host theme for theme app extensions");return r}async function qn(t){return t.developerPlatformClient?.clientName===zr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Wn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function Io(t,e){let r=await Wn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Hn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Hn(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return D({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Io(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Gn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=t.configuration.metafields),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Gn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Bn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l={...i,surface:Ie(c),root:{url:`${e}/${c}`},resource:d||{url:""}},u=a?.[c];if(!u)return l;let w=await Qn(u,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...l,...w}}))}return s}async function Bn(t){try{let e=S(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function Kn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let w=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[w.name]:w}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function jn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Vn(t,s,r,o),{assets:{[a.name]:a}}}async function Vn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await F(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Qn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Jn(o,n)?zn(e,n):Xn(o,n)?Yn(e,o,n):Zn(o,n)?jn(e,o,n):Kn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Jn(t,e){return t==="intents"&&Array.isArray(e)}function Xn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function Zn(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as es}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function Lo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var De=class extends es{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function $o(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,ts(t,e)))}}function ts(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${v.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",as(t,e))}}function rs(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?v.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var os={debug:t=>v.gray(t),warn:t=>v.yellow(t),error:t=>v.errorText(t)};function ns({type:t,message:e}){let r=rs(e);switch(t){case"debug":case"warn":case"error":return b`${os[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function ss(t,e){D({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ns(t))})}function as(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
2
2
  ${v.json(s)}
3
3
  `,e.stdout),n===j.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===j.Dispatch){let a=is(o,e);Do(t,a,e)}else n===j.Log&&ss(s,e)}}function Mo(t,e){return r=>{let o={event:j.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};g(b`Sending websocket update event to the websocket clients:
4
4
  ${v.json(o)}
@@ -1 +1 @@
1
- import{a as m}from"./chunk-ZO74GSWC.js";import{a as p}from"./chunk-NEMPLS7C.js";import{a as n}from"./chunk-KUNDCAQN.js";import{sa as r}from"./chunk-ACTDYTAV.js";import{b as s}from"./chunk-JJJTPEMD.js";import{wb as e}from"./chunk-Y34LWI3S.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var i=class d extends p{static summary="Display app and extensions environment variables.";static descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";static description=this.descriptionWithoutMarkdown();static flags={...s,...n};async run(){let{flags:t}=await this.parse(d),{app:a,remoteApp:l,organization:c}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return e(await m(a,l,c)),{app:a}}};export{i as a};
1
+ import{a as m}from"./chunk-6SM4RY3I.js";import{a as p}from"./chunk-ESPT6CGE.js";import{a as n}from"./chunk-RA3WWB2S.js";import{sa as r}from"./chunk-GFWXVO72.js";import{b as s}from"./chunk-IX4IGE5H.js";import{wb as e}from"./chunk-HQUWYKSJ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var i=class d extends p{static summary="Display app and extensions environment variables.";static descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";static description=this.descriptionWithoutMarkdown();static flags={...s,...n};async run(){let{flags:t}=await this.parse(d),{app:a,remoteApp:l,organization:c}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return e(await m(a,l,c)),{app:a}}};export{i as a};
@@ -1,4 +1,4 @@
1
- import{k as P,t as F}from"./chunk-4JY2P2A5.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-CTRXLZAJ.js";import{Q as H,S as q,r as $,xa as d,za as h}from"./chunk-YN6A26QL.js";import{B as I,C as L,T as v}from"./chunk-GMTNOCMS.js";import{a as x}from"./chunk-5CYJG63I.js";import{h as l}from"./chunk-R2R6JDNH.js";import{Ab as c,qb as C,sb as U}from"./chunk-Y34LWI3S.js";import{t as O}from"./chunk-XAOYKECS.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
1
+ import{k as P,t as F}from"./chunk-K63FW7Q7.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-6G5TDB45.js";import{Q as H,S as q,r as $,xa as d,za as h}from"./chunk-PK73ZSND.js";import{B as I,C as L,T as v}from"./chunk-WSCSFFLH.js";import{a as x}from"./chunk-76NEIDP5.js";import{h as l}from"./chunk-BI7LE6CZ.js";import{Ab as c,qb as C,sb as U}from"./chunk-HQUWYKSJ.js";import{t as O}from"./chunk-4VJ6YK7U.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
2
2
 
3
3
  -Request ID: ${i.headers.get("x-request-id")??"unknown"}
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as Q,b as X,c as H}from"./chunk-6ENBE43F.js";import{a as L,c as M,e as f,f as P,h as T,i as q,m as V,p as U,q as F,r as j,s as z,u as _}from"./chunk-YIZZ5LZN.js";import{a as W}from"./chunk-NEMPLS7C.js";import{a as G,b as J}from"./chunk-KUNDCAQN.js";import{b as N}from"./chunk-JJJTPEMD.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-GMTNOCMS.js";import{h as m,k as R}from"./chunk-R2R6JDNH.js";import{Ta as I,ma as C,qb as r,sb as s,ua as S,wb as x}from"./chunk-Y34LWI3S.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
1
+ import{a as Q,b as X,c as H}from"./chunk-U3F6GPCE.js";import{a as L,c as M,e as f,f as P,h as T,i as q,m as V,p as U,q as F,r as j,s as z,u as _}from"./chunk-SGIMJQEM.js";import{a as W}from"./chunk-ESPT6CGE.js";import{a as G,b as J}from"./chunk-RA3WWB2S.js";import{b as N}from"./chunk-IX4IGE5H.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-WSCSFFLH.js";import{h as m,k as R}from"./chunk-BI7LE6CZ.js";import{Ta as I,ma as C,qb as r,sb as s,ua as S,wb as x}from"./chunk-HQUWYKSJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
2
2
  `);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:d,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:p,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await P({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(d,b);ae(o,B),H(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:X({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:p,query:o,variablesJsonl:B,version:k}):await T({adminSession:p,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await F(p,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await U(p,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{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":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let d=await j(t.url),b=z(d);e?await S(e,d):x(d),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
3
3
  `,{command:`shopify app bulk status --id=${M(t)}`}]}var A=class t extends W{static summary="Execute bulk operations.";static 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
 
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-3WV7DQMM.js";import{ua as r}from"./chunk-PK73ZSND.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static hidden=!0;async run(){await r()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{b as ge}from"./chunk-AH2ZGMDM.js";import{a as he,c as ye}from"./chunk-ZSFAURIH.js";import{b as ue}from"./chunk-JZMRBJH3.js";import{a as Te}from"./chunk-NEMPLS7C.js";import{C as ve,H as Pe,J as Ae,L as ke,U as xe,W as Ce,h as we,pa as Fe,sa as Le}from"./chunk-ACTDYTAV.js";import{Y as Ie,aa as Re,o as be}from"./chunk-F5HCSUXC.js";import{b as fe,f as de}from"./chunk-JJJTPEMD.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-KK24VGVE.js";import{e as Q}from"./chunk-AGOEROAI.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-GMTNOCMS.js";import{c as ne}from"./chunk-EOMCXBCS.js";import{a as z}from"./chunk-5CYJG63I.js";import{d as se}from"./chunk-JQISGC7D.js";import{h as m}from"./chunk-R2R6JDNH.js";import{a as He}from"./chunk-CTNBSUVU.js";import{$a as Z,Ca as I,Ja as V,Oa as K,Ta as R,Ua as x,Va as B,Wa as W,_ as H,hb as X,ib as J,ka as q,ma as O,qb as h,rb as F,sa as T,sb as b,ua as _,wa as Y}from"./chunk-Y34LWI3S.js";import{e as me}from"./chunk-XAOYKECS.js";import{d as l,e as k,f as M,p as U,q as D}from"./chunk-773TIA5M.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
1
+ import{b as ge}from"./chunk-CUUCRIGC.js";import{a as he,c as ye}from"./chunk-M5Q74UZM.js";import{b as ue}from"./chunk-I2LNQKIJ.js";import{a as Te}from"./chunk-ESPT6CGE.js";import{C as ve,H as Pe,J as Ae,L as ke,U as xe,W as Ce,h as we,pa as Fe,sa as Le}from"./chunk-GFWXVO72.js";import{Y as Ie,aa as Re,o as be}from"./chunk-SPE2D366.js";import{b as fe,f as de}from"./chunk-IX4IGE5H.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-GW4JHUIA.js";import{e as Q}from"./chunk-AFT6ABDE.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-WSCSFFLH.js";import{c as ne}from"./chunk-XTXYS7LB.js";import{a as z}from"./chunk-76NEIDP5.js";import{d as se}from"./chunk-6K3AJTNO.js";import{h as m}from"./chunk-BI7LE6CZ.js";import{a as He}from"./chunk-CTNBSUVU.js";import{$a as Z,Ca as I,Ja as V,Oa as K,Ta as R,Ua as x,Va as B,Wa as W,_ as H,hb as X,ib as J,ka as q,ma as O,qb as h,rb as F,sa as T,sb as b,ua as _,wa as Y}from"./chunk-HQUWYKSJ.js";import{e as me}from"./chunk-4VJ6YK7U.js";import{d as l,e as k,f as M,p as U,q as D}from"./chunk-773TIA5M.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
2
  Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await q(async o=>{let f=l(o,"download"),u=i.filePath?l(f,i.filePath):f,d=l(o,"app"),A=i.branch?`${i.baseURL}#${i.branch}`:i.baseURL;await Y(f);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:f,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(u,d,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let p=(await ie(d)).content;p.name=a,p.author=await ne()??"",p.private=!0;let v=["extensions/*"].concat(We(d));switch(t){case"npm":case"yarn":case"bun":p.workspaces=v;break;case"pnpm":{await Ze(d,v),await T(l(d,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new te}await Se({packageJSON:p,local:e.local,directory:d,useGlobalCLI:e.useGlobalCLI}),await re(d,p)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let p=l(d,".gitignore");if(await R(p)){let v=await O(p);C.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await _(p,v.trim())}}}),await me()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let p=l(d,".npmrc");await T(p,`@shopify:registry=https://registry.npmjs.org
4
4
  `)}});let N=!1;w.push({title:"Preparing project directory",task:async()=>{await Ee(r,a),N=!0,await K(d,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await Ge({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await G(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await ce(w)}catch(p){throw N&&await I(r).catch(()=>{}),p}});let n;if(e.selectedAppOrNameResult.result==="new"){let o=await ve(r,e.name),f=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(f,o)}else n=e.selectedAppOrNameResult.app;await Fe({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return pe({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:F(t,"shopify app generate extension")}],["To see your app, run",{command:F(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:F(t,"shopify app","--help")}]]}),{app:s.app}}async function Ee(e,t){if(await R(e))throw new m(`