shopify 4.8.5 → 4.9.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 (489) hide show
  1. package/dist/analytics-EPKJADE2.js +1 -0
  2. package/dist/analytics-TVCGKQGZ.js +1 -0
  3. package/dist/assets/hydrogen/starter/package.json +1 -1
  4. package/dist/bootstrap.js +1 -3
  5. package/dist/chunk-23ITMFUO.js +3 -0
  6. package/dist/{chunk-WKTIQUQP.js → chunk-254XYKPN.js} +1 -1
  7. package/dist/{chunk-T3B6KIPU.js → chunk-2AAHKMPP.js} +1 -1
  8. package/dist/chunk-2AZXDU2R.js +3 -0
  9. package/dist/chunk-2FHVYY3B.js +1 -0
  10. package/dist/chunk-2KBTFKSM.js +1 -0
  11. package/dist/chunk-2NBNVDDA.js +1 -0
  12. package/dist/{chunk-6LNTC6EK.js → chunk-2QV5FHXJ.js} +1 -1
  13. package/dist/chunk-2RVMF4QP.js +1 -0
  14. package/dist/chunk-2TOIR7YQ.js +11 -0
  15. package/dist/chunk-32B4LIKH.js +1 -0
  16. package/dist/{chunk-6QWLOSUQ.js → chunk-33D7HGAI.js} +1 -1
  17. package/dist/{chunk-HGFCNPSN.js → chunk-3GVSG4S6.js} +1 -1
  18. package/dist/chunk-3MEL3WLG.js +1 -0
  19. package/dist/{chunk-HS3VTFW3.js → chunk-3UZYLXCB.js} +1 -1
  20. package/dist/chunk-3VOMVINB.js +6 -0
  21. package/dist/{chunk-H5MENHJ2.js → chunk-3VXXYY6S.js} +1 -1
  22. package/dist/{chunk-773TIA5M.js → chunk-3VYOLEQE.js} +2 -2
  23. package/dist/chunk-3WMFKHIM.js +9 -0
  24. package/dist/{chunk-WHXY372K.js → chunk-46IUD46F.js} +1 -1
  25. package/dist/{chunk-VIMFXQ3Q.js → chunk-4AXLWDKW.js} +1 -1
  26. package/dist/chunk-55JDA75S.js +5 -0
  27. package/dist/{chunk-PQDB3FUL.js → chunk-5CANB25O.js} +1 -1
  28. package/dist/{chunk-MVJSQT7V.js → chunk-5I5HKOQU.js} +1 -1
  29. package/dist/chunk-5KILOX2V.js +2 -0
  30. package/dist/{chunk-77KSMVIO.js → chunk-5MJX7RKQ.js} +6 -6
  31. package/dist/{chunk-FXBQKJTS.js → chunk-5UDBNXNH.js} +1 -1
  32. package/dist/chunk-5XO6PAMV.js +1 -0
  33. package/dist/chunk-5ZSN73EA.js +3 -0
  34. package/dist/chunk-63GEZEYP.js +1 -0
  35. package/dist/{chunk-Z4E2EXZV.js → chunk-6WGHVCYY.js} +1 -1
  36. package/dist/chunk-77QKJLBG.js +6 -0
  37. package/dist/chunk-77QYKF34.js +6 -0
  38. package/dist/{chunk-PL7AJVTV.js → chunk-7AD5YCLL.js} +1 -1
  39. package/dist/{chunk-WAZL37JY.js → chunk-7H4IM6PX.js} +1 -1
  40. package/dist/{chunk-NPATN7YS.js → chunk-7IS6Q756.js} +1 -1
  41. package/dist/chunk-7UV53AU2.js +1 -0
  42. package/dist/{chunk-OJSF3H2G.js → chunk-7UZO72KN.js} +2 -2
  43. package/dist/{chunk-DKAWQBTI.js → chunk-7WWPAHVE.js} +3 -3
  44. package/dist/{chunk-GW7IEG4G.js → chunk-7ZONBOEZ.js} +1 -1
  45. package/dist/chunk-A6OSIGQI.js +1 -0
  46. package/dist/chunk-ADIHYUQC.js +7 -0
  47. package/dist/chunk-AJOTU26E.js +3 -0
  48. package/dist/chunk-AKSOCKVF.js +317 -0
  49. package/dist/{chunk-2JM3XHTQ.js → chunk-AZCPTV4A.js} +9 -9
  50. package/dist/chunk-B4YDR22W.js +4 -0
  51. package/dist/{chunk-7O2KMA4J.js → chunk-B7Y2LMPU.js} +1 -1
  52. package/dist/{chunk-RX63KGTK.js → chunk-BATQEAGE.js} +1 -1
  53. package/dist/chunk-C4QR7Z4N.js +1 -0
  54. package/dist/chunk-C7YSU4R5.js +20 -0
  55. package/dist/{chunk-DV7FOLG4.js → chunk-CKLS5LTU.js} +1 -1
  56. package/dist/chunk-COFGQT76.js +18 -0
  57. package/dist/{chunk-ZMD5TNU5.js → chunk-CPKLTBLZ.js} +1 -1
  58. package/dist/chunk-CUZQRXTV.js +20 -0
  59. package/dist/chunk-DCSSFNW7.js +12 -0
  60. package/dist/chunk-DEY5P63E.js +4 -0
  61. package/dist/{chunk-I6DVGPJ7.js → chunk-DP7SBNLN.js} +1 -1
  62. package/dist/{chunk-PJ7L6NSD.js → chunk-DREP3FRJ.js} +1 -1
  63. package/dist/{chunk-D34ZSTCK.js → chunk-DUWS6Q7C.js} +1 -1
  64. package/dist/chunk-DUWU7CL7.js +3 -0
  65. package/dist/chunk-DYHRCMH6.js +4 -0
  66. package/dist/chunk-DZS4GBQX.js +1 -0
  67. package/dist/{chunk-4DIR65KL.js → chunk-EDLID4PK.js} +24 -24
  68. package/dist/{chunk-HSETBDXR.js → chunk-EVQPVO4P.js} +1 -1
  69. package/dist/{chunk-WQOV3LQA.js → chunk-EYB45DUG.js} +1 -1
  70. package/dist/chunk-F34MAI7X.js +8 -0
  71. package/dist/{chunk-NZE4C4OI.js → chunk-FJCNEHTH.js} +1 -1
  72. package/dist/chunk-FNITLQDL.js +1 -0
  73. package/dist/chunk-FROK2K3X.js +5 -0
  74. package/dist/{chunk-KHRZFJHM.js → chunk-GF75CMTJ.js} +1 -1
  75. package/dist/{chunk-RU6J6QQF.js → chunk-GHO2S3W3.js} +1 -1
  76. package/dist/chunk-GILHUPUG.js +7 -0
  77. package/dist/chunk-GPRUQBQX.js +1 -0
  78. package/dist/chunk-GRKZRK4G.js +1 -0
  79. package/dist/{chunk-PU6KWWVK.js → chunk-H3QLPW7Q.js} +1 -1
  80. package/dist/chunk-HB3MJYBK.js +1 -0
  81. package/dist/{chunk-AEUCDGTB.js → chunk-HDQXFGYG.js} +1 -1
  82. package/dist/{chunk-NZ3HLDJG.js → chunk-HJ3DOUAL.js} +1 -1
  83. package/dist/{chunk-MFP63IUM.js → chunk-HKNFZUAM.js} +1 -1
  84. package/dist/chunk-HQK6QRXN.js +1 -0
  85. package/dist/chunk-HSTNTHWM.js +1 -0
  86. package/dist/chunk-HT2JVMLK.js +16 -0
  87. package/dist/chunk-HVOYSAB3.js +1 -0
  88. package/dist/{chunk-BPJRQOHO.js → chunk-I4FS7HYY.js} +1 -1
  89. package/dist/{chunk-C4UCOQUP.js → chunk-ICFM55ZS.js} +2 -2
  90. package/dist/{chunk-H6TWXT6Q.js → chunk-IPWU2ALH.js} +1 -1
  91. package/dist/{chunk-MNYKIPG7.js → chunk-IQ4VOPT7.js} +1 -1
  92. package/dist/chunk-ISIPFEFB.js +1 -0
  93. package/dist/chunk-IUUKRTKF.js +5 -0
  94. package/dist/{chunk-F33TYJM5.js → chunk-J4SJHG3M.js} +1 -1
  95. package/dist/{chunk-CTNBSUVU.js → chunk-JA2QZ635.js} +2 -2
  96. package/dist/{chunk-RSGIMVPN.js → chunk-JCOQDVEB.js} +2 -2
  97. package/dist/{chunk-ZMTTZXC4.js → chunk-JCVQB6MX.js} +3 -3
  98. package/dist/{chunk-6IOVTFAH.js → chunk-JF47WERF.js} +1 -1
  99. package/dist/{chunk-NAQ7KT6L.js → chunk-JJ4MYCVU.js} +1 -1
  100. package/dist/chunk-JOEWOCHY.js +5 -0
  101. package/dist/chunk-JSGOBMF6.js +1 -0
  102. package/dist/chunk-JWQBRHVY.js +1 -0
  103. package/dist/{chunk-4SXHXMK6.js → chunk-K5KUOPEF.js} +1 -1
  104. package/dist/chunk-KCHERKZO.js +383 -0
  105. package/dist/chunk-KVZXRZ7U.js +1 -0
  106. package/dist/chunk-KXSUEB4Y.js +1 -0
  107. package/dist/{chunk-KDMJ2BLO.js → chunk-LAHZ6FO5.js} +1 -1
  108. package/dist/chunk-LBBYCPZP.js +18 -0
  109. package/dist/{chunk-AEPBX4GI.js → chunk-LEFAUWKH.js} +1 -1
  110. package/dist/{chunk-MMHTYLTG.js → chunk-LIB64ZJW.js} +1 -1
  111. package/dist/{chunk-4QBJ5JBX.js → chunk-LOKVWZD2.js} +16 -15
  112. package/dist/{chunk-WKRX4FBZ.js → chunk-LRKJSNM3.js} +1 -1
  113. package/dist/chunk-MDMKTILJ.js +1 -0
  114. package/dist/chunk-MEFJND2V.js +4 -0
  115. package/dist/{chunk-BU6LJZG7.js → chunk-MFXBSQDH.js} +1 -1
  116. package/dist/chunk-MIMOKFDI.js +1 -0
  117. package/dist/chunk-MINDMVTH.js +1 -0
  118. package/dist/{chunk-OAEGTH4Q.js → chunk-MZJKZLCC.js} +1 -1
  119. package/dist/{chunk-W6ST525S.js → chunk-N56BJ3F7.js} +1 -1
  120. package/dist/{chunk-SOJHJ4QK.js → chunk-NE32WJR5.js} +1 -1
  121. package/dist/chunk-NGQDG4CJ.js +1 -0
  122. package/dist/{chunk-6QDOCBD4.js → chunk-NHEUJKAO.js} +4 -3
  123. package/dist/{chunk-TUWRPDTE.js → chunk-NSHKVJST.js} +1 -1
  124. package/dist/{chunk-5GUXN2RU.js → chunk-NTFIW3VK.js} +1 -1
  125. package/dist/chunk-NWBAD3AV.js +8 -0
  126. package/dist/chunk-NYNSMHKY.js +15 -0
  127. package/dist/chunk-NZRQKFUB.js +1 -0
  128. package/dist/{chunk-4XE6E4DC.js → chunk-OJ7KRWUH.js} +1 -1
  129. package/dist/{chunk-3CKUOG4B.js → chunk-OKX6PKAW.js} +1 -1
  130. package/dist/chunk-ON3YXHON.js +1 -0
  131. package/dist/chunk-OSA6BKSU.js +1 -0
  132. package/dist/chunk-OUSRNKZG.js +1 -0
  133. package/dist/{chunk-IYFHBTJ2.js → chunk-OVOOQFRY.js} +1 -1
  134. package/dist/chunk-P676C7UT.js +1 -0
  135. package/dist/{chunk-XRWQ7AXY.js → chunk-P6ID3ULA.js} +1 -1
  136. package/dist/chunk-PCKWLJW2.js +1 -0
  137. package/dist/{chunk-PIQI72DV.js → chunk-PTS7J2JO.js} +1 -1
  138. package/dist/chunk-QEEA2KEN.js +2 -0
  139. package/dist/{chunk-J774336K.js → chunk-QEF43PR2.js} +1 -1
  140. package/dist/{chunk-DPMOLROM.js → chunk-QF6EH4HX.js} +5 -5
  141. package/dist/{chunk-LZZAD3FW.js → chunk-QH5R32AA.js} +1 -1
  142. package/dist/chunk-QNR3U4IO.js +1 -0
  143. package/dist/{chunk-GUPUXFIP.js → chunk-QPCDSJ4J.js} +1 -1
  144. package/dist/{chunk-UJSCQJLW.js → chunk-QZDFPNYT.js} +1 -1
  145. package/dist/{chunk-WM3GKSPE.js → chunk-RDCHRPKV.js} +1 -1
  146. package/dist/chunk-RFB7RXTA.js +8 -0
  147. package/dist/{chunk-4JU7N2OF.js → chunk-RFDOSK57.js} +1 -1
  148. package/dist/{chunk-4UD2LW4O.js → chunk-RNXWL6DS.js} +1 -1
  149. package/dist/chunk-RRBI2IRE.js +15 -0
  150. package/dist/chunk-RX27ER4R.js +7 -0
  151. package/dist/chunk-S3IDGHAZ.js +28 -0
  152. package/dist/{chunk-EBBS7VG6.js → chunk-S3J3BYQ3.js} +3 -3
  153. package/dist/chunk-S6YUSGTF.js +3 -0
  154. package/dist/{chunk-6ICRPFG4.js → chunk-SHDGD2WJ.js} +1 -1
  155. package/dist/{chunk-GCJAY2XJ.js → chunk-SKK7CPUY.js} +3 -3
  156. package/dist/{chunk-TTV2GWNE.js → chunk-SMZ74TME.js} +1 -1
  157. package/dist/chunk-STLYSBD5.js +1 -0
  158. package/dist/chunk-T7BUP75N.js +7 -0
  159. package/dist/chunk-TGUAZMI2.js +4 -0
  160. package/dist/{chunk-K5OTE6CX.js → chunk-TH4D7IGZ.js} +1 -1
  161. package/dist/{chunk-AOPEKBDL.js → chunk-U2WUTGPI.js} +1 -1
  162. package/dist/chunk-UJD7OQ3I.js +6 -0
  163. package/dist/{chunk-G7C4LBG2.js → chunk-UVSXPMUN.js} +1 -1
  164. package/dist/chunk-UZTL2UET.js +2368 -0
  165. package/dist/chunk-VEIZLSMG.js +3 -0
  166. package/dist/chunk-VEQDI5AB.js +1 -0
  167. package/dist/chunk-VL3XMULV.js +6 -0
  168. package/dist/{chunk-A2BZY6TE.js → chunk-VPH2AAHJ.js} +1 -1
  169. package/dist/chunk-VWYZCCRE.js +836 -0
  170. package/dist/chunk-VX2CDHRQ.js +1 -0
  171. package/dist/chunk-VXHLE5UQ.js +1 -0
  172. package/dist/{chunk-SYBKHTVU.js → chunk-VY7UGJZK.js} +3 -3
  173. package/dist/{chunk-R4TOHQH3.js → chunk-W6TPRWEE.js} +2 -2
  174. package/dist/chunk-WBTR5JZ6.js +16 -0
  175. package/dist/{chunk-VPOAOUT4.js → chunk-WGBUSO27.js} +1 -1
  176. package/dist/{chunk-DPNZWBT5.js → chunk-WNO2V53C.js} +1 -1
  177. package/dist/{chunk-M2M3I63K.js → chunk-WR2MMFJO.js} +1 -1
  178. package/dist/chunk-WR6KP7RT.js +1 -0
  179. package/dist/chunk-WRVB4JCZ.js +7 -0
  180. package/dist/chunk-X3WFHNF5.js +2 -0
  181. package/dist/chunk-X6Y3HDXN.js +16 -0
  182. package/dist/{chunk-POOKYUTJ.js → chunk-XCXQPV5W.js} +1 -1
  183. package/dist/chunk-XUJURYN5.js +1 -0
  184. package/dist/chunk-XW33ZO7F.js +2 -0
  185. package/dist/{chunk-6QU2BHVL.js → chunk-XY2SSJQD.js} +4 -4
  186. package/dist/{chunk-4UAJ6ULU.js → chunk-YACDI6IK.js} +1 -1
  187. package/dist/{chunk-EJJPVVQ2.js → chunk-YFR53MWF.js} +1 -1
  188. package/dist/{chunk-VVPIXC3W.js → chunk-YQZPL4K3.js} +1 -1
  189. package/dist/chunk-YRHFPXC3.js +1 -0
  190. package/dist/chunk-YS5RZ6D5.js +1 -0
  191. package/dist/chunk-YTJ3EPD3.js +1 -0
  192. package/dist/chunk-Z6VWYOKN.js +4 -0
  193. package/dist/{chunk-ZFA5DIJ3.js → chunk-ZDRQUKLN.js} +1 -1
  194. package/dist/chunk-ZGASBRSQ.js +5 -0
  195. package/dist/chunk-ZQKZC2KN.js +1 -0
  196. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  197. package/dist/cli/commands/app/build.js +1 -1
  198. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  199. package/dist/cli/commands/app/bulk/execute.js +1 -1
  200. package/dist/cli/commands/app/bulk/status.js +1 -1
  201. package/dist/cli/commands/app/config/link.js +1 -1
  202. package/dist/cli/commands/app/config/pull.js +1 -1
  203. package/dist/cli/commands/app/config/use.js +1 -1
  204. package/dist/cli/commands/app/config/validate.js +1 -1
  205. package/dist/cli/commands/app/demo/watcher.js +1 -1
  206. package/dist/cli/commands/app/deploy.js +1 -1
  207. package/dist/cli/commands/app/dev/clean.js +1 -1
  208. package/dist/cli/commands/app/dev.js +1 -1
  209. package/dist/cli/commands/app/env/pull.js +1 -1
  210. package/dist/cli/commands/app/env/show.js +1 -1
  211. package/dist/cli/commands/app/execute.js +1 -1
  212. package/dist/cli/commands/app/function/build.js +1 -1
  213. package/dist/cli/commands/app/function/info.js +1 -1
  214. package/dist/cli/commands/app/function/replay.js +1 -1
  215. package/dist/cli/commands/app/function/run.js +1 -1
  216. package/dist/cli/commands/app/function/schema.js +1 -1
  217. package/dist/cli/commands/app/function/typegen.js +1 -1
  218. package/dist/cli/commands/app/generate/extension.js +1 -1
  219. package/dist/cli/commands/app/graphiql.js +1 -1
  220. package/dist/cli/commands/app/import/channel-config.js +1 -0
  221. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -0
  222. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -0
  223. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  224. package/dist/cli/commands/app/import-extensions.js +1 -1
  225. package/dist/cli/commands/app/info.js +1 -1
  226. package/dist/cli/commands/app/init.js +1 -1
  227. package/dist/cli/commands/app/logs.js +1 -1
  228. package/dist/cli/commands/app/release.js +1 -1
  229. package/dist/cli/commands/app/security/check.js +1 -0
  230. package/dist/cli/commands/app/security/clean.js +1 -0
  231. package/dist/cli/commands/app/security/instructions.js +1 -0
  232. package/dist/cli/commands/app/security/record.js +1 -0
  233. package/dist/cli/commands/app/security/review.js +1 -0
  234. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  235. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  236. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  237. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  238. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  239. package/dist/cli/commands/app/versions/list.js +1 -1
  240. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  241. package/dist/cli/commands/auth/login.d.ts +16 -1
  242. package/dist/cli/commands/auth/login.js +1 -1
  243. package/dist/cli/commands/auth/logout.d.ts +16 -1
  244. package/dist/cli/commands/auth/logout.js +1 -1
  245. package/dist/cli/commands/cache/clear.js +1 -1
  246. package/dist/cli/commands/config/autoupgrade/off.d.ts +13 -0
  247. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  248. package/dist/cli/commands/config/autoupgrade/on.d.ts +13 -0
  249. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  250. package/dist/cli/commands/config/autoupgrade/status.d.ts +13 -0
  251. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  252. package/dist/cli/commands/debug/command-flags.js +1 -1
  253. package/dist/cli/commands/doc/fetch.d.ts +2 -0
  254. package/dist/cli/commands/doc/fetch.js +1 -1
  255. package/dist/cli/commands/doc/search.d.ts +1 -0
  256. package/dist/cli/commands/doc/search.js +1 -1
  257. package/dist/cli/commands/docs/generate.js +1 -1
  258. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  259. package/dist/cli/commands/doctor-release/theme/index.d.ts +1 -0
  260. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  261. package/dist/cli/commands/help.d.ts +431 -1
  262. package/dist/cli/commands/help.js +1 -1
  263. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  264. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  265. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  266. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  267. package/dist/cli/commands/notifications/generate.js +1 -1
  268. package/dist/cli/commands/notifications/list.js +1 -1
  269. package/dist/cli/commands/organization/list.js +1 -1
  270. package/dist/cli/commands/search.d.ts +11 -1
  271. package/dist/cli/commands/search.js +1 -1
  272. package/dist/cli/commands/send-analytics.js +1 -1
  273. package/dist/cli/commands/theme/check.js +1 -1
  274. package/dist/cli/commands/theme/console.js +1 -1
  275. package/dist/cli/commands/theme/delete.js +1 -1
  276. package/dist/cli/commands/theme/dev.js +1 -1
  277. package/dist/cli/commands/theme/duplicate.js +1 -1
  278. package/dist/cli/commands/theme/info.js +1 -1
  279. package/dist/cli/commands/theme/init.js +1 -1
  280. package/dist/cli/commands/theme/language-server.js +1 -1
  281. package/dist/cli/commands/theme/list.js +1 -1
  282. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  283. package/dist/cli/commands/theme/open.js +1 -1
  284. package/dist/cli/commands/theme/package.js +1 -1
  285. package/dist/cli/commands/theme/preview.js +1 -1
  286. package/dist/cli/commands/theme/profile.js +1 -1
  287. package/dist/cli/commands/theme/publish.js +1 -1
  288. package/dist/cli/commands/theme/pull.js +1 -1
  289. package/dist/cli/commands/theme/push.js +1 -1
  290. package/dist/cli/commands/theme/rename.js +1 -1
  291. package/dist/cli/commands/theme/share.js +1 -1
  292. package/dist/cli/commands/upgrade.js +1 -1
  293. package/dist/cli/commands/version.d.ts +15 -1
  294. package/dist/cli/commands/version.js +1 -1
  295. package/dist/cli/help.d.ts +5 -2
  296. package/dist/cli/help.js +6 -2
  297. package/dist/cli/services/commands/auth/login/types.d.ts +11 -0
  298. package/dist/cli/services/commands/auth/login/types.js +7 -0
  299. package/dist/cli/services/commands/config/autoupgrade/index.d.ts +3 -0
  300. package/dist/cli/services/commands/config/autoupgrade/index.js +9 -0
  301. package/dist/cli/services/commands/config/autoupgrade/result.d.ts +2 -0
  302. package/dist/cli/services/commands/config/autoupgrade/result.js +15 -0
  303. package/dist/cli/services/commands/config/autoupgrade/types.d.ts +10 -0
  304. package/dist/cli/services/commands/config/autoupgrade/types.js +7 -0
  305. package/dist/cli/services/commands/doc/fetch.d.ts +1 -1
  306. package/dist/cli/services/commands/doc/fetch.js +11 -2
  307. package/dist/cli/services/commands/help/index.d.ts +3 -0
  308. package/dist/cli/services/commands/help/index.js +51 -0
  309. package/dist/cli/services/commands/help/result.d.ts +2 -0
  310. package/dist/cli/services/commands/help/result.js +6 -0
  311. package/dist/cli/services/commands/help/types.d.ts +431 -0
  312. package/dist/cli/services/commands/help/types.js +71 -0
  313. package/dist/cli/services/commands/search/index.d.ts +2 -0
  314. package/dist/cli/services/commands/search/index.js +8 -0
  315. package/dist/cli/services/commands/search/result.d.ts +2 -0
  316. package/dist/cli/services/commands/search/result.js +12 -0
  317. package/dist/cli/services/commands/search/types.d.ts +10 -0
  318. package/dist/cli/services/commands/search/types.js +7 -0
  319. package/dist/cli/services/commands/version/index.d.ts +2 -0
  320. package/dist/cli/services/commands/version/index.js +5 -0
  321. package/dist/cli/services/commands/version/result.d.ts +2 -0
  322. package/dist/cli/services/commands/version/result.js +6 -0
  323. package/dist/cli/services/commands/version/types.d.ts +10 -0
  324. package/dist/cli/services/commands/version/types.js +7 -0
  325. package/dist/command-json-schema-SU56F3T4.js +1 -0
  326. package/dist/command-registry.js +1 -1
  327. package/dist/{conf-store-5UUKEHZV.js → conf-store-WDYDHG6V.js} +1 -1
  328. package/dist/custom-oclif-loader-CP4XJAPS.js +1 -0
  329. package/dist/deprecations-CBSMNYL3.js +1 -0
  330. package/dist/dist-HI6AAP5V.js +1 -0
  331. package/dist/dist-W25ND3PJ.js +1 -0
  332. package/dist/environment-ZUTBXY7U.js +1 -0
  333. package/dist/environments-PUH6A5BU.js +1 -0
  334. package/dist/error-LNWX6IWE.js +1 -0
  335. package/dist/error-handler-24QGAUUD.js +1 -0
  336. package/dist/fs-Y33QBYY5.js +1 -0
  337. package/dist/hooks/did-you-mean.js +1 -1
  338. package/dist/hooks/hydrogen-init.js +1 -1
  339. package/dist/hooks/plugin-plugins.js +1 -1
  340. package/dist/hooks/postrun.js +1 -1
  341. package/dist/hooks/prerun.js +1 -1
  342. package/dist/hooks/public-metadata.js +1 -1
  343. package/dist/hooks/sensitive-metadata.js +1 -1
  344. package/dist/hooks/tunnel-provider.js +1 -1
  345. package/dist/hooks/tunnel-start.js +1 -1
  346. package/dist/http-proxy-node16-D3JUYA5D.js +38 -0
  347. package/dist/index.js +13 -14
  348. package/dist/is-global-KY3QE3OZ.js +1 -0
  349. package/dist/json-error-UR2OILQ6.js +1 -0
  350. package/dist/lib-AD2G3QH3.js +1 -0
  351. package/dist/lib-VEVNMHDE.js +1 -0
  352. package/dist/lib-ZQW4E7QU.js +1 -0
  353. package/dist/local-77XQ4CX3.js +1 -0
  354. package/dist/metadata-BC3BGHRY.js +1 -0
  355. package/dist/{morph-BMYYMQNX.js → morph-42EXMN3K.js} +3 -3
  356. package/dist/node-package-manager-6UZUTDCP.js +1 -0
  357. package/dist/notifications-system-4UDT72DQ.js +1 -0
  358. package/dist/os-U3LELTCV.js +1 -0
  359. package/dist/output-GGY66WEM.js +1 -0
  360. package/dist/{path-MBXP7ZIC.js → path-6YMSTSWG.js} +1 -1
  361. package/dist/system-MCWAHFXK.js +1 -0
  362. package/dist/tsconfig.tsbuildinfo +1 -1
  363. package/dist/ui-SYB4LLWY.js +1 -0
  364. package/dist/uncaught-error-handler.d.ts +6 -0
  365. package/dist/uncaught-error-handler.js +33 -0
  366. package/dist/upgrade-V4GCQJBN.js +1 -0
  367. package/dist/version-HQPFW4QN.js +1 -0
  368. package/dist/version-VOSHQCYM.js +1 -0
  369. package/dist/workerd-MEAM3XYI.js +18 -0
  370. package/oclif.manifest.json +2646 -226
  371. package/package.json +17 -8
  372. package/dist/analytics-4D5FCVMV.js +0 -1
  373. package/dist/analytics-XRYJEPWC.js +0 -1
  374. package/dist/chunk-2IZROVCY.js +0 -1
  375. package/dist/chunk-2KD4LHRT.js +0 -5
  376. package/dist/chunk-2SOA4M4G.js +0 -1
  377. package/dist/chunk-2WNF5BX4.js +0 -18
  378. package/dist/chunk-2Z52XJQG.js +0 -1
  379. package/dist/chunk-34PQ6LJC.js +0 -1
  380. package/dist/chunk-3NW372KT.js +0 -1
  381. package/dist/chunk-4JLOCGTK.js +0 -3
  382. package/dist/chunk-4NZ465W4.js +0 -1
  383. package/dist/chunk-5EME57E6.js +0 -7
  384. package/dist/chunk-5N33O2RV.js +0 -1
  385. package/dist/chunk-5PAPCPUM.js +0 -1
  386. package/dist/chunk-5U24BORP.js +0 -6
  387. package/dist/chunk-6ARAJULJ.js +0 -1
  388. package/dist/chunk-7VJPQ52S.js +0 -15
  389. package/dist/chunk-7ZEVVGCH.js +0 -1
  390. package/dist/chunk-A5FV7HOY.js +0 -16
  391. package/dist/chunk-ADS7BFDG.js +0 -15
  392. package/dist/chunk-ADUMJRRY.js +0 -1
  393. package/dist/chunk-AI4SPBPV.js +0 -2
  394. package/dist/chunk-AKETXXYD.js +0 -1
  395. package/dist/chunk-ANOCIVJ3.js +0 -8
  396. package/dist/chunk-BMPCDXJR.js +0 -4
  397. package/dist/chunk-CAKGQWX4.js +0 -7
  398. package/dist/chunk-CBGDD3ZG.js +0 -317
  399. package/dist/chunk-CRALWNNO.js +0 -1
  400. package/dist/chunk-CUGLV7UX.js +0 -1
  401. package/dist/chunk-CWSQIPY5.js +0 -5
  402. package/dist/chunk-D6LV5CJL.js +0 -2
  403. package/dist/chunk-DGMHUJV3.js +0 -4
  404. package/dist/chunk-ENUN2VSC.js +0 -2
  405. package/dist/chunk-EX7Y3BEH.js +0 -1
  406. package/dist/chunk-FDK3NDYQ.js +0 -5
  407. package/dist/chunk-FLV6UQRA.js +0 -1
  408. package/dist/chunk-FTC3BXSD.js +0 -3
  409. package/dist/chunk-FXWNYGIW.js +0 -1
  410. package/dist/chunk-G5272L77.js +0 -7
  411. package/dist/chunk-G5QSVBYP.js +0 -19
  412. package/dist/chunk-G6SURO6V.js +0 -8
  413. package/dist/chunk-GBYDMHZ3.js +0 -3
  414. package/dist/chunk-GCN4O7HM.js +0 -1
  415. package/dist/chunk-GR6NR5QK.js +0 -1
  416. package/dist/chunk-HKHGJYRC.js +0 -1
  417. package/dist/chunk-IKNCFVVX.js +0 -1
  418. package/dist/chunk-IMIPD73V.js +0 -6
  419. package/dist/chunk-IPN5OHBY.js +0 -6
  420. package/dist/chunk-J2HBEHCX.js +0 -9
  421. package/dist/chunk-K3OI5VDE.js +0 -1
  422. package/dist/chunk-KB43BSFM.js +0 -3
  423. package/dist/chunk-KGRDHI2A.js +0 -2
  424. package/dist/chunk-KNCYAIJ2.js +0 -7
  425. package/dist/chunk-KYNXMDFU.js +0 -836
  426. package/dist/chunk-L7CQQML6.js +0 -6
  427. package/dist/chunk-LCVDLQEZ.js +0 -1
  428. package/dist/chunk-NDAUL4H4.js +0 -1
  429. package/dist/chunk-NDFKLPHJ.js +0 -1705
  430. package/dist/chunk-NUKSSKYR.js +0 -1
  431. package/dist/chunk-NVNDQQN6.js +0 -8
  432. package/dist/chunk-O452KNRL.js +0 -1
  433. package/dist/chunk-P5R6JZMT.js +0 -6
  434. package/dist/chunk-PDWJ2YH2.js +0 -1
  435. package/dist/chunk-PSSOCUUD.js +0 -375
  436. package/dist/chunk-PWXGGZQB.js +0 -1
  437. package/dist/chunk-QKUTVLRJ.js +0 -4
  438. package/dist/chunk-QOOVB6RW.js +0 -6
  439. package/dist/chunk-RGJVJ22M.js +0 -3
  440. package/dist/chunk-TIG7SSKB.js +0 -3
  441. package/dist/chunk-TU47HMTL.js +0 -1
  442. package/dist/chunk-UBTHWHPB.js +0 -12
  443. package/dist/chunk-UDWSRNKO.js +0 -1
  444. package/dist/chunk-VE6BYYBP.js +0 -5
  445. package/dist/chunk-W3BNL2Q5.js +0 -1
  446. package/dist/chunk-WDY5CK2T.js +0 -11
  447. package/dist/chunk-WHZKFG2B.js +0 -1
  448. package/dist/chunk-WLU7UG44.js +0 -3
  449. package/dist/chunk-WNBRPWSB.js +0 -1
  450. package/dist/chunk-WWRLFLGM.js +0 -2
  451. package/dist/chunk-XOEBZR5C.js +0 -3
  452. package/dist/chunk-YGSXN3YD.js +0 -28
  453. package/dist/chunk-YN5SVIOI.js +0 -11
  454. package/dist/chunk-YVB7ZPHR.js +0 -20
  455. package/dist/chunk-ZIAXZ5VG.js +0 -1
  456. package/dist/chunk-ZZNGFCJ3.js +0 -4
  457. package/dist/cli/commands/app/doctor/instructions.js +0 -1
  458. package/dist/cli/commands/app/doctor.js +0 -1
  459. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -4
  460. package/dist/cli/commands/config/autoupgrade/constants.js +0 -1
  461. package/dist/cli/services/commands/search.d.ts +0 -1
  462. package/dist/cli/services/commands/search.js +0 -7
  463. package/dist/cli/services/commands/version.d.ts +0 -1
  464. package/dist/cli/services/commands/version.js +0 -6
  465. package/dist/custom-oclif-loader-BWAMUFQ4.js +0 -1
  466. package/dist/deprecations-DVGWC3RL.js +0 -1
  467. package/dist/dist-CN7N5IOM.js +0 -1
  468. package/dist/dist-Q5U4WGYG.js +0 -1
  469. package/dist/environments-M4CFP4XF.js +0 -1
  470. package/dist/error-ZES2RSN7.js +0 -1
  471. package/dist/error-handler-CRTU67VJ.js +0 -1
  472. package/dist/fs-GELMKEWX.js +0 -1
  473. package/dist/http-proxy-node16-A6AKKRQH.js +0 -38
  474. package/dist/is-global-X2QNCXXB.js +0 -1
  475. package/dist/lib-2BR2WN7L.js +0 -1
  476. package/dist/lib-M72BVWQ3.js +0 -1
  477. package/dist/lib-P3APEIHY.js +0 -1
  478. package/dist/local-HMFFXIE3.js +0 -1
  479. package/dist/metadata-SXJZZMCI.js +0 -1
  480. package/dist/node-package-manager-2D2CIFTG.js +0 -1
  481. package/dist/notifications-system-WH6MAXEN.js +0 -1
  482. package/dist/os-PY42WAOB.js +0 -1
  483. package/dist/output-MSTNB7GI.js +0 -1
  484. package/dist/system-7XRI63YJ.js +0 -1
  485. package/dist/ui-77QYNWJB.js +0 -1
  486. package/dist/upgrade-UVPNOKKK.js +0 -1
  487. package/dist/version-DXGPL73I.js +0 -1
  488. package/dist/version-XMVQO6PD.js +0 -1
  489. package/dist/workerd-SOWC66FA.js +0 -18
