shopify 4.9.2 → 4.9.4

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 (343) hide show
  1. package/dist/analytics-APDNTBDE.js +1 -0
  2. package/dist/analytics-LX52KYSE.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-JKWB7WTO.js → chunk-2PDVBGQH.js} +1 -1
  5. package/dist/{chunk-3ZL4TDTH.js → chunk-2YVSZFXJ.js} +1 -1
  6. package/dist/{chunk-BLCR7BXU.js → chunk-35WQTGN3.js} +1 -1
  7. package/dist/chunk-37BGAWAW.js +2 -0
  8. package/dist/chunk-3C4WVKSO.js +6 -0
  9. package/dist/{chunk-46U6C6C6.js → chunk-3G2ZQ2EF.js} +1 -1
  10. package/dist/{chunk-JAY7AGAG.js → chunk-3LHE4GIX.js} +1 -1
  11. package/dist/{chunk-3E3MCY5O.js → chunk-3V4VL3SD.js} +3 -3
  12. package/dist/{chunk-2P5DUPT7.js → chunk-43URS56H.js} +1 -1
  13. package/dist/{chunk-525BMYNR.js → chunk-45SZ5PSE.js} +1 -1
  14. package/dist/{chunk-RCYQPOJW.js → chunk-47IQIIFX.js} +91 -91
  15. package/dist/{chunk-PV5C6Q2P.js → chunk-4ES7BJEK.js} +1 -1
  16. package/dist/{chunk-C4GEP3CX.js → chunk-4IFY7V7W.js} +1 -1
  17. package/dist/{chunk-J7ZG6SO3.js → chunk-4JGWKUJN.js} +1 -1
  18. package/dist/{chunk-3EEH3A27.js → chunk-4O5GQ3DS.js} +1 -1
  19. package/dist/{chunk-JWDR66AS.js → chunk-4O7LK5RG.js} +1 -1
  20. package/dist/{chunk-RBPMV3KB.js → chunk-4OCVXE5Y.js} +1 -1
  21. package/dist/{chunk-CHRFYG6W.js → chunk-4TFJ5RW7.js} +1 -1
  22. package/dist/{chunk-UOKX3AME.js → chunk-4TZCRMBJ.js} +1 -1
  23. package/dist/{chunk-EZ5F4ZFY.js → chunk-4ZNBEMRT.js} +3 -3
  24. package/dist/chunk-5BGUKF7L.js +1 -0
  25. package/dist/{chunk-LIQSNIB3.js → chunk-5BTLE67Z.js} +1 -1
  26. package/dist/{chunk-6NLGZGYE.js → chunk-5JIJDUXX.js} +1 -1
  27. package/dist/{chunk-WINVPFT5.js → chunk-66YRAUWX.js} +1 -1
  28. package/dist/{chunk-JCO2SDDR.js → chunk-67EBF76X.js} +1 -1
  29. package/dist/{chunk-5BO5HCN6.js → chunk-6A4H3HPY.js} +1 -1
  30. package/dist/{chunk-BVR3GF2L.js → chunk-6HPUOCFF.js} +1 -1
  31. package/dist/chunk-6IDEDOXW.js +2 -0
  32. package/dist/{chunk-ANHSOQTZ.js → chunk-6IMHGT7F.js} +1 -1
  33. package/dist/{chunk-4QEALPWD.js → chunk-6MC2BEW4.js} +1 -1
  34. package/dist/chunk-6YDLNP4G.js +15 -0
  35. package/dist/{chunk-BPVXYM6G.js → chunk-73D5O7A3.js} +1 -1
  36. package/dist/{chunk-EMKLN75K.js → chunk-7556AIVG.js} +1 -1
  37. package/dist/{chunk-IQIUFTR6.js → chunk-7A3RW2VM.js} +1 -1
  38. package/dist/{chunk-EGJQEKAO.js → chunk-7HNRK2CR.js} +1 -1
  39. package/dist/{chunk-G627WGIC.js → chunk-7HWMURCW.js} +2 -2
  40. package/dist/{chunk-3NRGGEGU.js → chunk-7SJHVJ3W.js} +1 -1
  41. package/dist/{chunk-MQZPASSP.js → chunk-7VAKNVFD.js} +1 -1
  42. package/dist/{chunk-KPNUSDCW.js → chunk-A2VCTDKH.js} +1 -1
  43. package/dist/{chunk-JCKA3O5A.js → chunk-ALK66U3O.js} +1 -1
  44. package/dist/{chunk-MP5NZL7C.js → chunk-AMLCWRHU.js} +1 -1
  45. package/dist/{chunk-AVOSD4NV.js → chunk-AVMNIZAJ.js} +1 -1
  46. package/dist/{chunk-IJLD5UYC.js → chunk-AYIU6Z4C.js} +1 -1
  47. package/dist/{chunk-T3JUBPBU.js → chunk-B3M3KIOU.js} +1 -1
  48. package/dist/{chunk-ER7ZTF26.js → chunk-BIWG3FQQ.js} +1 -1
  49. package/dist/{chunk-YKYJOUV7.js → chunk-BOE2ST6J.js} +1 -1
  50. package/dist/chunk-BQ3U3CQV.js +1 -0
  51. package/dist/{chunk-FICC6IFE.js → chunk-BVB3DTNE.js} +1 -1
  52. package/dist/{chunk-55QTRPZ2.js → chunk-C6IBY7NW.js} +1 -1
  53. package/dist/{chunk-E64OFJHF.js → chunk-CLD3NZYD.js} +1 -1
  54. package/dist/{chunk-PFIQR7XS.js → chunk-CQF5NDTJ.js} +1 -1
  55. package/dist/{chunk-X6HLGOIV.js → chunk-CVFPY2SH.js} +1 -1
  56. package/dist/{chunk-OERMQ2FP.js → chunk-D3KFKT4D.js} +1 -1
  57. package/dist/{chunk-3NUQGW57.js → chunk-DEF2G7S4.js} +1 -1
  58. package/dist/{chunk-I55L6FOM.js → chunk-DMDLJRLW.js} +1 -1
  59. package/dist/{chunk-EMRUM6AA.js → chunk-DMNWSUKV.js} +1 -1
  60. package/dist/{chunk-PQH4U2XV.js → chunk-DSS4ECIH.js} +1 -1
  61. package/dist/{chunk-WXT5AKZV.js → chunk-DYPZX7MW.js} +1 -1
  62. package/dist/{chunk-R43LXE66.js → chunk-EMH7OHCW.js} +1 -1
  63. package/dist/{chunk-UB2LAIXS.js → chunk-ENQXB532.js} +1 -1
  64. package/dist/{chunk-Q7PF4VKI.js → chunk-EO4YJFMY.js} +62 -51
  65. package/dist/{chunk-KY36HSIB.js → chunk-F3PZGSOY.js} +1 -1
  66. package/dist/chunk-FEQHCE2E.js +3 -0
  67. package/dist/{chunk-QMJZFKKU.js → chunk-FK7GA4QQ.js} +1 -1
  68. package/dist/{chunk-OCQZ2ULI.js → chunk-FO2R6KHG.js} +1 -1
  69. package/dist/{chunk-WNO2V53C.js → chunk-FOAV642V.js} +1 -1
  70. package/dist/{chunk-QA2NOPXG.js → chunk-FQL2WEKX.js} +1 -1
  71. package/dist/{chunk-3ATOVFLZ.js → chunk-G7JW4UIM.js} +1 -1
  72. package/dist/{chunk-BLBJT7BM.js → chunk-GE4MLO3C.js} +1 -1
  73. package/dist/{chunk-OIQVPTNQ.js → chunk-GM4EFJJF.js} +1 -1
  74. package/dist/chunk-GN66BRYF.js +1 -0
  75. package/dist/{chunk-XTKXBQVA.js → chunk-GPRZYFDE.js} +1 -1
  76. package/dist/{chunk-SYNCIFJ6.js → chunk-GSE6FXZU.js} +1 -1
  77. package/dist/{chunk-OXN2DID2.js → chunk-GZ7VGCVW.js} +1 -1
  78. package/dist/{chunk-HKZ75UKL.js → chunk-HASIOUH2.js} +1 -1
  79. package/dist/chunk-HILYTMVA.js +1 -0
  80. package/dist/{chunk-SWNY3RUM.js → chunk-HJHS23Q3.js} +1 -1
  81. package/dist/{chunk-SQIESCOJ.js → chunk-HLPAVELJ.js} +1 -1
  82. package/dist/{chunk-YIV3CWED.js → chunk-HPM3HF7A.js} +1 -1
  83. package/dist/{chunk-HZJHGHLN.js → chunk-HQJ62PII.js} +1 -1
  84. package/dist/{chunk-JJHJYBPQ.js → chunk-HQY6JM6G.js} +1 -1
  85. package/dist/{chunk-7ARGLS6W.js → chunk-HSYMUYEZ.js} +1 -1
  86. package/dist/{chunk-IESHPQLC.js → chunk-I5PQZRYM.js} +1 -1
  87. package/dist/{chunk-M7QFZQ23.js → chunk-IDKRJ2F4.js} +1 -1
  88. package/dist/{chunk-I2LILWDI.js → chunk-IGDVKRB4.js} +1 -1
  89. package/dist/chunk-IPZ6LUJV.js +4 -0
  90. package/dist/{chunk-NLKO2J7T.js → chunk-J4J2YXH3.js} +1 -1
  91. package/dist/{chunk-CNAMKKAK.js → chunk-J4NBPC57.js} +1 -1
  92. package/dist/chunk-J6LQR2F6.js +7 -0
  93. package/dist/{chunk-UYRXUGLY.js → chunk-JYGZD4HM.js} +1 -1
  94. package/dist/{chunk-CDIKRQ6M.js → chunk-K3HUQLIC.js} +1 -1
  95. package/dist/{chunk-GPJJA3FX.js → chunk-K7D53KSJ.js} +1 -1
  96. package/dist/{chunk-UMSO6MOI.js → chunk-KQFA5YTT.js} +1 -1
  97. package/dist/{chunk-MW3HFOPD.js → chunk-KTD7VLHL.js} +1 -1
  98. package/dist/chunk-L4DFMMOI.js +1 -0
  99. package/dist/{chunk-7IRPE3M5.js → chunk-LJIJEGND.js} +1 -1
  100. package/dist/{chunk-D2S566HF.js → chunk-LJZTSQRD.js} +1 -1
  101. package/dist/{chunk-7EDXMGBQ.js → chunk-LKXFHYLI.js} +1 -1
  102. package/dist/{chunk-6H3HVSO5.js → chunk-LLPB6JN5.js} +1 -1
  103. package/dist/{chunk-UVC3IXM3.js → chunk-LOWSU4BB.js} +1 -1
  104. package/dist/{chunk-7MMPQMU7.js → chunk-LWU5TKNA.js} +1 -1
  105. package/dist/{chunk-PI6FLLDD.js → chunk-LYIXRMQJ.js} +1 -1
  106. package/dist/{chunk-DTGIMRBX.js → chunk-MCNK5SJ6.js} +1 -1
  107. package/dist/{chunk-GS52MX5F.js → chunk-MJZSSCGD.js} +1 -1
  108. package/dist/{chunk-65I35VBS.js → chunk-MMQZO2W2.js} +1 -1
  109. package/dist/{chunk-MIP2Y34N.js → chunk-MUM34KUM.js} +1 -1
  110. package/dist/{chunk-YXKMPCFH.js → chunk-MW3IMZJ5.js} +1 -1
  111. package/dist/{chunk-HYC3JXR4.js → chunk-MW3JKGJH.js} +1 -1
  112. package/dist/{chunk-WZEKBD7B.js → chunk-N55MSO3X.js} +5 -5
  113. package/dist/{chunk-PQMKPXFV.js → chunk-N5AZZYQA.js} +1 -1
  114. package/dist/{chunk-P2MVR6CG.js → chunk-NCRWOW6F.js} +1 -1
  115. package/dist/{chunk-MHZSSRHP.js → chunk-NCVGCVQ5.js} +1 -1
  116. package/dist/{chunk-ELQ5NPPB.js → chunk-NGSEF3UX.js} +1 -1
  117. package/dist/{chunk-3U2MYUWG.js → chunk-NT4A37HG.js} +1 -1
  118. package/dist/{chunk-Q4TZD2M6.js → chunk-NU5WLZ6Y.js} +1 -1
  119. package/dist/{chunk-TEASB2WU.js → chunk-NYYXH2SX.js} +1 -1
  120. package/dist/{chunk-RAQP66LR.js → chunk-O5FFMTJE.js} +1 -1
  121. package/dist/{chunk-2VDCTMLY.js → chunk-OE3HSNSE.js} +1 -1
  122. package/dist/{chunk-RY6TZDVV.js → chunk-ONF7XXEL.js} +1 -1
  123. package/dist/{chunk-5TQOMAJS.js → chunk-PB5ZZET5.js} +1 -1
  124. package/dist/{chunk-2NMICU24.js → chunk-PFXNBHQQ.js} +1 -1
  125. package/dist/{chunk-RGZCV56L.js → chunk-PG4S5HJJ.js} +1 -1
  126. package/dist/{chunk-Z5SFLTH6.js → chunk-PHG4DASY.js} +1 -1
  127. package/dist/{chunk-VXGXK66W.js → chunk-PO5T44H3.js} +1 -1
  128. package/dist/{chunk-ZJ4H3XEL.js → chunk-PP4VCR4Y.js} +1 -1
  129. package/dist/{chunk-RDO5IWB5.js → chunk-PVAZCZSY.js} +1 -1
  130. package/dist/chunk-PWS4VFSD.js +1 -0
  131. package/dist/{chunk-T6TYF72N.js → chunk-Q2XLIWG4.js} +1 -1
  132. package/dist/{chunk-ZZ7SOJHH.js → chunk-Q37WAD6F.js} +1 -1
  133. package/dist/{chunk-Q26ES5T3.js → chunk-Q43LBSPT.js} +1 -1
  134. package/dist/{chunk-VZLEYZLX.js → chunk-QAJZUJR5.js} +1 -1
  135. package/dist/{chunk-2X3HYG4B.js → chunk-QO5RNGWA.js} +1 -1
  136. package/dist/chunk-QPQS2YU3.js +1 -0
  137. package/dist/{chunk-Q555FV2X.js → chunk-QTLGMJDW.js} +1 -1
  138. package/dist/{chunk-ELJ34WWD.js → chunk-QUXQM3S3.js} +1 -1
  139. package/dist/{chunk-SRDKLZ4O.js → chunk-R3KSOCMB.js} +1 -1
  140. package/dist/{chunk-NS4FUSSK.js → chunk-R74WHKHH.js} +1 -1
  141. package/dist/chunk-R7YJNDXW.js +1 -0
  142. package/dist/chunk-RJSQMKKS.js +1 -0
  143. package/dist/{chunk-DGOBYP74.js → chunk-RK2V6OIJ.js} +1 -1
  144. package/dist/{chunk-U5L2P36D.js → chunk-RSC5NQAT.js} +1 -1
  145. package/dist/{chunk-4565O5TG.js → chunk-RUHQNF2W.js} +1 -1
  146. package/dist/{chunk-7ZNR4YL4.js → chunk-RXTLNUPF.js} +1 -1
  147. package/dist/{chunk-PGE4HGLA.js → chunk-S36VGP37.js} +1 -1
  148. package/dist/{chunk-KYBZ2MBA.js → chunk-SNE4RHM4.js} +1 -1
  149. package/dist/{chunk-BVVYKX4D.js → chunk-SQAS5RVZ.js} +1 -1
  150. package/dist/{chunk-AKP4QAGL.js → chunk-SZI6G247.js} +1 -1
  151. package/dist/{chunk-LWF4EV22.js → chunk-TFXUDHCP.js} +1 -1
  152. package/dist/{chunk-THW6UDZH.js → chunk-TPHHQAUD.js} +1 -1
  153. package/dist/{chunk-JLGXJHPX.js → chunk-TVCWDEVS.js} +1 -1
  154. package/dist/{chunk-2R2PKQQV.js → chunk-UEBUGSBT.js} +1 -1
  155. package/dist/{chunk-TPPBEVNQ.js → chunk-UIC7K2HX.js} +1 -1
  156. package/dist/{chunk-PG6XEOYF.js → chunk-UNHT4ZFP.js} +1 -1
  157. package/dist/{chunk-JUCOIXG5.js → chunk-UQ6ALA3Y.js} +1 -1
  158. package/dist/{chunk-EP5HIGAL.js → chunk-UU6BRRYS.js} +1 -1
  159. package/dist/{chunk-3F42A3XV.js → chunk-UWI76E2L.js} +3 -3
  160. package/dist/{chunk-EXKTQF26.js → chunk-VGBUN3CZ.js} +1 -1
  161. package/dist/{chunk-J66WAKXN.js → chunk-VMNOSVPT.js} +1 -1
  162. package/dist/{chunk-JAX56OYG.js → chunk-VNFUCH6T.js} +1 -1
  163. package/dist/{chunk-NDMISEDF.js → chunk-VS7QVU3Z.js} +1 -1
  164. package/dist/{chunk-XE5QH4D7.js → chunk-W4KE7AO6.js} +1 -1
  165. package/dist/{chunk-W56I6HOT.js → chunk-WEPO4J2F.js} +1 -1
  166. package/dist/{chunk-QN6SITWN.js → chunk-WEXOA4C4.js} +1 -1
  167. package/dist/{chunk-DH5E6NM3.js → chunk-WLWHCUPZ.js} +1 -1
  168. package/dist/{chunk-WNE2MZAZ.js → chunk-XGKCPD6W.js} +1 -1
  169. package/dist/{chunk-CGH5Y6XE.js → chunk-XNPUZRWP.js} +1 -1
  170. package/dist/{chunk-PYILLIGT.js → chunk-XNVOKAF2.js} +1 -1
  171. package/dist/{chunk-EJY4LA2S.js → chunk-XSMCQLJW.js} +1 -1
  172. package/dist/chunk-XUUIBSLW.js +1 -0
  173. package/dist/{chunk-RW2MONAS.js → chunk-XWQM2NZ2.js} +1 -1
  174. package/dist/{chunk-TWS34WUT.js → chunk-Y3PY5LP7.js} +1 -1
  175. package/dist/{chunk-FU4UVINZ.js → chunk-Y62EMOQA.js} +1 -1
  176. package/dist/{chunk-PQCALXSD.js → chunk-Y743UVBS.js} +1 -1
  177. package/dist/{chunk-OMEWUFUL.js → chunk-YBSX53QP.js} +1 -1
  178. package/dist/{chunk-7GJYJ6DU.js → chunk-YHCP326A.js} +1 -1
  179. package/dist/{chunk-B477XHLZ.js → chunk-YHESTFMZ.js} +1 -1
  180. package/dist/{chunk-R6IJRVVM.js → chunk-YPCXVZ2N.js} +1 -1
  181. package/dist/{chunk-HVU3D3ZU.js → chunk-YT27FIQN.js} +2 -2
  182. package/dist/{chunk-N4AR2B6D.js → chunk-YTR5JHNJ.js} +1 -1
  183. package/dist/{chunk-SHBB5GST.js → chunk-YYA5VGDW.js} +1 -1
  184. package/dist/{chunk-XRJ2GQ24.js → chunk-Z6X2GT6Q.js} +1 -1
  185. package/dist/{chunk-FNKTF2OF.js → chunk-ZEBMW5KS.js} +1 -1
  186. package/dist/{chunk-SZ2JOXTG.js → chunk-ZEE32UH6.js} +1 -1
  187. package/dist/{chunk-4S2WKMLJ.js → chunk-ZTICX3AO.js} +1 -1
  188. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  189. package/dist/cli/commands/app/build.js +1 -1
  190. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  191. package/dist/cli/commands/app/bulk/execute.js +1 -1
  192. package/dist/cli/commands/app/bulk/status.js +1 -1
  193. package/dist/cli/commands/app/config/link.js +1 -1
  194. package/dist/cli/commands/app/config/pull.js +1 -1
  195. package/dist/cli/commands/app/config/use.js +1 -1
  196. package/dist/cli/commands/app/config/validate.js +1 -1
  197. package/dist/cli/commands/app/demo/watcher.js +1 -1
  198. package/dist/cli/commands/app/deploy.js +1 -1
  199. package/dist/cli/commands/app/dev/clean.js +1 -1
  200. package/dist/cli/commands/app/dev.js +1 -1
  201. package/dist/cli/commands/app/env/pull.js +1 -1
  202. package/dist/cli/commands/app/env/show.js +1 -1
  203. package/dist/cli/commands/app/execute.js +1 -1
  204. package/dist/cli/commands/app/function/build.js +1 -1
  205. package/dist/cli/commands/app/function/info.js +1 -1
  206. package/dist/cli/commands/app/function/replay.js +1 -1
  207. package/dist/cli/commands/app/function/run.js +1 -1
  208. package/dist/cli/commands/app/function/schema.js +1 -1
  209. package/dist/cli/commands/app/function/typegen.js +1 -1
  210. package/dist/cli/commands/app/generate/extension.js +1 -1
  211. package/dist/cli/commands/app/graphiql.js +1 -1
  212. package/dist/cli/commands/app/import/channel-config.js +1 -1
  213. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  214. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  215. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  216. package/dist/cli/commands/app/import-extensions.js +1 -1
  217. package/dist/cli/commands/app/info.js +1 -1
  218. package/dist/cli/commands/app/init.js +1 -1
  219. package/dist/cli/commands/app/logs.js +1 -1
  220. package/dist/cli/commands/app/release.js +1 -1
  221. package/dist/cli/commands/app/security/check.js +1 -1
  222. package/dist/cli/commands/app/security/clean.js +1 -1
  223. package/dist/cli/commands/app/security/instructions.js +1 -1
  224. package/dist/cli/commands/app/security/record.js +1 -1
  225. package/dist/cli/commands/app/security/review.js +1 -1
  226. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  227. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  228. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  229. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  230. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  231. package/dist/cli/commands/app/versions/list.js +1 -1
  232. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  233. package/dist/cli/commands/auth/login.js +1 -1
  234. package/dist/cli/commands/auth/logout.js +1 -1
  235. package/dist/cli/commands/cache/clear.js +1 -1
  236. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  237. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  238. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  239. package/dist/cli/commands/debug/command-flags.js +1 -1
  240. package/dist/cli/commands/doc/fetch.js +1 -1
  241. package/dist/cli/commands/doc/search.js +1 -1
  242. package/dist/cli/commands/docs/generate.js +1 -1
  243. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  244. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  245. package/dist/cli/commands/help.js +1 -1
  246. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  247. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  248. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  249. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  250. package/dist/cli/commands/notifications/generate.js +1 -1
  251. package/dist/cli/commands/notifications/list.js +1 -1
  252. package/dist/cli/commands/organization/list.js +1 -1
  253. package/dist/cli/commands/search.js +1 -1
  254. package/dist/cli/commands/send-analytics.js +1 -1
  255. package/dist/cli/commands/theme/check.js +1 -1
  256. package/dist/cli/commands/theme/console.js +1 -1
  257. package/dist/cli/commands/theme/delete.js +1 -1
  258. package/dist/cli/commands/theme/dev.js +1 -1
  259. package/dist/cli/commands/theme/duplicate.js +1 -1
  260. package/dist/cli/commands/theme/info.js +1 -1
  261. package/dist/cli/commands/theme/init.js +1 -1
  262. package/dist/cli/commands/theme/language-server.js +1 -1
  263. package/dist/cli/commands/theme/list.js +1 -1
  264. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  265. package/dist/cli/commands/theme/open.js +1 -1
  266. package/dist/cli/commands/theme/package.js +1 -1
  267. package/dist/cli/commands/theme/preview.js +1 -1
  268. package/dist/cli/commands/theme/profile.js +1 -1
  269. package/dist/cli/commands/theme/publish.js +1 -1
  270. package/dist/cli/commands/theme/pull.js +1 -1
  271. package/dist/cli/commands/theme/push.js +1 -1
  272. package/dist/cli/commands/theme/rename.js +1 -1
  273. package/dist/cli/commands/theme/share.js +1 -1
  274. package/dist/cli/commands/upgrade.js +1 -1
  275. package/dist/cli/commands/version.js +1 -1
  276. package/dist/cli/help.js +1 -1
  277. package/dist/{command-json-schema-HYYJSZAH.js → command-json-schema-SS4GDJTQ.js} +1 -1
  278. package/dist/command-registry.js +1 -1
  279. package/dist/{conf-store-CDZ5YSQM.js → conf-store-54YJCIDK.js} +1 -1
  280. package/dist/{custom-oclif-loader-NVOK22CJ.js → custom-oclif-loader-3UBH7Q7R.js} +1 -1
  281. package/dist/{deprecations-33DG6ZUL.js → deprecations-ZX7ZKF6L.js} +1 -1
  282. package/dist/dist-JMNE7MP6.js +1 -0
  283. package/dist/dist-M2AXGBOL.js +1 -0
  284. package/dist/{environment-ZUTBXY7U.js → environment-RSUK27TA.js} +1 -1
  285. package/dist/environments-KD2IDYPG.js +1 -0
  286. package/dist/{error-V77H2UYX.js → error-AA6LW3PN.js} +1 -1
  287. package/dist/error-handler-4VW3AV2G.js +1 -0
  288. package/dist/{fs-SKH3XZU7.js → fs-4QZCAEP7.js} +1 -1
  289. package/dist/hooks/did-you-mean.js +1 -1
  290. package/dist/hooks/hydrogen-init.js +1 -1
  291. package/dist/hooks/postrun.js +1 -1
  292. package/dist/hooks/prerun.js +1 -1
  293. package/dist/hooks/public-metadata.js +1 -1
  294. package/dist/hooks/sensitive-metadata.js +1 -1
  295. package/dist/hooks/tunnel-provider.js +1 -1
  296. package/dist/hooks/tunnel-start.js +1 -1
  297. package/dist/index.js +1 -1
  298. package/dist/{is-global-2G4BLF7H.js → is-global-FKG327CG.js} +1 -1
  299. package/dist/{json-error-WSMAL66C.js → json-error-32ETFU3V.js} +1 -1
  300. package/dist/{local-G2Z24BHM.js → local-R3UAQN7T.js} +1 -1
  301. package/dist/{metadata-Y3RKC4P2.js → metadata-JWJG4JV4.js} +1 -1
  302. package/dist/{node-package-manager-A7HTBJKY.js → node-package-manager-M4XHUTQR.js} +1 -1
  303. package/dist/notifications-system-QVM2JWKB.js +1 -0
  304. package/dist/{os-7VQXVZWF.js → os-FEHBQQKP.js} +1 -1
  305. package/dist/{output-ZFFHJGNK.js → output-2LS5AOAH.js} +1 -1
  306. package/dist/{path-6YMSTSWG.js → path-CPAYTWQW.js} +1 -1
  307. package/dist/system-TMD2LYZM.js +1 -0
  308. package/dist/tsconfig.tsbuildinfo +1 -1
  309. package/dist/{ui-YSFALYSL.js → ui-FNPICAAH.js} +1 -1
  310. package/dist/upgrade-YYPP5VZY.js +1 -0
  311. package/dist/version-OX3MORI6.js +1 -0
  312. package/dist/version-P7D5ME4Z.js +1 -0
  313. package/dist/{workerd-RNDPF36Q.js → workerd-TKVRZK2F.js} +1 -1
  314. package/oclif.manifest.json +37 -13
  315. package/package.json +7 -7
  316. package/dist/analytics-H2ANKZ2S.js +0 -1
  317. package/dist/analytics-Q6HJRPRX.js +0 -1
  318. package/dist/chunk-246AZCDT.js +0 -1
  319. package/dist/chunk-3VYOLEQE.js +0 -2
  320. package/dist/chunk-5JW2EYSE.js +0 -15
  321. package/dist/chunk-6SO5GA6P.js +0 -2
  322. package/dist/chunk-BK4VCXDD.js +0 -1
  323. package/dist/chunk-DV77BSKW.js +0 -1
  324. package/dist/chunk-FQKURDZR.js +0 -6
  325. package/dist/chunk-IOS4IDZ2.js +0 -3
  326. package/dist/chunk-JUVJNIEA.js +0 -1
  327. package/dist/chunk-KOYBR5MV.js +0 -1
  328. package/dist/chunk-P6TOIMMF.js +0 -1
  329. package/dist/chunk-QLHPTMIH.js +0 -1
  330. package/dist/chunk-SDHDDNKM.js +0 -4
  331. package/dist/chunk-TQ7MHGY4.js +0 -1
  332. package/dist/chunk-TUE67I2F.js +0 -7
  333. package/dist/chunk-YTJ3EPD3.js +0 -1
  334. package/dist/chunk-Z57YWHOE.js +0 -1
  335. package/dist/dist-DODCXJ2A.js +0 -1
  336. package/dist/dist-YXMAKIFS.js +0 -1
  337. package/dist/environments-KBRQNE4R.js +0 -1
  338. package/dist/error-handler-JY3ZKE2G.js +0 -1
  339. package/dist/notifications-system-E64OSVXF.js +0 -1
  340. package/dist/system-ZLITSFDC.js +0 -1
  341. package/dist/upgrade-I4JTR4LA.js +0 -1
  342. package/dist/version-AOVO47AW.js +0 -1
  343. package/dist/version-LQV54JBC.js +0 -1
