shopify 4.9.0 → 4.9.2

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 (353) hide show
  1. package/dist/analytics-H2ANKZ2S.js +1 -0
  2. package/dist/analytics-Q6HJRPRX.js +1 -0
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +14 -0
  4. package/dist/assets/hydrogen/starter/package.json +2 -2
  5. package/dist/bootstrap.js +1 -1
  6. package/dist/chunk-246AZCDT.js +1 -0
  7. package/dist/{chunk-VZUHMW5E.js → chunk-2NMICU24.js} +1 -1
  8. package/dist/{chunk-Y5ZN62VF.js → chunk-2P5DUPT7.js} +1 -1
  9. package/dist/{chunk-SGBLCVUX.js → chunk-2R2PKQQV.js} +1 -1
  10. package/dist/{chunk-BL5JWD3Y.js → chunk-2VDCTMLY.js} +1 -1
  11. package/dist/{chunk-ECEOBSGD.js → chunk-2X3HYG4B.js} +1 -1
  12. package/dist/{chunk-23K3B23N.js → chunk-3ATOVFLZ.js} +1 -1
  13. package/dist/{chunk-L5XWYTHY.js → chunk-3E3MCY5O.js} +3 -3
  14. package/dist/{chunk-S7536EWZ.js → chunk-3EEH3A27.js} +1 -1
  15. package/dist/{chunk-YJWNM4XO.js → chunk-3F42A3XV.js} +2 -2
  16. package/dist/{chunk-ZUVAHONX.js → chunk-3NRGGEGU.js} +1 -1
  17. package/dist/{chunk-CSRNHTHO.js → chunk-3NUQGW57.js} +1 -1
  18. package/dist/{chunk-72HS7MHV.js → chunk-3U2MYUWG.js} +1 -1
  19. package/dist/{chunk-PXXTSW6I.js → chunk-3ZL4TDTH.js} +1 -1
  20. package/dist/{chunk-2W6M7YDY.js → chunk-4565O5TG.js} +1 -1
  21. package/dist/{chunk-5HONV6NQ.js → chunk-46U6C6C6.js} +1 -1
  22. package/dist/{chunk-E5ND6RBL.js → chunk-4QEALPWD.js} +1 -1
  23. package/dist/{chunk-QJST4LZX.js → chunk-4S2WKMLJ.js} +1 -1
  24. package/dist/{chunk-N56BJ3F7.js → chunk-4TF7ER72.js} +1 -1
  25. package/dist/{chunk-6RBCFXJT.js → chunk-525BMYNR.js} +1 -1
  26. package/dist/{chunk-OASB6XPV.js → chunk-55QTRPZ2.js} +1 -1
  27. package/dist/{chunk-SXPWOYLT.js → chunk-5BO5HCN6.js} +1 -1
  28. package/dist/{chunk-GDQLA5NB.js → chunk-5JW2EYSE.js} +1 -1
  29. package/dist/{chunk-PBBZNGS4.js → chunk-5TQOMAJS.js} +1 -1
  30. package/dist/{chunk-CACPRKUF.js → chunk-65I35VBS.js} +1 -1
  31. package/dist/{chunk-D3K42KBL.js → chunk-6H3HVSO5.js} +1 -1
  32. package/dist/{chunk-3DMDSAWK.js → chunk-6NLGZGYE.js} +1 -1
  33. package/dist/{chunk-DKJPE42V.js → chunk-6SO5GA6P.js} +1 -1
  34. package/dist/{chunk-VFP3PUGZ.js → chunk-7ARGLS6W.js} +3 -3
  35. package/dist/chunk-7E4MJCVE.js +10 -0
  36. package/dist/{chunk-OG7SF4FU.js → chunk-7EDXMGBQ.js} +1 -1
  37. package/dist/{chunk-YAH5WFYR.js → chunk-7GJYJ6DU.js} +1 -1
  38. package/dist/{chunk-LV2IWYGL.js → chunk-7IRPE3M5.js} +1 -1
  39. package/dist/{chunk-OETFY7FE.js → chunk-7MMPQMU7.js} +1 -1
  40. package/dist/{chunk-BOFCBTX7.js → chunk-7ZNR4YL4.js} +1 -1
  41. package/dist/{chunk-NTVEJYKI.js → chunk-AKP4QAGL.js} +1 -1
  42. package/dist/{chunk-I4FGM6UH.js → chunk-ANHSOQTZ.js} +1 -1
  43. package/dist/{chunk-77B77IGP.js → chunk-AVOSD4NV.js} +1 -1
  44. package/dist/{chunk-TJJVX7CU.js → chunk-B477XHLZ.js} +1 -1
  45. package/dist/{chunk-7DRKDQRT.js → chunk-BK4VCXDD.js} +1 -1
  46. package/dist/{chunk-55PABKRC.js → chunk-BLBJT7BM.js} +1 -1
  47. package/dist/{chunk-YBQKJHZW.js → chunk-BLCR7BXU.js} +1 -1
  48. package/dist/{chunk-53U6XS3J.js → chunk-BPVXYM6G.js} +1 -1
  49. package/dist/{chunk-WPUQTUDX.js → chunk-BVR3GF2L.js} +1 -1
  50. package/dist/{chunk-MRVQ6XRW.js → chunk-BVVYKX4D.js} +1 -1
  51. package/dist/{chunk-XTYSJIZY.js → chunk-C4GEP3CX.js} +1 -1
  52. package/dist/{chunk-RHNFWHFY.js → chunk-CDIKRQ6M.js} +1 -1
  53. package/dist/{chunk-LSWFHTJT.js → chunk-CGH5Y6XE.js} +1 -1
  54. package/dist/{chunk-44QTWXOJ.js → chunk-CHRFYG6W.js} +1 -1
  55. package/dist/{chunk-B4RPJYDH.js → chunk-CNAMKKAK.js} +1 -1
  56. package/dist/{chunk-PGTKKP2B.js → chunk-D2S566HF.js} +1 -1
  57. package/dist/{chunk-MVVHISCR.js → chunk-DGOBYP74.js} +1 -1
  58. package/dist/{chunk-NYABB6XW.js → chunk-DH5E6NM3.js} +1 -1
  59. package/dist/{chunk-LOTGSNS5.js → chunk-DTGIMRBX.js} +1 -1
  60. package/dist/chunk-DV77BSKW.js +1 -0
  61. package/dist/{chunk-YQQHBFMA.js → chunk-E64OFJHF.js} +1 -1
  62. package/dist/{chunk-N4DE5H65.js → chunk-EGJQEKAO.js} +1 -1
  63. package/dist/{chunk-7Y4X5I6N.js → chunk-EJY4LA2S.js} +1 -1
  64. package/dist/{chunk-LYPNQFWX.js → chunk-ELJ34WWD.js} +1 -1
  65. package/dist/{chunk-5BLXN5WU.js → chunk-ELQ5NPPB.js} +1 -1
  66. package/dist/{chunk-XFZDFDZV.js → chunk-EMKLN75K.js} +1 -1
  67. package/dist/{chunk-QTEWTPAQ.js → chunk-EMRUM6AA.js} +1 -1
  68. package/dist/{chunk-4XSYMLQG.js → chunk-EP5HIGAL.js} +1 -1
  69. package/dist/{chunk-IWML2HLC.js → chunk-ER7ZTF26.js} +1 -1
  70. package/dist/{chunk-VFO5OYQ4.js → chunk-EXKTQF26.js} +1 -1
  71. package/dist/{chunk-FW5HGFSZ.js → chunk-EZ5F4ZFY.js} +3 -3
  72. package/dist/{chunk-3AASYIOA.js → chunk-FICC6IFE.js} +1 -1
  73. package/dist/{chunk-QSKOR3ED.js → chunk-FNKTF2OF.js} +1 -1
  74. package/dist/{chunk-6GA56I3E.js → chunk-FQKURDZR.js} +1 -1
  75. package/dist/{chunk-SDFO7P2M.js → chunk-FU4UVINZ.js} +1 -1
  76. package/dist/{chunk-CHLSNYF7.js → chunk-G627WGIC.js} +2 -2
  77. package/dist/{chunk-FL34EOXG.js → chunk-GPJJA3FX.js} +1 -1
  78. package/dist/{chunk-PXD2WJOI.js → chunk-GS52MX5F.js} +1 -1
  79. package/dist/{chunk-ZPCCSPAE.js → chunk-HKZ75UKL.js} +1 -1
  80. package/dist/chunk-HVU3D3ZU.js +275 -0
  81. package/dist/{chunk-BPIQ4YTW.js → chunk-HYC3JXR4.js} +1 -1
  82. package/dist/{chunk-JOJRABPY.js → chunk-HZJHGHLN.js} +1 -1
  83. package/dist/{chunk-NF7MOA4K.js → chunk-I2LILWDI.js} +1 -1
  84. package/dist/{chunk-JA2QZ635.js → chunk-I3J63RFV.js} +1 -1
  85. package/dist/{chunk-GALDYSEX.js → chunk-I55L6FOM.js} +1 -1
  86. package/dist/{chunk-5HEBS5DG.js → chunk-IESHPQLC.js} +1 -1
  87. package/dist/{chunk-ET2CGROE.js → chunk-IGE4Y5SE.js} +1 -1
  88. package/dist/{chunk-QILWHHAQ.js → chunk-IJLD5UYC.js} +1 -1
  89. package/dist/{chunk-IISE7SBT.js → chunk-IOS4IDZ2.js} +1 -1
  90. package/dist/{chunk-HSZC2LBB.js → chunk-IQIUFTR6.js} +1 -1
  91. package/dist/{chunk-WU7MSL3I.js → chunk-J66WAKXN.js} +1 -1
  92. package/dist/{chunk-BJOJNAKH.js → chunk-J7ZG6SO3.js} +1 -1
  93. package/dist/{chunk-PK4ID32C.js → chunk-JAX56OYG.js} +1 -1
  94. package/dist/{chunk-R757TSQ6.js → chunk-JAY7AGAG.js} +1 -1
  95. package/dist/{chunk-SJARQZVN.js → chunk-JCKA3O5A.js} +1 -1
  96. package/dist/{chunk-YD66PU3Y.js → chunk-JCO2SDDR.js} +1 -1
  97. package/dist/{chunk-TOLPNBZK.js → chunk-JFBCE4HN.js} +1 -1
  98. package/dist/{chunk-OM243CQ6.js → chunk-JJHJYBPQ.js} +1 -1
  99. package/dist/{chunk-Z35PUKKP.js → chunk-JKWB7WTO.js} +1 -1
  100. package/dist/{chunk-ASUARYJD.js → chunk-JLGXJHPX.js} +1 -1
  101. package/dist/{chunk-TSLZNTFM.js → chunk-JUCOIXG5.js} +1 -1
  102. package/dist/{chunk-HSTNTHWM.js → chunk-JUVJNIEA.js} +1 -1
  103. package/dist/{chunk-GJJBOCKD.js → chunk-JWDR66AS.js} +1 -1
  104. package/dist/chunk-KOYBR5MV.js +1 -0
  105. package/dist/{chunk-7IGMIDKK.js → chunk-KPNUSDCW.js} +1 -1
  106. package/dist/{chunk-7ZSN2QT5.js → chunk-KY36HSIB.js} +1 -1
  107. package/dist/{chunk-2OHSGC4Q.js → chunk-KYBZ2MBA.js} +1 -1
  108. package/dist/{chunk-74HXMIDM.js → chunk-LIQSNIB3.js} +1 -1
  109. package/dist/{chunk-KLYJDAP6.js → chunk-LWF4EV22.js} +1 -1
  110. package/dist/{chunk-3T2WMZHC.js → chunk-M7QFZQ23.js} +1 -1
  111. package/dist/{chunk-KVROYIUQ.js → chunk-MHZSSRHP.js} +1 -1
  112. package/dist/{chunk-TNXZWQZU.js → chunk-MIP2Y34N.js} +1 -1
  113. package/dist/{chunk-WCAGYCT7.js → chunk-MP5NZL7C.js} +1 -1
  114. package/dist/{chunk-5RL6DKWR.js → chunk-MQZPASSP.js} +1 -1
  115. package/dist/{chunk-3ZK5JZLY.js → chunk-MW3HFOPD.js} +1 -1
  116. package/dist/{chunk-EYSZRIUL.js → chunk-N4AR2B6D.js} +1 -1
  117. package/dist/{chunk-UFU2LGFK.js → chunk-NDMISEDF.js} +1 -1
  118. package/dist/{chunk-CPFAATMO.js → chunk-NLKO2J7T.js} +1 -1
  119. package/dist/{chunk-VDDNDA5K.js → chunk-NS4FUSSK.js} +1 -1
  120. package/dist/{chunk-PZHE37Z4.js → chunk-OCQZ2ULI.js} +1 -1
  121. package/dist/{chunk-4A7FPJVT.js → chunk-OERMQ2FP.js} +1 -1
  122. package/dist/{chunk-T234RERA.js → chunk-OIQVPTNQ.js} +1 -1
  123. package/dist/{chunk-G7OIACY5.js → chunk-OMEWUFUL.js} +1 -1
  124. package/dist/{chunk-O6E7YL7N.js → chunk-OXN2DID2.js} +1 -1
  125. package/dist/{chunk-IBTQO3JD.js → chunk-P2MVR6CG.js} +107 -107
  126. package/dist/{chunk-E75DJTAF.js → chunk-P6TOIMMF.js} +1 -1
  127. package/dist/{chunk-6IL3B5Z5.js → chunk-PFIQR7XS.js} +1 -1
  128. package/dist/{chunk-2KLXRVGQ.js → chunk-PG6XEOYF.js} +38 -38
  129. package/dist/{chunk-Q34PKJRR.js → chunk-PGE4HGLA.js} +1 -1
  130. package/dist/{chunk-ZHJ6KA43.js → chunk-PI6FLLDD.js} +1 -1
  131. package/dist/{chunk-HDQXFGYG.js → chunk-PIZDYS7T.js} +60 -60
  132. package/dist/{chunk-Q45XAEG2.js → chunk-PQCALXSD.js} +1 -1
  133. package/dist/{chunk-G54BKNIX.js → chunk-PQH4U2XV.js} +1 -1
  134. package/dist/{chunk-ZSJXZCAW.js → chunk-PQMKPXFV.js} +1 -1
  135. package/dist/{chunk-LQLFMDVD.js → chunk-PV5C6Q2P.js} +1 -1
  136. package/dist/{chunk-CMICT4XI.js → chunk-PYILLIGT.js} +1 -1
  137. package/dist/{chunk-55NKAIIT.js → chunk-Q26ES5T3.js} +1 -1
  138. package/dist/{chunk-DGMRL5DQ.js → chunk-Q4TZD2M6.js} +1 -1
  139. package/dist/{chunk-QAXFCAOV.js → chunk-Q555FV2X.js} +1 -1
  140. package/dist/{chunk-YX5GRXRS.js → chunk-Q7PF4VKI.js} +23 -23
  141. package/dist/{chunk-PVOWU77O.js → chunk-QA2NOPXG.js} +1 -1
  142. package/dist/{chunk-5XO6PAMV.js → chunk-QLHPTMIH.js} +1 -1
  143. package/dist/{chunk-7QQPAT4L.js → chunk-QMJZFKKU.js} +1 -1
  144. package/dist/{chunk-3SG5EJFC.js → chunk-QN6SITWN.js} +1 -1
  145. package/dist/{chunk-JROJL6RV.js → chunk-R43LXE66.js} +1 -1
  146. package/dist/chunk-R6IJRVVM.js +70 -0
  147. package/dist/{chunk-XBSWZ6BT.js → chunk-RAQP66LR.js} +1 -1
  148. package/dist/{chunk-Z3XIZMEM.js → chunk-RBPMV3KB.js} +1 -1
  149. package/dist/{chunk-SKRUMRB4.js → chunk-RCYQPOJW.js} +88 -88
  150. package/dist/{chunk-ZSVR5NEO.js → chunk-RDO5IWB5.js} +1 -1
  151. package/dist/{chunk-A54V5UCD.js → chunk-RGZCV56L.js} +1 -1
  152. package/dist/{chunk-ZVDFCUJT.js → chunk-RW2MONAS.js} +1 -1
  153. package/dist/{chunk-2LZQM5JG.js → chunk-RY6TZDVV.js} +1 -1
  154. package/dist/{chunk-2YRVHJEY.js → chunk-SDHDDNKM.js} +1 -1
  155. package/dist/{chunk-AD4S2VEI.js → chunk-SHBB5GST.js} +1 -1
  156. package/dist/{chunk-JWDUSMCA.js → chunk-SQIESCOJ.js} +1 -1
  157. package/dist/{chunk-I7GYNNCU.js → chunk-SRDKLZ4O.js} +1 -1
  158. package/dist/{chunk-QQN4PJZD.js → chunk-SWNY3RUM.js} +1 -1
  159. package/dist/{chunk-RCIU7NHA.js → chunk-SYNCIFJ6.js} +1 -1
  160. package/dist/{chunk-C6FZII5S.js → chunk-SZ2JOXTG.js} +1 -1
  161. package/dist/{chunk-AS2O62JX.js → chunk-T3JUBPBU.js} +1 -1
  162. package/dist/{chunk-TO7TXDLU.js → chunk-T6TYF72N.js} +1 -1
  163. package/dist/{chunk-5BYVVXGD.js → chunk-TEASB2WU.js} +1 -1
  164. package/dist/{chunk-6DHY67FO.js → chunk-THW6UDZH.js} +1 -1
  165. package/dist/{chunk-22LJALHJ.js → chunk-TPPBEVNQ.js} +1 -1
  166. package/dist/chunk-TQ7MHGY4.js +1 -0
  167. package/dist/{chunk-LQ7ENG4V.js → chunk-TQ7URMGS.js} +1 -1
  168. package/dist/{chunk-ADW7ECNU.js → chunk-TUE67I2F.js} +1 -1
  169. package/dist/{chunk-P3Z5RLVV.js → chunk-TWS34WUT.js} +1 -1
  170. package/dist/{chunk-QBGSSUJP.js → chunk-U5L2P36D.js} +1 -1
  171. package/dist/{chunk-ZO4IBP4B.js → chunk-UB2LAIXS.js} +1 -1
  172. package/dist/{chunk-4Y22EM45.js → chunk-UMSO6MOI.js} +1 -1
  173. package/dist/{chunk-Q3O3AFZT.js → chunk-UOKX3AME.js} +1 -1
  174. package/dist/{chunk-2Q3WIH7S.js → chunk-UVC3IXM3.js} +1 -1
  175. package/dist/chunk-UWHAOGO4.js +4 -0
  176. package/dist/{chunk-OBYY45BX.js → chunk-UYRXUGLY.js} +1 -1
  177. package/dist/{chunk-JTPVSO6Y.js → chunk-VXGXK66W.js} +1 -1
  178. package/dist/{chunk-JQKB3D37.js → chunk-VZLEYZLX.js} +1 -1
  179. package/dist/{chunk-2YFB3PTV.js → chunk-W56I6HOT.js} +1 -1
  180. package/dist/{chunk-7HDJBEBP.js → chunk-WINVPFT5.js} +1 -1
  181. package/dist/{chunk-SDJNAUU6.js → chunk-WNE2MZAZ.js} +1 -1
  182. package/dist/{chunk-OEZATTOS.js → chunk-WXT5AKZV.js} +1 -1
  183. package/dist/{chunk-W7CBJNXD.js → chunk-WZEKBD7B.js} +1 -1
  184. package/dist/{chunk-IUZZWXJG.js → chunk-X6HLGOIV.js} +1 -1
  185. package/dist/{chunk-4WACZNFF.js → chunk-XE5QH4D7.js} +1 -1
  186. package/dist/{chunk-XCNJL7ES.js → chunk-XRJ2GQ24.js} +1 -1
  187. package/dist/{chunk-3WVEL423.js → chunk-XTKXBQVA.js} +1 -1
  188. package/dist/{chunk-6ILP6QCH.js → chunk-YIV3CWED.js} +1 -1
  189. package/dist/{chunk-GVRFO4CV.js → chunk-YKYJOUV7.js} +1 -1
  190. package/dist/{chunk-DYA5UUXL.js → chunk-YXKMPCFH.js} +1 -1
  191. package/dist/{chunk-NGN7U2UF.js → chunk-Z57YWHOE.js} +1 -1
  192. package/dist/{chunk-4TQFTZVD.js → chunk-Z5SFLTH6.js} +1 -1
  193. package/dist/{chunk-QWDJRSJJ.js → chunk-ZJ4H3XEL.js} +1 -1
  194. package/dist/{chunk-FCULF3JA.js → chunk-ZZ7SOJHH.js} +1 -1
  195. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  196. package/dist/cli/commands/app/build.js +1 -1
  197. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  198. package/dist/cli/commands/app/bulk/execute.js +1 -1
  199. package/dist/cli/commands/app/bulk/status.js +1 -1
  200. package/dist/cli/commands/app/config/link.js +1 -1
  201. package/dist/cli/commands/app/config/pull.js +1 -1
  202. package/dist/cli/commands/app/config/use.js +1 -1
  203. package/dist/cli/commands/app/config/validate.js +1 -1
  204. package/dist/cli/commands/app/demo/watcher.js +1 -1
  205. package/dist/cli/commands/app/deploy.js +1 -1
  206. package/dist/cli/commands/app/dev/clean.js +1 -1
  207. package/dist/cli/commands/app/dev.js +1 -1
  208. package/dist/cli/commands/app/env/pull.js +1 -1
  209. package/dist/cli/commands/app/env/show.js +1 -1
  210. package/dist/cli/commands/app/execute.js +1 -1
  211. package/dist/cli/commands/app/function/build.js +1 -1
  212. package/dist/cli/commands/app/function/info.js +1 -1
  213. package/dist/cli/commands/app/function/replay.js +1 -1
  214. package/dist/cli/commands/app/function/run.js +1 -1
  215. package/dist/cli/commands/app/function/schema.js +1 -1
  216. package/dist/cli/commands/app/function/typegen.js +1 -1
  217. package/dist/cli/commands/app/generate/extension.js +1 -1
  218. package/dist/cli/commands/app/graphiql.js +1 -1
  219. package/dist/cli/commands/app/import/channel-config.js +1 -1
  220. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  221. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  222. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  223. package/dist/cli/commands/app/import-extensions.js +1 -1
  224. package/dist/cli/commands/app/info.js +1 -1
  225. package/dist/cli/commands/app/init.js +1 -1
  226. package/dist/cli/commands/app/logs.js +1 -1
  227. package/dist/cli/commands/app/release.js +1 -1
  228. package/dist/cli/commands/app/security/check.js +1 -1
  229. package/dist/cli/commands/app/security/clean.js +1 -1
  230. package/dist/cli/commands/app/security/instructions.js +1 -1
  231. package/dist/cli/commands/app/security/record.js +1 -1
  232. package/dist/cli/commands/app/security/review.js +1 -1
  233. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  234. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  235. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  236. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  237. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  238. package/dist/cli/commands/app/versions/list.js +1 -1
  239. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  240. package/dist/cli/commands/auth/login.js +1 -1
  241. package/dist/cli/commands/auth/logout.js +1 -1
  242. package/dist/cli/commands/cache/clear.js +1 -1
  243. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  244. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  245. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  246. package/dist/cli/commands/debug/command-flags.js +1 -1
  247. package/dist/cli/commands/doc/fetch.js +1 -1
  248. package/dist/cli/commands/doc/search.js +1 -1
  249. package/dist/cli/commands/docs/generate.js +1 -1
  250. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  251. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  252. package/dist/cli/commands/help.js +1 -1
  253. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  254. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  255. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  256. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  257. package/dist/cli/commands/notifications/generate.js +1 -1
  258. package/dist/cli/commands/notifications/list.js +1 -1
  259. package/dist/cli/commands/organization/list.js +1 -1
  260. package/dist/cli/commands/search.js +1 -1
  261. package/dist/cli/commands/send-analytics.js +1 -1
  262. package/dist/cli/commands/theme/check.js +1 -1
  263. package/dist/cli/commands/theme/console.js +1 -1
  264. package/dist/cli/commands/theme/delete.js +1 -1
  265. package/dist/cli/commands/theme/dev.js +1 -1
  266. package/dist/cli/commands/theme/duplicate.js +1 -1
  267. package/dist/cli/commands/theme/info.js +1 -1
  268. package/dist/cli/commands/theme/init.js +1 -1
  269. package/dist/cli/commands/theme/language-server.js +1 -1
  270. package/dist/cli/commands/theme/list.js +1 -1
  271. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  272. package/dist/cli/commands/theme/open.js +1 -1
  273. package/dist/cli/commands/theme/package.js +1 -1
  274. package/dist/cli/commands/theme/preview.js +1 -1
  275. package/dist/cli/commands/theme/profile.js +1 -1
  276. package/dist/cli/commands/theme/publish.js +1 -1
  277. package/dist/cli/commands/theme/pull.js +1 -1
  278. package/dist/cli/commands/theme/push.js +1 -1
  279. package/dist/cli/commands/theme/rename.js +1 -1
  280. package/dist/cli/commands/theme/share.js +1 -1
  281. package/dist/cli/commands/upgrade.js +1 -1
  282. package/dist/cli/commands/version.js +1 -1
  283. package/dist/cli/help.js +1 -1
  284. package/dist/{command-json-schema-Y3N2NUZN.js → command-json-schema-HYYJSZAH.js} +1 -1
  285. package/dist/command-registry.js +1 -1
  286. package/dist/{conf-store-5ZA3ILWV.js → conf-store-CDZ5YSQM.js} +1 -1
  287. package/dist/{custom-oclif-loader-VQKMCXNH.js → custom-oclif-loader-NVOK22CJ.js} +1 -1
  288. package/dist/{deprecations-PFQXWNF6.js → deprecations-33DG6ZUL.js} +1 -1
  289. package/dist/dist-DODCXJ2A.js +1 -0
  290. package/dist/dist-YXMAKIFS.js +1 -0
  291. package/dist/environments-KBRQNE4R.js +1 -0
  292. package/dist/{error-FBSXLW22.js → error-V77H2UYX.js} +1 -1
  293. package/dist/error-handler-JY3ZKE2G.js +1 -0
  294. package/dist/{fs-ZLV5W4TV.js → fs-SKH3XZU7.js} +1 -1
  295. package/dist/hooks/did-you-mean.js +1 -1
  296. package/dist/hooks/hydrogen-init.js +1 -1
  297. package/dist/hooks/plugin-plugins.js +1 -1
  298. package/dist/hooks/postrun.js +1 -1
  299. package/dist/hooks/prerun.js +1 -1
  300. package/dist/hooks/public-metadata.js +1 -1
  301. package/dist/hooks/sensitive-metadata.js +1 -1
  302. package/dist/hooks/tunnel-provider.js +1 -1
  303. package/dist/hooks/tunnel-start.js +1 -1
  304. package/dist/index.js +1 -1
  305. package/dist/is-global-2G4BLF7H.js +1 -0
  306. package/dist/{json-error-2BL3UZ7H.js → json-error-WSMAL66C.js} +1 -1
  307. package/dist/lib-55QUD4AJ.js +1 -0
  308. package/dist/lib-PH52G55H.js +1 -0
  309. package/dist/lib-TYM5B75S.js +1 -0
  310. package/dist/{local-KAZJAYLX.js → local-G2Z24BHM.js} +1 -1
  311. package/dist/{metadata-M3ZE24WB.js → metadata-Y3RKC4P2.js} +1 -1
  312. package/dist/{morph-42EXMN3K.js → morph-BABFBRSW.js} +1 -1
  313. package/dist/{node-package-manager-RVPONQBY.js → node-package-manager-A7HTBJKY.js} +1 -1
  314. package/dist/notifications-system-E64OSVXF.js +1 -0
  315. package/dist/os-7VQXVZWF.js +1 -0
  316. package/dist/{output-SDE274Y5.js → output-ZFFHJGNK.js} +1 -1
  317. package/dist/system-ZLITSFDC.js +1 -0
  318. package/dist/tsconfig.tsbuildinfo +1 -1
  319. package/dist/typescript-ISACCMJN.js +1 -0
  320. package/dist/ui-YSFALYSL.js +1 -0
  321. package/dist/upgrade-I4JTR4LA.js +1 -0
  322. package/dist/version-AOVO47AW.js +1 -0
  323. package/dist/version-LQV54JBC.js +1 -0
  324. package/dist/{workerd-WRW4ZUYM.js → workerd-RNDPF36Q.js} +1 -1
  325. package/oclif.manifest.json +2 -2
  326. package/package.json +8 -8
  327. package/dist/analytics-QK4RFCB6.js +0 -1
  328. package/dist/analytics-R6I5APDB.js +0 -1
  329. package/dist/chunk-7Y7AZRL3.js +0 -10
  330. package/dist/chunk-F3TMLDLC.js +0 -1
  331. package/dist/chunk-GQZPGTG7.js +0 -278
  332. package/dist/chunk-RGIUP4FW.js +0 -1
  333. package/dist/chunk-SW5EWGBJ.js +0 -12
  334. package/dist/chunk-TMV37ENR.js +0 -64
  335. package/dist/chunk-WXV35TPE.js +0 -1
  336. package/dist/chunk-YGFEUXKQ.js +0 -1
  337. package/dist/chunk-ZOYSMJ27.js +0 -1
  338. package/dist/dist-4X53WJBQ.js +0 -1
  339. package/dist/dist-5M2V3YCM.js +0 -1
  340. package/dist/environments-3RUZ7F4Q.js +0 -1
  341. package/dist/error-handler-D5BURRJ7.js +0 -1
  342. package/dist/is-global-GZ5CIXQA.js +0 -1
  343. package/dist/lib-AD2G3QH3.js +0 -1
  344. package/dist/lib-VEVNMHDE.js +0 -1
  345. package/dist/lib-ZQW4E7QU.js +0 -1
  346. package/dist/notifications-system-MYEMV7JF.js +0 -1
  347. package/dist/os-DRUILZZR.js +0 -1
  348. package/dist/system-5FQ3L5PA.js +0 -1
  349. package/dist/typescript-5R4Y7PXE.js +0 -1
  350. package/dist/ui-TEZZM7SE.js +0 -1
  351. package/dist/upgrade-3PIVJYBL.js +0 -1
  352. package/dist/version-FMWTVLMF.js +0 -1
  353. package/dist/version-IAMVSP7U.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as R}from"./chunk-SKRUMRB4.js";import{i as E}from"./chunk-FCULF3JA.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-YJWNM4XO.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=u({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
