@shopify/cli 4.9.4 → 4.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/analytics-PBZEKUGU.js +1 -0
  2. package/dist/analytics-WVGBNFGK.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-WEPO4J2F.js → chunk-2EC5SUGK.js} +1 -1
  5. package/dist/{chunk-ZEBMW5KS.js → chunk-2II4W4ZF.js} +1 -1
  6. package/dist/{chunk-YYA5VGDW.js → chunk-2QENUJVG.js} +1 -1
  7. package/dist/{chunk-FO2R6KHG.js → chunk-2RONPKOD.js} +1 -1
  8. package/dist/{chunk-DYPZX7MW.js → chunk-2VGPNRHH.js} +1 -1
  9. package/dist/{chunk-O5FFMTJE.js → chunk-2WDJXERZ.js} +1 -1
  10. package/dist/{chunk-GPRZYFDE.js → chunk-32NWVYUC.js} +1 -1
  11. package/dist/{chunk-73D5O7A3.js → chunk-32RRWGNS.js} +1 -1
  12. package/dist/{chunk-YBSX53QP.js → chunk-32VQQ6EU.js} +1 -1
  13. package/dist/{chunk-IPZ6LUJV.js → chunk-34RFTE5T.js} +1 -1
  14. package/dist/{chunk-LJIJEGND.js → chunk-35NTERVR.js} +1 -1
  15. package/dist/{chunk-PP4VCR4Y.js → chunk-35VQQKVX.js} +1 -1
  16. package/dist/{chunk-AYIU6Z4C.js → chunk-3N6NKC2U.js} +1 -1
  17. package/dist/{chunk-6A4H3HPY.js → chunk-3Q5BAPQK.js} +1 -1
  18. package/dist/{chunk-BVB3DTNE.js → chunk-3XAD2E55.js} +1 -1
  19. package/dist/{chunk-XWQM2NZ2.js → chunk-42DMJGOW.js} +1 -1
  20. package/dist/{chunk-WEXOA4C4.js → chunk-4BXQTW5G.js} +1 -1
  21. package/dist/{chunk-I5PQZRYM.js → chunk-4CTTWXUX.js} +1 -1
  22. package/dist/{chunk-Q37WAD6F.js → chunk-4HBKQUKY.js} +1 -1
  23. package/dist/{chunk-VS7QVU3Z.js → chunk-4IAGBAQD.js} +1 -1
  24. package/dist/{chunk-UIC7K2HX.js → chunk-4MQXMIWQ.js} +1 -1
  25. package/dist/{chunk-AVMNIZAJ.js → chunk-4VS7YD53.js} +1 -1
  26. package/dist/{chunk-HQJ62PII.js → chunk-5APLAJCB.js} +1 -1
  27. package/dist/{chunk-ZEE32UH6.js → chunk-5AQNISGC.js} +1 -1
  28. package/dist/{chunk-DEF2G7S4.js → chunk-5GFVMGAZ.js} +1 -1
  29. package/dist/{chunk-B3M3KIOU.js → chunk-5NCWBBRW.js} +1 -1
  30. package/dist/{chunk-7556AIVG.js → chunk-5O7JTVO2.js} +1 -1
  31. package/dist/{chunk-SNE4RHM4.js → chunk-5OM72O4N.js} +1 -1
  32. package/dist/chunk-5SLKHURV.js +1 -0
  33. package/dist/chunk-5VRB3FBD.js +6 -0
  34. package/dist/{chunk-LOWSU4BB.js → chunk-5XTJ4OL4.js} +1 -1
  35. package/dist/{chunk-UWI76E2L.js → chunk-62GA7XR3.js} +3 -3
  36. package/dist/{chunk-WLWHCUPZ.js → chunk-62LMVFR7.js} +1 -1
  37. package/dist/{chunk-D3KFKT4D.js → chunk-65GNYRYR.js} +2 -2
  38. package/dist/{chunk-OE3HSNSE.js → chunk-72CBJYAG.js} +1 -1
  39. package/dist/{chunk-TFXUDHCP.js → chunk-762IKULK.js} +1 -1
  40. package/dist/{chunk-67EBF76X.js → chunk-7BWSN3SG.js} +1 -1
  41. package/dist/{chunk-GSE6FXZU.js → chunk-7DSH4CRU.js} +1 -1
  42. package/dist/{chunk-QAJZUJR5.js → chunk-7HZU7CYS.js} +1 -1
  43. package/dist/{chunk-BOE2ST6J.js → chunk-7LB6DPB6.js} +1 -1
  44. package/dist/{chunk-UQ6ALA3Y.js → chunk-7Q4EKY3E.js} +1 -1
  45. package/dist/{chunk-47IQIIFX.js → chunk-7YXHILW4.js} +2 -2
  46. package/dist/{chunk-Q43LBSPT.js → chunk-7Z6IX7MU.js} +1 -1
  47. package/dist/{chunk-VNFUCH6T.js → chunk-A4XREDFZ.js} +1 -1
  48. package/dist/{chunk-BIWG3FQQ.js → chunk-AHNLGCHF.js} +1 -1
  49. package/dist/{chunk-7VAKNVFD.js → chunk-AJMJQA4J.js} +1 -1
  50. package/dist/{chunk-XNPUZRWP.js → chunk-ANG44FIF.js} +1 -1
  51. package/dist/{chunk-QTLGMJDW.js → chunk-AODTY2BL.js} +1 -1
  52. package/dist/{chunk-CQF5NDTJ.js → chunk-ARRRFY6S.js} +1 -1
  53. package/dist/{chunk-FQL2WEKX.js → chunk-BAHM64B4.js} +1 -1
  54. package/dist/{chunk-7HNRK2CR.js → chunk-BAP2CHI2.js} +1 -1
  55. package/dist/{chunk-ZTICX3AO.js → chunk-BD2L6YE5.js} +1 -1
  56. package/dist/{chunk-Z6X2GT6Q.js → chunk-BQWK222Q.js} +1 -1
  57. package/dist/{chunk-VMNOSVPT.js → chunk-C3PXIZY3.js} +1 -1
  58. package/dist/{chunk-RUHQNF2W.js → chunk-C6HGU77I.js} +1 -1
  59. package/dist/{chunk-DMNWSUKV.js → chunk-CBFAU5AF.js} +1 -1
  60. package/dist/{chunk-R7YJNDXW.js → chunk-CEQ5S3HH.js} +1 -1
  61. package/dist/{chunk-DMDLJRLW.js → chunk-COP2Q2YT.js} +1 -1
  62. package/dist/{chunk-4IFY7V7W.js → chunk-CSWDRG3E.js} +1 -1
  63. package/dist/{chunk-RJSQMKKS.js → chunk-CVBWEUWX.js} +1 -1
  64. package/dist/{chunk-FK7GA4QQ.js → chunk-D3NVUE65.js} +1 -1
  65. package/dist/{chunk-4ZNBEMRT.js → chunk-DCKRQZLE.js} +3 -3
  66. package/dist/{chunk-MW3IMZJ5.js → chunk-DO5YFMTJ.js} +1 -1
  67. package/dist/{chunk-R74WHKHH.js → chunk-DYH3ZXJS.js} +1 -1
  68. package/dist/{chunk-TPHHQAUD.js → chunk-EAVD3OH2.js} +1 -1
  69. package/dist/{chunk-YTR5JHNJ.js → chunk-EBX6DYDX.js} +1 -1
  70. package/dist/{chunk-C6IBY7NW.js → chunk-EDRCFY3K.js} +1 -1
  71. package/dist/{chunk-UNHT4ZFP.js → chunk-EEAY7HFW.js} +1 -1
  72. package/dist/{chunk-YT27FIQN.js → chunk-EJMLNBZA.js} +2 -2
  73. package/dist/{chunk-MCNK5SJ6.js → chunk-EO3S2TFI.js} +1 -1
  74. package/dist/{chunk-UU6BRRYS.js → chunk-EO422KZZ.js} +1 -1
  75. package/dist/{chunk-J6LQR2F6.js → chunk-EOIGDOUD.js} +1 -1
  76. package/dist/{chunk-K3HUQLIC.js → chunk-EYKXHMEJ.js} +1 -1
  77. package/dist/{chunk-MUM34KUM.js → chunk-EZG5EB7D.js} +1 -1
  78. package/dist/{chunk-N55MSO3X.js → chunk-FHV2H3Z2.js} +1 -1
  79. package/dist/{chunk-LYIXRMQJ.js → chunk-FVTP7EO4.js} +1 -1
  80. package/dist/{chunk-4O7LK5RG.js → chunk-FYIC4JHB.js} +1 -1
  81. package/dist/{chunk-CLD3NZYD.js → chunk-G362JEAV.js} +1 -1
  82. package/dist/{chunk-GE4MLO3C.js → chunk-GF36WNMH.js} +1 -1
  83. package/dist/{chunk-QPQS2YU3.js → chunk-GJ3QUZO6.js} +1 -1
  84. package/dist/{chunk-LJZTSQRD.js → chunk-GJZVUEMP.js} +1 -1
  85. package/dist/{chunk-5JIJDUXX.js → chunk-GP6O7YRO.js} +1 -1
  86. package/dist/{chunk-2PDVBGQH.js → chunk-GW424AJO.js} +1 -1
  87. package/dist/{chunk-6HPUOCFF.js → chunk-GXSF6NCR.js} +1 -1
  88. package/dist/chunk-GYVQIRBD.js +1 -0
  89. package/dist/{chunk-JYGZD4HM.js → chunk-H3ZPYOQV.js} +1 -1
  90. package/dist/{chunk-RXTLNUPF.js → chunk-H7YSZKZ2.js} +1 -1
  91. package/dist/{chunk-3V4VL3SD.js → chunk-HB4YI2PF.js} +4 -4
  92. package/dist/{chunk-37BGAWAW.js → chunk-HMWQOQAQ.js} +1 -1
  93. package/dist/{chunk-HPM3HF7A.js → chunk-HNSRF4SQ.js} +1 -1
  94. package/dist/{chunk-HASIOUH2.js → chunk-HTODXNY6.js} +1 -1
  95. package/dist/{chunk-7A3RW2VM.js → chunk-HY6EXJBZ.js} +1 -1
  96. package/dist/{chunk-LLPB6JN5.js → chunk-IUYVJJKE.js} +1 -1
  97. package/dist/{chunk-KQFA5YTT.js → chunk-JM2CQP64.js} +1 -1
  98. package/dist/{chunk-43URS56H.js → chunk-JPFHPVIO.js} +1 -1
  99. package/dist/{chunk-W4KE7AO6.js → chunk-K4AF7A25.js} +1 -1
  100. package/dist/{chunk-FEQHCE2E.js → chunk-K6FH5JSY.js} +2 -2
  101. package/dist/{chunk-2YVSZFXJ.js → chunk-KDV4WR5A.js} +1 -1
  102. package/dist/{chunk-4TFJ5RW7.js → chunk-KF7NL5YM.js} +1 -1
  103. package/dist/{chunk-SZI6G247.js → chunk-KMJTO7CU.js} +1 -1
  104. package/dist/{chunk-AMLCWRHU.js → chunk-KN3MUEWA.js} +1 -1
  105. package/dist/{chunk-MMQZO2W2.js → chunk-KOS53Z7E.js} +1 -1
  106. package/dist/{chunk-MJZSSCGD.js → chunk-KYB4JX76.js} +1 -1
  107. package/dist/{chunk-PB5ZZET5.js → chunk-LCMDVUVO.js} +1 -1
  108. package/dist/{chunk-45SZ5PSE.js → chunk-LG6DGIFX.js} +1 -1
  109. package/dist/{chunk-SQAS5RVZ.js → chunk-LJAU6YHF.js} +1 -1
  110. package/dist/{chunk-YPCXVZ2N.js → chunk-LLNUIGHP.js} +1 -1
  111. package/dist/{chunk-VGBUN3CZ.js → chunk-LMQOFVRC.js} +1 -1
  112. package/dist/{chunk-Y3PY5LP7.js → chunk-LQSD25YS.js} +1 -1
  113. package/dist/{chunk-QO5RNGWA.js → chunk-M2HQFHNO.js} +1 -1
  114. package/dist/{chunk-GM4EFJJF.js → chunk-M5WBYWSQ.js} +1 -1
  115. package/dist/{chunk-NYYXH2SX.js → chunk-MF7IHOM5.js} +1 -1
  116. package/dist/{chunk-PVAZCZSY.js → chunk-MQ4WV4B6.js} +1 -1
  117. package/dist/{chunk-PO5T44H3.js → chunk-MTBABHUB.js} +1 -1
  118. package/dist/{chunk-DSS4ECIH.js → chunk-MWWULCLD.js} +1 -1
  119. package/dist/{chunk-LKXFHYLI.js → chunk-MZL6VM3W.js} +1 -1
  120. package/dist/{chunk-4JGWKUJN.js → chunk-N47RQHEI.js} +1 -1
  121. package/dist/{chunk-G7JW4UIM.js → chunk-ND6O6KT6.js} +1 -1
  122. package/dist/{chunk-CVFPY2SH.js → chunk-NHE46R6C.js} +1 -1
  123. package/dist/{chunk-QUXQM3S3.js → chunk-NRG2WPSM.js} +1 -1
  124. package/dist/{chunk-6MC2BEW4.js → chunk-O2CP7DQE.js} +1 -1
  125. package/dist/chunk-O6FXUKI2.js +2 -0
  126. package/dist/chunk-OHJUEUSA.js +1 -0
  127. package/dist/{chunk-YHESTFMZ.js → chunk-OOKTWSGP.js} +1 -1
  128. package/dist/{chunk-K7D53KSJ.js → chunk-OONMCK7X.js} +1 -1
  129. package/dist/{chunk-R3KSOCMB.js → chunk-OWK2RI4O.js} +1 -1
  130. package/dist/{chunk-PG4S5HJJ.js → chunk-P2UEQJJ4.js} +1 -1
  131. package/dist/{chunk-MW3JKGJH.js → chunk-PFXDXD5O.js} +1 -1
  132. package/dist/{chunk-IGDVKRB4.js → chunk-PIGERIRY.js} +1 -1
  133. package/dist/{chunk-UEBUGSBT.js → chunk-PT3OZEBI.js} +1 -1
  134. package/dist/{chunk-IDKRJ2F4.js → chunk-QBIYAMSH.js} +1 -1
  135. package/dist/{chunk-PHG4DASY.js → chunk-QBJ74XPX.js} +1 -1
  136. package/dist/{chunk-N5AZZYQA.js → chunk-QGFJOTOH.js} +1 -1
  137. package/dist/chunk-QLHPTMIH.js +1 -0
  138. package/dist/{chunk-4TZCRMBJ.js → chunk-QUO4RD3W.js} +1 -1
  139. package/dist/{chunk-HJHS23Q3.js → chunk-RIO5HKD5.js} +1 -1
  140. package/dist/{chunk-ENQXB532.js → chunk-RUDHGUIM.js} +1 -1
  141. package/dist/{chunk-7HWMURCW.js → chunk-RW3P3UMU.js} +2 -2
  142. package/dist/{chunk-RSC5NQAT.js → chunk-S6A7TMR4.js} +1 -1
  143. package/dist/{chunk-66YRAUWX.js → chunk-S7EKUSO6.js} +1 -1
  144. package/dist/{chunk-NGSEF3UX.js → chunk-SEXH4EP5.js} +1 -1
  145. package/dist/{chunk-ONF7XXEL.js → chunk-SJ2ROSXG.js} +1 -1
  146. package/dist/{chunk-HSYMUYEZ.js → chunk-SNTRSP5K.js} +1 -1
  147. package/dist/{chunk-NU5WLZ6Y.js → chunk-SUTVPAJF.js} +1 -1
  148. package/dist/{chunk-ALK66U3O.js → chunk-SYCN2GT2.js} +1 -1
  149. package/dist/{chunk-S36VGP37.js → chunk-T3UCIWRH.js} +1 -1
  150. package/dist/{chunk-3LHE4GIX.js → chunk-TBNEN73P.js} +1 -1
  151. package/dist/{chunk-Y743UVBS.js → chunk-TVI7TQ4C.js} +1 -1
  152. package/dist/{chunk-TVCWDEVS.js → chunk-UEQT7TA4.js} +1 -1
  153. package/dist/{chunk-7SJHVJ3W.js → chunk-UUM367NR.js} +1 -1
  154. package/dist/{chunk-XNVOKAF2.js → chunk-V5FZRNXI.js} +1 -1
  155. package/dist/{chunk-EO4YJFMY.js → chunk-VG5ZDVDQ.js} +1 -1
  156. package/dist/{chunk-EMH7OHCW.js → chunk-VNG2I7NM.js} +1 -1
  157. package/dist/{chunk-3G2ZQ2EF.js → chunk-VSFZEGIK.js} +1 -1
  158. package/dist/{chunk-PFXNBHQQ.js → chunk-VTOPYXHO.js} +1 -1
  159. package/dist/{chunk-HLPAVELJ.js → chunk-WEICJ4GW.js} +1 -1
  160. package/dist/{chunk-5BTLE67Z.js → chunk-WGO2GC6I.js} +1 -1
  161. package/dist/{chunk-GZ7VGCVW.js → chunk-WJJXJNNP.js} +1 -1
  162. package/dist/{chunk-NCRWOW6F.js → chunk-WKVFVT3H.js} +1 -1
  163. package/dist/{chunk-XGKCPD6W.js → chunk-XAQUXFN5.js} +1 -1
  164. package/dist/{chunk-RK2V6OIJ.js → chunk-XE6EUHSS.js} +1 -1
  165. package/dist/{chunk-YHCP326A.js → chunk-XFEJS652.js} +1 -1
  166. package/dist/chunk-XI4QEULN.js +1 -0
  167. package/dist/{chunk-35WQTGN3.js → chunk-XP63T4KZ.js} +1 -1
  168. package/dist/{chunk-4OCVXE5Y.js → chunk-XPDHT3Z4.js} +1 -1
  169. package/dist/{chunk-6IMHGT7F.js → chunk-XRCAUZAZ.js} +1 -1
  170. package/dist/{chunk-Y62EMOQA.js → chunk-XSRZWJIJ.js} +1 -1
  171. package/dist/{chunk-F3PZGSOY.js → chunk-XTOOTN4P.js} +1 -1
  172. package/dist/{chunk-LWU5TKNA.js → chunk-XVFQ6CNO.js} +1 -1
  173. package/dist/{chunk-NT4A37HG.js → chunk-Y5VFOLNQ.js} +1 -1
  174. package/dist/{chunk-J4NBPC57.js → chunk-YFJELEVH.js} +1 -1
  175. package/dist/{chunk-6YDLNP4G.js → chunk-YIZAQABE.js} +1 -1
  176. package/dist/{chunk-Q2XLIWG4.js → chunk-YLCYRG2T.js} +1 -1
  177. package/dist/{chunk-A2VCTDKH.js → chunk-YN4FSUFF.js} +1 -1
  178. package/dist/{chunk-4O5GQ3DS.js → chunk-YNJIDLI3.js} +1 -1
  179. package/dist/{chunk-NCVGCVQ5.js → chunk-YRX4E67D.js} +1 -1
  180. package/dist/{chunk-HQY6JM6G.js → chunk-Z2NL6XQK.js} +1 -1
  181. package/dist/{chunk-J4J2YXH3.js → chunk-Z4DESIR5.js} +1 -1
  182. package/dist/{chunk-4ES7BJEK.js → chunk-Z6Z5DPKS.js} +1 -1
  183. package/dist/{chunk-XSMCQLJW.js → chunk-ZOE6WXW6.js} +1 -1
  184. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  185. package/dist/cli/commands/app/build.js +1 -1
  186. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  187. package/dist/cli/commands/app/bulk/execute.js +1 -1
  188. package/dist/cli/commands/app/bulk/status.js +1 -1
  189. package/dist/cli/commands/app/config/link.js +1 -1
  190. package/dist/cli/commands/app/config/pull.js +1 -1
  191. package/dist/cli/commands/app/config/use.js +1 -1
  192. package/dist/cli/commands/app/config/validate.js +1 -1
  193. package/dist/cli/commands/app/demo/watcher.js +1 -1
  194. package/dist/cli/commands/app/deploy.js +1 -1
  195. package/dist/cli/commands/app/dev/clean.js +1 -1
  196. package/dist/cli/commands/app/dev.js +1 -1
  197. package/dist/cli/commands/app/env/pull.js +1 -1
  198. package/dist/cli/commands/app/env/show.js +1 -1
  199. package/dist/cli/commands/app/execute.js +1 -1
  200. package/dist/cli/commands/app/function/build.js +1 -1
  201. package/dist/cli/commands/app/function/info.js +1 -1
  202. package/dist/cli/commands/app/function/replay.js +1 -1
  203. package/dist/cli/commands/app/function/run.js +1 -1
  204. package/dist/cli/commands/app/function/schema.js +1 -1
  205. package/dist/cli/commands/app/function/typegen.js +1 -1
  206. package/dist/cli/commands/app/generate/extension.js +1 -1
  207. package/dist/cli/commands/app/graphiql.js +1 -1
  208. package/dist/cli/commands/app/import/channel-config.js +1 -1
  209. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  210. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  211. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  212. package/dist/cli/commands/app/import-extensions.js +1 -1
  213. package/dist/cli/commands/app/info.js +1 -1
  214. package/dist/cli/commands/app/init.js +1 -1
  215. package/dist/cli/commands/app/logs.js +1 -1
  216. package/dist/cli/commands/app/release.js +1 -1
  217. package/dist/cli/commands/app/security/check.js +1 -1
  218. package/dist/cli/commands/app/security/clean.js +1 -1
  219. package/dist/cli/commands/app/security/instructions.js +1 -1
  220. package/dist/cli/commands/app/security/record.js +1 -1
  221. package/dist/cli/commands/app/security/review.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  226. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  227. package/dist/cli/commands/app/versions/list.js +1 -1
  228. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  229. package/dist/cli/commands/auth/login.js +1 -1
  230. package/dist/cli/commands/auth/logout.js +1 -1
  231. package/dist/cli/commands/cache/clear.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  234. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  235. package/dist/cli/commands/debug/command-flags.js +1 -1
  236. package/dist/cli/commands/doc/fetch.js +1 -1
  237. package/dist/cli/commands/doc/search.js +1 -1
  238. package/dist/cli/commands/docs/generate.js +1 -1
  239. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  240. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  241. package/dist/cli/commands/help.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  245. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  246. package/dist/cli/commands/notifications/generate.js +1 -1
  247. package/dist/cli/commands/notifications/list.js +1 -1
  248. package/dist/cli/commands/organization/list.js +1 -1
  249. package/dist/cli/commands/search.js +1 -1
  250. package/dist/cli/commands/send-analytics.js +1 -1
  251. package/dist/cli/commands/theme/check.js +1 -1
  252. package/dist/cli/commands/theme/console.js +1 -1
  253. package/dist/cli/commands/theme/delete.js +1 -1
  254. package/dist/cli/commands/theme/dev.js +1 -1
  255. package/dist/cli/commands/theme/duplicate.js +1 -1
  256. package/dist/cli/commands/theme/info.js +1 -1
  257. package/dist/cli/commands/theme/init.js +1 -1
  258. package/dist/cli/commands/theme/language-server.js +1 -1
  259. package/dist/cli/commands/theme/list.js +1 -1
  260. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  261. package/dist/cli/commands/theme/open.js +1 -1
  262. package/dist/cli/commands/theme/package.js +1 -1
  263. package/dist/cli/commands/theme/preview.js +1 -1
  264. package/dist/cli/commands/theme/profile.js +1 -1
  265. package/dist/cli/commands/theme/publish.js +1 -1
  266. package/dist/cli/commands/theme/pull.js +1 -1
  267. package/dist/cli/commands/theme/push.js +1 -1
  268. package/dist/cli/commands/theme/rename.js +1 -1
  269. package/dist/cli/commands/theme/share.js +1 -1
  270. package/dist/cli/commands/upgrade.js +1 -1
  271. package/dist/cli/commands/version.js +1 -1
  272. package/dist/cli/help.js +1 -1
  273. package/dist/{command-json-schema-SS4GDJTQ.js → command-json-schema-3RP5P43D.js} +1 -1
  274. package/dist/command-registry.js +1 -1
  275. package/dist/{conf-store-54YJCIDK.js → conf-store-XORTWCKZ.js} +1 -1
  276. package/dist/{custom-oclif-loader-3UBH7Q7R.js → custom-oclif-loader-ZRYPPYIP.js} +1 -1
  277. package/dist/{deprecations-ZX7ZKF6L.js → deprecations-AZDMCRNN.js} +1 -1
  278. package/dist/dist-DTBXLVHF.js +1 -0
  279. package/dist/dist-SOYIDACZ.js +1 -0
  280. package/dist/environments-L42SEHB4.js +1 -0
  281. package/dist/{error-AA6LW3PN.js → error-H6B5BHYC.js} +1 -1
  282. package/dist/error-handler-JB752NKM.js +1 -0
  283. package/dist/{fs-4QZCAEP7.js → fs-XHZY6MNM.js} +1 -1
  284. package/dist/hooks/did-you-mean.js +1 -1
  285. package/dist/hooks/hydrogen-init.js +1 -1
  286. package/dist/hooks/postrun.js +1 -1
  287. package/dist/hooks/prerun.js +1 -1
  288. package/dist/hooks/public-metadata.js +1 -1
  289. package/dist/hooks/sensitive-metadata.js +1 -1
  290. package/dist/hooks/tunnel-provider.js +1 -1
  291. package/dist/hooks/tunnel-start.js +1 -1
  292. package/dist/index.js +1 -1
  293. package/dist/{is-global-FKG327CG.js → is-global-2NBDZWLC.js} +1 -1
  294. package/dist/{json-error-32ETFU3V.js → json-error-OHV2KQFY.js} +1 -1
  295. package/dist/{local-R3UAQN7T.js → local-ZZGRGYUP.js} +1 -1
  296. package/dist/{metadata-JWJG4JV4.js → metadata-YQNVKC2R.js} +1 -1
  297. package/dist/{node-package-manager-M4XHUTQR.js → node-package-manager-LN2Y7FQ2.js} +1 -1
  298. package/dist/notifications-system-HWJ3F44U.js +1 -0
  299. package/dist/{os-FEHBQQKP.js → os-MHOCCDIB.js} +1 -1
  300. package/dist/{output-2LS5AOAH.js → output-GILH4S6M.js} +1 -1
  301. package/dist/{system-TMD2LYZM.js → system-6WYK24ET.js} +1 -1
  302. package/dist/tsconfig.tsbuildinfo +1 -1
  303. package/dist/{ui-FNPICAAH.js → ui-RP6SVJUK.js} +1 -1
  304. package/dist/upgrade-5G7FBJJV.js +1 -0
  305. package/dist/version-TOBC7X2C.js +1 -0
  306. package/dist/version-UIRCT6RC.js +1 -0
  307. package/dist/{workerd-TKVRZK2F.js → workerd-ARH2OCYL.js} +1 -1
  308. package/oclif.manifest.json +1 -1
  309. package/package.json +7 -7
  310. package/dist/analytics-APDNTBDE.js +0 -1
  311. package/dist/analytics-LX52KYSE.js +0 -1
  312. package/dist/chunk-3C4WVKSO.js +0 -6
  313. package/dist/chunk-BQ3U3CQV.js +0 -1
  314. package/dist/chunk-GN66BRYF.js +0 -1
  315. package/dist/chunk-KTD7VLHL.js +0 -2
  316. package/dist/chunk-L4DFMMOI.js +0 -1
  317. package/dist/chunk-PWS4VFSD.js +0 -1
  318. package/dist/chunk-XUUIBSLW.js +0 -1
  319. package/dist/dist-JMNE7MP6.js +0 -1
  320. package/dist/dist-M2AXGBOL.js +0 -1
  321. package/dist/environments-KD2IDYPG.js +0 -1
  322. package/dist/error-handler-4VW3AV2G.js +0 -1
  323. package/dist/notifications-system-QVM2JWKB.js +0 -1
  324. package/dist/upgrade-YYPP5VZY.js +0 -1
  325. package/dist/version-OX3MORI6.js +0 -1
  326. package/dist/version-P7D5ME4Z.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as B,j as C,m as P}from"./chunk-SZI6G247.js";import{e as U,f as _}from"./chunk-LYIXRMQJ.js";import{e as g}from"./chunk-QO5RNGWA.js";import{l as v,m as w}from"./chunk-3LHE4GIX.js";import{ra as E}from"./chunk-3V4VL3SD.js";import{Nb as m}from"./chunk-UWI76E2L.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
