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
@@ -0,0 +1 @@
1
+ import{ma as a,na as b,oa as c,pa as d,qa as e,ra as f,sa as g}from"./chunk-3V4VL3SD.js";import"./chunk-ZDF5N422.js";import"./chunk-3C4WVKSO.js";import"./chunk-MPW2YJWU.js";import"./chunk-QTLGMJDW.js";import"./chunk-XUUIBSLW.js";import"./chunk-5BTLE67Z.js";import"./chunk-T7KHS6RF.js";import"./chunk-47IQIIFX.js";import"./chunk-7E4MJCVE.js";import"./chunk-73D5O7A3.js";import"./chunk-DYPZX7MW.js";import"./chunk-5HBIIYSK.js";import"./chunk-GB3YC4TI.js";import"./chunk-HILYTMVA.js";import"./chunk-YRHFPXC3.js";import"./chunk-7VAKNVFD.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-DSS4ECIH.js";import"./chunk-Q37WAD6F.js";import"./chunk-636CTEW7.js";import"./chunk-4JGWKUJN.js";import"./chunk-UWI76E2L.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-UEBUGSBT.js";import"./chunk-L4DFMMOI.js";import"./chunk-FOAV642V.js";import"./chunk-I3J63RFV.js";import"./chunk-JD5P5RAJ.js";import"./chunk-6IDEDOXW.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-IGE4Y5SE.js";import"./chunk-JFBCE4HN.js";import"./chunk-VKWPEFWQ.js";export{g as compileData,d as recordError,f as recordEvent,e as recordRetry,c as recordTiming,b as reportAnalyticsEvent,a as sendAnalyticsEventFromStdin};
@@ -0,0 +1 @@
1
+ import{ja as a,ka as b,la as c}from"./chunk-3V4VL3SD.js";import"./chunk-ZDF5N422.js";import"./chunk-3C4WVKSO.js";import"./chunk-MPW2YJWU.js";import"./chunk-QTLGMJDW.js";import"./chunk-XUUIBSLW.js";import"./chunk-5BTLE67Z.js";import"./chunk-T7KHS6RF.js";import"./chunk-47IQIIFX.js";import"./chunk-7E4MJCVE.js";import"./chunk-73D5O7A3.js";import"./chunk-DYPZX7MW.js";import"./chunk-5HBIIYSK.js";import"./chunk-GB3YC4TI.js";import"./chunk-HILYTMVA.js";import"./chunk-YRHFPXC3.js";import"./chunk-7VAKNVFD.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-DSS4ECIH.js";import"./chunk-Q37WAD6F.js";import"./chunk-636CTEW7.js";import"./chunk-4JGWKUJN.js";import"./chunk-UWI76E2L.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-UEBUGSBT.js";import"./chunk-L4DFMMOI.js";import"./chunk-FOAV642V.js";import"./chunk-I3J63RFV.js";import"./chunk-JD5P5RAJ.js";import"./chunk-6IDEDOXW.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-IGE4Y5SE.js";import"./chunk-JFBCE4HN.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
package/dist/bootstrap.js CHANGED
@@ -1 +1 @@
1
- import{a as r,b as c}from"./chunk-2NMICU24.js";import{a as n}from"./chunk-Q4TZD2M6.js";import{a as t}from"./chunk-I55L6FOM.js";import"./chunk-T7KHS6RF.js";import"./chunk-QLHPTMIH.js";import"./chunk-WNO2V53C.js";import"./chunk-I3J63RFV.js";import"./chunk-JD5P5RAJ.js";import"./chunk-3VYOLEQE.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-IGE4Y5SE.js";import"./chunk-JFBCE4HN.js";import{e as i,g as e}from"./chunk-VKWPEFWQ.js";e();var s=i(c(),1);(0,s.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{await r(o),process.exit(1)});var m=["SIGINT","SIGTERM","SIGQUIT"];m.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function p({development:o}){await n({moduleURL:import.meta.url,development:o,lazyCommandLoader:t})}var I=p;export{I as default};
1
+ import{a as r,b as c}from"./chunk-PFXNBHQQ.js";import{a as n}from"./chunk-NU5WLZ6Y.js";import{a as t}from"./chunk-DMDLJRLW.js";import"./chunk-T7KHS6RF.js";import"./chunk-L4DFMMOI.js";import"./chunk-FOAV642V.js";import"./chunk-I3J63RFV.js";import"./chunk-JD5P5RAJ.js";import"./chunk-6IDEDOXW.js";import"./chunk-TR4OWSEX.js";import"./chunk-ZGASBRSQ.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-IGE4Y5SE.js";import"./chunk-JFBCE4HN.js";import{e as i,g as e}from"./chunk-VKWPEFWQ.js";e();var s=i(c(),1);(0,s.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{await r(o),process.exit(1)});var m=["SIGINT","SIGTERM","SIGQUIT"];m.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function p({development:o}){await n({moduleURL:import.meta.url,development:o,lazyCommandLoader:t})}var I=p;export{I as default};
@@ -1,4 +1,4 @@
1
- import{A as n,B as i,C as t,G as s,y as e,z as o}from"./chunk-RCYQPOJW.js";import{i as d,l}from"./chunk-ZZ7SOJHH.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
1
+ import{A as n,B as i,C as t,G as s,y as e,z as o}from"./chunk-47IQIIFX.js";import{i as d,l}from"./chunk-Q37WAD6F.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
2
2
  Error: Unexpected error
