@shopify/cli 4.7.1 → 4.8.1

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 (325) hide show
  1. package/dist/analytics-32PK45SE.js +1 -0
  2. package/dist/analytics-TQHJN5PY.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-UK4WXL4G.js → chunk-22JJHQVU.js} +1 -1
  9. package/dist/{chunk-ULR25PTO.js → chunk-2BHYBR2F.js} +1 -1
  10. package/dist/{chunk-22NROZ5X.js → chunk-2R6KOKWG.js} +46 -46
  11. package/dist/{chunk-3HCWJRL6.js → chunk-32IIURQB.js} +1 -1
  12. package/dist/{chunk-YCU7ZCIG.js → chunk-33PLVLCE.js} +1 -1
  13. package/dist/{chunk-RA3WWB2S.js → chunk-36OXWMXZ.js} +1 -1
  14. package/dist/{chunk-UZVON6GP.js → chunk-3A2HLI4D.js} +1 -1
  15. package/dist/{chunk-26DH5P7S.js → chunk-3ACZB27E.js} +1 -1
  16. package/dist/{chunk-JQUEW7CB.js → chunk-3FTP36HH.js} +1 -1
  17. package/dist/{chunk-4FCS6PJY.js → chunk-3GAN6KS6.js} +1 -1
  18. package/dist/{chunk-22NWEE5U.js → chunk-3LBHSZSR.js} +1 -1
  19. package/dist/chunk-3NVQXPTU.js +1 -0
  20. package/dist/{chunk-XMQFQUUK.js → chunk-3NYK63U4.js} +1 -1
  21. package/dist/{chunk-R5EGWWZH.js → chunk-3R7OHZ4C.js} +1 -1
  22. package/dist/{chunk-5WGT45CO.js → chunk-4ARQFW35.js} +1 -1
  23. package/dist/{chunk-FELV7GWY.js → chunk-4ASQQTCD.js} +1 -1
  24. package/dist/chunk-4IG7WG6V.js +1 -0
  25. package/dist/{chunk-SCXL5UQ4.js → chunk-4QAM7ROJ.js} +1 -1
  26. package/dist/{chunk-IENBHP2S.js → chunk-4QBJ5JBX.js} +15 -16
  27. package/dist/{chunk-I2LNQKIJ.js → chunk-4QXDDAMD.js} +1 -1
  28. package/dist/{chunk-2S3GOPRL.js → chunk-562EV2EJ.js} +1 -1
  29. package/dist/{chunk-AWHS336T.js → chunk-565SON6A.js} +1 -1
  30. package/dist/{chunk-46BKAF3F.js → chunk-5AMPXLKT.js} +1 -1
  31. package/dist/chunk-5CC4QYN4.js +1 -0
  32. package/dist/{chunk-USBP7H7J.js → chunk-5G2W7QKA.js} +1 -1
  33. package/dist/{chunk-U46RPVQA.js → chunk-5PWJTOWK.js} +1 -1
  34. package/dist/{chunk-RXUOQZ32.js → chunk-5THZTE44.js} +1 -1
  35. package/dist/{chunk-N4KDWHT2.js → chunk-5U4UTFA4.js} +1 -1
  36. package/dist/{chunk-PV6T52KB.js → chunk-6633X2JU.js} +1 -1
  37. package/dist/chunk-6HMTAB2V.js +2 -0
  38. package/dist/{chunk-U3F6GPCE.js → chunk-6JC2PM43.js} +1 -1
  39. package/dist/{chunk-6R62DGJG.js → chunk-6T5AZZUI.js} +1 -1
  40. package/dist/{chunk-J2VRPZFC.js → chunk-6U4BOZ73.js} +1 -1
  41. package/dist/{chunk-UZV5H2JI.js → chunk-6USL7BKQ.js} +1 -1
  42. package/dist/{chunk-WTES5ZXR.js → chunk-7CPYFKFK.js} +1 -1
  43. package/dist/{chunk-CRP4PQU2.js → chunk-7DGVNVW3.js} +1 -1
  44. package/dist/{chunk-3KM2GKXH.js → chunk-7DJNASBC.js} +1 -1
  45. package/dist/{chunk-EMETQFFJ.js → chunk-7DLMETRR.js} +1 -1
  46. package/dist/{chunk-JJSV7HNM.js → chunk-7JG3CKDE.js} +1 -1
  47. package/dist/{chunk-WR6LRE4I.js → chunk-7USNGNVI.js} +1 -1
  48. package/dist/{chunk-6QJIGFQJ.js → chunk-AICVQH4V.js} +1 -1
  49. package/dist/{chunk-PK73ZSND.js → chunk-AINDVTMY.js} +39 -39
  50. package/dist/{chunk-5MD7GNEY.js → chunk-AVX7CIDJ.js} +1 -1
  51. package/dist/chunk-AXLLN6DZ.js +2 -0
  52. package/dist/{chunk-WOIAYH5U.js → chunk-AXMSJ46T.js} +1 -1
  53. package/dist/{chunk-4FI2YBRF.js → chunk-B3I7OMRN.js} +1 -1
  54. package/dist/{chunk-VXX4EZ7G.js → chunk-BHDFVO2R.js} +1 -1
  55. package/dist/{chunk-N7425436.js → chunk-BKYTBTQ5.js} +1 -1
  56. package/dist/{chunk-KBBITJSF.js → chunk-BMDCOBUR.js} +1 -1
  57. package/dist/{chunk-KRLEEYLL.js → chunk-CKZOLGWI.js} +1 -1
  58. package/dist/{chunk-WXSDPMIZ.js → chunk-CSAVYME2.js} +1 -1
  59. package/dist/{chunk-R2RULBBV.js → chunk-D2R7HPCT.js} +1 -1
  60. package/dist/{chunk-RM3B7AFT.js → chunk-DQVNW6EQ.js} +1 -1
  61. package/dist/chunk-DS7OKDQN.js +1 -0
  62. package/dist/chunk-E3FZRPNL.js +1 -0
  63. package/dist/{chunk-HOVIGRE4.js → chunk-E7I5YT53.js} +1 -1
  64. package/dist/chunk-EDHR546O.js +97 -0
  65. package/dist/{chunk-X5JQU6T7.js → chunk-EIBQRJTQ.js} +1 -1
  66. package/dist/{chunk-QASOHYDS.js → chunk-F2DO3R6R.js} +1 -1
  67. package/dist/{chunk-CUUCRIGC.js → chunk-F5BTQI5W.js} +1 -1
  68. package/dist/{chunk-7EUIO4ZO.js → chunk-FH36PGZH.js} +12 -12
  69. package/dist/{chunk-YFKEESYB.js → chunk-FM6VJLE7.js} +1 -1
  70. package/dist/{chunk-I6XH7XDX.js → chunk-FZUPL5YO.js} +1 -1
  71. package/dist/{chunk-5JW4JQWZ.js → chunk-GCTCRKET.js} +1 -1
  72. package/dist/{chunk-ZULQKYJ6.js → chunk-GTIBT4V6.js} +1 -1
  73. package/dist/{chunk-6ELAWKMY.js → chunk-GVEJO3WM.js} +1 -1
  74. package/dist/{chunk-HQUWYKSJ.js → chunk-GYFRTLML.js} +2 -2
  75. package/dist/{chunk-P5OQUFH6.js → chunk-GZEPWYMP.js} +1 -1
  76. package/dist/{chunk-OF6CV5R4.js → chunk-H6HILX7D.js} +1 -1
  77. package/dist/chunk-H7IQZNKR.js +1 -0
  78. package/dist/{chunk-ZBSC2KZ7.js → chunk-HEIZ3RSD.js} +1 -1
  79. package/dist/{chunk-3WV7DQMM.js → chunk-HEWKCSY7.js} +3 -3
  80. package/dist/{chunk-HRHNJFAA.js → chunk-HFRWZQOF.js} +1 -1
  81. package/dist/{chunk-PU3NATV4.js → chunk-HKSRCMQ7.js} +1 -1
  82. package/dist/{chunk-PEHLR7XP.js → chunk-HZDEDEAS.js} +1 -1
  83. package/dist/{chunk-RY4YUBG3.js → chunk-ILHEVBNU.js} +1 -1
  84. package/dist/chunk-IMSPA67L.js +5 -0
  85. package/dist/chunk-IPSY5EEL.js +1 -0
  86. package/dist/{chunk-IF6EYTHG.js → chunk-J3PS4JF2.js} +2 -2
  87. package/dist/{chunk-7S73765P.js → chunk-JDEOBIXA.js} +1 -1
  88. package/dist/{chunk-GW4JHUIA.js → chunk-JLR6X5NA.js} +1 -1
  89. package/dist/{chunk-6G5TDB45.js → chunk-JVXKDM2E.js} +1 -1
  90. package/dist/{chunk-NSZHEXZK.js → chunk-KAAC4VIW.js} +1 -1
  91. package/dist/{chunk-K3VLFPPI.js → chunk-KEUMU5TQ.js} +1 -1
  92. package/dist/{chunk-3MN3WLA2.js → chunk-KPJRLS53.js} +1 -1
  93. package/dist/{chunk-2F2DXTRI.js → chunk-L6OBJDYK.js} +1 -1
  94. package/dist/{chunk-XMJFT4WP.js → chunk-LC2BDU4B.js} +1 -1
  95. package/dist/{chunk-O4G6TE26.js → chunk-LEPENRGG.js} +1 -1
  96. package/dist/{chunk-QHLY2IID.js → chunk-LH7KQZDD.js} +1 -1
  97. package/dist/{chunk-WSCSFFLH.js → chunk-LIH7CQO7.js} +2 -2
  98. package/dist/chunk-LJO22Z6S.js +1 -0
  99. package/dist/{chunk-JNIPCLAF.js → chunk-LQGF3RKX.js} +1 -1
  100. package/dist/chunk-LTRJWOI6.js +11 -0
  101. package/dist/chunk-MA6QRENS.js +1 -0
  102. package/dist/chunk-MNTJZ6JO.js +15 -0
  103. package/dist/chunk-NQRSFMS7.js +273 -0
  104. package/dist/chunk-NV4SPMQS.js +1 -0
  105. package/dist/{chunk-7JIYJMRN.js → chunk-O2X6EVXQ.js} +1 -1
  106. package/dist/chunk-OBRMBYTG.js +1 -0
  107. package/dist/{chunk-OJSJWGP2.js → chunk-ODFOSJU3.js} +1 -1
  108. package/dist/{chunk-LKZQSER3.js → chunk-OJE7S6D4.js} +1 -1
  109. package/dist/{chunk-VXYABRFY.js → chunk-OTVZU5AQ.js} +1 -1
  110. package/dist/{chunk-27UEK3FU.js → chunk-OYFNB5RY.js} +1 -1
  111. package/dist/{chunk-SJGPJDGH.js → chunk-PCL4UWAE.js} +1 -1
  112. package/dist/{chunk-MTTBBZSR.js → chunk-PGBXHL2G.js} +1 -1
  113. package/dist/{chunk-KNVHXIEB.js → chunk-PJTRZSH4.js} +1 -1
  114. package/dist/{chunk-Y6UZW73M.js → chunk-PPC3RJDZ.js} +1 -1
  115. package/dist/{chunk-O4RHWBBM.js → chunk-PROWADZL.js} +1 -1
  116. package/dist/{chunk-PQG7XSQP.js → chunk-PSH4QKUX.js} +1 -1
  117. package/dist/chunk-PSUNX2YX.js +1 -0
  118. package/dist/{chunk-AIA7JVSJ.js → chunk-PSYQTFPK.js} +1 -1
  119. package/dist/{chunk-WMZS3Y4Z.js → chunk-PVZE65R7.js} +1 -1
  120. package/dist/{chunk-77AC3OJQ.js → chunk-QH7QOLZK.js} +1 -1
  121. package/dist/{chunk-XTXYS7LB.js → chunk-QMYCJ2TM.js} +1 -1
  122. package/dist/{chunk-O53YIDJL.js → chunk-QPT6DUMC.js} +1 -1
  123. package/dist/{chunk-IQT6LOA2.js → chunk-R4YJM7KY.js} +1 -1
  124. package/dist/{chunk-LBREJXT6.js → chunk-RAOMLN5A.js} +1 -1
  125. package/dist/{chunk-HU4GFVEN.js → chunk-RHJLAYNK.js} +1 -1
  126. package/dist/{chunk-SGIMJQEM.js → chunk-RNFZJQVV.js} +1 -1
  127. package/dist/{chunk-UAJBQEGE.js → chunk-RRQYOGEA.js} +1 -1
  128. package/dist/{chunk-DMFEYI4G.js → chunk-S5FGFQHD.js} +1 -1
  129. package/dist/chunk-SAKMJGXL.js +2 -0
  130. package/dist/{chunk-P5WLH64A.js → chunk-SEGZQCXZ.js} +1 -1
  131. package/dist/{chunk-EWS2RNM6.js → chunk-SIVRBIKH.js} +1 -1
  132. package/dist/chunk-T24RA3WI.js +1 -0
  133. package/dist/{chunk-JNVCCE6M.js → chunk-T74ECTO7.js} +1 -1
  134. package/dist/{chunk-SYF6LGQB.js → chunk-TBEG57SV.js} +1 -1
  135. package/dist/{chunk-DLSUDLXD.js → chunk-TCP4OG3D.js} +1 -1
  136. package/dist/{chunk-RY4MPX5A.js → chunk-TQNGFSCI.js} +1 -1
  137. package/dist/{chunk-HCQABTQL.js → chunk-TVQVZHNP.js} +1 -1
  138. package/dist/chunk-U42P3F7Y.js +1 -0
  139. package/dist/{chunk-ZDDLEFVO.js → chunk-U63A4OUA.js} +1 -1
  140. package/dist/{chunk-KT5MDCII.js → chunk-U7ELUEH2.js} +1 -1
  141. package/dist/{chunk-KDBKEVCF.js → chunk-UBJYXNCN.js} +1 -1
  142. package/dist/{chunk-53IU36CL.js → chunk-UBX3HUMH.js} +1 -1
  143. package/dist/{chunk-4WGJUVXS.js → chunk-UCJ3NHJH.js} +3 -3
  144. package/dist/{chunk-GJ4A4QKE.js → chunk-UMZG254H.js} +1 -1
  145. package/dist/{chunk-VPY47DBW.js → chunk-UPTF2HK6.js} +1 -1
  146. package/dist/{chunk-WEWLPJK2.js → chunk-UXL2A5UK.js} +1 -1
  147. package/dist/chunk-V6UCVTJT.js +7 -0
  148. package/dist/{chunk-4VJ6YK7U.js → chunk-VFQW2QL2.js} +1 -1
  149. package/dist/{chunk-EULSSTWY.js → chunk-VM6EBNGR.js} +1 -1
  150. package/dist/chunk-VPRDI4TT.js +5 -0
  151. package/dist/{chunk-6K3AJTNO.js → chunk-VRO6QBVN.js} +1 -1
  152. package/dist/{chunk-LKQ3EJ6Z.js → chunk-WIBPVYPN.js} +1 -1
  153. package/dist/{chunk-IX4IGE5H.js → chunk-WJEVB67Y.js} +1 -1
  154. package/dist/chunk-WLGEAJBU.js +1705 -0
  155. package/dist/chunk-WSJ5PUK6.js +3 -0
  156. package/dist/chunk-WT2KJHUO.js +2 -0
  157. package/dist/{chunk-MK7MOLLI.js → chunk-WVQZOLZJ.js} +1 -1
  158. package/dist/chunk-X3KYRBGE.js +560 -0
  159. package/dist/{chunk-Z66ZSXKB.js → chunk-X4JCATEE.js} +1 -1
  160. package/dist/{chunk-IA3XNJ56.js → chunk-XH66VYZA.js} +1 -1
  161. package/dist/{chunk-PS2UVFHP.js → chunk-XNKAPGJD.js} +1 -1
  162. package/dist/chunk-XNP7PMGC.js +6 -0
  163. package/dist/{chunk-CNMJ6QXM.js → chunk-XRVMKP53.js} +3 -3
  164. package/dist/{chunk-YXDIHVPY.js → chunk-XSUX2XAW.js} +1 -1
  165. package/dist/{chunk-PE4TV5IJ.js → chunk-XZUL2HVC.js} +1 -1
  166. package/dist/{chunk-AFT6ABDE.js → chunk-Y6DYQWQK.js} +1 -1
  167. package/dist/{chunk-GFWXVO72.js → chunk-YAA7OGRM.js} +114 -114
  168. package/dist/{chunk-ELSDVDT7.js → chunk-YMS6RVE5.js} +1 -1
  169. package/dist/{chunk-VRH3HWYA.js → chunk-YUNINHOR.js} +1 -1
  170. package/dist/{chunk-QT367CYF.js → chunk-YY2JHCIG.js} +1 -1
  171. package/dist/chunk-YZKBG7UZ.js +3 -0
  172. package/dist/chunk-ZJ6DWT36.js +3 -0
  173. package/dist/{chunk-S2WUVD7V.js → chunk-ZLMXR2XV.js} +1 -1
  174. package/dist/{chunk-K63FW7Q7.js → chunk-ZYEGQSF5.js} +1 -1
  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-QQ4DOFI3.js → conf-store-K65PEQF6.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-43ZQ5RCE.js → deprecations-2SG4PB2W.js} +1 -1
  265. package/dist/dist-L4A3SGNF.js +1 -0
  266. package/dist/dist-XXCZFNRC.js +1 -0
  267. package/dist/environments-B4OWPMPR.js +1 -0
  268. package/dist/{error-26WTDNKZ.js → error-5YQYW3V2.js} +1 -1
  269. package/dist/error-handler-3PBXTHYY.js +1 -0
  270. package/dist/{fs-Y7I3Y5IR.js → fs-FM6YDE2U.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-WBIBPIVZ.js → is-global-3FFDTC2G.js} +1 -1
  281. package/dist/{local-HF4T3FFE.js → local-W73VIWHZ.js} +1 -1
  282. package/dist/{metadata-CSQPNQP2.js → metadata-OGQEI47Y.js} +1 -1
  283. package/dist/{node-package-manager-CVEU22N7.js → node-package-manager-GSHLPD5X.js} +1 -1
  284. package/dist/notifications-system-HQNQUKLF.js +1 -0
  285. package/dist/os-6HP4QG7V.js +1 -0
  286. package/dist/{output-E6OGPGXL.js → output-MG7RJ37P.js} +1 -1
  287. package/dist/{prettier-RVUAAWC7.js → prettier-EGVCP5CY.js} +1 -1
  288. package/dist/{system-ZETSJRKS.js → system-3HTWCGQH.js} +1 -1
  289. package/dist/tsconfig.tsbuildinfo +1 -1
  290. package/dist/{ui-7TVGGEWJ.js → ui-T22J7MQF.js} +1 -1
  291. package/dist/upgrade-FZ35KTBW.js +1 -0
  292. package/dist/{version-DL4Y6DRX.js → version-KWF3XRSN.js} +1 -1
  293. package/dist/version-LJOGYA5H.js +1 -0
  294. package/dist/{workerd-EHI5ZCEV.js → workerd-RB5ZS43X.js} +1 -1
  295. package/oclif.manifest.json +903 -133
  296. package/package.json +9 -8
  297. package/dist/analytics-5SII3GTA.js +0 -1
  298. package/dist/analytics-F56E2NGH.js +0 -1
  299. package/dist/chunk-4I7TUB3K.js +0 -1
  300. package/dist/chunk-4NXLDIW5.js +0 -1
  301. package/dist/chunk-5QZHJCZM.js +0 -1
  302. package/dist/chunk-6AV6GX5W.js +0 -2
  303. package/dist/chunk-6SM4RY3I.js +0 -5
  304. package/dist/chunk-76NEIDP5.js +0 -1
  305. package/dist/chunk-BI7LE6CZ.js +0 -1
  306. package/dist/chunk-DEMZRLX5.js +0 -7
  307. package/dist/chunk-ESPT6CGE.js +0 -1
  308. package/dist/chunk-FAXNGDWI.js +0 -11
  309. package/dist/chunk-FQQXU5IN.js +0 -2
  310. package/dist/chunk-GXOFJIKQ.js +0 -559
  311. package/dist/chunk-M5Q74UZM.js +0 -3
  312. package/dist/chunk-OQWMCJLY.js +0 -3
  313. package/dist/chunk-SPE2D366.js +0 -16
  314. package/dist/chunk-TP4Z5OZT.js +0 -1382
  315. package/dist/chunk-VI5FF6SW.js +0 -1
  316. package/dist/dist-E7EGYE4D.js +0 -1
  317. package/dist/dist-WRUROUNV.js +0 -1
  318. package/dist/environments-RG64VB5R.js +0 -1
  319. package/dist/error-handler-XFH47Y75.js +0 -1
  320. package/dist/notifications-system-L3FMN6EX.js +0 -1
  321. package/dist/os-VLZLRAHR.js +0 -1
  322. package/dist/upgrade-F77O4ZDT.js +0 -1
  323. package/dist/version-3L3ANUTL.js +0 -1
  324. /package/dist/{chunk-NJPL5BTN.js → chunk-YLQ3LNNY.js} +0 -0
  325. /package/dist/{morph-77RHJICZ.js → morph-BMYYMQNX.js} +0 -0