1
+ import{a as B,j as C,m as P}from"./chunk-KMJTO7CU.js";import{e as U,f as _}from"./chunk-FVTP7EO4.js";import{e as g}from"./chunk-M2HQFHNO.js";import{l as v,m as w}from"./chunk-TBNEN73P.js";import{ra as E}from"./chunk-HB4YI2PF.js";import{Nb as m}from"./chunk-62GA7XR3.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
2
2
  `);_(f.key,"delete")(new Error(`Failed to delete ${f.key}: ${y}`))}}),c.current+=k.length});u.push(a)}let h=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:h}}function L(t,e){let s=e.applyIgnoreFilters(t).filter(o=>!e.files.has(o.key));return m(`Files to be deleted:
3
3
  ${s.map(o=>`-${o.key}`).join(`
4
4
  `)}`),s}function x(t){let e=P(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configStylesheetFiles,...e.documentationFiles,...e.configSchemaFile,...e.staticAssetFiles]}var D=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function R(t,e,r){let s=new Set(r.map(l=>l.key)),o=D.filter(({key:l})=>!s.has(l));o.length>0&&await w(t.id,o,e)}function q(t,e,r,s,o){let l=S(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=I(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(z(a).map(d=>N(d,e,s,r.id,o).then(()=>{c.current+=d.length,d.forEach(f=>e.unsyncedFileKeys.delete(f.key))}))).then(()=>{}),h=i.reduce((a,d)=>a.then(()=>u(d)),Promise.resolve()),p=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([h,p]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function S(t,e){let r=K(t),s=t.applyIgnoreFilters(r),o=new Map(e.map(n=>[n.key,n])),l=s.filter(n=>{let i=o.get(n.key);return!i||i.checksum!==n.checksum});return m(`Files to be uploaded:
