@shopify/cli 4.7.0 → 4.8.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 (324) hide show
  1. package/dist/analytics-3IIUBZ3B.js +1 -0
  2. package/dist/analytics-OOT5AB52.js +1 -0
  3. package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
  5. package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
  6. package/dist/assets/hydrogen/starter/package.json +3 -3
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-6ENBE43F.js → chunk-2AK44UYM.js} +1 -1
  9. package/dist/{chunk-XCBEYRQI.js → chunk-2CIZE537.js} +1 -1
  10. package/dist/{chunk-YHPBDS52.js → chunk-2EAFYCCS.js} +1 -1
  11. package/dist/{chunk-U2Z5NMXV.js → chunk-2KGPH7YG.js} +1 -1
  12. package/dist/{chunk-6VGJVXZI.js → chunk-2O224ZPO.js} +1 -1
  13. package/dist/{chunk-RY2SJVWM.js → chunk-2XDUJQQN.js} +3 -3
  14. package/dist/{chunk-GSCWZR22.js → chunk-36ROOKQB.js} +1 -1
  15. package/dist/{chunk-YIZZ5LZN.js → chunk-3DCN3N23.js} +1 -1
  16. package/dist/{chunk-YN6A26QL.js → chunk-3JXPOOFV.js} +39 -39
  17. package/dist/{chunk-KIYHEMHD.js → chunk-4QBJ5JBX.js} +15 -16
  18. package/dist/chunk-4ZNV5YSL.js +1 -0
  19. package/dist/chunk-5L63PRJL.js +2 -0
  20. package/dist/{chunk-MRCWOOSF.js → chunk-5N6HNQQ5.js} +1 -1
  21. package/dist/{chunk-4JY2P2A5.js → chunk-5SEEDOQ5.js} +1 -1
  22. package/dist/chunk-67Z34HN5.js +5 -0
  23. package/dist/chunk-6BDAJ6UD.js +5 -0
  24. package/dist/chunk-6CXG3XLP.js +1 -0
  25. package/dist/{chunk-QEB3HUQE.js → chunk-6MWWJZFN.js} +1 -1
  26. package/dist/{chunk-LRQYUWWB.js → chunk-6RQOEPEC.js} +1 -1
  27. package/dist/{chunk-LJM2DUXN.js → chunk-72ZY3KTF.js} +1 -1
  28. package/dist/{chunk-WKUGSFTB.js → chunk-742XXXGL.js} +1 -1
  29. package/dist/{chunk-37TEEITE.js → chunk-7HFHL5SO.js} +1 -1
  30. package/dist/{chunk-6VRXGEIW.js → chunk-7ISJRIPT.js} +1 -1
  31. package/dist/{chunk-CZJZCJRX.js → chunk-7LWUHQIF.js} +1 -1
  32. package/dist/{chunk-MLZLDL6B.js → chunk-7T6M7FAC.js} +1 -1
  33. package/dist/{chunk-LWJA2DQG.js → chunk-A6BMJISP.js} +1 -1
  34. package/dist/{chunk-TY4W7AYX.js → chunk-AWUX36VG.js} +1 -1
  35. package/dist/chunk-BWJIZYAG.js +1 -0
  36. package/dist/{chunk-EW55WWT7.js → chunk-BZ73NV3L.js} +1 -1
  37. package/dist/chunk-C3RUVXG2.js +6 -0
  38. package/dist/{chunk-QKGZWOOY.js → chunk-C4YLE3NS.js} +1 -1
  39. package/dist/chunk-CEYIZC3M.js +2 -0
  40. package/dist/{chunk-WCRZJY3P.js → chunk-CIWKN4HF.js} +1 -1
  41. package/dist/{chunk-P5MNNBSO.js → chunk-CULTZLC4.js} +1 -1
  42. package/dist/{chunk-X4XP2RQJ.js → chunk-CX75OKZK.js} +1 -1
  43. package/dist/{chunk-LDF4PQ3B.js → chunk-DASVZTAX.js} +46 -46
  44. package/dist/{chunk-UPJLZHHR.js → chunk-DX3JLOUA.js} +1 -1
  45. package/dist/{chunk-ZCNIR6YU.js → chunk-E55KS3GZ.js} +1 -1
  46. package/dist/{chunk-WHLGNDRE.js → chunk-E5FXOLQO.js} +1 -1
  47. package/dist/{chunk-JQ2B3VHR.js → chunk-E6N4PZZR.js} +1 -1
  48. package/dist/{chunk-CIH6LPTG.js → chunk-EB574SY6.js} +1 -1
  49. package/dist/chunk-EX5GVHGE.js +1 -0
  50. package/dist/chunk-F3NYCSXT.js +273 -0
  51. package/dist/{chunk-FWPJEL6Q.js → chunk-F6X6OXXB.js} +1 -1
  52. package/dist/{chunk-QPWMD2VR.js → chunk-FDBHQLFK.js} +1 -1
  53. package/dist/{chunk-TCTVI6PK.js → chunk-FDYW3UQC.js} +1 -1
  54. package/dist/{chunk-2SZOPJYI.js → chunk-FEDVVYK2.js} +1 -1
  55. package/dist/{chunk-SSJGWLCW.js → chunk-FJ6F4XRV.js} +1 -1
  56. package/dist/{chunk-E5T4YRGW.js → chunk-FOREMLFZ.js} +1 -1
  57. package/dist/{chunk-QXHENYJH.js → chunk-FUYDGK33.js} +1 -1
  58. package/dist/{chunk-CYOFLJ3Z.js → chunk-FX3L344E.js} +1 -1
  59. package/dist/{chunk-FCGKO2KY.js → chunk-G5XIGN5D.js} +1 -1
  60. package/dist/{chunk-HHVHVGRT.js → chunk-GAYKYEIM.js} +1 -1
  61. package/dist/{chunk-2U4P6UFZ.js → chunk-GCY7LPEF.js} +1 -1
  62. package/dist/{chunk-OORWOTAP.js → chunk-GNBRCK7L.js} +1 -1
  63. package/dist/{chunk-KOVAFUYN.js → chunk-GRPKF5ZB.js} +1 -1
  64. package/dist/{chunk-QZBSCOJV.js → chunk-GRSF7456.js} +1 -1
  65. package/dist/chunk-H2TQ4ODI.js +1 -0
  66. package/dist/{chunk-AMLWPYNA.js → chunk-H6XEESUN.js} +1 -1
  67. package/dist/{chunk-I3N6NPHF.js → chunk-HB347DXT.js} +1 -1
  68. package/dist/chunk-HFSCXTJQ.js +97 -0
  69. package/dist/chunk-HHN6KZXX.js +1 -0
  70. package/dist/{chunk-QBIVQXUJ.js → chunk-HP64ZTEJ.js} +1 -1
  71. package/dist/{chunk-U7R6LYPJ.js → chunk-IARCMH7G.js} +1 -1
  72. package/dist/{chunk-YOO7DLOT.js → chunk-IBI5UCJO.js} +1 -1
  73. package/dist/{chunk-UVQL7RUY.js → chunk-IKUSLRGD.js} +1 -1
  74. package/dist/{chunk-HLNJL4B6.js → chunk-IT4HYLTY.js} +1 -1
  75. package/dist/{chunk-GZ64KWHX.js → chunk-J4T73EAS.js} +1 -1
  76. package/dist/chunk-JG4HH54Q.js +1 -0
  77. package/dist/{chunk-DKL6N3L2.js → chunk-JIYSCWCG.js} +1 -1
  78. package/dist/chunk-JWRK5KLD.js +560 -0
  79. package/dist/{chunk-DHU57LKD.js → chunk-JX7FYWPO.js} +1 -1
  80. package/dist/{chunk-N6YTJXIS.js → chunk-K42WBNJQ.js} +1 -1
  81. package/dist/{chunk-5CR5YJTU.js → chunk-KDU7VW3L.js} +1 -1
  82. package/dist/{chunk-CTRXLZAJ.js → chunk-KWVOJWO7.js} +1 -1
  83. package/dist/{chunk-RUFQCXBX.js → chunk-LANUJ7LX.js} +1 -1
  84. package/dist/{chunk-PAAKBWSF.js → chunk-LUKQ5HLC.js} +1 -1
  85. package/dist/{chunk-3K6VHXC2.js → chunk-M2XHIN57.js} +1 -1
  86. package/dist/{chunk-TYIGOVRQ.js → chunk-MNOQAXJW.js} +1 -1
  87. package/dist/chunk-MYQUYU4U.js +2 -0
  88. package/dist/{chunk-T5JXQ7KO.js → chunk-N65F7ET2.js} +1 -1
  89. package/dist/{chunk-PWSI275S.js → chunk-N6RBRPGW.js} +1 -1
  90. package/dist/chunk-N75VOJHO.js +15 -0
  91. package/dist/{chunk-4W3UE2ZI.js → chunk-NBFMP5XQ.js} +1 -1
  92. package/dist/{chunk-CFWHR74L.js → chunk-NE3ZFSMS.js} +1 -1
  93. package/dist/{chunk-D2K2ZBKH.js → chunk-NGLMZYS7.js} +2 -2
  94. package/dist/{chunk-JQISGC7D.js → chunk-NHAUJWEG.js} +1 -1
  95. package/dist/chunk-NILETICC.js +11 -0
  96. package/dist/{chunk-SYADOUBB.js → chunk-NNZXKFOS.js} +1 -1
  97. package/dist/{chunk-E2W5OYYM.js → chunk-NQK2VCDA.js} +1 -1
  98. package/dist/{chunk-U6HYEGAE.js → chunk-NROVZETL.js} +1 -1
  99. package/dist/{chunk-TSLQZTXR.js → chunk-NW6NUGN7.js} +1 -1
  100. package/dist/{chunk-JZMRBJH3.js → chunk-O7DZXO3O.js} +1 -1
  101. package/dist/{chunk-5CADTCJE.js → chunk-OBYQSIYU.js} +1 -1
  102. package/dist/{chunk-5NO5OXYP.js → chunk-OEG3N5PG.js} +1 -1
  103. package/dist/{chunk-VRVP2GQL.js → chunk-OGBZTY2G.js} +1 -1
  104. package/dist/chunk-OMHR423H.js +1 -0
  105. package/dist/{chunk-XHZ5BWXL.js → chunk-OV6SRRXR.js} +1 -1
  106. package/dist/{chunk-2JDCVEFK.js → chunk-OVV5YGKN.js} +1 -1
  107. package/dist/{chunk-SEVSMWNX.js → chunk-OZL5FTT7.js} +1 -1
  108. package/dist/{chunk-JUKAWTYY.js → chunk-OZMQ2EJB.js} +1 -1
  109. package/dist/{chunk-7WTNEG2F.js → chunk-P57P7UAN.js} +1 -1
  110. package/dist/{chunk-JZXA3H5K.js → chunk-PATTG7YZ.js} +1 -1
  111. package/dist/{chunk-2HK4MFWP.js → chunk-PG5YNPJB.js} +1 -1
  112. package/dist/chunk-PP4L2JJ6.js +3 -0
  113. package/dist/{chunk-CZPGC2E7.js → chunk-Q5JX23QU.js} +1 -1
  114. package/dist/{chunk-L67BU25M.js → chunk-Q5KVMLBK.js} +1 -1
  115. package/dist/{chunk-ZRLEAF7M.js → chunk-Q5LIJGT7.js} +1 -1
  116. package/dist/{chunk-JQVXH26X.js → chunk-Q6ADIMJM.js} +1 -1
  117. package/dist/{chunk-YUVE2I3C.js → chunk-QERQARMC.js} +1 -1
  118. package/dist/{chunk-GLWQMLUC.js → chunk-QOV43E26.js} +1 -1
  119. package/dist/{chunk-KCS75ZM4.js → chunk-QTFUYKMF.js} +1 -1
  120. package/dist/{chunk-7DOWT5JZ.js → chunk-QTJCCOAG.js} +3 -3
  121. package/dist/{chunk-XAOYKECS.js → chunk-R6ICQT2D.js} +1 -1
  122. package/dist/{chunk-4LRG5YBS.js → chunk-R7T3LYJL.js} +1 -1
  123. package/dist/{chunk-DMXQLI35.js → chunk-RXQJCJDV.js} +1 -1
  124. package/dist/{chunk-BR6DBMQA.js → chunk-S2TLBBSS.js} +1 -1
  125. package/dist/{chunk-FULWTZS6.js → chunk-S5FOQY35.js} +1 -1
  126. package/dist/{chunk-6OFGSZD6.js → chunk-SYLHT42O.js} +1 -1
  127. package/dist/{chunk-CHMEDVDZ.js → chunk-T4AA6TSF.js} +1 -1
  128. package/dist/{chunk-XRT2W5Y2.js → chunk-T4QWK5GG.js} +1 -1
  129. package/dist/{chunk-63CIFL36.js → chunk-T7PJDT5O.js} +1 -1
  130. package/dist/{chunk-6EBLULOC.js → chunk-TEY4LRY7.js} +1 -1
  131. package/dist/{chunk-PANGX7SA.js → chunk-TFBRVLDN.js} +1 -1
  132. package/dist/{chunk-MB7E5GEY.js → chunk-TUVDJ3PG.js} +1 -1
  133. package/dist/{chunk-HZIX3DIT.js → chunk-U2DWBZK2.js} +1 -1
  134. package/dist/chunk-U53OLUOE.js +3 -0
  135. package/dist/{chunk-GKOBFX4A.js → chunk-UAETNFN4.js} +1 -1
  136. package/dist/{chunk-EOMCXBCS.js → chunk-UAFEFKAQ.js} +1 -1
  137. package/dist/{chunk-Q5DQGV3M.js → chunk-ULRJDKWQ.js} +1 -1
  138. package/dist/chunk-UZARYOLN.js +1 -0
  139. package/dist/chunk-VASGXHYA.js +1 -0
  140. package/dist/chunk-VD4XJ6BX.js +1 -0
  141. package/dist/{chunk-Y34LWI3S.js → chunk-VFM2KQRM.js} +3 -3
  142. package/dist/{chunk-CMYQXGLO.js → chunk-VSDRNYA5.js} +1 -1
  143. package/dist/{chunk-OE3F7XXU.js → chunk-VVZSYHDG.js} +1 -1
  144. package/dist/chunk-VXEYO3ZP.js +1 -0
  145. package/dist/{chunk-7JIQXGDE.js → chunk-VYDSOAV4.js} +1 -1
  146. package/dist/{chunk-DQFSKPKL.js → chunk-WBYAGS6B.js} +1 -1
  147. package/dist/chunk-WGAFCKGD.js +1 -0
  148. package/dist/{chunk-AH2ZGMDM.js → chunk-WYBTC356.js} +1 -1
  149. package/dist/{chunk-TTAPXLI5.js → chunk-XF2KTEID.js} +1 -1
  150. package/dist/{chunk-XUEMMLXK.js → chunk-XH5YGJQR.js} +1 -1
  151. package/dist/chunk-XHKWITLA.js +1705 -0
  152. package/dist/chunk-XOCB4KNX.js +2 -0
  153. package/dist/{chunk-2WJAAJVX.js → chunk-XUUAKGEX.js} +1 -1
  154. package/dist/{chunk-LQCR4TGH.js → chunk-XUYVJEZG.js} +1 -1
  155. package/dist/chunk-Y47C3LSX.js +3 -0
  156. package/dist/{chunk-KK24VGVE.js → chunk-Y5PRPHLQ.js} +1 -1
  157. package/dist/{chunk-K4KTNINH.js → chunk-YD2VQEN5.js} +1 -1
  158. package/dist/{chunk-KUNDCAQN.js → chunk-YESGYUEL.js} +1 -1
  159. package/dist/{chunk-JJJTPEMD.js → chunk-YEVGLC5X.js} +1 -1
  160. package/dist/{chunk-GMTNOCMS.js → chunk-YFINLODF.js} +3 -3
  161. package/dist/{chunk-LZ3GZ7NS.js → chunk-YKL3BLWC.js} +1 -1
  162. package/dist/{chunk-5HPBQ6U5.js → chunk-YLXPYXQP.js} +1 -1
  163. package/dist/{chunk-7AALWJAO.js → chunk-YNDIZCD2.js} +1 -1
  164. package/dist/{chunk-6WZYX5RO.js → chunk-YPWHD3NL.js} +1 -1
  165. package/dist/{chunk-4HV6A6UH.js → chunk-YSAFHVV6.js} +1 -1
  166. package/dist/{chunk-AGOEROAI.js → chunk-YZMY2CTU.js} +1 -1
  167. package/dist/{chunk-S3P5WWJD.js → chunk-Z4AFEO36.js} +1 -1
  168. package/dist/{chunk-7MHANY34.js → chunk-Z5WPP6ME.js} +1 -1
  169. package/dist/chunk-Z65E4UAP.js +1 -0
  170. package/dist/{chunk-V2HCVJYF.js → chunk-ZDRIQC7O.js} +1 -1
  171. package/dist/{chunk-2CYVZUYT.js → chunk-ZH44BDUR.js} +1 -1
  172. package/dist/{chunk-SJMTETSU.js → chunk-ZL5LU4U2.js} +1 -1
  173. package/dist/{chunk-DQCIORGH.js → chunk-ZYX7UHCQ.js} +1 -1
  174. package/dist/{chunk-ACTDYTAV.js → chunk-ZZRFG6ME.js} +114 -114
  175. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  176. package/dist/cli/commands/app/build.js +1 -1
  177. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  178. package/dist/cli/commands/app/bulk/execute.js +1 -1
  179. package/dist/cli/commands/app/bulk/status.js +1 -1
  180. package/dist/cli/commands/app/config/link.js +1 -1
  181. package/dist/cli/commands/app/config/pull.js +1 -1
  182. package/dist/cli/commands/app/config/use.js +1 -1
  183. package/dist/cli/commands/app/config/validate.js +1 -1
  184. package/dist/cli/commands/app/demo/watcher.js +1 -1
  185. package/dist/cli/commands/app/deploy.js +1 -1
  186. package/dist/cli/commands/app/dev/clean.js +1 -1
  187. package/dist/cli/commands/app/dev.js +1 -1
  188. package/dist/cli/commands/app/doctor/instructions.js +1 -0
  189. package/dist/cli/commands/app/doctor.js +1 -0
  190. package/dist/cli/commands/app/env/pull.js +1 -1
  191. package/dist/cli/commands/app/env/show.js +1 -1
  192. package/dist/cli/commands/app/execute.js +1 -1
  193. package/dist/cli/commands/app/function/build.js +1 -1
  194. package/dist/cli/commands/app/function/info.js +1 -1
  195. package/dist/cli/commands/app/function/replay.js +1 -1
  196. package/dist/cli/commands/app/function/run.js +1 -1
  197. package/dist/cli/commands/app/function/schema.js +1 -1
  198. package/dist/cli/commands/app/function/typegen.js +1 -1
  199. package/dist/cli/commands/app/generate/extension.js +1 -1
  200. package/dist/cli/commands/app/graphiql.js +1 -1
  201. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  202. package/dist/cli/commands/app/import-extensions.js +1 -1
  203. package/dist/cli/commands/app/info.js +1 -1
  204. package/dist/cli/commands/app/init.js +1 -1
  205. package/dist/cli/commands/app/logs.js +1 -1
  206. package/dist/cli/commands/app/release.js +1 -1
  207. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
  208. package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
  209. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
  210. package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
  211. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
  212. package/dist/cli/commands/app/versions/list.js +1 -1
  213. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  214. package/dist/cli/commands/auth/login.js +1 -1
  215. package/dist/cli/commands/auth/logout.js +1 -1
  216. package/dist/cli/commands/cache/clear.js +1 -1
  217. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  218. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  219. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  220. package/dist/cli/commands/debug/command-flags.js +1 -1
  221. package/dist/cli/commands/doc/fetch.js +1 -1
  222. package/dist/cli/commands/doc/search.js +1 -1
  223. package/dist/cli/commands/docs/generate.js +1 -1
  224. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  225. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  226. package/dist/cli/commands/help.js +1 -1
  227. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  228. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  229. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  230. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  231. package/dist/cli/commands/notifications/generate.js +1 -1
  232. package/dist/cli/commands/notifications/list.js +1 -1
  233. package/dist/cli/commands/organization/list.js +1 -1
  234. package/dist/cli/commands/search.js +1 -1
  235. package/dist/cli/commands/send-analytics.js +1 -1
  236. package/dist/cli/commands/theme/check.js +1 -1
  237. package/dist/cli/commands/theme/console.js +1 -1
  238. package/dist/cli/commands/theme/delete.js +1 -1
  239. package/dist/cli/commands/theme/dev.js +1 -1
  240. package/dist/cli/commands/theme/duplicate.js +1 -1
  241. package/dist/cli/commands/theme/info.js +1 -1
  242. package/dist/cli/commands/theme/init.js +1 -1
  243. package/dist/cli/commands/theme/language-server.js +1 -1
  244. package/dist/cli/commands/theme/list.js +1 -1
  245. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  246. package/dist/cli/commands/theme/open.js +1 -1
  247. package/dist/cli/commands/theme/package.js +1 -1
  248. package/dist/cli/commands/theme/preview.js +1 -1
  249. package/dist/cli/commands/theme/profile.js +1 -1
  250. package/dist/cli/commands/theme/publish.js +1 -1
  251. package/dist/cli/commands/theme/pull.js +1 -1
  252. package/dist/cli/commands/theme/push.js +1 -1
  253. package/dist/cli/commands/theme/rename.js +1 -1
  254. package/dist/cli/commands/theme/share.js +1 -1
  255. package/dist/cli/commands/upgrade.js +1 -1
  256. package/dist/cli/commands/version.js +1 -1
  257. package/dist/command-registry.js +1 -1
  258. package/dist/{conf-store-OAGJBITE.js → conf-store-ASDCTDQ4.js} +1 -1
  259. package/dist/configs/all.yml +60 -0
  260. package/dist/configs/recommended.yml +60 -0
  261. package/dist/data/filters.json +31 -2
  262. package/dist/data/setting.json +129 -4
  263. package/dist/data/shopify_system_translations.json +154 -13
  264. package/dist/{deprecations-K3NPRKBF.js → deprecations-VBQV7Q4O.js} +1 -1
  265. package/dist/dist-FZLOAKU7.js +1 -0
  266. package/dist/dist-HTY6UHG5.js +1 -0
  267. package/dist/environments-HSTNEQRG.js +1 -0
  268. package/dist/{error-YX56C43A.js → error-2LZYKRMA.js} +1 -1
  269. package/dist/error-handler-PIGEJ7BT.js +1 -0
  270. package/dist/{fs-SKHQZZTQ.js → fs-BJHNJDDK.js} +1 -1
  271. package/dist/hooks/did-you-mean.js +1 -1
  272. package/dist/hooks/hydrogen-init.js +1 -1
  273. package/dist/hooks/postrun.js +1 -1
  274. package/dist/hooks/prerun.js +1 -1
  275. package/dist/hooks/public-metadata.js +1 -1
  276. package/dist/hooks/sensitive-metadata.js +1 -1
  277. package/dist/hooks/tunnel-provider.js +1 -1
  278. package/dist/hooks/tunnel-start.js +1 -1
  279. package/dist/index.js +14 -16
  280. package/dist/{is-global-V5VORI3F.js → is-global-6SCOAJVG.js} +1 -1
  281. package/dist/{local-GX5AN6ZS.js → local-PZWPRFU7.js} +1 -1
  282. package/dist/{metadata-XUJUTBTB.js → metadata-VVBHB3HL.js} +1 -1
  283. package/dist/{node-package-manager-3WIYU7Y3.js → node-package-manager-ETYQN7OM.js} +1 -1
  284. package/dist/notifications-system-652OG5KL.js +1 -0
  285. package/dist/os-7D6NT4O3.js +1 -0
  286. package/dist/{output-X47P6ICP.js → output-74VDGYJD.js} +1 -1
  287. package/dist/{prettier-RVUAAWC7.js → prettier-EGVCP5CY.js} +1 -1
  288. package/dist/{system-SR5G7WEW.js → system-P5QIJALL.js} +1 -1
  289. package/dist/tsconfig.tsbuildinfo +1 -1
  290. package/dist/{ui-VYWSLAQ6.js → ui-H5I5YVKV.js} +1 -1
  291. package/dist/upgrade-34HSYBXI.js +1 -0
  292. package/dist/version-EKXEAF6Q.js +1 -0
  293. package/dist/{version-FK4ETQ22.js → version-J2PYO6M5.js} +1 -1
  294. package/dist/{workerd-NAPS5TA7.js → workerd-X4TGHEG3.js} +1 -1
  295. package/oclif.manifest.json +903 -133
  296. package/package.json +9 -8
  297. package/dist/analytics-6LI5GLWS.js +0 -1
  298. package/dist/analytics-UNRIIG4Y.js +0 -1
  299. package/dist/chunk-5CYJG63I.js +0 -1
  300. package/dist/chunk-6PDR2IUL.js +0 -11
  301. package/dist/chunk-F5HCSUXC.js +0 -16
  302. package/dist/chunk-H5KWM27L.js +0 -1
  303. package/dist/chunk-NEMPLS7C.js +0 -1
  304. package/dist/chunk-OUZGGWFN.js +0 -1
  305. package/dist/chunk-PIFW2R3S.js +0 -1382
  306. package/dist/chunk-QRT4A2RV.js +0 -3
  307. package/dist/chunk-R2R6JDNH.js +0 -1
  308. package/dist/chunk-RZFBGBNA.js +0 -1
  309. package/dist/chunk-V5SC2RYQ.js +0 -2
  310. package/dist/chunk-VKSR6MJG.js +0 -2
  311. package/dist/chunk-XLURZ6GL.js +0 -559
  312. package/dist/chunk-Z5K4J7HQ.js +0 -1
  313. package/dist/chunk-ZO74GSWC.js +0 -5
  314. package/dist/chunk-ZSFAURIH.js +0 -3
  315. package/dist/dist-EXJEE23W.js +0 -1
  316. package/dist/dist-S62Z6IFV.js +0 -1
  317. package/dist/environments-ALH2N36U.js +0 -1
  318. package/dist/error-handler-FDCH72NH.js +0 -1
  319. package/dist/notifications-system-RHULO564.js +0 -1
  320. package/dist/os-M6X7KOR4.js +0 -1
  321. package/dist/upgrade-PFQ7JMXG.js +0 -1
  322. package/dist/version-U4GM2LNG.js +0 -1
  323. /package/dist/{chunk-NJPL5BTN.js → chunk-YLQ3LNNY.js} +0 -0
  324. /package/dist/{morph-77RHJICZ.js → morph-BMYYMQNX.js} +0 -0