1
+ import{o as R}from"./chunk-RCYQPOJW.js";import{i as E}from"./chunk-ZZ7SOJHH.js";import{Nb as p,Ob as m,aa as b,ga as N}from"./chunk-3F42A3XV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:M}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=M}},h=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};i();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?u(t,e):t}function u(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?u(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(p(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){p(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=u({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
2
2
  `).filter(Boolean),a.payload.inputQueryVariablesMetafieldValue&&(a.payload.inputQueryVariablesMetafieldValue=x(a.payload.inputQueryVariablesMetafieldValue))),o?JSON.stringify(a,null,2):JSON.stringify(a)},pe=(t,e)=>{let r=u(JSON.parse(t));return e===V?new l(r):e===U?new h(r):e===q?new d(r):e===J?new y(r):r},ue=async(t,e,r,o)=>{let n=await t.subscribeToAppLogs(e,r);if(!n.appLogsSubscribe)throw new E("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:a,errors:f}=n.appLogsSubscribe;if(p(`Token: ${s}
3
3
  `),p(`API Key: ${e.apiKey}
4
4
  `),f&&f.length>0){let c=f.join(", ");throw await R({stripAnsi:!1},()=>{m(`Errors subscribing to app logs: ${c}`,o),m("App log streaming is not available in this session.",o)}),new E(c)}else{if(!s)throw new E("Failed to subscribe to app logs: No response received");let c=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];p(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),a!==void 0&&p(`Success: ${a}