@@ -1,3 +1,3 @@
1
- import{a as I}from"./chunk-LFOBYEWG.js";import{j as w}from"./chunk-3E3MCY5O.js";import{w as l}from"./chunk-FQKURDZR.js";import{m as u,n as m}from"./chunk-Q555FV2X.js";import{a as h}from"./chunk-TQ7MHGY4.js";import{A as y,B as N,S,y as g}from"./chunk-RCYQPOJW.js";import{k as d}from"./chunk-YTJ3EPD3.js";import{k as _}from"./chunk-ZZ7SOJHH.js";import{Nb as a,b as n}from"./chunk-3F42A3XV.js";import{a as f}from"./chunk-JD5P5RAJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var C="https://cdn.shopify.com/static/cli/notifications.json",T="Cache is empty",O=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear","send-analytics"],$=["127.0.0.1","localhost","::1","[::1]"];function c(){let e=process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;if(e)try{let t=new globalThis.URL(e);if(v(t))return e;a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) must use https, or http with a loopback host. Falling back to default.`)}catch{a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) is not a valid URL. Falling back to default.`)}return C}function v(e){return e.protocol==="https:"?!0:e.protocol==="http:"&&$.includes(e.hostname)}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),x=n.object({notifications:n.array(E)});async function Z(e,t=process.env){try{let r=I();if(D(r,t)||d(t))return;let o=await k(),i=A(o.notifications,r,e);a(`Notifications to show: ${i.length}`),await L(i)}catch(r){if(r.message===T){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:i}=await import("./error-handler-JY3ZKE2G.js");await i(o,"unexpected_error")}}function D(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||O.includes(e)}async function L(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
1
+ import{a as I}from"./chunk-LFOBYEWG.js";import{j as w}from"./chunk-3V4VL3SD.js";import{w as l}from"./chunk-3C4WVKSO.js";import{m as u,n as m}from"./chunk-QTLGMJDW.js";import{a as h}from"./chunk-XUUIBSLW.js";import{A as y,B as N,S,y as g}from"./chunk-47IQIIFX.js";import{k as d}from"./chunk-HILYTMVA.js";import{k as _}from"./chunk-Q37WAD6F.js";import{Nb as a,b as n}from"./chunk-UWI76E2L.js";import{a as f}from"./chunk-JD5P5RAJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var C="https://cdn.shopify.com/static/cli/notifications.json",T="Cache is empty",O=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear","send-analytics"],$=["127.0.0.1","localhost","::1","[::1]"];function c(){let e=process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;if(e)try{let t=new globalThis.URL(e);if(v(t))return e;a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) must use https, or http with a loopback host. Falling back to default.`)}catch{a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) is not a valid URL. Falling back to default.`)}return C}function v(e){return e.protocol==="https:"?!0:e.protocol==="http:"&&$.includes(e.hostname)}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),x=n.object({notifications:n.array(E)});async function Z(e,t=process.env){try{let r=I();if(D(r,t)||d(t))return;let o=await k(),i=A(o.notifications,r,e);a(`Notifications to show: ${i.length}`),await L(i)}catch(r){if(r.message===T){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:i}=await import("./error-handler-4VW3AV2G.js");await i(o,"unexpected_error")}}function D(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||O.includes(e)}async function L(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
2
2
  `),link:t.cta};switch(t.type){case"info":{g(r);break}case"warning":{y(r);break}case"error":throw N(r),new Error("abort")}u(`notification-${t.id}`,new Date().getTime().toString())})}async function k(){let e=`notifications-${c()}`,t=m(e)?.value;if(!t)throw new Error(T);let r=JSON.parse(t);return x.parse(r)}async function ee(){a("Fetching notifications...");let e=await w(c(),void 0,{useNetworkLevelRetry:!1,useAbortSignal:!0,timeoutMs:3*1e3});if(e.status!==200)throw new Error(`Failed to fetch notifications: ${e.statusText}`);let t=await e.text(),r=JSON.parse(t),o=x.parse(r);return await F(t),o}async function F(e){u(`notifications-${c()}`,e),a(`Notifications from ${c()} stored in the cache`)}function te(e,t=process.argv,r=process.env){if(D(e,r)||!t[1])return;let o=process.execPath,s=[t[1],"notifications","list","--ignore-errors"];S(o,s,{background:!0,env:{...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},externalErrorHandler:async b=>{a(`Failed to fetch notifications in background: ${b.message}`)}})}function A(e,t,r,o=new Date(new Date().setUTCHours(0,0,0,0)),i=h){return e.filter(s=>V(s,i)).filter(s=>B(s,o)).filter(s=>R(s,t)).filter(s=>U(s,t,r)).filter(s=>H(s))}function V(e,t){let r=!e.minVersion||l(t,`>=${e.minVersion}`),o=!e.maxVersion||l(t,`<=${e.maxVersion}`);return r&&o}function B(e,t){let r=!e.minDate||new Date(e.minDate)<=t,o=!e.maxDate||new Date(e.maxDate)>=t;return r&&o}function R(e,t){return t===""?!0:!e.commands||e.commands.includes(t)}function U(e,t,r){let o=t.split(":")[0]??"all",i=e.surface??"all";return r?r.includes(i):i===o||i==="all"}function H(e){if(!e.frequency)return!0;let t=`notification-${e.id}`,r=m(t)?.value;if(!r)return!0;switch(e.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(r)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(r)>168*3600*1e3}}function re(e){let t=[];return e.minDate&&t.push(`from ${e.minDate}`),e.maxDate&&t.push(`to ${e.maxDate}`),e.minVersion&&t.push(`from v${e.minVersion}`),e.maxVersion&&t.push(`to v${e.maxVersion}`),e.frequency==="once"&&t.push("show only once"),e.frequency==="once_a_day"&&t.push("show once a day"),e.frequency==="once_a_week"&&t.push("show once a week"),e.surface&&t.push(`surface = ${e.surface}`),e.commands&&t.push(`commands = ${e.commands.join(", ")}`),t.join(`