@@ -1 +1 @@
1
- import{n as A,sa as x}from"./chunk-ACTDYTAV.js";import{F}from"./chunk-GMTNOCMS.js";import{h as s}from"./chunk-R2R6JDNH.js";import{a as D}from"./chunk-CTNBSUVU.js";import{Ta as p,sb as f,ua as v,wb as I,xb as P}from"./chunk-Y34LWI3S.js";import{a as S}from"./chunk-XAOYKECS.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
1
+ import{n as A,wa as x}from"./chunk-ZZRFG6ME.js";import{F}from"./chunk-YFINLODF.js";import{h as s}from"./chunk-BWJIZYAG.js";import{a as D}from"./chunk-CTNBSUVU.js";import{Ta as p,sb as f,ua as v,wb as I,xb as P}from"./chunk-VFM2KQRM.js";import{a as S}from"./chunk-R6ICQT2D.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
@@ -1,4 +1,4 @@
1
- import{c as ee,e as ne,f as te,g as oe}from"./chunk-V5SC2RYQ.js";import{a as J,c as Z,d as Q,e as X}from"./chunk-TY4W7AYX.js";import{b as I}from"./chunk-CZJZCJRX.js";import{a as q}from"./chunk-NEMPLS7C.js";import{a as j}from"./chunk-KUNDCAQN.js";import{D as G,G as K,V as W,g as Y,sa as H}from"./chunk-ACTDYTAV.js";import{a as z}from"./chunk-U6HYEGAE.js";import{b as V}from"./chunk-JJJTPEMD.js";import{E as U,H as B,M as $,x as O,y as F,z as M}from"./chunk-GMTNOCMS.js";import{d as L}from"./chunk-JQISGC7D.js";import{h,j as N}from"./chunk-R2R6JDNH.js";import{a as ce}from"./chunk-CTNBSUVU.js";import{Ca as R,Cb as C,L as D,rb as S,wa as E,xb as A}from"./chunk-Y34LWI3S.js";import{d as x,i as T}from"./chunk-773TIA5M.js";import{e as pe,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ie(e){let n,t;e.bundlePath&&(n=await X(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await Q(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let a=await e.developerPlatformClient.deploy(o);if(!a.appDeploy.appVersion){let i=ue(a.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],i)}return a.appDeploy.userErrors?.length>0&&(t=a.appDeploy.userErrors.map(i=>i.message).join(", ")),{validationErrors:a.appDeploy.appVersion.appModuleVersions.filter(i=>i.validationErrors.length>0).map(i=>({uuid:i.registrationUuid,errors:i.validationErrors})),versionTag:a.appDeploy.appVersion.versionTag,location:a.appDeploy.appVersion.location,message:a.appDeploy.appVersion.message,deployError:t}}var v=`
1
+ import{c as ee,e as ne,f as te,g as oe}from"./chunk-MYQUYU4U.js";import{a as J,c as Z,d as Q,e as X}from"./chunk-AWUX36VG.js";import{b as I}from"./chunk-7LWUHQIF.js";import{a as q}from"./chunk-UZARYOLN.js";import{a as j}from"./chunk-YESGYUEL.js";import{D as G,G as K,Z as W,g as Y,wa as H}from"./chunk-ZZRFG6ME.js";import{a as z}from"./chunk-NROVZETL.js";import{b as V}from"./chunk-YEVGLC5X.js";import{E as U,H as B,M as $,x as O,y as F,z as M}from"./chunk-YFINLODF.js";import{d as L}from"./chunk-NHAUJWEG.js";import{h,j as N}from"./chunk-BWJIZYAG.js";import{a as ce}from"./chunk-CTNBSUVU.js";import{Ca as R,Cb as C,L as D,rb as S,wa as E,xb as A}from"./chunk-VFM2KQRM.js";import{d as x,i as T}from"./chunk-773TIA5M.js";import{e as pe,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ie(e){let n,t;e.bundlePath&&(n=await X(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await Q(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let a=await e.developerPlatformClient.deploy(o);if(!a.appDeploy.appVersion){let i=ue(a.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],i)}return a.appDeploy.userErrors?.length>0&&(t=a.appDeploy.userErrors.map(i=>i.message).join(", ")),{validationErrors:a.appDeploy.appVersion.appModuleVersions.filter(i=>i.validationErrors.length>0).map(i=>({uuid:i.registrationUuid,errors:i.validationErrors})),versionTag:a.appDeploy.appVersion.versionTag,location:a.appDeploy.appVersion.location,message:a.appDeploy.appVersion.message,deployError:t}}var v=`
2
2
  Validation errors`,k=`
3
3
  `;function ue(e,n,t,o={}){let a=l=>l.details?.some(y=>y.extension_id)??!1,s=(l,y)=>{let b=l.details?.find(_=>typeof _.extension_id<"u")?.extension_id??"";return Object.values(y).includes(b.toString())},i=l=>{let y=l.on?l.on[0]:void 0;return t.some(b=>b.uid===y?.user_identifier)},[d,u]=I(e,l=>i(l)),[p,c]=I(u,l=>a(l)),[f,r]=I(p,l=>s(l,n));return[...me(c,{version:o.version}),...fe(f,n),...he(r),...ge(d,t)]}function me(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function fe(e,n){return e.reduce((t,o)=>{let a=(o.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=a==="base"?o.message:`${a}: ${o.message}`,i=o.details.find(r=>typeof r.extension_title<"u")?.extension_title,d=o.details.find(r=>typeof r.specification_identifier<"u")?.specification_identifier,u=o.details.find(r=>typeof r.extension_id<"u")?.extension_id?.toString(),c=Object.keys(n).find(r=>n[r]===u)??i;d==="webhook_subscription"&&(c="Webhook Subscription");let f=t.find(r=>r.title===c);if(f){let r=f.body,m=o.category==="invalid"?r.find(l=>l.list.title===v):r.find(l=>l.list.title===k);m?m.list.items.includes(s)||m.list.items.push(s):r.push({list:{title:o.category==="invalid"?v:k,items:[s]}})}else t.push({title:c,body:[{list:{title:o.category==="invalid"?v:k,items:[s]}}]});return t.forEach(r=>{r.body.sort((m,l)=>m.list.title===v?1:l.list.title===v?-1:0)}),t},[])}function ge(e,n){return e.reduce((t,o)=>{let s=(o.on?o.on[0]:void 0)?.user_identifier,i=n.find(r=>r.uid===s),d=s?`Extension with uid: ${s}`:"Unknown Extension",u=i?.handle??d,c=`${(o.field??["unknown"]).join(".")}: ${o.message}`,f=t.find(r=>r.title===u);if(f){let m=f.body.find(l=>l.list.title===v);m&&(m.list.items.includes(c)||m.list.items.push(c))}else t.push({title:u,body:[{list:{title:v,items:[c]}}]});return t},[])}function he(e){return e.reduce((n,t)=>{let o=t.details.find(s=>typeof s.extension_title<"u")?.extension_title,a=n.find(s=>s.title===o);return a?a.errorCount+=1:n.push({title:o,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
4
4
  ${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function ae(e){let n=x(e.app.directory,".shopify","deploy-bundle");await R(n,{force:!0}),await E(n),await J(e.appManifest,n),e.skipBuild||await Y(e.app);let t=e.app.allExtensions.map(a=>({prefix:a.localIdentifier,action:async(s,i,d)=>{await a.buildForBundle({stderr:i,stdout:s,signal:d,app:e.app,environment:"production",skipBuild:e.skipBuild},n)}}));if(await O({processes:t,showTimestamps:!1}),e.app.allExtensions.some(a=>a.hasDeploySteps))return await Z(n,e.bundlePath),e.bundlePath}async function ye(e){let{app:n,remoteApp:t,developerPlatformClient:o,noRelease:a,allowUpdates:s,allowDeletes:i,extensions:d}=e,u=[a,s,i].some(Boolean),p=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
@@ -1,4 +1,4 @@
1
- import{a as w}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-NEMPLS7C.js";import{a as E}from"./chunk-KUNDCAQN.js";import{E as F,Z as x,i as C,sa as y}from"./chunk-ACTDYTAV.js";import{b as f}from"./chunk-LWJA2DQG.js";import{b as v}from"./chunk-JJJTPEMD.js";import{a as _}from"./chunk-CTNBSUVU.js";import{Ta as g,ma as u,qb as o,sb as p,ua as l,wb as h}from"./chunk-Y34LWI3S.js";import{f as c}from"./chunk-773TIA5M.js";import{e as k,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=w(i??"",r);return p`Updated ${o.path(e)} to be:
1
+ import{a as w}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-UZARYOLN.js";import{a as E}from"./chunk-YESGYUEL.js";import{E as F,ba as x,i as C,wa as y}from"./chunk-ZZRFG6ME.js";import{b as f}from"./chunk-A6BMJISP.js";import{b as v}from"./chunk-YEVGLC5X.js";import{a as _}from"./chunk-CTNBSUVU.js";import{Ta as g,ma as u,qb as o,sb as p,ua as l,wb as h}from"./chunk-VFM2KQRM.js";import{f as c}from"./chunk-773TIA5M.js";import{e as k,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=w(i??"",r);return p`Updated ${o.path(e)} to be:
2
2
 
3
3
  ${r}
4
4
 
@@ -1 +1 @@
1
- import{I as f,ja as v,k as d,ka as A,n as w,v as m}from"./chunk-YN6A26QL.js";import{b as l}from"./chunk-AGOEROAI.js";import{h as p,k as F}from"./chunk-R2R6JDNH.js";import{qb as V,sb as h}from"./chunk-Y34LWI3S.js";import{i as q}from"./chunk-DPNZWBT5.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??=await b(e,n);let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
1
+ import{J as f,ka as v,l as d,la as A,o as w,w as m}from"./chunk-3JXPOOFV.js";import{b as l}from"./chunk-YZMY2CTU.js";import{h as p,k as F}from"./chunk-BWJIZYAG.js";import{qb as V,sb as h}from"./chunk-VFM2KQRM.js";import{i as q}from"./chunk-DPNZWBT5.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??=await b(e,n);let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
@@ -1,4 +1,4 @@
1
- import{b as s}from"./chunk-RY2SJVWM.js";import{e as w}from"./chunk-AGOEROAI.js";import{C,E as x,y as a}from"./chunk-GMTNOCMS.js";import{h as S}from"./chunk-R2R6JDNH.js";import{Ab as I}from"./chunk-Y34LWI3S.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};n();function p(o=A()){return!!o.get("autocorrectEnabled")}function y(o,e=A()){e.set("autocorrectEnabled",o)}function A(){return W??=new w({projectName:"did-you-mean"}),W}var W;var u=class extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
1
+ import{b as s}from"./chunk-2XDUJQQN.js";import{C,E as x,y as a}from"./chunk-YFINLODF.js";import{e as w}from"./chunk-YZMY2CTU.js";import{h as S}from"./chunk-BWJIZYAG.js";import{Ab as I}from"./chunk-VFM2KQRM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};n();function p(o=A()){return!!o.get("autocorrectEnabled")}function y(o,e=A()){e.set("autocorrectEnabled",o)}function A(){return W??=new w({projectName:"did-you-mean"}),W}var W;var u=class extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
2
2
 
3
3
  When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
4
4
 
@@ -1 +1 @@
1
- import{a as l,c as b,d as D,e as _}from"./chunk-ZCNIR6YU.js";import{g as T,p as y,v as O}from"./chunk-OORWOTAP.js";import{b as L,c as S}from"./chunk-JJJTPEMD.js";import{e as d}from"./chunk-AGOEROAI.js";import{y as v}from"./chunk-GMTNOCMS.js";import{a as G}from"./chunk-CTNBSUVU.js";import{Ab as a,sb as s,wb as F}from"./chunk-Y34LWI3S.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
1
+ import{a as l,c as b,d as D,e as _}from"./chunk-E55KS3GZ.js";import{g as T,p as y,v as O}from"./chunk-GNBRCK7L.js";import{b as L,c as S}from"./chunk-YEVGLC5X.js";import{y as v}from"./chunk-YFINLODF.js";import{e as d}from"./chunk-YZMY2CTU.js";import{a as G}from"./chunk-CTNBSUVU.js";import{Ab as a,sb as s,wb as F}from"./chunk-VFM2KQRM.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var w;function f(){return w??=new d({projectName:"shopify-cli-host-theme-conf"}),w}function E(t){return a(s`Getting host theme...`),f().get(t)}function Y(t,e){a(s`Setting host theme...`),f().set(t,e)}function C(t){a(s`Removing host theme...`),f().delete(t)}function j(t,e){return{title:t,body:{tabularData:e}}}async function I(t,e){let r=e.storeFqdn,p=new _({...l.reduce((n,i)=>(n[i]=t.role===i,n),{}),theme:t.id?.toString()??t.name}),m=await b(e),x=T(),H=E(r);if(p.any()&&(m=D(r,m,p)),t.json)return F(JSON.stringify(m,null,2));let A=m.map(({id:n,name:i,role:g})=>{let c="";return g&&(c=`[${g}]`,[x,H].includes(`${n}`)&&(c+=" [current]")),[i,c,`#${n}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];v({customSections:[...t.environment?[{title:`${r} theme library`,body:[{subdued:`Environment name: ${t.environment}`}]}]:[],j("",R)]})}var h=$(G(),1);var u=class extends O{static description="Lists the themes in your store, along with their IDs and statuses.";static flags={...L,...S,...y,role:h.Flags.custom({description:"Only list themes with the given role.",options:l,env:"SHOPIFY_FLAG_ROLE"})(),name:h.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:h.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,r){await I(e,r)}};export{E as a,Y as b,C as c,u as d};
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-NEMPLS7C.js";import{a as R}from"./chunk-KUNDCAQN.js";import{O as I,P as E,Q as x,sa as F}from"./chunk-ACTDYTAV.js";import{b as k}from"./chunk-JJJTPEMD.js";import{B as v,H as h,z as g}from"./chunk-GMTNOCMS.js";import{d as w}from"./chunk-JQISGC7D.js";import{j as A}from"./chunk-R2R6JDNH.js";import{a as y}from"./chunk-CTNBSUVU.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(o){let{developerPlatformClient:e,app:l,remoteApp:s}=o,{extensionIdentifiersBreakdown:r,versionDetails:n}=await I(e,s,o.version),i=E({localApp:l,versionAppModules:n.appModuleVersions,activeAppVersion:await e.activeAppVersion(s)});if(!await x({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:s.title,release:!0,allowUpdates:o.force||o.allowUpdates,allowDeletes:o.force||o.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:s,version:{versionId:n.uuid,appVersionId:n.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:n.versionTag??void 0,url:n.location}},n.message?`
1
+ import{a as C}from"./chunk-UZARYOLN.js";import{a as R}from"./chunk-YESGYUEL.js";import{R as I,S as E,U as x,wa as F}from"./chunk-ZZRFG6ME.js";import{b as k}from"./chunk-YEVGLC5X.js";import{B as v,H as h,z as g}from"./chunk-YFINLODF.js";import{d as w}from"./chunk-NHAUJWEG.js";import{j as A}from"./chunk-BWJIZYAG.js";import{a as y}from"./chunk-CTNBSUVU.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(o){let{developerPlatformClient:e,app:l,remoteApp:s}=o,{extensionIdentifiersBreakdown:r,versionDetails:n}=await I(e,s,o.version),i=E({localApp:l,versionAppModules:n.appModuleVersions,activeAppVersion:await e.activeAppVersion(s)});if(!await x({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:s.title,release:!0,allowUpdates:o.force||o.allowUpdates,allowDeletes:o.force||o.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:s,version:{versionId:n.uuid,appVersionId:n.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:n.versionTag??void 0,url:n.location}},n.message?`
2
2
  ${n.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
3
3
 
4
4
  `:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class o extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionWithoutMarkdown();static flags={...k,...R,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(o),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let s=e["allow-updates"],r=e["allow-deletes"],n=!!(s&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await F({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:n,allowUpdates:s,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};
@@ -1,3 +1,3 @@
1
- import{a as E}from"./chunk-DQCIORGH.js";import{e as R}from"./chunk-KOVAFUYN.js";import{a as j}from"./chunk-E2W5OYYM.js";import{c as O,i as k,o as x}from"./chunk-LZ3GZ7NS.js";import{p as v,v as A}from"./chunk-OORWOTAP.js";import{b as F,c as L}from"./chunk-JJJTPEMD.js";import{N as y}from"./chunk-GMTNOCMS.js";import{h as T}from"./chunk-R2R6JDNH.js";import{a as D}from"./chunk-CTNBSUVU.js";import{$a as $,Ab as n,la as w,ua as P,wb as S}from"./chunk-Y34LWI3S.js";import{d as l,i as u}from"./chunk-773TIA5M.js";import{e as q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();import{fileURLToPath as U}from"node:url";async function _(...r){let e=await $("package.json",{cwd:U(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?l(u(e),"assets",...r):l(u(e),"dist","assets",...r)}async function b(r,e,i,t,a,m){let c=await O(r)?await j(m,r.storeFqdn):void 0;if(a)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await x(e,r,a,c),o=await k(f,{method:"GET",path:i,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let h=await o.text();throw new Error(`Bad response: ${o.status}: ${h}`)}let s=await o.text();t?S(s):await I(s)}async function I(r){let e=process.env.WSL_DISTRO_NAME,i=e?`//wsl$/${e}`:"",t=await _("speedscope","index.html");n(`[Theme Profile] Resolved URL to open: ${t}`);let a="liquid-profile",m=Buffer.from(r).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(m)})`,f=`speedscope-${Number(new Date)}-${process.pid}`,o=l(w(),`${f}.js`);n(`[Theme Profile] writing JS file to: ${o}`),await P(o,c),n(`[Theme Profile] JS file created successfully: ${o}`),t=`${i}${t}`,o=`${i}${o}`,t+=`#localProfilePath=${o}`;let s=l(w(),`${f}.html`);n(`[Theme Profile] writing HTML file to: ${s}`),await P(s,`<script>window.location=${JSON.stringify(t)}</script>`),n(`[Theme Profile] HTML file created successfully: ${s}`),s=`${i}${s}`,t=`file://${s}`,n(`[Theme Profile] Opening URL: ${t}`);let h=await y(t);n(`[Theme Profile] URL opened successfully: ${h}`)}var d=q(D(),1);var g=class extends A{static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
1
+ import{a as j}from"./chunk-NQK2VCDA.js";import{c as O,i as k,o as x}from"./chunk-YKL3BLWC.js";import{a as E}from"./chunk-ZYX7UHCQ.js";import{e as R}from"./chunk-GRPKF5ZB.js";import{p as v,v as A}from"./chunk-GNBRCK7L.js";import{b as F,c as L}from"./chunk-YEVGLC5X.js";import{N as y}from"./chunk-YFINLODF.js";import{h as T}from"./chunk-BWJIZYAG.js";import{a as D}from"./chunk-CTNBSUVU.js";import{$a as $,Ab as n,la as w,ua as P,wb as S}from"./chunk-VFM2KQRM.js";import{d as l,i as u}from"./chunk-773TIA5M.js";import{e as q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();import{fileURLToPath as U}from"node:url";async function _(...r){let e=await $("package.json",{cwd:U(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?l(u(e),"assets",...r):l(u(e),"dist","assets",...r)}async function b(r,e,i,t,a,m){let c=await O(r)?await j(m,r.storeFqdn):void 0;if(a)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await x(e,r,a,c),o=await k(f,{method:"GET",path:i,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let h=await o.text();throw new Error(`Bad response: ${o.status}: ${h}`)}let s=await o.text();t?S(s):await I(s)}async function I(r){let e=process.env.WSL_DISTRO_NAME,i=e?`//wsl$/${e}`:"",t=await _("speedscope","index.html");n(`[Theme Profile] Resolved URL to open: ${t}`);let a="liquid-profile",m=Buffer.from(r).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(m)})`,f=`speedscope-${Number(new Date)}-${process.pid}`,o=l(w(),`${f}.js`);n(`[Theme Profile] writing JS file to: ${o}`),await P(o,c),n(`[Theme Profile] JS file created successfully: ${o}`),t=`${i}${t}`,o=`${i}${o}`,t+=`#localProfilePath=${o}`;let s=l(w(),`${f}.html`);n(`[Theme Profile] writing HTML file to: ${s}`),await P(s,`<script>window.location=${JSON.stringify(t)}</script>`),n(`[Theme Profile] HTML file created successfully: ${s}`),s=`${i}${s}`,t=`file://${s}`,n(`[Theme Profile] Opening URL: ${t}`);let h=await y(t);n(`[Theme Profile] URL opened successfully: ${h}`)}var d=q(D(),1);var g=class extends A{static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
2
2
 
3
3
  This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;static description=this.descriptionWithoutMarkdown();static flags={...F,...v,theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:d.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":d.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...L};static multiEnvironmentsFlags=null;async command(e,i){let{password:t}=e,a;e.theme?a={filter:{theme:e.theme}}:a={filter:{live:!0}};let m=await E(i,a),c=[{title:`Generating Liquid profile for ${i.storeFqdn} ${e.url}`,task:async()=>{await b(i,m.id.toString(),e.url,e.json,t,e["store-password"])}}];await R(c)}};export{g as a};
@@ -0,0 +1,2 @@
1
+ import{W as X,ca as z,da as j,ea as v,fa as J,ga as A,ha as W,ia as k,ja as q,ka as N,la as B,ma as L,na as K,oa as R,pa as Q}from"./chunk-ZZRFG6ME.js";import{c as H}from"./chunk-CEYIZC3M.js";import{b as T,e as G,m as l}from"./chunk-XOCB4KNX.js";import{D as x,z as U}from"./chunk-YFINLODF.js";import{h as C,j as P}from"./chunk-BWJIZYAG.js";import{Ta as V,X as c,_ as b,qa as F,sb as $,wa as I,ya as D}from"./chunk-VFM2KQRM.js";import{d as E,j as M}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
+ `)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-WCRZJY3P.js";import{b as e}from"./chunk-RY2SJVWM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-CIWKN4HF.js";import{b as e}from"./chunk-2XDUJQQN.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{p,v as d}from"./chunk-OORWOTAP.js";import{a as u}from"./chunk-QKGZWOOY.js";import{aa as w}from"./chunk-PIFW2R3S.js";import{b as l}from"./chunk-JJJTPEMD.js";import{z as f}from"./chunk-GMTNOCMS.js";import{h as i}from"./chunk-R2R6JDNH.js";import{Ta as c,ma as h}from"./chunk-Y34LWI3S.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as _,g as o}from"./chunk-VKWPEFWQ.js";o();o();var g=_(w(),1),P=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await k(e),s=`${e}/${t}`,n=`${e}/(${P})`;await u({inputDirectory:e,outputZipPath:s,matchFilePattern:n}),f({body:["Your local theme was packaged in",{filePath:m(s)}]})}async function k(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let s=await v(t);if(s===void 0||s.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[s.theme_name,s.theme_version].filter(Boolean).join("-")}.zip`}async function v(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(s=>s.name==="theme_info")}var a=class extends d{static summary="Package your theme into a .zip file, ready to upload to the Online Store.";static descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
1
+ import{p,v as d}from"./chunk-GNBRCK7L.js";import{a as u}from"./chunk-C4YLE3NS.js";import{aa as w}from"./chunk-F3NYCSXT.js";import{b as l}from"./chunk-YEVGLC5X.js";import{z as f}from"./chunk-YFINLODF.js";import{h as i}from"./chunk-BWJIZYAG.js";import{Ta as c,ma as h}from"./chunk-VFM2KQRM.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as _,g as o}from"./chunk-VKWPEFWQ.js";o();o();var g=_(w(),1),P=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await k(e),s=`${e}/${t}`,n=`${e}/(${P})`;await u({inputDirectory:e,outputZipPath:s,matchFilePattern:n}),f({body:["Your local theme was packaged in",{filePath:m(s)}]})}async function k(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let s=await v(t);if(s===void 0||s.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[s.theme_name,s.theme_version].filter(Boolean).join("-")}.zip`}async function v(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(s=>s.name==="theme_info")}var a=class extends d{static summary="Package your theme into a .zip file, ready to upload to the Online Store.";static descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
2
2
 
3
3
  Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
4
4
 
@@ -0,0 +1,15 @@
1
+ import{A as h,C,D as V,F as Le,I as $e,a as Me,h as J,u as _}from"./chunk-XOCB4KNX.js";import{c as we}from"./chunk-6RQOEPEC.js";import{A as Fe,B,D as w,M as De,N as _e,Q as H,U as F,ea as Ve,g as Ne,ga as W,j as Se,la as y,ma as E,n as ge,pa as I,qa as Ae,r as ye,ra as D,s as he,v as u,z as b}from"./chunk-3JXPOOFV.js";import{b as Te}from"./chunk-ZDF5N422.js";import{w as j}from"./chunk-Y5PRPHLQ.js";import{D as ze,E as xe,F as Re,I as qe,J as Pe,T as Ee,z as Ie}from"./chunk-YFINLODF.js";import{a as ke}from"./chunk-VASGXHYA.js";import{b as be}from"./chunk-YZMY2CTU.js";import{h as p,k as z}from"./chunk-BWJIZYAG.js";import{Ab as G,N as A,Ta as fe,ma as ve,qb as Ue,sb as x,wb as Oe}from"./chunk-VFM2KQRM.js";import{i as K}from"./chunk-B4OMIONW.js";import{f as Ce}from"./chunk-R6ICQT2D.js";import{e as P,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();function Be(n){return ge`
2
+ query OrganizationBetaFlags($organizationId: OrganizationID!) {
3
+ organization(organizationId: $organizationId) {
4
+ id
5
+ ${n.map(e=>`flag_${e}: hasFeatureFlag(handle: "${e}")`).join(`
6
+ `)}
7
+ }
8
+ }`}r();var He={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OrganizationExpFlags"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}},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:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"enabledFlags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"flagHandles"},value:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}}}]},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Q=class extends p{},T=class extends p{constructor(e,i){let a="unknown",t=d=>`an ${d}`;_e(e)?(a=e.orgName,t=d=>`the ${d} organization`):De(e)&&(a=e.email,t=d=>`the ${d} user`);let o=x`${Ue.yellow(a)}`.value,l=[[`Your current active session is associated with ${t(o)} account. To start a new session with a different account, run`,{command:"shopify auth login"}],["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],["Does your account include",{subdued:"Manage app"},"permissions?, please contact the owner of the organization to grant you access."],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];i&&l.push(["Do you have access to the right Shopify Partners organization? The CLI is loading",{link:{label:"this organization",url:`https://partner.shopify.com/${i}`}}]),super("No Organization found",void 0,l)}};async function Xi(){let n=We(),e=await n.organizations();if(e.length===0){let i=await n.session();throw new T(i.accountInfo)}return e}async function ea(n,e){let i=await e.orgFromId(n);if(!i)throw new T((await e.session()).accountInfo,n);return i}async function na(n,e,i,a=["APP_DEVELOPMENT"]){let t=await i.storeByDomain(n.id,e,a);if(!t){let l=a.length===1&&a[0]==="APP_DEVELOPMENT"?"Ensure you have provided the correct store domain, that the store is a dev store, and that you have access to the store.":"Ensure you have provided the correct store domain and that you have access to the store.";throw new Q(`Could not find store for domain ${e} in organization ${n.businessName}.`,l)}return t}r();var U;(function(n){n.Partners="Partners",n.BusinessPlatform="BusinessPlatform"})(U||(U={}));r();var Yn=_.extend({application_url:J(u.string({required_error:"Valid URL is required"})),embedded:u.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:u.object({url:J(u.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),Zn={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},Y="app_home",Xn=h({identifier:Y,schema:Yn,transformConfig:Zn,patchWithAppDevURLs:(n,e)=>{n.application_url=e.applicationUrl},getDevSessionUpdateMessages:async n=>[`Using URL: ${n.application_url}`]}),ma=Xn;r();var ei=_.extend({name:u.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:u.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(n=>n&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(n),{message:"String can't contain special characters"}).optional()}),ni={name:"name",app_handle:"handle"},Z="branding",ii=h({identifier:Z,schema:ei,transformConfig:ni}),fa=ii;r();var je={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"websocketUrl"},value:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"manifest"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}},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:"devSessionUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"manifest"},value:{kind:"Variable",name:{kind:"Name",value:"manifest"}}},{kind:"Argument",name:{kind:"Name",value:"inheritedModuleUids"},value:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{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:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Je={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchStoreByDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ShopFilterInput"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{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:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Qe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListAppDevStores"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_TYPE"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"app_development",block:!1}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_STATUS"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"ACTIVE",block:!1}}]}]}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{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:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ye={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DevStoreCapReached"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devStoreCapReached"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ze={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ProvisionShopAccess"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationUserProvisionShopAccessInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationUserProvisionShopAccess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationUserProvisionShopAccessInput"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Xe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ActiveAppReleaseFromApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AppVersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AppVersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"App"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"organizationId"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"grantedShopifyApprovalScopes"}}]}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]}}]}}]};r();var X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReleaseVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appReleaseCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"versionId"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"release"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var en={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"metadata"}},type:{kind:"NamedType",name:{kind:"Name",value:"VersionMetadataInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appVersionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}},{kind:"Argument",name:{kind:"Name",value:"metadata"},value:{kind:"Variable",name:{kind:"Name",value:"metadata"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}}]};r();var nn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAssetURL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SourceExtension"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appRequestSourceUploadUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sourceExtension"},value:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceUploadUrl"}},{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"}}]}}]}}]};r();var an={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"createdBy"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versionsCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var on={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppInstallCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"installCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var rn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"initialVersion"},value:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{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:"category"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var dn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchSpecifications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"specifications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"features"}},{kind:"Field",name:{kind:"Name",value:"uidStrategy"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"appModuleLimit"}},{kind:"Field",name:{kind:"Name",value:"isClientProvided"}}]}},{kind:"Field",name:{kind:"Name",value:"validationSchema"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonSchema"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var sn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"listApps"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{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"}}]}},{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:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ln={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganizations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var mn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{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"}}]}}]}}]};r();var un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"availableTopics"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableTopics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}}]}]}}]};r();var cn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CliTesting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"address"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"topic"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cliTesting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}},{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}},{kind:"Argument",name:{kind:"Name",value:"deliveryMethod"},value:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}}},{kind:"Argument",name:{kind:"Name",value:"sharedSecret"},value:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}}},{kind:"Argument",name:{kind:"Name",value:"topic"},value:{kind:"Variable",name:{kind:"Name",value:"topic"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headers"}},{kind:"Field",name:{kind:"Name",value:"samplePayload"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var pn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var kn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"handle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"target"},arguments:[{kind:"Argument",name:{kind:"Name",value:"handle"},value:{kind:"Variable",name:{kind:"Name",value:"handle"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var vn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByApiType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();r();r();function fn(n,e){let i=ai(n);if(i)return e.addIssue(i),u.NEVER}function ai(n){let{subscriptions:e=[]}=n,i=new Set,a=[];if(!e.length)return;if(n.privacy_compliance&&n.subscriptions?.some(o=>o.compliance_topics))return{code:u.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let t=e.flatMap(o=>o.compliance_topics).filter(Boolean);if(A(t).length!==t.length)return{code:u.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[o,{uri:l,topics:d=[],compliance_topics:s=[],filter:c=""}]of e.entries()){let k=["subscriptions",o];if(!d.length&&!s.length)return{code:u.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:k};d.forEach(m=>{let v=`${m}::${l}::${c}`;if(i.has(v)){let N=c?K.dim(`
9
+
10
+ topic: ${m}
11
+ uri: ${l}
12
+ filter: ${c}`):K.dim(`
13
+
14
+ topic: ${m}
15
+ uri: ${l}`);a.push(N)}i.add(v)})}if(a.length>0){let o=a.join("");return{code:u.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${o}`,path:["subscriptions"]}}}r();function Sn(n){let e=W(n,"webhooks");if(!e)return n;let{api_version:i}=e;return{api_version:i}}function gn(n){let e={},i=W(n,"api_version");return e={...i?{webhooks:{api_version:i}}:{}},e}function yn(n){if(n.length===0)return;let e=n.filter(o=>o.topics!==void 0).flatMap(({compliance_topics:o,topics:l,...d})=>hn(l)?.map(c=>({topics:[c],...d}))??[]),i=n.filter(o=>o.topics===void 0||o.compliance_topics!==void 0).map(({compliance_topics:o,topics:l,...d})=>({compliance_topics:o,...d})),a=ri(i,"compliance_topics"),t=ti(a);return[...Nn(t),...Nn(e)]}function hn(n){return n?.sort((e,i)=>e.localeCompare(i))}function Nn(n){return n.sort((e,i)=>e.uri.localeCompare(i.uri))}function ti(n){return n.forEach(e=>e.compliance_topics=hn(e.compliance_topics)),n}function oi(n,e){return n.find(i=>i.uri===e.uri&&Ve(i.include_fields??[],e.include_fields??[])&&i.filter===e.filter)}function ri(n,e){return n.reduce((i,a)=>{let t=oi(i,a);return t?e&&a?.[e]?.length?t[e]?.push(...a[e]):(a.topics&&(t.topics??=[],t.topics.push(...a.topics)),a.compliance_topics&&(t.compliance_topics??=[],t.compliance_topics.push(...a.compliance_topics))):i.push(a),i},[])}var di=u.object({api_version:u.string({required_error:"String is required"}),privacy_compliance:u.object({customer_deletion_url:V.optional(),customer_data_request_url:V.optional(),shop_deletion_url:V.optional()}).optional(),subscriptions:u.array(Le).optional().transform(n=>yn(n??[]))}),bn=_.extend({webhooks:di.superRefine(fn)});var ee="webhooks",si={forward:Sn,reverse:n=>gn(n)},li=h({identifier:ee,schema:bn,transformConfig:si}),xt=li;r();var Fn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionTag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionByTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tag"},value:{kind:"Variable",name:{kind:"Name",value:"versionTag"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var Dn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppLogsSubscribe"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appLogsSubscribe"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopIds"},value:{kind:"Variable",name:{kind:"Name",value:"shopIds"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jwtToken"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();r();function _n(n,e){return!e||!n.startsWith("/")?n:`${C(e)}${n}`}var ne="webhook_subscription",mi=u.object({topic:u.string(),actions:u.array(u.string({invalid_type_error:"Value must be a string"})).optional(),api_version:u.string(),uri:u.preprocess(C,V,{required_error:"Missing value at"}),include_fields:u.array(u.string({invalid_type_error:"Value must be a string"})).optional(),filter:u.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:u.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:u.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function ui(n){let{api_version:e,topic:i,...a}=n;return{webhooks:{subscriptions:[{topics:[i],...a}]}}}var ci={forward:(n,e)=>{let i=n,a;return"application_url"in e&&(a=e?.application_url),{...i,uri:_n(i.uri,a)}},reverse:ui},pi=h({identifier:ne,schema:mi,transformConfig:ci,uidStrategy:"dynamic"}),jt=pi;r();r();r();var Vn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListOrganizations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"organizationsWithAccessToDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destination"},value:{kind:"EnumValue",value:"APPS_CLI"}}],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:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();function ie(n){let e=n.match(/\/(\d+)$/);return e?e[1]:void 0}function O(n){return ie(Buffer.from(n,"base64").toString("utf8"))}function ae(n){return Buffer.from(n).toString("base64")}async function R(){return(await Tn()).organizations}async function Tn(n){let e=n??await F(),a=await I({query:Vn,token:e,unauthorizedHandler:{type:"token_refresh",handler:async()=>({token:await F()})}});return a.currentUserAccount?{organizations:a.currentUserAccount.organizationsWithAccessToDestination.nodes.map(o=>{let l=O(o.id);if(l===void 0)throw new p(`Failed to decode organization ID from: ${o.id}`);return{id:l,businessName:o.name}}),currentUserResolved:!0}:{organizations:[],currentUserResolved:!1}}r();r();async function te(n){if(n.length===1)return n[0];let i=new Set(n.map(t=>t.businessName)).size<n.length,a=await Re({message:"Which organization do you want to use?",choices:n.map(t=>({label:i?`${t.businessName} (${t.id})`:t.businessName,value:t.id}))});return n.find(t=>t.id===a)}async function ki(n){let e=await R();if(e.length===0)throw new p("No organizations found.","Make sure you have access to a Shopify organization.");if(n){let i=e.find(a=>a.id===n);if(!i)throw new p(`Organization with ID ${n} not found.`,`Available organizations: ${e.map(a=>`${a.businessName} (${a.id})`).join(", ")}`);return i}return te(e)}r();function oe(n={}){return{type:"token_refresh",handler:async()=>({token:await F([],{noPrompt:n.noPrompt})})}}r();r();var An={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppDevelopmentStore"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"country"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createAppDevelopmentStore"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopName"},value:{kind:"Variable",name:{kind:"Name",value:"shopName"}}},{kind:"Argument",name:{kind:"Name",value:"priceLookupKey"},value:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}}},{kind:"Argument",name:{kind:"Name",value:"prepopulateTestData"},value:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}}},{kind:"Argument",name:{kind:"Name",value:"developerPreviewHandle"},value:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}}},{kind:"Argument",name:{kind:"Name",value:"country"},value:{kind:"Variable",name:{kind:"Name",value:"country"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shopAdminUrl"}},{kind:"Field",name:{kind:"Name",value:"shopDomain"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var wn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PollStoreCreation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"storeCreation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopDomain"},value:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var In={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},re=Object.keys(In),vi=2,fi=300*1e3;function Ni(n){switch(n){case"CALLING_CORE":return"Initiating store creation";case"AWAITING_CORE_STORE_READY":return"Waiting for store to be ready";case"FINALIZING":return"Finalizing store setup";case"COMPLETE":return"Store creation complete!";case"FAILED":return"Store creation failed.";case"TIMED_OUT":return"Store creation timed out.";case"USER_ERROR":return"Store creation encountered a user error.";default:return`Store creation status: ${n}`}}async function Si(n){let{organization:e,name:i,plan:a}=n,t=await F(),o=oe(),d=(await D({query:An,token:t,organizationId:e.id,variables:{shopName:i,priceLookupKey:In[a],prepopulateTestData:n.withDemoData??!1,developerPreviewHandle:n.featurePreview,country:n.country},unauthorizedHandler:o})).createAppDevelopmentStore;if(!d)throw new p("Store creation failed: unexpected empty response.");let s=d.userErrors;if(s&&s.length>0){let m=s.map(v=>v.message).join(", ");throw new p(`Failed to create dev store: ${m}`)}let{shopDomain:c,shopAdminUrl:k}=d;if(!c)throw new p("Store creation succeeded but no shop domain was returned.");if(await qe({title:x`Waiting for store to be ready`,task:async m=>{let v=Date.now();for(;;){if(Date.now()-v>fi)throw new p("Store creation timed out after 5 minutes.");let S=(await D({query:wn,token:t,organizationId:e.id,variables:{shopDomain:c},unauthorizedHandler:o})).organization?.storeCreation?.status;if(!S)throw new p("Unable to determine store creation status.");if(S==="COMPLETE")return;if(S==="FAILED"||S==="TIMED_OUT"||S==="USER_ERROR")throw new p(`Store creation failed with status: ${S}`);m(x`${Ni(S)}`),await Ee(vi)}},renderOptions:{stdout:process.stderr}}),n.json)Oe(JSON.stringify({store:{name:i,domain:c,adminUrl:k,plan:a,...n.featurePreview?{featurePreview:n.featurePreview}:{},...n.country?{country:n.country}:{},demoData:n.withDemoData??!1},organization:{id:e.id,name:e.businessName}},null,2));else if(n.summary!==!1){let m=[];q(m,"Domain",c),m.push(["Admin",k?{link:{label:k,url:k}}:"N/A"]),q(m,"Plan",a),q(m,"Feature preview",n.featurePreview),q(m,"Country",n.country),q(m,"Demo data",n.withDemoData?"enabled":"disabled"),Ie({headline:`Dev store "${i}" created successfully.`,customSections:[{body:{tabularData:m,firstColumnSubdued:!0}}]})}return c}function q(n,e,i){i!=null&&i!==""&&n.push([e,i])}r();var gi={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function yi(){return Pe({message:"Name for the new dev store"})}function hi(){return ze({message:"Which Shopify plan do you want to use?",choices:re.map(n=>({label:gi[n],value:n}))})}function bi(){return xe({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}r();r();var zn=(n,e,i)=>{let a=new URL(n);return e&&a.searchParams.append("cursor",e),i?.status&&a.searchParams.append("status",i.status),i?.source&&a.searchParams.append("source",i.source),a.toString()};var xn=P(E()),Fi=new xn.default({minTime:150,maxConcurrent:10});async function Di(n){let e="App Management",a=`https://${await b()}/app_management/unstable/graphql.json`;return{token:n,api:e,url:a,responseOptions:{onResponse:de}}}var Rn=n=>Se(n),qn=async(n,e,i)=>{let t=`https://${await b()}/app_management/unstable/organizations/${n}/app_logs/poll`;return zn(t,e,i)};async function Pn(n){let e=n.cacheOptions?.cacheExtraKey??"",i=n.cacheOptions?{...n.cacheOptions,cacheExtraKey:e}:void 0;return Fi.schedule(async()=>y({...await Di(n.token),query:n.query,variables:n.variables,cacheOptions:i,preferredBehaviour:n.requestOptions?.requestMode,unauthorizedHandler:n.unauthorizedHandler}))}function de(n){if(!n.extensions)return;let e=[];for(let i of n.extensions.deprecations)i.supportedUntilDate&&e.push(new Date(i.supportedUntilDate));Te(e)}r();var En=P(E()),_i=new En.default({minTime:150,maxConcurrent:10});async function Cn(n){let e="App Dev",i=w(n.shopFqdn),t=`https://${await Fe(i)}/app_dev/unstable/graphql.json`,o=be()==="local"?{"x-forwarded-host":i}:void 0;return _i.schedule(()=>y({query:n.query,api:e,url:t,token:n.token,addedHeaders:o,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler,preferredBehaviour:n.requestOptions?.requestMode}))}r();var Un=P(E()),Vi=new Un.default({minTime:150,maxConcurrent:10});async function Ti(n,e,i){let a="Functions",o=`https://${await b()}/functions/unstable/organizations/${n}/${i}/graphql`;return{token:e,api:a,url:o,responseOptions:{onResponse:de}}}async function On(n){return await Vi.schedule(async()=>y({...await Ti(n.organizationId,n.token,n.appId),query:n.query,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler}))}r();var Mn=P(E()),Ai=new Mn.default({minTime:150,maxConcurrent:10});async function Ln(n){let e="Webhooks",a=`https://${await b()}/webhooks/unstable/organizations/${n.organizationId}/graphql.json`;return Ai.schedule(()=>y({query:n.query,api:e,url:a,token:n.token,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler}))}import{randomUUID as wi}from"crypto";var $n="https://cdn.shopify.com/static/cli/extensions/templates.json",Ii=wi(),L=class n{static instance;static getInstance(e){return n.instance??=new n(e),n.instance}static resetInstance(){n.instance=void 0}clientName=$.AppManagement;webUiName="Developer Dashboard";organizationSource=U.BusinessPlatform;bundleFormat="br";_session;constructor(e){this._session=e}async subscribeToAppLogs(e,i){return this.appManagementRequest({query:Dn,variables:{shopIds:e.shopIds,apiKey:e.apiKey}})}async appLogs(e,i){let a=await Li({organizationId:i,jwtToken:e.jwtToken,cursor:e.cursor,filters:e.filters});try{let t=await a.json();return a.ok?{app_logs:t.app_logs??[],cursor:t.cursor,status:a.status}:{errors:t.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(t){return{errors:[`Failed to parse response: ${t}`],status:a.status}}}async session(){if(!this._session){if(Ce())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let e=await H(),{appManagementToken:i,businessPlatformToken:a,userId:t}=e,o=await I({query:mn,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:t},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(Ne()&&o.currentUserAccount){let l=o.currentUserAccount.organizations.nodes.map(d=>({name:d.name}));if(l.length>1)throw new z("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:l[0]?.name??"Unknown organization"},userId:t}}else o.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:o.currentUserAccount.email},userId:t}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:t}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let e=await H({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=e.appManagementToken,i.businessPlatformToken=e.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(e){let{app:i}=await this.activeAppVersionRawResult(e);if(!i)return;let{name:a,appModules:t}=i.activeRelease.version,o=t.find(d=>d.specification.externalIdentifier==="app_home"),l=i.activeRoot.clientCredentials.secrets.map(d=>({secret:d.key}));return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:l,organizationId:String(f(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:o?.config?.app_url,embedded:o?.config?.embedded,flags:[],developerPlatformClient:this}}async organizations(){return(await R()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(e){let a={organizationId:se(e)},o=(await this.businessPlatformRequest({query:ln,variables:a,cacheOptions:{cacheTTL:{hours:6}}})).currentUserAccount?.organization;if(o)return{id:e,businessName:o.name,source:this.organizationSource}}async orgAndApps(e){let[i,{apps:a,hasMorePages:t}]=await Promise.all([this.orgFromId(e),this.appsForOrg(e)]);if(!i){let{accountInfo:o}=await this.session();throw new T(o,e)}return{organization:i,apps:a,hasMorePages:t}}async appsForOrg(e,i=""){let a=sn,t={query:i.split(" ").filter(d=>d).map(d=>`title:${d}`).join(" "),organizationId:e},o=await this.appManagementRequest({query:a,variables:t});if(!o.appsConnection)throw new z("Server failed to retrieve apps");return{apps:o.appsConnection.edges.map(d=>{let s=d.node;return{id:s.id,apiKey:s.key,title:s.activeRelease.version.name,organizationId:e}}),hasMorePages:o.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:e}){let i=dn,a={organizationId:le(e)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(o=>({name:o.name,externalName:o.name,identifier:o.identifier,externalIdentifier:o.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:o.uidStrategy.appModuleLimit,uidStrategy:Mi(o.uidStrategy.__typename),experience:me(o.experience,o.identifier),validationSchema:o.validationSchema}))}async templateSpecifications({organizationId:e},i={}){let a,{templatesJsonPath:t}=Me,o=process.env[t];if(o){if(!await fe(o))throw new p("There is no file at the path specified for template specifications");let m=await ve(o);a=JSON.parse(m)}else try{a=await(await ye($n)).json()}catch{throw new p(["Failed to fetch extension templates from",{link:{url:$n}},{char:"."},"This likely means a problem with your internet connection."])}let l=0,d=i.requestedTemplate?a.filter(m=>m.identifier===i.requestedTemplate):void 0,s=d&&d.length>0?d:a,c=(await Oi(s,async m=>this.organizationBetaFlags(e,m),async m=>this.organizationExpFlags(e,m))).map(m=>({...m,sortPriority:l++})),k=[];for(let m of a)m.group&&!k.includes(m.group)&&k.push(m.group);return{templates:c,groupOrder:k}}async createApp(e,i){let t=(await this.apiVersions(e.id)).publicApiVersions.filter(m=>m!=="unstable").sort().at(-1)??"unstable",o=Ri(i,e.id,t),l=rn,d=await this.appManagementRequest({query:l,variables:o});if(!d.appCreate.app||d.appCreate.userErrors?.length>0){let m=d.appCreate.userErrors.map(v=>v.message).join(", ");throw new p(m)}let s=Kn([]),c=d.appCreate.app,k=c.activeRoot.clientCredentials.secrets.map(m=>({secret:m.key}));return{...c,title:i.name,apiKey:c.key,apiSecretKeys:k,grantedScopes:i?.scopesArray??[],organizationId:e.id,newApp:!0,flags:s,developerPlatformClient:this}}async devStoresForOrg(e,i){let a=await this.businessPlatformOrganizationsRequest({query:Qe,organizationId:String(f(e)),variables:{searchTerm:i}}),t=a.organization;if(!t)throw new p("No organization found");let o=t.accessibleShops?.edges.map(d=>d.node)??[],l=jn(t.currentUser?.organizationPermissions??[]);return{stores:Bn(o,l),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(e){return(await this.businessPlatformOrganizationsRequest({query:Ye,organizationId:String(f(e)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(e,i){let a=i??await this.activeAppVersion(e),t=[],o=[],l=[];return a.appModuleVersions.forEach(d=>{let s={id:d.registrationId,uuid:d.registrationUuid,title:d.registrationTitle,type:d.type,activeVersion:d.config?{config:JSON.stringify(d.config),...d.target&&{context:d.target}}:void 0};d.specification?.experience==="configuration"?t.push(s):d.specification?.options?.managementExperience==="dashboard"?l.push(s):o.push(s)}),{app:{dashboardManagedExtensionRegistrations:l,configurationRegistrations:t,extensionRegistrations:o}}}async appVersions({id:e,organizationId:i,title:a}){let t=tn,o={appId:e},l=await this.appManagementRequest({query:t,variables:o});return{app:{id:l.app.id,organizationId:i,title:a,appVersions:{nodes:l.app.versions?.edges.map(d=>{let s=d.node;return{createdAt:s.createdAt,createdBy:{displayName:s.createdBy},versionTag:s.metadata.versionTag,status:s.id===l.app.activeRelease.version.id?"active":"inactive",versionId:s.id,message:s.metadata.message}})??[],pageInfo:{totalResults:l.app.versionsCount}}}}}async appInstallCount({id:e}){let i=on,a={appId:e};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:e,organizationId:i},a){let t=Fn,o={versionTag:a},d=(await this.appManagementRequest({query:t,variables:o})).versionByTag;if(!d)throw new p(`Version not found for tag: ${a}`);return{id:parseInt(d.id,10),uuid:d.id,versionTag:d.metadata.versionTag,location:[await M({organizationId:i,id:e}),"versions",f(d.id)].join("/"),message:d.metadata.message??"",appModuleVersions:d.appModules.map(Hn)}}async appVersionsDiff(e,{versionId:i}){let a={versionId:i},[t,o]=await Promise.all([this.activeAppVersionRawResult(e.apiKey),this.appManagementRequest({query:an,variables:a})]),l=t.app.activeRelease.version.appModules,d=o.version.appModules,{added:s,removed:c,updated:k}=Ui({currentModules:l,selectedVersionModules:d});function m(v){return{uuid:v.uuid,registrationTitle:v.handle,specification:{identifier:v.specification.identifier,experience:me(v.specification.experience,v.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:s.map(m),updated:k.map(m),removed:c.map(m)}}}}async activeAppVersion(e){let i=await this.activeAppVersionRawResult(e.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(Hn),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:e,organizationId:i}){let a={sourceExtension:"BR",organizationId:le(i)},t=await this.appManagementRequest({query:nn,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${e}-${Ii}`}});return{assetUrl:t.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:t.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:e,appId:i,organizationId:a,versionTag:t,message:o,commitReference:l,bundleUrl:d,skipPublish:s}){let m={appId:i,version:d?{sourceUrl:d}:{source:e},metadata:{versionTag:t,message:o,sourceControlUrl:l}},v=await this.appManagementRequest({query:en,variables:m,requestOptions:{requestMode:"slow-request"}}),{version:N}=v.appVersionCreate,S=v.appVersionCreate.userErrors.map(Wn)??[];if(!N)return{appDeploy:{userErrors:S}};let g={appDeploy:{appVersion:{uuid:N.id,id:parseInt(N.id,10),versionTag:N.metadata.versionTag,location:await Ci(a,i,N.id),appModuleVersions:N.appModules.map(pe=>({uuid:pe.uuid,registrationUuid:pe.uuid,validationErrors:[]})),message:N.metadata.message},userErrors:S}};if(s)return g;let Qn={appId:i,versionId:N.id},ce=await this.appManagementRequest({query:X,variables:Qn});return ce.appReleaseCreate.userErrors&&(g.appDeploy.userErrors=(g.appDeploy.userErrors??[]).concat(ce.appReleaseCreate.userErrors.map(Wn))),g}async release({app:{id:e,organizationId:i},version:{versionId:a}}){let t={appId:e,versionId:a},o=await this.appManagementRequest({query:X,variables:t});return o.appReleaseCreate.release?{appRelease:{appVersion:{versionTag:o.appReleaseCreate.release.version.metadata.versionTag,message:o.appReleaseCreate.release.version.metadata.message,location:[await M({organizationId:i,id:e}),"versions",f(o.appReleaseCreate.release.version.id).toString()].join("/")}}}:{appRelease:{userErrors:o.appReleaseCreate.userErrors?.map(l=>({field:l.field,message:l.message,category:l.category,details:[],on:l.on}))??[]}}}async storeByDomain(e,i,a){let o=(await Promise.all(a.map(s=>this.businessPlatformOrganizationsRequest({query:Je,organizationId:String(f(e)),variables:{domain:i,filters:$i(s)}})))).map(s=>s.organization).filter(s=>s!=null);if(o.length===0)throw new p("No organization found");let l=o.flatMap(s=>{let c=s.accessibleShops?.edges.map(m=>m.node)??[],k=jn(s.currentUser?.organizationPermissions??[]);return Bn(c,k)}),d=w(i);return l.find(s=>s.shopDomain===d)}async ensureUserAccessToStore(e,i){if(!i.provisionable)return;let t={input:{shopifyShopId:Pi(i.shopId)}},l=(await D({query:Ze,token:await this.businessPlatformToken(),organizationId:String(f(e)),variables:t,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!l.success){let d=l.userErrors?.map(s=>s.message).join(", ")??"";throw new z(`Failed to provision user access to store: ${d}`)}}async sendSampleWebhook(e,i){let a=cn,t={address:e.address,apiKey:e.api_key,apiVersion:e.api_version,deliveryMethod:e.delivery_method,sharedSecret:e.shared_secret,topic:e.topic},o=await this.webhooksRequest({organizationId:i,query:a,variables:t}),l={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},d=o.cliTesting;return d&&(l={samplePayload:d.samplePayload??"{}",headers:d.headers??"{}",success:d.success,userErrors:d.errors.map(s=>({message:s,fields:[]}))}),{sendSampleWebhook:l}}async apiVersions(e){return{publicApiVersions:(await this.webhooksRequest({organizationId:e,query:pn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:e},i){let a=un,t={apiVersion:e};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:t})).availableTopics??[]}}async updateURLs(e){return G("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(f(t.id));return(await this.functionsRequest({organizationId:a,query:kn,appId:o,variables:{handle:e.handle,version:e.version}}))?.target?.api?.schema?.definition??null}catch(t){throw new p(`Failed to fetch schema definition: ${t}`)}}async apiSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(f(t.id));return(await this.functionsRequest({organizationId:a,query:vn,appId:o,variables:e}))?.api?.schema?.definition??null}catch(t){throw new p(`Failed to fetch schema definition: ${t}`)}}toExtensionGraphQLType(e){return e.toLowerCase()}async appDeepLink({id:e,organizationId:i}){return M({id:e,organizationId:i})}async devSessionCreate({appId:e,assetsUrl:i,shopFqdn:a,websocketUrl:t}){let o=String(f(e));return this.appDevRequest({query:je,shopFqdn:a,variables:{appId:o,assetsUrl:i??"",websocketUrl:t},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:e,assetsUrl:i,shopFqdn:a,manifest:t,inheritedModuleUids:o}){let d={appId:String(f(e)),assetsUrl:i,manifest:JSON.stringify(t),inheritedModuleUids:o};return this.appDevRequest({query:Ke,shopFqdn:a,variables:d})}async devSessionDelete({appId:e,shopFqdn:i}){let a=String(f(e));return this.appDevRequest({query:Ge,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(e){let i=`https://${await B()}/dashboard/${e.id}/stores`;return[`Looks like you don't have any dev stores associated with ${e.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(e){return this.appManagementRequest({query:Xe,variables:{apiKey:e}})}async organizationBetaFlags(e,i){let a={organizationId:se(e)},t=await Ae({query:Be(i),token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={};return i.forEach(l=>{o[l]=!!t.organization[`flag_${l}`]}),o}async organizationExpFlags(e,i){let a={organizationId:se(e),flagHandles:i},t=await D({query:He,token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={},l=t.organization?.enabledFlags??[];return i.forEach((d,s)=>{o[d]=!!l[s]}),o}async appManagementRequest(e){return Pn({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(e){return Cn({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(e){return I({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(e){return D({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(e){return On({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(e){return Ln({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(e="default"){return Gn(this,e)}},zi="https://shopify.dev/apps/default-app-home",xi="https://shopify.dev/apps/default-app-home/api/auth";function Ri(n,e,i){let{isLaunchable:a,scopesArray:t,name:o}=n;return{initialVersion:{source:{source:{name:o,modules:[{type:Y,config:{app_url:a?"https://example.com":zi,embedded:!0}},{type:Z,config:{name:o}},{type:ee,config:{api_version:i}},{type:$e,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":xi],...t&&{scopes:t.map(c=>c.trim()).join(",")}}}]}}.source},organizationId:le(e)}}function qi(n){let e=n.startsWith("gid://")?f(n):Number(n);if(Number.isNaN(e))throw new Error(`Invalid organization ID: ${n}`);return`gid://organization/Organization/${e}`}function se(n){return ae(qi(n))}function le(n){return`gid://shopify/Organization/${n.startsWith("gid://")?f(n):Number(n)}`}function Pi(n){return ae(`gid://organization/ShopifyShop/${n}`)}function Ei(n){let e=O(n);if(e===void 0)throw new Error(`Invalid encoded GID: ${n}`);return e}function f(n){if(n.startsWith("gid://")){let e=ie(n);if(e===void 0)throw new Error(`Invalid GID: ${n}`);return Number(e)}return Number(n)}async function M({id:n,organizationId:e}){let i=f(e).toString();return`https://${await B()}/dashboard/${i}/apps/${f(n)}`}async function Ci(n,e,i){return`${await M({organizationId:n,id:e})}/versions/${f(i)}`}function Ui({currentModules:n,selectedVersionModules:e}){let i=n.map(s=>s.userIdentifier),a=e.map(s=>s.userIdentifier),t=e.filter(s=>!i.includes(s.userIdentifier)),o=n.filter(s=>!a.includes(s.userIdentifier)),l=o.map(s=>s.userIdentifier),d=n.filter(s=>!l.includes(s.userIdentifier));return{added:t,removed:o,updated:d}}async function Oi(n,e,i,a=ke){let t=A(n.flatMap(s=>s.organizationBetaFlags??[])),o=A(n.flatMap(s=>s.organizationExpFlags??[])),[l,d]=await Promise.all([t.length>0?e(t):Promise.resolve({}),o.length>0?i(o):Promise.resolve({})]);return n.filter(s=>{let c=!s.organizationBetaFlags||s.organizationBetaFlags.every(g=>l[g]),k=!s.organizationExpFlags||s.organizationExpFlags.every(g=>d[g]),m=!s.minimumCliVersion||j(a,`>=${s.minimumCliVersion}`),v=!s.deprecatedFromCliVersion||j(a,`<${s.deprecatedFromCliVersion}`),N=m&&v,S=we(a)&&s.deprecatedFromCliVersion===void 0;return c&&k&&(N||S)})}function me(n,e){if(e===ne)return"configuration";switch(n){case"extension":case"configuration":case"deprecated":return n;default:return G(`Unknown specification experience value "${n}", defaulting to "extension"`),"extension"}}function Mi(n){switch(n){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function Bn(n,e){return n.map(i=>{let{externalId:a,primaryDomain:t,name:o,url:l,storeType:d}=i,s=l??t;if(!s)throw new z("The selected store does not have a valid URL");return{shopId:a?Ei(a):void 0,link:t,shopDomain:w(s),shopName:o,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:e,storeType:d}})}function Hn(n){return{registrationId:n.userIdentifier===n.uuid?"":n.userIdentifier,registrationUuid:n.uuid,registrationTitle:n.handle,type:n.specification.externalIdentifier,config:n.config,target:n.target??"",specification:{...n.specification,identifier:n.specification.identifier,options:{managementExperience:n.specification.managementExperience},experience:me(n.specification.experience,n.specification.externalIdentifier)}}}var Li=async({organizationId:n,jwtToken:e,cursor:i,filters:a})=>{let t=await qn(n,i,a),o=Rn(e);return he(t,{method:"GET",headers:o})};function Wn(n){let e=[],i=n.on[0]?.user_identifier;return i&&e.push({extension_id:i}),{...n,details:e}}function $i(n){return[{field:"STORE_TYPE",operator:"EQUALS",value:n.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function jn(n){return n.includes("ondemand_access_to_stores")}var $;(function(n){n.AppManagement="app-management",n.Partners="partners"})($||($={}));function We(){return L.getInstance()}var Jn;Jn||(Jn={});var Bi={};function Kn(n=[]){let e=[],i=n.map(a=>Bi[a]);return e.filter(a=>!i.includes(a))}var ue=new WeakMap;function Gn(n,e="default"){return{type:"token_refresh",handler:async()=>{let i=ue.get(n);if(i)await i;else try{i=n.unsafeRefreshToken(),ue.set(n,i),await i}finally{ue.delete(n)}let a=await n.session();return{token:e==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{O as a,Tn as b,te as c,ki as d,oe as e,re as f,Si as g,yi as h,hi as i,bi as j,_n as k,ne as l,jt as m,yn as n,ri as o,bn as p,U as q,Y as r,ma as s,Z as t,fa as u,ee as v,xt as w,qi as x,$ as y,We as z,Gn as A,Q as B,T as C,Xi as D,ea as E,na as F};
@@ -1 +1 @@
1
- import{b as a,g as c,i as p,j as f}from"./chunk-4JY2P2A5.js";import{k as h}from"./chunk-R2R6JDNH.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
1
+ import{b as a,g as c,i as p,j as f}from"./chunk-5SEEDOQ5.js";import{k as h}from"./chunk-BWJIZYAG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-OUZGGWFN.js";import{a as e}from"./chunk-KUNDCAQN.js";import{B as s,ta as p,y as n}from"./chunk-ACTDYTAV.js";import{b as r}from"./chunk-JJJTPEMD.js";import{a as d}from"./chunk-CTNBSUVU.js";import{e as l,g as i}from"./chunk-VKWPEFWQ.js";i();var f=l(d(),1);var{config:F,...u}=e,o=class m extends c{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static description=this.descriptionWithoutMarkdown();static usage="app config use [config] [flags]";static flags={...r,...u};static args={config:f.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:a}=await this.parse(m),{app:g}=await p({directory:t.path,userProvidedConfigName:a.config});return await s(t.path),await n({directory:t.path,configName:a.config,reset:t.reset}),{app:g}}};export{o as a};
1
+ import{a as c}from"./chunk-JG4HH54Q.js";import{a as e}from"./chunk-YESGYUEL.js";import{B as s,xa as p,y as n}from"./chunk-ZZRFG6ME.js";import{b as r}from"./chunk-YEVGLC5X.js";import{a as d}from"./chunk-CTNBSUVU.js";import{e as l,g as i}from"./chunk-VKWPEFWQ.js";i();var f=l(d(),1);var{config:F,...u}=e,o=class m extends c{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static description=this.descriptionWithoutMarkdown();static usage="app config use [config] [flags]";static flags={...r,...u};static args={config:f.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:a}=await this.parse(m),{app:g}=await p({directory:t.path,userProvidedConfigName:a.config});return await s(t.path),await n({directory:t.path,configName:a.config,reset:t.reset}),{app:g}}};export{o as a};