@@ -0,0 +1,16 @@
1
+ import{c as Ge}from"./chunk-OKX6PKAW.js";import{D as $e,E as He,H as te,L as D,X as Be,Z as E,_ as je,a as Pe,ca as b,da as K,e as qe,ga as V,ha as Ke,ia as A,j as Oe,k as ie,q as y,r as Me,s as ae,u as U}from"./chunk-VWYZCCRE.js";import{b as We}from"./chunk-ZDF5N422.js";import{w as oe}from"./chunk-NTFIW3VK.js";import{b as Le}from"./chunk-QF6EH4HX.js";import{a as Ve}from"./chunk-32B4LIKH.js";import{D as Je,E as Ze,F as Qe,I as Xe,J as en,T as nn,z as Ye}from"./chunk-KCHERKZO.js";import{e as Ue,g as Ee}from"./chunk-YTJ3EPD3.js";import{a as we}from"./chunk-IUUKRTKF.js";import{i as c,l as T}from"./chunk-XUJURYN5.js";import{Cb as tn,Eb as P,Ib as on,Nb as se,R as C,X as W,Xa as ze,_a as Ce,b as t,ja as xe,qa as Re}from"./chunk-COFGQT76.js";import{i as re}from"./chunk-B4OMIONW.js";import{g as an}from"./chunk-C4QR7Z4N.js";import{d as Ie,j}from"./chunk-3VYOLEQE.js";import{e as B,g as s}from"./chunk-VKWPEFWQ.js";s();function q(e,{httpsOnly:n=!1,message:i="Invalid URL"}={}){return e.refine(a=>de(a,n),{message:i}).refine(a=>!a.includes(`
2
+ `),{message:i})}function it(e,{message:n="URL must be HTTPS URL or start with /"}={}){return e.refine(i=>i.startsWith("/")||de(i,!0),{message:n})}var rn=/[\r\n\t]/;function sn(e){return de(e,!0)}function de(e,n){try{let i=new URL(e);return n?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function at(e){return typeof e=="string"&&!e.startsWith("/")?`/${e}`:e}var wi=30;function tt(e){return e.length<=wi}s();s();s();function dn(e){return qe`
3
+ query OrganizationBetaFlags($organizationId: OrganizationID!) {
4
+ organization(organizationId: $organizationId) {
5
+ id
6
+ ${e.map(n=>`flag_${n}: hasFeatureFlag(handle: "${n}")`).join(`
7
+ `)}
8
+ }
9
+ }`}s();var ln={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"}}]}}]}}]};s();var le=class extends c{},w=class extends c{constructor(n,i){let a="unknown",o=d=>`an ${d}`;He(n)?(a=n.orgName,o=d=>`the ${d} organization`):$e(n)&&(a=n.email,o=d=>`the ${d} user`);let r=P`${tn.yellow(a)}`.value,l=[[`Your current active session is associated with ${o(r)} 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 ft(){let e=mn(),n=await e.organizations();if(n.length===0){let i=await e.session();throw new w(i.accountInfo)}return n}async function Nt(e,n){let i=await n.orgFromId(e);if(!i)throw new w((await n.session()).accountInfo,e);return i}async function gt(e,n,i,a=["APP_DEVELOPMENT"]){let o=await i.storeByDomain(e.id,n,a);if(!o){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 le(`Could not find store for domain ${n} in organization ${e.businessName}.`,l)}return o}s();var un={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},Ii={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},yt={production:".env"},bt={reactTypes:"17.0.30"},cn={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:Ii.web}},Ft={graphiql:3457,localhost:3458},_t=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;s();var G;(function(e){e.Partners="Partners",e.BusinessPlatform="BusinessPlatform"})(G||(G={}));s();s();var pn=50,kn=250,xi=t.object({namespace:t.string(),key:t.string(),owner_type:t.string().optional()}),Ri=t.object({sms_marketing:t.boolean().optional(),customer_privacy:t.boolean().optional()}),zi=t.object({sources:t.array(t.string()).optional()}),Ci=t.object({network_access:t.boolean().optional(),block_progress:t.boolean().optional(),api_access:t.boolean().optional(),collect_buyer_consent:Ri.optional(),iframe:zi.optional(),bundle_size_exception:t.boolean().optional()}),Ui=t.object({runs_offline:t.boolean().optional()}),It=t.object({type:t.string().optional(),extensions:t.array(t.any()).optional()}),Ei=t.object({event:t.string(),blocking:t.boolean().default(!1),applies_to:t.array(t.string()).optional()}),Pi=t.object({allow_direct_linking:t.boolean().optional(),intercepts:t.array(Ei).optional()}),qi=t.object({module:t.string()}),Oi=t.object({target:t.string(),module:t.string(),should_render:qi.optional(),tools:t.string().optional(),instructions:t.string().optional(),intents:t.array(t.object({type:t.string(),action:t.string(),schema:t.string(),name:t.string().optional(),description:t.string().optional()})).optional(),metafields:t.array(xi).optional(),default_placement:t.string().optional(),urls:t.object({edit:t.string().optional()}).optional(),capabilities:Pi.optional(),preloads:t.object({chat:t.string().optional()}).optional(),assets:t.string().optional()}),xt=t.array(Oi),vn=t.string(),Li=t.object({key:t.string().optional(),name:t.string().optional(),description:t.string().optional(),required:t.boolean().optional(),default_value:t.any().optional(),type:t.string(),validations:t.array(t.any()).optional(),marketingActivityCreateUrl:t.string().optional(),marketingActivityDeleteUrl:t.string().optional()}),fn=t.object({fields:t.array(Li).optional()}),Nn=t.string().trim().nonempty("Handle can't be empty").max(pn,`Handle can't exceed ${pn} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"Handle can't start or end with a hyphen"),Mi=t.string().trim().nonempty("UID can't be empty").max(kn,`UID can't exceed ${kn} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"UID can't start or end with a hyphen"),Y=t.object({name:t.string().optional(),type:t.string().optional(),handle:Nn.optional(),uid:Mi.optional(),description:t.string().optional(),api_version:vn.optional(),extension_points:t.any().optional(),capabilities:Ci.optional(),supported_features:Ui.optional(),settings:fn.optional()}),Rt=Y.extend({handle:Nn}),F=Y.omit({handle:!0}),zt=t.object({api_version:vn.optional(),description:t.string().optional(),extensions:t.array(t.any()),settings:fn.optional()});s();s();s();s();var $i=/^(https:\/\/)/,Hi=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,Bi=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/,ji=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function I(e){return typeof e=="string"&&e.endsWith("/")?e.replace(/\/+$/,""):e}var _=t.string({invalid_type_error:"Value must be string"}).refine(e=>e.startsWith("/")?!0:$i.test(e)||Hi.test(e)||Bi.test(e)||ji.test(e),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});function J(e,n){return!n||!e.startsWith("/")?e:`${I(n)}${e}`}var Wi=(e,n,i,a)=>{if(i.startsWith("//"))throw new c(`${e} ${n} is invalid: a URL relative to the app URL must start with a single slash.`);if(rn.test(i))throw new c(`${e} ${n} is invalid: a URL must not contain control characters such as newlines or tabs.`);let o=J(i,a);if(o.startsWith("/"))throw new c(`${e} ${n} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!sn(o))throw new c(`${e} ${n} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return o};function me(e,n,i,a){let o=i;for(let r of n){let l=o[r];typeof l=="string"&&l.startsWith("/")&&(o[r]=Wi(e,r,l,a))}}s();import{isUtf8 as Ki}from"node:buffer";import gn from"fs";async function Sn(e,n){let i=await Ce(Ie(e,"locales/*.json"));if(!i||i.length===0)return{};let a=Gi(i);if(a.length===0)throw new c(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new c(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let o of i)if(gn.statSync(o).size===0)throw new c(`Error loading ${n}`,`Locale file ${o} can't be empty`);return{default_locale:a[0],translations:Yi(i,n)}}function Gi(e){return e.filter(i=>j(i).endsWith(".default.json")).map(i=>j(i).split(".")[0])}function Yi(e,n){let i={};for(let a of e){let o=Ji(j(a).split(".")[0],"Locale code is unset"),r=gn.readFileSync(a);if(!Ki(r))throw new c(`Error loading ${n}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);i[o]=r.toString("base64")}return i}function Ji(e,n){if(e===void 0)throw new T(n);return e}function Zi(e){return e.experience==="configuration"}var hn;(function(e){e.ShouldRender="should_render",e.Main="main",e.Tools="tools",e.Instructions="instructions",e.Intents="intents"})(hn||(hn={}));function yn(e){let i={...{externalIdentifier:`${e.identifier}_external`,additionalIdentifiers:[],externalName:W(e.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:e.identifier,schema:Y,registrationLimit:cn.extensions.defaultRegistrationLimit,transform:e.transformLocalToRemote,reverseTransform:e.transformRemoteToLocal,experience:e.experience??"extension",uidStrategy:e.uidStrategy??(e.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,clientSteps:e.clientSteps},...e};return{...i,contributeToAppConfigurationSchema:a=>{let o=Zi(i),r=i.schema._def.shape!==void 0,l=i.uidStrategy==="single";return o&&r&&l?a.merge(i.schema):a},parseConfigurationObject:a=>{let o=i.schema.safeParse(a);return o.success?{state:"ok",data:o.data,errors:void 0}:{state:"error",data:void 0,errors:o.error.errors}}}}function S(e){let n=e.appModuleFeatures??(()=>[]);return yn({identifier:e.identifier,schema:e.schema,appModuleFeatures:n,transformLocalToRemote:Qi(e.transformConfig),transformRemoteToLocal:Xi(e.schema,e.transformConfig),experience:"configuration",uidStrategy:e.uidStrategy??"single",expandConfig:e.expandConfig,getIdentity:e.getIdentity,getTarget:e.getTarget,clientSteps:e.clientSteps,getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,patchWithAppDevURLs:e.patchWithAppDevURLs})}function so(e){let n=e.appRelativeUrlFields;return yn({identifier:e.identifier,schema:t.any({}),appModuleFeatures:e.appModuleFeatures,experience:e.experience,clientSteps:e.clientSteps,uidStrategy:e.uidStrategy,transformRemoteToLocal:e.transformRemoteToLocal,devSessionWatchConfig:e.devSessionWatchConfig,appRelativeUrlFields:n,patchWithAppDevURLs:n?.length?(i,a)=>{me(W(e.identifier.replace(/_/g," ")),n,i,a.applicationUrl)}:void 0,deployConfig:async(i,a,o,r,l)=>{let d=ea(i);if(n?.length){let m=l?.appConfiguration?.application_url,p=typeof m=="string"?m:void 0;me(W(e.identifier.replace(/_/g," ")),n,d,p)}if(e.appModuleFeatures().includes("localization")){let m=await Sn(a,e.identifier);d={...d,localization:m}}return d}})}function Qi(e){return Object.keys(e).includes("forward")?e.forward:n=>bn(n,e)}function Xi(e,n){return n?Object.keys(n).includes("reverse")?n.reverse:i=>bn(i,n,!0):i=>Fn(e,i)}function bn(e,n,i=!1){let a={};for(let[o,r]of Object.entries(n)){let l=i?o:r,d=i?r:o,m=E(e,l);m!==void 0&&je(a,d,m)}return a}function Fn(e,n){return Object.keys(e._def.shape()).reduce((i,a)=>{let o=e._def.shape()[a];return o instanceof t.ZodOptional&&(o=o._def.innerType),o instanceof t.ZodObject?i[a]=Fn(o,n):(n[a]!==void 0&&(i[a]=n[a]),delete n[a]),i},{})}function ea(e){let{type:n,handle:i,uid:a,path:o,extensions:r,...l}=e;return l}var na=F.extend({application_url:q(t.string({required_error:"Valid URL is required"})),embedded:t.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:t.object({url:q(t.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),ia={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},ue="app_home",aa=S({identifier:ue,schema:na,transformConfig:ia,patchWithAppDevURLs:(e,n)=>{e.application_url=n.applicationUrl},getDevSessionUpdateMessages:async e=>[`Using URL: ${e.application_url}`]}),vo=aa;s();var ta=F.extend({name:t.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:t.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(e=>e&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(e),{message:"String can't contain special characters"}).optional()}),oa={name:"name",app_handle:"handle"},ce="branding",ra=S({identifier:ce,schema:ta,transformConfig:oa}),yo=ra;s();var sa=t.object({scopes:t.string().transform(e=>xe(e)??"").optional(),required_scopes:t.array(t.string()).optional(),optional_scopes:t.array(t.string()).optional(),use_legacy_install_flow:t.boolean().optional()}),da=t.object({redirect_urls:t.array(q(t.string()))}),la=F.extend({access:t.object({admin:t.object({direct_api_mode:t.union([t.literal("online"),t.literal("offline")]).optional(),embedded_app_direct_api_access:t.boolean().optional()}).optional()}).optional(),access_scopes:sa.optional(),auth:da}),pe="app_access",ma={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"},ua=S({identifier:pe,schema:la,transformConfig:ma,getDevSessionUpdateMessages:async e=>{let n=e.access_scopes!==void 0,i=e.access_scopes?.use_legacy_install_flow===!0,a=e.access_scopes?.scopes==null&&e.access_scopes?.required_scopes==null;if(i||n&&a)return["Using legacy install flow - access scopes are not auto-granted"];let o=e.access_scopes?.scopes?e.access_scopes.scopes.split(",").map(r=>r.trim()).join(", "):e.access_scopes?.required_scopes?.join(", ");return o?[`Access scopes auto-granted: ${o}`]:["App has been installed"]},patchWithAppDevURLs:(e,n)=>{n.redirectUrlWhitelist&&(e.auth={redirect_urls:n.redirectUrlWhitelist})}}),wo=ua;s();var _n={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"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],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"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],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"}}]}}]}}]};s();var Dn={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"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],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"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],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"}}]}}]}}]};s();var An={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"}}]}}]}}]};s();var Tn={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"}}]}}]}}]};s();var Vn={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"}}]}}]}}]};s();var wn={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"}}]}}]}}]};s();var In={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"}}]}}]}}]};s();var xn={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"}}]}}]}}]}}]}}]};s();var ke={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"}}]}}]}}]};s();var Rn={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"}}]}}]}}]};s();var zn={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"}}]}}]}}]};s();var Cn={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"}}]}}]}}]};s();var Un={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"}}]}}]}}]};s();var En={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"}}]}}]}}]};s();var Pn={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"}}]}}]}}]};s();var qn={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"}}]}}]}}]};s();var On={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"}}]}}]}}]};s();var Ln={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"}}]}}]}}]};s();var Mn={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"}}}]}]}}]};s();var $n={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"}}]}}]}}]};s();var Hn={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"}}]}}]}}]};s();var Bn={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"}}]}}]}}]};s();var jn={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"}}]}}]}}]};s();s();s();var O;(function(e){e.CustomersRedact="customers/redact",e.CustomersDataRequest="customers/data_request",e.ShopRedact="shop/redact"})(O||(O={}));var Wn=t.object({topics:t.array(t.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),uri:t.preprocess(e=>I(e),_,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:t.array(t.enum([O.CustomersRedact,O.CustomersDataRequest,O.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});s();function Kn(e,n){let i=ca(e);if(i)return n.addIssue(i),t.NEVER}function ca(e){let{subscriptions:n=[]}=e,i=new Set,a=[];if(!n.length)return;if(e.privacy_compliance&&e.subscriptions?.some(r=>r.compliance_topics))return{code:t.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let o=n.flatMap(r=>r.compliance_topics).filter(Boolean);if(C(o).length!==o.length)return{code:t.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[r,{uri:l,topics:d=[],compliance_topics:m=[],filter:p=""}]of n.entries()){let k=["subscriptions",r];if(!d.length&&!m.length)return{code:t.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:k};d.forEach(u=>{let v=`${u}::${l}::${p}`;if(i.has(v)){let N=p?re.dim(`
10
+
11
+ topic: ${u}
12
+ uri: ${l}
13
+ filter: ${p}`):re.dim(`
14
+
15
+ topic: ${u}
16
+ uri: ${l}`);a.push(N)}i.add(v)})}if(a.length>0){let r=a.join("");return{code:t.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${r}`,path:["subscriptions"]}}}s();function Yn(e){let n=E(e,"webhooks");if(!n)return e;let{api_version:i}=n;return{api_version:i}}function Jn(e){let n={},i=E(e,"api_version");return n={...i?{webhooks:{api_version:i}}:{}},n}function Zn(e){if(e.length===0)return;let n=e.filter(r=>r.topics!==void 0).flatMap(({compliance_topics:r,topics:l,...d})=>Qn(l)?.map(p=>({topics:[p],...d}))??[]),i=e.filter(r=>r.topics===void 0||r.compliance_topics!==void 0).map(({compliance_topics:r,topics:l,...d})=>({compliance_topics:r,...d})),a=va(i,"compliance_topics"),o=pa(a);return[...Gn(o),...Gn(n)]}function Qn(e){return e?.sort((n,i)=>n.localeCompare(i))}function Gn(e){return e.sort((n,i)=>n.uri.localeCompare(i.uri))}function pa(e){return e.forEach(n=>n.compliance_topics=Qn(n.compliance_topics)),e}function ka(e,n){return e.find(i=>i.uri===n.uri&&Be(i.include_fields??[],n.include_fields??[])&&i.filter===n.filter)}function va(e,n){return e.reduce((i,a)=>{let o=ka(i,a);return o?n&&a?.[n]?.length?o[n]?.push(...a[n]):(a.topics&&(o.topics??=[],o.topics.push(...a.topics)),a.compliance_topics&&(o.compliance_topics??=[],o.compliance_topics.push(...a.compliance_topics))):i.push(a),i},[])}var fa=t.object({api_version:t.string({required_error:"String is required"}),privacy_compliance:t.object({customer_deletion_url:_.optional(),customer_data_request_url:_.optional(),shop_deletion_url:_.optional()}).optional(),subscriptions:t.array(Wn).optional().transform(e=>Zn(e??[]))}),Xn=F.extend({webhooks:fa.superRefine(Kn)});var ve="webhooks",Na={forward:Yn,reverse:e=>Jn(e)},ga=S({identifier:ve,schema:Xn,transformConfig:Na}),Kr=ga;s();var ei={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"}}]}}]}}]};s();var ni={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"}}]}}]}}]};s();var fe="webhook_subscription",Sa=t.object({topic:t.string(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),api_version:t.string(),uri:t.preprocess(I,_,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function ha(e){let{api_version:n,topic:i,...a}=e;return{webhooks:{subscriptions:[{topics:[i],...a}]}}}var ya={forward:(e,n)=>{let i=e,a;return"application_url"in n&&(a=n?.application_url),{...i,uri:J(i.uri,a)}},reverse:ha},ba=S({identifier:fe,schema:Sa,transformConfig:ya,uidStrategy:"dynamic"}),ts=ba;s();s();s();function x(e={}){return{type:"token_refresh",handler:async()=>({token:await D([],{noPrompt:e.noPrompt})})}}s();var ii={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganization"},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"}}]}}]}}]};s();var ai={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:"status"}},{kind:"Field",name:{kind:"Name",value:"shopCount"}},{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"}}]}}]}}]};s();function R(e){let n=e.match(/\/(\d+)$/);return n?n[1]:void 0}function Z(e){return R(Buffer.from(e,"base64").toString("utf8"))}function L(e){return Buffer.from(e).toString("base64")}async function M(){return(await ti()).organizations}async function Fa(e){return ti(e)}async function Ne(e,n,i){let a=n??await D(),r=(await V({query:ii,token:a,variables:{organizationId:_a(e)},unauthorizedHandler:i??x(),cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:Ue(a)}})).currentUserAccount?.organization;if(r)return{id:e,businessName:r.name}}function _a(e){let n=e.startsWith("gid://")?R(e):e;if(n===void 0||!/^\d+$/.test(n))throw new c(`Invalid organization ID: ${e}`);return L(`gid://organization/Organization/${n}`)}async function ti(e){let n=e??await D(),i=await V({query:ai,token:n,unauthorizedHandler:x()});return i.currentUserAccount?{organizations:i.currentUserAccount.organizationsWithAccessToDestination.nodes.map(o=>{let r=Z(o.id);if(r===void 0)throw new c(`Failed to decode organization ID from: ${o.id}`);return{id:r,businessName:o.name,status:o.status,shopCount:o.shopCount??null,url:o.url}}),currentUserResolved:!0}:{organizations:[],currentUserResolved:!1}}s();s();async function ge(e){if(e.length===1)return e[0];let i=new Set(e.map(o=>o.businessName)).size<e.length,a=await Qe({message:"Which organization do you want to use?",choices:e.map(o=>({label:i?`${o.businessName} (${o.id})`:o.businessName,value:o.id}))});return e.find(o=>o.id===a)}async function Da(e){let n=await M();if(n.length===0)throw new c("No organizations found.","Make sure you have access to a Shopify organization.");if(e){let i=n.find(a=>a.id===e);if(!i)throw new c(`Organization with ID ${e} not found.`,`Available organizations: ${n.map(a=>`${a.businessName} (${a.id})`).join(", ")}`);return i}return ge(n)}s();var Aa=["ACTIVE","LOCKED"];s();s();var Se={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},z=Object.keys(Se);s();s();var $=t.object({id:t.string(),name:t.string(),subdomain:t.string(),country:t.string().optional(),type:t.string().optional(),authScopes:t.array(t.string()).optional(),plan:t.string().optional(),organizationId:t.string(),organizationName:t.string()}),Q=t.object({id:t.string(),name:t.string()});var oi=$.pick({name:!0}).extend({domain:$.shape.subdomain,adminUrl:t.string().nullish(),plan:t.enum(z),featurePreview:t.string().optional(),country:$.shape.country,demoData:t.boolean()}),he=we({name:"CreateDevStoreResult",schema:t.object({store:oi,organization:Q}),definitions:{CreatedDevStore:oi,StoreOrganization:Q}});s();var ri={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"}}]}}]}}]};s();var si={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 Ta=2,Va=300*1e3;function wa(e){switch(e){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: ${e}`}}async function Ia(e){let{organization:n,name:i,plan:a}=e,o=await D(),r=x(),d=(await A({query:ri,token:o,organizationId:n.id,variables:{shopName:i,priceLookupKey:Se[a],prepopulateTestData:e.withDemoData??!1,developerPreviewHandle:e.featurePreview,country:e.country},unauthorizedHandler:r})).createAppDevelopmentStore;if(!d)throw new c("Store creation failed: unexpected empty response.");let m=d.userErrors;if(m&&m.length>0){let u=m.map(v=>v.message).join(", ");throw new c(`Failed to create dev store: ${u}`)}let{shopDomain:p,shopAdminUrl:k}=d;if(!p)throw new c("Store creation succeeded but no shop domain was returned.");if(await Xe({title:P`Waiting for store to be ready`,task:async u=>{let v=Date.now();for(;;){if(Date.now()-v>Va)throw new c("Store creation timed out after 5 minutes.");let g=(await A({query:si,token:o,organizationId:n.id,variables:{shopDomain:p},unauthorizedHandler:r})).organization?.storeCreation?.status;if(!g)throw new c("Unable to determine store creation status.");if(g==="COMPLETE")return;if(g==="FAILED"||g==="TIMED_OUT"||g==="USER_ERROR")throw new c(`Store creation failed with status: ${g}`);u(P`${wa(g)}`),await nn(Ta)}},renderOptions:{stdout:process.stderr}}),e.json)on(he.encode({store:{name:i,domain:p,adminUrl:k,plan:a,...e.featurePreview?{featurePreview:e.featurePreview}:{},...e.country?{country:e.country}:{},demoData:e.withDemoData??!1},organization:{id:n.id,name:n.businessName}}));else if(e.summary!==!1){let u=[];H(u,"Domain",p),u.push(["Admin",k?{link:{label:k,url:k}}:"N/A"]),H(u,"Plan",a),H(u,"Feature preview",e.featurePreview),H(u,"Country",e.country),H(u,"Demo data",e.withDemoData?"enabled":"disabled"),Ye({headline:`Dev store "${i}" created successfully.`,customSections:[{body:{tabularData:u,firstColumnSubdued:!0}}]})}return p}function H(e,n,i){i!=null&&i!==""&&e.push([n,i])}s();var xa={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function Ra(){return en({message:"Name for the new dev store"})}function za(){return Je({message:"Which Shopify plan do you want to use?",choices:z.map(e=>({label:xa[e],value:e}))})}function Ca(){return Ze({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}s();s();var di=(e,n,i)=>{let a=new URL(e);return n&&a.searchParams.append("cursor",n),i?.status&&a.searchParams.append("status",i.status),i?.source&&a.searchParams.append("source",i.source),a.toString()};var li=B(K()),Ua=new li.default({minTime:150,maxConcurrent:10});async function Ea(e){let n="App Management",a=`https://${await y()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:a,responseOptions:{onResponse:be}}}var ye=e=>Pe(e),mi=async(e,n,i)=>{let o=`https://${await y()}/app_management/unstable/organizations/${e}/app_logs/poll`;return di(o,n,i)},ui=async(e,n)=>`https://${await y()}/app_management/unstable/organizations/${encodeURIComponent(e)}/apps/${encodeURIComponent(n)}/channel_spec_export.json`;async function ci(e){let n=e.cacheOptions?.cacheExtraKey??"",i=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return Ua.schedule(async()=>b({...await Ea(e.token),query:e.query,variables:e.variables,cacheOptions:i,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function be(e){if(!e.extensions)return;let n=[];for(let i of e.extensions.deprecations)i.supportedUntilDate&&n.push(new Date(i.supportedUntilDate));We(n)}s();var pi=B(K()),Pa=new pi.default({minTime:150,maxConcurrent:10});async function ki(e){let n="App Dev",i=U(e.shopFqdn),o=`https://${await Me(i)}/app_dev/unstable/graphql.json`,r=Le()==="local"?{"x-forwarded-host":i}:void 0;return Pa.schedule(()=>b({query:e.query,api:n,url:o,token:e.token,addedHeaders:r,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler,preferredBehaviour:e.requestOptions?.requestMode}))}s();var vi=B(K()),qa=new vi.default({minTime:150,maxConcurrent:10});async function Oa(e,n,i){let a="Functions",r=`https://${await y()}/functions/unstable/organizations/${e}/${i}/graphql`;return{token:n,api:a,url:r,responseOptions:{onResponse:be}}}async function fi(e){return await qa.schedule(async()=>b({...await Oa(e.organizationId,e.token,e.appId),query:e.query,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}s();var Ni=B(K()),La=new Ni.default({minTime:150,maxConcurrent:10});async function gi(e){let n="Webhooks",a=`https://${await y()}/webhooks/unstable/organizations/${e.organizationId}/graphql.json`;return La.schedule(()=>b({query:e.query,api:n,url:a,token:e.token,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}import{randomUUID as Ma}from"crypto";var Si="https://cdn.shopify.com/static/cli/extensions/templates.json",$a=Ma(),ee=class e{static instance;static getInstance(n){return e.instance??=new e(n),e.instance}static resetInstance(){e.instance=void 0}clientName=ne.AppManagement;webUiName="Developer Dashboard";organizationSource=G.BusinessPlatform;bundleFormat="br";_session;constructor(n){this._session=n}async subscribeToAppLogs(n,i){return this.appManagementRequest({query:ni,variables:{shopIds:n.shopIds,apiKey:n.apiKey}})}async appLogs(n,i){let a=await Xa({organizationId:i,jwtToken:n.jwtToken,cursor:n.cursor,filters:n.filters});try{let o=await a.json();return a.ok?{app_logs:o.app_logs??[],cursor:o.cursor,status:a.status}:{errors:o.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(o){return{errors:[`Failed to parse response: ${o}`],status:a.status}}}async channelSpecExport(n){let i=R(n.id)??n.id,a=await ui(n.organizationId,i),o=await ie(a,{method:"GET",headers:ye(await this.token())}),r;try{r=await o.json()}catch{r=void 0}let l=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:void 0;return o.ok&&l?{ok:!0,status:o.status,body:l}:{ok:!1,status:o.status,body:l}}async session(){if(!this._session){if(an())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let n=await te(),{appManagementToken:i,businessPlatformToken:a,userId:o}=n,r=await V({query:Ln,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:o},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(Ee()&&r.currentUserAccount){let l=r.currentUserAccount.organizations.nodes.map(d=>({name:d.name}));if(l.length>1)throw new T("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:l[0]?.name??"Unknown organization"},userId:o}}else r.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:r.currentUserAccount.email},userId:o}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:o}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let n=await te({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=n.appManagementToken,i.businessPlatformToken=n.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(n){let{app:i}=await this.activeAppVersionRawResult(n);if(!i)return;let{name:a,appModules:o}=i.activeRelease.version,r=o.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:r?.config?.app_url,embedded:r?.config?.embedded,flags:[],developerPlatformClient:this}}async organizations(){return(await M()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(n){let i=await Ne(n,await this.businessPlatformToken(),this.createUnauthorizedHandler("businessPlatform"));if(i)return{...i,source:this.organizationSource}}async orgAndApps(n){let[i,{apps:a,hasMorePages:o}]=await Promise.all([this.orgFromId(n),this.appsForOrg(n)]);if(!i){let{accountInfo:r}=await this.session();throw new w(r,n)}return{organization:i,apps:a,hasMorePages:o}}async appsForOrg(n,i=""){let a=On,o={query:i.split(" ").filter(d=>d).map(d=>`title:${d}`).join(" "),organizationId:n},r=await this.appManagementRequest({query:a,variables:o});if(!r.appsConnection)throw new T("Server failed to retrieve apps");return{apps:r.appsConnection.edges.map(d=>{let m=d.node;return{id:m.id,apiKey:m.key,title:m.activeRelease.version.name,organizationId:n}}),hasMorePages:r.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:n}){let i=qn,a={organizationId:Fe(n)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(r=>({name:r.name,externalName:r.name,identifier:r.identifier,externalIdentifier:r.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:r.uidStrategy.appModuleLimit,uidStrategy:Qa(r.uidStrategy.__typename),experience:_e(r.experience,r.identifier),validationSchema:r.validationSchema}))}async templateSpecifications({organizationId:n},i={}){let a,{templatesJsonPath:o}=un,r=process.env[o];if(r){if(!await ze(r))throw new c("There is no file at the path specified for template specifications");let u=await Re(r);a=JSON.parse(u)}else try{a=await(await Oe(Si)).json()}catch{throw new c(["Failed to fetch extension templates from",{link:{url:Si}},{char:"."},"This likely means a problem with your internet connection."])}let l=0,d=i.requestedTemplate?a.filter(u=>u.identifier===i.requestedTemplate):void 0,m=d&&d.length>0?d:a,p=(await Za(m,async u=>this.organizationBetaFlags(n,u),async u=>this.organizationExpFlags(n,u))).map(u=>({...u,sortPriority:l++})),k=[];for(let u of a)u.group&&!k.includes(u.group)&&k.push(u.group);return{templates:p,groupOrder:k}}async createApp(n,i){let o=(await this.apiVersions(n.id)).publicApiVersions.filter(u=>u!=="unstable").sort().at(-1)??"unstable",r=ja(i,n.id,o),l=Pn,d=await this.appManagementRequest({query:l,variables:r});if(!d.appCreate.app||d.appCreate.userErrors?.length>0){let u=d.appCreate.userErrors.map(v=>v.message).join(", ");throw new c(u)}let m=Di([]),p=d.appCreate.app,k=p.activeRoot.clientCredentials.secrets.map(u=>({secret:u.key}));return{...p,title:i.name,apiKey:p.key,apiSecretKeys:k,grantedScopes:i?.scopesArray??[],organizationId:n.id,newApp:!0,flags:m,developerPlatformClient:this}}async devStoresForOrg(n,i){let a=await this.businessPlatformOrganizationsRequest({query:Vn,organizationId:String(f(n)),variables:{searchTerm:i}}),o=a.organization;if(!o)throw new c("No organization found");let r=o.accessibleShops?.edges.map(d=>d.node)??[],l=_i(o.currentUser?.organizationPermissions??[]);return{stores:yi(r,l),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(n){return(await this.businessPlatformOrganizationsRequest({query:wn,organizationId:String(f(n)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(n,i){let a=i??await this.activeAppVersion(n),o=[],r=[],l=[];return a.appModuleVersions.forEach(d=>{let m={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"?o.push(m):d.specification?.options?.managementExperience==="dashboard"?l.push(m):r.push(m)}),{app:{dashboardManagedExtensionRegistrations:l,configurationRegistrations:o,extensionRegistrations:r}}}async appVersions({id:n,organizationId:i,title:a}){let o=Un,r={appId:n},l=await this.appManagementRequest({query:o,variables:r});return l.app?{app:{id:l.app.id,organizationId:i,title:a,appVersions:{nodes:l.app.versions?.edges.map(d=>{let m=d.node;return{createdAt:m.createdAt,createdBy:{displayName:m.createdBy},versionTag:m.metadata.versionTag,status:m.id===l.app.activeRelease.version.id?"active":"inactive",versionId:m.id,message:m.metadata.message}})??[],pageInfo:{totalResults:l.app.versionsCount}}}}:{app:null}}async appInstallCount({id:n}){let i=En,a={appId:n};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:n,organizationId:i},a){let o=ei,r={versionTag:a},d=(await this.appManagementRequest({query:o,variables:r})).versionByTag;if(!d)throw new c(`Version not found for tag: ${a}`);return{id:parseInt(d.id,10),uuid:d.id,versionTag:d.metadata.versionTag,location:[await X({organizationId:i,id:n}),"versions",f(d.id)].join("/"),message:d.metadata.message??"",appModuleVersions:d.appModules.map(bi)}}async appVersionsDiff(n,{versionId:i}){let a={versionId:i},[o,r]=await Promise.all([this.activeAppVersionRawResult(n.apiKey),this.appManagementRequest({query:Cn,variables:a})]),l=o.app.activeRelease.version.appModules,d=r.version.appModules,{added:m,removed:p,updated:k}=Ja({currentModules:l,selectedVersionModules:d});function u(v){return{uuid:v.uuid,registrationTitle:v.handle,specification:{identifier:v.specification.identifier,experience:_e(v.specification.experience,v.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:m.map(u),updated:k.map(u),removed:p.map(u)}}}}async activeAppVersion(n){let i=await this.activeAppVersionRawResult(n.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(bi),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:n,organizationId:i}){let a={sourceExtension:"BR",organizationId:Fe(i)},o=await this.appManagementRequest({query:zn,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${n}-${$a}`}});return{assetUrl:o.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:o.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:n,appId:i,organizationId:a,versionTag:o,message:r,commitReference:l,bundleUrl:d,skipPublish:m}){let u={appId:i,version:d?{sourceUrl:d}:{source:n},metadata:{versionTag:o,message:r,sourceControlUrl:l}},v=await this.appManagementRequest({query:Rn,variables:u,requestOptions:{requestMode:"slow-request"}}),{version:N}=v.appVersionCreate,g=v.appVersionCreate.userErrors.map(Fi)??[];if(!N)return{appDeploy:{userErrors:g}};let h={appDeploy:{appVersion:{uuid:N.id,id:parseInt(N.id,10),versionTag:N.metadata.versionTag,location:await Ya(a,i,N.id),appModuleVersions:N.appModules.map(Te=>({uuid:Te.uuid,registrationUuid:Te.uuid,validationErrors:[]})),message:N.metadata.message},userErrors:g}};if(m)return h;let Vi={appId:i,versionId:N.id},Ae=await this.appManagementRequest({query:ke,variables:Vi});return Ae.appReleaseCreate.userErrors&&(h.appDeploy.userErrors=(h.appDeploy.userErrors??[]).concat(Ae.appReleaseCreate.userErrors.map(Fi))),h}async release({app:{id:n,organizationId:i},version:{versionId:a}}){let o={appId:n,versionId:a},r=await this.appManagementRequest({query:ke,variables:o});return r.appReleaseCreate.release?{appRelease:{appVersion:{versionTag:r.appReleaseCreate.release.version.metadata.versionTag,message:r.appReleaseCreate.release.version.metadata.message,location:[await X({organizationId:i,id:n}),"versions",f(r.appReleaseCreate.release.version.id).toString()].join("/")}}}:{appRelease:{userErrors:r.appReleaseCreate.userErrors?.map(l=>({field:l.field,message:l.message,category:l.category,details:[],on:l.on}))??[]}}}async storeByDomain(n,i,a){let r=(await Promise.all(a.map(m=>this.businessPlatformOrganizationsRequest({query:Tn,organizationId:String(f(n)),variables:{domain:i,filters:et(m)}})))).map(m=>m.organization).filter(m=>m!=null);if(r.length===0)throw new c("No organization found");let l=r.flatMap(m=>{let p=m.accessibleShops?.edges.map(u=>u.node)??[],k=_i(m.currentUser?.organizationPermissions??[]);return yi(p,k)}),d=U(i);return l.find(m=>m.shopDomain===d)}async ensureUserAccessToStore(n,i){if(!i.provisionable)return;let o={input:{shopifyShopId:Ka(i.shopId)}},l=(await A({query:In,token:await this.businessPlatformToken(),organizationId:String(f(n)),variables:o,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!l.success){let d=l.userErrors?.map(m=>m.message).join(", ")??"";throw new T(`Failed to provision user access to store: ${d}`)}}async sendSampleWebhook(n,i){let a=$n,o={address:n.address,apiKey:n.api_key,apiVersion:n.api_version,deliveryMethod:n.delivery_method,sharedSecret:n.shared_secret,topic:n.topic},r=await this.webhooksRequest({organizationId:i,query:a,variables:o}),l={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},d=r.cliTesting;return d&&(l={samplePayload:d.samplePayload??"{}",headers:d.headers??"{}",success:d.success,userErrors:d.errors.map(m=>({message:m,fields:[]}))}),{sendSampleWebhook:l}}async apiVersions(n){return{publicApiVersions:(await this.webhooksRequest({organizationId:n,query:Hn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:n},i){let a=Mn,o={apiVersion:n};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:o})).availableTopics??[]}}async updateURLs(n){return se("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),r=String(f(o.id));return(await this.functionsRequest({organizationId:a,query:Bn,appId:r,variables:{handle:n.handle,version:n.version}}))?.target?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}async apiSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),r=String(f(o.id));return(await this.functionsRequest({organizationId:a,query:jn,appId:r,variables:n}))?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}toExtensionGraphQLType(n){return n.toLowerCase()}async appDeepLink({id:n,organizationId:i}){return X({id:n,organizationId:i})}async devSessionCreate({appId:n,assetsUrl:i,shopFqdn:a,websocketUrl:o,unsafeValidation:r}){let l=String(f(n));return this.appDevRequest({query:_n,shopFqdn:a,variables:{appId:l,assetsUrl:i??"",websocketUrl:o,unsafeValidation:r??!1},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:n,assetsUrl:i,shopFqdn:a,manifest:o,inheritedModuleUids:r,unsafeValidation:l}){let m={appId:String(f(n)),assetsUrl:i,manifest:JSON.stringify(o),inheritedModuleUids:r,unsafeValidation:l??!1};return this.appDevRequest({query:Dn,shopFqdn:a,variables:m})}async devSessionDelete({appId:n,shopFqdn:i}){let a=String(f(n));return this.appDevRequest({query:An,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(n){let i=`https://${await ae()}/dashboard/${n.id}/stores`;return[`Looks like you don't have any dev stores associated with ${n.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(n){return this.appManagementRequest({query:xn,variables:{apiKey:n}})}async organizationBetaFlags(n,i){let a={organizationId:hi(n)},o=await Ke({query:dn(i),token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={};return i.forEach(l=>{r[l]=!!o.organization[`flag_${l}`]}),r}async organizationExpFlags(n,i){let a={organizationId:hi(n),flagHandles:i},o=await A({query:ln,token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={},l=o.organization?.enabledFlags??[];return i.forEach((d,m)=>{r[d]=!!l[m]}),r}async appManagementRequest(n){return ci({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(n){return ki({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(n){return V({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(n){return A({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(n){return fi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(n){return gi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(n="default"){return Ai(this,n)}},Ha="https://shopify.dev/apps/default-app-home",Ba="https://shopify.dev/apps/default-app-home/api/auth";function ja(e,n,i){let{isLaunchable:a,scopesArray:o,name:r}=e;return{initialVersion:{source:{source:{name:r,modules:[{type:ue,config:{app_url:a?"https://example.com":Ha,embedded:!0}},{type:ce,config:{name:r}},{type:ve,config:{api_version:i}},{type:pe,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":Ba],...o&&{scopes:o.map(p=>p.trim()).join(",")}}}]}}.source},organizationId:Fe(n)}}function Wa(e){let n=e.startsWith("gid://")?f(e):Number(e);if(Number.isNaN(n))throw new Error(`Invalid organization ID: ${e}`);return`gid://organization/Organization/${n}`}function hi(e){return L(Wa(e))}function Fe(e){return`gid://shopify/Organization/${e.startsWith("gid://")?f(e):Number(e)}`}function Ka(e){return L(`gid://organization/ShopifyShop/${e}`)}function Ga(e){let n=Z(e);if(n===void 0)throw new Error(`Invalid encoded GID: ${e}`);return n}function f(e){if(e.startsWith("gid://")){let n=R(e);if(n===void 0)throw new Error(`Invalid GID: ${e}`);return Number(n)}return Number(e)}async function X({id:e,organizationId:n}){let i=f(n).toString();return`https://${await ae()}/dashboard/${i}/apps/${f(e)}`}async function Ya(e,n,i){return`${await X({organizationId:e,id:n})}/versions/${f(i)}`}function Ja({currentModules:e,selectedVersionModules:n}){let i=e.map(m=>m.userIdentifier),a=n.map(m=>m.userIdentifier),o=n.filter(m=>!i.includes(m.userIdentifier)),r=e.filter(m=>!a.includes(m.userIdentifier)),l=r.map(m=>m.userIdentifier),d=e.filter(m=>!l.includes(m.userIdentifier));return{added:o,removed:r,updated:d}}async function Za(e,n,i,a=Ve){let o=C(e.flatMap(m=>m.organizationBetaFlags??[])),r=C(e.flatMap(m=>m.organizationExpFlags??[])),[l,d]=await Promise.all([o.length>0?n(o):Promise.resolve({}),r.length>0?i(r):Promise.resolve({})]);return e.filter(m=>{let p=!m.organizationBetaFlags||m.organizationBetaFlags.every(h=>l[h]),k=!m.organizationExpFlags||m.organizationExpFlags.every(h=>d[h]),u=!m.minimumCliVersion||oe(a,`>=${m.minimumCliVersion}`),v=!m.deprecatedFromCliVersion||oe(a,`<${m.deprecatedFromCliVersion}`),N=u&&v,g=Ge(a)&&m.deprecatedFromCliVersion===void 0;return p&&k&&(N||g)})}function _e(e,n){if(n===fe)return"configuration";switch(e){case"extension":case"configuration":case"deprecated":return e;default:return se(`Unknown specification experience value "${e}", defaulting to "extension"`),"extension"}}function Qa(e){switch(e){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function yi(e,n){return e.map(i=>{let{externalId:a,primaryDomain:o,name:r,url:l,storeType:d}=i,m=l??o;if(!m)throw new T("The selected store does not have a valid URL");return{shopId:a?Ga(a):void 0,link:o,shopDomain:U(m),shopName:r,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:n,storeType:d}})}function bi(e){return{registrationId:e.userIdentifier===e.uuid?"":e.userIdentifier,registrationUuid:e.uuid,registrationTitle:e.handle,type:e.specification.externalIdentifier,config:e.config,target:e.target??"",specification:{...e.specification,identifier:e.specification.identifier,options:{managementExperience:e.specification.managementExperience},experience:_e(e.specification.experience,e.specification.externalIdentifier)}}}var Xa=async({organizationId:e,jwtToken:n,cursor:i,filters:a})=>{let o=await mi(e,i,a),r=ye(n);return ie(o,{method:"GET",headers:r})};function Fi(e){let n=[],i=e.on[0]?.user_identifier;return i&&n.push({extension_id:i}),{...e,details:n}}function et(e){return[{field:"STORE_TYPE",operator:"EQUALS",value:e.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function _i(e){return e.includes("ondemand_access_to_stores")}var ne;(function(e){e.AppManagement="app-management",e.Partners="partners"})(ne||(ne={}));function mn(){return ee.getInstance()}var Ti;Ti||(Ti={});var nt={};function Di(e=[]){let n=[],i=e.map(a=>nt[a]);return n.filter(a=>!i.includes(a))}var De=new WeakMap;function Ai(e,n="default"){return{type:"token_refresh",handler:async()=>{let i=De.get(e);if(i)await i;else try{i=e.unsafeRefreshToken(),De.set(e,i),await i}finally{De.delete(e)}let a=await e.session();return{token:n==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{x as a,Z as b,Fa as c,Ne as d,ge as e,Da as f,Aa as g,z as h,$ as i,Q as j,he as k,Ia as l,Ra as m,za as n,Ca as o,un as p,Ii as q,yt as r,bt as s,cn as t,Ft as u,_t as v,it as w,rn as x,at as y,wi as z,tt as A,pn as B,kn as C,xi as D,It as E,xt as F,Li as G,Y as H,Rt as I,F as J,zt as K,I as L,J as M,Wi as N,Sn as O,Zi as P,hn as Q,yn as R,S,so as T,fe as U,ts as V,O as W,Wn as X,Zn as Y,va as Z,Xn as _,G as $,ue as aa,vo as ba,ce as ca,yo as da,sa as ea,da as fa,pe as ga,wo as ha,ve as ia,Kr as ja,Wa as ka,ne as la,mn as ma,Ai as na,le as oa,w as pa,ft as qa,Nt as ra,gt as sa};
@@ -1 +1 @@
1
- import{i as y}from"./chunk-T3B6KIPU.js";import{I as O,y as w}from"./chunk-PSSOCUUD.js";import{h as d}from"./chunk-W3BNL2Q5.js";import{sb as m,wb as S}from"./chunk-G5QSVBYP.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
1
+ import{i as y}from"./chunk-2AAHKMPP.js";import{I as O,y as w}from"./chunk-KCHERKZO.js";import{i as d}from"./chunk-XUJURYN5.js";import{Eb as m,Ib as S}from"./chunk-COFGQT76.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
@@ -1 +1 @@
1
- import{d as s}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),a=p.tmpdir(),{env:i}=c,E=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(a,o)}},A=o=>{let t=i.APPDATA||e.join(n,"AppData","Roaming"),_=i.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(_,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(_,o,"Cache"),log:e.join(_,o,"Log"),temp:e.join(a,o)}},S=o=>{let t=e.basename(n);return{data:e.join(i.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(i.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(i.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(i.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(a,t,o)}};function I(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?E(o):c.platform==="win32"?A(o):S(o)}var T="shopify-cli",O=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:I(T).cache;var C={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},P="theme-kit-access.shopifyapps.com",F={backendPort:"BACKEND_PORT"},h={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>O(),vendor:{path:()=>s(O(),"vendor"),binaries:()=>s(O(),"vendor","binaries")}}}},m={expirationTimeMarginInMinutes:4},Y="9e1e6889176fd0c795d5c659225e0fae",u={limit:300,timeout:{days:1}},f=process.env[C.themeKitAccessDomain]??P;export{I as a,C as b,P as c,F as d,h as e,m as f,Y as g,u as h,f as i};
1
+ import{d as s}from"./chunk-3VYOLEQE.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),a=p.tmpdir(),{env:i}=c,E=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(a,o)}},A=o=>{let t=i.APPDATA||e.join(n,"AppData","Roaming"),_=i.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(_,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(_,o,"Cache"),log:e.join(_,o,"Log"),temp:e.join(a,o)}},S=o=>{let t=e.basename(n);return{data:e.join(i.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(i.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(i.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(i.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(a,t,o)}};function I(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?E(o):c.platform==="win32"?A(o):S(o)}var T="shopify-cli",O=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:I(T).cache;var C={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},P="theme-kit-access.shopifyapps.com",F={backendPort:"BACKEND_PORT"},h={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>O(),vendor:{path:()=>s(O(),"vendor"),binaries:()=>s(O(),"vendor","binaries")}}}},m={expirationTimeMarginInMinutes:4},Y="9e1e6889176fd0c795d5c659225e0fae",u={limit:300,timeout:{days:1}},f=process.env[C.themeKitAccessDomain]??P;export{I as a,C as b,P as c,F as d,h as e,m as f,Y as g,u as h,f as i};
@@ -1 +1 @@
1
- import{f as b}from"./chunk-2Z52XJQG.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-CRTU67VJ.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
1
+ import{g as b}from"./chunk-C4QR7Z4N.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-24QGAUUD.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-7AD5YCLL.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
@@ -0,0 +1,7 @@
1
+ import{a as P}from"./chunk-MINDMVTH.js";import{a as D}from"./chunk-RFDOSK57.js";import{Aa as m,Ba as _,Ha as L}from"./chunk-AKSOCKVF.js";import{b as A,c as $}from"./chunk-2KBTFKSM.js";import{A as R,z as F}from"./chunk-KCHERKZO.js";import{a as S}from"./chunk-IUUKRTKF.js";import{i}from"./chunk-XUJURYN5.js";import{Aa as N,Ib as v,Xa as T,b as s,fb as O,ya as C}from"./chunk-COFGQT76.js";import{b as Y}from"./chunk-JA2QZ635.js";import{d as l,g as d,i as b,j as E}from"./chunk-3VYOLEQE.js";import{e as H,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function j({remoteApp:o,developerPlatformClient:e}){let t=await e.channelSpecExport(o);if(t.status===404)throw new i("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!t.ok){let r=typeof t.body?.reason=="string"?t.body.reason:void 0;if(t.status===426)throw new i(`Failed to fetch the channel spec export: ${r??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(t.status===422)return{success:!1,reason:r??`http_${t.status}`};throw t.status===401||t.status===403?new i(`Failed to fetch the channel spec export: authentication failed (status ${t.status}).`,"Run `shopify auth logout` and try again."):new i(`Failed to fetch the channel spec export: the server responded with status ${t.status}.`,"Try again in a moment.")}let{handle:a,filename:p,toml:h,warnings:n}=t.body;if(typeof a!="string"||typeof p!="string"||typeof h!="string")throw new i("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:a,filename:p,toml:h,warnings:J(n)}}function J(o){return Array.isArray(o)?o.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var k=s.object({code:s.string(),message:s.string()}),w=S({name:"ImportChannelConfigResult",schema:s.object({handle:s.string(),filename:s.string(),path:s.string(),toml:s.string(),warnings:s.array(k)}),definitions:{ChannelSpecExportWarning:k}});var u=l("extensions","channel-config"),pe=l(u,_),x="shopify.extension.toml",G=`name = "Channel config"
2
+ type = "${m}"
3
+ handle = "channel-config"
4
+ `,X=["extensions/*"],z={no_exportable_frozen_record:"This app doesn't have a channel spec that can be exported yet.",multiple_exportable_records:"This app has more than one channel spec, so it can't be exported automatically.",not_allowlisted:"This app isn't part of the channel spec export prototype yet.",contains_no_public_fields:"This app's channel spec has no public channel_config fields.",invalid_public_schema:"This app's channel spec doesn't match the public channel_config schema."};async function M(o){let{app:e,remoteApp:t,developerPlatformClient:a,force:p,json:h}=o,n=await j({remoteApp:t,developerPlatformClient:a});if(!n.success){let g=z[n.reason];throw g?new i(g):new i(`The channel spec for this app could not be exported (reason: ${n.reason}).`)}let{extensionDirectory:r,createExtension:y}=B(e),f=l(r,_,E(n.filename));if(!p&&await T(f))throw new i(`A channel spec already exists at ${d(e.directory,f)}.`,"Re-run with `--force` to replace it.");if(await N(b(f)),y&&await C(l(r,x),G),await C(f,n.toml),h){v(w.encode({handle:n.handle,filename:E(n.filename),path:d(e.directory,f),toml:n.toml,warnings:n.warnings}));return}n.warnings.forEach(g=>R({body:g.message})),F({headline:["Imported the channel spec for",{userInput:t.title},{char:"."}],body:["The spec was written to",{filePath:d(e.directory,f)},{char:"."},...y?["Also created",{filePath:d(e.directory,l(r,x))},"so the spec is included when your app is deployed."]:[]],nextSteps:["Review the generated spec and make any changes your channel needs.",["Run",{command:"shopify app dev"},"to try the spec on a development store before releasing it."],["Run",{command:"shopify app deploy"},"to deploy the spec as part of your app."]]})}function B(o){let e=o.allExtensions.filter(r=>r.type===m);if(e.length>1){let r=e.map(y=>d(o.directory,y.directory)).join(", ");throw new i(`This app has more than one ${m} extension (${r}).`,"Only one is allowed. Remove the extras and try again.")}if(e.length===1)return{extensionDirectory:e[0].directory,createExtension:!1};let t=o.configuration.extension_directories,a=t&&t.length>0?t:X;if(!a.some(r=>O(`${u}/${x}`,`${r}/*.extension.toml`)))throw new i(`Your shopify.app.toml only loads extensions from ${a.join(", ")}, so a new extension at ${u} wouldn't be deployed.`,`Create a ${m} extension in one of those directories with a ${x} like:
5
+
6
+ ${G}
7
+ then re-run this command.`);let h=l(o.directory,u),n=o.allExtensions.find(r=>r.directory===h);if(n)throw new i(`${u} already contains a ${n.type} extension.`,"Move that extension to another directory, then re-run this command.");return{extensionDirectory:h,createExtension:!0}}var W=H(Y(),1);var I=class o extends P{static hidden=!0;static summary="Import your app's default channel spec as a channel_config extension.";static descriptionWithMarkdown="Imports the Shopify-authored channel spec for your app as a `channel_config` extension.\n\n The generated TOML only includes public `channel_config` fields. Review it, then deploy it with `shopify app deploy`.";static description=this.descriptionWithoutMarkdown();static get jsonOutputSchema(){return w}static flags={...A,...D,...$,force:W.Flags.boolean({description:"Overwrite the existing channel spec file without prompting.",env:"SHOPIFY_FLAG_FORCE",default:!1})};async run(){let{flags:e}=await this.parse(o),{app:t,remoteApp:a,developerPlatformClient:p}=await L({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config});return await M({app:t,remoteApp:a,developerPlatformClient:p,force:e.force,json:e.json}),{app:t}}};export{I as a};
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-MINDMVTH.js";import{a as d}from"./chunk-RFDOSK57.js";import{Ha as h}from"./chunk-AKSOCKVF.js";import{b as g,c as l}from"./chunk-2KBTFKSM.js";import{a as m}from"./chunk-IUUKRTKF.js";import{Ib as u,Vb as f,b as e}from"./chunk-COFGQT76.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();function S(s){return s.allExtensions.filter(t=>t.isFunctionExtension).map(t=>({source:`extensions.${t.configuration.handle}`,namespace:"extensions",handle:t.handle,name:t.name,type:t.type,externalType:t.externalType,humanName:t.humanName,uid:t.uid,directory:t.directory,configurationPath:t.configurationPath,configuration:t.configuration,entrySourceFilePath:t.entrySourceFilePath,outputPath:t.outputPath,surface:t.surface,features:t.features,dependency:t.dependency}))}o();var P=e.object({source:e.string(),namespace:e.literal("extensions"),handle:e.string(),name:e.string(),type:e.string(),externalType:e.string(),humanName:e.string(),uid:e.string(),directory:e.string(),configurationPath:e.string(),configuration:e.record(e.unknown()),entrySourceFilePath:e.string(),outputPath:e.string(),surface:e.string(),features:e.array(e.string()),dependency:e.string().optional()}).strict(),c=m({name:"AppLogSourcesResult",schema:e.object({sources:e.array(P)}).strict(),definitions:{AppLogSource:P}});o();function j(s,t){if(t==="json"){u(c.encode({sources:s}));return}let r=new Map;s.forEach(({source:a})=>{let n=a.split(".");if(n.length>=2){let i=n[0];r.has(i)||r.set(i,[]),r.set(i,[...r.get(i),a])}});for(let[a,n]of r)u(f(a,n.join(`
2
+ `)))}var p=class s extends y{static summary="Print out a list of sources that may be used with the logs command.";static descriptionWithMarkdown="The output source names can be used with the `--source` argument of `shopify app logs` to filter log output. Currently only function extensions are supported as sources.";static get jsonOutputSchema(){return c}static description=this.descriptionForHelp();static flags={...g,...d,...l};async run(){let{flags:t}=await this.parse(s),{app:r}=await h({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return r.errors.isEmpty()?j(S(r),t.json?"json":"text"):process.exit(2),{app:r}}};export{p as a};
@@ -0,0 +1,16 @@
1
+ import{b as s}from"./chunk-CUZQRXTV.js";import{e as w}from"./chunk-QF6EH4HX.js";import{C,E as x,y as a}from"./chunk-KCHERKZO.js";import{i as S}from"./chunk-XUJURYN5.js";import{Nb as I}from"./chunk-COFGQT76.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};n();function p(o=v()){return!!o.get("autocorrectEnabled")}function y(o,e=v()){e.set("autocorrectEnabled",o)}function v(){return A??=new w({projectName:"did-you-mean"}),A}var A;var u=class extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
2
+
3
+ When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
4
+
5
+ When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
6
+ `;static description=this.descriptionForHelp();async run(){y(!0),a({body:m.on})}};n();var d=class extends s{static summary="Disable autocorrect. Off by default.";static descriptionWithMarkdown=`Disable autocorrect. Off by default.
7
+
8
+ When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
9
+
10
+ When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
11
+ `;static description=this.descriptionForHelp();async run(){y(!1),a({body:m.off})}};n();var f=class extends s{static summary="Check whether autocorrect is enabled or disabled. On by default.";static descriptionWithMarkdown=`Check whether autocorrect is enabled or disabled. On by default.
12
+
13
+ When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
14
+
15
+ When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
16
+ `;static description=this.descriptionForHelp();async run(){p()?a({body:m.on}):a({body:m.off})}};n();var b=E(2),Z=E(3);function E(o){if(typeof o!="number"||Number.isNaN(o)||o<1||o===Number.POSITIVE_INFINITY)throw new Error("`"+o+"` is not a valid argument for `n-gram`");return e;function e(t){let i=[];if(t==null)return i;let c=typeof t.slice=="function"?t:String(t),r=c.length-o+1;if(r<1)return i;for(;r--;)i[r]=c.slice(r,r+o);return i}}function h(o){return o.replace(/:/g," ")}function W(o,e){let t=new Map;for(let c of o)t.set(c,(t.get(c)??0)+1);let i=0;for(let c of e){let r=t.get(c)??0;r>0&&(i+=1,t.set(c,r-1))}return i}function D(o){if(o.id.length<2)return;let e=new Set(o.config.commands.filter(r=>r.hidden).map(r=>r.id)),t=Array.from(new Set([...o.config.commandIDs,...o.config.commands.flatMap(r=>r.aliases)].filter(r=>!e.has(r)))),i=b(o.id),c=t.map(r=>{let l=b(r);return{score:W(l,i),cmd:r}}).filter(({score:r})=>r>=2).sort((r,l)=>{let g=l.score-r.score;return g!==0?g:r.cmd.length-l.cmd.length});if(I(`'Did you mean' options: ${JSON.stringify(c)}`),c.length>0){let{cmd:r}=c[0];return r}}async function F(o,e){return p()?(a({body:["Autocorrecting",{command:h(e)},"to",{command:h(o)},{char:"."}]}),!0):x({message:["Command",{command:e},"not found. Did you mean",{command:h(o)},{char:"?"}]})}var uo={"config:autocorrect:off":d,"config:autocorrect:status":f,"config:autocorrect:on":u},fo=async function(o){let e=D(o),t=h(o.id);if(o.argv&&(o.argv.includes("-f")||o.argv.includes("--force"))||!e){C(new S(`Command '${t}' not found.`));return}await F(e,t)&&await this.config.runCommand(e,o.argv)};export{D as a,F as b,uo as c,fo as d};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-OAEGTH4Q.js";import{b as a}from"./chunk-UBTHWHPB.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-MZJKZLCC.js";import{b as a}from"./chunk-CUZQRXTV.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
@@ -0,0 +1 @@
1
+ import{Bb as h,Jb as g,Qb as f,ib as E}from"./chunk-COFGQT76.js";import{b as O}from"./chunk-JA2QZ635.js";import{e as m}from"./chunk-3VYOLEQE.js";import{e as P,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var R=new Set(["THROTTLED","429"]),b=new Set(["ACCESS_DENIED","access_denied"]);function I(e){return Array.isArray(e)?e.flatMap(t=>{let s=[],n=t,r=n?.extensions?.code;typeof r=="string"&&s.push(r);let u=n?.extensions?.app_errors?.errors;if(Array.isArray(u))for(let p of u){let l=p?.category;typeof l=="string"&&s.push(l)}return s}):[]}function T(e){return e!==void 0&&R.has(e)}function _(e){return e!==void 0&&b.has(e)}function S(e){return I(e).some(T)}o();var C=new Set([502,503,504]);function x(e){return e!==void 0&&C.has(e)}var M=P(O(),1),i;(function(e){e[e.Abort=0]="Abort",e[e.AbortSilent=1]="AbortSilent",e[e.Bug=2]="Bug"})(i||(i={}));var y=class extends Error{},a=class extends Error{tryMessage;type;nextSteps;formattedMessage;customSections;code;details;skipOclifErrorHandling;constructor(t,s,n=null,r,u){let p=typeof t=="string"||"value"in t;super(p?f(t):E(t)),n?n instanceof h?this.tryMessage=f(n):this.tryMessage=n:this.tryMessage=null,this.type=s,this.nextSteps=r,this.customSections=u,this.skipOclifErrorHandling=!0,p||(this.formattedMessage=t)}},d=class extends a{constructor(t,s=null,n,r){super(t,i.Abort,s,n,r)}},w=class extends a{command;args;constructor(t,s,n,r=null){super(t,i.Abort,r),this.command=s,this.args=n}},A=class extends a{constructor(){super("",i.AbortSilent)}},c=class extends a{constructor(t,s=null){super(t,i.Bug,s)}};async function z(e){let t;if(k(e))t=e;else if(typeof e=="string")t=new c(e);else if(e instanceof Error)t=new c(e.message),t.stack=e.stack;else{let r=e;t=new c(r?.message??"Unknown error"),r?.stack&&(t.stack=r?.stack)}let{jsonOutputEnabled:s}=await import("./environment-ZUTBXY7U.js");if(s()){let{renderFatalErrorAsJson:r}=await import("./json-error-UR2OILQ6.js");return r(t),await g(),e}let{renderFatalError:n}=await import("./ui-SYB4LLWY.js");return n(t),Promise.resolve(e)}function J(e){if(e instanceof M.Errors.CLIError){let t=new d(e.message);return t.stack=e.stack,Promise.resolve(t)}else return Promise.resolve(e)}function k(e){try{return Object.prototype.hasOwnProperty.call(e,"type")}catch{return!1}}function Q(e){if(!k(e)){if(e instanceof Error){if(v(e))return!1;let t=e.message;return!L(t)}return!0}return e.type===i.Bug}function v(e){let t=e;if(typeof t.response!="object"||t.response===null||t.request===void 0)return!1;let s=t.response.status;return s===401||s===429||x(s)?!0:S(t.response.errors)}function W(e){return m(e).replace("file:/","/").replace(/^\/?[A-Z]:/,"")}function L(e){return["EPERM: operation not permitted, scandir","EPERM: operation not permitted, rename","EACCES: permission denied","EPERM: operation not permitted, symlink","This version of npm supports the following node versions","EBUSY: resource busy or locked","ENOTEMPTY: directory not empty","getaddrinfo ENOTFOUND","Client network socket disconnected before secure TLS connection was established","spawn EPERM","socket hang up","The user aborted a request.","write EPIPE","Unsupported platform"].some(n=>e.includes(n))}export{I as a,T as b,_ as c,S as d,x as e,i as f,y as g,a as h,d as i,w as j,A as k,c as l,z as m,J as n,Q as o,W as p};
@@ -0,0 +1,2 @@
1
+ import{ba as X,ka as z,la as j,ma as v,na as J,oa as A,pa as W,qa as k,ra as q,sa as N,ta as B,ua as L,va as K,wa as R,xa as Q}from"./chunk-AKSOCKVF.js";import{B as l,q as T,t as G}from"./chunk-WBTR5JZ6.js";import{d as H}from"./chunk-LOKVWZD2.js";import{D as x,z as U}from"./chunk-KCHERKZO.js";import{i as C,k as P}from"./chunk-XUJURYN5.js";import{$ as c,Aa as I,Ca as D,Eb as $,Xa as V,ca as b,ua as F}from"./chunk-COFGQT76.js";import{d as E,j as M}from"./chunk-3VYOLEQE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
+ `)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
@@ -1,7 +1,7 @@
1
- import{a as Q,b as X,c as H}from"./chunk-WAZL37JY.js";import{a as L,c as M,e as f,f as P,h as T,i as q,m as V,p as U,q as F,r as j,s as z,u as _}from"./chunk-DKAWQBTI.js";import{a as W}from"./chunk-34PQ6LJC.js";import{a as G,b as J}from"./chunk-4JU7N2OF.js";import{b as N}from"./chunk-2IZROVCY.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-PSSOCUUD.js";import{h as m,k as R}from"./chunk-W3BNL2Q5.js";import{Ta as I,ma as C,qb as r,sb as s,ua as S,wb as x}from"./chunk-G5QSVBYP.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
2
- `);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:d,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:p,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await P({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(d,b);ae(o,B),H(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:X({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:p,query:o,variablesJsonl:B,version:k}):await T({adminSession:p,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await F(p,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await U(p,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let d=await j(t.url),b=z(d);e?await S(e,d):x(d),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
3
- `,{command:`shopify app bulk status --id=${M(t)}`}]}var A=class t extends W{static summary="Execute bulk operations.";static descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
1
+ import{a as Q,b as W,c as X}from"./chunk-7H4IM6PX.js";import{a as L,c as P,e as f,f as M,h as T,i as q,m as V,p as F,q as U,r as j,s as z,u as H}from"./chunk-7WWPAHVE.js";import{a as _}from"./chunk-MINDMVTH.js";import{a as G,b as J}from"./chunk-RFDOSK57.js";import{b as N}from"./chunk-2KBTFKSM.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-KCHERKZO.js";import{i as m,l as R}from"./chunk-XUJURYN5.js";import{Cb as r,Eb as s,Ib as x,Xa as I,qa as C,ya as S}from"./chunk-COFGQT76.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
2
+ `);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:p,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:d,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await M({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(p,b);ae(o,B),X(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:W({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:d,query:o,variablesJsonl:B,version:k}):await T({adminSession:d,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await U(d,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await F(d,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let p=await j(t.url),b=z(p);e?await S(e,p):x(p),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
3
+ `,{command:`shopify app bulk status --id=${P(t)}`}]}var A=class t extends _{static summary="Execute bulk operations.";static descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
4
4
 
5
5
  Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
6
6
 
7
- Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;static description=this.descriptionWithoutMarkdown();static flags={...N,...G,...J};async run(){let{flags:e}=await this.parse(t),{query:i,appContextResult:n,store:o}=await _(e);return await Y({organization:n.organization,remoteApp:n.remoteApp,store:o,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};export{A as a};
7
+ Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;static description=this.descriptionForHelp();static flags={...N,...G,...J};async run(){let{flags:e}=await this.parse(t),{query:i,appContextResult:n,store:o}=await H(e);return await Y({organization:n.organization,remoteApp:n.remoteApp,store:o,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};export{A as a};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-RU6J6QQF.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
1
+ import{b as n}from"./chunk-GHO2S3W3.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
@@ -1,4 +1,4 @@
1
- import{a as V}from"./chunk-F33TYJM5.js";import{k as q,l as H,n as I}from"./chunk-KDMJ2BLO.js";import{a as Y}from"./chunk-NAQ7KT6L.js";import{b as L}from"./chunk-2JM3XHTQ.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as N}from"./chunk-MMHTYLTG.js";import{a as F}from"./chunk-XRWQ7AXY.js";import{a as y,c as U}from"./chunk-K3OI5VDE.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-TUWRPDTE.js";import{r as k}from"./chunk-GBYDMHZ3.js";import{aa as B}from"./chunk-MFP63IUM.js";import{T as b,xa as a,ya as O}from"./chunk-KYNXMDFU.js";import{A as d,B as C,E as P,z as f}from"./chunk-PSSOCUUD.js";import{h as S}from"./chunk-W3BNL2Q5.js";import{wb as $}from"./chunk-G5QSVBYP.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
1
+ import{b as L}from"./chunk-AZCPTV4A.js";import{a as V}from"./chunk-J4SJHG3M.js";import{k as q,l as H,n as I}from"./chunk-LAHZ6FO5.js";import{a as Y}from"./chunk-JJ4MYCVU.js";import{a as y,c as U}from"./chunk-NZRQKFUB.js";import{a as N}from"./chunk-LIB64ZJW.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as F}from"./chunk-P6ID3ULA.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-NSHKVJST.js";import{r as k}from"./chunk-2AZXDU2R.js";import{aa as B}from"./chunk-HKNFZUAM.js";import{K as b,oa as a,pa as O}from"./chunk-VWYZCCRE.js";import{A as d,B as C,E as P,z as f}from"./chunk-KCHERKZO.js";import{i as S}from"./chunk-XUJURYN5.js";import{Ib as $}from"./chunk-COFGQT76.js";import{f as T,q as l}from"./chunk-3VYOLEQE.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -1 +1 @@
1
- import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-CN7N5IOM.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-M72BVWQ3.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-P3APEIHY.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-Q5U4WGYG.js");return o[n]}}export{D as a};
1
+ import{d as i,i as r,p as s}from"./chunk-3VYOLEQE.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-W25ND3PJ.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-ZQW4E7QU.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-VEVNMHDE.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-HI6AAP5V.js");return o[n]}}export{D as a};
@@ -0,0 +1 @@
1
+ import{g as t}from"./chunk-VKWPEFWQ.js";t();
@@ -0,0 +1 @@
1
+ import{a as j}from"./chunk-MINDMVTH.js";import{a as C}from"./chunk-RFDOSK57.js";import{Ha as O,ia as N}from"./chunk-AKSOCKVF.js";import{b as R,c as k}from"./chunk-2KBTFKSM.js";import{G as w}from"./chunk-KCHERKZO.js";import{a as y}from"./chunk-IUUKRTKF.js";import{i as S}from"./chunk-XUJURYN5.js";import{Cb as x,Eb as E,Ib as I,Kb as f,Tb as b,b as o,fa as v}from"./chunk-COFGQT76.js";import{i as T}from"./chunk-B4OMIONW.js";import{j as L}from"./chunk-3VYOLEQE.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var B=o.object({createdAt:o.string(),createdBy:o.string(),versionTag:o.string().nullable().optional(),status:o.string(),versionId:o.string(),message:o.string()}),u=y({name:"AppVersionsListResult",schema:o.array(B),definitions:{AppVersion:B}});r();async function M(i,t){let n=await i.appVersions(t);if(!n.app)throw new S(`Shopify did not return app information for API key ${t.apiKey}.`);return{appVersions:n.app.appVersions.nodes.map(e=>({createdAt:v(new Date(e.createdAt)),createdBy:e.createdBy?.displayName??"",versionTag:e.versionTag,status:e.status,versionId:e.versionId,message:e.message??""})),totalResults:n.app.appVersions.pageInfo.totalResults}}r();var $=12;async function D({app:i,appVersions:t,totalResults:n,remoteApp:e,organization:p,developerPlatformClient:m},d){if(d==="json"){I(u.encode(t));return}if(N({org:p.businessName,appName:e.title,configFile:L(i.configPath)}),t.length===0){f("No app versions found for this app");return}let g=t.map(({versionId:s,...a})=>({...a,status:a.status==="active"?T.green(`\u2605 ${a.status}`):a.status})),l=(process.stdout.columns??75)-$,c=l;g.forEach(s=>{let a=s.message.length+(s.versionTag?.length??0)+b(s.status).length+s.createdAt.length+s.createdBy.length;if(a>l){let J=a-s.message.length,A=Math.max(l-J,10);A<c&&(c=A)}}),g.forEach(s=>{s.message.length>c&&(s.message=`${s.message.slice(0,c-3)}...`)}),w({rows:g,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let F=x.link(m.webUiName,[await m.appDeepLink(e),"versions"].join("/"));f(E`\nView all ${String(n)} app versions in the ${F}`)}var h=class i extends j{static summary="List deployed versions of your app.";static descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...R,...C,...k};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e,developerPlatformClient:p,organization:m}=await O({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),d=await M(p,e);return await D({app:n,remoteApp:e,organization:m,developerPlatformClient:p,...d},t.json?"json":"text"),{app:n}}};export{h as a};
@@ -0,0 +1 @@
1
+ import{b as r,d as u}from"./chunk-WNO2V53C.js";import{a as i}from"./chunk-JD5P5RAJ.js";import{s}from"./chunk-3VYOLEQE.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();import o from"crypto";function m(e){return o.createHash("sha256").update(e).digest()}function d(e){return o.createHash("sha1").update(e).digest("hex")}function x(e){return o.createHash("md5").update(e).digest("hex")}function g(){return o.randomUUID()}function p(e){return o.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(e).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function t(){return process.env}function N(){let e=t();return e[r.appAutomationToken]??e[r.partnersToken]}function U(){return t()[r.organization]}function c(e){if(e&&!isNaN(Number(e)))return Number(e)}function v(){return c(t()[u.backendPort])}function I(){let e=t()[r.identityToken],n=t()[r.refreshToken];if(!(!e||!n))return{accessToken:e,refreshToken:n,userId:p(e)}}function R(e=t(),n=process.argv){return s(n)||i(e[r.json])}function H(e=t()){return i(e[r.skipNetworkLevelRetry])}function B(e=t()){return c(e[r.maxRequestTimeForNetworkCalls])??30*1e3}export{m as a,d as b,x as c,g as d,p as e,t as f,N as g,U as h,v as i,I as j,R as k,H as l,B as m};
@@ -0,0 +1,4 @@
1
+ import{a as C}from"./chunk-MINDMVTH.js";import{a as k}from"./chunk-RFDOSK57.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-AKSOCKVF.js";import{b as R}from"./chunk-2KBTFKSM.js";import{B as v,H as h,z as g}from"./chunk-KCHERKZO.js";import{d as w}from"./chunk-WR2MMFJO.js";import{k as A}from"./chunk-XUJURYN5.js";import{b as y}from"./chunk-JA2QZ635.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
2
+ ${s.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
3
+
4
+ `:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class n extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionForHelp();static flags={...R,...k,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(n),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],r=e["allow-deletes"],s=!!(o&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await x({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:s,allowUpdates:o,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};