@shopify/cli 4.1.0 → 4.3.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 (459) hide show
  1. package/dist/{acorn-LOOAJL3S.js → acorn-7M27BPGP.js} +1 -1
  2. package/dist/analytics-JH64XI2J.js +1 -0
  3. package/dist/analytics-MEGKKFGF.js +1 -0
  4. package/dist/angular-DW5TQVCM.js +4 -0
  5. package/dist/{babel-URCL33XX.js → babel-I2RLWM7N.js} +1 -1
  6. package/dist/bootstrap.js +1 -1
  7. package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
  8. package/dist/chunk-25HJX3L2.js +5 -0
  9. package/dist/chunk-2EHBJWC6.js +26 -0
  10. package/dist/chunk-2GAFKG64.js +4 -0
  11. package/dist/chunk-2GU7OY3H.js +1 -0
  12. package/dist/{chunk-4IC626OL.js → chunk-2K7FGAT6.js} +1 -1
  13. package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
  14. package/dist/{chunk-NMBBTTIH.js → chunk-2RBIR3NM.js} +1 -1
  15. package/dist/chunk-2TMQG2UT.js +1 -0
  16. package/dist/chunk-2XZBQZ5R.js +7 -0
  17. package/dist/{chunk-Q4T2T2QE.js → chunk-33OHQUHZ.js} +1 -1
  18. package/dist/chunk-3AOQKI4B.js +1 -0
  19. package/dist/{chunk-OBEWZXOQ.js → chunk-3SPDFV5D.js} +1 -1
  20. package/dist/chunk-3YDYZ232.js +103 -0
  21. package/dist/chunk-4FFPTEKD.js +1 -0
  22. package/dist/chunk-4J32OHLY.js +1382 -0
  23. package/dist/chunk-4QTEPWEJ.js +283 -0
  24. package/dist/chunk-57PPQKJT.js +15 -0
  25. package/dist/{chunk-AGNMOFJS.js → chunk-5BKCIDMS.js} +1 -1
  26. package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
  27. package/dist/chunk-5FFHQTRC.js +4 -0
  28. package/dist/{chunk-2GK56X53.js → chunk-5FVB7JHP.js} +1 -1
  29. package/dist/{chunk-UYXEA3Y6.js → chunk-5H3VTG77.js} +1 -1
  30. package/dist/chunk-5O43334U.js +2 -0
  31. package/dist/chunk-5XDQ76DQ.js +1 -0
  32. package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
  33. package/dist/chunk-6JKGUQRD.js +1 -0
  34. package/dist/chunk-6KETAPWL.js +1 -0
  35. package/dist/{chunk-ULFWK45W.js → chunk-6LWOWDF4.js} +2 -2
  36. package/dist/chunk-7572RLUP.js +1 -0
  37. package/dist/chunk-762JWOWJ.js +5 -0
  38. package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
  39. package/dist/{chunk-76R52ODR.js → chunk-7D45IAMQ.js} +1 -1
  40. package/dist/chunk-7FQFEB33.js +370 -0
  41. package/dist/chunk-7LV55VWE.js +1 -0
  42. package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
  43. package/dist/chunk-A27NZMWB.js +1 -0
  44. package/dist/chunk-A4SBXDZB.js +14 -0
  45. package/dist/{chunk-4DCQNGUV.js → chunk-A5HKAMAC.js} +10 -10
  46. package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
  47. package/dist/chunk-AERKD4TO.js +3 -0
  48. package/dist/{chunk-L2MGAEV3.js → chunk-ANBOLDON.js} +2 -2
  49. package/dist/{chunk-UJVH7FZS.js → chunk-AO3RFGNV.js} +1 -1
  50. package/dist/{chunk-KHSYW7I4.js → chunk-ATSMK66C.js} +1 -1
  51. package/dist/chunk-AU5EZQW7.js +5 -0
  52. package/dist/chunk-AVD3INWF.js +1 -0
  53. package/dist/chunk-AWEB5AQM.js +1 -0
  54. package/dist/chunk-AXNAGI32.js +1 -0
  55. package/dist/chunk-BL46CZ2M.js +2 -0
  56. package/dist/chunk-BQWK3C47.js +278 -0
  57. package/dist/chunk-CEHXOWA6.js +3 -0
  58. package/dist/{chunk-EKXY5COY.js → chunk-CFOXXOO2.js} +1 -1
  59. package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
  60. package/dist/chunk-CV5EQGES.js +22 -0
  61. package/dist/chunk-CX5CC6P5.js +1 -0
  62. package/dist/chunk-DCLUZFT7.js +2 -0
  63. package/dist/{chunk-Q33IBIVJ.js → chunk-DNXYKGV2.js} +1 -1
  64. package/dist/chunk-DTIWUT2T.js +18 -0
  65. package/dist/{chunk-VICYNG2W.js → chunk-DYNH5SKT.js} +1 -1
  66. package/dist/chunk-DZQYG32N.js +2 -0
  67. package/dist/{chunk-FQWB2F75.js → chunk-E7DHELFH.js} +1 -1
  68. package/dist/chunk-EH7ZTFS4.js +613 -0
  69. package/dist/{chunk-P6XE4MH5.js → chunk-EJDWYASP.js} +1 -1
  70. package/dist/chunk-EKVTNWHM.js +1 -0
  71. package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
  72. package/dist/chunk-EVZA2TCI.js +3 -0
  73. package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
  74. package/dist/chunk-FIYAECXH.js +28 -0
  75. package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
  76. package/dist/chunk-FOFJBRSL.js +11 -0
  77. package/dist/chunk-FQ5ZZX2G.js +25 -0
  78. package/dist/chunk-G2LVUM7N.js +6 -0
  79. package/dist/chunk-G2OHWAY2.js +7 -0
  80. package/dist/chunk-G3JJLXPH.js +1 -0
  81. package/dist/chunk-G3RWLAOG.js +1 -0
  82. package/dist/chunk-G4OQABDT.js +836 -0
  83. package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
  84. package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
  85. package/dist/chunk-GDHD3TGC.js +6 -0
  86. package/dist/{chunk-JXW374CL.js → chunk-GJXINXSU.js} +11 -11
  87. package/dist/chunk-GWHV62YT.js +1 -0
  88. package/dist/chunk-HCTZN7L4.js +2 -0
  89. package/dist/{chunk-ZSBA6VIC.js → chunk-HDC5V7RY.js} +1 -1
  90. package/dist/{chunk-7NH7CHVI.js → chunk-HIQHYPLU.js} +1 -1
  91. package/dist/{chunk-XOTA6JTZ.js → chunk-HOSFU6UP.js} +3 -3
  92. package/dist/chunk-I22ZTRKK.js +3 -0
  93. package/dist/chunk-I4R7TML2.js +7 -0
  94. package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
  95. package/dist/chunk-IWOTLFOY.js +32 -0
  96. package/dist/{chunk-7UYZQN4V.js → chunk-J3H4LPN6.js} +3 -3
  97. package/dist/{chunk-XULPJ6UG.js → chunk-J3HX6ZGD.js} +1 -1
  98. package/dist/chunk-J3JPJCWP.js +1 -0
  99. package/dist/chunk-J5BRKYGE.js +294 -0
  100. package/dist/chunk-JAWKLBOB.js +3 -0
  101. package/dist/{chunk-MCVRONUY.js → chunk-JAWOP4HJ.js} +1 -1
  102. package/dist/{chunk-ZGK3LGCH.js → chunk-JCIN73BE.js} +1 -1
  103. package/dist/chunk-JEZ3PGVC.js +1 -0
  104. package/dist/{chunk-C7BTJ32Z.js → chunk-JJ6RM54S.js} +1 -1
  105. package/dist/chunk-JK3NIHTX.js +17 -0
  106. package/dist/chunk-JLE4NBMT.js +1 -0
  107. package/dist/chunk-JSOGPMWB.js +5 -0
  108. package/dist/chunk-JUYJZUYU.js +1 -0
  109. package/dist/chunk-KRQGLK2Q.js +3 -0
  110. package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
  111. package/dist/{chunk-BS3BKORT.js → chunk-L2PC4MUV.js} +1 -1
  112. package/dist/chunk-LCZDC6EE.js +5 -0
  113. package/dist/chunk-LXVORHCQ.js +1 -0
  114. package/dist/chunk-M2YINBHF.js +32 -0
  115. package/dist/chunk-M7YFD4EV.js +10 -0
  116. package/dist/chunk-MEIEEENL.js +1 -0
  117. package/dist/chunk-MIDYZPO4.js +1 -0
  118. package/dist/chunk-MINZGZ4N.js +1 -0
  119. package/dist/chunk-MMIHHCMW.js +5 -0
  120. package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
  121. package/dist/chunk-MRS6LAY7.js +1 -0
  122. package/dist/chunk-N3CNWCC2.js +19 -0
  123. package/dist/{chunk-M2D7USAX.js → chunk-N3NE4MVN.js} +1 -1
  124. package/dist/chunk-N3YTDGFY.js +4 -0
  125. package/dist/{chunk-MHWV5RQV.js → chunk-N5LVGFDS.js} +2 -2
  126. package/dist/{chunk-QBSKKQBN.js → chunk-NILXAUUT.js} +1 -1
  127. package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
  128. package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
  129. package/dist/{chunk-6G6TMKXF.js → chunk-NTRAWIEJ.js} +21 -21
  130. package/dist/chunk-NWXDOCL5.js +1 -0
  131. package/dist/{chunk-2AJ5FI2K.js → chunk-OU3M32A2.js} +1 -1
  132. package/dist/chunk-OU4SKQTC.js +5 -0
  133. package/dist/chunk-OXJBYKMX.js +1 -0
  134. package/dist/chunk-OZBY45KT.js +1 -0
  135. package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
  136. package/dist/chunk-PCCK4YTE.js +1 -0
  137. package/dist/{chunk-6RE2SNCU.js → chunk-PFGYC53K.js} +1 -1
  138. package/dist/chunk-PMS4MNHB.js +6 -0
  139. package/dist/chunk-PNP5OKNZ.js +1 -0
  140. package/dist/{chunk-KN3WTTHZ.js → chunk-PXHY753L.js} +1 -1
  141. package/dist/chunk-Q73GEVSJ.js +11 -0
  142. package/dist/{chunk-5WVAHE5E.js → chunk-Q77MM2N2.js} +1 -1
  143. package/dist/chunk-Q7C44DX5.js +4 -0
  144. package/dist/chunk-QDVJJKLB.js +1 -0
  145. package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
  146. package/dist/{chunk-E3EMHAJB.js → chunk-RKDZGK5K.js} +1 -1
  147. package/dist/{chunk-TYZXGSHO.js → chunk-RSRYC5ZF.js} +1 -1
  148. package/dist/chunk-S22NCNAJ.js +1 -0
  149. package/dist/chunk-S5IFJ737.js +3 -0
  150. package/dist/chunk-S6B2ADVR.js +8 -0
  151. package/dist/chunk-S7F5KFQP.js +1 -0
  152. package/dist/chunk-SSCYLDSX.js +3 -0
  153. package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
  154. package/dist/chunk-T3ERXB7F.js +8 -0
  155. package/dist/chunk-T4IV643Z.js +9 -0
  156. package/dist/chunk-T4NS63K4.js +16 -0
  157. package/dist/chunk-T6CC5WUU.js +159 -0
  158. package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
  159. package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
  160. package/dist/{chunk-DRFGABEB.js → chunk-TP7E54WN.js} +1 -1
  161. package/dist/chunk-TPCG6DCA.js +1 -0
  162. package/dist/{chunk-SXTMSGUE.js → chunk-TRYWVIVJ.js} +1 -1
  163. package/dist/chunk-TU47HMTL.js +1 -0
  164. package/dist/chunk-TUNUEOHO.js +3 -0
  165. package/dist/{chunk-MWY3A7O3.js → chunk-TY6BZTG3.js} +1 -1
  166. package/dist/chunk-TYMYIUIQ.js +1 -0
  167. package/dist/chunk-UB26DGTR.js +6 -0
  168. package/dist/chunk-UC7KMA6W.js +8 -0
  169. package/dist/chunk-UOHNRH6E.js +7 -0
  170. package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
  171. package/dist/chunk-USLYL5AC.js +1 -0
  172. package/dist/chunk-UTO4Z6P6.js +567 -0
  173. package/dist/{chunk-M2ZHFKPN.js → chunk-UU5P2IYU.js} +1 -1
  174. package/dist/chunk-UYSF234H.js +1 -0
  175. package/dist/chunk-VE35YELD.js +1 -0
  176. package/dist/{chunk-WSDN25F5.js → chunk-VI34CKV6.js} +1 -1
  177. package/dist/chunk-VJ6KDRZI.js +1 -0
  178. package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
  179. package/dist/chunk-VKWPEFWQ.js +1 -0
  180. package/dist/chunk-VPPWSKOY.js +1 -0
  181. package/dist/chunk-VRJTLVG3.js +1 -0
  182. package/dist/chunk-VUMUCNI7.js +1 -0
  183. package/dist/chunk-W7DDV2EY.js +1 -0
  184. package/dist/chunk-WA3YC5W4.js +15 -0
  185. package/dist/chunk-WHNWE7P2.js +1 -0
  186. package/dist/chunk-WVRGCNBZ.js +1 -0
  187. package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
  188. package/dist/{chunk-HZA6IAA4.js → chunk-XVUHUA36.js} +1 -1
  189. package/dist/{chunk-OLZHWPZP.js → chunk-XWPPBOGF.js} +1 -1
  190. package/dist/chunk-YIRFEW5M.js +1 -0
  191. package/dist/{chunk-KR6QDE7D.js → chunk-YL3TYQGT.js} +1 -1
  192. package/dist/{chunk-7MUKLZOL.js → chunk-YLQ3LNNY.js} +3 -3
  193. package/dist/chunk-YMAWEIUR.js +1 -0
  194. package/dist/chunk-YPBCSDFQ.js +1 -0
  195. package/dist/{chunk-KZOBF55B.js → chunk-YSIBRY6C.js} +1 -1
  196. package/dist/{chunk-KHTV6PBV.js → chunk-YVQXEPHY.js} +1 -1
  197. package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
  198. package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
  199. package/dist/chunk-ZGJ3DFTQ.js +9 -0
  200. package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
  201. package/dist/chunk-ZM75DSIW.js +1 -0
  202. package/dist/{chunk-URZPVSJZ.js → chunk-ZUKLGZOU.js} +66 -66
  203. package/dist/cli/commands/app/app-logs/sources.js +1 -2
  204. package/dist/cli/commands/app/build.js +1 -1
  205. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  206. package/dist/cli/commands/app/bulk/execute.js +1 -9
  207. package/dist/cli/commands/app/bulk/status.js +1 -5
  208. package/dist/cli/commands/app/config/link.js +1 -4
  209. package/dist/cli/commands/app/config/pull.js +1 -1
  210. package/dist/cli/commands/app/config/use.js +1 -1
  211. package/dist/cli/commands/app/config/validate.js +1 -3
  212. package/dist/cli/commands/app/demo/watcher.js +1 -1
  213. package/dist/cli/commands/app/deploy.js +1 -22
  214. package/dist/cli/commands/app/dev/clean.js +1 -5
  215. package/dist/cli/commands/app/dev.js +1 -320
  216. package/dist/cli/commands/app/env/pull.js +1 -11
  217. package/dist/cli/commands/app/env/show.js +1 -1
  218. package/dist/cli/commands/app/execute.js +1 -1
  219. package/dist/cli/commands/app/function/build.js +1 -1
  220. package/dist/cli/commands/app/function/info.js +1 -16
  221. package/dist/cli/commands/app/function/replay.js +1 -5
  222. package/dist/cli/commands/app/function/run.js +1 -1
  223. package/dist/cli/commands/app/function/schema.js +1 -1
  224. package/dist/cli/commands/app/function/typegen.js +1 -1
  225. package/dist/cli/commands/app/generate/extension.js +1 -5
  226. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
  227. package/dist/cli/commands/app/import-extensions.js +1 -1
  228. package/dist/cli/commands/app/info.js +1 -11
  229. package/dist/cli/commands/app/init.js +1 -10
  230. package/dist/cli/commands/app/logs.js +1 -2
  231. package/dist/cli/commands/app/release.js +1 -4
  232. package/dist/cli/commands/app/versions/list.js +1 -1
  233. package/dist/cli/commands/app/webhook/trigger.js +1 -25
  234. package/dist/cli/commands/auth/login.js +1 -1
  235. package/dist/cli/commands/auth/logout.js +1 -1
  236. package/dist/cli/commands/cache/clear.js +1 -1
  237. package/dist/cli/commands/config/autoupgrade/constants.js +1 -1
  238. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  239. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  240. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  241. package/dist/cli/commands/debug/command-flags.js +1 -1
  242. package/dist/cli/commands/doc/fetch.d.ts +12 -0
  243. package/dist/cli/commands/doc/fetch.js +1 -0
  244. package/dist/cli/commands/doc/search.d.ts +13 -0
  245. package/dist/cli/commands/doc/search.js +1 -0
  246. package/dist/cli/commands/docs/generate.js +1 -1
  247. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  248. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  249. package/dist/cli/commands/help.js +1 -1
  250. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  251. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  252. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  253. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  254. package/dist/cli/commands/notifications/generate.js +1 -1
  255. package/dist/cli/commands/notifications/list.js +1 -1
  256. package/dist/cli/commands/organization/list.js +1 -1
  257. package/dist/cli/commands/search.d.ts +4 -0
  258. package/dist/cli/commands/search.js +1 -1
  259. package/dist/cli/commands/theme/check.js +1 -1
  260. package/dist/cli/commands/theme/console.js +1 -15
  261. package/dist/cli/commands/theme/delete.js +1 -7
  262. package/dist/cli/commands/theme/dev.js +1 -26
  263. package/dist/cli/commands/theme/duplicate.js +1 -32
  264. package/dist/cli/commands/theme/info.js +1 -1
  265. package/dist/cli/commands/theme/init.js +1 -8
  266. package/dist/cli/commands/theme/language-server.js +1 -1
  267. package/dist/cli/commands/theme/list.js +1 -1
  268. package/dist/cli/commands/theme/metafields/pull.js +1 -3
  269. package/dist/cli/commands/theme/open.js +1 -8
  270. package/dist/cli/commands/theme/package.js +1 -7
  271. package/dist/cli/commands/theme/preview.js +1 -1
  272. package/dist/cli/commands/theme/profile.js +1 -3
  273. package/dist/cli/commands/theme/publish.js +1 -7
  274. package/dist/cli/commands/theme/pull.js +1 -3
  275. package/dist/cli/commands/theme/push.js +1 -28
  276. package/dist/cli/commands/theme/rename.js +1 -6
  277. package/dist/cli/commands/theme/share.js +1 -3
  278. package/dist/cli/commands/upgrade.js +1 -1
  279. package/dist/cli/commands/version.js +1 -1
  280. package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
  281. package/dist/cli/services/commands/doc/fetch.js +45 -0
  282. package/dist/cli/services/commands/doc/search.d.ts +1 -0
  283. package/dist/cli/services/commands/doc/search.js +47 -0
  284. package/dist/command-registry.js +1 -1
  285. package/dist/conf-store-UY3MDGGA.js +1 -0
  286. package/dist/configs/all.yml +3 -0
  287. package/dist/configs/recommended.yml +3 -0
  288. package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-3AICQCNU.js} +1 -1
  289. package/dist/data/filters.json +60 -0
  290. package/dist/data/latest.json +1 -1
  291. package/dist/data/setting.json +29 -9
  292. package/dist/data/shopify_system_translations.json +71 -19
  293. package/dist/data/tags.json +3 -3
  294. package/dist/deprecations-KNUMDRIU.js +1 -0
  295. package/dist/{devtools-OLOT2NY4.js → devtools-37DE4MUR.js} +1 -1
  296. package/dist/{devtools-UFRKBFGI.js → devtools-WAWU5KQL.js} +1 -1
  297. package/dist/dist-C5IV2YDQ.js +1 -0
  298. package/dist/dist-VL4KZWV2.js +1 -0
  299. package/dist/environments-YPRVO2CF.js +1 -0
  300. package/dist/error-XRBQTNFM.js +1 -0
  301. package/dist/error-handler-NI7D6GSY.js +1 -0
  302. package/dist/{estree-KI7NUW53.js → estree-JV5M77BA.js} +2 -2
  303. package/dist/{flow-MLHT7MTJ.js → flow-N4JYPYMQ.js} +1 -1
  304. package/dist/fs-LJWVNO4H.js +1 -0
  305. package/dist/{glimmer-HAJ4HQCW.js → glimmer-JEV3BXHR.js} +1 -1
  306. package/dist/{graphql-F7IHGXDT.js → graphql-DTF6MHYF.js} +1 -1
  307. package/dist/hooks/app-init.js +1 -1
  308. package/dist/hooks/did-you-mean.js +1 -1
  309. package/dist/hooks/hydrogen-init.js +1 -1
  310. package/dist/hooks/plugin-plugins.js +1 -1
  311. package/dist/hooks/postrun.js +1 -1
  312. package/dist/hooks/prerun.js +1 -1
  313. package/dist/hooks/public-metadata.js +1 -1
  314. package/dist/hooks/sensitive-metadata.js +1 -1
  315. package/dist/hooks/tunnel-provider.js +1 -1
  316. package/dist/hooks/tunnel-start.js +1 -1
  317. package/dist/html-LVOJ3RQS.js +25 -0
  318. package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
  319. package/dist/index.js +23 -1175
  320. package/dist/is-global-W6ALVC5L.js +1 -0
  321. package/dist/is-wsl-UEMXYJPN.js +1 -0
  322. package/dist/{latest-version-EFWBOTWM.js → latest-version-32HXMWJ7.js} +1 -1
  323. package/dist/lib-AIKYSHWL.js +1 -0
  324. package/dist/lib-O5EZ4NVT.js +1 -0
  325. package/dist/lib-Q4PWEMFD.js +1 -0
  326. package/dist/lib-QJDPPAWN.js +1 -0
  327. package/dist/{local-MTKXSZ3I.js → local-GKEWZAIV.js} +1 -1
  328. package/dist/local-storage-ZOZMA22B.js +1 -0
  329. package/dist/{markdown-PLKL4IZK.js → markdown-J6CE6POI.js} +2 -2
  330. package/dist/{meriyah-AYZQ3BGY.js → meriyah-PNQQZQYI.js} +1 -1
  331. package/dist/metadata-UEUN64TK.js +1 -0
  332. package/dist/{morph-EMYAITFM.js → morph-CGOZEPPZ.js} +4 -4
  333. package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
  334. package/dist/node-package-manager-4ASQQIIF.js +1 -0
  335. package/dist/notifications-system-HLXJCAMG.js +1 -0
  336. package/dist/{npa-ICFSA3NL.js → npa-A4YSCQ5Q.js} +1 -1
  337. package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
  338. package/dist/out-CDCY25QC.js +1 -0
  339. package/dist/output-S6E37GJQ.js +1 -0
  340. package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
  341. package/dist/{postcss-3FJQPJI2.js → postcss-Q36SHOML.js} +2 -2
  342. package/dist/{prettier-NVRHEAFO.js → prettier-EGVCP5CY.js} +1 -1
  343. package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
  344. package/dist/system-YQZNGSWB.js +1 -0
  345. package/dist/tsconfig.tsbuildinfo +1 -1
  346. package/dist/typescript-5R4Y7PXE.js +1 -0
  347. package/dist/{typescript-ODJ335NU.js → typescript-WYPDGPSV.js} +1 -1
  348. package/dist/ui-D2FFWRK7.js +1 -0
  349. package/dist/upgrade-TVTCFMXM.js +1 -0
  350. package/dist/version-J6MDN7BZ.js +1 -0
  351. package/dist/version-RIRW5EXQ.js +1 -0
  352. package/dist/workerd-QOTT6UCO.js +18 -0
  353. package/dist/{yaml-BIHS2GQW.js → yaml-6KWCJ64X.js} +1 -1
  354. package/oclif.manifest.json +442 -9
  355. package/package.json +18 -12
  356. package/dist/analytics-5TEIW43T.js +0 -1
  357. package/dist/analytics-GG7CYCGL.js +0 -1
  358. package/dist/angular-VRDO2DBE.js +0 -4
  359. package/dist/chunk-3D4JXJPS.js +0 -2
  360. package/dist/chunk-3NBK56IK.js +0 -1
  361. package/dist/chunk-4ZGSSQC6.js +0 -1
  362. package/dist/chunk-54CAKCYR.js +0 -144
  363. package/dist/chunk-5UHQVR2Z.js +0 -1
  364. package/dist/chunk-67MH4AXG.js +0 -1
  365. package/dist/chunk-6CYMJ76C.js +0 -9
  366. package/dist/chunk-6HBRBQAN.js +0 -6
  367. package/dist/chunk-6ITDI2SD.js +0 -1
  368. package/dist/chunk-6SF3ZETE.js +0 -1
  369. package/dist/chunk-6WL4GA2M.js +0 -15
  370. package/dist/chunk-7ESSIN27.js +0 -567
  371. package/dist/chunk-7QIOUDCX.js +0 -8
  372. package/dist/chunk-7ZT57XT7.js +0 -2
  373. package/dist/chunk-AKML26N3.js +0 -7
  374. package/dist/chunk-C2IK2HY3.js +0 -4
  375. package/dist/chunk-CBXSPL4W.js +0 -1
  376. package/dist/chunk-CEIQFLCN.js +0 -1
  377. package/dist/chunk-CERXUPGC.js +0 -14
  378. package/dist/chunk-DCPBRWVC.js +0 -1
  379. package/dist/chunk-DN2IE3VY.js +0 -1
  380. package/dist/chunk-EQU4MUQJ.js +0 -1
  381. package/dist/chunk-F2QU6WWX.js +0 -1
  382. package/dist/chunk-FFQ5EWII.js +0 -294
  383. package/dist/chunk-FKMC5OFF.js +0 -1
  384. package/dist/chunk-FUOIGXI4.js +0 -1
  385. package/dist/chunk-FYFNUDOC.js +0 -19
  386. package/dist/chunk-G4BPGWJC.js +0 -1
  387. package/dist/chunk-GVQIPEZT.js +0 -1
  388. package/dist/chunk-GZS44BUW.js +0 -102
  389. package/dist/chunk-HIBX234C.js +0 -6
  390. package/dist/chunk-HRUGYZZ4.js +0 -2
  391. package/dist/chunk-HUIJMGVJ.js +0 -586
  392. package/dist/chunk-IX5ICOBV.js +0 -7
  393. package/dist/chunk-IZ3C5J7G.js +0 -5
  394. package/dist/chunk-JAO53IH2.js +0 -1
  395. package/dist/chunk-JCL2RRU6.js +0 -1
  396. package/dist/chunk-JQJBBXMX.js +0 -17
  397. package/dist/chunk-K2WUCOQJ.js +0 -32
  398. package/dist/chunk-K6CTUBFC.js +0 -12
  399. package/dist/chunk-KKTW6ZCA.js +0 -5
  400. package/dist/chunk-LDGAHMS7.js +0 -159
  401. package/dist/chunk-M3RYUB22.js +0 -1
  402. package/dist/chunk-M56NDIMD.js +0 -1
  403. package/dist/chunk-MWGBTOO3.js +0 -1
  404. package/dist/chunk-N5PQPIBF.js +0 -374
  405. package/dist/chunk-NF2ABOOU.js +0 -1
  406. package/dist/chunk-NPEVESCV.js +0 -3
  407. package/dist/chunk-OTY24J2W.js +0 -1
  408. package/dist/chunk-OY3PNHPZ.js +0 -103
  409. package/dist/chunk-PAP22IQO.js +0 -264
  410. package/dist/chunk-PYVAWAUO.js +0 -5
  411. package/dist/chunk-QA23HIH4.js +0 -1
  412. package/dist/chunk-S6EJHWJL.js +0 -1
  413. package/dist/chunk-SIMFNECG.js +0 -1
  414. package/dist/chunk-T542UQBY.js +0 -1
  415. package/dist/chunk-TQ6HYDVC.js +0 -1
  416. package/dist/chunk-UHJYPEY2.js +0 -1
  417. package/dist/chunk-UJXUSRQK.js +0 -1
  418. package/dist/chunk-UWJ73J4B.js +0 -1
  419. package/dist/chunk-UXVZ2P63.js +0 -1411
  420. package/dist/chunk-VPRTJUIN.js +0 -1
  421. package/dist/chunk-WFXRSKRK.js +0 -1
  422. package/dist/chunk-XEFQQPL4.js +0 -1
  423. package/dist/chunk-XITQULK4.js +0 -3
  424. package/dist/chunk-XONFGLJQ.js +0 -847
  425. package/dist/chunk-XR6GMMEU.js +0 -1
  426. package/dist/chunk-XXVEHDVO.js +0 -1
  427. package/dist/chunk-Y7JGYGV7.js +0 -1
  428. package/dist/chunk-YOZNRLFC.js +0 -1
  429. package/dist/chunk-YTNDFQJT.js +0 -3
  430. package/dist/chunk-ZBRRJDGW.js +0 -1
  431. package/dist/chunk-ZTMSBSYD.js +0 -1
  432. package/dist/conf-store-BMZFATRQ.js +0 -1
  433. package/dist/deprecations-7LHRXPXU.js +0 -1
  434. package/dist/dist-LDXPBYSZ.js +0 -1
  435. package/dist/dist-V63ILV6L.js +0 -1
  436. package/dist/environments-5X7S2O5U.js +0 -1
  437. package/dist/error-ZRLNNGIQ.js +0 -1
  438. package/dist/error-handler-PRZFHPRG.js +0 -1
  439. package/dist/fs-H7V6IRSH.js +0 -1
  440. package/dist/html-VSSXOZOQ.js +0 -25
  441. package/dist/is-global-IOWPCT2U.js +0 -1
  442. package/dist/is-wsl-FVUIXDOK.js +0 -1
  443. package/dist/lib-5L7UKDEK.js +0 -1
  444. package/dist/lib-C3VO2BQW.js +0 -1
  445. package/dist/lib-QB6I6CTC.js +0 -1
  446. package/dist/lib-WU3FEA6I.js +0 -1
  447. package/dist/local-storage-CYEL4MXF.js +0 -1
  448. package/dist/metadata-NOVBMKLM.js +0 -1
  449. package/dist/node-package-manager-N5CVNHA3.js +0 -1
  450. package/dist/notifications-system-YX2GPLDW.js +0 -1
  451. package/dist/out-WLY6KV4B.js +0 -1
  452. package/dist/output-Q46DT46U.js +0 -1
  453. package/dist/system-E6Q3OBX3.js +0 -1
  454. package/dist/typescript-K5CWIA4V.js +0 -1
  455. package/dist/ui-WRS2IDPP.js +0 -1
  456. package/dist/upgrade-TKUN2M5P.js +0 -1
  457. package/dist/version-5W5RVAPA.js +0 -1
  458. package/dist/version-BQJ3FPXD.js +0 -1
  459. package/dist/workerd-GOK6GWEX.js +0 -18
