@shopify/cli 4.8.5 → 4.9.0

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 (489) hide show
  1. package/dist/analytics-QK4RFCB6.js +1 -0
  2. package/dist/analytics-R6I5APDB.js +1 -0
  3. package/dist/assets/hydrogen/starter/package.json +1 -1
  4. package/dist/bootstrap.js +1 -3
  5. package/dist/chunk-22LJALHJ.js +7 -0
  6. package/dist/{chunk-6ICRPFG4.js → chunk-23K3B23N.js} +1 -1
  7. package/dist/chunk-2KLXRVGQ.js +317 -0
  8. package/dist/{chunk-ZMD5TNU5.js → chunk-2LZQM5JG.js} +1 -1
  9. package/dist/chunk-2OHSGC4Q.js +1 -0
  10. package/dist/chunk-2Q3WIH7S.js +6 -0
  11. package/dist/{chunk-HSETBDXR.js → chunk-2W6M7YDY.js} +1 -1
  12. package/dist/{chunk-2JM3XHTQ.js → chunk-2YFB3PTV.js} +9 -9
  13. package/dist/chunk-2YRVHJEY.js +4 -0
  14. package/dist/{chunk-DKAWQBTI.js → chunk-3AASYIOA.js} +3 -3
  15. package/dist/chunk-3DMDSAWK.js +20 -0
  16. package/dist/{chunk-NZ3HLDJG.js → chunk-3SG5EJFC.js} +1 -1
  17. package/dist/chunk-3T2WMZHC.js +1 -0
  18. package/dist/{chunk-773TIA5M.js → chunk-3VYOLEQE.js} +2 -2
  19. package/dist/chunk-3WVEL423.js +1 -0
  20. package/dist/{chunk-H5MENHJ2.js → chunk-3ZK5JZLY.js} +1 -1
  21. package/dist/chunk-44QTWXOJ.js +8 -0
  22. package/dist/{chunk-4QBJ5JBX.js → chunk-4A7FPJVT.js} +16 -15
  23. package/dist/chunk-4TQFTZVD.js +18 -0
  24. package/dist/chunk-4WACZNFF.js +1 -0
  25. package/dist/{chunk-4UD2LW4O.js → chunk-4XSYMLQG.js} +1 -1
  26. package/dist/{chunk-T3B6KIPU.js → chunk-4Y22EM45.js} +1 -1
  27. package/dist/chunk-53U6XS3J.js +1 -0
  28. package/dist/chunk-55NKAIIT.js +1 -0
  29. package/dist/chunk-55PABKRC.js +5 -0
  30. package/dist/chunk-5BLXN5WU.js +1 -0
  31. package/dist/{chunk-AOPEKBDL.js → chunk-5BYVVXGD.js} +1 -1
  32. package/dist/{chunk-ZMTTZXC4.js → chunk-5HEBS5DG.js} +3 -3
  33. package/dist/{chunk-VIMFXQ3Q.js → chunk-5HONV6NQ.js} +1 -1
  34. package/dist/chunk-5RL6DKWR.js +5 -0
  35. package/dist/chunk-5XO6PAMV.js +1 -0
  36. package/dist/chunk-6DHY67FO.js +6 -0
  37. package/dist/{chunk-5GUXN2RU.js → chunk-6GA56I3E.js} +1 -1
  38. package/dist/chunk-6IL3B5Z5.js +4 -0
  39. package/dist/{chunk-AEPBX4GI.js → chunk-6ILP6QCH.js} +1 -1
  40. package/dist/{chunk-PL7AJVTV.js → chunk-6RBCFXJT.js} +1 -1
  41. package/dist/{chunk-NZE4C4OI.js → chunk-72HS7MHV.js} +1 -1
  42. package/dist/{chunk-RU6J6QQF.js → chunk-74HXMIDM.js} +1 -1
  43. package/dist/{chunk-PJ7L6NSD.js → chunk-77B77IGP.js} +1 -1
  44. package/dist/chunk-7DRKDQRT.js +1 -0
  45. package/dist/chunk-7HDJBEBP.js +3 -0
  46. package/dist/chunk-7IGMIDKK.js +15 -0
  47. package/dist/chunk-7QQPAT4L.js +1 -0
  48. package/dist/chunk-7Y4X5I6N.js +1 -0
  49. package/dist/{chunk-NPATN7YS.js → chunk-7ZSN2QT5.js} +1 -1
  50. package/dist/chunk-A54V5UCD.js +5 -0
  51. package/dist/{chunk-MNYKIPG7.js → chunk-AD4S2VEI.js} +1 -1
  52. package/dist/chunk-ADW7ECNU.js +7 -0
  53. package/dist/chunk-AS2O62JX.js +1 -0
  54. package/dist/chunk-ASUARYJD.js +1 -0
  55. package/dist/chunk-B4RPJYDH.js +1 -0
  56. package/dist/{chunk-PIQI72DV.js → chunk-BJOJNAKH.js} +1 -1
  57. package/dist/chunk-BL5JWD3Y.js +16 -0
  58. package/dist/chunk-BOFCBTX7.js +1 -0
  59. package/dist/chunk-BPIQ4YTW.js +1 -0
  60. package/dist/chunk-C6FZII5S.js +1 -0
  61. package/dist/{chunk-6LNTC6EK.js → chunk-CACPRKUF.js} +1 -1
  62. package/dist/{chunk-WKTIQUQP.js → chunk-CHLSNYF7.js} +1 -1
  63. package/dist/chunk-CMICT4XI.js +1 -0
  64. package/dist/chunk-CPFAATMO.js +6 -0
  65. package/dist/{chunk-R4TOHQH3.js → chunk-CSRNHTHO.js} +2 -2
  66. package/dist/chunk-D3K42KBL.js +9 -0
  67. package/dist/chunk-DGMRL5DQ.js +1 -0
  68. package/dist/chunk-DKJPE42V.js +2 -0
  69. package/dist/{chunk-SOJHJ4QK.js → chunk-DYA5UUXL.js} +1 -1
  70. package/dist/chunk-E5ND6RBL.js +1 -0
  71. package/dist/{chunk-DV7FOLG4.js → chunk-E75DJTAF.js} +1 -1
  72. package/dist/chunk-ECEOBSGD.js +1 -0
  73. package/dist/{chunk-6IOVTFAH.js → chunk-EYSZRIUL.js} +1 -1
  74. package/dist/chunk-FCULF3JA.js +1 -0
  75. package/dist/chunk-FL34EOXG.js +1 -0
  76. package/dist/chunk-FW5HGFSZ.js +20 -0
  77. package/dist/{chunk-M2M3I63K.js → chunk-G54BKNIX.js} +1 -1
  78. package/dist/{chunk-PU6KWWVK.js → chunk-G7OIACY5.js} +1 -1
  79. package/dist/{chunk-VVPIXC3W.js → chunk-GALDYSEX.js} +1 -1
  80. package/dist/{chunk-WQOV3LQA.js → chunk-GDQLA5NB.js} +1 -1
  81. package/dist/{chunk-GCJAY2XJ.js → chunk-GJJBOCKD.js} +3 -3
  82. package/dist/{chunk-OJSF3H2G.js → chunk-GQZPGTG7.js} +2 -2
  83. package/dist/{chunk-MMHTYLTG.js → chunk-GVRFO4CV.js} +1 -1
  84. package/dist/chunk-HB3MJYBK.js +1 -0
  85. package/dist/{chunk-AEUCDGTB.js → chunk-HDQXFGYG.js} +1 -1
  86. package/dist/chunk-HSTNTHWM.js +1 -0
  87. package/dist/{chunk-WAZL37JY.js → chunk-HSZC2LBB.js} +1 -1
  88. package/dist/chunk-I4FGM6UH.js +8 -0
  89. package/dist/chunk-I7GYNNCU.js +6 -0
  90. package/dist/{chunk-MFP63IUM.js → chunk-IBTQO3JD.js} +1 -1
  91. package/dist/{chunk-MVJSQT7V.js → chunk-IISE7SBT.js} +1 -1
  92. package/dist/chunk-IUZZWXJG.js +3 -0
  93. package/dist/chunk-IWML2HLC.js +5 -0
  94. package/dist/{chunk-CTNBSUVU.js → chunk-JA2QZ635.js} +2 -2
  95. package/dist/chunk-JOJRABPY.js +3 -0
  96. package/dist/chunk-JQKB3D37.js +1 -0
  97. package/dist/chunk-JROJL6RV.js +1 -0
  98. package/dist/{chunk-4JU7N2OF.js → chunk-JTPVSO6Y.js} +1 -1
  99. package/dist/chunk-JWDUSMCA.js +1 -0
  100. package/dist/{chunk-3CKUOG4B.js → chunk-KLYJDAP6.js} +1 -1
  101. package/dist/{chunk-LZZAD3FW.js → chunk-KVROYIUQ.js} +1 -1
  102. package/dist/chunk-L5XWYTHY.js +836 -0
  103. package/dist/chunk-LOTGSNS5.js +2 -0
  104. package/dist/{chunk-KHRZFJHM.js → chunk-LQLFMDVD.js} +1 -1
  105. package/dist/{chunk-Z4E2EXZV.js → chunk-LSWFHTJT.js} +1 -1
  106. package/dist/{chunk-BPJRQOHO.js → chunk-LV2IWYGL.js} +1 -1
  107. package/dist/{chunk-XRWQ7AXY.js → chunk-LYPNQFWX.js} +1 -1
  108. package/dist/{chunk-UJSCQJLW.js → chunk-MRVQ6XRW.js} +1 -1
  109. package/dist/chunk-MVVHISCR.js +2 -0
  110. package/dist/{chunk-VPOAOUT4.js → chunk-N4DE5H65.js} +1 -1
  111. package/dist/{chunk-W6ST525S.js → chunk-N56BJ3F7.js} +1 -1
  112. package/dist/{chunk-POOKYUTJ.js → chunk-NF7MOA4K.js} +1 -1
  113. package/dist/{chunk-PQDB3FUL.js → chunk-NGN7U2UF.js} +1 -1
  114. package/dist/{chunk-KDMJ2BLO.js → chunk-NTVEJYKI.js} +1 -1
  115. package/dist/chunk-NYABB6XW.js +1 -0
  116. package/dist/{chunk-RSGIMVPN.js → chunk-O6E7YL7N.js} +2 -2
  117. package/dist/chunk-OASB6XPV.js +16 -0
  118. package/dist/{chunk-I6DVGPJ7.js → chunk-OBYY45BX.js} +1 -1
  119. package/dist/chunk-OETFY7FE.js +28 -0
  120. package/dist/{chunk-K5OTE6CX.js → chunk-OEZATTOS.js} +1 -1
  121. package/dist/{chunk-D34ZSTCK.js → chunk-OG7SF4FU.js} +1 -1
  122. package/dist/chunk-OM243CQ6.js +6 -0
  123. package/dist/chunk-P3Z5RLVV.js +3 -0
  124. package/dist/{chunk-ZFA5DIJ3.js → chunk-PBBZNGS4.js} +1 -1
  125. package/dist/chunk-PGTKKP2B.js +11 -0
  126. package/dist/chunk-PK4ID32C.js +1 -0
  127. package/dist/{chunk-G7C4LBG2.js → chunk-PVOWU77O.js} +1 -1
  128. package/dist/{chunk-SYBKHTVU.js → chunk-PXD2WJOI.js} +3 -3
  129. package/dist/chunk-PXXTSW6I.js +4 -0
  130. package/dist/{chunk-IYFHBTJ2.js → chunk-PZHE37Z4.js} +1 -1
  131. package/dist/{chunk-WHXY372K.js → chunk-Q34PKJRR.js} +1 -1
  132. package/dist/{chunk-6QWLOSUQ.js → chunk-Q3O3AFZT.js} +1 -1
  133. package/dist/chunk-Q45XAEG2.js +16 -0
  134. package/dist/{chunk-DPMOLROM.js → chunk-QAXFCAOV.js} +5 -5
  135. package/dist/{chunk-FXBQKJTS.js → chunk-QBGSSUJP.js} +1 -1
  136. package/dist/chunk-QILWHHAQ.js +1 -0
  137. package/dist/{chunk-HGFCNPSN.js → chunk-QJST4LZX.js} +1 -1
  138. package/dist/chunk-QQN4PJZD.js +1 -0
  139. package/dist/{chunk-OAEGTH4Q.js → chunk-QSKOR3ED.js} +1 -1
  140. package/dist/{chunk-C4UCOQUP.js → chunk-QTEWTPAQ.js} +2 -2
  141. package/dist/chunk-QWDJRSJJ.js +1 -0
  142. package/dist/{chunk-TUWRPDTE.js → chunk-R757TSQ6.js} +1 -1
  143. package/dist/chunk-RCIU7NHA.js +1 -0
  144. package/dist/chunk-RGIUP4FW.js +1 -0
  145. package/dist/{chunk-4SXHXMK6.js → chunk-RHNFWHFY.js} +1 -1
  146. package/dist/{chunk-6QU2BHVL.js → chunk-S7536EWZ.js} +4 -4
  147. package/dist/{chunk-GW7IEG4G.js → chunk-SDFO7P2M.js} +1 -1
  148. package/dist/{chunk-7O2KMA4J.js → chunk-SDJNAUU6.js} +1 -1
  149. package/dist/chunk-SGBLCVUX.js +1 -0
  150. package/dist/chunk-SJARQZVN.js +3 -0
  151. package/dist/chunk-SKRUMRB4.js +383 -0
  152. package/dist/{chunk-BU6LJZG7.js → chunk-SW5EWGBJ.js} +1 -1
  153. package/dist/chunk-SXPWOYLT.js +7 -0
  154. package/dist/chunk-T234RERA.js +7 -0
  155. package/dist/chunk-TJJVX7CU.js +4 -0
  156. package/dist/{chunk-TTV2GWNE.js → chunk-TMV37ENR.js} +1 -1
  157. package/dist/{chunk-4UAJ6ULU.js → chunk-TNXZWQZU.js} +1 -1
  158. package/dist/{chunk-GUPUXFIP.js → chunk-TO7TXDLU.js} +1 -1
  159. package/dist/chunk-TSLZNTFM.js +3 -0
  160. package/dist/{chunk-NAQ7KT6L.js → chunk-UFU2LGFK.js} +1 -1
  161. package/dist/chunk-VDDNDA5K.js +15 -0
  162. package/dist/{chunk-F33TYJM5.js → chunk-VFO5OYQ4.js} +1 -1
  163. package/dist/{chunk-4DIR65KL.js → chunk-VFP3PUGZ.js} +24 -24
  164. package/dist/{chunk-6QDOCBD4.js → chunk-VZUHMW5E.js} +4 -3
  165. package/dist/chunk-W7CBJNXD.js +12 -0
  166. package/dist/chunk-WCAGYCT7.js +4 -0
  167. package/dist/{chunk-DPNZWBT5.js → chunk-WNO2V53C.js} +1 -1
  168. package/dist/{chunk-4XE6E4DC.js → chunk-WPUQTUDX.js} +1 -1
  169. package/dist/chunk-WU7MSL3I.js +8 -0
  170. package/dist/chunk-WXV35TPE.js +1 -0
  171. package/dist/{chunk-77KSMVIO.js → chunk-XBSWZ6BT.js} +6 -6
  172. package/dist/chunk-XCNJL7ES.js +1 -0
  173. package/dist/{chunk-WM3GKSPE.js → chunk-XFZDFDZV.js} +1 -1
  174. package/dist/chunk-XTYSJIZY.js +1 -0
  175. package/dist/chunk-Y5ZN62VF.js +1 -0
  176. package/dist/{chunk-EBBS7VG6.js → chunk-YAH5WFYR.js} +3 -3
  177. package/dist/{chunk-EJJPVVQ2.js → chunk-YBQKJHZW.js} +1 -1
  178. package/dist/chunk-YD66PU3Y.js +1 -0
  179. package/dist/chunk-YGFEUXKQ.js +1 -0
  180. package/dist/chunk-YJWNM4XO.js +18 -0
  181. package/dist/{chunk-RX63KGTK.js → chunk-YQQHBFMA.js} +1 -1
  182. package/dist/chunk-YRHFPXC3.js +1 -0
  183. package/dist/chunk-YTJ3EPD3.js +1 -0
  184. package/dist/chunk-YX5GRXRS.js +2368 -0
  185. package/dist/chunk-Z35PUKKP.js +7 -0
  186. package/dist/{chunk-WKRX4FBZ.js → chunk-Z3XIZMEM.js} +1 -1
  187. package/dist/chunk-ZGASBRSQ.js +5 -0
  188. package/dist/{chunk-HS3VTFW3.js → chunk-ZHJ6KA43.js} +1 -1
  189. package/dist/{chunk-H6TWXT6Q.js → chunk-ZO4IBP4B.js} +1 -1
  190. package/dist/chunk-ZOYSMJ27.js +1 -0
  191. package/dist/chunk-ZPCCSPAE.js +3 -0
  192. package/dist/chunk-ZSJXZCAW.js +4 -0
  193. package/dist/{chunk-A2BZY6TE.js → chunk-ZSVR5NEO.js} +1 -1
  194. package/dist/{chunk-J774336K.js → chunk-ZUVAHONX.js} +1 -1
  195. package/dist/chunk-ZVDFCUJT.js +2 -0
  196. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  197. package/dist/cli/commands/app/build.js +1 -1
  198. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  199. package/dist/cli/commands/app/bulk/execute.js +1 -1
  200. package/dist/cli/commands/app/bulk/status.js +1 -1
  201. package/dist/cli/commands/app/config/link.js +1 -1
  202. package/dist/cli/commands/app/config/pull.js +1 -1
  203. package/dist/cli/commands/app/config/use.js +1 -1
  204. package/dist/cli/commands/app/config/validate.js +1 -1
  205. package/dist/cli/commands/app/demo/watcher.js +1 -1
  206. package/dist/cli/commands/app/deploy.js +1 -1
  207. package/dist/cli/commands/app/dev/clean.js +1 -1
  208. package/dist/cli/commands/app/dev.js +1 -1
  209. package/dist/cli/commands/app/env/pull.js +1 -1
  210. package/dist/cli/commands/app/env/show.js +1 -1
  211. package/dist/cli/commands/app/execute.js +1 -1
  212. package/dist/cli/commands/app/function/build.js +1 -1
  213. package/dist/cli/commands/app/function/info.js +1 -1
  214. package/dist/cli/commands/app/function/replay.js +1 -1
  215. package/dist/cli/commands/app/function/run.js +1 -1
  216. package/dist/cli/commands/app/function/schema.js +1 -1
  217. package/dist/cli/commands/app/function/typegen.js +1 -1
  218. package/dist/cli/commands/app/generate/extension.js +1 -1
  219. package/dist/cli/commands/app/graphiql.js +1 -1
  220. package/dist/cli/commands/app/import/channel-config.js +1 -0
  221. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -0
  222. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -0
  223. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  224. package/dist/cli/commands/app/import-extensions.js +1 -1
  225. package/dist/cli/commands/app/info.js +1 -1
  226. package/dist/cli/commands/app/init.js +1 -1
  227. package/dist/cli/commands/app/logs.js +1 -1
  228. package/dist/cli/commands/app/release.js +1 -1
  229. package/dist/cli/commands/app/security/check.js +1 -0
  230. package/dist/cli/commands/app/security/clean.js +1 -0
  231. package/dist/cli/commands/app/security/instructions.js +1 -0
  232. package/dist/cli/commands/app/security/record.js +1 -0
  233. package/dist/cli/commands/app/security/review.js +1 -0
  234. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  235. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  236. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  237. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  238. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  239. package/dist/cli/commands/app/versions/list.js +1 -1
  240. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  241. package/dist/cli/commands/auth/login.d.ts +16 -1
  242. package/dist/cli/commands/auth/login.js +1 -1
  243. package/dist/cli/commands/auth/logout.d.ts +16 -1
  244. package/dist/cli/commands/auth/logout.js +1 -1
  245. package/dist/cli/commands/cache/clear.js +1 -1
  246. package/dist/cli/commands/config/autoupgrade/off.d.ts +13 -0
  247. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  248. package/dist/cli/commands/config/autoupgrade/on.d.ts +13 -0
  249. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  250. package/dist/cli/commands/config/autoupgrade/status.d.ts +13 -0
  251. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  252. package/dist/cli/commands/debug/command-flags.js +1 -1
  253. package/dist/cli/commands/doc/fetch.d.ts +2 -0
  254. package/dist/cli/commands/doc/fetch.js +1 -1
  255. package/dist/cli/commands/doc/search.d.ts +1 -0
  256. package/dist/cli/commands/doc/search.js +1 -1
  257. package/dist/cli/commands/docs/generate.js +1 -1
  258. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  259. package/dist/cli/commands/doctor-release/theme/index.d.ts +1 -0
  260. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  261. package/dist/cli/commands/help.d.ts +431 -1
  262. package/dist/cli/commands/help.js +1 -1
  263. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  264. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  265. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  266. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  267. package/dist/cli/commands/notifications/generate.js +1 -1
  268. package/dist/cli/commands/notifications/list.js +1 -1
  269. package/dist/cli/commands/organization/list.js +1 -1
  270. package/dist/cli/commands/search.d.ts +11 -1
  271. package/dist/cli/commands/search.js +1 -1
  272. package/dist/cli/commands/send-analytics.js +1 -1
  273. package/dist/cli/commands/theme/check.js +1 -1
  274. package/dist/cli/commands/theme/console.js +1 -1
  275. package/dist/cli/commands/theme/delete.js +1 -1
  276. package/dist/cli/commands/theme/dev.js +1 -1
  277. package/dist/cli/commands/theme/duplicate.js +1 -1
  278. package/dist/cli/commands/theme/info.js +1 -1
  279. package/dist/cli/commands/theme/init.js +1 -1
  280. package/dist/cli/commands/theme/language-server.js +1 -1
  281. package/dist/cli/commands/theme/list.js +1 -1
  282. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  283. package/dist/cli/commands/theme/open.js +1 -1
  284. package/dist/cli/commands/theme/package.js +1 -1
  285. package/dist/cli/commands/theme/preview.js +1 -1
  286. package/dist/cli/commands/theme/profile.js +1 -1
  287. package/dist/cli/commands/theme/publish.js +1 -1
  288. package/dist/cli/commands/theme/pull.js +1 -1
  289. package/dist/cli/commands/theme/push.js +1 -1
  290. package/dist/cli/commands/theme/rename.js +1 -1
  291. package/dist/cli/commands/theme/share.js +1 -1
  292. package/dist/cli/commands/upgrade.js +1 -1
  293. package/dist/cli/commands/version.d.ts +15 -1
  294. package/dist/cli/commands/version.js +1 -1
  295. package/dist/cli/help.d.ts +5 -2
  296. package/dist/cli/help.js +6 -2
  297. package/dist/cli/services/commands/auth/login/types.d.ts +11 -0
  298. package/dist/cli/services/commands/auth/login/types.js +7 -0
  299. package/dist/cli/services/commands/config/autoupgrade/index.d.ts +3 -0
  300. package/dist/cli/services/commands/config/autoupgrade/index.js +9 -0
  301. package/dist/cli/services/commands/config/autoupgrade/result.d.ts +2 -0
  302. package/dist/cli/services/commands/config/autoupgrade/result.js +15 -0
  303. package/dist/cli/services/commands/config/autoupgrade/types.d.ts +10 -0
  304. package/dist/cli/services/commands/config/autoupgrade/types.js +7 -0
  305. package/dist/cli/services/commands/doc/fetch.d.ts +1 -1
  306. package/dist/cli/services/commands/doc/fetch.js +11 -2
  307. package/dist/cli/services/commands/help/index.d.ts +3 -0
  308. package/dist/cli/services/commands/help/index.js +51 -0
  309. package/dist/cli/services/commands/help/result.d.ts +2 -0
  310. package/dist/cli/services/commands/help/result.js +6 -0
  311. package/dist/cli/services/commands/help/types.d.ts +431 -0
  312. package/dist/cli/services/commands/help/types.js +71 -0
  313. package/dist/cli/services/commands/search/index.d.ts +2 -0
  314. package/dist/cli/services/commands/search/index.js +8 -0
  315. package/dist/cli/services/commands/search/result.d.ts +2 -0
  316. package/dist/cli/services/commands/search/result.js +12 -0
  317. package/dist/cli/services/commands/search/types.d.ts +10 -0
  318. package/dist/cli/services/commands/search/types.js +7 -0
  319. package/dist/cli/services/commands/version/index.d.ts +2 -0
  320. package/dist/cli/services/commands/version/index.js +5 -0
  321. package/dist/cli/services/commands/version/result.d.ts +2 -0
  322. package/dist/cli/services/commands/version/result.js +6 -0
  323. package/dist/cli/services/commands/version/types.d.ts +10 -0
  324. package/dist/cli/services/commands/version/types.js +7 -0
  325. package/dist/command-json-schema-Y3N2NUZN.js +1 -0
  326. package/dist/command-registry.js +1 -1
  327. package/dist/{conf-store-5UUKEHZV.js → conf-store-5ZA3ILWV.js} +1 -1
  328. package/dist/custom-oclif-loader-VQKMCXNH.js +1 -0
  329. package/dist/deprecations-PFQXWNF6.js +1 -0
  330. package/dist/dist-4X53WJBQ.js +1 -0
  331. package/dist/dist-5M2V3YCM.js +1 -0
  332. package/dist/environment-ZUTBXY7U.js +1 -0
  333. package/dist/environments-3RUZ7F4Q.js +1 -0
  334. package/dist/error-FBSXLW22.js +1 -0
  335. package/dist/error-handler-D5BURRJ7.js +1 -0
  336. package/dist/fs-ZLV5W4TV.js +1 -0
  337. package/dist/hooks/did-you-mean.js +1 -1
  338. package/dist/hooks/hydrogen-init.js +1 -1
  339. package/dist/hooks/plugin-plugins.js +1 -1
  340. package/dist/hooks/postrun.js +1 -1
  341. package/dist/hooks/prerun.js +1 -1
  342. package/dist/hooks/public-metadata.js +1 -1
  343. package/dist/hooks/sensitive-metadata.js +1 -1
  344. package/dist/hooks/tunnel-provider.js +1 -1
  345. package/dist/hooks/tunnel-start.js +1 -1
  346. package/dist/http-proxy-node16-D3JUYA5D.js +38 -0
  347. package/dist/index.js +13 -14
  348. package/dist/is-global-GZ5CIXQA.js +1 -0
  349. package/dist/json-error-2BL3UZ7H.js +1 -0
  350. package/dist/lib-AD2G3QH3.js +1 -0
  351. package/dist/lib-VEVNMHDE.js +1 -0
  352. package/dist/lib-ZQW4E7QU.js +1 -0
  353. package/dist/local-KAZJAYLX.js +1 -0
  354. package/dist/metadata-M3ZE24WB.js +1 -0
  355. package/dist/{morph-BMYYMQNX.js → morph-42EXMN3K.js} +3 -3
  356. package/dist/node-package-manager-RVPONQBY.js +1 -0
  357. package/dist/notifications-system-MYEMV7JF.js +1 -0
  358. package/dist/os-DRUILZZR.js +1 -0
  359. package/dist/output-SDE274Y5.js +1 -0
  360. package/dist/{path-MBXP7ZIC.js → path-6YMSTSWG.js} +1 -1
  361. package/dist/system-5FQ3L5PA.js +1 -0
  362. package/dist/tsconfig.tsbuildinfo +1 -1
  363. package/dist/ui-TEZZM7SE.js +1 -0
  364. package/dist/uncaught-error-handler.d.ts +6 -0
  365. package/dist/uncaught-error-handler.js +33 -0
  366. package/dist/upgrade-3PIVJYBL.js +1 -0
  367. package/dist/version-FMWTVLMF.js +1 -0
  368. package/dist/version-IAMVSP7U.js +1 -0
  369. package/dist/workerd-WRW4ZUYM.js +18 -0
  370. package/oclif.manifest.json +2646 -226
  371. package/package.json +17 -8
  372. package/dist/analytics-4D5FCVMV.js +0 -1
  373. package/dist/analytics-XRYJEPWC.js +0 -1
  374. package/dist/chunk-2IZROVCY.js +0 -1
  375. package/dist/chunk-2KD4LHRT.js +0 -5
  376. package/dist/chunk-2SOA4M4G.js +0 -1
  377. package/dist/chunk-2WNF5BX4.js +0 -18
  378. package/dist/chunk-2Z52XJQG.js +0 -1
  379. package/dist/chunk-34PQ6LJC.js +0 -1
  380. package/dist/chunk-3NW372KT.js +0 -1
  381. package/dist/chunk-4JLOCGTK.js +0 -3
  382. package/dist/chunk-4NZ465W4.js +0 -1
  383. package/dist/chunk-5EME57E6.js +0 -7
  384. package/dist/chunk-5N33O2RV.js +0 -1
  385. package/dist/chunk-5PAPCPUM.js +0 -1
  386. package/dist/chunk-5U24BORP.js +0 -6
  387. package/dist/chunk-6ARAJULJ.js +0 -1
  388. package/dist/chunk-7VJPQ52S.js +0 -15
  389. package/dist/chunk-7ZEVVGCH.js +0 -1
  390. package/dist/chunk-A5FV7HOY.js +0 -16
  391. package/dist/chunk-ADS7BFDG.js +0 -15
  392. package/dist/chunk-ADUMJRRY.js +0 -1
  393. package/dist/chunk-AI4SPBPV.js +0 -2
  394. package/dist/chunk-AKETXXYD.js +0 -1
  395. package/dist/chunk-ANOCIVJ3.js +0 -8
  396. package/dist/chunk-BMPCDXJR.js +0 -4
  397. package/dist/chunk-CAKGQWX4.js +0 -7
  398. package/dist/chunk-CBGDD3ZG.js +0 -317
  399. package/dist/chunk-CRALWNNO.js +0 -1
  400. package/dist/chunk-CUGLV7UX.js +0 -1
  401. package/dist/chunk-CWSQIPY5.js +0 -5
  402. package/dist/chunk-D6LV5CJL.js +0 -2
  403. package/dist/chunk-DGMHUJV3.js +0 -4
  404. package/dist/chunk-ENUN2VSC.js +0 -2
  405. package/dist/chunk-EX7Y3BEH.js +0 -1
  406. package/dist/chunk-FDK3NDYQ.js +0 -5
  407. package/dist/chunk-FLV6UQRA.js +0 -1
  408. package/dist/chunk-FTC3BXSD.js +0 -3
  409. package/dist/chunk-FXWNYGIW.js +0 -1
  410. package/dist/chunk-G5272L77.js +0 -7
  411. package/dist/chunk-G5QSVBYP.js +0 -19
  412. package/dist/chunk-G6SURO6V.js +0 -8
  413. package/dist/chunk-GBYDMHZ3.js +0 -3
  414. package/dist/chunk-GCN4O7HM.js +0 -1
  415. package/dist/chunk-GR6NR5QK.js +0 -1
  416. package/dist/chunk-HKHGJYRC.js +0 -1
  417. package/dist/chunk-IKNCFVVX.js +0 -1
  418. package/dist/chunk-IMIPD73V.js +0 -6
  419. package/dist/chunk-IPN5OHBY.js +0 -6
  420. package/dist/chunk-J2HBEHCX.js +0 -9
  421. package/dist/chunk-K3OI5VDE.js +0 -1
  422. package/dist/chunk-KB43BSFM.js +0 -3
  423. package/dist/chunk-KGRDHI2A.js +0 -2
  424. package/dist/chunk-KNCYAIJ2.js +0 -7
  425. package/dist/chunk-KYNXMDFU.js +0 -836
  426. package/dist/chunk-L7CQQML6.js +0 -6
  427. package/dist/chunk-LCVDLQEZ.js +0 -1
  428. package/dist/chunk-NDAUL4H4.js +0 -1
  429. package/dist/chunk-NDFKLPHJ.js +0 -1705
  430. package/dist/chunk-NUKSSKYR.js +0 -1
  431. package/dist/chunk-NVNDQQN6.js +0 -8
  432. package/dist/chunk-O452KNRL.js +0 -1
  433. package/dist/chunk-P5R6JZMT.js +0 -6
  434. package/dist/chunk-PDWJ2YH2.js +0 -1
  435. package/dist/chunk-PSSOCUUD.js +0 -375
  436. package/dist/chunk-PWXGGZQB.js +0 -1
  437. package/dist/chunk-QKUTVLRJ.js +0 -4
  438. package/dist/chunk-QOOVB6RW.js +0 -6
  439. package/dist/chunk-RGJVJ22M.js +0 -3
  440. package/dist/chunk-TIG7SSKB.js +0 -3
  441. package/dist/chunk-TU47HMTL.js +0 -1
  442. package/dist/chunk-UBTHWHPB.js +0 -12
  443. package/dist/chunk-UDWSRNKO.js +0 -1
  444. package/dist/chunk-VE6BYYBP.js +0 -5
  445. package/dist/chunk-W3BNL2Q5.js +0 -1
  446. package/dist/chunk-WDY5CK2T.js +0 -11
  447. package/dist/chunk-WHZKFG2B.js +0 -1
  448. package/dist/chunk-WLU7UG44.js +0 -3
  449. package/dist/chunk-WNBRPWSB.js +0 -1
  450. package/dist/chunk-WWRLFLGM.js +0 -2
  451. package/dist/chunk-XOEBZR5C.js +0 -3
  452. package/dist/chunk-YGSXN3YD.js +0 -28
  453. package/dist/chunk-YN5SVIOI.js +0 -11
  454. package/dist/chunk-YVB7ZPHR.js +0 -20
  455. package/dist/chunk-ZIAXZ5VG.js +0 -1
  456. package/dist/chunk-ZZNGFCJ3.js +0 -4
  457. package/dist/cli/commands/app/doctor/instructions.js +0 -1
  458. package/dist/cli/commands/app/doctor.js +0 -1
  459. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -4
  460. package/dist/cli/commands/config/autoupgrade/constants.js +0 -1
  461. package/dist/cli/services/commands/search.d.ts +0 -1
  462. package/dist/cli/services/commands/search.js +0 -7
  463. package/dist/cli/services/commands/version.d.ts +0 -1
  464. package/dist/cli/services/commands/version.js +0 -6
  465. package/dist/custom-oclif-loader-BWAMUFQ4.js +0 -1
  466. package/dist/deprecations-DVGWC3RL.js +0 -1
  467. package/dist/dist-CN7N5IOM.js +0 -1
  468. package/dist/dist-Q5U4WGYG.js +0 -1
  469. package/dist/environments-M4CFP4XF.js +0 -1
  470. package/dist/error-ZES2RSN7.js +0 -1
  471. package/dist/error-handler-CRTU67VJ.js +0 -1
  472. package/dist/fs-GELMKEWX.js +0 -1
  473. package/dist/http-proxy-node16-A6AKKRQH.js +0 -38
  474. package/dist/is-global-X2QNCXXB.js +0 -1
  475. package/dist/lib-2BR2WN7L.js +0 -1
  476. package/dist/lib-M72BVWQ3.js +0 -1
  477. package/dist/lib-P3APEIHY.js +0 -1
  478. package/dist/local-HMFFXIE3.js +0 -1
  479. package/dist/metadata-SXJZZMCI.js +0 -1
  480. package/dist/node-package-manager-2D2CIFTG.js +0 -1
  481. package/dist/notifications-system-WH6MAXEN.js +0 -1
  482. package/dist/os-PY42WAOB.js +0 -1
  483. package/dist/output-MSTNB7GI.js +0 -1
  484. package/dist/system-7XRI63YJ.js +0 -1
  485. package/dist/ui-77QYNWJB.js +0 -1
  486. package/dist/upgrade-UVPNOKKK.js +0 -1
  487. package/dist/version-DXGPL73I.js +0 -1
  488. package/dist/version-XMVQO6PD.js +0 -1
  489. package/dist/workerd-SOWC66FA.js +0 -18