@@ -0,0 +1 @@
1
+ import{H as A,I as O,J as z,L as P,N as x}from"./chunk-YAA7OGRM.js";import{B as L,F as D,g as $,y as l}from"./chunk-MNTJZ6JO.js";import{a as F}from"./chunk-RHJLAYNK.js";import{D as R,b as E}from"./chunk-AINDVTMY.js";import{H as N,M as v,T as y,y as g,z as k}from"./chunk-LIH7CQO7.js";import{f as _,h as d}from"./chunk-PSUNX2YX.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function b(e,t){if(t.clientName!==l.AppManagement||!t.devStoreCapReached)return!1;try{return await t.devStoreCapReached(e)}catch{return!1}}async function M(e,t,o,i="disabled"){let c=o.clientName===l.AppManagement,s=async f=>o.devStoresForOrg(t.id,f),n=i!=="disabled"&&o.clientName===l.AppManagement,r=async()=>{if(await b(t.id,o))throw new d(U,W(t.id));let f=await A(),w=await O(),u=await z(),T=await $({name:f,plan:w,withDemoData:u,organization:t,json:!1,summary:!1}),S=await I(t,T,o);return k({headline:`Dev store "${S.shopName}" created successfully.`}),S},a,h;if(n&&e.stores.length===0){if(await b(t.id,o))throw new d(U,W(t.id));if(v()===!1)throw new d("No development store was specified.",H(t.id));a=async()=>(g({body:Y(t)}),r())}else if(n&&i==="selection-option"){if(v()===!1&&(e.stores.length>1||e.hasMorePages))throw new d("No development store was specified.","Run `shopify app dev --store <store-domain>` to select a development store.");v()&&!await b(t.id,o)&&(h=r)}let m=await P({onSearchForStoresByName:s,...e,showDomainOnPrompt:c,...a?{onCreateStoreWhenEmpty:a}:{},...h?{onCreateStore:h}:{}});if(!m){if(a)throw new _;if(g({body:await o.getCreateDevStoreLink(t)}),await y(5),!await x(t))throw new _;let w=await B(t.id,o);m=await M({stores:w,hasMorePages:!1},t,o,i)}return C(m),m}async function I(e,t,o){let s;if(await N([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){try{let a=await D(e,t,o);if(a){s=a;return}}catch(a){if(!(a instanceof L))throw a}await y(3)}}}]),!s)throw new d(`The newly created development store (${t}) is not available yet.`,`Run \`shopify app dev --store ${t}\` to select it when it is ready.`);return s}async function B(e,t){let c=[];return await N([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:r}=await t.devStoresForOrg(e);if(r.length>0){c=r;return}await y(3)}}}]),c}var U="Your organization has reached its development store limit.";function Y(e){return`You don't have any dev stores associated with ${e.businessName}'s Dev Dashboard. Let's create one.`}function q(e){return`shopify store create dev --organization-id ${e} --name <store-name> --plan <plan>`}function H(e){return`Create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function W(e){return`Make a development store slot available in Dev Dashboard. Then create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function C(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new d(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new d(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function fe({appContextResult:e,storeFqdn:t,forceReselectStore:o,storeTypes:i=["APP_DEVELOPMENT"],storeCreationMode:c="disabled"}){let{app:s,organization:n,developerPlatformClient:r}=e,a,h=s.configuration.build?.dev_store_url,m=s.hiddenConfig.dev_store_url,f=h??m,u=t??(o?void 0:f),T=i.length===1&&i[0]==="APP_DEVELOPMENT";if(u)a=await D(n,u,r,i),T&&C(a);else{let S=await r.devStoresForOrg(n.id);a=await M(S,n,r,c)}return a.shopDomain=R(a.shopDomain),await V(a,o),(a.shopDomain!==f||!m)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await r.ensureUserAccessToStore(n.id,a),a}async function V(e,t){await F.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:E(e.shopDomain),store_domain:e.shopDomain})),await F.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{fe as a};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-LBREJXT6.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();var m=!1;function v(){return m}function y(){let t=0,e=!1,i=setInterval(()=>{if(!e){if(v()||t>=12e4){e=!0,clearInterval(i),u(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}t+=100}},100)}var k=async({config:a,Command:o})=>{await I(o);let t=await import("./metadata-CSQPNQP2.js"),{commandStartOptions:e}=t.getAllSensitiveMetadata();e&&await t.addSensitiveMetadata(()=>({commandStartOptions:{...e,endTime:new Date().getTime()}}));let{postrun:i}=await import("./deprecations-43ZQ5RCE.js");i(o);let{outputDebug:n}=await import("./output-E6OGPGXL.js"),r=o.id.replace(/:/g," ");n(`Completed command ${r}`),!r.includes("notifications")&&!r.includes("upgrade")&&!r.includes("send-analytics")&&await M();let{reportAnalyticsEvent:c}=await import("./analytics-F56E2NGH.js");await c({config:a,exitMode:"ok"}),m=!0};async function M(){let{versionToAutoUpgrade:a,warnIfUpgradeAvailable:o}=await import("./upgrade-F77O4ZDT.js"),t=a();if(!t){await o();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await l(t);else{let{runAtMinimumInterval:i}=await import("./conf-store-QQ4DOFI3.js");await i("auto-upgrade",{days:1},async()=>{await l(t)})}}async function l(a){let[{CLI_KIT_VERSION:o},{isMajorVersionChange:t},{outputWarn:e,outputDebug:i},{getOutputUpdateCLIReminder:n,runCLIUpgrade:r,hasBlockingAutoUpgradeNotification:c},s]=await Promise.all([import("./version-3L3ANUTL.js"),import("./version-DL4Y6DRX.js"),import("./output-E6OGPGXL.js"),import("./upgrade-F77O4ZDT.js"),import("./metadata-CSQPNQP2.js")]);if(t(o,a)){e(n(a,!0)),await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await c()){await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await r({autoupgrade:!0}),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let p=`Auto-upgrade failed: ${f}`;i(p),e(n(a)),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-XFH47Y75.js"),import("./is-global-WBIBPIVZ.js")]),_=Object.assign(new Error(p),{packageManager:w(),platform:process.platform,cliVersion:o});await g(_,"expected_error")}}async function I(a){let o=new Date().getTime();if(a&&"analyticsStopCommand"in a&&typeof a.analyticsStopCommand=="function"){let t=a.analyticsStopCommand();if(t){let e=await import("./metadata-CSQPNQP2.js"),{commandStartOptions:i}=e.getAllSensitiveMetadata();if(!i)return;await e.addSensitiveMetadata(()=>({commandStartOptions:{...i,startTime:o,startCommand:t}}))}}}export{y as a,k as b};
1
+ import{a as u}from"./chunk-RAOMLN5A.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();var m=!1;function v(){return m}function y(){let t=0,e=!1,i=setInterval(()=>{if(!e){if(v()||t>=12e4){e=!0,clearInterval(i),u(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}t+=100}},100)}var k=async({config:a,Command:o})=>{await I(o);let t=await import("./metadata-OGQEI47Y.js"),{commandStartOptions:e}=t.getAllSensitiveMetadata();e&&await t.addSensitiveMetadata(()=>({commandStartOptions:{...e,endTime:new Date().getTime()}}));let{postrun:i}=await import("./deprecations-2SG4PB2W.js");i(o);let{outputDebug:n}=await import("./output-MG7RJ37P.js"),r=o.id.replace(/:/g," ");n(`Completed command ${r}`),!r.includes("notifications")&&!r.includes("upgrade")&&!r.includes("send-analytics")&&await M();let{reportAnalyticsEvent:c}=await import("./analytics-TQHJN5PY.js");await c({config:a,exitMode:"ok"}),m=!0};async function M(){let{versionToAutoUpgrade:a,warnIfUpgradeAvailable:o}=await import("./upgrade-FZ35KTBW.js"),t=a();if(!t){await o();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await l(t);else{let{runAtMinimumInterval:i}=await import("./conf-store-K65PEQF6.js");await i("auto-upgrade",{days:1},async()=>{await l(t)})}}async function l(a){let[{CLI_KIT_VERSION:o},{isMajorVersionChange:t},{outputWarn:e,outputDebug:i},{getOutputUpdateCLIReminder:n,runCLIUpgrade:r,hasBlockingAutoUpgradeNotification:c},s]=await Promise.all([import("./version-LJOGYA5H.js"),import("./version-KWF3XRSN.js"),import("./output-MG7RJ37P.js"),import("./upgrade-FZ35KTBW.js"),import("./metadata-OGQEI47Y.js")]);if(t(o,a)){e(n(a,!0)),await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await c()){await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await r({autoupgrade:!0}),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let p=`Auto-upgrade failed: ${f}`;i(p),e(n(a)),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-3PBXTHYY.js"),import("./is-global-3FFDTC2G.js")]),_=Object.assign(new Error(p),{packageManager:w(),platform:process.platform,cliVersion:o});await g(_,"expected_error")}}async function I(a){let o=new Date().getTime();if(a&&"analyticsStopCommand"in a&&typeof a.analyticsStopCommand=="function"){let t=a.analyticsStopCommand();if(t){let e=await import("./metadata-OGQEI47Y.js"),{commandStartOptions:i}=e.getAllSensitiveMetadata();if(!i)return;await e.addSensitiveMetadata(()=>({commandStartOptions:{...i,startTime:o,startCommand:t}}))}}}export{y as a,k as b};
@@ -0,0 +1,11 @@
1
+ import{b as $}from"./chunk-IMSPA67L.js";import{a as O}from"./chunk-3NVQXPTU.js";import{a as I}from"./chunk-36OXWMXZ.js";import{i as T,wa as k}from"./chunk-YAA7OGRM.js";import{b as f}from"./chunk-WT2KJHUO.js";import{b as N,c as P}from"./chunk-WJEVB67Y.js";import{M as S,N as b}from"./chunk-AINDVTMY.js";import{y as E}from"./chunk-LIH7CQO7.js";import{d as v}from"./chunk-QMYCJ2TM.js";import{a as m}from"./chunk-4IG7WG6V.js";import{a as W}from"./chunk-CTNBSUVU.js";import{Hb as _,L as g,N as y,rb as C,sb as w,wb as A}from"./chunk-GYFRTLML.js";import{g as p,j as h}from"./chunk-773TIA5M.js";import{e as U,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(r,e,t,o,i){return i.webEnv?F(r,e,t,i):R(r,e,t,o,i)}async function F(r,e,t,{format:o}){return $(r,e,t,o)}async function R(r,e,t,o,i){if(i.format==="json"){let n=j(r.allExtensions.filter(a=>a.isReturnedAsInfo())),s={...r,packageManager:o.packageManager,nodeDependencies:o.nodeDependencies,usesWorkspaces:o.usesWorkspaces,organization:{id:t.id,businessName:t.businessName},allExtensions:n};return"realExtensions"in s&&(s.realExtensions=j(s.realExtensions)),"specifications"in s&&(s={...s,specifications:s.specifications?.map(a=>D(a))}),w`${JSON.stringify(Object.fromEntries(Object.entries(s).filter(([a])=>a!=="configSchema")),null,2)}`}else return new l(r,e,t,o,i).output()}function D(r){if("schema"in r){let{schema:e,...t}=r;return t}return r}function j(r){return r.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",u={subdued:"Not yet configured"},z="NOT LOADED",l=class{app;remoteApp;organization;project;options;constructor(e,t,o,i,n){this.app=e,this.remoteApp=t,this.organization=o,this.project=i,this.options=n}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=u;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:h(this.app.configPath)||f.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:u],["Client ID",this.remoteApp.apiKey||u],["Organization",`${this.organization.businessName} (${this.organization.id})`],["Access scopes",T(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??u],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
2
+ Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:n}=o.configuration,s=p(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),n.length>0&&t.push([" roles",n.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:p(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:p(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${f.web}`);e.push(...i.map(n=>n.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(i=>i.isReturnedAsInfo()),o=y(e.map(i=>i.type)).map(i=>{let n=e.filter(s=>s.type===i);if(n[0])return this.subtableSection(n[0].externalType,n.flatMap(s=>this.extensionSubSection(s)))});return g(o)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||z}`,{filePath:p(this.app.directory,e.directory)}],[" config file",{filePath:p(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let n of i)o.push([{error:" error"},{error:this.formattedError(n.message)}]);return o}formattedError(e){let t=e.trim();if(_())return t;let[o,...i]=t.split(`
3
+ `);return[`! ${o}`,...i.map(n=>` ${n}`)].join(`
4
+ `)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",m],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
5
+ `}${e.toUpperCase()}
6
+ `,body:{tabularData:t,firstColumnSubdued:!0}}}subtableSection(e,t){return{title:e,body:{tabularData:t,firstColumnSubdued:!0}}}};var L=U(W(),1);var d=class r extends O{static summary="Print basic information about your app and extensions.";static descriptionWithMarkdown=`The information returned includes the following:
7
+
8
+ - The app and dev store that's used when you run the [dev](https://shopify.dev/docs/api/shopify-cli/app/app-dev) command. You can reset these configurations using [\`dev --reset\`](https://shopify.dev/docs/api/shopify-cli/app/app-dev#flags-propertydetail-reset).
9
+ - The [structure](https://shopify.dev/docs/apps/tools/cli/structure) of your app project.
10
+ - The [access scopes](https://shopify.dev/docs/api/usage) your app has requested.
11
+ - System information, including the package manager and version of Shopify CLI used in the project.`;static description=this.descriptionWithoutMarkdown();static flags={...N,...I,...P,"web-env":L.Flags.boolean({hidden:!1,description:"Outputs environment variables necessary for running and deploying web/.",env:"SHOPIFY_FLAG_OUTPUT_WEB_ENV",default:!1})};async run(){let{flags:e}=await this.parse(r),{app:t,project:o,remoteApp:i,organization:n,developerPlatformClient:s}=await k({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config,unsafeTolerateErrors:!0}),a=await x(t,i,n,o,{format:e.json?"json":"text",webEnv:e["web-env"],configName:e.config,developerPlatformClient:s});return typeof a=="string"||"value"in a?A(a):E({customSections:a}),t.errors.isEmpty()||process.exit(2),{app:t}}};export{d as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-562EV2EJ.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -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-WT2KJHUO.js";import{c as we}from"./chunk-5U4UTFA4.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-AINDVTMY.js";import{b as Te}from"./chunk-ZDF5N422.js";import{w as j}from"./chunk-JLR6X5NA.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-LIH7CQO7.js";import{a as ke}from"./chunk-4IG7WG6V.js";import{b as be}from"./chunk-Y6DYQWQK.js";import{h as p,k as z}from"./chunk-PSUNX2YX.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-GYFRTLML.js";import{i as K}from"./chunk-B4OMIONW.js";import{f as Ce}from"./chunk-VFQW2QL2.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};