@@ -0,0 +1,15 @@
1
+ import{a as O}from"./chunk-YMAWEIUR.js";import{F as P,J as k,c as _}from"./chunk-DTIWUT2T.js";import{a as I}from"./chunk-TRYWVIVJ.js";import{b as S,m as b}from"./chunk-5XDQ76DQ.js";import{e as g,f as T,g as L,k as R,q}from"./chunk-TUNUEOHO.js";import{xa as x}from"./chunk-G4OQABDT.js";import{a as v}from"./chunk-VPPWSKOY.js";import{b as E}from"./chunk-OXJBYKMX.js";import{d as u}from"./chunk-TPCG6DCA.js";import{r as G}from"./chunk-T6CC5WUU.js";import{Fb as d,Hb as m,Mb as o,Pb as c}from"./chunk-7FQFEB33.js";import{e as V,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var f=class extends I{constructor(t){super(t),this.context="REPL",this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await H(e)??await $(e)??await Y(e)??await z(e)??void 0}async function H(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await h({...e,snippet:t}),s=await n.text();return C(n.status,s)?Q(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await h({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function Y(e){if(c(`Evaluating assignment context - ${e.snippet}`),oe(e.snippet))return e.snippet=`assign ${e.snippet}`,o(m`${d.gray(`> ${e.snippet}`)}`),$(e)}async function z(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(X(e.snippet)||(t=await(await h({...e,snippet:`{{ ${e.snippet} }}`})).text()),y(t)||(t=await(await h({...e,snippet:`{% ${e.snippet} %}`})).text()),y(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");B(e.snippet,n)}}function B(e,t){if(t.includes("Unknown tag")){o(m`${d.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(m`${d.errorText(n)}`)}async function h(e){let t=K(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await P(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
2
+ ${t}
3
+ `}});return Z(n)&&ne(),ee(n)&&se(),te(n)&&re(),n}function K(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function Q(e){let t=j(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function j(e){let t=e.split(`
4
+ `).slice(1,-1);if(t.length!==0)return t.join("")}function y(e){return e.includes("Liquid syntax error")}function X(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function Z(e){return e.status===401||e.status===403}function ee(e){return e.status===430||e.status===429}function te(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function ne(){throw new u("Session expired. Please initiate a new one.")}function se(){throw new u("Evaluations limit reached. Try again later.")}function re(){throw new u("Page not found. Please provide a valid --url value!")}function oe(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function C(e,t){return e===200&&!y(t)}r();function F(e){if(N(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function N(e){if(Array.isArray(e))return e.length>0?N(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(m`${d.cyan(e)}`)}import{createInterface as ie}from"readline";var ae=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
5
+ Please use 'collections.first' instead of '{{ collections.first }}'.`;async function D(e,t,n){process.stdin.isTTY&&process.stdin.ref();let s=ie({input:process.stdin,output:process.stdout}),a=[];s.on("line",p=>{ue(p,e,t,n,s,a)}),s.prompt()}async function ue(e,t,n,s,a,p){try{if(pe(e))return o(ae),a.prompt();let l=await A({snippet:e,themeSession:t,themeId:n,url:s,replSession:p});F(l),a.prompt()}catch(l){throw a.close(),l instanceof Error?(c(l.stack??"Error backtrace not found"),new u(l.message)):new u("An unknown error occurred. Please try again.")}}function pe(e){return/^\s*(\{\{|{%)/.test(e)}async function W(e,t){let n=await le(e),s=await _(e)?await O(t,e.storeFqdn):void 0;return{themeId:n,storePassword:s}}async function le(e){return(await new f(e).findOrCreate()).id.toString()}async function J(e,t,n,s,a){if(o(`Welcome to Shopify Liquid console
6
+ (press Ctrl + C to exit)`),s?.startsWith("shpat_"))throw new u("Unable to use Admin API tokens with the console command",`To use this command with the --password flag you must:
7
+
8
+ 1. Install the Theme Access app on your shop
9
+ 2. Generate a new password
10
+
11
+ Alternatively, you can authenticate normally by not passing the --password flag.
12
+
13
+ Learn more: https://shopify.dev/docs/storefronts/themes/tools/theme-access`);let p=await k(t,e,s,a);return D(p,t,n)}var w=V(G(),1);var U,i=class extends q{async command(t,n){let{url:s,password:a}=t,{themeId:p,storePassword:l}=await W(n,t["store-password"]);x("theme-command:console:single-env:authenticated"),await J(n,p,s,a,l)}};U=i;i.summary="Shopify Liquid REPL (read-eval-print loop) tool";i.usage=["theme console","theme console --url /products/classic-leather-jacket"];i.descriptionWithMarkdown=`Starts the Shopify Liquid REPL (read-eval-print loop) tool. This tool provides an interactive terminal interface for evaluating Liquid code and exploring Liquid objects, filters, and tags using real store data.
14
+
15
+ You can also provide context to the console using a URL, as some Liquid objects are context-specific`;i.description=U.descriptionWithoutMarkdown();i.flags={...E,...R,url:w.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":w.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"})};i.multiEnvironmentsFlags=null;var Ye=i;export{Ye as a};
@@ -1 +1 @@
1
- import{z as r}from"./chunk-XONFGLJQ.js";import{r as o}from"./chunk-LDGAHMS7.js";import{f as t,q as n}from"./chunk-IU2ZQ6TE.js";import{e as s,g as a}from"./chunk-VPRTJUIN.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
1
+ import{z as r}from"./chunk-G4OQABDT.js";import{r as o}from"./chunk-T6CC5WUU.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
@@ -1 +1 @@
1
- import{g as r}from"./chunk-VPRTJUIN.js";r();import t from"crypto";function o(e){return t.createHash("sha1").update(e).digest("hex")}function c(e){return t.createHash("md5").update(e).digest("hex")}function d(){return t.randomUUID()}function p(e){return t.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(e).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}export{o as a,c as b,d as c,p as d};
1
+ import{g as r}from"./chunk-VKWPEFWQ.js";r();import t from"crypto";function o(e){return t.createHash("sha1").update(e).digest("hex")}function c(e){return t.createHash("md5").update(e).digest("hex")}function d(){return t.randomUUID()}function p(e){return t.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(e).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}export{o as a,c as b,d as c,p as d};
@@ -0,0 +1,4 @@
1
+ import{a as s}from"./chunk-EKVTNWHM.js";import{a as r}from"./chunk-5BKCIDMS.js";import{Ca as n,Fa as p}from"./chunk-4QTEPWEJ.js";import{b as e}from"./chunk-OXJBYKMX.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var c=m(g(),1);var t,o=class extends s{async run(){let{flags:i}=await this.parse(t),f={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config},d=await n(f),{app:l}=await p({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=o;o.summary="Fetch your app configuration from the Developer Dashboard.";o.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
2
+
3
+ For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
4
+ `;o.description=t.descriptionWithoutMarkdown();o.flags={...e,...r,"organization-id":c.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var A=o;export{A as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-KHSYW7I4.js";import{b as e}from"./chunk-XOTA6JTZ.js";import{g as o}from"./chunk-VPRTJUIN.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
1
+ import{a as i}from"./chunk-ATSMK66C.js";import{b as e}from"./chunk-HOSFU6UP.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-XULPJ6UG.js";import{l as i}from"./chunk-M56NDIMD.js";import{g as t}from"./chunk-VPRTJUIN.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
1
+ import{b as n}from"./chunk-J3HX6ZGD.js";import{l as i}from"./chunk-TPCG6DCA.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
@@ -0,0 +1,2 @@
1
+ import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-4QTEPWEJ.js";import{f as v,i as X,p as c}from"./chunk-UTO4Z6P6.js";import{c as G}from"./chunk-A5HKAMAC.js";import{v as U,z as w}from"./chunk-NTRAWIEJ.js";import{d as E,f as $}from"./chunk-TPCG6DCA.js";import{$ as b,Hb as H,Ta as P,Y as a,qa as I,wa as D,ya as V}from"./chunk-7FQFEB33.js";import{d as C,j as F}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Z(e){switch(e){case d.Offsite:return k;case d.CreditCard:return R;case d.CustomCreditCard:return L;case d.CustomOnsite:return N;case d.Redeemable:return A;case d.CardPresent:return O}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function ee(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);switch(i){case k:return x(e,t,W);case R:return x(e,t,Q);case L:return x(e,t,K);case N:return x(e,t,B);case A:return x(e,t,q);case O:return x(e,t,Y);default:throw new Error(`Unsupported extension: ${i}`)}}function x(e,t,i){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let r=JSON.parse(o),l=i(r,t);l&&delete l.api_version;let p=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:a(e.title.substring(0,c)),...l,targeting:[{target:`${p}`}]}]}}s();s();var fe=new Map(J.map(e=>[e[1],e[0]])),ue=(e,t)=>{let i=fe.get(e.uiType);if(!i)throw new E(`Field type ${e.uiType} is not supported`);let n={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(n.name=e.label,n.required=e.required),n},me=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},te=(e,t)=>t?t.map(n=>n.uiType==="commerce-object-id"||n.uiType==="marketing-activity-id"||j.includes(n.uiType)?me(n,e):ue(n,e)):[];function ie(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,n;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);n={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:a(e.title.substring(0,c)),url:o.url}]}}else{let o=JSON.parse(t),r=te(e.type,o.fields??[]);n={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:a(e.title.substring(0,c)),description:o.description,runtime_url:o.url??i,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return n}s();s();var ne=e=>{let t=e.split("#");if(t.length!==2||t.some(l=>l===""||l===void 0))throw new Error("Invalid context");let i="admin",n=ge(t[0]??""),o=de(t[1]??""),r="link";return o==="selection"?[i,`${n}-index`,`${o}-action`,r].join("."):[i,`${n}-${o}`,"action",r].join(".")},de=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},ge=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function oe(e,t,i){let n=e.activeVersion?.config??e.draftVersion?.config;if(!n)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let r=JSON.parse(n);if(i.embedded)try{let p=new URL(r.url),f=p.pathname.startsWith("/")?p.pathname.substring(1):p.pathname,u=new URL(`app://${f}`);u.search=p.search,u.hash=p.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:a(e.title.substring(0,c)),targeting:[{url:r.url,target:ne(o)}]}]}}s();var _e={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},ye={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function Ce(e){let t=new URL(e);return t.pathname+t.search+t.hash}function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:a(e.title.substring(0,c)),title:i.title,description:i.description,api_path:Ce(i.app_api_url),tactic:i.tactic,marketing_channel:_e[i.platform]??"",referring_domain:ye[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:o,...r})=>r)}]}}s();function se(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:a(e.title.substring(0,c)),pattern:i.pattern}]}}var S=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ee},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:ie},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:re},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:se},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:oe}];function ae(e){return S.filter(t=>t.extensionTypes.some(i=>e.some(n=>n.type.toLowerCase()===i.toLowerCase())))}async function ut(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),i=await w({message:"Extension type to migrate",choices:t}),n=e.find(o=>o.value===i);if(n===void 0)throw new E("Invalid migration choice");return n}s();var kt=S.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),n=C(t.directory,X.extensions.directoryName,i);if(await P(n)){let o=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await w({message:`Directory "${i}" already exists. What would you like to do?`,choices:o});if(r===g.Cancel)throw new $;return{directory:n,action:r}}return await D(n),await I(C(n,v.lockFile)),{directory:n,action:g.Write}}async function xe(e){let{app:t,remoteApp:i,developerPlatformClient:n,extensionTypes:o,extensions:r,buildExtensionConfig:l,all:p}=e,f=r.filter(m=>o.includes(m.type.toLowerCase()));if(f=we(t,f),f.length===0)throw new E("No extensions to migrate");if(!p){let m=f.map(y=>({label:y.title,value:y.uuid}));f.length>1&&m.push({label:"All",value:"All"});let _=await w({message:"Extensions to migrate",choices:m});_!=="All"&&(f=[f.find(y=>y?.uuid===_)])}let u={},h=f.map(async m=>{let{directory:_,action:y}=await Ee({app:t,name:m.title}),ce=a(m.title.substring(0,c));if(u[ce]=m.uuid,y===g.Write){let M=l(m,r,t.configuration),le=C(_,"shopify.extension.toml");await new G(le,M).replace(M);let pe=C(_,v.lockFile);await V(pe)}return{extension:m,directory:C("extensions",F(_))}}),T=await Promise.all(h);be(T),await z({app:t,identifiers:{extensions:u,app:i.apiKey},command:"import-extensions",developerPlatformClient:n})}function we(e,t){let i=e.dotenv?.variables??{},n=e.allExtensions.map(o=>i[o.idEnvironmentVariableName]);return t.filter(o=>!n.includes(o.uuid))}async function At(e){let t=ae(e.extensions);await Promise.all(t.map(async i=>xe({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function be(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>H`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
+ `)})}s();async function Rt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:n,onlyDashboardManaged:o=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:l,extensionRegistrations:p}=r.app;return(o?l:p.concat(l)).filter(u=>{let h=n.includes(u.type.toLowerCase()),T=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(T??m)})}export{ae as a,ut as b,kt as c,xe as d,we as e,At as f,Rt as g};
@@ -0,0 +1 @@
1
+ import{b as c}from"./chunk-CFOXXOO2.js";import{h as E,ua as T,va as u,xa as s}from"./chunk-G4OQABDT.js";import{F as w}from"./chunk-NTRAWIEJ.js";import{d as N}from"./chunk-TPCG6DCA.js";import{Pb as V,T as _}from"./chunk-7FQFEB33.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ne="live",ie="unpublished";function ae(e){return e.role===g}async function te(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??(e.processing=!1),e.createdAtRuntime??(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 re(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",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function rn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await c({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),u(i),V(`Error fetching theme with ID: ${e}`)}}async function sn(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await b({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});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 b({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw u(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 un(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await c({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});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 u(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function cn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await b({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let k=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${k}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async k=>{let{attachment:h,value:v}=await Z(k.body);return{attachment:h,key:k.filename,checksum:k.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function pn(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 c({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:p});o||r("Failed to delete theme assets");let{deletedThemeFiles:k,userErrors:h}=o;k&&k.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(u(`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 vn(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);T("theme-api:upload-files");let o=await K(e,m,a);T("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 c({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:p})}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}`),u(`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 Nn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await b({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(k=>k.filename).join(", ");throw u(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 hn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await c({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:p});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let k=d.userErrors.map(h=>h.message).join(", ");throw u(new N(k))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function fn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await c({query:O,session:n,variables:{id:S(e)},preferredBehaviour:p});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 u(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function yn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await c({query:x,session:n,variables:{id:S(e)},preferredBehaviour:p});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 u(new N(d))}return i||r("Failed to update theme"),!0}async function Sn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await c({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:p,responseOptions:{onResponse:k=>{i=k.headers.get("x-request-id")??void 0}}});if(!t)return u("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 Fn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await c({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 c({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 u(new N(e))}async function b(e){try{return await c(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 u(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:i.trim().replace(/\.$/,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function Z(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 u(new N(`Error downloading content from URL: ${e.url}`))}}}export{re as a,g as b,ne as c,ie as d,ae as e,te as f,rn as g,sn as h,kn as i,un as j,cn as k,pn as l,vn as m,Nn as n,hn as o,fn as p,yn as q,Sn as r,Fn as s,bn as t};
@@ -1 +1 @@
1
- import{g as p}from"./chunk-VPRTJUIN.js";p();import i from"node:process";import n from"node:path";import{fileURLToPath as f}from"node:url";p();function s(t={}){let{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"}var u=({cwd:t=i.cwd(),path:e=i.env[s()],preferLocal:r=!0,execPath:o=i.execPath,addExecPath:l=!0}={})=>{let m=t instanceof URL?f(t):t,c=n.resolve(m),a=[];return r&&h(a,c),l&&v(a,o,c),[...a,e].join(n.delimiter)},h=(t,e)=>{let r;for(;r!==e;)t.push(n.join(e,"node_modules/.bin")),r=e,e=n.resolve(e,"..")},v=(t,e,r)=>{let o=e instanceof URL?f(e):e;t.push(n.resolve(r,o,".."))},j=({env:t=i.env,...e}={})=>{t={...t};let r=s({env:t});return e.path=t[r],t[r]=u(e),t};export{j as a};
1
+ import{g as p}from"./chunk-VKWPEFWQ.js";p();import i from"node:process";import n from"node:path";import{fileURLToPath as f}from"node:url";p();function s(t={}){let{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"}var u=({cwd:t=i.cwd(),path:e=i.env[s()],preferLocal:r=!0,execPath:o=i.execPath,addExecPath:l=!0}={})=>{let m=t instanceof URL?f(t):t,c=n.resolve(m),a=[];return r&&h(a,c),l&&v(a,o,c),[...a,e].join(n.delimiter)},h=(t,e)=>{let r;for(;r!==e;)t.push(n.join(e,"node_modules/.bin")),r=e,e=n.resolve(e,"..")},v=(t,e,r)=>{let o=e instanceof URL?f(e):e;t.push(n.resolve(r,o,".."))},j=({env:t=i.env,...e}={})=>{t={...t};let r=s({env:t});return e.path=t[r],t[r]=u(e),t};export{j as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-QDVJJKLB.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-N3NE4MVN.js";import{a as e}from"./chunk-ATSMK66C.js";import{a as o}from"./chunk-OU3M32A2.js";import{b as i}from"./chunk-HOSFU6UP.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};