@@ -1 +1 @@
1
- import{d as l}from"./chunk-HS3VTFW3.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-GBYDMHZ3.js";import{J as n}from"./chunk-PSSOCUUD.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
1
+ import{d as l}from"./chunk-ZHJ6KA43.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-P3Z5RLVV.js";import{J as n}from"./chunk-SKRUMRB4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
@@ -0,0 +1 @@
1
+ import{s as r,t as a}from"./chunk-QAXFCAOV.js";import{y as p}from"./chunk-SKRUMRB4.js";import{a as u}from"./chunk-5RL6DKWR.js";import{Ib as n,b as o}from"./chunk-YJWNM4XO.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();function l(){return{enabled:r()}}function f(t){return a(t),{enabled:t}}e();var d=u({name:"AutoUpgradeResult",schema:o.object({enabled:o.boolean()}).strict()});e();function S(t,m){if(m==="json"){n(d.encode({enabled:t.enabled}));return}p({body:t.enabled?"Auto-upgrade on. Shopify CLI will update automatically after each command.":"Auto-upgrade off. You'll need to run `shopify upgrade` to update manually."})}export{l as a,f as b,d as c,S as d};
@@ -1 +1 @@
1
- import{r as m}from"./chunk-KYNXMDFU.js";import{f as H}from"./chunk-M2M3I63K.js";import{a as k,b as G}from"./chunk-RU6J6QQF.js";import{h as u}from"./chunk-W3BNL2Q5.js";import{Ab as h,Oa as R,Pa as T,ka as g,qb as p,sb as l,ua as y,wa as x}from"./chunk-G5QSVBYP.js";import{d as $,i as b}from"./chunk-773TIA5M.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
1
+ import{j as m}from"./chunk-L5XWYTHY.js";import{a as k,b as G}from"./chunk-74HXMIDM.js";import{f as H}from"./chunk-G54BKNIX.js";import{i as u}from"./chunk-FCULF3JA.js";import{Aa as x,Cb as p,Eb as l,Nb as h,Sa as R,Ta as T,oa as g,ya as y}from"./chunk-YJWNM4XO.js";import{d as $,i as b}from"./chunk-3VYOLEQE.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
@@ -0,0 +1 @@
1
+ import{D as u,I as a,L as s,j as f,t as g,w as h,z as y}from"./chunk-YX5GRXRS.js";import{i as o}from"./chunk-FCULF3JA.js";import{j as d}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function k(t,e){let r=u(t);if(await h(t.appDirectory,r))return;let{scan:n}=a(t,e);throw new o(`No app security check results for ${r} in ${t.appDirectory}.`,`Run \`${s(n)}\`.`)}async function T(t,e){await k(t,e);let r=g(t.appDirectory,u(t)),[n,i]=await Promise.all([b(r.deterministicFindingsPath,"deterministic"),b(r.agentFindingsPath,"agent")]),c=[S(n,"deterministic"),S(i,"agent")].filter(w=>w!==void 0);c.length>0&&D(c,a(t,e));let l=v(n),m=v(i);return{sources:{deterministic:l,agent:m},checks:f({deterministic:l?.document??null,agent:m?.document??null})}}async function b(t,e){return{path:t,result:await y(t,e)}}function S(t,e){if(t.result.status==="invalid")return{source:e,path:t.path,errors:t.result.errors}}function v(t){return t.result.status!=="ok"?null:{path:t.path,document:t.result.value}}function D(t,e){let r=t.length===1?"The app security check results could not be loaded because a results file is invalid.":"The app security check results could not be loaded because both results files are invalid.",n=[...t.map(i=>F(i.source,e,`${d(i.path)}.`)),["Or run",{command:s(e.clean)},"to delete both results files and start over."]];throw new o(r,null,n,t.map(R))}function F(t,e,r){return t==="deterministic"?["Run",{command:s(e.scan)},`to regenerate ${r}`]:["Have your coding agent run",{command:s(e.record)},`again to regenerate ${r}`]}function R(t){return{title:t.path,body:{list:{items:t.errors}}}}export{k as a,T as b};
@@ -1 +1 @@
1
- import{H as m,I as d,x as c}from"./chunk-PSSOCUUD.js";import{pb as w,qb as n,sb as a}from"./chunk-G5QSVBYP.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-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,5 +1,5 @@
1
- import{b as S}from"./chunk-WAZL37JY.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-DKAWQBTI.js";import{a as P}from"./chunk-34PQ6LJC.js";import{a as z}from"./chunk-4JU7N2OF.js";import{b as C}from"./chunk-2IZROVCY.js";import{D as E,W as g}from"./chunk-KYNXMDFU.js";import{B as w,G as T,y as u,z as v}from"./chunk-PSSOCUUD.js";import{k as D}from"./chunk-W3BNL2Q5.js";import{a as K}from"./chunk-CTNBSUVU.js";import{Cb as b,ba as k,ga as y,qb as l,sb as d}from"./chunk-G5QSVBYP.js";import{i as m}from"./chunk-B4OMIONW.js";import{e as _,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;u({headline:"Checking bulk operation status.",body:[{list:{items:S({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new D("No API secret keys found for app");let p=await g(t,a.apiKey,s),i=await x({adminSession:p,operationId:r,version:await I({adminSession:p,minimumDefaultVersion:A})});i?U(i):w({headline:"Bulk operation not found.",body:d`ID: ${l.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;u({headline:"Listing bulk operations.",body:[{list:{items:S({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new D("No API secret keys found for app");let s=await g(t,r.apiKey,a),i=(await $({adminSession:s,version:await I({adminSession:s,minimumDefaultVersion:A})})).map(n=>({id:L(n.id),status:G(n.status),count:H(n.objectCount),dateCreated:k(new Date(String(n.createdAt))),dateFinished:n.completedAt?k(new Date(String(n.completedAt))):"",results:W(n.url??n.partialDataUrl)}));b(),i.length===0?u({body:"No bulk operations found in the last 7 days."}):T({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),b()}function U(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:p}=e,i=N(e).value,n=V(r,a),f=d`ID: ${l.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let h=s?l.link("Download results",s):"";v({headline:i,body:d`${f}\n${h}`.value})}else if(t==="FAILED"){let h=p?l.link("Download partial results",p):"";w({headline:i,body:d`${f}\n${h}`.value})}else u({headline:i,body:f})}function V(e,o){let t=new Date;return o?`Finished ${y(new Date(String(o)),t)}`:`Started ${y(new Date(String(e)),t)}`}function G(e){return e==="COMPLETED"?m.green(e):e==="FAILED"?m.red(e):m.dim(e)}function H(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function W(e){return e?d`${l.link("download",e)}`.value:""}var F=_(K(),1);var O=class e extends P{static summary="Check the status of bulk operations.";static descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
1
+ import{b as S}from"./chunk-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.
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
 
5
- Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`;static description=this.descriptionWithoutMarkdown();static flags={...C,...z,id:F.Flags.string({description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",env:"SHOPIFY_FLAG_ID"}),store:F.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>E(o)})};async run(){let{flags:o}=await this.parse(e),{appContextResult:t,store:r}=await q(o);return o.id?await M({organization:t.organization,storeFqdn:r.shopDomain,operationId:B(o.id),remoteApp:t.remoteApp}):await R({organization:t.organization,storeFqdn:r.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};export{O as a};
5
+ Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`;static description=this.descriptionForHelp();static flags={...C,...z,id:F.Flags.string({description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",env:"SHOPIFY_FLAG_ID"}),store:F.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>E(o)})};async run(){let{flags:o}=await this.parse(e),{appContextResult:t,store:r}=await q(o);return o.id?await R({organization:t.organization,storeFqdn:r.shopDomain,operationId:B(o.id),remoteApp:t.remoteApp}):await _({organization:t.organization,storeFqdn:r.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};export{O as a};
@@ -0,0 +1 @@
1
+ import{c as u}from"./chunk-SDFO7P2M.js";import{e as l,j as m}from"./chunk-4Y22EM45.js";import{a as d}from"./chunk-YGFEUXKQ.js";import{Ha as c}from"./chunk-2KLXRVGQ.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var a=class extends Error{operationId;constructor(t){super(`Migration cancellation for ${t} returned neither an operation nor user errors`),this.name="MigrationCancellationProtocolError",this.operationId=t}};async function f({clientId:i,operationIds:t,cancelOperation:n=m}){return{outcomes:await Promise.all(t.map(async o=>{let e=await n({clientId:i,operationId:o});if(e.userErrors.length>0)return{status:"failed",operationId:o,operation:e.operation,userErrors:e.userErrors};if(!e.operation)throw new a(o);return{status:"success",operationId:o,operation:e.operation}}))}}var s=class i extends d{static summary="Cancels app subscription migration operations.";static descriptionWithMarkdown="Cancels app subscription migration operations.\n\nCanceling stops additional unprocessed shops, but does not undo shops that have already been scheduled or migrated. Use `unschedule` for reversible schedules.\n\nRepeat `--id` to cancel every operation GID returned by a multi-batch submission. Use `--json` to output the resulting operation states and per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2>","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...l};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:p}=await c({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=await f({clientId:p.apiKey,operationIds:t.id}),e=u(o,{json:t.json});return e!==0&&(process.exitCode=e),{app:n}}};export{s as a};
@@ -1 +1 @@
1
- import{b as p}from"./chunk-5N33O2RV.js";import{Aa as s,l as E,xa as b,ya as k}from"./chunk-KYNXMDFU.js";import{J as w}from"./chunk-PSSOCUUD.js";import{h as N}from"./chunk-W3BNL2Q5.js";import{Ab as V,S as _}from"./chunk-G5QSVBYP.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
1
+ import{b as p}from"./chunk-NYABB6XW.js";import{c as E,oa as b,pa as k,ra as s}from"./chunk-L5XWYTHY.js";import{J as w}from"./chunk-SKRUMRB4.js";import{i as N}from"./chunk-FCULF3JA.js";import{Nb as V,W as _}from"./chunk-YJWNM4XO.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-6RBCFXJT.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
@@ -0,0 +1 @@
1
+ import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.9.0";export{o as a};
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-2IZROVCY.js";import{b as u}from"./chunk-UBTHWHPB.js";import{s as f}from"./chunk-KYNXMDFU.js";import{h as n}from"./chunk-W3BNL2Q5.js";import{a as g}from"./chunk-CTNBSUVU.js";import{wb as m}from"./chunk-G5QSVBYP.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-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
2
2
  shopify doc search --query "subscribe to webhooks"
3
3
 
4
4
  # narrow the search to a specific API and version
@@ -1,7 +1,7 @@
1
- import{a as Q,b as X,c as H}from"./chunk-WAZL37JY.js";import{a as L,c as M,e as f,f as P,h as T,i as q,m as V,p as U,q as F,r as j,s as z,u as _}from"./chunk-DKAWQBTI.js";import{a as W}from"./chunk-34PQ6LJC.js";import{a as G,b as J}from"./chunk-4JU7N2OF.js";import{b as N}from"./chunk-2IZROVCY.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-PSSOCUUD.js";import{h as m,k as R}from"./chunk-W3BNL2Q5.js";import{Ta as I,ma as C,qb as r,sb as s,ua as S,wb as x}from"./chunk-G5QSVBYP.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
2
- `);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:d,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:p,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await P({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(d,b);ae(o,B),H(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:X({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:p,query:o,variablesJsonl:B,version:k}):await T({adminSession:p,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await F(p,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await U(p,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let d=await j(t.url),b=z(d);e?await S(e,d):x(d),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
3
- `,{command:`shopify app bulk status --id=${M(t)}`}]}var A=class t extends W{static summary="Execute bulk operations.";static descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
1
+ import{a as Q,b as W,c as X}from"./chunk-HSZC2LBB.js";import{a as L,c as P,e as f,f as M,h as T,i as q,m as V,p as F,q as U,r as j,s as z,u as H}from"./chunk-3AASYIOA.js";import{a as _}from"./chunk-YGFEUXKQ.js";import{a as G,b as J}from"./chunk-JTPVSO6Y.js";import{b as N}from"./chunk-DGMRL5DQ.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-SKRUMRB4.js";import{i as m,l as R}from"./chunk-FCULF3JA.js";import{Cb as r,Eb as s,Ib as x,Xa as I,qa as C,ya as S}from"./chunk-YJWNM4XO.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
2
+ `);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:p,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:d,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await M({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(p,b);ae(o,B),X(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:W({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:d,query:o,variablesJsonl:B,version:k}):await T({adminSession:d,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await U(d,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await F(d,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let p=await j(t.url),b=z(p);e?await S(e,p):x(p),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
3
+ `,{command:`shopify app bulk status --id=${P(t)}`}]}var A=class t extends _{static summary="Execute bulk operations.";static descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
4
4
 
5
5
  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).
6
6
 
7
- Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;static description=this.descriptionWithoutMarkdown();static flags={...N,...G,...J};async run(){let{flags:e}=await this.parse(t),{query:i,appContextResult:n,store:o}=await _(e);return await Y({organization:n.organization,remoteApp:n.remoteApp,store:o,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};export{A as a};
7
+ Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;static description=this.descriptionForHelp();static flags={...N,...G,...J};async run(){let{flags:e}=await this.parse(t),{query:i,appContextResult:n,store:o}=await H(e);return await Y({organization:n.organization,remoteApp:n.remoteApp,store:o,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};export{A as a};
@@ -1 +1 @@
1
- import{A as s,y as d,z as a}from"./chunk-PSSOCUUD.js";import{wb as r}from"./chunk-G5QSVBYP.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-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 +1 @@
1
- import{h as l}from"./chunk-TUWRPDTE.js";import{T as c}from"./chunk-KYNXMDFU.js";import{h as u}from"./chunk-W3BNL2Q5.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function x(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function b(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,x as b,p as c,b as d,a as e};
1
+ import{h as l}from"./chunk-R757TSQ6.js";import{K as c}from"./chunk-L5XWYTHY.js";import{i as u}from"./chunk-FCULF3JA.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function x(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function b(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,x as b,p as c,b as d,a as e};
@@ -0,0 +1 @@
1
+ import{b as u}from"./chunk-5XO6PAMV.js";import{b as r,c as I,e as p}from"./chunk-WNO2V53C.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-ZLV5W4TV.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-5FQ3L5PA.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=o(t[r.unitTest]):o(t[r.unitTest])}function G(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
@@ -0,0 +1,3 @@
1
+ import{a as N}from"./chunk-YGFEUXKQ.js";import{a as b}from"./chunk-JTPVSO6Y.js";import{A as S,E as A,G as C,H as x,Ha as V}from"./chunk-2KLXRVGQ.js";import{a as f}from"./chunk-6RBCFXJT.js";import{b as j,c as E}from"./chunk-DGMRL5DQ.js";import{B as u,z as v}from"./chunk-SKRUMRB4.js";import{i as g,k as n}from"./chunk-FCULF3JA.js";import{Ib as l,Qb as w,Tb as h}from"./chunk-YJWNM4XO.js";import{j as m}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();async function P(s,t){let e=new Set(t.map(r=>r.file)).size;await f.addPublicMetadata(()=>({cmd_app_validate_valid:s,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:e}))}async function F(s,t={json:!1}){let e=s.errors;if(!e||e.isEmpty()){if(await P(!0,[]),t.json){l(JSON.stringify({valid:!0,issues:[]},null,2));return}v({headline:`App configuration '${m(s.configPath)}' is valid.`});return}let r=e.getErrors();if(await P(!1,r),t.json){let d=r.map(({file:c,message:a,path:i,code:o})=>({file:c,message:a,path:i,code:o}));throw l(JSON.stringify({valid:!1,issues:d},null,2)),new n}throw u({headline:"Validation errors found.",body:r.map(d=>`\u2022 ${x(d)}`).join(`
2
+ `)}),new n}async function _(s,t){await f.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:s,cmd_app_validate_file_count:t}))}var y=class s extends N{static summary="Validate your app configuration and extensions.";static descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";static description=this.descriptionForHelp();static flags={...j,...b,...E};async run(){let{flags:t}=await this.parse(s);await f.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let e;try{e=await S.load(t.path)}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let r;try{r=await C(e,t.config,{clientId:t["client-id"],skipPrompts:!!t["client-id"]})}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let d=A(e,r.file);if(d.length>0){let a=d.map(o=>({file:o.path,message:o.message})),i=new Set(d.map(o=>o.path)).size;throw await _(a.length,i),t.json?(l(JSON.stringify({valid:!1,issues:a},null,2)),new n):(u({headline:"Validation errors found.",body:a.map(o=>`\u2022 ${o.message}`).join(`
3
+ `)}),new n)}let c;try{c=(await V({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config??(t["client-id"]?m(r.file.path):void 0),unsafeTolerateErrors:!0})).app}catch(a){let i=a instanceof g?h(w(a.message)).trim():"";throw i.startsWith("Validation errors in ")&&t.json?(await _(1,1),l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n):a}return await F(c,{json:t.json}),{app:c}}};export{y as a};