3
3
  `)}export{Z as a,k as b,ee as c,te as d,A as e,re as f};
@@ -0,0 +1,3 @@
1
+ import{a as S}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-DYPZX7MW.js";import{f as k}from"./chunk-DSS4ECIH.js";import{i}from"./chunk-Q37WAD6F.js";import{Cb as o,Eb as a,Ia as v,Nb as d,Xa as I,_a as E,oa as C}from"./chunk-UWI76E2L.js";import{a as D,r as m}from"./chunk-UEBUGSBT.js";import{p}from"./chunk-6IDEDOXW.js";import{a as T}from"./chunk-CX5CC6P5.js";import{e as G,g as b}from"./chunk-VKWPEFWQ.js";b();var A=G(T()),O=G(S());async function s(t,e){try{return(await f("git",t,{cwd:e})).stdout}catch(r){if(r instanceof Error){let n=new i(r.message);throw n.stack=r.stack,"exitCode"in r&&Object.assign(n,{exitCode:r.exitCode}),n}throw r}}async function Z(t,e="main"){if(e.startsWith("-"))throw new i(`Invalid initial branch name: ${e}. Branch names can't start with a hyphen.`);d(a`Initializing git repository at ${o.path(t)}...`),await w(),await s(["init"],t),await s(["checkout","-b",e],t)}async function V(t,e){try{return(await s(["check-ignore",...e],t)).split(`
2
+ `).filter(Boolean)}catch(r){if(r instanceof i&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function tt(t){return k("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:r,shallow:n,latestTag:c}=t;if(d(a`Git-cloning repository ${e} into ${o.path(r)}...`),await w(),await I(r)){if(!await v(r))throw new i(a`Can't clone to ${o.path(r)}`,"The path exists but isn't a directory.");if((await E(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new i(a`Directory ${o.path(r)} already exists and is not empty`,a`Choose a different name or remove the existing directory first.`)}let[h,g]=e.split("#");if(g&&c)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&c)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let l=["clone","--recurse-submodules"];g&&l.push("--branch",g),n&&l.push("--depth","1"),D()||l.push("-c","core.askpass=true"),l.push(h,r);try{if(await f("git",l),c){let u=await _(r,e);await s(["checkout",u],r)}}catch(u){if(u instanceof i)throw u;if(u instanceof Error){let $=new i(u.message);throw $.stack=u.stack,$}throw u}})}async function _(t,e){let r=await L(t);if(!r)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return r}async function et(t){let r=await s(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!r.trim())throw new i("Must have at least one commit to run command",a`Run ${o.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=r.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function rt(t){await s(["add","--all"],t)}async function nt(t,e){let r=["commit","-m",t];if(e?.author){if(e.author.startsWith("-"))throw new i(`Invalid commit author: ${e.author}. Author name/email can't start with a hyphen.`);r.push("--author",e.author)}return await s(r,e?.directory),(await s(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await m())throw new i("Git is necessary in the environment to continue",a`Install ${o.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}function F(t){let e=/^git version (?<version>\d+\.\d+\.\d+)(?<suffix>[.\s-].*)?$/.exec(t.trim()),r=e?.groups?.version;if(!r)return;let c=/^(?:\.rc|-rc\.?)(?<number>\d+)(?:[.\s-].*)?$/.exec(e.groups?.suffix??"")?.groups?.number;return c?`${r}-rc.${c}`:r}async function it(t,e={}){let r=await C(c=>H(t,{cwd:e.cwd,env:{GIT_DIR:c}})),n=F(r);if(!n)throw d(a`Unrecognized git --version output: ${o.raw(JSON.stringify(r.slice(0,200)))}`),new i("Couldn't determine the installed Git version.",`Install Git ${t} or later, then try again.`);if((0,A.lt)(n,t))throw new i(`Git ${t} or later is required, but version ${n} is installed.`,`Upgrade Git to version ${t} or later, then try again.`)}async function H(t,e){let{captureOutput:r}=await import("./system-TMD2LYZM.js");try{return await r("git",["--version"],e)}catch(n){if(n instanceof i)throw n;if(n instanceof Error&&"code"in n&&n.code==="ENOENT")throw new i(`Git ${t} or later is required, but Git isn't installed.`,`Install Git ${t} or later, then try again.`);let c=n instanceof Error?n.message:String(n);d(a`Couldn't run git --version: ${o.raw(c)}`);let h=n instanceof Error&&"stderr"in n&&typeof n.stderr=="string"?n.stderr.trim():"";throw new i(h?`Couldn't run Git to check its version: ${h}`:"Couldn't run Git to check its version.",`Check that Git ${t} or later is installed and can run, then try again.`)}}var y=class extends i{};async function ot(t){if(await w(),!await R(t))throw new y(`${o.path(t??p())} is not a Git directory`)}async function at(t){return await m()?R(t):!1}async function R(t){try{return await f("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var x=class extends i{};async function st(t){if(!await j(t))throw new x(`${o.path(t??p())} is not a clean Git directory`)}async function j(t){return(await s(["status","--porcelain"],t)).trim()===""}async function L(t){try{return(await s(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof i&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ct(t,e="origin"){if(d(a`Removing git remote ${e} from ${o.path(t)}...`),await w(),!(await s(["remote"],t)).split(`
3
+ `).filter(Boolean).includes(e)){d(a`Remote ${e} does not exist, no action needed`);return}await s(["remote","remove",e],t)}export{Z as a,V as b,tt as c,et as d,rt as e,nt as f,it as g,ot as h,at as i,x as j,st as k,j as l,ct as m};
@@ -1 +1 @@
1
- import{g as l,ka as d,pa as z,qa as y}from"./chunk-PQCALXSD.js";import{b as g,c as f,d as h}from"./chunk-Q4TZD2M6.js";import{b as n}from"./chunk-EZ5F4ZFY.js";import{G as c}from"./chunk-RCYQPOJW.js";import{a as u}from"./chunk-MQZPASSP.js";import{Ib as p,b as o}from"./chunk-3F42A3XV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
1
+ import{g as l,ka as d,pa as z,qa as y}from"./chunk-Y743UVBS.js";import{b as g,c as f,d as h}from"./chunk-NU5WLZ6Y.js";import{b as n}from"./chunk-4ZNBEMRT.js";import{G as c}from"./chunk-47IQIIFX.js";import{a as u}from"./chunk-7VAKNVFD.js";import{Ib as p,b as o}from"./chunk-UWI76E2L.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
@@ -1 +1 @@
1
- import{a as F,c as q}from"./chunk-IQIUFTR6.js";import{d as x,f as A,u as N}from"./chunk-FICC6IFE.js";import{a as J}from"./chunk-KOYBR5MV.js";import{a as k,c as E}from"./chunk-VXGXK66W.js";import{b}from"./chunk-DH5E6NM3.js";import{b as O}from"./chunk-Q4TZD2M6.js";import{b as I,c as y}from"./chunk-3E3MCY5O.js";import{B as v,I as f,z as d}from"./chunk-RCYQPOJW.js";import{i as l}from"./chunk-ZZ7SOJHH.js";import{Cb as c,Eb as s,Ib as S,Xa as g,qa as h,ya as w}from"./chunk-3F42A3XV.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();var C=Q(I(),1);async function z(a,e){if(a)try{return JSON.parse(a)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new l(s`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await g(e))throw new l(s`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await h(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let n=r instanceof Error?r.message:"Unknown error";throw new l(s`Invalid JSON in variable file ${c.path(e)}: ${n}`,"Please provide valid JSON format.")}}}async function $(a){let{remoteApp:e,store:t,query:r,variables:n,variableFile:L,version:M,outputFile:u}=a,{adminSession:R,version:V}=await f({title:s`Authenticating`,task:async()=>{let o=await F(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:M});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),G=await z(n,L);x(r),q(r,t);try{let o=await f({title:s`Executing GraphQL operation`,task:async()=>b({query:(0,C.parse)(r),session:R,variables:G,version:V,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);u?(await w(u,i),d({headline:"Operation succeeded.",body:`Results written to ${u}`})):(d({headline:"Operation succeeded."}),S(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},P=JSON.stringify(i,null,2);v({headline:"GraphQL operation failed.",body:P});return}throw o}}var m=class a extends J{static summary="Execute GraphQL queries and mutations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";static description=this.descriptionForHelp();static flags={...O,...k,...E};async run(){let{flags:e}=await this.parse(a),{query:t,appContextResult:r,store:n}=await N(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:n,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};export{m as a};
1
+ import{a as F,c as q}from"./chunk-7A3RW2VM.js";import{d as x,f as A,u as N}from"./chunk-BVB3DTNE.js";import{a as J}from"./chunk-PWS4VFSD.js";import{a as k,c as E}from"./chunk-PO5T44H3.js";import{b}from"./chunk-WLWHCUPZ.js";import{b as O}from"./chunk-NU5WLZ6Y.js";import{b as I,c as y}from"./chunk-3V4VL3SD.js";import{B as v,I as f,z as d}from"./chunk-47IQIIFX.js";import{i as l}from"./chunk-Q37WAD6F.js";import{Cb as c,Eb as s,Ib as S,Xa as g,qa as h,ya as w}from"./chunk-UWI76E2L.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();var C=Q(I(),1);async function z(a,e){if(a)try{return JSON.parse(a)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new l(s`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await g(e))throw new l(s`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await h(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let n=r instanceof Error?r.message:"Unknown error";throw new l(s`Invalid JSON in variable file ${c.path(e)}: ${n}`,"Please provide valid JSON format.")}}}async function $(a){let{remoteApp:e,store:t,query:r,variables:n,variableFile:L,version:M,outputFile:u}=a,{adminSession:R,version:V}=await f({title:s`Authenticating`,task:async()=>{let o=await F(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:M});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),G=await z(n,L);x(r),q(r,t);try{let o=await f({title:s`Executing GraphQL operation`,task:async()=>b({query:(0,C.parse)(r),session:R,variables:G,version:V,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);u?(await w(u,i),d({headline:"Operation succeeded.",body:`Results written to ${u}`})):(d({headline:"Operation succeeded."}),S(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},P=JSON.stringify(i,null,2);v({headline:"GraphQL operation failed.",body:P});return}throw o}}var m=class a extends J{static summary="Execute GraphQL queries and mutations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";static description=this.descriptionForHelp();static flags={...O,...k,...E};async run(){let{flags:e}=await this.parse(a),{query:t,appContextResult:r,store:n}=await N(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:n,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};export{m as a};
@@ -1 +1 @@
1
- import{d as s}from"./chunk-3VYOLEQE.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),a=p.tmpdir(),{env:i}=c,E=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(a,o)}},A=o=>{let t=i.APPDATA||e.join(n,"AppData","Roaming"),_=i.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(_,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(_,o,"Cache"),log:e.join(_,o,"Log"),temp:e.join(a,o)}},S=o=>{let t=e.basename(n);return{data:e.join(i.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(i.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(i.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(i.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(a,t,o)}};function I(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?E(o):c.platform==="win32"?A(o):S(o)}var T="shopify-cli",O=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:I(T).cache;var C={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},P="theme-kit-access.shopifyapps.com",F={backendPort:"BACKEND_PORT"},h={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>O(),vendor:{path:()=>s(O(),"vendor"),binaries:()=>s(O(),"vendor","binaries")}}}},m={expirationTimeMarginInMinutes:4},Y="9e1e6889176fd0c795d5c659225e0fae",u={limit:300,timeout:{days:1}},f=process.env[C.themeKitAccessDomain]??P;export{I as a,C as b,P as c,F as d,h as e,m as f,Y as g,u as h,f as i};
1
+ import{c as s}from"./chunk-6IDEDOXW.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),a=p.tmpdir(),{env:i}=c,E=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(a,o)}},A=o=>{let t=i.APPDATA||e.join(n,"AppData","Roaming"),_=i.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(_,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(_,o,"Cache"),log:e.join(_,o,"Log"),temp:e.join(a,o)}},S=o=>{let t=e.basename(n);return{data:e.join(i.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(i.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(i.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(i.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(a,t,o)}};function I(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?E(o):c.platform==="win32"?A(o):S(o)}var T="shopify-cli",O=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:I(T).cache;var C={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},P="theme-kit-access.shopifyapps.com",F={backendPort:"BACKEND_PORT"},h={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>O(),vendor:{path:()=>s(O(),"vendor"),binaries:()=>s(O(),"vendor","binaries")}}}},m={expirationTimeMarginInMinutes:4},Y="9e1e6889176fd0c795d5c659225e0fae",u={limit:300,timeout:{days:1}},f=process.env[C.themeKitAccessDomain]??P;export{I as a,C as b,P as c,F as d,h as e,m as f,Y as g,u as h,f as i};
@@ -1 +1 @@
1
- import{j as a}from"./chunk-3E3MCY5O.js";import{i as s}from"./chunk-ZZ7SOJHH.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=T(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function l(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function d(t,e){if(!c(t,e))throw new s(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",f(e));let r=e;return l(t)&&(r=n.LOCALHOST),[t.trim(),r]}function f(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new s(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function A(t,e,r){if(r.length===0)throw new s(`No topics found for '${e}'`);let o=h(t.trim(),r);if(o===void 0)throw new s(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return o}function h(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function T(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(l(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}i();async function O(t,e,r){let{sendSampleWebhook:o}=await t.sendSampleWebhook(e,r);return o}i();async function H(t,e,r){let o={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},u=await a(t,o);return u.status>=200&&u.status<300}i();async function m(t,e){let{publicApiVersions:r}=await t.apiVersions(e),o=r.indexOf("unstable");return o===-1?r.sort().reverse():(r.splice(o,1),r.sort().reverse(),r.push("unstable")),r}export{m as a,O as b,H as c,n as d,c as e,d as f,g,A as h,T as i};
1
+ import{j as a}from"./chunk-3V4VL3SD.js";import{i as s}from"./chunk-Q37WAD6F.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=T(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function l(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function d(t,e){if(!c(t,e))throw new s(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",f(e));let r=e;return l(t)&&(r=n.LOCALHOST),[t.trim(),r]}function f(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new s(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function A(t,e,r){if(r.length===0)throw new s(`No topics found for '${e}'`);let o=h(t.trim(),r);if(o===void 0)throw new s(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return o}function h(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function T(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(l(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}i();async function O(t,e,r){let{sendSampleWebhook:o}=await t.sendSampleWebhook(e,r);return o}i();async function H(t,e,r){let o={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},u=await a(t,o);return u.status>=200&&u.status<300}i();async function m(t,e){let{publicApiVersions:r}=await t.apiVersions(e),o=r.indexOf("unstable");return o===-1?r.sort().reverse():(r.splice(o,1),r.sort().reverse(),r.push("unstable")),r}export{m as a,O as b,H as c,n as d,c as e,d as f,g,A as h,T as i};
@@ -1 +1 @@
1
- import{b as f,c as r,d as h}from"./chunk-MHZSSRHP.js";import{a as l}from"./chunk-KOYBR5MV.js";import{a as c}from"./chunk-VXGXK66W.js";import{Ha as m}from"./chunk-PG6XEOYF.js";import{b as d}from"./chunk-Q4TZD2M6.js";import{Kb as e}from"./chunk-3F42A3XV.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-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,4 +1,4 @@
1
- import{o as R}from"./chunk-RCYQPOJW.js";import{i as E}from"./chunk-ZZ7SOJHH.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-3F42A3XV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=u({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
1
+ import{o as R}from"./chunk-47IQIIFX.js";import{i as E}from"./chunk-Q37WAD6F.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-UWI76E2L.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=u({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
2
2
  `).filter(Boolean),a.payload.inputQueryVariablesMetafieldValue&&(a.payload.inputQueryVariablesMetafieldValue=x(a.payload.inputQueryVariablesMetafieldValue))),o?JSON.stringify(a,null,2):JSON.stringify(a)},pe=(t,e)=>{let r=u(JSON.parse(t));return e===V?new l(r):e===U?new h(r):e===q?new d(r):e===J?new y(r):r},ue=async(t,e,r,o)=>{let n=await t.subscribeToAppLogs(e,r);if(!n.appLogsSubscribe)throw new E("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:a,errors:f}=n.appLogsSubscribe;if(p(`Token: ${s}
3
3
  `),p(`API Key: ${e.apiKey}
4
4
  `),f&&f.length>0){let c=f.join(", ");throw await R({stripAnsi:!1},()=>{m(`Errors subscribing to app logs: ${c}`,o),m("App log streaming is not available in this session.",o)}),new E(c)}else{if(!s)throw new E("Failed to subscribe to app logs: No response received");let c=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];p(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),a!==void 0&&p(`Success: ${a}
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-KOYBR5MV.js";import{a as D}from"./chunk-VXGXK66W.js";import{Aa as m,Ba as _,Ha as L}from"./chunk-PG6XEOYF.js";import{b as A,c as $}from"./chunk-Q4TZD2M6.js";import{A as R,z as F}from"./chunk-RCYQPOJW.js";import{a as S}from"./chunk-MQZPASSP.js";import{i}from"./chunk-ZZ7SOJHH.js";import{Aa as N,Ib as v,Xa as T,b as s,fb as O,ya as C}from"./chunk-3F42A3XV.js";import{b as Y}from"./chunk-I3J63RFV.js";import{d as l,g as d,i as b,j as E}from"./chunk-3VYOLEQE.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-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"
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:
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-IDKRJ2F4.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-55QTRPZ2.js";import{D as c,F as l,I as d,a as p}from"./chunk-Q7PF4VKI.js";import{b as n}from"./chunk-Q4TZD2M6.js";import{b as a}from"./chunk-EZ5F4ZFY.js";import{b as f}from"./chunk-I3J63RFV.js";import{f as s}from"./chunk-3VYOLEQE.js";import{e as h,g as r}from"./chunk-VKWPEFWQ.js";r();var i=h(f(),1);var o=class u extends a{static summary="Provide app security check instructions to a coding agent.";static descriptionWithMarkdown="Prints the complete workflow that a coding agent should follow to review app security check results.\n\nBy default, the instructions are printed to stdout. Use `--copy` to copy them to the clipboard or `--write` to write them to a file. Standalone instructions always start by running `shopify app security check`; only that invocation's generated review pack is trusted as workflow input.";static description=this.descriptionWithoutMarkdown();static flags={...n,...p,copy:i.Flags.boolean({description:"Copy the instructions to the clipboard instead of printing them.",default:!1,exclusive:["write"],env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_COPY"}),write:i.Flags.string({description:"Write the instructions to a file instead of printing them.",exclusive:["copy"],parse:async t=>s(t),env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_WRITE"})};async run(){let{flags:t}=await this.parse(u),e=await l({path:t.path,config:t.config,clientId:t["client-id"],withoutAppConfig:t["without-app-config"],allowPrompts:!1});await m({appDirectory:e.appDirectory,resultsKey:c(e),commands:d(e,t.path),copy:t.copy,writePath:t.write})}};export{o as a};
1
+ import{a as m}from"./chunk-C6IBY7NW.js";import{D as c,F as l,I as d,a as p}from"./chunk-EO4YJFMY.js";import{b as n}from"./chunk-NU5WLZ6Y.js";import{b as a}from"./chunk-4ZNBEMRT.js";import{b as f}from"./chunk-I3J63RFV.js";import{e as s}from"./chunk-6IDEDOXW.js";import{e as h,g as r}from"./chunk-VKWPEFWQ.js";r();var i=h(f(),1);var o=class u extends a{static summary="Provide app security check instructions to a coding agent.";static descriptionWithMarkdown="Prints the complete workflow that a coding agent should follow to review app security check results.\n\nBy default, the instructions are printed to stdout. Use `--copy` to copy them to the clipboard or `--write` to write them to a file. Standalone instructions always start by running `shopify app security check`; only that invocation's generated review pack is trusted as workflow input.";static description=this.descriptionWithoutMarkdown();static flags={...n,...p,copy:i.Flags.boolean({description:"Copy the instructions to the clipboard instead of printing them.",default:!1,exclusive:["write"],env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_COPY"}),write:i.Flags.string({description:"Write the instructions to a file instead of printing them.",exclusive:["copy"],parse:async t=>s(t),env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_WRITE"})};async run(){let{flags:t}=await this.parse(u),e=await l({path:t.path,config:t.config,clientId:t["client-id"],withoutAppConfig:t["without-app-config"],allowPrompts:!1});await m({appDirectory:e.appDirectory,resultsKey:c(e),commands:d(e,t.path),copy:t.copy,writePath:t.write})}};export{o as a};
@@ -1 +1 @@
1
- import{a as t}from"./chunk-525BMYNR.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
1
+ import{a as t}from"./chunk-45SZ5PSE.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
@@ -1,3 +1,3 @@
1
- import{a as j}from"./chunk-U5L2P36D.js";import{c as O,i as x,o as R}from"./chunk-PI6FLLDD.js";import{e as k}from"./chunk-2X3HYG4B.js";import{a as E}from"./chunk-ELJ34WWD.js";import{p as v,v as A}from"./chunk-TWS34WUT.js";import{b as F,c as L}from"./chunk-Q4TZD2M6.js";import{N as y}from"./chunk-RCYQPOJW.js";import{i as T}from"./chunk-ZZ7SOJHH.js";import{Ib as S,Nb as n,db as $,pa as w,ya as P}from"./chunk-3F42A3XV.js";import{b as D}from"./chunk-I3J63RFV.js";import{d as l,i as u}from"./chunk-3VYOLEQE.js";import{e as q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();import{fileURLToPath as U}from"node:url";async function _(...r){let e=await $("package.json",{cwd:U(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?l(u(e),"assets",...r):l(u(e),"dist","assets",...r)}async function b(r,e,i,t,a,m){let c=await O(r)?await j(m,r.storeFqdn):void 0;if(a)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await R(e,r,a,c),o=await x(f,{method:"GET",path:i,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let h=await o.text();throw new Error(`Bad response: ${o.status}: ${h}`)}let s=await o.text();t?S(s):await H(s)}async function H(r){let e=process.env.WSL_DISTRO_NAME,i=e?`//wsl$/${e}`:"",t=await _("speedscope","index.html");n(`[Theme Profile] Resolved URL to open: ${t}`);let a="liquid-profile",m=Buffer.from(r).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(m)})`,f=`speedscope-${Number(new Date)}-${process.pid}`,o=l(w(),`${f}.js`);n(`[Theme Profile] writing JS file to: ${o}`),await P(o,c),n(`[Theme Profile] JS file created successfully: ${o}`),t=`${i}${t}`,o=`${i}${o}`,t+=`#localProfilePath=${o}`;let s=l(w(),`${f}.html`);n(`[Theme Profile] writing HTML file to: ${s}`),await P(s,`<script>window.location=${JSON.stringify(t)}</script>`),n(`[Theme Profile] HTML file created successfully: ${s}`),s=`${i}${s}`,t=`file://${s}`,n(`[Theme Profile] Opening URL: ${t}`);let h=await y(t);n(`[Theme Profile] URL opened successfully: ${h}`)}var d=q(D(),1);var g=class extends A{static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
1
+ import{a as j}from"./chunk-RSC5NQAT.js";import{c as O,i as x,o as R}from"./chunk-LYIXRMQJ.js";import{e as k}from"./chunk-QO5RNGWA.js";import{a as E}from"./chunk-QUXQM3S3.js";import{p as v,v as A}from"./chunk-Y3PY5LP7.js";import{b as F,c as L}from"./chunk-NU5WLZ6Y.js";import{N as y}from"./chunk-47IQIIFX.js";import{i as T}from"./chunk-Q37WAD6F.js";import{Ib as S,Nb as n,db as $,pa as w,ya as P}from"./chunk-UWI76E2L.js";import{b as D}from"./chunk-I3J63RFV.js";import{c as l,h as u}from"./chunk-6IDEDOXW.js";import{e as q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();import{fileURLToPath as U}from"node:url";async function _(...r){let e=await $("package.json",{cwd:U(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?l(u(e),"assets",...r):l(u(e),"dist","assets",...r)}async function b(r,e,i,t,a,m){let c=await O(r)?await j(m,r.storeFqdn):void 0;if(a)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await R(e,r,a,c),o=await x(f,{method:"GET",path:i,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let h=await o.text();throw new Error(`Bad response: ${o.status}: ${h}`)}let s=await o.text();t?S(s):await H(s)}async function H(r){let e=process.env.WSL_DISTRO_NAME,i=e?`//wsl$/${e}`:"",t=await _("speedscope","index.html");n(`[Theme Profile] Resolved URL to open: ${t}`);let a="liquid-profile",m=Buffer.from(r).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(m)})`,f=`speedscope-${Number(new Date)}-${process.pid}`,o=l(w(),`${f}.js`);n(`[Theme Profile] writing JS file to: ${o}`),await P(o,c),n(`[Theme Profile] JS file created successfully: ${o}`),t=`${i}${t}`,o=`${i}${o}`,t+=`#localProfilePath=${o}`;let s=l(w(),`${f}.html`);n(`[Theme Profile] writing HTML file to: ${s}`),await P(s,`<script>window.location=${JSON.stringify(t)}</script>`),n(`[Theme Profile] HTML file created successfully: ${s}`),s=`${i}${s}`,t=`file://${s}`,n(`[Theme Profile] Opening URL: ${t}`);let h=await y(t);n(`[Theme Profile] URL opened successfully: ${h}`)}var d=q(D(),1);var g=class extends A{static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
2
2
 
3
3
  This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;static description=this.descriptionForHelp();static flags={...F,...v,theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:d.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":d.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...L};static multiEnvironmentsFlags=null;async command(e,i){let{password:t}=e,a;e.theme?a={filter:{theme:e.theme}}:a={filter:{live:!0}};let m=await E(i,a),c=[{title:`Generating Liquid profile for ${i.storeFqdn} ${e.url}`,task:async()=>{await b(i,m.id.toString(),e.url,e.json,t,e["store-password"])}}];await k(c)}};export{g as a};
@@ -1,3 +1,3 @@
1
- import{a as h}from"./chunk-BLCR7BXU.js";import{p as m,v as a}from"./chunk-TWS34WUT.js";import{b as n}from"./chunk-Q4TZD2M6.js";import{oa as t}from"./chunk-3E3MCY5O.js";import{W as s}from"./chunk-3F42A3XV.js";import{b as f}from"./chunk-I3J63RFV.js";import{e as u,g as i}from"./chunk-VKWPEFWQ.js";i();var r=u(f(),1);var o=class extends a{static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as h}from"./chunk-35WQTGN3.js";import{p as m,v as a}from"./chunk-Y3PY5LP7.js";import{b as n}from"./chunk-NU5WLZ6Y.js";import{oa as t}from"./chunk-3V4VL3SD.js";import{W as s}from"./chunk-UWI76E2L.js";import{b as f}from"./chunk-I3J63RFV.js";import{e as u,g as i}from"./chunk-VKWPEFWQ.js";i();var r=u(f(),1);var o=class extends a{static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
2
2
 
3
3
  This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;static description=this.descriptionForHelp();static flags={...n,...m,force:r.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:r.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};static multiEnvironmentsFlags=["store","password","path"];async command(e,p,d,g,c){let l={environment:e.environment,force:e.force,noColor:e["no-color"],password:e.password,path:e.path,store:e.store,theme:s("creative"),unpublished:!0,listing:e.listing};t("theme-command:share"),await h(l,p,d,c),t("theme-command:share")}};export{o as a};
@@ -0,0 +1 @@
1
+ import{b as r,d as u}from"./chunk-FOAV642V.js";import{a as i}from"./chunk-JD5P5RAJ.js";import{r as s}from"./chunk-6IDEDOXW.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();import o from"crypto";function m(e){return o.createHash("sha256").update(e).digest()}function d(e){return o.createHash("sha1").update(e).digest("hex")}function x(e){return o.createHash("md5").update(e).digest("hex")}function g(){return o.randomUUID()}function p(e){return o.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(e).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function t(){return process.env}function N(){let e=t();return e[r.appAutomationToken]??e[r.partnersToken]}function U(){return t()[r.organization]}function c(e){if(e&&!isNaN(Number(e)))return Number(e)}function v(){return c(t()[u.backendPort])}function I(){let e=t()[r.identityToken],n=t()[r.refreshToken];if(!(!e||!n))return{accessToken:e,refreshToken:n,userId:p(e)}}function R(e=t(),n=process.argv){return s(n)||i(e[r.json])}function H(e=t()){return i(e[r.skipNetworkLevelRetry])}function B(e=t()){return c(e[r.maxRequestTimeForNetworkCalls])??30*1e3}export{m as a,d as b,x as c,g as d,p as e,t as f,N as g,U as h,v as i,I as j,R as k,H as l,B as m};
@@ -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-Q7PF4VKI.js";import{i as o}from"./chunk-ZZ7SOJHH.js";import{j as d}from"./chunk-3VYOLEQE.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-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 +1 @@
1
- import{a as c}from"./chunk-246AZCDT.js";import{a as e}from"./chunk-VXGXK66W.js";import{F as n,I as p,Ia as s}from"./chunk-PG6XEOYF.js";import{b as r}from"./chunk-Q4TZD2M6.js";import{b as d}from"./chunk-I3J63RFV.js";import{e as l,g as i}from"./chunk-VKWPEFWQ.js";i();var f=l(d(),1);var{config:b,...u}=e,o=class m extends c{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static description=this.descriptionForHelp();static usage="app config use [config] [flags]";static flags={...r,...u};static args={config:f.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:a}=await this.parse(m),{app:g}=await s({directory:t.path,userProvidedConfigName:a.config});return await p(t.path),await n({directory:t.path,configName:a.config,reset:t.reset}),{app:g}}};export{o as a};
1
+ import{a as c}from"./chunk-GN66BRYF.js";import{a as e}from"./chunk-PO5T44H3.js";import{F as n,I as p,Ia as s}from"./chunk-UNHT4ZFP.js";import{b as r}from"./chunk-NU5WLZ6Y.js";import{b as d}from"./chunk-I3J63RFV.js";import{e as l,g as i}from"./chunk-VKWPEFWQ.js";i();var f=l(d(),1);var{config:b,...u}=e,o=class m extends c{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static description=this.descriptionForHelp();static usage="app config use [config] [flags]";static flags={...r,...u};static args={config:f.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:a}=await this.parse(m),{app:g}=await s({directory:t.path,userProvidedConfigName:a.config});return await p(t.path),await n({directory:t.path,configName:a.config,reset:t.reset}),{app:g}}};export{o as a};
@@ -1 +1 @@
1
- import{a as l,c as b,d as D,e as _}from"./chunk-WNE2MZAZ.js";import{g as T,p as y,v as O}from"./chunk-TWS34WUT.js";import{b as L,c as S}from"./chunk-Q4TZD2M6.js";import{e as d}from"./chunk-Q555FV2X.js";import{y as v}from"./chunk-RCYQPOJW.js";import{Eb as s,Ib as F,Nb as a}from"./chunk-3F42A3XV.js";import{b as G}from"./chunk-I3J63RFV.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
1
+ import{a as l,c as b,d as D,e as _}from"./chunk-XGKCPD6W.js";import{g as T,p as y,v as O}from"./chunk-Y3PY5LP7.js";import{b as L,c as S}from"./chunk-NU5WLZ6Y.js";import{e as d}from"./chunk-QTLGMJDW.js";import{y as v}from"./chunk-47IQIIFX.js";import{Eb as s,Ib as F,Nb as a}from"./chunk-UWI76E2L.js";import{b as G}from"./chunk-I3J63RFV.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
@@ -1,3 +1,3 @@
1
- import{b as R}from"./chunk-J3JPJCWP.js";import{a as x,l as M,n as Y}from"./chunk-AKP4QAGL.js";import{a as U}from"./chunk-NDMISEDF.js";import{a as G,c as p}from"./chunk-2X3HYG4B.js";import{a as O}from"./chunk-YKYJOUV7.js";import{a as S,b as L}from"./chunk-YY6TFARF.js";import{a as H}from"./chunk-ELJ34WWD.js";import{k as A,n as I}from"./chunk-JAY7AGAG.js";import{p as D,q as E,r as P,u as _,v as C}from"./chunk-TWS34WUT.js";import{h as $,k as V}from"./chunk-IOS4IDZ2.js";import{b}from"./chunk-Q4TZD2M6.js";import{K as g,oa as m}from"./chunk-3E3MCY5O.js";import{H as k,z as F}from"./chunk-RCYQPOJW.js";import{_a as T}from"./chunk-3F42A3XV.js";import{b as Q}from"./chunk-I3J63RFV.js";import{q as f}from"./chunk-3VYOLEQE.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function B(e,t,o,n,r,l){let i=W(o,n,r),a=X(o,e,n,t),s=[...i,...a,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await k(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function W(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function X(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let h=s.checksum;return o.files.get(s.key)?.checksum!==h});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return R(l,_,(s,h)=>({title:`Downloading files from remote theme ${i({current:h,total:l.length})}`,task:async()=>J(t,o,s,n)}))}async function J(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function K(e,t,o,n){m("theme-service:pull:setup"),U({verbose:e.verbose,noColor:e.noColor});let r=t??await g(P({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:a,nodelete:s,live:h,development:u,only:q,ignore:N,force:y,environment:w}=e;if(!await te(a??f(),y??!1,w?.[0],o))return;let j=await H(r,{header:"Select a theme to open",filter:{live:h,theme:u?`${i?.id}`:e.theme}});m("theme-service:pull:setup"),await Z(j,r,{environment:w?.[0],force:y??!1,ignore:N??[],multiEnvironment:o,nodelete:s??!1,only:q??[],path:a??f()},n)}async function Z(e,t,o,n){m("theme-service:pull:file-system");let r=M(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);m("theme-service:pull:file-system"),await B(e,t,i,r,o,n);let a=o.environment?`Environment: ${o.environment}`:"";F({headline:a,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function ee(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function te(e,t,o,n){return t?!0:!(!await ee(e)&&!await Y(e)&&!await p(t,void 0,o,n)||await $(e)&&!await V(e)&&!await p(t,"The current Git directory has uncommitted changes.",o,n))}var d=z(Q(),1);var v=class extends C{static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
1
+ import{b as R}from"./chunk-J3JPJCWP.js";import{a as x,l as M,n as Y}from"./chunk-SZI6G247.js";import{a as U}from"./chunk-VS7QVU3Z.js";import{a as G,c as p}from"./chunk-QO5RNGWA.js";import{a as O}from"./chunk-BOE2ST6J.js";import{a as S,b as L}from"./chunk-YY6TFARF.js";import{a as H}from"./chunk-QUXQM3S3.js";import{k as A,n as I}from"./chunk-3LHE4GIX.js";import{p as D,q as E,r as P,u as _,v as C}from"./chunk-Y3PY5LP7.js";import{i as $,l as V}from"./chunk-FEQHCE2E.js";import{b}from"./chunk-NU5WLZ6Y.js";import{K as g,oa as m}from"./chunk-3V4VL3SD.js";import{H as k,z as F}from"./chunk-47IQIIFX.js";import{_a as T}from"./chunk-UWI76E2L.js";import{b as Q}from"./chunk-I3J63RFV.js";import{p as f}from"./chunk-6IDEDOXW.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function B(e,t,o,n,r,l){let i=W(o,n,r),a=X(o,e,n,t),s=[...i,...a,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await k(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function W(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function X(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let h=s.checksum;return o.files.get(s.key)?.checksum!==h});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return R(l,_,(s,h)=>({title:`Downloading files from remote theme ${i({current:h,total:l.length})}`,task:async()=>J(t,o,s,n)}))}async function J(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function K(e,t,o,n){m("theme-service:pull:setup"),U({verbose:e.verbose,noColor:e.noColor});let r=t??await g(P({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:a,nodelete:s,live:h,development:u,only:q,ignore:N,force:y,environment:w}=e;if(!await te(a??f(),y??!1,w?.[0],o))return;let j=await H(r,{header:"Select a theme to open",filter:{live:h,theme:u?`${i?.id}`:e.theme}});m("theme-service:pull:setup"),await Z(j,r,{environment:w?.[0],force:y??!1,ignore:N??[],multiEnvironment:o,nodelete:s??!1,only:q??[],path:a??f()},n)}async function Z(e,t,o,n){m("theme-service:pull:file-system");let r=M(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);m("theme-service:pull:file-system"),await B(e,t,i,r,o,n);let a=o.environment?`Environment: ${o.environment}`:"";F({headline:a,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function ee(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function te(e,t,o,n){return t?!0:!(!await ee(e)&&!await Y(e)&&!await p(t,void 0,o,n)||await $(e)&&!await V(e)&&!await p(t,"The current Git directory has uncommitted changes.",o,n))}var d=z(Q(),1);var v=class extends C{static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;static description=this.descriptionForHelp();static flags={...b,...D,...E("download"),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),development:d.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:d.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:d.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:d.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(t,o,n,r,l){m("theme-command:pull"),await K({...t,noColor:t["no-color"]},o,n,l),m("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};export{K as a,v as b};
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-2X3HYG4B.js";import{a as f}from"./chunk-ELJ34WWD.js";import{f as c,o as v}from"./chunk-JAY7AGAG.js";import{p as l,v as d}from"./chunk-TWS34WUT.js";import{b as s,f as h}from"./chunk-Q4TZD2M6.js";import{z as a}from"./chunk-RCYQPOJW.js";import{b as T}from"./chunk-I3J63RFV.js";import{e as F,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function u(e,n){let m=e.name??await c("New name for the theme"),i=await f(n,{header:"Select a theme to rename",filter:{theme:e.theme,development:e.development,live:e.live}});await v(i.id,{name:m},n),a({body:[...e.environment?[{subdued:`Environment: ${e.environment}
1
+ import{a as p}from"./chunk-QO5RNGWA.js";import{a as f}from"./chunk-QUXQM3S3.js";import{f as c,o as v}from"./chunk-3LHE4GIX.js";import{p as l,v as d}from"./chunk-Y3PY5LP7.js";import{b as s,f as h}from"./chunk-NU5WLZ6Y.js";import{z as a}from"./chunk-47IQIIFX.js";import{b as T}from"./chunk-I3J63RFV.js";import{e as F,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function u(e,n){let m=e.name??await c("New name for the theme"),i=await f(n,{header:"Select a theme to rename",filter:{theme:e.theme,development:e.development,live:e.live}});await v(i.id,{name:m},n),a({body:[...e.environment?[{subdued:`Environment: ${e.environment}
2
2
 
3
3
  `}]:[],"The theme",...p(i),"was renamed to",`'${m}'`]})}var t=F(T(),1);var o=class extends d{static summary="Renames an existing theme.";static descriptionWithMarkdown=`Renames a theme in your store.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as Mc,e as jc,f as Bc}from"./chunk-IOS4IDZ2.js";import{a as $c}from"./chunk-7IRPE3M5.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-EZ5F4ZFY.js";import{J as wc,L as Ec,M as bc,ba as Dc,fa as Cc,l as xc,u as cn}from"./chunk-3E3MCY5O.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-FQKURDZR.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-RCYQPOJW.js";import{a as ly}from"./chunk-WXT5AKZV.js";import{i as I,l as hn}from"./chunk-ZZ7SOJHH.js";import{Aa as on,Ab as Pc,Ca as an,Cb as gt,Db as Nc,Eb as Ar,Ga as fo,Ia as un,Kb as it,Nb as me,X as fc,Xa as U,_ as dc,_a as yc,aa as pc,ca as mc,db as vc,ma as uy,qa as X,ta as Dr,tb as Sc,ya as V,yb as Oc}from"./chunk-3F42A3XV.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as cy,b as gc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as hc}from"./chunk-3VYOLEQE.js";import{a as uc,c as cc,d as uo,e as br,f as ey,g as co,h as ty,i as ry,j as lc,k as lo,m as sy,n as ho,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{b as Z0,c as et}from"./chunk-ZGASBRSQ.js";import{b as Q0}from"./chunk-I5A6BPCP.js";import{a as ny}from"./chunk-IGE4Y5SE.js";import{b as iy}from"./chunk-JFBCE4HN.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=br(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
1
+ import{a as Mc,e as jc,f as Bc}from"./chunk-FEQHCE2E.js";import{a as $c}from"./chunk-LJIJEGND.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-4ZNBEMRT.js";import{J as wc,L as Ec,M as bc,ba as Dc,fa as Cc,l as xc,u as cn}from"./chunk-3V4VL3SD.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-3C4WVKSO.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-47IQIIFX.js";import{a as ly}from"./chunk-DYPZX7MW.js";import{i as I,l as hn}from"./chunk-Q37WAD6F.js";import{Aa as on,Ab as Pc,Ca as an,Cb as gt,Db as Nc,Eb as Ar,Ga as fo,Ia as un,Kb as it,Nb as me,X as fc,Xa as U,_ as dc,_a as yc,aa as pc,ca as mc,db as vc,ma as uy,qa as X,ta as Dr,tb as Sc,ya as V,yb as Oc}from"./chunk-UWI76E2L.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as cy,b as gc}from"./chunk-LD6ZCTZ3.js";import{c as N,e as J,f as kt,h as le,i as Tt,j as sn,m as hc}from"./chunk-6IDEDOXW.js";import{a as uc,c as cc,d as uo,e as br,f as ey,g as co,h as ty,i as ry,j as lc,k as lo,m as sy,n as ho,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{b as Z0,c as et}from"./chunk-ZGASBRSQ.js";import{b as Q0}from"./chunk-I5A6BPCP.js";import{a as ny}from"./chunk-IGE4Y5SE.js";import{b as iy}from"./chunk-JFBCE4HN.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=br(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Gy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,zy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=Jy(Xy(t));let r=t.split(`
@@ -1,4 +1,4 @@
1
- import{a as J}from"./chunk-NDMISEDF.js";import{a as p}from"./chunk-2X3HYG4B.js";import{a as v}from"./chunk-YY6TFARF.js";import{a as E,b as C}from"./chunk-ELJ34WWD.js";import{r as S}from"./chunk-JAY7AGAG.js";import{p as h,r as D,v as N}from"./chunk-TWS34WUT.js";import{b as q,c as F,f as O}from"./chunk-Q4TZD2M6.js";import{K as b}from"./chunk-3E3MCY5O.js";import{B as m,E as T,W as d,z as w}from"./chunk-RCYQPOJW.js";import{Ib as n}from"./chunk-3F42A3XV.js";import{b as Y}from"./chunk-I3J63RFV.js";import{e as P,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(t,o,e){let{name:r,verbose:u,noColor:l,json:a,force:A}=e,y=d()||A;if(J({verbose:u,noColor:l}),y&&!o){let i="A theme ID is required to duplicate a theme, specify one with the --theme flag";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}let s=o?await C(t,o):await E(t,{header:"Select a theme to duplicate",filter:{theme:o}});if(!s){let i=`No theme with ID ${o} could be found. Use shopify theme list to find a theme ID.`;a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(s?.role==="development"){let i="Development themes can't be duplicated. Use shopify theme push to upload it to the store first.";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(!y&&!await T({message:`Do you want to duplicate '${s.name}' on ${t.storeFqdn}?`,confirmationMessage:`Yes, duplicate '${s.name}'`,cancellationMessage:"No, cancel duplicate"}))return;let I=await S(s.id,r,t);a?M(s,t,I):j(s,t,I)}function j(t,o,e){if(e.userErrors&&e.userErrors.length>0){let r=e.userErrors.map(u=>u.message).join(", ");m({body:["The theme",...p(t),"could not be duplicated due to errors: ",{subdued:r},{char:"."},...e.requestId?[`
1
+ import{a as J}from"./chunk-VS7QVU3Z.js";import{a as p}from"./chunk-QO5RNGWA.js";import{a as v}from"./chunk-YY6TFARF.js";import{a as E,b as C}from"./chunk-QUXQM3S3.js";import{r as S}from"./chunk-3LHE4GIX.js";import{p as h,r as D,v as N}from"./chunk-Y3PY5LP7.js";import{b as q,c as F,f as O}from"./chunk-NU5WLZ6Y.js";import{K as b}from"./chunk-3V4VL3SD.js";import{B as m,E as T,W as d,z as w}from"./chunk-47IQIIFX.js";import{Ib as n}from"./chunk-UWI76E2L.js";import{b as Y}from"./chunk-I3J63RFV.js";import{e as P,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(t,o,e){let{name:r,verbose:u,noColor:l,json:a,force:A}=e,y=d()||A;if(J({verbose:u,noColor:l}),y&&!o){let i="A theme ID is required to duplicate a theme, specify one with the --theme flag";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}let s=o?await C(t,o):await E(t,{header:"Select a theme to duplicate",filter:{theme:o}});if(!s){let i=`No theme with ID ${o} could be found. Use shopify theme list to find a theme ID.`;a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(s?.role==="development"){let i="Development themes can't be duplicated. Use shopify theme push to upload it to the store first.";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(!y&&!await T({message:`Do you want to duplicate '${s.name}' on ${t.storeFqdn}?`,confirmationMessage:`Yes, duplicate '${s.name}'`,cancellationMessage:"No, cancel duplicate"}))return;let I=await S(s.id,r,t);a?M(s,t,I):j(s,t,I)}function j(t,o,e){if(e.userErrors&&e.userErrors.length>0){let r=e.userErrors.map(u=>u.message).join(", ");m({body:["The theme",...p(t),"could not be duplicated due to errors: ",{subdued:r},{char:"."},...e.requestId?[`
2
2
  Request ID: `,{subdued:e.requestId}]:[]]})}else e.theme?w({body:["The theme",...p(t),"has been duplicated",{char:"."}],nextSteps:[[{link:{label:"View the duplicated theme",url:v(e.theme,o)}}]]}):m({body:["The theme",...p(t),"unexpectedly could not be duplicated",{char:"."},...e.requestId?[`
3
3
  Request ID: `,{subdued:e.requestId}]:[]]})}function M(t,o,e){if(e.userErrors&&e.userErrors.length>0)n(JSON.stringify({message:`The theme '${t.name}' could not be duplicated due to errors`,errors:e.userErrors.map(r=>r.message),requestId:e.requestId}));else if(e.theme){let{id:r,name:u,role:l}=e.theme,a={theme:{id:r,name:u,role:l,shop:o.storeFqdn}};n(JSON.stringify(a))}else n(JSON.stringify({message:`The theme '${t.name}' unexpectedly could not be duplicated `,errors:[],requestId:e.requestId}))}var f=P(Y(),1);var g=class t extends N{static summary="Duplicates a theme from your theme library.";static usage=["theme duplicate","theme duplicate --theme 10 --name 'New Theme'"];static descriptionWithMarkdown=`If you want to duplicate your local theme, you need to run \`shopify theme push\` first.
4
4
 
@@ -1 +1 @@
1
- import{q as r}from"./chunk-PQCALXSD.js";import{d as t}from"./chunk-Q4TZD2M6.js";import{b as a}from"./chunk-EZ5F4ZFY.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-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 +1 @@
1
- import{a as o}from"./chunk-FNKTF2OF.js";import{b as a}from"./chunk-EZ5F4ZFY.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-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};
@@ -0,0 +1,4 @@
1
+ import{a as U}from"./chunk-5BGUKF7L.js";import{a as J}from"./chunk-C6IBY7NW.js";import{a as X}from"./chunk-GSE6FXZU.js";import{B,C as m,D as y,F as H,G as K,H as V,I as q,J as Q,K as z,L as h,a as L,c as O,d as k,g as j,i as M,p as W,u as Y}from"./chunk-EO4YJFMY.js";import{b as N}from"./chunk-NU5WLZ6Y.js";import{b as T}from"./chunk-4ZNBEMRT.js";import{A as g,B as D,D as G,V as R,y as F,z as $}from"./chunk-47IQIIFX.js";import{Ib as E,sa as _}from"./chunk-UWI76E2L.js";import{b as de}from"./chunk-I3J63RFV.js";import{f as d,p as A}from"./chunk-6IDEDOXW.js";import{e as ue,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();function Z(e,t){return t==="none"?0:e.scan.issues.some(o=>k[o.severity]>=k[t])?1:0}async function ee({includeDirs:e,excludePatterns:t,noGitIgnore:i,...o}){let n=Date.now();return{...await M(o,{includeDirs:e,excludePatterns:t,noGitIgnore:i}),elapsedMilliseconds:Date.now()-n}}function te({includeDirs:e,excludePatterns:t,noGitIgnore:i,...o}){return j(o,{includeDirs:e,excludePatterns:t,noGitIgnore:i})}a();var pe={high:"High",medium:"Medium",low:"Low"},v=3,w=8;function he(e){let t=fe(e),i=W(e.scan.issues);return{type:t,options:{headline:ge(e,i),body:me(e),reference:[{subdued:`Engine: ${e.engine.name} ${e.engine.version}`},{subdued:`Ruleset: ${e.engine.ruleset}`},...i.some(o=>o.issues.length>1)&&!e.verbose?[{subdued:"Use --verbose for every occurrence and fix. deterministic-findings.json retains all file and line details."}]:[]],customSections:ve(e,i)}}}function ie(e){let{type:t,options:i}=he(e);if(t==="success"){$(i);return}if(t==="warning"){g(i);return}D(i)}function ne(e){return e.scan.scan.coverage_gaps.length>0}function fe(e){return e.scan.issues.some(t=>t.severity==="high")?"error":e.scan.issues.length>0||ne(e)?"warning":"success"}function ge(e,t){let i=e.scan.issues.length;return t.length<i?`${t.length} security issue ${t.length===1?"group":"groups"} found (${i} occurrences).`:i>0?`${i} security ${i===1?"issue":"issues"} found.`:ne(e)?"Scan completed with coverage gaps.":"No security issues found."}function me(e){let t=e.scan,i=[{userInput:t.app.name},{char:"."},`${t.scan.files_scanned} files scanned in ${Ce(e.elapsedMilliseconds)}.`],o=t.scan.checks_executed.filter(n=>n.status==="not_applicable").length;return o>0&&i.push({info:`
2
+ ${o} check${o===1?"":"s"} not applicable.`}),i.push({info:`
3
+ ${e.agentCheckCount} check${e.agentCheckCount===1?"":"s"} ready for your coding agent.`}),i}function ye(e){return[["Have your coding agent run the agent checks"],["Record the agent results with",{command:h(e.commands.record)}],["Review the results with",{command:h(e.commands.review)}]]}function be(e){let t=m(e)??"not linked";return e.kind==="config"&&e.clientIdOverride?`${t} (from --client-id)`:t}function ke(e){let{selection:t}=e;return{title:"Selection",body:{tabularData:[["App directory",t.appDirectory],["Config file",B(t)??"none"],["Client ID",be(t)],["Scan directories",e.scanDirectories.map(({directory:i})=>d(t.appDirectory,i)||".").join(", ")]],firstColumnSubdued:!0}}}function ve(e,t){let i=[ke(e)];for(let n of["high","medium","low"]){let s=t.filter(r=>r.severity===n);s.length!==0&&i.push({title:pe[n],body:{list:{items:s.flatMap(r=>[Se(r),...e.verbose?r.issues.map(we):[]])}}})}if(e.scan.scan.coverage_gaps.length>0){let n=e.scan.scan.coverage_gaps,s=n.slice(0,w).map(r=>r.message);n.length>w&&s.push({info:`${n.length-w} more coverage gaps`}),i.push({title:"Coverage gaps",body:{list:{items:s}}})}let{appDirectory:o}=e.selection;return i.push({title:"Artifacts",body:{list:{items:[["Deterministic findings:",{filePath:d(o,e.deterministicFindingsPath)}],["Agent security check instructions:",{filePath:d(o,e.agentChecksPath)}]]}}}),i.push({title:"Next steps",body:{list:{items:ye(e),ordered:!0}}}),e.verbose&&i.push({title:"Scan details",body:{tabularData:[["Framework",e.scan.detection.framework],["Surface",e.scan.detection.surface],["Languages",e.scan.detection.languages.map(n=>`${n.name} (${n.support})`).join(", ")||"none"],["Capabilities",Ie(e.scan.capabilities)],["Rules run",String(e.scan.scan.rules_run)],["Not run",String(e.scan.scan.rules_skipped)]],firstColumnSubdued:!0}}),i}function we(e){let t=e.location.line?`${e.location.file}:${e.location.line}`:e.location.file,i=[{bold:e.title},oe(e.id),{filePath:t}];return i.push({subdued:e.message},{subdued:`Fix: ${e.fix.description}`}),e.fix.guide&&(e.fix.guide.startsWith("https://")||e.fix.guide.startsWith("http://")?i.push({link:{label:"Guide",url:e.fix.guide}}):i.push({subdued:`Guide: ${e.fix.guide}`})),e.snippet&&i.push({subdued:`Code: ${e.snippet}`}),i}function Se(e){let t=e.issues[0],i=e.issues.length,o=e.files.length,n=e.files.slice(0,v).map(s=>{let r=e.issues.find(f=>f.location.file===s);return{filePath:r.location.line?`${s}:${r.location.line}`:s}});return[{bold:t.title},oe(t.id),`${i} ${i===1?"occurrence":"occurrences"} across ${o} ${o===1?"file":"files"}`,...n,...o>v?[{subdued:`+${o-v} more files`}]:[]]}function oe(e){let t=O(e);return t?{link:{label:e,url:t}}:{subdued:e}}function Ie(e){let t=Object.entries(e).filter(([,i])=>i).map(([i])=>i);return t.length>0?t.join(", "):"none detected"}function Ce(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function xe(e){return{message:`${e} recommended agent ${e===1?"check":"checks"} available to complete your scan. How do you want to pass that prompt to your agent?`,choices:[{label:"Copy instructions to the clipboard",value:"copy"},{label:"Print instructions to the terminal",value:"print"},{label:"Nothing",value:"nothing"}],defaultValue:"copy"}}var Pe={resolveSelection:H,execute:ee,listFiles:te,writeArtifacts:Y,canPrompt:R,selectInstructionsDestination:e=>G(xe(e)),deliverInstructions:J,output:E,renderInfo:F,renderWarning:g,renderReport:ie,setExitCode:e=>{process.exitCode=e},recordMetadata:X};async function Ae(e,t,i,o){return e.skipInstructions?"nothing":e.printInstructions?"print":i?t.selectInstructionsDestination(o):"nothing"}function _e(e,t,i,o,n,s){return{scan:e.scan,selection:n,scanDirectories:s,engine:e.engine,verbose:i,elapsedMilliseconds:e.elapsedMilliseconds,commands:o,deterministicFindingsPath:t.deterministicFindingsPath,agentChecksPath:t.agentChecksPath,agentCheckCount:e.agentChecks.checks.length}}function Fe(e){return e.replace(/[?*()[\]{}!#\\]/g,"\\$&")}async function se(e,t){if(e.ignoredScanDirectories.length===0&&e.otherAppDirectories.length===0)return;let i=await _(A()),o=n=>d(i,n)||".";for(let n of e.ignoredScanDirectories)t.renderWarning({headline:`${o(n)} is ignored by Git, so only the files Git tracks in it are scanned.`,body:["Use",{command:"--no-git-ignore"},"to scan everything in it."]});for(let n of e.otherAppDirectories){let s=o(n);t.renderWarning({headline:`${s} holds another app's configuration, so its files are scanned as part of this app.`,body:["Use",{command:`--exclude ${z(Fe(s),Q())}`},"to leave it out."]})}}async function S(e,t=Pe){let i=await K(e.includeDirs),o=!e.listFiles&&t.canPrompt(),n=await t.resolveSelection({path:e.directory,config:e.configName,clientId:e.clientId,withoutAppConfig:e.withoutAppConfig,allowPrompts:o,validateClientIdFlag:!0}),{appDirectory:s}=n,r={include_dirs:[...e.includeDirs],excludes:[...e.excludePatterns],no_git_ignore:e.noGitIgnore},p=q(n,e.directory,r),f={selection:n,resultsKey:y(n),commands:p};(n.kind==="no-config"?!e.withoutAppConfig:n.appConfigFilePicked===!0)&&t.renderInfo({headline:"To skip these prompts next time, run:",body:[{command:h(p.scan)}]});let re=n.kind==="config"?n.appConfigDirectories??[]:[],{scanDirectories:b,requestedScanDirectories:ce}=V(s,i,re),C={appDirectory:s,scanDirectories:b.map(({directory:c})=>c),requestedScanDirectories:ce,appConfigDirectories:b.filter(({origin:c})=>c==="app_config_directory").map(({directory:c})=>c),appConfigFilePath:n.kind==="config"?n.appConfigFilePath:void 0,clientId:m(n),includeDirs:e.includeDirs,excludePatterns:e.excludePatterns,noGitIgnore:e.noGitIgnore};if(e.listFiles){let{paths:c,...le}=await t.listFiles(C);return await se(le,t),c.length>0&&t.output(c.join(`
4
+ `)),f}let u=await t.execute(C);await se(u,t),await t.recordMetadata({num_security_findings:u.scan.issues.length});let ae=await t.writeArtifacts(s,y(n),{deterministicFindings:u.deterministicFindings,agentChecks:u.agentChecks});t.renderReport(_e(u,ae,e.verbose,p,n,b));let x=await Ae(e,t,o,u.agentChecks.checks.length);x!=="nothing"&&await t.deliverInstructions({appDirectory:s,resultsKey:y(n),copy:x==="copy",scanScope:r,commands:p});let P=Z(u,e.blocking);return P!==0&&t.setExitCode(P),f}var l=ue(de(),1);var I=class e extends T{static summary="Check an app for Shopify-specific security issues and write deterministic-findings.json and agent-checks.json.";static descriptionWithMarkdown="Runs an app security check locally and writes `deterministic-findings.json` and `agent-checks.json` to the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`; the other `app security` commands take the same selection flags and find the same directory. Every run replaces both files, so it's always safe to run the check again.\n\n`deterministic-findings.json` holds the deterministic scan results. `agent-checks.json` holds the checks for your coding agent to investigate; the agent's results are recorded with `shopify app security record`. Use `--config` to select a specific app configuration when the project has multiple `shopify.app*.toml` files; the check inspects only that configuration. Use `--client-id` to replace the configuration's client ID for this run. `--client-id` is checked against your Shopify account before anything is scanned, so it needs you to be logged in. When no app configuration exists, use `--without-app-config --client-id <client-id>` to scan `--path` anyway with config checks skipped; in an interactive terminal the command offers to do this.\n\nThe check scans the app directory and each `--include-dir`. Git ignore rules apply by default: a file or directory that Git ignores is skipped, using the rules of the repository that contains it, while files that Git tracks are always scanned. Use `--no-git-ignore` to turn Git ignore rules off for every scanned directory. When the check uses Git, it requires Git 2.38.0 or later.\n\nUse `--exclude` to skip more paths. Each value is a glob that is matched against the path relative to the working directory, so a path above it starts with `../`, and a name at any depth needs `**/`, for example `--exclude '**/generated'`. Repeat the flag to add globs. An exclusion can't remove the selected app configuration file. Quote each value so your shell doesn't expand `*`. The coding-agent instructions this check offers repeat the globs. Other `app security` commands don't take `--exclude` or `--no-git-ignore`, so pass the same flags each time you run the check.\n\nUse `--list-files` to check the scope before scanning: it prints the files the check would gather, one path per line and relative to the app directory, and then stops. It writes no results and never prompts. `--client-id` is still checked, but doesn't change the list.\n\nIn interactive terminals, the command offers to copy the coding-agent instructions, print them, or choose nothing; copying is the default. In CI and other non-interactive environments, instructions aren't offered unless you pass `--print-instructions`, which prints them. You can also run `shopify app security instructions` to print, copy, or write them later.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --include-dir ../backend","<%= config.bin %> <%= command.id %> --path extensions --config production --include-dir .","<%= config.bin %> <%= command.id %> --without-app-config --client-id <client-id>",'<%= config.bin %> <%= command.id %> --path app --include-dir . --exclude marketing --exclude "**/generated"',"<%= config.bin %> <%= command.id %> --no-git-ignore --exclude local-data","<%= config.bin %> <%= command.id %> --include-dir ../backend --list-files"];static flags={...N,...L,"include-dir":l.Flags.string({description:"Also scan this directory, relative to the working directory. Repeat the flag to add directories. Use it for code that lives outside the app directory, such as a backend or a shared library.",multiple:!0}),exclude:l.Flags.string({description:"Skip paths that match this glob, relative to the working directory. Repeat the flag to add globs. The selected app configuration file can't be excluded.",multiple:!0}),"no-git-ignore":l.Flags.boolean({description:"Turn off Git ignore rules for every scanned directory, so files that Git ignores are scanned too. Files that Git tracks are always scanned.",env:"SHOPIFY_FLAG_NO_GIT_IGNORE"}),"list-files":l.Flags.boolean({description:"Print the files the check would gather, one path per line, and stop. Nothing is scanned, no results are written, and nothing is prompted for.",env:"SHOPIFY_FLAG_LIST_FILES",exclusive:["print-instructions","skip-instructions","blocking"]}),...U,"print-instructions":l.Flags.boolean({description:"Print coding-agent instructions without prompting for how to deliver them.",default:!1,exclusive:["skip-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_PRINT_INSTRUCTIONS"}),yes:l.Flags.boolean({description:"Print coding-agent instructions without prompting.",hidden:!0,deprecated:{to:"--print-instructions"},exclusive:["skip-instructions","list-files"],env:"SHOPIFY_FLAG_YES"}),"skip-instructions":l.Flags.boolean({description:"Don't offer the coding-agent instructions after the scan. Use it when you want only the deterministic scan results.",default:!1,exclusive:["print-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_SKIP_INSTRUCTIONS"})};async run(){let{flags:t}=await this.parse(e);await S({directory:t.path,configName:t.config,clientId:t["client-id"],withoutAppConfig:!!t["without-app-config"],verbose:!!t.verbose,blocking:t.blocking,printInstructions:!!(t["print-instructions"]||t.yes),skipInstructions:t["skip-instructions"],includeDirs:t["include-dir"]??[],excludePatterns:t.exclude??[],noGitIgnore:!!t["no-git-ignore"],listFiles:!!t["list-files"]})}};export{I as a};
@@ -1,4 +1,4 @@
1
- import{b as i,c as r,d as p}from"./chunk-IJLD5UYC.js";import{b as s,c as e}from"./chunk-Q4TZD2M6.js";import{b as o}from"./chunk-EZ5F4ZFY.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class u extends o{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
1
+ import{b as i,c as r,d as p}from"./chunk-AYIU6Z4C.js";import{b as s,c as e}from"./chunk-NU5WLZ6Y.js";import{b as o}from"./chunk-4ZNBEMRT.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class u extends o{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
4
4
 
@@ -1 +1 @@
1
- import{b as a,c}from"./chunk-Q4TZD2M6.js";import{b as u}from"./chunk-EZ5F4ZFY.js";import{a as i}from"./chunk-TQ7MHGY4.js";import{a as p}from"./chunk-MQZPASSP.js";import{Ib as m,b as r}from"./chunk-3F42A3XV.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();async function f(){return{version:i}}t();t();var o=p({name:"VersionResult",schema:r.object({version:r.string()})});function l(e,s){m(s==="json"?o.encode(e):e.version)}var n=class e extends u{static descriptionWithMarkdown="Shopify CLI version currently installed.";static description=this.descriptionForHelp();static flags={...a,...c};static get jsonOutputSchema(){return o}async run(){let{flags:s}=await this.parse(e),v=await f();l(v,s.json?"json":"text")}};export{n as a};
1
+ import{b as a,c}from"./chunk-NU5WLZ6Y.js";import{b as u}from"./chunk-4ZNBEMRT.js";import{a as i}from"./chunk-XUUIBSLW.js";import{a as p}from"./chunk-7VAKNVFD.js";import{Ib as m,b as r}from"./chunk-UWI76E2L.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();async function f(){return{version:i}}t();t();var o=p({name:"VersionResult",schema:r.object({version:r.string()})});function l(e,s){m(s==="json"?o.encode(e):e.version)}var n=class e extends u{static descriptionWithMarkdown="Shopify CLI version currently installed.";static description=this.descriptionForHelp();static flags={...a,...c};static get jsonOutputSchema(){return o}async run(){let{flags:s}=await this.parse(e),v=await f();l(v,s.json?"json":"text")}};export{n as a};
@@ -0,0 +1,7 @@
1
+ import{p,v as d}from"./chunk-Y3PY5LP7.js";import{a as u}from"./chunk-YPCXVZ2N.js";import{da as w}from"./chunk-NCRWOW6F.js";import{b as l}from"./chunk-NU5WLZ6Y.js";import{z as f}from"./chunk-47IQIIFX.js";import{i}from"./chunk-Q37WAD6F.js";import{Xa as c,qa as h}from"./chunk-UWI76E2L.js";import{e as r,m}from"./chunk-6IDEDOXW.js";import{e as _,g as o}from"./chunk-VKWPEFWQ.js";o();o();var g=_(w(),1),P=["AGENTS.md","DESIGN.md","assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await k(e),s=`${e}/${t}`,n=`${e}/(${P})`;await u({inputDirectory:e,outputZipPath:s,matchFilePattern:n}),f({body:["Your local theme was packaged in",{filePath:m(s)}]})}async function k(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let s=await v(t);if(s===void 0||s.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[s.theme_name,s.theme_version].filter(Boolean).join("-")}.zip`}async function v(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(s=>s.name==="theme_info")}var a=class extends d{static summary="Package your theme into a .zip file, ready to upload to the Online Store.";static descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
2
+
3
+ Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
4
+
5
+ The package includes the \`listings\` directory if present (required for multi-preset themes per [Theme Store requirements](https://shopify.dev/docs/storefronts/themes/store/requirements#adding-presets-to-your-theme-zip-submission)).
6
+
7
+ The ZIP file uses the name \`theme_name-theme_version.zip\`, based on parameters in your [settings_schema.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-schema-json) file.`;static description=this.descriptionForHelp();static flags={...l,path:p.path};static multiEnvironmentsFlags=null;async command(t){await y(t.path)}};export{a};
@@ -1 +1 @@
1
- import{a as C}from"./chunk-KOYBR5MV.js";import{a as y}from"./chunk-VXGXK66W.js";import{Ca as k,Fa as w,Ga as A,Ha as P}from"./chunk-PG6XEOYF.js";import{b as h}from"./chunk-Q4TZD2M6.js";import{z as g}from"./chunk-RCYQPOJW.js";import{i as u}from"./chunk-ZZ7SOJHH.js";import{j as r}from"./chunk-3VYOLEQE.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function s(p){let{directory:t,configName:o,configPath:e,configuration:a,remoteApp:i}=p;if(!a.client_id)throw new u("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,l=await k({developerPlatformClient:c,app:i}),m=i.flags,b={directory:t,configName:o,developerPlatformClient:c,apiKey:a.client_id},d=await w(b,l,m,i.apiKey),v=r(e),x=await A({remoteApp:i,developerPlatformClient:c,specifications:l,flags:m,configFileName:v,appDirectory:d.appDirectory??t,localAppOptions:d});return{configPath:e,configuration:x,remoteApp:i}}var f=class p extends C{static summary="Refresh an already-linked app configuration without prompts.";static descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";static description=this.descriptionForHelp();static flags={...h,...y};async run(){let{flags:t}=await this.parse(p),{app:o,remoteApp:e}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),{configuration:a,configPath:i}=await s({directory:t.path,configName:t.config,configPath:o.configPath,configuration:o.configuration,remoteApp:e});return g({headline:`Pulled latest configuration for "${a.name}"`,body:`Updated ${r(i)} with the remote data.`}),{app:o}}};export{f as a};
1
+ import{a as C}from"./chunk-PWS4VFSD.js";import{a as y}from"./chunk-PO5T44H3.js";import{Ca as k,Fa as w,Ga as A,Ha as P}from"./chunk-UNHT4ZFP.js";import{b as h}from"./chunk-NU5WLZ6Y.js";import{z as g}from"./chunk-47IQIIFX.js";import{i as u}from"./chunk-Q37WAD6F.js";import{i as r}from"./chunk-6IDEDOXW.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function s(p){let{directory:t,configName:o,configPath:e,configuration:a,remoteApp:i}=p;if(!a.client_id)throw new u("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,l=await k({developerPlatformClient:c,app:i}),m=i.flags,b={directory:t,configName:o,developerPlatformClient:c,apiKey:a.client_id},d=await w(b,l,m,i.apiKey),v=r(e),x=await A({remoteApp:i,developerPlatformClient:c,specifications:l,flags:m,configFileName:v,appDirectory:d.appDirectory??t,localAppOptions:d});return{configPath:e,configuration:x,remoteApp:i}}var f=class p extends C{static summary="Refresh an already-linked app configuration without prompts.";static descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";static description=this.descriptionForHelp();static flags={...h,...y};async run(){let{flags:t}=await this.parse(p),{app:o,remoteApp:e}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),{configuration:a,configPath:i}=await s({directory:t.path,configName:t.config,configPath:o.configPath,configuration:o.configuration,remoteApp:e});return g({headline:`Pulled latest configuration for "${a.name}"`,body:`Updated ${r(i)} with the remote data.`}),{app:o}}};export{f as a};
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-Q4TZD2M6.js";import{b as u}from"./chunk-EZ5F4ZFY.js";import{k as f}from"./chunk-3E3MCY5O.js";import{i as n}from"./chunk-ZZ7SOJHH.js";import{Ib as m}from"./chunk-3F42A3XV.js";import{b as g}from"./chunk-I3J63RFV.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static examples=[`# search shopify.dev for a topic
1
+ import{b as l}from"./chunk-NU5WLZ6Y.js";import{b as u}from"./chunk-4ZNBEMRT.js";import{k as f}from"./chunk-3V4VL3SD.js";import{i as n}from"./chunk-Q37WAD6F.js";import{Ib as m}from"./chunk-UWI76E2L.js";import{b as g}from"./chunk-I3J63RFV.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static examples=[`# search shopify.dev for a topic
2
2
  shopify doc search --query "subscribe to webhooks"
3
3
 
4
4
  # narrow the search to a specific API and version
@@ -1 +1 @@
1
- import{a as u,b as l}from"./chunk-EGJQEKAO.js";import{f as d,i as m}from"./chunk-UMSO6MOI.js";import{a as c}from"./chunk-KOYBR5MV.js";import{Ha as p}from"./chunk-PG6XEOYF.js";import{i as s}from"./chunk-ZZ7SOJHH.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-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,4 +1,4 @@
1
- import{a as d}from"./chunk-VXGXK66W.js";import{_ as a}from"./chunk-PG6XEOYF.js";import{b as l,c as g,f as S}from"./chunk-Q4TZD2M6.js";import{e as o}from"./chunk-3E3MCY5O.js";import{b as C}from"./chunk-I3J63RFV.js";import{e as h,g as e}from"./chunk-VKWPEFWQ.js";e();e();var P=["HONOR_BILLING_PRICE","PLAN_PRICE"],T=["OPT_OUT","WHEN_REQUIRED"],f=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=h(C(),1);var u={...l,...d,...g},F={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},y={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},R={...u,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...f]})()},L={...u,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:S(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...F},_={...u,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},v={..._,...y};e();e();var I=o`
1
+ import{a as d}from"./chunk-PO5T44H3.js";import{_ as a}from"./chunk-UNHT4ZFP.js";import{b as l,c as g,f as S}from"./chunk-NU5WLZ6Y.js";import{e as o}from"./chunk-3V4VL3SD.js";import{b as C}from"./chunk-I3J63RFV.js";import{e as h,g as e}from"./chunk-VKWPEFWQ.js";e();e();var P=["HONOR_BILLING_PRICE","PLAN_PRICE"],T=["OPT_OUT","WHEN_REQUIRED"],f=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=h(C(),1);var u={...l,...d,...g},F={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},y={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},R={...u,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...f]})()},L={...u,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:S(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...F},_={...u,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},v={..._,...y};e();e();var I=o`
2
2
  query MigratableAppSubscriptions(
3
3
  $apiKey: String!
4
4
  $first: Int!
@@ -1,2 +1,2 @@
1
- import{a as N,b as $,c as w}from"./chunk-MIP2Y34N.js";import{j as T}from"./chunk-3E3MCY5O.js";import{a as D,b}from"./chunk-LIQSNIB3.js";import{S as P,T as k,a as F}from"./chunk-RCYQPOJW.js";import{l as A}from"./chunk-ZZ7SOJHH.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-3F42A3XV.js";import{g as h}from"./chunk-2R2PKQQV.js";import{d as m,i as l,j as S}from"./chunk-3VYOLEQE.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="2024.8.2",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(`
1
+ import{a as N,b as $,c as w}from"./chunk-MUM34KUM.js";import{j as T}from"./chunk-3V4VL3SD.js";import{a as D,b}from"./chunk-5BTLE67Z.js";import{S as P,T as k,a as F}from"./chunk-47IQIIFX.js";import{l as A}from"./chunk-Q37WAD6F.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-UWI76E2L.js";import{g as h}from"./chunk-UEBUGSBT.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="2024.8.2",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
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{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()),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};