@@ -1,3 +1,3 @@
1
- import{a as ne}from"./chunk-7556AIVG.js";import{d as ie}from"./chunk-NU5WLZ6Y.js";import{a as se,b as q}from"./chunk-4ZNBEMRT.js";import{B as C,K as L,pa as V,ra as U,sa as X,u as w}from"./chunk-3V4VL3SD.js";import{e as x}from"./chunk-QTLGMJDW.js";import{A as N,B as I,E as re,a as Q,x as te}from"./chunk-47IQIIFX.js";import{b as K}from"./chunk-HILYTMVA.js";import{d as Z,e as ee}from"./chunk-DSS4ECIH.js";import{i as F,l as oe}from"./chunk-Q37WAD6F.js";import{Cb as R,Eb as l,Ja as W,Nb as h,Ya as _}from"./chunk-UWI76E2L.js";import{b as Ie}from"./chunk-I3J63RFV.js";import{c as Y,e as k,h as J,p as $}from"./chunk-6IDEDOXW.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?W(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${J(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function j(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function D(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function M(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function B(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),j().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),j().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),j().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),D().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),D().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),D().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),M().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),M().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),M().delete(e)}function v(t=S()){let e=B(t);if(!e)throw new oe("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??B();if(!e)throw V(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(O.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var G="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${G}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function H(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${G}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=H(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=H(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=H(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var z=class extends q{static baseFlags={...q.baseFlags,...ie};environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(se(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await ne(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),re(s)}async runConcurrent(e){let o=new Q,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await te({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
1
+ import{a as ne}from"./chunk-5O7JTVO2.js";import{d as ie}from"./chunk-SUTVPAJF.js";import{a as se,b as q}from"./chunk-DCKRQZLE.js";import{B as C,K as L,pa as V,ra as U,sa as X,u as w}from"./chunk-HB4YI2PF.js";import{e as x}from"./chunk-AODTY2BL.js";import{A as N,B as I,E as re,a as Q,x as te}from"./chunk-7YXHILW4.js";import{b as K}from"./chunk-HILYTMVA.js";import{d as Z,e as ee}from"./chunk-MWWULCLD.js";import{i as F,l as oe}from"./chunk-4HBKQUKY.js";import{Cb as R,Eb as l,Ja as W,Nb as h,Ya as _}from"./chunk-62GA7XR3.js";import{b as Ie}from"./chunk-I3J63RFV.js";import{c as Y,e as k,h as J,p as $}from"./chunk-6IDEDOXW.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?W(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${J(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>$(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function j(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function D(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function M(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function B(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),j().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),j().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),j().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),D().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),D().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),D().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),M().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),M().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),M().delete(e)}function v(t=S()){let e=B(t);if(!e)throw new oe("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??B();if(!e)throw V(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(O.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],mt=50;f();f();var G="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${G}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function $e(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function Pe(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function H(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${G}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=H(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=H(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=H(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var z=class extends q{static baseFlags={...q.baseFlags,...ie};environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(se(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await ne(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),re(s)}async runConcurrent(e){let o=new Q,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await te({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
2
2
 
3
3
  ${A.message}`,I({body:[A.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(i=>!i.some(s=>s.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await L(r,n):o??await this.storeAuthSessionForTheme({store:r})??await L(r,n)}async storeAuthSessionForTheme(e){let o=this.storeAuthScopes();if(!o)return;let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!r||n)return;let i=w(r),s=Ae(i);if(s)return this.adminSessionFromStoreAuthSession(s,i,o)}storeAuthSessionsForTheme(e){let o=this.storeAuthScopes();if(!o)return new Map;let r=new Set(e.filter(({store:n,password:i})=>typeof n=="string"&&!i).map(({store:n})=>w(n)));return r.size===0?new Map:new Map(we().map(n=>{let i=w(n.store);if(!r.has(i))return;let s=this.adminSessionFromStoreAuthSession(n,i,o);return s?[i,s]:void 0}).filter(n=>n!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(w(r))}adminSessionFromStoreAuthSession(e,o,r){if(ve(e)){h(`Ignoring stored store auth session for ${o}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){h(`Ignoring stored store auth session for ${o}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return h(`Using stored store auth session for ${o} (scopes: ${e.scopes.join(", ")}).`),C(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e,o){let r=this.expandImpliedStoreAuthScopes(e);return o.every(n=>r.has(n))}validConfig(e,o,r,n){let i=o.filter(s=>Array.isArray(s)?!s.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,s,n)).map(s=>Array.isArray(s)?s.join(" or "):s);return i.length>0?(N({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:i}}]}),i):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Y($(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=X();await Z(()=>({store_fqdn_hash:K(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ee(()=>({store_fqdn:e.storeFqdn}))}};export{G as a,we as b,Ae as c,wt as d,At as e,B as f,He as g,ze as h,Ye as i,Je as j,We as k,Ke as l,Qe as m,Ve as n,Xe as o,O as p,qe as q,le as r,ct as s,ut as t,mt as u,z as v};
@@ -1 +1 @@
1
- import{c as p}from"./chunk-3LHE4GIX.js";import{ra as i}from"./chunk-3V4VL3SD.js";import{A as f,B as d,E as m,H as l,V as a}from"./chunk-47IQIIFX.js";import{i as s}from"./chunk-Q37WAD6F.js";import{b as c}from"./chunk-L4DFMMOI.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();function h(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function $(e){return{list:{items:e.map(h)}}}async function T(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return d({headline:o?`Environment: ${o}`:"",body:r}),!1;if(f({body:r}),c())throw new s("This command must run from a theme directory when user input is unavailable.","Run the command from a theme directory, or use `--force` to continue.");if(!a())return!0;let t=await m({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function C(e,r,o){if(e.role!==p||o)return!0;if(!a())throw new s(`Can't ${r} on the live theme when user input is unavailable.`,"Use `--allow-live` to confirm that you want to continue.");let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await m({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function x(e,r,o=!1){e.length>0&&await l(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{h as a,$ as b,T as c,C as d,x as e};
1
+ import{c as p}from"./chunk-TBNEN73P.js";import{ra as i}from"./chunk-HB4YI2PF.js";import{A as f,B as d,E as m,H as l,V as a}from"./chunk-7YXHILW4.js";import{i as s}from"./chunk-4HBKQUKY.js";import{b as c}from"./chunk-QLHPTMIH.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();function h(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function $(e){return{list:{items:e.map(h)}}}async function T(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return d({headline:o?`Environment: ${o}`:"",body:r}),!1;if(f({body:r}),c())throw new s("This command must run from a theme directory when user input is unavailable.","Run the command from a theme directory, or use `--force` to continue.");if(!a())return!0;let t=await m({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function C(e,r,o){if(e.role!==p||o)return!0;if(!a())throw new s(`Can't ${r} on the live theme when user input is unavailable.`,"Use `--allow-live` to confirm that you want to continue.");let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await m({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function x(e,r,o=!1){e.length>0&&await l(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{h as a,$ as b,T as c,C as d,x as e};
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-PWS4VFSD.js";import{a as D}from"./chunk-PO5T44H3.js";import{Aa as m,Ba as _,Ha as L}from"./chunk-UNHT4ZFP.js";import{b as A,c as $}from"./chunk-NU5WLZ6Y.js";import{A as R,z as F}from"./chunk-47IQIIFX.js";import{a as S}from"./chunk-7VAKNVFD.js";import{i}from"./chunk-Q37WAD6F.js";import{Aa as N,Ib as v,Xa as T,b as s,fb as O,ya as C}from"./chunk-UWI76E2L.js";import{b as Y}from"./chunk-I3J63RFV.js";import{c as l,f as d,h as b,i as E}from"./chunk-6IDEDOXW.js";import{e as H,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function j({remoteApp:o,developerPlatformClient:e}){let t=await e.channelSpecExport(o);if(t.status===404)throw new i("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!t.ok){let r=typeof t.body?.reason=="string"?t.body.reason:void 0;if(t.status===426)throw new i(`Failed to fetch the channel spec export: ${r??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(t.status===422)return{success:!1,reason:r??`http_${t.status}`};throw t.status===401||t.status===403?new i(`Failed to fetch the channel spec export: authentication failed (status ${t.status}).`,"Run `shopify auth logout` and try again."):new i(`Failed to fetch the channel spec export: the server responded with status ${t.status}.`,"Try again in a moment.")}let{handle:a,filename:p,toml:h,warnings:n}=t.body;if(typeof a!="string"||typeof p!="string"||typeof h!="string")throw new i("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:a,filename:p,toml:h,warnings:J(n)}}function J(o){return Array.isArray(o)?o.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var k=s.object({code:s.string(),message:s.string()}),w=S({name:"ImportChannelConfigResult",schema:s.object({handle:s.string(),filename:s.string(),path:s.string(),toml:s.string(),warnings:s.array(k)}),definitions:{ChannelSpecExportWarning:k}});var u=l("extensions","channel-config"),pe=l(u,_),x="shopify.extension.toml",G=`name = "Channel config"
1
+ import{a as P}from"./chunk-5SLKHURV.js";import{a as D}from"./chunk-MTBABHUB.js";import{Aa as m,Ba as _,Ha as L}from"./chunk-EEAY7HFW.js";import{b as A,c as $}from"./chunk-SUTVPAJF.js";import{A as R,z as F}from"./chunk-7YXHILW4.js";import{a as S}from"./chunk-AJMJQA4J.js";import{i}from"./chunk-4HBKQUKY.js";import{Aa as N,Ib as v,Xa as T,b as s,fb as O,ya as C}from"./chunk-62GA7XR3.js";import{b as Y}from"./chunk-I3J63RFV.js";import{c as l,f as d,h as b,i as E}from"./chunk-6IDEDOXW.js";import{e as H,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function j({remoteApp:o,developerPlatformClient:e}){let t=await e.channelSpecExport(o);if(t.status===404)throw new i("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!t.ok){let r=typeof t.body?.reason=="string"?t.body.reason:void 0;if(t.status===426)throw new i(`Failed to fetch the channel spec export: ${r??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(t.status===422)return{success:!1,reason:r??`http_${t.status}`};throw t.status===401||t.status===403?new i(`Failed to fetch the channel spec export: authentication failed (status ${t.status}).`,"Run `shopify auth logout` and try again."):new i(`Failed to fetch the channel spec export: the server responded with status ${t.status}.`,"Try again in a moment.")}let{handle:a,filename:p,toml:h,warnings:n}=t.body;if(typeof a!="string"||typeof p!="string"||typeof h!="string")throw new i("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:a,filename:p,toml:h,warnings:J(n)}}function J(o){return Array.isArray(o)?o.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var k=s.object({code:s.string(),message:s.string()}),w=S({name:"ImportChannelConfigResult",schema:s.object({handle:s.string(),filename:s.string(),path:s.string(),toml:s.string(),warnings:s.array(k)}),definitions:{ChannelSpecExportWarning:k}});var u=l("extensions","channel-config"),pe=l(u,_),x="shopify.extension.toml",G=`name = "Channel config"
2
2
  type = "${m}"
3
3
  handle = "channel-config"
4
4
  `,X=["extensions/*"],z={no_exportable_frozen_record:"This app doesn't have a channel spec that can be exported yet.",multiple_exportable_records:"This app has more than one channel spec, so it can't be exported automatically.",not_allowlisted:"This app isn't part of the channel spec export prototype yet.",contains_no_public_fields:"This app's channel spec has no public channel_config fields.",invalid_public_schema:"This app's channel spec doesn't match the public channel_config schema."};async function M(o){let{app:e,remoteApp:t,developerPlatformClient:a,force:p,json:h}=o,n=await j({remoteApp:t,developerPlatformClient:a});if(!n.success){let g=z[n.reason];throw g?new i(g):new i(`The channel spec for this app could not be exported (reason: ${n.reason}).`)}let{extensionDirectory:r,createExtension:y}=B(e),f=l(r,_,E(n.filename));if(!p&&await T(f))throw new i(`A channel spec already exists at ${d(e.directory,f)}.`,"Re-run with `--force` to replace it.");if(await N(b(f)),y&&await C(l(r,x),G),await C(f,n.toml),h){v(w.encode({handle:n.handle,filename:E(n.filename),path:d(e.directory,f),toml:n.toml,warnings:n.warnings}));return}n.warnings.forEach(g=>R({body:g.message})),F({headline:["Imported the channel spec for",{userInput:t.title},{char:"."}],body:["The spec was written to",{filePath:d(e.directory,f)},{char:"."},...y?["Also created",{filePath:d(e.directory,l(r,x))},"so the spec is included when your app is deployed."]:[]],nextSteps:["Review the generated spec and make any changes your channel needs.",["Run",{command:"shopify app dev"},"to try the spec on a development store before releasing it."],["Run",{command:"shopify app deploy"},"to deploy the spec as part of your app."]]})}function B(o){let e=o.allExtensions.filter(r=>r.type===m);if(e.length>1){let r=e.map(y=>d(o.directory,y.directory)).join(", ");throw new i(`This app has more than one ${m} extension (${r}).`,"Only one is allowed. Remove the extras and try again.")}if(e.length===1)return{extensionDirectory:e[0].directory,createExtension:!1};let t=o.configuration.extension_directories,a=t&&t.length>0?t:X;if(!a.some(r=>O(`${u}/${x}`,`${r}/*.extension.toml`)))throw new i(`Your shopify.app.toml only loads extensions from ${a.join(", ")}, so a new extension at ${u} wouldn't be deployed.`,`Create a ${m} extension in one of those directories with a ${x} like:
@@ -1 +1 @@
1
- import{P as B}from"./chunk-3V4VL3SD.js";import{u as O}from"./chunk-47IQIIFX.js";import{J as w,j as m}from"./chunk-UWI76E2L.js";import{c as g,e as s,g as o}from"./chunk-VKWPEFWQ.js";var f=g((Q,c)=>{o();function j(r,e,t,n){for(var a=-1,i=r==null?0:r.length;++a<i;){var u=r[a];e(n,u,t(u),r)}return n}c.exports=j});var A=g((S,h)=>{o();var l=O();function E(r,e,t,n){return l(r,function(a,i,u){e(n,a,t(a),u)}),n}h.exports=E});var p=g((U,q)=>{o();var G=f(),I=A(),V=w(),C=m();function D(r,e){return function(t,n){var a=C(t)?G:I,i=e?e():{};return a(t,r,V(n,2),i)}}q.exports=D});var x=g((X,v)=>{o();var F=B(),H=p(),J=Object.prototype,K=J.hasOwnProperty,L=H(function(r,e,t){K.call(r,t)?r[t].push(e):F(r,t,[e])});v.exports=L});var y=g((Z,b)=>{o();var M=p(),N=M(function(r,e,t){r[t?0:1].push(e)},function(){return[[],[]]});b.exports=N});o();var P=s(x()),d=s(y());function $(r,e){return(0,P.default)(r,e)}function k(r,e){return(0,d.default)(r,e)}export{$ as a,k as b};
1
+ import{P as B}from"./chunk-HB4YI2PF.js";import{u as O}from"./chunk-7YXHILW4.js";import{J as w,j as m}from"./chunk-62GA7XR3.js";import{c as g,e as s,g as o}from"./chunk-VKWPEFWQ.js";var f=g((Q,c)=>{o();function j(r,e,t,n){for(var a=-1,i=r==null?0:r.length;++a<i;){var u=r[a];e(n,u,t(u),r)}return n}c.exports=j});var A=g((S,h)=>{o();var l=O();function E(r,e,t,n){return l(r,function(a,i,u){e(n,a,t(a),u)}),n}h.exports=E});var p=g((U,q)=>{o();var G=f(),I=A(),V=w(),C=m();function D(r,e){return function(t,n){var a=C(t)?G:I,i=e?e():{};return a(t,r,V(n,2),i)}}q.exports=D});var x=g((X,v)=>{o();var F=B(),H=p(),J=Object.prototype,K=J.hasOwnProperty,L=H(function(r,e,t){K.call(r,t)?r[t].push(e):F(r,t,[e])});v.exports=L});var y=g((Z,b)=>{o();var M=p(),N=M(function(r,e,t){r[t?0:1].push(e)},function(){return[[],[]]});b.exports=N});o();var P=s(x()),d=s(y());function $(r,e){return(0,P.default)(r,e)}function k(r,e){return(0,d.default)(r,e)}export{$ as a,k as b};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-ENQXB532.js";import{b as s}from"./chunk-4ZNBEMRT.js";import{ya as i}from"./chunk-3V4VL3SD.js";import{b as m}from"./chunk-I3J63RFV.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
1
+ import{b as a}from"./chunk-RUDHGUIM.js";import{b as s}from"./chunk-DCKRQZLE.js";import{ya as i}from"./chunk-HB4YI2PF.js";import{b as m}from"./chunk-I3J63RFV.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
@@ -1 +1 @@
1
- import{u as r}from"./chunk-3V4VL3SD.js";import{b as o}from"./chunk-I3J63RFV.js";import{e as t,p as n}from"./chunk-6IDEDOXW.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
1
+ import{u as r}from"./chunk-HB4YI2PF.js";import{b as o}from"./chunk-I3J63RFV.js";import{e as t,p as n}from"./chunk-6IDEDOXW.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
@@ -1 +1 @@
1
- import{g as b}from"./chunk-UEBUGSBT.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-4VW3AV2G.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
1
+ import{g as b}from"./chunk-PT3OZEBI.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-JB752NKM.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-ENQXB532.js";import{b as i}from"./chunk-4ZNBEMRT.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
1
+ import{a as n}from"./chunk-RUDHGUIM.js";import{b as i}from"./chunk-DCKRQZLE.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
@@ -1,2 +1,2 @@
1
- import{Nb as d}from"./chunk-UWI76E2L.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as m}from"child_process";function b(n=process.pid,s="SIGTERM",e=!0,i){$(n,s,e,i??(t=>{t&&d(`Failed to kill process ${n}: ${t}`)}))}function $(n,s,e,i){let o=typeof n=="number"?n.toString():n;if(!/^\d+$/.test(o)){i(new Error("pid must be a number"));return}let t={};t[o]=[];let r=new Set;switch(r.add(o),process.platform){case"win32":{m("taskkill",["/pid",o,"/T","/F"]).on("close",f=>{f===0?i():i(new Error(`taskkill exited with code ${f}`))});break}case"darwin":h(o,t,r,function(c){return m("pgrep",["-lfP",c])},function(){k(t,s,o,e,i)});break;default:h(o,t,r,function(c){return m("ps",["-o","pid command","--no-headers","--ppid",c])},function(){k(t,s,o,e,i)});break}}function k(n,s,e,i,o){let t=new Set;try{Object.keys(n).forEach(function(r){n[r].forEach(function(c){t.has(c)||(w(c,s),t.add(c))}),r===e&&i&&!t.has(r)&&(w(r,s),t.add(r))})}catch(r){o(r);return}o()}function w(n,s){try{process.kill(parseInt(n,10),s)}catch(e){if(e.code!=="ESRCH")throw e}}function h(n,s,e,i,o){let t=i(n),r="";t.stdout?.on("data",function(f){let a=f.toString("ascii");r+=a});let c=f=>{if(e.delete(n),f!==0){if(e.size===0){o();return}return}r.trim().split(`
1
+ import{Nb as d}from"./chunk-62GA7XR3.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as m}from"child_process";function b(n=process.pid,s="SIGTERM",e=!0,i){$(n,s,e,i??(t=>{t&&d(`Failed to kill process ${n}: ${t}`)}))}function $(n,s,e,i){let o=typeof n=="number"?n.toString():n;if(!/^\d+$/.test(o)){i(new Error("pid must be a number"));return}let t={};t[o]=[];let r=new Set;switch(r.add(o),process.platform){case"win32":{m("taskkill",["/pid",o,"/T","/F"]).on("close",f=>{f===0?i():i(new Error(`taskkill exited with code ${f}`))});break}case"darwin":h(o,t,r,function(c){return m("pgrep",["-lfP",c])},function(){k(t,s,o,e,i)});break;default:h(o,t,r,function(c){return m("ps",["-o","pid command","--no-headers","--ppid",c])},function(){k(t,s,o,e,i)});break}}function k(n,s,e,i,o){let t=new Set;try{Object.keys(n).forEach(function(r){n[r].forEach(function(c){t.has(c)||(w(c,s),t.add(c))}),r===e&&i&&!t.has(r)&&(w(r,s),t.add(r))})}catch(r){o(r);return}o()}function w(n,s){try{process.kill(parseInt(n,10),s)}catch(e){if(e.code!=="ESRCH")throw e}}function h(n,s,e,i,o){let t=i(n),r="";t.stdout?.on("data",function(f){let a=f.toString("ascii");r+=a});let c=f=>{if(e.delete(n),f!==0){if(e.size===0){o();return}return}r.trim().split(`
2
2
  `).forEach(function(a){let l=a.match(/^(\d+)\s(.*)$/);if(l){let u=l[1],E=l[2];s[n].push(u),s[u]=[],d(`Killing process ${u}: ${E}`),e.add(u),h(u,s,e,i,o)}})};t.on("close",c)}export{b as a};
@@ -1 +1 @@
1
- import{b as f,c as r,d as h}from"./chunk-NCVGCVQ5.js";import{a as l}from"./chunk-PWS4VFSD.js";import{a as c}from"./chunk-PO5T44H3.js";import{Ha as m}from"./chunk-UNHT4ZFP.js";import{b as d}from"./chunk-NU5WLZ6Y.js";import{Kb as e}from"./chunk-UWI76E2L.js";import{i as n}from"./chunk-B4OMIONW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var s=class g extends l{static summary="Watch and prints out changes to an app.";static hidden=!0;static flags={...d,...c};async run(){let{flags:t}=await this.parse(g),{app:o}=await m({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=new h(o);return await i.start(),e(`Watching for changes in ${o.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(a=>{switch(a.type){case r.Created:e(` \u2705 Extension created - ${n.green(a.extension.handle)}`);break;case r.Deleted:e(` \u274C Extension deleted: ${n.red(a.extension.handle)}`);break;case r.Updated:e(` \u{1F504} Updated: ${n.yellow(a.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:o}}};export{s as a};
1
+ import{b as f,c as r,d as h}from"./chunk-YRX4E67D.js";import{a as l}from"./chunk-5SLKHURV.js";import{a as c}from"./chunk-MTBABHUB.js";import{Ha as m}from"./chunk-EEAY7HFW.js";import{b as d}from"./chunk-SUTVPAJF.js";import{Kb as e}from"./chunk-62GA7XR3.js";import{i as n}from"./chunk-B4OMIONW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var s=class g extends l{static summary="Watch and prints out changes to an app.";static hidden=!0;static flags={...d,...c};async run(){let{flags:t}=await this.parse(g),{app:o}=await m({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=new h(o);return await i.start(),e(`Watching for changes in ${o.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(a=>{switch(a.type){case r.Created:e(` \u2705 Extension created - ${n.green(a.extension.handle)}`);break;case r.Deleted:e(` \u274C Extension deleted: ${n.red(a.extension.handle)}`);break;case r.Updated:e(` \u{1F504} Updated: ${n.yellow(a.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:o}}};export{s as a};
@@ -1,3 +1,3 @@
1
- import{a as L,b as g,d as P,g as w}from"./chunk-PB5ZZET5.js";import{a as A}from"./chunk-4OCVXE5Y.js";import{t as G}from"./chunk-BVB3DTNE.js";import{a as F}from"./chunk-PWS4VFSD.js";import{a as S}from"./chunk-PO5T44H3.js";import{b as v,e as b}from"./chunk-NU5WLZ6Y.js";import{p as l,u as d}from"./chunk-3V4VL3SD.js";import{N as u,a as c}from"./chunk-47IQIIFX.js";import{Cb as f,Eb as h,Kb as i,Ob as y}from"./chunk-UWI76E2L.js";import{b as q}from"./chunk-I3J63RFV.js";import{e as Q,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();import{randomBytes as x}from"crypto";function K(){return x(32).toString("hex")}function C(e){let r=new URL(`http://localhost:${e.port}/graphiql`);return r.searchParams.set("key",e.key),e.query&&r.searchParams.set("query",e.query),e.variables&&r.searchParams.set("variables",e.variables),e.apiVersion&&r.searchParams.set("api_version",e.apiVersion),r.toString()}async function I(e){let r=await A(e.port),t=g({stdout:e.stdout??process.stdout,port:r,storeFqdn:e.storeFqdn,tokenProvider:e.tokenProvider,key:e.key,appContext:e.appContext,protectMutations:e.protectMutations}),a=C({port:r,key:e.key,query:e.query,variables:e.variables,apiVersion:e.apiVersion});try{i(h`GraphiQL is running at ${f.link(a)}`),e.additionalReadyMessages?.forEach(s=>i(s)),i("Press Ctrl+C to stop."),await u(a)||y("Browser did not open automatically. Open the URL above manually."),await T(e.abortSignal)}finally{t.close()}}async function T(e){let r=new c,t=()=>r.abort();process.once("SIGINT",t);try{await new Promise(a=>{if(r.signal.aborted||e?.aborted){a();return}r.signal.addEventListener("abort",()=>a(),{once:!0}),e?.addEventListener("abort",()=>r.abort(),{once:!0})})}finally{process.removeListener("SIGINT",t)}}async function k(e){let r=e.remoteApp.apiSecretKeys[0]?.secret??"",t=L(void 0,r,e.store),a=w({apiKey:e.remoteApp.apiKey,apiSecret:r,storeFqdn:e.store}),m=await l(),s=P(e.store,e.remoteApp.apiKey,m);await I({port:e.port,storeFqdn:e.store,tokenProvider:a,key:t,appContext:{appName:e.remoteApp.title,appUrl:s,apiSecret:r},variables:e.variables,apiVersion:e.apiVersion,abortSignal:e.abortSignal})}var n=Q(q(),1),p=class e extends F{static summary="Open a local GraphiQL UI for your app and store.";static descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
1
+ import{a as L,b as g,d as P,g as w}from"./chunk-LCMDVUVO.js";import{a as A}from"./chunk-XPDHT3Z4.js";import{t as G}from"./chunk-3XAD2E55.js";import{a as F}from"./chunk-5SLKHURV.js";import{a as S}from"./chunk-MTBABHUB.js";import{b as v,e as b}from"./chunk-SUTVPAJF.js";import{p as l,u as d}from"./chunk-HB4YI2PF.js";import{N as u,a as c}from"./chunk-7YXHILW4.js";import{Cb as f,Eb as h,Kb as i,Ob as y}from"./chunk-62GA7XR3.js";import{b as q}from"./chunk-I3J63RFV.js";import{e as Q,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();import{randomBytes as x}from"crypto";function K(){return x(32).toString("hex")}function C(e){let r=new URL(`http://localhost:${e.port}/graphiql`);return r.searchParams.set("key",e.key),e.query&&r.searchParams.set("query",e.query),e.variables&&r.searchParams.set("variables",e.variables),e.apiVersion&&r.searchParams.set("api_version",e.apiVersion),r.toString()}async function I(e){let r=await A(e.port),t=g({stdout:e.stdout??process.stdout,port:r,storeFqdn:e.storeFqdn,tokenProvider:e.tokenProvider,key:e.key,appContext:e.appContext,protectMutations:e.protectMutations}),a=C({port:r,key:e.key,query:e.query,variables:e.variables,apiVersion:e.apiVersion});try{i(h`GraphiQL is running at ${f.link(a)}`),e.additionalReadyMessages?.forEach(s=>i(s)),i("Press Ctrl+C to stop."),await u(a)||y("Browser did not open automatically. Open the URL above manually."),await T(e.abortSignal)}finally{t.close()}}async function T(e){let r=new c,t=()=>r.abort();process.once("SIGINT",t);try{await new Promise(a=>{if(r.signal.aborted||e?.aborted){a();return}r.signal.addEventListener("abort",()=>a(),{once:!0}),e?.addEventListener("abort",()=>r.abort(),{once:!0})})}finally{process.removeListener("SIGINT",t)}}async function k(e){let r=e.remoteApp.apiSecretKeys[0]?.secret??"",t=L(void 0,r,e.store),a=w({apiKey:e.remoteApp.apiKey,apiSecret:r,storeFqdn:e.store}),m=await l(),s=P(e.store,e.remoteApp.apiKey,m);await I({port:e.port,storeFqdn:e.store,tokenProvider:a,key:t,appContext:{appName:e.remoteApp.title,appUrl:s,apiSecret:r},variables:e.variables,apiVersion:e.apiVersion,abortSignal:e.abortSignal})}var n=Q(q(),1),p=class e extends F{static summary="Open a local GraphiQL UI for your app and store.";static descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
2
2
 
3
3
  The app must be installed on the store.`;static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];static flags={...v,...S,store:n.Flags.string({char:"s",description:"The myshopify.com domain of the store to open GraphiQL against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async r=>d(r)}),port:b({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),variables:n.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:n.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};async run(){let{flags:r}=await this.parse(e),{appContextResult:t,store:a}=await G(r);return await k({remoteApp:t.remoteApp,store:a.shopDomain,port:r.port,variables:r.variables,apiVersion:r.version}),{app:t.app}}};export{K as a,I as b,p as c};
@@ -1 +1 @@
1
- import{c as m,d as f,e as p}from"./chunk-XGKCPD6W.js";import{d as c,f as w,j as T}from"./chunk-3LHE4GIX.js";import{g as d}from"./chunk-Y3PY5LP7.js";import{F as u}from"./chunk-47IQIIFX.js";import{i as l}from"./chunk-Q37WAD6F.js";import{X as i}from"./chunk-UWI76E2L.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
1
+ import{c as m,d as f,e as p}from"./chunk-XAQUXFN5.js";import{d as c,f as w,j as T}from"./chunk-TBNEN73P.js";import{g as d}from"./chunk-LQSD25YS.js";import{F as u}from"./chunk-7YXHILW4.js";import{i as l}from"./chunk-4HBKQUKY.js";import{X as i}from"./chunk-62GA7XR3.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-YBSX53QP.js";import{b as y,c as P,d as b}from"./chunk-YYA5VGDW.js";import{a as F}from"./chunk-GN66BRYF.js";import{a as m}from"./chunk-PO5T44H3.js";import{Ia as x}from"./chunk-UNHT4ZFP.js";import{b as d,c as h}from"./chunk-NU5WLZ6Y.js";import{F as g,M as l}from"./chunk-47IQIIFX.js";import{Nb as n}from"./chunk-UWI76E2L.js";import{b as _}from"./chunk-I3J63RFV.js";import{e as U,g as u}from"./chunk-VKWPEFWQ.js";u();var i=U(_(),1);var a="_start",s=class w extends F{static summary="Run a function locally for testing.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionForHelp();static flags={...d,...m,...y,...h,input:i.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:i.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:i.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(w),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let r=e.configuration.targeting;if(r.length>1&&l({})){let O=r.map(f=>({label:f.target,value:f.export||a}));o=await g({message:"Which target would you like to execute?",choices:O})}else o=r?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,T=c&&`${e?.directory}/${c}`,A=await b(e,t.path,t["client-id"],t.reset,t.config);return await v({functionExtension:e,json:t.json,inputPath:t.input,export:o,stdin:"inherit",schemaPath:A,queryPath:T,profile:t.profile}),{app:p}}};export{s as a};
1
+ import{a as v}from"./chunk-32VQQ6EU.js";import{b as y,c as P,d as b}from"./chunk-2QENUJVG.js";import{a as F}from"./chunk-OHJUEUSA.js";import{a as m}from"./chunk-MTBABHUB.js";import{Ia as x}from"./chunk-EEAY7HFW.js";import{b as d,c as h}from"./chunk-SUTVPAJF.js";import{F as g,M as l}from"./chunk-7YXHILW4.js";import{Nb as n}from"./chunk-62GA7XR3.js";import{b as _}from"./chunk-I3J63RFV.js";import{e as U,g as u}from"./chunk-VKWPEFWQ.js";u();var i=U(_(),1);var a="_start",s=class w extends F{static summary="Run a function locally for testing.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionForHelp();static flags={...d,...m,...y,...h,input:i.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:i.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:i.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(w),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let r=e.configuration.targeting;if(r.length>1&&l({})){let O=r.map(f=>({label:f.target,value:f.export||a}));o=await g({message:"Which target would you like to execute?",choices:O})}else o=r?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,T=c&&`${e?.directory}/${c}`,A=await b(e,t.path,t["client-id"],t.reset,t.config);return await v({functionExtension:e,json:t.json,inputPath:t.input,export:o,stdin:"inherit",schemaPath:A,queryPath:T,profile:t.profile}),{app:p}}};export{s as a};
@@ -0,0 +1,2 @@
1
+ import{a as N,b as $,c as w}from"./chunk-EZG5EB7D.js";import{j as T}from"./chunk-HB4YI2PF.js";import{a as D,b}from"./chunk-WGO2GC6I.js";import{S as P,T as k,a as F}from"./chunk-7YXHILW4.js";import{l as A}from"./chunk-4HBKQUKY.js";import{Ba as y,Da as _,Ma as U,Nb as u,Pa as I,R as x,Ta as O,Ya as p}from"./chunk-62GA7XR3.js";import{g as h}from"./chunk-PT3OZEBI.js";import{c as m,h as l,i as S}from"./chunk-6IDEDOXW.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2026.10.3",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let i=B(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!K(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{port;provider=w;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
2
+ `);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;a??=at(s),ct(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-QBIYAMSH.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1,4 +1,4 @@
1
- import{b as A}from"./chunk-NU5WLZ6Y.js";import{b as w}from"./chunk-4ZNBEMRT.js";import{j as g}from"./chunk-3V4VL3SD.js";import{i as a}from"./chunk-Q37WAD6F.js";import{Aa as m,Ib as y,Kb as v,ya as u}from"./chunk-UWI76E2L.js";import{b as L}from"./chunk-I3J63RFV.js";import{e as h,h as f}from"./chunk-6IDEDOXW.js";import{e as x,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",b="X-Shopify-Surface",R="cli",F=["shopify.dev"];async function S(t,e,p){let c;try{c=new URL(t)}catch{throw new a(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new a(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await g(t,{headers:{Accept:U,[b]:R,...p?{"Accept-Language":p}:{}}});if(!i.ok)throw new a(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let l=await i.text();if(e){let o=h(e);await m(f(o)),await u(o,l),v(`Saved ${t} to ${o}`);return}y(l)}var n=x(L(),1),r=class t extends w{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. Pass `--language` for the language of the app you are building so code examples match your stack. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
1
+ import{b as A}from"./chunk-SUTVPAJF.js";import{b as w}from"./chunk-DCKRQZLE.js";import{j as g}from"./chunk-HB4YI2PF.js";import{i as a}from"./chunk-4HBKQUKY.js";import{Aa as m,Ib as y,Kb as v,ya as u}from"./chunk-62GA7XR3.js";import{b as L}from"./chunk-I3J63RFV.js";import{e as h,h as f}from"./chunk-6IDEDOXW.js";import{e as x,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",b="X-Shopify-Surface",R="cli",F=["shopify.dev"];async function S(t,e,p){let c;try{c=new URL(t)}catch{throw new a(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new a(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await g(t,{headers:{Accept:U,[b]:R,...p?{"Accept-Language":p}:{}}});if(!i.ok)throw new a(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let l=await i.text();if(e){let o=h(e);await m(f(o)),await u(o,l),v(`Saved ${t} to ${o}`);return}y(l)}var n=x(L(),1),r=class t extends w{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. Pass `--language` for the language of the app you are building so code examples match your stack. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
2
2
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# filter code examples to the language of the app you are building
3
3
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --language ruby`,`# save the document to a file instead of printing it
4
4
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`];static flags={...A,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),language:n.Flags.string({description:"Filter code examples in the returned Markdown to this language. Supply the language of the app you are building so examples match your stack. Optional \u2014 if omitted, or if shopify.dev does not recognize the language for a given page, the document includes examples in every language.",env:"SHOPIFY_FLAG_LANGUAGE",options:["javascript","typescript","python","ruby","php","rust","curl","liquid","graphql","html"]}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})};async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output,e.language)}};export{r as a};
@@ -1 +1 @@
1
- import{a as u,b as l}from"./chunk-7HNRK2CR.js";import{f as d,i as m}from"./chunk-KQFA5YTT.js";import{a as c}from"./chunk-PWS4VFSD.js";import{Ha as p}from"./chunk-UNHT4ZFP.js";import{i as s}from"./chunk-Q37WAD6F.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();async function f({clientId:a,operationIds:t,getOperation:n=m}){return Promise.all(t.map(async i=>{let o=await n({clientId:a,operationId:i});if(!o)throw new s(`Migration operation not found: ${i}`);return o}))}var r=class a extends c{static summary="Checks the status of app subscription migration operations.";static descriptionWithMarkdown="Checks app subscription migration operation status.\n\nRepeat `--id` for every operation GID returned by a multi-batch submission. With `--watch`, the command displays the current state while polling and outputs the final state after all requested operations reach a terminal status.\n\n`RUNNING` means an operation is still processing. `COMPLETED` means processing finished, but you must inspect the per-shop results to confirm each outcome. `FAILED` means the operation failed, and `CANCELED` means cancellation stopped further processing.\n\nUse `--json` to output every operation and its per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2> --watch","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...d};async run(){let{flags:t}=await this.parse(a),{app:n,remoteApp:i}=await p({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=t.watch?await l({clientId:i.apiKey,operationIds:t.id}):await f({clientId:i.apiKey,operationIds:t.id});return u(o,t.json),{app:n}}};export{r as a};
1
+ import{a as u,b as l}from"./chunk-BAP2CHI2.js";import{f as d,i as m}from"./chunk-JM2CQP64.js";import{a as c}from"./chunk-5SLKHURV.js";import{Ha as p}from"./chunk-EEAY7HFW.js";import{i as s}from"./chunk-4HBKQUKY.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();async function f({clientId:a,operationIds:t,getOperation:n=m}){return Promise.all(t.map(async i=>{let o=await n({clientId:a,operationId:i});if(!o)throw new s(`Migration operation not found: ${i}`);return o}))}var r=class a extends c{static summary="Checks the status of app subscription migration operations.";static descriptionWithMarkdown="Checks app subscription migration operation status.\n\nRepeat `--id` for every operation GID returned by a multi-batch submission. With `--watch`, the command displays the current state while polling and outputs the final state after all requested operations reach a terminal status.\n\n`RUNNING` means an operation is still processing. `COMPLETED` means processing finished, but you must inspect the per-shop results to confirm each outcome. `FAILED` means the operation failed, and `CANCELED` means cancellation stopped further processing.\n\nUse `--json` to output every operation and its per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2> --watch","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...d};async run(){let{flags:t}=await this.parse(a),{app:n,remoteApp:i}=await p({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=t.watch?await l({clientId:i.apiKey,operationIds:t.id}):await f({clientId:i.apiKey,operationIds:t.id});return u(o,t.json),{app:n}}};export{r as a};
@@ -1,4 +1,4 @@
1
- import{a as v}from"./chunk-J3JPJCWP.js";import{a as ue}from"./chunk-VGBUN3CZ.js";import{b as ne,c as se,d as ie,e as ae,f as le,h as ce,i as me,k as de,l as fe,n as he}from"./chunk-SZI6G247.js";import{a as x}from"./chunk-RSC5NQAT.js";import{c as Z,e as b,m as ee,n as te}from"./chunk-LYIXRMQJ.js";import{c as re,e as oe}from"./chunk-QO5RNGWA.js";import{k as P,l as X,n as w}from"./chunk-3LHE4GIX.js";import{s as C,u as k}from"./chunk-Y3PY5LP7.js";import{a as Y,b as Q}from"./chunk-4OCVXE5Y.js";import{o as j,s as z,t as N,u as B,w as V}from"./chunk-Q7BOSHWX.js";import{na as L,ra as _}from"./chunk-3V4VL3SD.js";import{A as R,C as G,D as U,N as J,V as K,w as W,y as M,z as q}from"./chunk-47IQIIFX.js";import{b as $}from"./chunk-HILYTMVA.js";import{d as H,e as I}from"./chunk-DSS4ECIH.js";import{i as y}from"./chunk-Q37WAD6F.js";import{Cb as g,Eb as T,Kb as E,Nb as u}from"./chunk-UWI76E2L.js";import{i as p}from"./chunk-B4OMIONW.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();f();f();var pe={workPromise:Promise.resolve()};async function ye(e,t,o,r,n){if(o.length===0)return pe;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:s,filesWithConflictingChecksums:l}=Se(o,r),a=i.length===0&&s.length===0&&l.length===0;if(_(`theme-service:theme-reconciliation:manual:${a}`),a)return u("Local and remote checksums match - no need to reconcile theme assets"),pe;let m=await Fe({filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:s,filesWithConflictingChecksums:l},n);return{workPromise:Oe(e,t,r,m)}}function Se(e,t){let o=new Set,r=[],n=[];for(let s of e){o.add(s.key);let l=t.files.get(s.key);l?s.checksum!==l.checksum&&n.push(s):r.push(s)}let i=Array.from(t.files.values()).filter(s=>!o.has(s.key));return{filesOnlyPresentOnRemote:S(r,t),filesOnlyPresentLocally:S(i,t),filesWithConflictingChecksums:S(n,t)}}function S(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function A(e,t,o,r){if(e.length===0)return;if(r){Ae(e,o,r);return}M({body:{list:{title:t,items:e.map(i=>i.key)}}}),await U({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:we}]})===D?o.remote.callback(e):o.local.callback(e)}function Ae(e,t,o){switch(o){case"keep-remote":t.remote.callback(e);break;case"keep-local":t.local.callback(e);break;case"abort":break}}function De(e){let t=[{title:"The files listed below are only present locally.",files:e.filesOnlyPresentLocally},{title:"The files listed below are only present on the remote theme.",files:e.filesOnlyPresentOnRemote},{title:"The files listed below differ between the local and remote versions.",files:e.filesWithConflictingChecksums}];throw new y("Theme JSON files need reconciliation.",t.filter(o=>o.files.length>0).map(o=>`${o.title}
1
+ import{a as v}from"./chunk-J3JPJCWP.js";import{a as ue}from"./chunk-LMQOFVRC.js";import{b as ne,c as se,d as ie,e as ae,f as le,h as ce,i as me,k as de,l as fe,n as he}from"./chunk-KMJTO7CU.js";import{a as x}from"./chunk-S6A7TMR4.js";import{c as Z,e as b,m as ee,n as te}from"./chunk-FVTP7EO4.js";import{c as re,e as oe}from"./chunk-M2HQFHNO.js";import{k as P,l as X,n as w}from"./chunk-TBNEN73P.js";import{s as C,u as k}from"./chunk-LQSD25YS.js";import{a as Y,b as Q}from"./chunk-XPDHT3Z4.js";import{o as j,s as z,t as N,u as B,w as V}from"./chunk-Q7BOSHWX.js";import{na as L,ra as _}from"./chunk-HB4YI2PF.js";import{A as R,C as G,D as U,N as J,V as K,w as W,y as M,z as q}from"./chunk-7YXHILW4.js";import{b as $}from"./chunk-HILYTMVA.js";import{d as H,e as I}from"./chunk-MWWULCLD.js";import{i as y}from"./chunk-4HBKQUKY.js";import{Cb as g,Eb as T,Kb as E,Nb as u}from"./chunk-62GA7XR3.js";import{i as p}from"./chunk-B4OMIONW.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();f();f();var pe={workPromise:Promise.resolve()};async function ye(e,t,o,r,n){if(o.length===0)return pe;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:s,filesWithConflictingChecksums:l}=Se(o,r),a=i.length===0&&s.length===0&&l.length===0;if(_(`theme-service:theme-reconciliation:manual:${a}`),a)return u("Local and remote checksums match - no need to reconcile theme assets"),pe;let m=await Fe({filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:s,filesWithConflictingChecksums:l},n);return{workPromise:Oe(e,t,r,m)}}function Se(e,t){let o=new Set,r=[],n=[];for(let s of e){o.add(s.key);let l=t.files.get(s.key);l?s.checksum!==l.checksum&&n.push(s):r.push(s)}let i=Array.from(t.files.values()).filter(s=>!o.has(s.key));return{filesOnlyPresentOnRemote:S(r,t),filesOnlyPresentLocally:S(i,t),filesWithConflictingChecksums:S(n,t)}}function S(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function A(e,t,o,r){if(e.length===0)return;if(r){Ae(e,o,r);return}M({body:{list:{title:t,items:e.map(i=>i.key)}}}),await U({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:we}]})===D?o.remote.callback(e):o.local.callback(e)}function Ae(e,t,o){switch(o){case"keep-remote":t.remote.callback(e);break;case"keep-local":t.local.callback(e);break;case"abort":break}}function De(e){let t=[{title:"The files listed below are only present locally.",files:e.filesOnlyPresentLocally},{title:"The files listed below are only present on the remote theme.",files:e.filesOnlyPresentOnRemote},{title:"The files listed below differ between the local and remote versions.",files:e.filesWithConflictingChecksums}];throw new y("Theme JSON files need reconciliation.",t.filter(o=>o.files.length>0).map(o=>`${o.title}
2
2
  ${o.files.map(r=>`- ${r.key}`).join(`
3
3
  `)}`).join(`
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk-EMH7OHCW.js";import{a as h}from"./chunk-PWS4VFSD.js";import{a as c}from"./chunk-PO5T44H3.js";import{Ha as m}from"./chunk-UNHT4ZFP.js";import{b as l}from"./chunk-NU5WLZ6Y.js";import{u as a}from"./chunk-3V4VL3SD.js";import{z as p}from"./chunk-47IQIIFX.js";import{i as d}from"./chunk-Q37WAD6F.js";import{b as C}from"./chunk-I3J63RFV.js";import{e as g,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function v(t){let e=t.appContextResult.developerPlatformClient,o=t.appContextResult.remoteApp,r=await e.devSessionDelete({shopFqdn:t.store.shopDomain,appId:o.id});if(r.devSessionDelete?.userErrors.length){let u=r.devSessionDelete.userErrors.map(w=>w.message).join(`
1
+ import{a as f}from"./chunk-VNG2I7NM.js";import{a as h}from"./chunk-5SLKHURV.js";import{a as c}from"./chunk-MTBABHUB.js";import{Ha as m}from"./chunk-EEAY7HFW.js";import{b as l}from"./chunk-SUTVPAJF.js";import{u as a}from"./chunk-HB4YI2PF.js";import{z as p}from"./chunk-7YXHILW4.js";import{i as d}from"./chunk-4HBKQUKY.js";import{b as C}from"./chunk-I3J63RFV.js";import{e as g,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function v(t){let e=t.appContextResult.developerPlatformClient,o=t.appContextResult.remoteApp,r=await e.devSessionDelete({shopFqdn:t.store.shopDomain,appId:o.id});if(r.devSessionDelete?.userErrors.length){let u=r.devSessionDelete.userErrors.map(w=>w.message).join(`
2
2
  `);throw new d(`Failed to stop the dev preview: ${u}`)}p({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${t.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var i=g(C(),1);var n=class t extends h{static summary="Cleans up the dev preview from the selected store.";static descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
3
3
 
4
4
  It restores the app's active version to the selected development store.
@@ -1 +1 @@
1
- import{c as n}from"./chunk-NU5WLZ6Y.js";import{a as r,b as c,c as l}from"./chunk-MCNK5SJ6.js";import{b as i}from"./chunk-4ZNBEMRT.js";import{b as h}from"./chunk-I3J63RFV.js";import{e as f,g as o}from"./chunk-VKWPEFWQ.js";o();var t=f(h(),1);var e=class p extends i{static args={command:t.Args.string({description:"Command to show help for.",required:!1})};static descriptionWithMarkdown="Display help for Shopify CLI";static description=this.descriptionForHelp();static usage="help [command] [flags]";static flags={...n,"nested-commands":t.Flags.boolean({char:"n",description:"Include all nested commands in the output.",env:"SHOPIFY_FLAG_CLI_NESTED_COMMANDS",default:!1})};static strict=!1;static get jsonOutputSchema(){return r}async run(){let{argv:a,flags:s}=await this.parse(p);if(s.json){let d=await c(this.config,a,s["nested-commands"]);l(d);return}let m=await(0,t.loadHelpClass)(this.config);await new m(this.config,{all:s["nested-commands"]}).showHelp(a)}};export{e as a};
1
+ import{c as n}from"./chunk-SUTVPAJF.js";import{a as r,b as c,c as l}from"./chunk-EO3S2TFI.js";import{b as i}from"./chunk-DCKRQZLE.js";import{b as h}from"./chunk-I3J63RFV.js";import{e as f,g as o}from"./chunk-VKWPEFWQ.js";o();var t=f(h(),1);var e=class p extends i{static args={command:t.Args.string({description:"Command to show help for.",required:!1})};static descriptionWithMarkdown="Display help for Shopify CLI";static description=this.descriptionForHelp();static usage="help [command] [flags]";static flags={...n,"nested-commands":t.Flags.boolean({char:"n",description:"Include all nested commands in the output.",env:"SHOPIFY_FLAG_CLI_NESTED_COMMANDS",default:!1})};static strict=!1;static get jsonOutputSchema(){return r}async run(){let{argv:a,flags:s}=await this.parse(p);if(s.json){let d=await c(this.config,a,s["nested-commands"]);l(d);return}let m=await(0,t.loadHelpClass)(this.config);await new m(this.config,{all:s["nested-commands"]}).showHelp(a)}};export{e as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-ZEBMW5KS.js";import{b as a}from"./chunk-4ZNBEMRT.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-2II4W4ZF.js";import{b as a}from"./chunk-DCKRQZLE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1 +1 @@
1
- import{b as u}from"./chunk-L4DFMMOI.js";import{b as r,c as I,e as p}from"./chunk-FOAV642V.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 m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-4QZCAEP7.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-TMD2LYZM.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=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 O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(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 V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(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 j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
1
+ import{b as u}from"./chunk-QLHPTMIH.js";import{b as r,c as I,e as p}from"./chunk-FOAV642V.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 m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-XHZY6MNM.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-6WYK24ET.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=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 O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(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 V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(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 j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
@@ -1 +1 @@
1
- import{q as r}from"./chunk-Y743UVBS.js";import{d as t}from"./chunk-NU5WLZ6Y.js";import{b as a}from"./chunk-4ZNBEMRT.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var e=class extends a{static baseFlags={...a.baseFlags,...t};environmentsFilename(){return r.appEnvironments}};export{e as a};
1
+ import{q as r}from"./chunk-TVI7TQ4C.js";import{d as t}from"./chunk-SUTVPAJF.js";import{b as a}from"./chunk-DCKRQZLE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var e=class extends a{static baseFlags={...a.baseFlags,...t};environmentsFilename(){return r.appEnvironments}};export{e as a};
@@ -1,4 +1,4 @@
1
- import{c as ee,e as ne,f as te,g as ie}from"./chunk-RK2V6OIJ.js";import{a as J,c as Z,d as Q,e as X}from"./chunk-XSMCQLJW.js";import{b as I}from"./chunk-NYYXH2SX.js";import{a as q}from"./chunk-PWS4VFSD.js";import{a as j}from"./chunk-PO5T44H3.js";import{Ha as W,K as z,N as H,ea as K,g as Y}from"./chunk-UNHT4ZFP.js";import{a as G}from"./chunk-45SZ5PSE.js";import{b as V}from"./chunk-NU5WLZ6Y.js";import{E as U,H as B,M as N,x as O,y as F,z as M}from"./chunk-47IQIIFX.js";import{d as L}from"./chunk-DSS4ECIH.js";import{i as h,k as $}from"./chunk-Q37WAD6F.js";import{Aa as E,Db as S,Ga as R,Kb as A,P as D,Pb as C}from"./chunk-UWI76E2L.js";import{b as ce}from"./chunk-I3J63RFV.js";import{c as x,h as P}from"./chunk-6IDEDOXW.js";import{e as pe,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function oe(e){let n,t;e.bundlePath&&(n=await X(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await Q(n,e.bundlePath));let i={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(i.bundleUrl=n),e.appModules.length>0&&(i.appModules=e.appModules);let a=await e.developerPlatformClient.deploy(i);if(!a.appDeploy.appVersion){let o=ue(a.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],o)}return a.appDeploy.userErrors?.length>0&&(t=a.appDeploy.userErrors.map(o=>o.message).join(", ")),{validationErrors:a.appDeploy.appVersion.appModuleVersions.filter(o=>o.validationErrors.length>0).map(o=>({uuid:o.registrationUuid,errors:o.validationErrors})),versionTag:a.appDeploy.appVersion.versionTag,location:a.appDeploy.appVersion.location,message:a.appDeploy.appVersion.message,deployError:t}}var w=`
1
+ import{c as ee,e as ne,f as te,g as ie}from"./chunk-XE6EUHSS.js";import{a as J,c as Z,d as Q,e as X}from"./chunk-ZOE6WXW6.js";import{b as I}from"./chunk-MF7IHOM5.js";import{a as q}from"./chunk-5SLKHURV.js";import{a as j}from"./chunk-MTBABHUB.js";import{Ha as W,K as z,N as H,ea as K,g as Y}from"./chunk-EEAY7HFW.js";import{a as G}from"./chunk-LG6DGIFX.js";import{b as V}from"./chunk-SUTVPAJF.js";import{E as U,H as B,M as N,x as O,y as F,z as M}from"./chunk-7YXHILW4.js";import{d as L}from"./chunk-MWWULCLD.js";import{i as h,k as $}from"./chunk-4HBKQUKY.js";import{Aa as E,Db as S,Ga as R,Kb as A,P as D,Pb as C}from"./chunk-62GA7XR3.js";import{b as ce}from"./chunk-I3J63RFV.js";import{c as x,h as P}from"./chunk-6IDEDOXW.js";import{e as pe,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function oe(e){let n,t;e.bundlePath&&(n=await X(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await Q(n,e.bundlePath));let i={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(i.bundleUrl=n),e.appModules.length>0&&(i.appModules=e.appModules);let a=await e.developerPlatformClient.deploy(i);if(!a.appDeploy.appVersion){let o=ue(a.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],o)}return a.appDeploy.userErrors?.length>0&&(t=a.appDeploy.userErrors.map(o=>o.message).join(", ")),{validationErrors:a.appDeploy.appVersion.appModuleVersions.filter(o=>o.validationErrors.length>0).map(o=>({uuid:o.registrationUuid,errors:o.validationErrors})),versionTag:a.appDeploy.appVersion.versionTag,location:a.appDeploy.appVersion.location,message:a.appDeploy.appVersion.message,deployError:t}}var w=`
2
2
  Validation errors`,k=`
3
3
  `;function ue(e,n,t,i={}){let a=l=>l.details?.some(y=>y.extension_id)??!1,s=(l,y)=>{let b=l.details?.find(_=>typeof _.extension_id<"u")?.extension_id??"";return Object.values(y).includes(b.toString())},o=l=>{let y=l.on?l.on[0]:void 0;return t.some(b=>b.uid===y?.user_identifier)},[d,u]=I(e,l=>o(l)),[p,c]=I(u,l=>a(l)),[m,r]=I(p,l=>s(l,n));return[...fe(c,{version:i.version}),...me(m,n),...he(r),...ge(d,t)]}function fe(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function me(e,n){return e.reduce((t,i)=>{let a=(i.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=a==="base"?i.message:`${a}: ${i.message}`,o=i.details.find(r=>typeof r.extension_title<"u")?.extension_title,d=i.details.find(r=>typeof r.specification_identifier<"u")?.specification_identifier,u=i.details.find(r=>typeof r.extension_id<"u")?.extension_id?.toString(),c=Object.keys(n).find(r=>n[r]===u)??o;d==="webhook_subscription"&&(c="Webhook Subscription");let m=t.find(r=>r.title===c);if(m){let r=m.body,f=i.category==="invalid"?r.find(l=>l.list.title===w):r.find(l=>l.list.title===k);f?f.list.items.includes(s)||f.list.items.push(s):r.push({list:{title:i.category==="invalid"?w:k,items:[s]}})}else t.push({title:c,body:[{list:{title:i.category==="invalid"?w:k,items:[s]}}]});return t.forEach(r=>{r.body.sort((f,l)=>f.list.title===w?1:l.list.title===w?-1:0)}),t},[])}function ge(e,n){return e.reduce((t,i)=>{let s=(i.on?i.on[0]:void 0)?.user_identifier,o=n.find(r=>r.uid===s),d=s?`Extension with uid: ${s}`:"Unknown Extension",u=o?.handle??d,c=`${(i.field??["unknown"]).join(".")}: ${i.message}`,m=t.find(r=>r.title===u);if(m){let f=m.body.find(l=>l.list.title===w);f&&(f.list.items.includes(c)||f.list.items.push(c))}else t.push({title:u,body:[{list:{title:w,items:[c]}}]});return t},[])}function he(e){return e.reduce((n,t)=>{let i=t.details.find(s=>typeof s.extension_title<"u")?.extension_title,a=n.find(s=>s.title===i);return a?a.errorCount+=1:n.push({title:i,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
4
4
  ${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function ae(e){let n=x(e.app.directory,".shopify","deploy-bundle");await R(n,{force:!0}),await E(n),await J(e.appManifest,n),e.skipBuild||await Y(e.app);let t=e.app.allExtensions.map(a=>({prefix:a.localIdentifier,action:async(s,o,d)=>{await a.buildForBundle({stderr:o,stdout:s,signal:d,app:e.app,environment:"production",skipBuild:e.skipBuild},n)}}));if(await O({processes:t,showTimestamps:!1}),e.app.allExtensions.some(a=>a.hasDeploySteps))return await Z(n,e.bundlePath),e.bundlePath}async function ye(e){let{app:n,remoteApp:t,developerPlatformClient:i,noRelease:a,allowUpdates:s,allowDeletes:o,extensions:d}=e,u=[a,s,o].some(Boolean),p=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
@@ -1,4 +1,4 @@
1
- import{a as d}from"./chunk-PWS4VFSD.js";import{a as f}from"./chunk-PO5T44H3.js";import{Da as c,Ha as s}from"./chunk-UNHT4ZFP.js";import{b as r,f as a}from"./chunk-NU5WLZ6Y.js";import{i as n}from"./chunk-Q37WAD6F.js";import{b as u}from"./chunk-I3J63RFV.js";import{e as h,g as t}from"./chunk-VKWPEFWQ.js";t();var i=h(u(),1);var o=class l extends d{static summary="Fetch your app configuration from the Developer Dashboard.";static descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
1
+ import{a as d}from"./chunk-5SLKHURV.js";import{a as f}from"./chunk-MTBABHUB.js";import{Da as c,Ha as s}from"./chunk-EEAY7HFW.js";import{b as r,f as a}from"./chunk-SUTVPAJF.js";import{i as n}from"./chunk-4HBKQUKY.js";import{b as u}from"./chunk-I3J63RFV.js";import{e as h,g as t}from"./chunk-VKWPEFWQ.js";t();var i=h(u(),1);var o=class l extends d{static summary="Fetch your app configuration from the Developer Dashboard.";static descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
2
2
 
3
3
  For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
4
4
  `;static description=this.descriptionForHelp();static flags={...r,...f,config:i.Flags.string({hidden:!1,char:"c",description:"The name of the local app configuration to read and overwrite. Use --file-name instead when specifying --client-id.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"organization-id":i.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]}),"client-id":a(i.Flags.string({hidden:!1,description:"The Client ID of the remote app to link. Use --file-name to specify the destination configuration file.",env:"SHOPIFY_FLAG_CLIENT_ID"})),"file-name":i.Flags.string({hidden:!1,description:"The name of the app configuration file to create or overwrite. Requires --force to overwrite an existing file.",env:"SHOPIFY_FLAG_APP_CONFIG_FILE_NAME",exclusive:["config"]}),force:i.Flags.boolean({hidden:!1,description:"Overwrite an existing configuration file without prompting.",env:"SHOPIFY_FLAG_FORCE",dependsOn:["file-name"]})};async run(){let{flags:e}=await this.parse(l);if(e.config!==void 0&&e["client-id"]!==void 0)throw new n("The --config and --client-id flags can't be used together.","Use --file-name instead of --config to choose the configuration file to create or overwrite.");let p={directory:e.path,apiKey:e["client-id"],organizationId:e["organization-id"],configName:e.config,fileName:e["file-name"],force:e.force??!1},g=await c(p),{app:m}=await s({directory:e.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:g.configFileName});return{app:m}}};export{o as a};
@@ -0,0 +1 @@
1
+ import{b as s}from"./chunk-I3J63RFV.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{e as i,g as n}from"./chunk-VKWPEFWQ.js";n();var t=i(s(),1),a={"no-input":t.Flags.boolean({description:"Disable interactive prompts and browser authentication.",env:"SHOPIFY_FLAG_NO_INPUT"})};function u(r=process.argv,e=process.env){return r.includes("--no-input")||o(e.SHOPIFY_FLAG_NO_INPUT)}export{a,u as b};
@@ -1 +1 @@
1
- import{o as n}from"./chunk-3C4WVKSO.js";import{H as s}from"./chunk-47IQIIFX.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
1
+ import{o as n}from"./chunk-5VRB3FBD.js";import{H as s}from"./chunk-7YXHILW4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
@@ -1 +1 @@
1
- import{D as u,I as a,L as s,j as f,t as g,w as h,z as y}from"./chunk-EO4YJFMY.js";import{i as o}from"./chunk-Q37WAD6F.js";import{i as d}from"./chunk-6IDEDOXW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function k(t,e){let r=u(t);if(await h(t.appDirectory,r))return;let{scan:n}=a(t,e);throw new o(`No app security check results for ${r} in ${t.appDirectory}.`,`Run \`${s(n)}\`.`)}async function T(t,e){await k(t,e);let r=g(t.appDirectory,u(t)),[n,i]=await Promise.all([b(r.deterministicFindingsPath,"deterministic"),b(r.agentFindingsPath,"agent")]),c=[S(n,"deterministic"),S(i,"agent")].filter(w=>w!==void 0);c.length>0&&D(c,a(t,e));let l=v(n),m=v(i);return{sources:{deterministic:l,agent:m},checks:f({deterministic:l?.document??null,agent:m?.document??null})}}async function b(t,e){return{path:t,result:await y(t,e)}}function S(t,e){if(t.result.status==="invalid")return{source:e,path:t.path,errors:t.result.errors}}function v(t){return t.result.status!=="ok"?null:{path:t.path,document:t.result.value}}function D(t,e){let r=t.length===1?"The app security check results could not be loaded because a results file is invalid.":"The app security check results could not be loaded because both results files are invalid.",n=[...t.map(i=>F(i.source,e,`${d(i.path)}.`)),["Or run",{command:s(e.clean)},"to delete both results files and start over."]];throw new o(r,null,n,t.map(R))}function F(t,e,r){return t==="deterministic"?["Run",{command:s(e.scan)},`to regenerate ${r}`]:["Have your coding agent run",{command:s(e.record)},`again to regenerate ${r}`]}function R(t){return{title:t.path,body:{list:{items:t.errors}}}}export{k as a,T as b};
1
+ import{D as u,I as a,L as s,j as f,t as g,w as h,z as y}from"./chunk-VG5ZDVDQ.js";import{i as o}from"./chunk-4HBKQUKY.js";import{i as d}from"./chunk-6IDEDOXW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function k(t,e){let r=u(t);if(await h(t.appDirectory,r))return;let{scan:n}=a(t,e);throw new o(`No app security check results for ${r} in ${t.appDirectory}.`,`Run \`${s(n)}\`.`)}async function T(t,e){await k(t,e);let r=g(t.appDirectory,u(t)),[n,i]=await Promise.all([b(r.deterministicFindingsPath,"deterministic"),b(r.agentFindingsPath,"agent")]),c=[S(n,"deterministic"),S(i,"agent")].filter(w=>w!==void 0);c.length>0&&D(c,a(t,e));let l=v(n),m=v(i);return{sources:{deterministic:l,agent:m},checks:f({deterministic:l?.document??null,agent:m?.document??null})}}async function b(t,e){return{path:t,result:await y(t,e)}}function S(t,e){if(t.result.status==="invalid")return{source:e,path:t.path,errors:t.result.errors}}function v(t){return t.result.status!=="ok"?null:{path:t.path,document:t.result.value}}function D(t,e){let r=t.length===1?"The app security check results could not be loaded because a results file is invalid.":"The app security check results could not be loaded because both results files are invalid.",n=[...t.map(i=>F(i.source,e,`${d(i.path)}.`)),["Or run",{command:s(e.clean)},"to delete both results files and start over."]];throw new o(r,null,n,t.map(R))}function F(t,e,r){return t==="deterministic"?["Run",{command:s(e.scan)},`to regenerate ${r}`]:["Have your coding agent run",{command:s(e.record)},`again to regenerate ${r}`]}function R(t){return{title:t.path,body:{list:{items:t.errors}}}}export{k as a,T as b};
@@ -1,2 +1,2 @@
1
- import{b as x,c as D,f as M}from"./chunk-F3PZGSOY.js";import{a as o}from"./chunk-XUUIBSLW.js";import{D as s,G as h,J as e,z as y}from"./chunk-47IQIIFX.js";import{d as w}from"./chunk-HILYTMVA.js";import{Kb as _,ya as u}from"./chunk-UWI76E2L.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
1
+ import{b as x,c as D,f as M}from"./chunk-XTOOTN4P.js";import{a as o}from"./chunk-GYVQIRBD.js";import{D as s,G as h,J as e,z as y}from"./chunk-7YXHILW4.js";import{d as w}from"./chunk-HILYTMVA.js";import{Kb as _,ya as u}from"./chunk-62GA7XR3.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
2
2
  `)}export{$ as a,j as b};