@@ -1,4 +1,4 @@
1
- import{b as L}from"./chunk-2YFB3PTV.js";import{a as V}from"./chunk-VFO5OYQ4.js";import{k as q,l as H,n as I}from"./chunk-NTVEJYKI.js";import{a as Y}from"./chunk-UFU2LGFK.js";import{a as y,c as U}from"./chunk-ECEOBSGD.js";import{a as N}from"./chunk-GVRFO4CV.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as F}from"./chunk-LYPNQFWX.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-R757TSQ6.js";import{r as k}from"./chunk-P3Z5RLVV.js";import{aa as B}from"./chunk-IBTQO3JD.js";import{K as b,oa as a,pa as O}from"./chunk-L5XWYTHY.js";import{A as d,B as C,E as P,z as f}from"./chunk-SKRUMRB4.js";import{i as S}from"./chunk-FCULF3JA.js";import{Ib as $}from"./chunk-YJWNM4XO.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-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}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -1 +1 @@
1
- import{k as p}from"./chunk-YTJ3EPD3.js";import{a as i}from"./chunk-5RL6DKWR.js";import{Gb as g,Kb as a,Nb as v,Ob as h,Sb as C,lb as u,mb as d,nb as e,ob as c,pb as f,qb as m,sb as r}from"./chunk-YJWNM4XO.js";import{g as E}from"./chunk-SGBLCVUX.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b};
1
+ import{k as p}from"./chunk-YTJ3EPD3.js";import{a as i}from"./chunk-MQZPASSP.js";import{Gb as g,Kb as a,Nb as v,Ob as h,Sb as C,lb as u,mb as d,nb as e,ob as c,pb as f,qb as m,sb as r}from"./chunk-3F42A3XV.js";import{g as E}from"./chunk-2R2PKQQV.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-GVRFO4CV.js";import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as _}from"./chunk-LYPNQFWX.js";import{f as a,g as l,p as S,v as b}from"./chunk-P3Z5RLVV.js";import{b as T,c as g}from"./chunk-DGMRL5DQ.js";import{oa as s,ra as p}from"./chunk-L5XWYTHY.js";import{y as f}from"./chunk-SKRUMRB4.js";import{d as m}from"./chunk-OEZATTOS.js";import{i as v}from"./chunk-FCULF3JA.js";import{Ib as c}from"./chunk-YJWNM4XO.js";import{b as x}from"./chunk-JA2QZ635.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();function A(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:I(t,e),editor_url:w(t,e)}}}function D(t){let{platform:e,arch:n}=m(),o=a(),r=null;return o&&(r=Number(l())||null),{store:o??"Not configured",development_theme_id:r,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(t,e){let n;if(e.development)n=await new E(t).findOrCreate();else{let o={filter:{theme:e.theme}};n=await _(t,o)}return n?A(n,t):void 0}async function y(t){return[M(),await j(t)]}function M(){let t=a()??"Not configured",e=l();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",t],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(t){let{platform:e,arch:n}=m();return N("Tooling and System",[["Shopify CLI",t.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(t,e){let n=Object.entries(t.theme).map(([o,r])=>{if(o==="editor_url"||o==="preview_url"){let C=String(r),$=o==="editor_url"?"Open in Theme Editor":"Preview Theme";return[u(o),{link:{url:C,label:$}}]}else return o==="id"?[u(o),`#${r}`]:[u(o),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function u(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var d=L(x(),1);var h=class extends b{static description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static flags={...T,...g,...S,development:d.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n){if(s("theme-command:info"),e.theme||e.development){let o=await O(n,e);if(!o)throw new v("Theme not found!");if(e.json)return c(JSON.stringify(o,null,2));let r=await F(o,e);f(r)}else{if(e.json)return c(JSON.stringify(D({cliVersion:this.config.version}),null,2));let o=await y({cliVersion:this.config.version});f({customSections:o})}s("theme-command:info")}};export{h as a};
1
+ import{a as E}from"./chunk-YKYJOUV7.js";import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as _}from"./chunk-ELJ34WWD.js";import{f as a,g as l,p as S,v as b}from"./chunk-TWS34WUT.js";import{b as T,c as g}from"./chunk-Q4TZD2M6.js";import{oa as s,ra as p}from"./chunk-3E3MCY5O.js";import{y as f}from"./chunk-RCYQPOJW.js";import{d as m}from"./chunk-WXT5AKZV.js";import{i as v}from"./chunk-ZZ7SOJHH.js";import{Ib as c}from"./chunk-3F42A3XV.js";import{b as x}from"./chunk-I3J63RFV.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();function A(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:I(t,e),editor_url:w(t,e)}}}function D(t){let{platform:e,arch:n}=m(),o=a(),r=null;return o&&(r=Number(l())||null),{store:o??"Not configured",development_theme_id:r,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(t,e){let n;if(e.development)n=await new E(t).findOrCreate();else{let o={filter:{theme:e.theme}};n=await _(t,o)}return n?A(n,t):void 0}async function y(t){return[M(),await j(t)]}function M(){let t=a()??"Not configured",e=l();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",t],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(t){let{platform:e,arch:n}=m();return N("Tooling and System",[["Shopify CLI",t.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(t,e){let n=Object.entries(t.theme).map(([o,r])=>{if(o==="editor_url"||o==="preview_url"){let C=String(r),$=o==="editor_url"?"Open in Theme Editor":"Preview Theme";return[u(o),{link:{url:C,label:$}}]}else return o==="id"?[u(o),`#${r}`]:[u(o),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function u(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var d=L(x(),1);var h=class extends b{static description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static flags={...T,...g,...S,development:d.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n){if(s("theme-command:info"),e.theme||e.development){let o=await O(n,e);if(!o)throw new v("Theme not found!");if(e.json)return c(JSON.stringify(o,null,2));let r=await F(o,e);f(r)}else{if(e.json)return c(JSON.stringify(D({cliVersion:this.config.version}),null,2));let o=await y({cliVersion:this.config.version});f({customSections:o})}s("theme-command:info")}};export{h as a};
@@ -1,4 +1,4 @@
1
- import{c as ge}from"./chunk-QJST4LZX.js";import{a as he,c as ye}from"./chunk-IISE7SBT.js";import{b as ue}from"./chunk-CHLSNYF7.js";import{a as Te}from"./chunk-YGFEUXKQ.js";import{Da as Fe,Ha as Le,J as ve,R as Pe,T as Ae,V as ke,da as xe,ga as Ce,h as we}from"./chunk-2KLXRVGQ.js";import{A as be,ma as Ie,ra as Re}from"./chunk-Q45XAEG2.js";import{b as fe,f as de}from"./chunk-DGMRL5DQ.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-6GA56I3E.js";import{e as Q}from"./chunk-QAXFCAOV.js";import{a as z}from"./chunk-RGIUP4FW.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-SKRUMRB4.js";import{c as ne}from"./chunk-OEZATTOS.js";import{d as se}from"./chunk-G54BKNIX.js";import{i as m}from"./chunk-FCULF3JA.js";import{Aa as Y,Cb as h,Db as F,Eb as b,Ga as I,Na as V,Sa as K,Xa as R,Ya as x,Za as B,_a as W,ca as H,db as Z,oa as q,qa as O,ub as X,vb as J,wa as T,ya as _}from"./chunk-YJWNM4XO.js";import{f as me}from"./chunk-SGBLCVUX.js";import{b as He}from"./chunk-JA2QZ635.js";import{d as l,e as k,f as M,p as U,q as D}from"./chunk-3VYOLEQE.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
1
+ import{c as ge}from"./chunk-4S2WKMLJ.js";import{a as he,c as ye}from"./chunk-IOS4IDZ2.js";import{b as ue}from"./chunk-G627WGIC.js";import{a as Te}from"./chunk-KOYBR5MV.js";import{Da as Fe,Ha as Le,J as ve,R as Pe,T as Ae,V as ke,da as xe,ga as Ce,h as we}from"./chunk-PG6XEOYF.js";import{A as be,ma as Ie,ra as Re}from"./chunk-PQCALXSD.js";import{b as fe,f as de}from"./chunk-Q4TZD2M6.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-FQKURDZR.js";import{e as Q}from"./chunk-Q555FV2X.js";import{a as z}from"./chunk-TQ7MHGY4.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-RCYQPOJW.js";import{c as ne}from"./chunk-WXT5AKZV.js";import{d as se}from"./chunk-PQH4U2XV.js";import{i as m}from"./chunk-ZZ7SOJHH.js";import{Aa as Y,Cb as h,Db as F,Eb as b,Ga as I,Na as V,Sa as K,Xa as R,Ya as x,Za as B,_a as W,ca as H,db as Z,oa as q,qa as O,ub as X,vb as J,wa as T,ya as _}from"./chunk-3F42A3XV.js";import{f as me}from"./chunk-2R2PKQQV.js";import{b as He}from"./chunk-I3J63RFV.js";import{d as l,e as k,f as M,p as U,q as D}from"./chunk-3VYOLEQE.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
2
  Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await q(async o=>{let f=l(o,"download"),u=i.filePath?l(f,i.filePath):f,d=l(o,"app"),A=i.branch?`${i.baseURL}#${i.branch}`:i.baseURL;await Y(f);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:f,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(u,d,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let p=(await ie(d)).content;p.name=a,p.author=await ne()??"",p.private=!0;let v=["extensions/*"].concat(We(d));switch(t){case"npm":case"yarn":case"bun":p.workspaces=v;break;case"pnpm":{await Ze(d,v),await T(l(d,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new te}await Se({packageJSON:p,local:e.local,directory:d,useGlobalCLI:e.useGlobalCLI}),await re(d,p)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let p=l(d,".gitignore");if(await R(p)){let v=await O(p);C.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await _(p,v.trim())}}}),await me()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let p=l(d,".npmrc");await T(p,`@shopify:registry=https://registry.npmjs.org
4
4
  `)}});let N=!1;w.push({title:"Preparing project directory",task:async()=>{await Ee(r,a),N=!0,await K(d,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await Ge({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await G(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await ce(w)}catch(p){throw N&&await I(r).catch(()=>{}),p}});let n;if(e.selectedAppOrNameResult.result==="new"){let o=await ve(r,e.name),f=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(f,o)}else n=e.selectedAppOrNameResult.app;await Fe({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return pe({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:F(t,"shopify app generate extension")}],["To see your app, run",{command:F(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:F(t,"shopify app","--help")}]]}),{app:s.app}}async function Ee(e,t){if(await R(e))throw new m(`
@@ -1 +1 @@
1
- import{a as p,b as c,c as d}from"./chunk-AD4S2VEI.js";import{a as r}from"./chunk-YGFEUXKQ.js";import{a as n}from"./chunk-JTPVSO6Y.js";import{Ha as s}from"./chunk-2KLXRVGQ.js";import{b as a}from"./chunk-DGMRL5DQ.js";import{b as y}from"./chunk-JA2QZ635.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var f=g(y(),1);var o=class m extends r{static summary="Fetch the latest GraphQL schema for a function.";static descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";static description=this.descriptionForHelp();static flags={...a,...n,...c,stdout:f.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(m),{app:e,developerPlatformClient:h,organization:l}=await s({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),u=await d(e,t.path);return await p({app:e,extension:u,stdout:t.stdout,developerPlatformClient:h,orgId:l.id}),{app:e}}};export{o as a};
1
+ import{a as p,b as c,c as d}from"./chunk-SHBB5GST.js";import{a as r}from"./chunk-KOYBR5MV.js";import{a as n}from"./chunk-VXGXK66W.js";import{Ha as s}from"./chunk-PG6XEOYF.js";import{b as a}from"./chunk-Q4TZD2M6.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var f=g(y(),1);var o=class m extends r{static summary="Fetch the latest GraphQL schema for a function.";static descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";static description=this.descriptionForHelp();static flags={...a,...n,...c,stdout:f.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(m),{app:e,developerPlatformClient:h,organization:l}=await s({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),u=await d(e,t.path);return await p({app:e,extension:u,stdout:t.stdout,developerPlatformClient:h,orgId:l.id}),{app:e}}};export{o as a};
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-DGMRL5DQ.js";import{b as u}from"./chunk-FW5HGFSZ.js";import{k as f}from"./chunk-L5XWYTHY.js";import{i as n}from"./chunk-FCULF3JA.js";import{Ib as m}from"./chunk-YJWNM4XO.js";import{b as g}from"./chunk-JA2QZ635.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static examples=[`# search shopify.dev for a topic
1
+ import{b as l}from"./chunk-Q4TZD2M6.js";import{b as u}from"./chunk-EZ5F4ZFY.js";import{k as f}from"./chunk-3E3MCY5O.js";import{i as n}from"./chunk-ZZ7SOJHH.js";import{Ib as m}from"./chunk-3F42A3XV.js";import{b as g}from"./chunk-I3J63RFV.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static examples=[`# search shopify.dev for a topic
2
2
  shopify doc search --query "subscribe to webhooks"
3
3
 
4
4
  # narrow the search to a specific API and version
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-FW5HGFSZ.js";import{G as f}from"./chunk-SKRUMRB4.js";import{Ib as c}from"./chunk-YJWNM4XO.js";import{b as N}from"./chunk-JA2QZ635.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})};async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
1
+ import{b as m}from"./chunk-EZ5F4ZFY.js";import{G as f}from"./chunk-RCYQPOJW.js";import{Ib as c}from"./chunk-3F42A3XV.js";import{b as N}from"./chunk-I3J63RFV.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})};async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
2
2
  `,o=s.map(n=>t.map(e=>n[e]).join(",")).join(`
3
3
  `),l=`${a}${o}
4
4
  `;c(l)}else f({rows:s,columns:{pluginName:{header:"plugin",color:"red"},command:{},flagName:{header:"long flag",color:"green"},flagChar:{header:"short flag",color:"green"},flagEnv:{header:"env variable",color:"blueBright"}}})}};export{i as a};
@@ -1,4 +1,4 @@
1
- import{a as w}from"./chunk-ECEOBSGD.js";import{a as u}from"./chunk-GVRFO4CV.js";import{a as v,b as f}from"./chunk-YY6TFARF.js";import{a as y}from"./chunk-LYPNQFWX.js";import{p as d,v as c}from"./chunk-P3Z5RLVV.js";import{b as p}from"./chunk-DGMRL5DQ.js";import{N as m,y as s}from"./chunk-SKRUMRB4.js";import{b as E}from"./chunk-JA2QZ635.js";import{e as T,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function F(t,e){let r=new u(t),g=(await(e.development?r.find():r.fetch()))?.id,n=await y(t,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${g}`:e.theme}}),l=v(n,t),a=f(n,t);s({body:["Preview information for theme",...w(n),`
1
+ import{a as w}from"./chunk-2X3HYG4B.js";import{a as u}from"./chunk-YKYJOUV7.js";import{a as v,b as f}from"./chunk-YY6TFARF.js";import{a as y}from"./chunk-ELJ34WWD.js";import{p as d,v as c}from"./chunk-TWS34WUT.js";import{b as p}from"./chunk-Q4TZD2M6.js";import{N as m,y as s}from"./chunk-RCYQPOJW.js";import{b as E}from"./chunk-I3J63RFV.js";import{e as T,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function F(t,e){let r=new u(t),g=(await(e.development?r.find():r.fetch()))?.id,n=await y(t,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${g}`:e.theme}}),l=v(n,t),a=f(n,t);s({body:["Preview information for theme",...w(n),`
2
2
 
3
3
  `,{list:{items:[{link:{label:"Preview your theme",url:l}},{link:{label:"Customize your theme at the theme editor",url:a}}]}}]}),e.editor?await m(a):await m(l)}var o=T(E(),1);var h=class extends c{static summary="Opens the preview of your remote theme.";static descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:
4
4
 
@@ -1 +1 @@
1
- import{b as a,c}from"./chunk-DGMRL5DQ.js";import{b as u}from"./chunk-FW5HGFSZ.js";import{a as i}from"./chunk-RGIUP4FW.js";import{a as p}from"./chunk-5RL6DKWR.js";import{Ib as m,b as r}from"./chunk-YJWNM4XO.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();async function f(){return{version:i}}t();t();var o=p({name:"VersionResult",schema:r.object({version:r.string()})});function l(e,s){m(s==="json"?o.encode(e):e.version)}var n=class e extends u{static descriptionWithMarkdown="Shopify CLI version currently installed.";static description=this.descriptionForHelp();static flags={...a,...c};static get jsonOutputSchema(){return o}async run(){let{flags:s}=await this.parse(e),v=await f();l(v,s.json?"json":"text")}};export{n as a};
1
+ import{b as a,c}from"./chunk-Q4TZD2M6.js";import{b as u}from"./chunk-EZ5F4ZFY.js";import{a as i}from"./chunk-TQ7MHGY4.js";import{a as p}from"./chunk-MQZPASSP.js";import{Ib as m,b as r}from"./chunk-3F42A3XV.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();async function f(){return{version:i}}t();t();var o=p({name:"VersionResult",schema:r.object({version:r.string()})});function l(e,s){m(s==="json"?o.encode(e):e.version)}var n=class e extends u{static descriptionWithMarkdown="Shopify CLI version currently installed.";static description=this.descriptionForHelp();static flags={...a,...c};static get jsonOutputSchema(){return o}async run(){let{flags:s}=await this.parse(e),v=await f();l(v,s.json?"json":"text")}};export{n as a};
@@ -1,4 +1,4 @@
1
- import{a as E}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-YGFEUXKQ.js";import{a as w}from"./chunk-JTPVSO6Y.js";import{Ha as y,L as F,i as C,ja as x}from"./chunk-2KLXRVGQ.js";import{b as f}from"./chunk-LV2IWYGL.js";import{b as v}from"./chunk-DGMRL5DQ.js";import{Cb as o,Eb as p,Ib as h,Xa as g,qa as u,ya as l}from"./chunk-YJWNM4XO.js";import{b as $}from"./chunk-JA2QZ635.js";import{f as c}from"./chunk-3VYOLEQE.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=E(i??"",r);return p`Updated ${o.path(e)} to be:
1
+ import{a as E}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-KOYBR5MV.js";import{a as w}from"./chunk-VXGXK66W.js";import{Ha as y,L as F,i as C,ja as x}from"./chunk-PG6XEOYF.js";import{b as f}from"./chunk-7IRPE3M5.js";import{b as v}from"./chunk-Q4TZD2M6.js";import{Cb as o,Eb as p,Ib as h,Xa as g,qa as u,ya as l}from"./chunk-3F42A3XV.js";import{b as $}from"./chunk-I3J63RFV.js";import{f as c}from"./chunk-3VYOLEQE.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=E(i??"",r);return p`Updated ${o.path(e)} to be:
2
2
 
3
3
  ${r}
4
4
 
@@ -1,2 +1,2 @@
1
- import{ba as X,ka as z,la as j,ma as v,na as J,oa as A,pa as W,qa as k,ra as q,sa as N,ta as B,ua as L,va as K,wa as R,xa as Q}from"./chunk-2KLXRVGQ.js";import{B as l,q as T,t as G}from"./chunk-Q45XAEG2.js";import{d as H}from"./chunk-4A7FPJVT.js";import{D as x,z as U}from"./chunk-SKRUMRB4.js";import{i as C,k as P}from"./chunk-FCULF3JA.js";import{$ as c,Aa as I,Ca as D,Eb as $,Xa as V,ca as b,ua as F}from"./chunk-YJWNM4XO.js";import{d as E,j as M}from"./chunk-3VYOLEQE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
1
+ import{ba as X,ka as z,la as j,ma as v,na as J,oa as A,pa as W,qa as k,ra as q,sa as N,ta as B,ua as L,va as K,wa as R,xa as Q}from"./chunk-PG6XEOYF.js";import{B as l,q as T,t as G}from"./chunk-PQCALXSD.js";import{d as H}from"./chunk-OERMQ2FP.js";import{D as x,z as U}from"./chunk-RCYQPOJW.js";import{i as C,k as P}from"./chunk-ZZ7SOJHH.js";import{$ as c,Aa as I,Ca as D,Eb as $,Xa as V,ca as b,ua as F}from"./chunk-3F42A3XV.js";import{d as E,j as M}from"./chunk-3VYOLEQE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
2
  `)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
@@ -1 +1 @@
1
- import{A as h,ba as F,c,ca as g,f as k,g as v,n as m}from"./chunk-L5XWYTHY.js";import{b as l}from"./chunk-QAXFCAOV.js";import{i as n,l as A}from"./chunk-FCULF3JA.js";import{Cb as b,Eb as f}from"./chunk-YJWNM4XO.js";import{i as q}from"./chunk-WNO2V53C.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function Y(t,r,e,o){let p="Admin",u=o??await T(r),s=r.storeFqdn,i=V(r);l()==="local"&&(i["x-forwarded-host"]=s,s=new m().host("app"));let a=E(s,u,r);return F({query:t,api:p,addedHeaders:i,url:a,token:r.token,variables:e})}async function D(t){let{query:r,session:e,variables:o,version:p,responseOptions:u,preferredBehaviour:s}=t,i=p??S.get(e.storeFqdn);i??=await T(e,s);let a=e.storeFqdn,y=V(e);l()==="local"&&(y["x-forwarded-host"]=a,a=new m().host("app"));let x={url:E(a,i,e),api:"Admin",token:e.token,addedHeaders:y},w;return"refresh"in e&&(w={type:"token_refresh",handler:e.refresh}),g({...x,query:r,variables:o,responseOptions:u,unauthorizedHandler:w,preferredBehaviour:s})}function V(t){return h(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function T(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await D({query:$,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof c&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new n(f`Looks like you don't have access to this dev store: (${b.link(o,`https://${t.storeFqdn}`)})`,f`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof c&&(e.response.status===401||e.response.status===404)?new n(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):e instanceof c&&e.response.status===402?new n(`The store ${t.storeFqdn} is currently unavailable.`,"This usually means the store is frozen, paused, or closed. Check the store in the Shopify admin and try again once it is reactivated."):e instanceof c&&e.response.status>=500?new n(`The Admin API for ${t.storeFqdn} returned a server error (HTTP ${e.response.status}).`,"This is a problem on the Shopify side, not with your command. Wait a moment and try again."):v(e)?new n(`Request to ${t.storeFqdn} was aborted before it completed.`,"The request was cancelled or timed out before the store responded. Try running the command again."):k(e)?new n(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new A(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function E(t,r,e){let o=r??"unstable";return e&&h(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{Y as a,D as b,N as c,R as d,E as e};
1
+ import{A as h,ba as F,c,ca as g,f as k,g as v,n as m}from"./chunk-3E3MCY5O.js";import{b as l}from"./chunk-Q555FV2X.js";import{i as n,l as A}from"./chunk-ZZ7SOJHH.js";import{Cb as b,Eb as f}from"./chunk-3F42A3XV.js";import{i as q}from"./chunk-WNO2V53C.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function Y(t,r,e,o){let p="Admin",u=o??await T(r),s=r.storeFqdn,i=V(r);l()==="local"&&(i["x-forwarded-host"]=s,s=new m().host("app"));let a=E(s,u,r);return F({query:t,api:p,addedHeaders:i,url:a,token:r.token,variables:e})}async function D(t){let{query:r,session:e,variables:o,version:p,responseOptions:u,preferredBehaviour:s}=t,i=p??S.get(e.storeFqdn);i??=await T(e,s);let a=e.storeFqdn,y=V(e);l()==="local"&&(y["x-forwarded-host"]=a,a=new m().host("app"));let x={url:E(a,i,e),api:"Admin",token:e.token,addedHeaders:y},w;return"refresh"in e&&(w={type:"token_refresh",handler:e.refresh}),g({...x,query:r,variables:o,responseOptions:u,unauthorizedHandler:w,preferredBehaviour:s})}function V(t){return h(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function T(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await D({query:$,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof c&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new n(f`Looks like you don't have access to this dev store: (${b.link(o,`https://${t.storeFqdn}`)})`,f`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof c&&(e.response.status===401||e.response.status===404)?new n(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):e instanceof c&&e.response.status===402?new n(`The store ${t.storeFqdn} is currently unavailable.`,"This usually means the store is frozen, paused, or closed. Check the store in the Shopify admin and try again once it is reactivated."):e instanceof c&&e.response.status>=500?new n(`The Admin API for ${t.storeFqdn} returned a server error (HTTP ${e.response.status}).`,"This is a problem on the Shopify side, not with your command. Wait a moment and try again."):v(e)?new n(`Request to ${t.storeFqdn} was aborted before it completed.`,"The request was cancelled or timed out before the store responded. Try running the command again."):k(e)?new n(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new A(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function E(t,r,e){let o=r??"unstable";return e&&h(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{Y as a,D as b,N as c,R as d,E as e};
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-5RL6DKWR.js";import{l as m}from"./chunk-FCULF3JA.js";import{Ib as u,b as e}from"./chunk-YJWNM4XO.js";import{b as H}from"./chunk-JA2QZ635.js";import{e as b,g as n}from"./chunk-VKWPEFWQ.js";n();var p=e.object({id:e.string(),summary:e.string().optional(),hidden:e.boolean().default(!1)}),l=e.object({name:e.string(),description:e.string().optional(),hidden:e.boolean().default(!1)}),g=e.object({name:e.string(),description:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional()}),h=e.object({name:e.string(),type:e.enum(["boolean","option"]),char:e.string().optional(),summary:e.string().optional(),description:e.string().optional(),env:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional(),multiple:e.boolean().optional(),allowNo:e.boolean().optional(),aliases:e.array(e.string()).optional(),dependsOn:e.array(e.string()).optional(),exclusive:e.array(e.string()).optional(),exactlyOne:e.array(e.string()).optional()}),f=p.extend({description:e.string().optional(),aliases:e.array(e.string()),usage:e.union([e.string(),e.array(e.string())]).optional(),examples:e.array(e.union([e.string(),e.object({description:e.string(),command:e.string()})])).optional(),strict:e.boolean().default(!0),args:e.record(g),flags:e.record(h)}),a={commands:e.array(p),topics:e.array(l)},s=c({name:"HelpResult",schema:e.discriminatedUnion("kind",[e.object({kind:e.literal("root"),...a}),e.object({kind:e.literal("topic"),topic:l,...a}),e.object({kind:e.literal("command"),command:f,...a})]),definitions:{HelpCommandSummary:p,HelpTopic:l,HelpArgument:g,HelpFlag:h,HelpCommand:f}});n();var y=b(H(),1);async function k(r,o,i=!1){let t=new d(r,{all:i});if(await t.showHelp(o),!t.result)throw new m("Oclif did not resolve a help subject.");return t.result}var d=class extends y.Help{result;async showCommandHelp(o){let i=t=>this.opts.all===!0||!t.hidden;this.result=s.validate({kind:"command",command:{...o,args:Object.fromEntries(Object.entries(o.args).filter(([,t])=>i(t))),flags:Object.fromEntries(Object.entries(o.flags).filter(([,t])=>i(t)))},...this.listings(o.id)})}async showRootHelp(){this.result=s.validate({kind:"root",...this.listings()})}async showTopicHelp(o){this.result=s.validate({kind:"topic",topic:o,...this.listings(o.name)})}listings(o){let i=t=>o===void 0?this.opts.all===!0||!t.includes(":"):t.startsWith(`${o}:`)&&t.split(":").length===o.split(":").length+1;return{commands:this.sortedCommands.filter(t=>t.id&&i(t.id)).map(t=>({id:t.id,summary:t.summary??t.description?.split(`
1
+ import{a as c}from"./chunk-MQZPASSP.js";import{l as m}from"./chunk-ZZ7SOJHH.js";import{Ib as u,b as e}from"./chunk-3F42A3XV.js";import{b as H}from"./chunk-I3J63RFV.js";import{e as b,g as n}from"./chunk-VKWPEFWQ.js";n();var p=e.object({id:e.string(),summary:e.string().optional(),hidden:e.boolean().default(!1)}),l=e.object({name:e.string(),description:e.string().optional(),hidden:e.boolean().default(!1)}),g=e.object({name:e.string(),description:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional()}),h=e.object({name:e.string(),type:e.enum(["boolean","option"]),char:e.string().optional(),summary:e.string().optional(),description:e.string().optional(),env:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional(),multiple:e.boolean().optional(),allowNo:e.boolean().optional(),aliases:e.array(e.string()).optional(),dependsOn:e.array(e.string()).optional(),exclusive:e.array(e.string()).optional(),exactlyOne:e.array(e.string()).optional()}),f=p.extend({description:e.string().optional(),aliases:e.array(e.string()),usage:e.union([e.string(),e.array(e.string())]).optional(),examples:e.array(e.union([e.string(),e.object({description:e.string(),command:e.string()})])).optional(),strict:e.boolean().default(!0),args:e.record(g),flags:e.record(h)}),a={commands:e.array(p),topics:e.array(l)},s=c({name:"HelpResult",schema:e.discriminatedUnion("kind",[e.object({kind:e.literal("root"),...a}),e.object({kind:e.literal("topic"),topic:l,...a}),e.object({kind:e.literal("command"),command:f,...a})]),definitions:{HelpCommandSummary:p,HelpTopic:l,HelpArgument:g,HelpFlag:h,HelpCommand:f}});n();var y=b(H(),1);async function k(r,o,i=!1){let t=new d(r,{all:i});if(await t.showHelp(o),!t.result)throw new m("Oclif did not resolve a help subject.");return t.result}var d=class extends y.Help{result;async showCommandHelp(o){let i=t=>this.opts.all===!0||!t.hidden;this.result=s.validate({kind:"command",command:{...o,args:Object.fromEntries(Object.entries(o.args).filter(([,t])=>i(t))),flags:Object.fromEntries(Object.entries(o.flags).filter(([,t])=>i(t)))},...this.listings(o.id)})}async showRootHelp(){this.result=s.validate({kind:"root",...this.listings()})}async showTopicHelp(o){this.result=s.validate({kind:"topic",topic:o,...this.listings(o.name)})}listings(o){let i=t=>o===void 0?this.opts.all===!0||!t.includes(":"):t.startsWith(`${o}:`)&&t.split(":").length===o.split(":").length+1;return{commands:this.sortedCommands.filter(t=>t.id&&i(t.id)).map(t=>({id:t.id,summary:t.summary??t.description?.split(`
2
2
  `)[0],hidden:t.hidden??!1})),topics:this.sortedTopics.filter(t=>i(t.name))}}};n();function T(r){u(s.encode(r))}export{s as a,k as b,T as c};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-EZ5F4ZFY.js";import{ma as r}from"./chunk-3E3MCY5O.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static hidden=!0;async run(){await r()}};export{t as a};
@@ -1 +1 @@
1
- import{g as o}from"./chunk-DGMRL5DQ.js";import{b as s}from"./chunk-FW5HGFSZ.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{g as o}from"./chunk-Q4TZD2M6.js";import{b as s}from"./chunk-EZ5F4ZFY.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1 +1 @@
1
- import{i as y}from"./chunk-4Y22EM45.js";import{I as O,y as w}from"./chunk-SKRUMRB4.js";import{i as d}from"./chunk-FCULF3JA.js";import{Eb as m,Ib as S}from"./chunk-YJWNM4XO.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
1
+ import{i as y}from"./chunk-UMSO6MOI.js";import{I as O,y as w}from"./chunk-RCYQPOJW.js";import{i as d}from"./chunk-ZZ7SOJHH.js";import{Eb as m,Ib as S}from"./chunk-3F42A3XV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
@@ -1 +1 @@
1
- import{a as h,b as w}from"./chunk-TMV37ENR.js";import{j as f}from"./chunk-L5XWYTHY.js";import{T as d}from"./chunk-SKRUMRB4.js";import{i}from"./chunk-FCULF3JA.js";import{Ka as m,ra as p}from"./chunk-YJWNM4XO.js";import{d as u}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
1
+ import{a as h,b as w}from"./chunk-R6IJRVVM.js";import{j as f}from"./chunk-3E3MCY5O.js";import{T as d}from"./chunk-RCYQPOJW.js";import{i}from"./chunk-ZZ7SOJHH.js";import{Ka as m,ra as p}from"./chunk-3F42A3XV.js";import{d as u}from"./chunk-3VYOLEQE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
@@ -1 +1 @@
1
- import{c as m,d as f,e as p}from"./chunk-SDJNAUU6.js";import{d as c,f as w,j as T}from"./chunk-R757TSQ6.js";import{g as d}from"./chunk-P3Z5RLVV.js";import{F as u}from"./chunk-SKRUMRB4.js";import{i as l}from"./chunk-FCULF3JA.js";import{X as i}from"./chunk-YJWNM4XO.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
1
+ import{c as m,d as f,e as p}from"./chunk-WNE2MZAZ.js";import{d as c,f as w,j as T}from"./chunk-JAY7AGAG.js";import{g as d}from"./chunk-TWS34WUT.js";import{F as u}from"./chunk-RCYQPOJW.js";import{i as l}from"./chunk-ZZ7SOJHH.js";import{X as i}from"./chunk-3F42A3XV.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-5RL6DKWR.js";import{b as r}from"./chunk-YJWNM4XO.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=r.object({title:r.string().optional(),body:r.union([r.string(),r.array(r.array(r.string()))])}).strict(),o={message:r.string(),code:r.string().min(1).optional().describe("A stable error code, included only when known."),tryMessage:r.string().optional(),nextSteps:r.array(r.string()).optional(),customSections:r.array(e).optional(),details:r.unknown().optional().describe("Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.")},s=r.object({type:r.literal("abort"),...o}).strict(),a=r.object({type:r.literal("bug"),...o,stack:r.string().optional()}).strict(),i=r.object({type:r.literal("external"),...o,command:r.string(),args:r.array(r.string())}).strict(),c=r.union([s,a,i]),m=r.object({error:c}).strict(),d=n({name:"JsonErrorDocument",schema:m,definitions:{JsonError:c,JsonErrorCustomSection:e,JsonAbortError:s,JsonBugError:a,JsonExternalError:i}});export{d as a};
1
+ import{a as n}from"./chunk-MQZPASSP.js";import{b as r}from"./chunk-3F42A3XV.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=r.object({title:r.string().optional(),body:r.union([r.string(),r.array(r.array(r.string()))])}).strict(),o={message:r.string(),code:r.string().min(1).optional().describe("A stable error code, included only when known."),tryMessage:r.string().optional(),nextSteps:r.array(r.string()).optional(),customSections:r.array(e).optional(),details:r.unknown().optional().describe("Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.")},s=r.object({type:r.literal("abort"),...o}).strict(),a=r.object({type:r.literal("bug"),...o,stack:r.string().optional()}).strict(),i=r.object({type:r.literal("external"),...o,command:r.string(),args:r.array(r.string())}).strict(),c=r.union([s,a,i]),m=r.object({error:c}).strict(),d=n({name:"JsonErrorDocument",schema:m,definitions:{JsonError:c,JsonErrorCustomSection:e,JsonAbortError:s,JsonBugError:a,JsonExternalError:i}});export{d as a};
@@ -1 +1 @@
1
- import{d as u}from"./chunk-4A7FPJVT.js";import{A as c}from"./chunk-SKRUMRB4.js";import{e as s}from"./chunk-G54BKNIX.js";import{db as d}from"./chunk-YJWNM4XO.js";import{q as m}from"./chunk-3VYOLEQE.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
1
+ import{d as u}from"./chunk-OERMQ2FP.js";import{A as c}from"./chunk-RCYQPOJW.js";import{e as s}from"./chunk-PQH4U2XV.js";import{db as d}from"./chunk-3F42A3XV.js";import{q as m}from"./chunk-3VYOLEQE.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
@@ -1,4 +1,4 @@
1
- import{b as S}from"./chunk-HSZC2LBB.js";import{a as A,b as B,c as L,f as I,j as x,k as $,m as N,t as q}from"./chunk-3AASYIOA.js";import{a as P}from"./chunk-YGFEUXKQ.js";import{a as z}from"./chunk-JTPVSO6Y.js";import{b as C}from"./chunk-DGMRL5DQ.js";import{N as g,u as E}from"./chunk-L5XWYTHY.js";import{B as w,G as T,y as u,z as v}from"./chunk-SKRUMRB4.js";import{l as D}from"./chunk-FCULF3JA.js";import{Cb as l,Eb as d,Pb as b,fa as k,ka as y}from"./chunk-YJWNM4XO.js";import{i as m}from"./chunk-B4OMIONW.js";import{b as M}from"./chunk-JA2QZ635.js";import{e as K,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function R(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;u({headline:"Checking bulk operation status.",body:[{list:{items:S({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new D("No API secret keys found for app");let p=await g(t,a.apiKey,s),i=await x({adminSession:p,operationId:r,version:await I({adminSession:p,minimumDefaultVersion:A})});i?U(i):w({headline:"Bulk operation not found.",body:d`ID: ${l.yellow(r)}`.value})}async function _(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;u({headline:"Listing bulk operations.",body:[{list:{items:S({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new D("No API secret keys found for app");let s=await g(t,r.apiKey,a),i=(await $({adminSession:s,version:await I({adminSession:s,minimumDefaultVersion:A})})).map(n=>({id:L(n.id),status:V(n.status),count:G(n.objectCount),dateCreated:k(new Date(String(n.createdAt))),dateFinished:n.completedAt?k(new Date(String(n.completedAt))):"",results:Y(n.url??n.partialDataUrl)}));b(),i.length===0?u({body:"No bulk operations found in the last 7 days."}):T({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),b()}function U(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:p}=e,i=N(e).value,n=H(r,a),f=d`ID: ${l.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let h=s?l.link("Download results",s):"";v({headline:i,body:d`${f}\n${h}`.value})}else if(t==="FAILED"){let h=p?l.link("Download partial results",p):"";w({headline:i,body:d`${f}\n${h}`.value})}else u({headline:i,body:f})}function H(e,o){let t=new Date;return o?`Finished ${y(new Date(String(o)),t)}`:`Started ${y(new Date(String(e)),t)}`}function V(e){return e==="COMPLETED"?m.green(e):e==="FAILED"?m.red(e):m.dim(e)}function G(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Y(e){return e?d`${l.link("download",e)}`.value:""}var F=K(M(),1);var O=class e extends P{static summary="Check the status of bulk operations.";static descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
1
+ import{b as S}from"./chunk-IQIUFTR6.js";import{a as A,b as B,c as L,f as I,j as x,k as $,m as N,t as q}from"./chunk-FICC6IFE.js";import{a as P}from"./chunk-KOYBR5MV.js";import{a as z}from"./chunk-VXGXK66W.js";import{b as C}from"./chunk-Q4TZD2M6.js";import{N as g,u as E}from"./chunk-3E3MCY5O.js";import{B as w,G as T,y as u,z as v}from"./chunk-RCYQPOJW.js";import{l as D}from"./chunk-ZZ7SOJHH.js";import{Cb as l,Eb as d,Pb as b,fa as k,ka as y}from"./chunk-3F42A3XV.js";import{i as m}from"./chunk-B4OMIONW.js";import{b as M}from"./chunk-I3J63RFV.js";import{e as K,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function R(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;u({headline:"Checking bulk operation status.",body:[{list:{items:S({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new D("No API secret keys found for app");let p=await g(t,a.apiKey,s),i=await x({adminSession:p,operationId:r,version:await I({adminSession:p,minimumDefaultVersion:A})});i?U(i):w({headline:"Bulk operation not found.",body:d`ID: ${l.yellow(r)}`.value})}async function _(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;u({headline:"Listing bulk operations.",body:[{list:{items:S({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new D("No API secret keys found for app");let s=await g(t,r.apiKey,a),i=(await $({adminSession:s,version:await I({adminSession:s,minimumDefaultVersion:A})})).map(n=>({id:L(n.id),status:V(n.status),count:G(n.objectCount),dateCreated:k(new Date(String(n.createdAt))),dateFinished:n.completedAt?k(new Date(String(n.completedAt))):"",results:Y(n.url??n.partialDataUrl)}));b(),i.length===0?u({body:"No bulk operations found in the last 7 days."}):T({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),b()}function U(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:p}=e,i=N(e).value,n=H(r,a),f=d`ID: ${l.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let h=s?l.link("Download results",s):"";v({headline:i,body:d`${f}\n${h}`.value})}else if(t==="FAILED"){let h=p?l.link("Download partial results",p):"";w({headline:i,body:d`${f}\n${h}`.value})}else u({headline:i,body:f})}function H(e,o){let t=new Date;return o?`Finished ${y(new Date(String(o)),t)}`:`Started ${y(new Date(String(e)),t)}`}function V(e){return e==="COMPLETED"?m.green(e):e==="FAILED"?m.red(e):m.dim(e)}function G(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Y(e){return e?d`${l.link("download",e)}`.value:""}var F=K(M(),1);var O=class e extends P{static summary="Check the status of bulk operations.";static descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
2
2
 
3
3
  Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
4
4
 
@@ -1 +1 @@
1
- import{a}from"./chunk-6RBCFXJT.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
1
+ import{a}from"./chunk-525BMYNR.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk-YGFEUXKQ.js";import{a as m}from"./chunk-JTPVSO6Y.js";import{Ha as l,i as s,ja as d}from"./chunk-2KLXRVGQ.js";import{b as u}from"./chunk-DGMRL5DQ.js";import{Cb as n,Eb as a,Ib as c}from"./chunk-YJWNM4XO.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();async function g(e,t,o){return S(e,t,o,"text")}async function S(e,t,o,r){return await d(t,o.source),r==="json"?a`${n.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:s(e.configuration)})}`:a`
1
+ import{a as f}from"./chunk-KOYBR5MV.js";import{a as m}from"./chunk-VXGXK66W.js";import{Ha as l,i as s,ja as d}from"./chunk-PG6XEOYF.js";import{b as u}from"./chunk-Q4TZD2M6.js";import{Cb as n,Eb as a,Ib as c}from"./chunk-3F42A3XV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();async function g(e,t,o){return S(e,t,o,"text")}async function S(e,t,o,r){return await d(t,o.source),r==="json"?a`${n.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:s(e.configuration)})}`:a`
2
2
  ${n.green("SHOPIFY_API_KEY")}=${t.apiKey}
3
3
  ${n.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
4
4
  ${n.green("SCOPES")}=${s(e.configuration)}
@@ -1,4 +1,4 @@
1
- import{a as B,j as C,m as P}from"./chunk-NTVEJYKI.js";import{e as U,f as _}from"./chunk-ZHJ6KA43.js";import{e as g}from"./chunk-ECEOBSGD.js";import{l as v,m as w}from"./chunk-R757TSQ6.js";import{ra as E}from"./chunk-L5XWYTHY.js";import{Nb as m}from"./chunk-YJWNM4XO.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
1
+ import{a as B,j as C,m as P}from"./chunk-AKP4QAGL.js";import{e as U,f as _}from"./chunk-PI6FLLDD.js";import{e as g}from"./chunk-2X3HYG4B.js";import{l as v,m as w}from"./chunk-JAY7AGAG.js";import{ra as E}from"./chunk-3E3MCY5O.js";import{Nb as m}from"./chunk-3F42A3XV.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
2
2
  `);_(f.key,"delete")(new Error(`Failed to delete ${f.key}: ${y}`))}}),c.current+=k.length});u.push(a)}let h=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:h}}function L(t,e){let s=e.applyIgnoreFilters(t).filter(o=>!e.files.has(o.key));return m(`Files to be deleted:
3
3
  ${s.map(o=>`-${o.key}`).join(`
4
4
  `)}`),s}function x(t){let e=P(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configStylesheetFiles,...e.documentationFiles,...e.configSchemaFile,...e.staticAssetFiles]}var D=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function R(t,e,r){let s=new Set(r.map(l=>l.key)),o=D.filter(({key:l})=>!s.has(l));o.length>0&&await w(t.id,o,e)}function q(t,e,r,s,o){let l=S(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=I(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(z(a).map(d=>N(d,e,s,r.id,o).then(()=>{c.current+=d.length,d.forEach(f=>e.unsyncedFileKeys.delete(f.key))}))).then(()=>{}),h=i.reduce((a,d)=>a.then(()=>u(d)),Promise.resolve()),p=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([h,p]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function S(t,e){let r=K(t),s=t.applyIgnoreFilters(r),o=new Map(e.map(n=>[n.key,n])),l=s.filter(n=>{let i=o.get(n.key);return!i||i.checksum!==n.checksum});return m(`Files to be uploaded:
@@ -1,4 +1,4 @@
1
- import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-L5XWYTHY.js";import{V as j}from"./chunk-SKRUMRB4.js";import{a as O}from"./chunk-53U6XS3J.js";import{b}from"./chunk-YTJ3EPD3.js";import{d as _}from"./chunk-G54BKNIX.js";import{i as f}from"./chunk-FCULF3JA.js";import{Cb as d,Eb as h,Ib as S,da as T}from"./chunk-YJWNM4XO.js";import{d as P}from"./chunk-SGBLCVUX.js";import{b as A}from"./chunk-JA2QZ635.js";import{a as w}from"./chunk-JD5P5RAJ.js";import{e as C,g as F}from"./chunk-VKWPEFWQ.js";F();var l=C(A()),g=class extends l.Command{static baseFlags={"json-schema":l.Flags.boolean({description:"Print the command's JSON schemas.",env:"SHOPIFY_FLAG_JSON_SCHEMA"})};static descriptionWithMarkdown;static get jsonOutputSchema(){}static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionForHelp(){let e=(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)');return W(e,this.jsonOutputSchema)}static descriptionWithoutMarkdown(){return this.descriptionForHelp()}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-D5BURRJ7.js");return await t(e,this.config),l.Errors.handle(e)}async _run(){return O(this.argv,()=>super._run())}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-D5BURRJ7.js");await t(this.config)}await Y(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-MYEMV7JF.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${T(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-TEZZM7SE.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){w(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(S(`
1
+ import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-3E3MCY5O.js";import{V as j}from"./chunk-RCYQPOJW.js";import{a as O}from"./chunk-BPVXYM6G.js";import{b}from"./chunk-YTJ3EPD3.js";import{d as _}from"./chunk-PQH4U2XV.js";import{i as f}from"./chunk-ZZ7SOJHH.js";import{Cb as d,Eb as h,Ib as S,da as T}from"./chunk-3F42A3XV.js";import{d as P}from"./chunk-2R2PKQQV.js";import{b as A}from"./chunk-I3J63RFV.js";import{a as w}from"./chunk-JD5P5RAJ.js";import{e as C,g as F}from"./chunk-VKWPEFWQ.js";F();var l=C(A()),g=class extends l.Command{static baseFlags={"json-schema":l.Flags.boolean({description:"Print the command's JSON schemas.",env:"SHOPIFY_FLAG_JSON_SCHEMA"})};static descriptionWithMarkdown;static get jsonOutputSchema(){}static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionForHelp(){let e=(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)');return W(e,this.jsonOutputSchema)}static descriptionWithoutMarkdown(){return this.descriptionForHelp()}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-JY3ZKE2G.js");return await t(e,this.config),l.Errors.handle(e)}async _run(){return O(this.argv,()=>super._run())}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-JY3ZKE2G.js");await t(this.config)}await Y(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-E64OSVXF.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${T(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-YSFALYSL.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){w(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(S(`
2
2
  SHOPIFY_CLI_TIMESTAMP_START
3
3
  { "timestamp": ${Date.now()} }
4
4
  SHOPIFY_CLI_TIMESTAMP_END
@@ -7,7 +7,7 @@ import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-L5XWYTHY.js";
7
7
 
8
8
  ${d.cyan(i)}
9
9
 
10
- ${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-3RUZ7F4Q.js"),o=await a(i,{from:r.path}),m=[];r.environment&&(m=Array.isArray(r.environment)?r.environment:[r.environment]);let u=m.length>0;if(!o&&!u||u&&m.length>1)return e;let{environment:c,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,m[0]);if(!c||p&&!$(t?.flags,"environment"))return e;let v=await super.parse(M(t),n),y=await super.parse(t,[...n??this.argv,...R(c,t,v),...p?["--environment","default"]:[]]);return q(v.flags,y.flags,p?"default":m[0],c),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-3RUZ7F4Q.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function I(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function q(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let m=Object.prototype.hasOwnProperty.call(s,a),u=Object.prototype.hasOwnProperty.call(n,a);if(!m&&u){let c=a==="password"?`********${o.substr(-4)}`:o;r[a]=c}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-TEZZM7SE.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function M(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=$(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(h`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(m=>n.push(`--${r}`,`${m}`)):n.push(`--${r}`,`${i}`)}return n}function $(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}function W(s,e){if(!e)return s;let t=`Use \`--json-schema\` to print the result, error, and event schemas.
10
+ ${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-KBRQNE4R.js"),o=await a(i,{from:r.path}),m=[];r.environment&&(m=Array.isArray(r.environment)?r.environment:[r.environment]);let u=m.length>0;if(!o&&!u||u&&m.length>1)return e;let{environment:c,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,m[0]);if(!c||p&&!$(t?.flags,"environment"))return e;let v=await super.parse(M(t),n),y=await super.parse(t,[...n??this.argv,...R(c,t,v),...p?["--environment","default"]:[]]);return q(v.flags,y.flags,p?"default":m[0],c),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-KBRQNE4R.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function I(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function q(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let m=Object.prototype.hasOwnProperty.call(s,a),u=Object.prototype.hasOwnProperty.call(n,a);if(!m&&u){let c=a==="password"?`********${o.substr(-4)}`:o;r[a]=c}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-YSFALYSL.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function M(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=$(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(h`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(m=>n.push(`--${r}`,`${m}`)):n.push(`--${r}`,`${i}`)}return n}function $(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}function W(s,e){if(!e)return s;let t=`Use \`--json-schema\` to print the result, error, and event schemas.
11
11
 
12
12
  Output from \`--json\` conforms to the \`${e.name}\` schema.
13
13
 
@@ -16,5 +16,5 @@ ${JSON.stringify(e.jsonSchema,null,2)}
16
16
  \`\`\``;return[s,t].filter(Boolean).join(`
17
17
 
18
18
  `)}async function Y(s){let e=Array.from(s.plugins.values()),t=["@shopify/app","@shopify/plugin-cloudflare"],n=e.filter(i=>t.includes(i.name));if(n.length>0){let i=n.map(o=>` - shopify plugins remove ${o.name}`).join(`
19
- `),{renderWarning:a}=await import("./ui-TEZZM7SE.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
19
+ `),{renderWarning:a}=await import("./ui-YSFALYSL.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
20
20
  ${i}`]})}let r=e.filter(i=>!t.includes(i.name));s.plugins=new Map(r.map(i=>[i.name,i]))}var K=g;export{M as a,K as b};
@@ -1,4 +1,4 @@
1
- import{a as x}from"./chunk-JROJL6RV.js";import{Ha as D}from"./chunk-2KLXRVGQ.js";import{b as u,d as B}from"./chunk-NYABB6XW.js";import{b as W,j as y}from"./chunk-L5XWYTHY.js";import{B as _,I as N,T as F}from"./chunk-SKRUMRB4.js";import{i as s,l as C}from"./chunk-FCULF3JA.js";import{Cb as m,Eb as o,Xa as A,qa as T}from"./chunk-YJWNM4XO.js";import{e as z,g as t}from"./chunk-VKWPEFWQ.js";t();var b=z(W(),1);function H(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function J(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}function g(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}if(n.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}function X(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}return n.definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}async function Y(e){let{adminSession:n,userSpecifiedVersion:a,minimumDefaultVersion:i}=e;if(a==="unstable")return a;let r=await B(n);if(!a){let c=r.filter(v=>v.supported).map(v=>v.handle);i&&c.push(i);let f=c.sort().reverse()[0];if(!f)throw new s("No supported API versions available for this store.");return f}let l=r.map(c=>c.handle);if(l.includes(a))return a;let d=o`Invalid API version: ${a}`.value,k=o`Allowed versions: ${l.join(", ")}`.value;throw new s(d,k)}t();t();var p="2026-01";t();async function E(e){let n;if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");n=e.query}else if(e.queryFile){if(!await A(e.queryFile))throw new s(o`Query file not found at ${m.path(e.queryFile)}. Please check the path and try again.`);let a=await T(e.queryFile,{encoding:"utf8"});if(!a.trim())throw new s(o`Query file at ${m.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);n=a}else throw new C("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");return g(n),n}t();t();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{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"}}]}}]}}]};async function Z(e){let{adminSession:n,query:a,version:i}=e;return(await u({query:R,session:n,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}t();t();t();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{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:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{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:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function h(e){let{adminSession:n,variablesJsonl:a}=e,i=Buffer.from(a??"","utf-8"),r="bulk-variables.jsonl",l=i.length,d=await ee(n,r,l),k=ne(d);return await ie(i,k.url,k.parameters,r),k.stagedUploadKey}async function ee(e,n,a){return u({query:L,session:e,variables:{input:[{filename:n,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ne(e){if(!e.stagedUploadsCreate)throw new s("No response received from stagedUploadsCreate mutation");if(e.stagedUploadsCreate.userErrors.length>0){let i=e.stagedUploadsCreate.userErrors.map(r=>r.message).join(", ");throw new s(`Failed to create staged upload: ${i}`)}let n=e.stagedUploadsCreate.stagedTargets?.[0];if(!n)throw new s("No staged upload target returned from Shopify");if(!n.url||!n.resourceUrl)throw new s("Invalid staged upload target: missing required URLs");let a=n.parameters.find(i=>i.name==="key")?.value;if(!a)throw new s("No key parameter found in staged upload target");return{url:n.url,resourceUrl:n.resourceUrl,parameters:n.parameters,stagedUploadKey:a}}async function ie(e,n,a,i){let r=new FormData;for(let d of a)r.append(d.name,d.value);r.append("file",new Blob([new Uint8Array(e)],{type:"text/jsonl"}),i);let l=await N({title:o`Uploading bulk operation variables`,task:async()=>y(n,{method:"POST",body:r},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let d=await l.text();throw new s(`Failed to upload file to staged URL: ${l.statusText}
1
+ import{a as x}from"./chunk-R43LXE66.js";import{Ha as D}from"./chunk-PG6XEOYF.js";import{b as u,d as B}from"./chunk-DH5E6NM3.js";import{b as W,j as y}from"./chunk-3E3MCY5O.js";import{B as _,I as N,T as F}from"./chunk-RCYQPOJW.js";import{i as s,l as C}from"./chunk-ZZ7SOJHH.js";import{Cb as m,Eb as o,Xa as A,qa as T}from"./chunk-3F42A3XV.js";import{e as z,g as t}from"./chunk-VKWPEFWQ.js";t();var b=z(W(),1);function H(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function J(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}function g(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}if(n.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}function X(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}return n.definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}async function Y(e){let{adminSession:n,userSpecifiedVersion:a,minimumDefaultVersion:i}=e;if(a==="unstable")return a;let r=await B(n);if(!a){let c=r.filter(v=>v.supported).map(v=>v.handle);i&&c.push(i);let f=c.sort().reverse()[0];if(!f)throw new s("No supported API versions available for this store.");return f}let l=r.map(c=>c.handle);if(l.includes(a))return a;let d=o`Invalid API version: ${a}`.value,k=o`Allowed versions: ${l.join(", ")}`.value;throw new s(d,k)}t();t();var p="2026-01";t();async function E(e){let n;if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");n=e.query}else if(e.queryFile){if(!await A(e.queryFile))throw new s(o`Query file not found at ${m.path(e.queryFile)}. Please check the path and try again.`);let a=await T(e.queryFile,{encoding:"utf8"});if(!a.trim())throw new s(o`Query file at ${m.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);n=a}else throw new C("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");return g(n),n}t();t();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{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"}}]}}]}}]};async function Z(e){let{adminSession:n,query:a,version:i}=e;return(await u({query:R,session:n,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}t();t();t();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{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:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{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:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function h(e){let{adminSession:n,variablesJsonl:a}=e,i=Buffer.from(a??"","utf-8"),r="bulk-variables.jsonl",l=i.length,d=await ee(n,r,l),k=ne(d);return await ie(i,k.url,k.parameters,r),k.stagedUploadKey}async function ee(e,n,a){return u({query:L,session:e,variables:{input:[{filename:n,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ne(e){if(!e.stagedUploadsCreate)throw new s("No response received from stagedUploadsCreate mutation");if(e.stagedUploadsCreate.userErrors.length>0){let i=e.stagedUploadsCreate.userErrors.map(r=>r.message).join(", ");throw new s(`Failed to create staged upload: ${i}`)}let n=e.stagedUploadsCreate.stagedTargets?.[0];if(!n)throw new s("No staged upload target returned from Shopify");if(!n.url||!n.resourceUrl)throw new s("Invalid staged upload target: missing required URLs");let a=n.parameters.find(i=>i.name==="key")?.value;if(!a)throw new s("No key parameter found in staged upload target");return{url:n.url,resourceUrl:n.resourceUrl,parameters:n.parameters,stagedUploadKey:a}}async function ie(e,n,a,i){let r=new FormData;for(let d of a)r.append(d.name,d.value);r.append("file",new Blob([new Uint8Array(e)],{type:"text/jsonl"}),i);let l=await N({title:o`Uploading bulk operation variables`,task:async()=>y(n,{method:"POST",body:r},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let d=await l.text();throw new s(`Failed to upload file to staged URL: ${l.statusText}
2
2
  ${d}`)}}t();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{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"}}]}}]}}]};async function ae(e){let{adminSession:n,query:a,variablesJsonl:i,version:r}=e,l=await h({adminSession:n,variablesJsonl:i});return(await u({query:U,session:n,variables:{mutation:a,stagedUploadPath:l},...r&&{version:r}})).bulkOperationRunMutation}t();t();var S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},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:"bulkOperation"},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:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};t();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],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:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:S,session:n,variables:{id:a},version:i??p})).bulkOperation}async function re(e){let{adminSession:n,version:a,sinceDays:i=7,first:r=100}=e,l=new Date(Date.now()-i*24*60*60*1e3).toISOString().split("T")[0];return(await u({query:q,session:n,variables:{query:`created_at:>=${l}`,first:r,sortKey:"CREATED_AT"},version:a??p})).bulkOperations.nodes}t();t();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationCancel"},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:"bulkOperationCancel"},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:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"fileSize"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"rootObjectCount"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"url"}},{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"}}]}}]}}]};async function oe(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:P,session:n,variables:{id:a},version:i??p})).bulkOperationCancel}t();t();function O(e){switch(e.status){case"RUNNING":return o`Bulk operation in progress${e.objectCount>0?m.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return o`Starting`;case"COMPLETED":return o`Bulk operation succeeded: ${m.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return o`Bulk operation failed. ${m.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return o`Bulk operation canceling...`;case"CANCELED":return o`Bulk operation canceled.`;case"EXPIRED":return o`Bulk operation expired.`;default:return o`Bulk operation status: ${e.status}`}}function le(e,n){let a=e.map(i=>o`${i.field?.join(".")??"unknown"}: ${i.message}`.value).join(`
3
3
  `);_({headline:n,body:a})}function de(e){let n=O(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let a=[o`ID: ${m.cyan(e.id)}`.value,o`Status: ${m.yellow(e.status)}`.value,o`Created at: ${m.gray(String(e.createdAt))}`.value,...e.completedAt?[o`Completed at: ${m.gray(String(e.completedAt))}`.value]:[]];return{headline:o`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:o`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:a}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:n,renderType:"info"}}}var se=["COMPLETED","FAILED","CANCELED","EXPIRED"],V=1,ue=5,M=10,$=3e3,Q=300;async function me(e,n){return N({title:o`Starting bulk operation`,task:async()=>{let a=Date.now(),i=j({adminSession:e,operationId:n,pollIntervalSeconds:Q/1e3,useAdaptivePolling:!1}),r;do{let{value:l,done:d}=await i.next();if(r=l,d)return r}while(Date.now()-a<$);return r},renderOptions:{stdout:process.stderr}})}async function ke(e,n,a,i){return N({title:o`Polling bulk operation`,task:async r=>{let l=j({adminSession:e,operationId:n,pollIntervalSeconds:ue,initialPollIntervalSeconds:V,initialPollCount:M,useAdaptivePolling:!0,abortSignal:a});for(;;){let{value:d,done:k}=await l.next();if(k)return d;r(O(d))}},onAbort:i,renderOptions:{stdout:process.stderr}})}async function*j({adminSession:e,operationId:n,pollIntervalSeconds:a,useAdaptivePolling:i=!1,initialPollIntervalSeconds:r=V,initialPollCount:l=M,abortSignal:d}){let k=0;for(;;){let c=await pe(e,n);if(!c.bulkOperation)throw new Error("bulk operation not found");let f=c.bulkOperation;if(se.includes(f.status)||d?.aborted)return f;yield f,k++;let v=a;if(i&&k<=l&&(v=r),d){let w,K=new Promise(G=>{let I=()=>G();d.addEventListener("abort",I,{once:!0}),w=()=>d.removeEventListener("abort",I)});await Promise.race([F(v),K]),w?.()}else await F(v)}}async function pe(e,n){return u({query:S,session:e,variables:{id:n},version:p})}t();async function ce(e){let n=await y(e);if(!n.ok)throw new s(`Failed to download bulk operation results: ${n.statusText}`);return n.text()}function ve(e){return e.trim().split(`
4
4
  `).filter(a=>a.trim().length>0).some(a=>{let i;try{i=JSON.parse(a)}catch(l){if(l instanceof SyntaxError)return!1;throw l}if(Array.isArray(i.errors)&&i.errors.length>0)return!0;if(!i.data)return!1;let r=Object.values(i.data)[0];return r?.userErrors!==void 0&&r.userErrors.length>0})}t();async function fe(e){let n=await D({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),a=await x({appContextResult:n,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:n,store:a}}async function Jn(e){let n=await E({query:e.query,queryFile:e["query-file"]}),{appContextResult:a,store:i}=await fe(e);return{query:n,appContextResult:a,store:i}}export{p as a,H as b,J as c,g as d,X as e,Y as f,E as g,Z as h,ae as i,te as j,re as k,oe as l,O as m,le as n,de as o,me as p,ke as q,ce as r,ve as s,fe as t,Jn as u};
@@ -1 +1 @@
1
- import{H as m,I as d,x as c}from"./chunk-SKRUMRB4.js";import{Bb as w,Cb as n,Eb as a}from"./chunk-YJWNM4XO.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();async function P(){let r,l=new Promise(function(e,i){r=e});await c({processes:[{prefix:"backend",action:async(e,i,s)=>{e.write("first backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third backend message"),await new Promise(t=>setTimeout(t,1e3)),r()}},{prefix:"frontend",action:async(e,i,s)=>{await l,e.write("first frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third frontend message")}}]}),await m([{title:"Installing dependencies",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}},{title:"Downloading assets",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}}]),await d({title:new w("Importing data"),task:async e=>{for(let i=1;i<=10;i++){await new Promise(t=>setTimeout(t,500));let s=a`Importing data ${n.italic(a`(${n.green(i.toString())} complete)`)}`;e(s)}return"completed"}})}export{P as a};
1
+ import{H as m,I as d,x as c}from"./chunk-RCYQPOJW.js";import{Bb as w,Cb as n,Eb as a}from"./chunk-3F42A3XV.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();async function P(){let r,l=new Promise(function(e,i){r=e});await c({processes:[{prefix:"backend",action:async(e,i,s)=>{e.write("first backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third backend message"),await new Promise(t=>setTimeout(t,1e3)),r()}},{prefix:"frontend",action:async(e,i,s)=>{await l,e.write("first frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third frontend message")}}]}),await m([{title:"Installing dependencies",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}},{title:"Downloading assets",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}}]),await d({title:new w("Importing data"),task:async e=>{for(let i=1;i<=10;i++){await new Promise(t=>setTimeout(t,500));let s=a`Importing data ${n.italic(a`(${n.green(i.toString())} complete)`)}`;e(s)}return"completed"}})}export{P as a};
@@ -1,4 +1,4 @@
1
- import{l as O,n as W}from"./chunk-QAXFCAOV.js";import{S as v,a as S}from"./chunk-SKRUMRB4.js";import{f as y}from"./chunk-G54BKNIX.js";import{i as u,l as L}from"./chunk-FCULF3JA.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-YJWNM4XO.js";import{d as r,i as k}from"./chunk-3VYOLEQE.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}.
1
+ import{l as O,n as W}from"./chunk-Q555FV2X.js";import{S as v,a as S}from"./chunk-RCYQPOJW.js";import{f as y}from"./chunk-PQH4U2XV.js";import{i as u,l as L}from"./chunk-ZZ7SOJHH.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-3F42A3XV.js";import{d as r,i as k}from"./chunk-3VYOLEQE.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
2
  ${t}`)}}var l=R(I(),1),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
3
  ${c.json(e)}
4
4
  With options:
@@ -1 +1 @@
1
- import{A as s,y as d,z as a}from"./chunk-SKRUMRB4.js";import{Ib as r}from"./chunk-YJWNM4XO.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function l(e){let i=e.status==="success"?{schemaVersion:1,...e.submission}:{schemaVersion:1,...e.submission,failure:e.failure};return JSON.stringify(i,null,2)}function p(e){return JSON.stringify({schemaVersion:1,outcomes:e.outcomes},null,2)}function D(e){f(e)}function R(e,i){return i.json?r(l(e)):e.status==="failed"?S(e):i.watch?d({headline:"Subscription migration operations.",body:e.submission.operations.map(({operation:o})=>c(o))}):f(e.submission),e.status==="failed"?1:0}function v(e,i){let o=e.outcomes.some(({status:n})=>n==="failed");return i.json?r(p(e)):o?s({headline:"Some subscription migration operations could not be canceled.",body:m(e.outcomes)}):a({headline:"Subscription migration operations canceled.",body:m(e.outcomes)}),o?1:0}function f(e){let i=e.action==="schedule"?"scheduled":"unscheduled";a({headline:`Subscription migrations ${i}.`,body:[`Shops: ${e.total}`,"Operation IDs:",...e.operations.map(({operation:o})=>o.id),"Save every operation ID. You will need them to check or cancel this submission."]})}function S(e){if(e.failure.type==="operations"){s({headline:"Some subscription migration operations failed.",body:["Failed operation IDs:",...e.failure.operationIds,"Terminal operation outcomes:",...e.submission.operations.map(({operation:o})=>c(o)),"Save every operation ID. You will need them to inspect this submission."]});return}let i=e.submission.operations.map(({operation:o})=>o.id);s({headline:i.length===0?"Subscription migration submission failed.":"Some subscription migration operations were accepted before submission failed.",body:[...i.length===0?["Accepted operation IDs: None."]:["Accepted operation IDs:",...i],`Batch index: ${e.failure.batchIndex}`,"Errors:",...e.failure.userErrors.map(({message:o})=>o),...i.length===0?[]:["Save every accepted operation ID. You will need them to check or cancel accepted operations."]]})}function m(e){let i=e.filter(n=>n.status==="success"),o=e.filter(n=>n.status==="failed");return[...i.length===0?["Canceled operations: None."]:["Canceled operations:",...i.map(({operation:n})=>c(n))],...o.length===0?[]:["Failed operations:",...o.map(({operationId:n,operation:u,userErrors:b})=>{let h=u?` (returned status: ${u.status})`:"";return`${n}: ${b.map(({message:g})=>g).join("; ")}${h}`})]]}function c(e){return`${e.id}: ${e.status} (${e.results.edges.length}/${e.total} settled)`}export{D as a,R as b,v as c};
1
+ import{A as s,y as d,z as a}from"./chunk-RCYQPOJW.js";import{Ib as r}from"./chunk-3F42A3XV.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function l(e){let i=e.status==="success"?{schemaVersion:1,...e.submission}:{schemaVersion:1,...e.submission,failure:e.failure};return JSON.stringify(i,null,2)}function p(e){return JSON.stringify({schemaVersion:1,outcomes:e.outcomes},null,2)}function D(e){f(e)}function R(e,i){return i.json?r(l(e)):e.status==="failed"?S(e):i.watch?d({headline:"Subscription migration operations.",body:e.submission.operations.map(({operation:o})=>c(o))}):f(e.submission),e.status==="failed"?1:0}function v(e,i){let o=e.outcomes.some(({status:n})=>n==="failed");return i.json?r(p(e)):o?s({headline:"Some subscription migration operations could not be canceled.",body:m(e.outcomes)}):a({headline:"Subscription migration operations canceled.",body:m(e.outcomes)}),o?1:0}function f(e){let i=e.action==="schedule"?"scheduled":"unscheduled";a({headline:`Subscription migrations ${i}.`,body:[`Shops: ${e.total}`,"Operation IDs:",...e.operations.map(({operation:o})=>o.id),"Save every operation ID. You will need them to check or cancel this submission."]})}function S(e){if(e.failure.type==="operations"){s({headline:"Some subscription migration operations failed.",body:["Failed operation IDs:",...e.failure.operationIds,"Terminal operation outcomes:",...e.submission.operations.map(({operation:o})=>c(o)),"Save every operation ID. You will need them to inspect this submission."]});return}let i=e.submission.operations.map(({operation:o})=>o.id);s({headline:i.length===0?"Subscription migration submission failed.":"Some subscription migration operations were accepted before submission failed.",body:[...i.length===0?["Accepted operation IDs: None."]:["Accepted operation IDs:",...i],`Batch index: ${e.failure.batchIndex}`,"Errors:",...e.failure.userErrors.map(({message:o})=>o),...i.length===0?[]:["Save every accepted operation ID. You will need them to check or cancel accepted operations."]]})}function m(e){let i=e.filter(n=>n.status==="success"),o=e.filter(n=>n.status==="failed");return[...i.length===0?["Canceled operations: None."]:["Canceled operations:",...i.map(({operation:n})=>c(n))],...o.length===0?[]:["Failed operations:",...o.map(({operationId:n,operation:u,userErrors:b})=>{let h=u?` (returned status: ${u.status})`:"";return`${n}: ${b.map(({message:g})=>g).join("; ")}${h}`})]]}function c(e){return`${e.id}: ${e.status} (${e.results.edges.length}/${e.total} settled)`}export{D as a,R as b,v as c};