3
3
  at Module._compile (internal/modules/cjs/loader.js:1137:30)
4
4
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-KOYBR5MV.js";import{a as k}from"./chunk-VXGXK66W.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-PG6XEOYF.js";import{b as R}from"./chunk-Q4TZD2M6.js";import{B as v,H as h,z as g}from"./chunk-RCYQPOJW.js";import{d as w}from"./chunk-PQH4U2XV.js";import{k as A}from"./chunk-ZZ7SOJHH.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
1
+ import{a as C}from"./chunk-PWS4VFSD.js";import{a as k}from"./chunk-PO5T44H3.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-UNHT4ZFP.js";import{b as R}from"./chunk-NU5WLZ6Y.js";import{B as v,H as h,z as g}from"./chunk-47IQIIFX.js";import{d as w}from"./chunk-DSS4ECIH.js";import{k as A}from"./chunk-Q37WAD6F.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
2
2
  ${s.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
3
3
 
4
4
  `:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class n extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionForHelp();static flags={...R,...k,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(n),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],r=e["allow-deletes"],s=!!(o&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await x({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:s,allowUpdates:o,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};
@@ -1,4 +1,4 @@
1
- import{b as L}from"./chunk-W56I6HOT.js";import{a as V}from"./chunk-EXKTQF26.js";import{k as q,l as H,n as I}from"./chunk-AKP4QAGL.js";import{a as Y}from"./chunk-NDMISEDF.js";import{a as y,c as U}from"./chunk-2X3HYG4B.js";import{a as N}from"./chunk-YKYJOUV7.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as F}from"./chunk-ELJ34WWD.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-JAY7AGAG.js";import{r as k}from"./chunk-TWS34WUT.js";import{da as B}from"./chunk-P2MVR6CG.js";import{K as b,oa as a,pa as O}from"./chunk-3E3MCY5O.js";import{A as d,B as C,E as P,z as f}from"./chunk-RCYQPOJW.js";import{i as S}from"./chunk-ZZ7SOJHH.js";import{Ib as $}from"./chunk-3F42A3XV.js";import{f as T,q as l}from"./chunk-3VYOLEQE.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
1
+ import{b as L}from"./chunk-WEPO4J2F.js";import{a as V}from"./chunk-VGBUN3CZ.js";import{k as q,l as H,n as I}from"./chunk-SZI6G247.js";import{a as Y}from"./chunk-VS7QVU3Z.js";import{a as y,c as U}from"./chunk-QO5RNGWA.js";import{a as N}from"./chunk-BOE2ST6J.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as F}from"./chunk-QUXQM3S3.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-3LHE4GIX.js";import{r as k}from"./chunk-Y3PY5LP7.js";import{da as B}from"./chunk-NCRWOW6F.js";import{K as b,oa as a,pa as O}from"./chunk-3V4VL3SD.js";import{A as d,B as C,E as P,z as f}from"./chunk-47IQIIFX.js";import{i as S}from"./chunk-Q37WAD6F.js";import{Ib as $}from"./chunk-UWI76E2L.js";import{e as T,p as l}from"./chunk-6IDEDOXW.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -0,0 +1,2 @@
1
+ import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as A}from"./chunk-GE4MLO3C.js";import{a as se}from"./chunk-EMH7OHCW.js";import{a as re}from"./chunk-PWS4VFSD.js";import{a as K}from"./chunk-PO5T44H3.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-UNHT4ZFP.js";import{sa as W}from"./chunk-Y743UVBS.js";import{b as Q,c as Y}from"./chunk-NU5WLZ6Y.js";import{u as $}from"./chunk-3V4VL3SD.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-47IQIIFX.js";import{i as C}from"./chunk-Q37WAD6F.js";import{Ib as F,Kb as I,ga as V}from"./chunk-UWI76E2L.js";import{b as Ce}from"./chunk-I3J63RFV.js";import{i as j}from"./chunk-6IDEDOXW.js";import{e as k,g}from"./chunk-VKWPEFWQ.js";g();g();g();g();g();g();var _=k(N(),1);function be(t){let s=(0,_.useRef)(t);(0,_.useEffect)(()=>{s.current=t},[t]),(0,_.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:l})=>{l&&(n=setTimeout(i,l))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}g();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:a})=>{let l=await i.appLogs({jwtToken:t,cursor:s},a),{errors:f,status:u}=l;if(u!==200){if(u===401||u===429||u>=500)return{errors:f.map(y=>({status:u,message:y}))};throw new C(`${f.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=l,E=_e(c,n);return{cursor:r,appLogs:E}};function _e(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let a=s.status===void 0?!0:i.status===s.status,l=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return a&&l})),n}var R=k(N(),1);async function Ne({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:a,setErrors:l,setAppLogOutputs:f,resubscribeCallback:u,developerPlatformClient:r}){let c=t,E=L,y=s,b=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:a}),p="not_attempted",w=b;if(w.errors){let h=await v({response:w,onThrottle:d=>{l(["Request throttled while polling app logs.",`Retrying in ${d/1e3}s`])},onUnknownError:d=>{l(["Error while polling app logs",`Retrying in ${d/1e3}s`])},onResubscribe:()=>u()});p=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),E=h.retryIntervalMs}else{l(d=>d.length?[]:d);let{appLogs:h}=b;if(y=b.cursor,h)for(let d of h){let T,S,q,J=i.get(d.shop_id.toString());if(J===void 0)continue;switch(d.log_type){case ce:T=fe(d.payload),S=`export "${T.export}" executed in ${(T.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:T=de(d.payload),S="network access response retrieved from cache";break;case pe:T=ge(d.payload),S="network access request executing in background";break;case me:T=Ee(d.payload),q=T.connectTimeMs&&T.writeReadTimeMs?T.connectTimeMs+T.writeReadTimeMs:null,S=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let Se={status:d.status==="success"?"Success":"Failure",source:d.source,storeName:J,description:S,logTimestamp:V(d.log_timestamp)};T&&f(ke=>[...ke,{appLog:T,prefix:Se}])}}return{nextJwtToken:c,retryIntervalMs:E,cursor:y??s,resubscribeResult:p}}function we({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l}){let[f,u]=(0,R.useState)([]),[r,c]=(0,R.useState)([]),E=(0,R.useRef)(t),y=(0,R.useRef)(0),b=(0,R.useRef)(""),p=(0,R.useRef)(0),w=(0,R.useCallback)(async()=>{let h=await Ne({jwtToken:E.current,cursor:b.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:a,organizationId:l});if(h.resubscribeResult==="failed"){if(p.current+=1,p.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(p.current=0);return E.current=h.nextJwtToken,b.current=h.cursor,y.current=h.retryIntervalMs,{retryIntervalMs:y.current}},[]);return be(w),{appLogOutputs:r,errors:f}}var e=k(N(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l})=>{let{appLogOutputs:f,errors:u}=we({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l});return e.default.createElement(e.default.Fragment,null,f.map(({appLog:r,prefix:c},E)=>e.default.createElement(m,{flexDirection:"column",key:E},e.default.createElement(m,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(m,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(m,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(m,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(m,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(m,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(N(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a}){let l=async()=>A(n,s,a);return H(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:l,storeNameById:i,developerPlatformClient:n,organizationId:a}))}g();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:l=0}){let f=await U({pollOptions:t,developerPlatformClient:n,organizationId:a}),u=L,r=t.jwtToken,c=l,E=f;if(E.errors){let p=await v({response:E,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,a)});if(p.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else p.resubscribeResult==="succeeded"&&(c=0);p.nextJwtToken&&(r=p.nextJwtToken),u=p.retryIntervalMs}else c=0;let{cursor:y,appLogs:b}=f;b&&b.forEach(p=>{let w=i.get(p.shop_id?.toString());w!==void 0&&F(ye({appLog:p,appLogPayload:Te(p.payload,p.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:y??t.cursor,filters:t.filters},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:c}).catch(p=>{throw p})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,a=await Me(t),l=he(s);if(l.length===0)throw new C("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let y=t.sources.filter(b=>!l.includes(b));if(y.length)throw new C(`Invalid sources: ${y.join(", ")}. Valid sources are: ${l.join(", ")}`)}let f={shopIds:a.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,f,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"&&F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(`Waiting for app logs...
2
+ `),await(t.format==="json"?D:Ie)({options:{variables:f,developerPlatformClient:i},pollOptions:c,storeNameById:a.storeNameById,organizationId:t.organization.id})}async function Me(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:a,organization:l}=t,f=j(s.configPath);Le(n.title,a.shopDomain,t.storeFqdns,f,l.businessName);let u=new Map;return u.set(a.shopId,a.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let E=await W(l,c,i);u.set(E.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Le(t,s,n,i,a){let l=n&&n.length>0?n:[s],f=i?X(i):void 0;G({headline:i?`Using ${f} for default values:`:"Using these settings:",body:Z({appName:t,org:a,devStores:l,messages:[ee]})})}var O=k(Ce(),1);var B=class t extends re{static summary="Stream detailed logs for your Shopify app.";static descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";static description=this.descriptionForHelp();static flags={...Q,...K,...Y,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async s=>$(s)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};async run(){let{flags:s}=await this.parse(t);await z(s.path);let n=await te({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await se({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),a={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(a),{app:n.app}}};export{B as a};
@@ -0,0 +1,6 @@
1
+ import{l as O,n as W}from"./chunk-QTLGMJDW.js";import{S as v,a as S}from"./chunk-47IQIIFX.js";import{f as y}from"./chunk-DSS4ECIH.js";import{i as u,l as L}from"./chunk-Q37WAD6F.js";import{Cb as c,Eb as s,Nb as d,Xa as w,Ya as i,_a as D,db as F,qa as x,wb as B,ya as _}from"./chunk-UWI76E2L.js";import{c as r,h as k}from"./chunk-6IDEDOXW.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g as f}from"./chunk-VKWPEFWQ.js";f();f();function b(e,n){try{return JSON.parse(e)}catch(a){let t=a instanceof Error?a.message:String(a),o=n?` from ${n}`:"";throw new u(`Failed to parse JSON${o}.
2
+ ${t}`)}}var l=R(I()),N="yarn.lock",j="package-lock.json",$="pnpm-lock.yaml",C="bun.lockb",J="bun.lock",T="pnpm-workspace.yaml",we=[N,$,j,C,J],ye={yarn:[N],npm:[j],pnpm:[$],bun:[C,J],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],M=class extends u{constructor(){super("Unknown package manager")}},h=class extends u{constructor(n){super(s`The directory ${c.path(n)} doesn't have a package.json.`)}},P=class extends L{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${c.path(n)}`)}};function V(e=process.env){let n=e.npm_config_user_agent;return["yarn","pnpm","bun","npm"].find(a=>n?.includes(a))??"unknown"}function U(e){return i(r(e,C))||i(r(e,J))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function A(e){let n=e;for(d(s`Looking for a lockfile in ${c.path(n)}...`);;){if(i(r(n,N)))return"yarn";if(i(r(n,$))||i(r(n,T)))return"pnpm";if(U(n))return"bun";if(i(r(n,j)))return"npm";let t=k(n);if(t===n)break;n=t}let a=V();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let t=G(await A(e));return K(t,n,...a)}async function xe(e){let n=await D(r(e.directory,"**/package.json"),{ignore:[r(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new S;try{await Promise.all(n.map(async t=>{let o=k(t);await z({directory:o,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(t){throw a.abort(),t}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await y("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function ve(e){return(await m(e)).name}async function be(e){return(await m(e)).version}async function H(e){let n=await m(e),a=n.dependencies??{},t=n.devDependencies??{};return{...a,...t}}async function Me(e){let n=r(e,"package.json"),a=await m(n),t=r(e,T);return!!a.workspaces||w(t)}async function Pe(e,n,{cacheExpiryInHours:a=0}={}){let t=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),o=`npm-package-${e}`,p;try{p=await O(o,t,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function Ne(e,n){let a=`npm-package-${e}`,t=W(a)?.value;if(t&&new l.SemVer(n).compare(t)<0)return t}function je(e,n){return(0,l.satisfies)(e,n)}async function m(e){if(!await w(e))throw new h(k(e));return b(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
3
+ ${c.json(e)}
4
+ With options:
5
+ ${c.json(n)}
6
+ `);let a=r(n.directory,"package.json");if(!await w(a))throw new h(n.directory);let t=Object.keys(await H(a)),o=e.filter(p=>!t.includes(p.name));o.length!==0&&await q(o,n)}async function q(e,n){let a=e.map(t=>t.version?`${t.name}@${t.version}`:t.name);switch(n.stdout?.write(`Installing ${a.join(" ")} with ${n.packageManager}`),n.packageManager){case"npm":for(let t of a)await g(n,Q(t,n.type));break;case"yarn":await g(n,X(a,n.type,!!n.addToRootDirectory));break;case"pnpm":await g(n,Z(a,n.type,!!n.addToRootDirectory));break;case"bun":await g(n,ee(a,n.type)),await g(n,["install"]);break;case"homebrew":throw new u("Homebrew can't be used to install project dependencies. Use npm, yarn, pnpm, or bun.");case"unknown":throw new M}}async function g(e,n){return y("cmd_all_timing_network_ms")(async()=>v(e.packageManager,n,{cwd:e.directory,stdout:e.stdout,stderr:e.stderr,signal:e.signal}))}async function $e(e,n){await Y(e.map(a=>({name:a,version:void 0})),n)}function Q(e,n){let t=["install",e,{dev:"--save-dev",peer:"--save-peer",prod:"--save-prod"}[n]];return e.match(/@\d/g)&&t.push("--save-exact"),t}function X(e,n,a=!1){let t={dev:"--dev",peer:"--peer",prod:"--prod"};return["add",...a?["-W"]:[],...e,t[n]]}function Z(e,n,a=!1){let t={dev:"--save-dev",peer:"--save-peer",prod:"--save-prod"};return["add",...a?["-w"]:[],...e,t[n]]}function ee(e,n){let t={dev:"--development",peer:"--optional"}[n];return["add",...e,...t?[t]:[]]}async function Ce(e){let n=await F("package.json",{cwd:e,type:"file"});if(n){let a=b(await x(n),n);return{path:n,content:a}}else throw new P(e)}async function Je(e,n){let a=await A(e),t=await m(r(e,"package.json")),o=a==="yarn"?"resolutions":"overrides";t[o]={...t[o],...n},await ae(e,t)}async function ne(e){return d(s`Getting the latest version of NPM package: ${c.raw(e)}`),y("cmd_all_timing_network_ms")(async()=>{let{default:n}=await import("./latest-version-LDWU5F7A.js");return n(e)})}async function ae(e,n){d(s`JSON-encoding and writing content to package.json at ${c.path(e)}...`);let a=r(e,"package.json");await _(a,JSON.stringify(n,null,2))}function _e(e,n=process.env){if(e&&E.includes(e))return e;let a=V(n);if(a!=="unknown")return a;let t=B();return t!=="unknown"?t:"npm"}export{N as a,j as b,$ as c,C as d,T as e,we as f,ye as g,E as h,M as i,h as j,P as k,V as l,A as m,he as n,xe as o,z as p,ve as q,be as r,H as s,Me as t,Pe as u,Ne as v,je as w,m as x,Y as y,q as z,$e as A,Ce as B,Je as C,ae as D,_e as E};
@@ -1,2 +1,2 @@
1
- import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-3F42A3XV.js";import{d as i}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
1
+ import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-UWI76E2L.js";import{c as i}from"./chunk-6IDEDOXW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
2
2
  *`)),t}export{c as a};
@@ -1 +1 @@
1
- import{b as p}from"./chunk-DH5E6NM3.js";import{c as E,oa as b,pa as k,ra as s}from"./chunk-3E3MCY5O.js";import{J as w}from"./chunk-RCYQPOJW.js";import{i as N}from"./chunk-ZZ7SOJHH.js";import{Nb as V,W as _}from"./chunk-3F42A3XV.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
1
+ import{b as p}from"./chunk-WLWHCUPZ.js";import{c as E,oa as b,pa as k,ra as s}from"./chunk-3V4VL3SD.js";import{J as w}from"./chunk-47IQIIFX.js";import{i as N}from"./chunk-Q37WAD6F.js";import{Nb as V,W as _}from"./chunk-UWI76E2L.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};