shopify 4.9.5 → 5.0.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 (501) hide show
  1. package/dist/analytics-RSUIYNLC.js +1 -0
  2. package/dist/analytics-V2SDYXQJ.js +1 -0
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
  4. package/dist/assets/hydrogen/starter/package.json +2 -2
  5. package/dist/assets/hydrogen/vite/package.json +3 -4
  6. package/dist/assets/hydrogen/vite/vite.config.js +3 -3
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/chunk-2AW3KBTP.js +1 -0
  9. package/dist/{chunk-S6A7TMR4.js → chunk-2CJQQQW4.js} +1 -1
  10. package/dist/{chunk-7LB6DPB6.js → chunk-2M4BKFYF.js} +1 -1
  11. package/dist/chunk-2M535QQJ.js +6 -0
  12. package/dist/chunk-2NZ7GDDR.js +2 -0
  13. package/dist/{chunk-QUO4RD3W.js → chunk-2QQ7EBJD.js} +1 -1
  14. package/dist/chunk-2RFCYZMG.js +47 -0
  15. package/dist/chunk-2S5NPJEJ.js +5 -0
  16. package/dist/chunk-2TPLPZA2.js +3 -0
  17. package/dist/{chunk-ANG44FIF.js → chunk-2YGPWG3I.js} +1 -1
  18. package/dist/chunk-32O27NE3.js +1 -0
  19. package/dist/chunk-335BUVBP.js +1 -0
  20. package/dist/{chunk-MZL6VM3W.js → chunk-364BVGRY.js} +1 -1
  21. package/dist/{chunk-4VS7YD53.js → chunk-36TZ447N.js} +1 -1
  22. package/dist/chunk-37P5YOP2.js +7 -0
  23. package/dist/chunk-3G2PEYPI.js +2 -0
  24. package/dist/{chunk-2II4W4ZF.js → chunk-3JACWBUC.js} +1 -1
  25. package/dist/chunk-43HKFLOU.js +3 -0
  26. package/dist/chunk-46JYM3GH.js +1 -0
  27. package/dist/chunk-4EDE3UH7.js +18 -0
  28. package/dist/{chunk-ND6O6KT6.js → chunk-4GQEXVDT.js} +1 -1
  29. package/dist/{chunk-5XTJ4OL4.js → chunk-4IUXLUFD.js} +1 -1
  30. package/dist/chunk-4QZ6OBXL.js +4 -0
  31. package/dist/{chunk-XVFQ6CNO.js → chunk-4SDCXKYR.js} +9 -6
  32. package/dist/chunk-56GKTWFF.js +5 -0
  33. package/dist/chunk-5AQ5JT2V.js +7 -0
  34. package/dist/{chunk-SUTVPAJF.js → chunk-5AWELO3D.js} +1 -1
  35. package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
  36. package/dist/chunk-5D4FNAAD.js +3 -0
  37. package/dist/chunk-5TWYJQQO.js +1 -0
  38. package/dist/{chunk-3XAD2E55.js → chunk-5XOEMYEQ.js} +1 -1
  39. package/dist/chunk-5YUDEPEY.js +1 -0
  40. package/dist/chunk-5YXYYQBX.js +1 -0
  41. package/dist/chunk-63UKZLPC.js +1 -0
  42. package/dist/chunk-6JZC6UKY.js +20 -0
  43. package/dist/chunk-6PUU6ZNQ.js +1 -0
  44. package/dist/chunk-6Y6A2QGK.js +3 -0
  45. package/dist/chunk-75LAVRRL.js +274 -0
  46. package/dist/chunk-7AWAOPLA.js +1 -0
  47. package/dist/chunk-7GHSE7SG.js +1 -0
  48. package/dist/{chunk-CEQ5S3HH.js → chunk-7NYCJG2U.js} +1 -1
  49. package/dist/chunk-7U2MTK6I.js +1 -0
  50. package/dist/{chunk-NHE46R6C.js → chunk-7XAEI4XT.js} +1 -1
  51. package/dist/chunk-7Y7AZRL3.js +10 -0
  52. package/dist/chunk-A7LBGXWG.js +1 -0
  53. package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
  54. package/dist/chunk-ADVLRSSO.js +1 -0
  55. package/dist/chunk-AIEVQSI3.js +1 -0
  56. package/dist/chunk-AOBE6HN6.js +31 -0
  57. package/dist/chunk-AQ34X5B3.js +2 -0
  58. package/dist/chunk-B2VE7WOX.js +1 -0
  59. package/dist/chunk-B4ISKIXN.js +5 -0
  60. package/dist/chunk-BAHIL37I.js +1 -0
  61. package/dist/chunk-BB7GAZP6.js +1 -0
  62. package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
  63. package/dist/chunk-BNTOGZLY.js +1 -0
  64. package/dist/chunk-BU3JQM3W.js +1 -0
  65. package/dist/chunk-C3LL5CZA.js +1 -0
  66. package/dist/{chunk-PIGERIRY.js → chunk-C4EKNOLY.js} +1 -1
  67. package/dist/{chunk-YN4FSUFF.js → chunk-CFUZ6574.js} +1 -1
  68. package/dist/{chunk-7DSH4CRU.js → chunk-CKVVJ4XO.js} +1 -1
  69. package/dist/chunk-CNPBDSDL.js +1 -0
  70. package/dist/{chunk-BAHM64B4.js → chunk-CWR3IFXD.js} +1 -1
  71. package/dist/{chunk-T3UCIWRH.js → chunk-CX3ANDPI.js} +1 -1
  72. package/dist/chunk-CXPYOLGM.js +4 -0
  73. package/dist/{chunk-MTBABHUB.js → chunk-D4LFWIFE.js} +1 -1
  74. package/dist/chunk-DM7BTMFP.js +2 -0
  75. package/dist/{chunk-WGO2GC6I.js → chunk-DSKAIC7O.js} +1 -1
  76. package/dist/{chunk-WKVFVT3H.js → chunk-DTRENW4Q.js} +1 -1
  77. package/dist/{chunk-G362JEAV.js → chunk-DVW7NDVD.js} +1 -1
  78. package/dist/chunk-E3CTHNQS.js +1 -0
  79. package/dist/chunk-EA5XVQJT.js +1 -0
  80. package/dist/{chunk-K6FH5JSY.js → chunk-EH22T4FI.js} +2 -2
  81. package/dist/{chunk-5NCWBBRW.js → chunk-ETXBF6Q7.js} +1 -1
  82. package/dist/{chunk-5GFVMGAZ.js → chunk-EXTVC33U.js} +1 -1
  83. package/dist/chunk-F3OM2YO6.js +1 -0
  84. package/dist/{chunk-MWWULCLD.js → chunk-FHNJLON5.js} +1 -1
  85. package/dist/chunk-FK5OFLSJ.js +1 -0
  86. package/dist/chunk-FNWXMCSD.js +97 -0
  87. package/dist/chunk-FPOZMNT2.js +2 -0
  88. package/dist/chunk-FS5PZCZ3.js +1 -0
  89. package/dist/chunk-FTHVOIK7.js +4 -0
  90. package/dist/chunk-FVRI7ZKE.js +103 -0
  91. package/dist/chunk-FZCGRIOM.js +1 -0
  92. package/dist/chunk-GCKGQFV7.js +1 -0
  93. package/dist/chunk-GGJUPL4W.js +6 -0
  94. package/dist/{chunk-RW3P3UMU.js → chunk-GHU6YEXH.js} +2 -2
  95. package/dist/chunk-GNPIKPHB.js +1 -0
  96. package/dist/{chunk-PT3OZEBI.js → chunk-GSGCSBRN.js} +1 -1
  97. package/dist/chunk-H57KYDEI.js +16 -0
  98. package/dist/chunk-HF4NDEX3.js +1 -0
  99. package/dist/chunk-HNU6R7RT.js +7 -0
  100. package/dist/{chunk-65GNYRYR.js → chunk-HP2ZAAY7.js} +2 -2
  101. package/dist/chunk-HPT3UXZ5.js +4 -0
  102. package/dist/chunk-HT66BOEC.js +8 -0
  103. package/dist/chunk-HXNGLDMU.js +1 -0
  104. package/dist/chunk-IAL6IQYW.js +16 -0
  105. package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
  106. package/dist/chunk-IULZYDCI.js +9 -0
  107. package/dist/chunk-IWTNUJGY.js +2 -0
  108. package/dist/chunk-IWTOC6DG.js +1 -0
  109. package/dist/chunk-IY5EI5V2.js +1 -0
  110. package/dist/{chunk-AODTY2BL.js → chunk-J3UXIC23.js} +4 -4
  111. package/dist/{chunk-EZG5EB7D.js → chunk-J5DUFSR4.js} +1 -1
  112. package/dist/chunk-J7BTC45S.js +1 -0
  113. package/dist/chunk-JMVK2BIB.js +3 -0
  114. package/dist/chunk-JUTULEWW.js +5 -0
  115. package/dist/{chunk-DO5YFMTJ.js → chunk-K3YALQBQ.js} +1 -1
  116. package/dist/{chunk-XPDHT3Z4.js → chunk-KGASGUDQ.js} +1 -1
  117. package/dist/{chunk-JPFHPVIO.js → chunk-KLYGMYXV.js} +1 -1
  118. package/dist/chunk-KNQXCU3Y.js +6 -0
  119. package/dist/{chunk-4BXQTW5G.js → chunk-KOTZSPZA.js} +1 -1
  120. package/dist/chunk-KT5QQOES.js +3 -0
  121. package/dist/chunk-KVF55INC.js +5 -0
  122. package/dist/chunk-L6VONMA2.js +5 -0
  123. package/dist/chunk-LENSEW2F.js +2 -0
  124. package/dist/{chunk-35NTERVR.js → chunk-LGXNXAQA.js} +2 -2
  125. package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
  126. package/dist/chunk-LR4J4KYJ.js +5 -0
  127. package/dist/chunk-LWMKZJ4M.js +1 -0
  128. package/dist/chunk-M2KX3PXA.js +1 -0
  129. package/dist/{chunk-VSFZEGIK.js → chunk-M73IECPW.js} +1 -1
  130. package/dist/{chunk-Z4DESIR5.js → chunk-M7NLCGCP.js} +1 -1
  131. package/dist/chunk-MHWETFNT.js +1 -0
  132. package/dist/chunk-MMUGP3WP.js +7 -0
  133. package/dist/{chunk-VG5ZDVDQ.js → chunk-MNWT2SQO.js} +86 -200
  134. package/dist/chunk-MS7DTL4U.js +213 -0
  135. package/dist/chunk-MU2X7NGF.js +11 -0
  136. package/dist/chunk-MXXMIPUN.js +8 -0
  137. package/dist/{chunk-XTOOTN4P.js → chunk-MZCIRMZJ.js} +1 -1
  138. package/dist/{chunk-LLNUIGHP.js → chunk-MZWPIFAM.js} +4 -4
  139. package/dist/{chunk-HB4YI2PF.js → chunk-NCPZVARH.js} +118 -118
  140. package/dist/{chunk-LCMDVUVO.js → chunk-NJVNGEOU.js} +30 -30
  141. package/dist/chunk-NMECLRGK.js +11 -0
  142. package/dist/{chunk-VNG2I7NM.js → chunk-NMLLRFZF.js} +1 -1
  143. package/dist/chunk-NPB753M3.js +1 -0
  144. package/dist/chunk-NUCDRKDW.js +5 -0
  145. package/dist/chunk-OH7BQZQ7.js +2 -0
  146. package/dist/chunk-OLKLHVHA.js +22 -0
  147. package/dist/chunk-OPVXPDOQ.js +1 -0
  148. package/dist/chunk-OQUXGAF2.js +1 -0
  149. package/dist/chunk-OUMERKRE.js +10 -0
  150. package/dist/{chunk-PFXDXD5O.js → chunk-OYGIQDME.js} +1 -1
  151. package/dist/{chunk-4IAGBAQD.js → chunk-P5W5RVE6.js} +1 -1
  152. package/dist/chunk-PNZURX3S.js +1 -0
  153. package/dist/chunk-PRKJVU4Y.js +1 -0
  154. package/dist/{chunk-2VGPNRHH.js → chunk-PVASYKSJ.js} +2 -2
  155. package/dist/chunk-PXFPVGWV.js +1 -0
  156. package/dist/chunk-Q2ORJEB2.js +25 -0
  157. package/dist/chunk-QBE6XVU3.js +1 -0
  158. package/dist/chunk-QFWWCZOI.js +1 -0
  159. package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
  160. package/dist/{chunk-Y5VFOLNQ.js → chunk-QGWC23HQ.js} +1 -1
  161. package/dist/chunk-QVVQUJQL.js +2 -0
  162. package/dist/{chunk-762IKULK.js → chunk-QX3T6G5X.js} +1 -1
  163. package/dist/chunk-QYFU363G.js +17 -0
  164. package/dist/chunk-RDXLDCMI.js +3 -0
  165. package/dist/chunk-REDUS6EW.js +1 -0
  166. package/dist/{chunk-KOS53Z7E.js → chunk-RFZNFTVM.js} +1 -1
  167. package/dist/chunk-RIG66DIQ.js +18 -0
  168. package/dist/chunk-RNUEPPVN.js +1 -0
  169. package/dist/chunk-RWTAPWLJ.js +3 -0
  170. package/dist/chunk-T5YVYVSW.js +1 -0
  171. package/dist/{chunk-VTOPYXHO.js → chunk-TTBNFGCW.js} +2 -2
  172. package/dist/chunk-UDPYSL3M.js +4 -0
  173. package/dist/{chunk-EAVD3OH2.js → chunk-ULMNNGGX.js} +1 -1
  174. package/dist/chunk-URCH4ITT.js +1 -0
  175. package/dist/chunk-UU2R56LN.js +12 -0
  176. package/dist/{chunk-YIZAQABE.js → chunk-V2FCZC7U.js} +1 -1
  177. package/dist/chunk-V654BMS7.js +376 -0
  178. package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
  179. package/dist/{chunk-5O7JTVO2.js → chunk-V7H7ITCF.js} +1 -1
  180. package/dist/{chunk-EO422KZZ.js → chunk-VG2AESTZ.js} +1 -1
  181. package/dist/chunk-VXD26GIG.js +1 -0
  182. package/dist/chunk-VXL5FBE7.js +3 -0
  183. package/dist/{chunk-RUDHGUIM.js → chunk-W7S6SYBM.js} +1 -1
  184. package/dist/chunk-WAY723TL.js +16 -0
  185. package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
  186. package/dist/chunk-WFOU5M4H.js +16 -0
  187. package/dist/chunk-WGOSE3RL.js +4 -0
  188. package/dist/chunk-WQ6W725N.js +1 -0
  189. package/dist/{chunk-7BWSN3SG.js → chunk-WQOPLNDH.js} +1 -1
  190. package/dist/chunk-X4A5D3PZ.js +8 -0
  191. package/dist/chunk-X7DCL5LT.js +1 -0
  192. package/dist/{chunk-HY6EXJBZ.js → chunk-XDXHSGDL.js} +1 -1
  193. package/dist/chunk-XKKKMV46.js +6 -0
  194. package/dist/chunk-XRVJJG6W.js +26 -0
  195. package/dist/chunk-XV6XCOTG.js +319 -0
  196. package/dist/chunk-XYFYQWKW.js +1 -0
  197. package/dist/{chunk-BD2L6YE5.js → chunk-XZLM4HLO.js} +1 -1
  198. package/dist/{chunk-YLCYRG2T.js → chunk-YCUEDZDA.js} +1 -1
  199. package/dist/{chunk-MF7IHOM5.js → chunk-YFRI75U4.js} +1 -1
  200. package/dist/chunk-YQ63ZFYT.js +1 -0
  201. package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
  202. package/dist/chunk-YXIFSIRX.js +1 -0
  203. package/dist/{chunk-QBIYAMSH.js → chunk-ZBVHPC6W.js} +1 -1
  204. package/dist/chunk-ZDQO6CNY.js +1 -0
  205. package/dist/{chunk-LG6DGIFX.js → chunk-ZHHTQRWU.js} +1 -1
  206. package/dist/chunk-ZTZGDZCE.js +7 -0
  207. package/dist/{chunk-MQ4WV4B6.js → chunk-ZVEBXHEY.js} +1 -1
  208. package/dist/cli/commands/app/build.js +1 -1
  209. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  210. package/dist/cli/commands/app/bulk/execute.js +1 -1
  211. package/dist/cli/commands/app/bulk/status.js +1 -1
  212. package/dist/cli/commands/app/config/link.js +1 -1
  213. package/dist/cli/commands/app/config/pull.js +1 -1
  214. package/dist/cli/commands/app/config/use.js +1 -1
  215. package/dist/cli/commands/app/config/validate.js +1 -1
  216. package/dist/cli/commands/app/demo/watcher.js +1 -1
  217. package/dist/cli/commands/app/deploy.js +1 -1
  218. package/dist/cli/commands/app/dev/clean.js +1 -1
  219. package/dist/cli/commands/app/dev.js +1 -1
  220. package/dist/cli/commands/app/env/pull.js +1 -1
  221. package/dist/cli/commands/app/env/show.js +1 -1
  222. package/dist/cli/commands/app/execute.js +1 -1
  223. package/dist/cli/commands/app/function/build.js +1 -1
  224. package/dist/cli/commands/app/function/info.js +1 -1
  225. package/dist/cli/commands/app/function/replay.js +1 -1
  226. package/dist/cli/commands/app/function/run.js +1 -1
  227. package/dist/cli/commands/app/function/schema.js +1 -1
  228. package/dist/cli/commands/app/function/typegen.js +1 -1
  229. package/dist/cli/commands/app/generate/extension.js +1 -1
  230. package/dist/cli/commands/app/graphiql.js +1 -1
  231. package/dist/cli/commands/app/import/channel-config.js +1 -1
  232. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  233. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  234. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  235. package/dist/cli/commands/app/import-extensions.js +1 -1
  236. package/dist/cli/commands/app/info.js +1 -1
  237. package/dist/cli/commands/app/init.js +1 -1
  238. package/dist/cli/commands/app/logs.js +1 -1
  239. package/dist/cli/commands/app/release.js +1 -1
  240. package/dist/cli/commands/app/security/check.js +1 -1
  241. package/dist/cli/commands/app/security/clean.js +1 -1
  242. package/dist/cli/commands/app/security/instructions.js +1 -1
  243. package/dist/cli/commands/app/security/record.js +1 -1
  244. package/dist/cli/commands/app/security/review.js +1 -1
  245. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  246. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  247. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  248. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  249. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  250. package/dist/cli/commands/app/versions/list.js +1 -1
  251. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  252. package/dist/cli/commands/auth/login.js +1 -1
  253. package/dist/cli/commands/auth/logout.js +1 -1
  254. package/dist/cli/commands/cache/clear.js +1 -1
  255. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  256. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  257. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  258. package/dist/cli/commands/debug/command-flags.js +1 -1
  259. package/dist/cli/commands/doc/fetch.d.ts +34 -1
  260. package/dist/cli/commands/doc/fetch.js +1 -1
  261. package/dist/cli/commands/doc/search.d.ts +53 -1
  262. package/dist/cli/commands/doc/search.js +1 -1
  263. package/dist/cli/commands/docs/generate.js +1 -1
  264. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  265. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  266. package/dist/cli/commands/help.d.ts +6 -6
  267. package/dist/cli/commands/help.js +1 -1
  268. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  269. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  270. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  271. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  272. package/dist/cli/commands/notifications/generate.js +1 -1
  273. package/dist/cli/commands/notifications/list.js +1 -1
  274. package/dist/cli/commands/organization/list.js +1 -1
  275. package/dist/cli/commands/search.js +1 -1
  276. package/dist/cli/commands/send-analytics.js +1 -1
  277. package/dist/cli/commands/theme/check.js +1 -1
  278. package/dist/cli/commands/theme/console.js +1 -1
  279. package/dist/cli/commands/theme/delete.js +1 -1
  280. package/dist/cli/commands/theme/dev.js +1 -1
  281. package/dist/cli/commands/theme/duplicate.js +1 -1
  282. package/dist/cli/commands/theme/info.js +1 -1
  283. package/dist/cli/commands/theme/init.js +1 -1
  284. package/dist/cli/commands/theme/language-server.js +1 -1
  285. package/dist/cli/commands/theme/list.js +1 -1
  286. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  287. package/dist/cli/commands/theme/open.js +1 -1
  288. package/dist/cli/commands/theme/package.js +1 -1
  289. package/dist/cli/commands/theme/preview.js +1 -1
  290. package/dist/cli/commands/theme/profile.js +1 -1
  291. package/dist/cli/commands/theme/publish.js +1 -1
  292. package/dist/cli/commands/theme/pull.js +1 -1
  293. package/dist/cli/commands/theme/push.js +1 -1
  294. package/dist/cli/commands/theme/rename.js +1 -1
  295. package/dist/cli/commands/theme/share.js +1 -1
  296. package/dist/cli/commands/upgrade.d.ts +64 -0
  297. package/dist/cli/commands/upgrade.js +1 -1
  298. package/dist/cli/commands/version.js +1 -1
  299. package/dist/cli/help.js +1 -1
  300. package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
  301. package/dist/cli/services/commands/doc/fetch-result.js +22 -0
  302. package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
  303. package/dist/cli/services/commands/doc/fetch.js +2 -15
  304. package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
  305. package/dist/cli/services/commands/doc/search-result.js +14 -0
  306. package/dist/cli/services/commands/doc/search.d.ts +9 -1
  307. package/dist/cli/services/commands/doc/search.js +27 -2
  308. package/dist/cli/services/commands/doc/types.d.ts +107 -0
  309. package/dist/cli/services/commands/doc/types.js +47 -0
  310. package/dist/cli/services/commands/help/types.d.ts +6 -6
  311. package/dist/command-event-context-LFUZ7UCA.js +1 -0
  312. package/dist/command-json-schema-6EGXCM4B.js +1 -0
  313. package/dist/command-registry.js +1 -1
  314. package/dist/conf-store-E7ELDWBA.js +1 -0
  315. package/dist/custom-oclif-loader-FKFZJPHF.js +1 -0
  316. package/dist/deprecations-RNGBHZYB.js +1 -0
  317. package/dist/dist-VHIZZDYK.js +1 -0
  318. package/dist/dist-WXI5YQYP.js +1 -0
  319. package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
  320. package/dist/environments-WZJ6MRTH.js +1 -0
  321. package/dist/error-IFB626JA.js +1 -0
  322. package/dist/error-handler-OVJYVIOZ.js +1 -0
  323. package/dist/fs-7UOUHJDO.js +1 -0
  324. package/dist/hooks/did-you-mean.js +1 -1
  325. package/dist/hooks/hydrogen-init.js +1 -1
  326. package/dist/hooks/plugin-plugins.js +1 -1
  327. package/dist/hooks/postrun.js +1 -1
  328. package/dist/hooks/prerun.js +1 -1
  329. package/dist/hooks/public-metadata.js +1 -1
  330. package/dist/hooks/sensitive-metadata.js +1 -1
  331. package/dist/hooks/tunnel-provider.js +1 -1
  332. package/dist/hooks/tunnel-start.js +1 -1
  333. package/dist/index.js +13 -13
  334. package/dist/is-global-XW3CVHLK.js +1 -0
  335. package/dist/json-error-C2U7ZLCG.js +1 -0
  336. package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
  337. package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
  338. package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
  339. package/dist/{local-ZZGRGYUP.js → local-KA3IWOZ6.js} +1 -1
  340. package/dist/{metadata-YQNVKC2R.js → metadata-6JI7HF5B.js} +1 -1
  341. package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
  342. package/dist/node-package-manager-X3QIEMMX.js +1 -0
  343. package/dist/notifications-system-OXGLT2R4.js +1 -0
  344. package/dist/os-NORIEVMI.js +1 -0
  345. package/dist/out-B2GISN65.js +1 -0
  346. package/dist/output-K3JTLRJD.js +1 -0
  347. package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
  348. package/dist/system-LTHR2T7L.js +1 -0
  349. package/dist/tsconfig.tsbuildinfo +1 -1
  350. package/dist/ui-MYUBVKCK.js +1 -0
  351. package/dist/upgrade-MFTWBXL3.js +1 -0
  352. package/dist/version-BNGPPAUU.js +1 -0
  353. package/dist/version-RCGFWSB4.js +1 -0
  354. package/dist/workerd-ISSXMKIH.js +18 -0
  355. package/oclif.manifest.json +1669 -429
  356. package/package.json +8 -8
  357. package/dist/analytics-PBZEKUGU.js +0 -1
  358. package/dist/analytics-WVGBNFGK.js +0 -1
  359. package/dist/chunk-2EC5SUGK.js +0 -19
  360. package/dist/chunk-2QENUJVG.js +0 -1
  361. package/dist/chunk-2RONPKOD.js +0 -1
  362. package/dist/chunk-2WDJXERZ.js +0 -25
  363. package/dist/chunk-32NWVYUC.js +0 -1
  364. package/dist/chunk-32RRWGNS.js +0 -1
  365. package/dist/chunk-32VQQ6EU.js +0 -1
  366. package/dist/chunk-34RFTE5T.js +0 -4
  367. package/dist/chunk-35VQQKVX.js +0 -1
  368. package/dist/chunk-3N6NKC2U.js +0 -1
  369. package/dist/chunk-3Q5BAPQK.js +0 -7
  370. package/dist/chunk-42DMJGOW.js +0 -2
  371. package/dist/chunk-4CTTWXUX.js +0 -32
  372. package/dist/chunk-4HBKQUKY.js +0 -1
  373. package/dist/chunk-4MQXMIWQ.js +0 -7
  374. package/dist/chunk-5APLAJCB.js +0 -3
  375. package/dist/chunk-5AQNISGC.js +0 -1
  376. package/dist/chunk-5OM72O4N.js +0 -1
  377. package/dist/chunk-5SLKHURV.js +0 -1
  378. package/dist/chunk-5VRB3FBD.js +0 -6
  379. package/dist/chunk-62GA7XR3.js +0 -18
  380. package/dist/chunk-62LMVFR7.js +0 -1
  381. package/dist/chunk-6IDEDOXW.js +0 -2
  382. package/dist/chunk-72CBJYAG.js +0 -16
  383. package/dist/chunk-7E4MJCVE.js +0 -10
  384. package/dist/chunk-7HZU7CYS.js +0 -1
  385. package/dist/chunk-7Q4EKY3E.js +0 -3
  386. package/dist/chunk-7YXHILW4.js +0 -383
  387. package/dist/chunk-7Z6IX7MU.js +0 -1
  388. package/dist/chunk-A4XREDFZ.js +0 -1
  389. package/dist/chunk-AHNLGCHF.js +0 -5
  390. package/dist/chunk-ARRRFY6S.js +0 -4
  391. package/dist/chunk-BAP2CHI2.js +0 -1
  392. package/dist/chunk-BQWK222Q.js +0 -1
  393. package/dist/chunk-C3PXIZY3.js +0 -8
  394. package/dist/chunk-C6HGU77I.js +0 -1
  395. package/dist/chunk-CBFAU5AF.js +0 -5
  396. package/dist/chunk-COP2Q2YT.js +0 -1
  397. package/dist/chunk-CSWDRG3E.js +0 -1
  398. package/dist/chunk-CVBWEUWX.js +0 -1
  399. package/dist/chunk-D3NVUE65.js +0 -1
  400. package/dist/chunk-DCKRQZLE.js +0 -20
  401. package/dist/chunk-DYH3ZXJS.js +0 -15
  402. package/dist/chunk-EBX6DYDX.js +0 -2
  403. package/dist/chunk-EDRCFY3K.js +0 -16
  404. package/dist/chunk-EEAY7HFW.js +0 -317
  405. package/dist/chunk-EJMLNBZA.js +0 -275
  406. package/dist/chunk-EO3S2TFI.js +0 -2
  407. package/dist/chunk-EOIGDOUD.js +0 -7
  408. package/dist/chunk-EYKXHMEJ.js +0 -6
  409. package/dist/chunk-FHV2H3Z2.js +0 -12
  410. package/dist/chunk-FOAV642V.js +0 -1
  411. package/dist/chunk-FVTP7EO4.js +0 -46
  412. package/dist/chunk-FYIC4JHB.js +0 -26
  413. package/dist/chunk-GF36WNMH.js +0 -5
  414. package/dist/chunk-GJ3QUZO6.js +0 -1
  415. package/dist/chunk-GJZVUEMP.js +0 -11
  416. package/dist/chunk-GP6O7YRO.js +0 -20
  417. package/dist/chunk-GW424AJO.js +0 -7
  418. package/dist/chunk-GXSF6NCR.js +0 -1
  419. package/dist/chunk-GYVQIRBD.js +0 -1
  420. package/dist/chunk-H3ZPYOQV.js +0 -1
  421. package/dist/chunk-H7YSZKZ2.js +0 -1
  422. package/dist/chunk-HILYTMVA.js +0 -1
  423. package/dist/chunk-HMWQOQAQ.js +0 -2
  424. package/dist/chunk-HNSRF4SQ.js +0 -1
  425. package/dist/chunk-HTODXNY6.js +0 -3
  426. package/dist/chunk-IUYVJJKE.js +0 -9
  427. package/dist/chunk-JM2CQP64.js +0 -97
  428. package/dist/chunk-K4AF7A25.js +0 -1
  429. package/dist/chunk-KDV4WR5A.js +0 -4
  430. package/dist/chunk-KF7NL5YM.js +0 -8
  431. package/dist/chunk-KMJTO7CU.js +0 -103
  432. package/dist/chunk-KN3MUEWA.js +0 -4
  433. package/dist/chunk-KYB4JX76.js +0 -5
  434. package/dist/chunk-LJAU6YHF.js +0 -10
  435. package/dist/chunk-LMQOFVRC.js +0 -17
  436. package/dist/chunk-LQSD25YS.js +0 -3
  437. package/dist/chunk-M2HQFHNO.js +0 -1
  438. package/dist/chunk-M5WBYWSQ.js +0 -7
  439. package/dist/chunk-N47RQHEI.js +0 -2
  440. package/dist/chunk-NRG2WPSM.js +0 -1
  441. package/dist/chunk-O2CP7DQE.js +0 -1
  442. package/dist/chunk-O6FXUKI2.js +0 -2
  443. package/dist/chunk-OHJUEUSA.js +0 -1
  444. package/dist/chunk-OOKTWSGP.js +0 -4
  445. package/dist/chunk-OONMCK7X.js +0 -1
  446. package/dist/chunk-OWK2RI4O.js +0 -6
  447. package/dist/chunk-P2UEQJJ4.js +0 -5
  448. package/dist/chunk-QBJ74XPX.js +0 -18
  449. package/dist/chunk-QGFJOTOH.js +0 -4
  450. package/dist/chunk-QLHPTMIH.js +0 -1
  451. package/dist/chunk-RIO5HKD5.js +0 -1
  452. package/dist/chunk-S7EKUSO6.js +0 -3
  453. package/dist/chunk-SJ2ROSXG.js +0 -1
  454. package/dist/chunk-SNTRSP5K.js +0 -359
  455. package/dist/chunk-SYCN2GT2.js +0 -3
  456. package/dist/chunk-TBNEN73P.js +0 -1
  457. package/dist/chunk-TVI7TQ4C.js +0 -16
  458. package/dist/chunk-TYMYIUIQ.js +0 -1
  459. package/dist/chunk-UEQT7TA4.js +0 -1
  460. package/dist/chunk-UUM367NR.js +0 -5
  461. package/dist/chunk-V5FZRNXI.js +0 -1
  462. package/dist/chunk-VE35YELD.js +0 -1
  463. package/dist/chunk-WEICJ4GW.js +0 -1
  464. package/dist/chunk-WJJXJNNP.js +0 -3
  465. package/dist/chunk-XAQUXFN5.js +0 -1
  466. package/dist/chunk-XE6EUHSS.js +0 -2
  467. package/dist/chunk-XFEJS652.js +0 -16
  468. package/dist/chunk-XI4QEULN.js +0 -1
  469. package/dist/chunk-XP63T4KZ.js +0 -5
  470. package/dist/chunk-XRCAUZAZ.js +0 -8
  471. package/dist/chunk-XSRZWJIJ.js +0 -1
  472. package/dist/chunk-YFJELEVH.js +0 -1
  473. package/dist/chunk-YNJIDLI3.js +0 -7
  474. package/dist/chunk-YRX4E67D.js +0 -6
  475. package/dist/chunk-Z2NL6XQK.js +0 -6
  476. package/dist/chunk-Z6Z5DPKS.js +0 -1
  477. package/dist/chunk-ZOE6WXW6.js +0 -1
  478. package/dist/cli/commands/app/app-logs/sources.js +0 -1
  479. package/dist/command-json-schema-3RP5P43D.js +0 -1
  480. package/dist/conf-store-XORTWCKZ.js +0 -1
  481. package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
  482. package/dist/deprecations-AZDMCRNN.js +0 -1
  483. package/dist/dist-DTBXLVHF.js +0 -1
  484. package/dist/dist-SOYIDACZ.js +0 -1
  485. package/dist/environments-L42SEHB4.js +0 -1
  486. package/dist/error-H6B5BHYC.js +0 -1
  487. package/dist/error-handler-JB752NKM.js +0 -1
  488. package/dist/fs-XHZY6MNM.js +0 -1
  489. package/dist/is-global-2NBDZWLC.js +0 -1
  490. package/dist/json-error-OHV2KQFY.js +0 -1
  491. package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
  492. package/dist/notifications-system-HWJ3F44U.js +0 -1
  493. package/dist/os-MHOCCDIB.js +0 -1
  494. package/dist/out-53ABAVL7.js +0 -1
  495. package/dist/output-GILH4S6M.js +0 -1
  496. package/dist/system-6WYK24ET.js +0 -1
  497. package/dist/ui-RP6SVJUK.js +0 -1
  498. package/dist/upgrade-5G7FBJJV.js +0 -1
  499. package/dist/version-TOBC7X2C.js +0 -1
  500. package/dist/version-UIRCT6RC.js +0 -1
  501. package/dist/workerd-ARH2OCYL.js +0 -18
@@ -1 +1 @@
1
- import{b as i}from"./chunk-I3J63RFV.js";import{e,g as n}from"./chunk-VKWPEFWQ.js";n();var o=e(i(),1),t=["high","medium","low","none"],s={blocking:o.Flags.custom({description:"The minimum finding severity that causes a non-zero exit code: high, medium, or low. Defaults to none, which never fails on findings.",options:t,default:"none",env:"SHOPIFY_FLAG_APP_SECURITY_BLOCKING"})()};export{s as a};
1
+ import{b as i}from"./chunk-YTUUU33R.js";import{e,g as n}from"./chunk-VKWPEFWQ.js";n();var o=e(i(),1),t=["high","medium","low","none"],s={blocking:o.Flags.custom({description:"The minimum finding severity that causes a non-zero exit code: high, medium, or low. Defaults to none, which never fails on findings.",options:t,default:"none",env:"SHOPIFY_FLAG_APP_SECURITY_BLOCKING"})()};export{s as a};
@@ -1 +1 @@
1
- import{d as u}from"./chunk-65GNYRYR.js";import{A as c}from"./chunk-7YXHILW4.js";import{e as s}from"./chunk-MWWULCLD.js";import{db as d}from"./chunk-62GA7XR3.js";import{p as m}from"./chunk-6IDEDOXW.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
1
+ import{d as u}from"./chunk-HP2ZAAY7.js";import{B as c}from"./chunk-V654BMS7.js";import{e as s}from"./chunk-FHNJLON5.js";import{_a as d}from"./chunk-RIG66DIQ.js";import{p as m}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
@@ -1 +1 @@
1
- import{a}from"./chunk-LG6DGIFX.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
1
+ import{a}from"./chunk-ZHHTQRWU.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
@@ -0,0 +1 @@
1
+ import{T as i}from"./chunk-V654BMS7.js";import{yb as o}from"./chunk-RIG66DIQ.js";import{j as d}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();import{Writable as m}from"node:stream";import{StringDecoder as f}from"node:string_decoder";function p(){return d()!=="json"?{stdout:process.stdout,stderr:process.stderr}:{stdout:u(),stderr:u()}}function u(){let e=new f("utf8");return new m({write(r,t,c){let s=e.write(r);s&&o(s),c()},final(r){let t=e.end();t&&o(t),r()}})}async function y(e,r){let t=p();try{await i(e,r,t.stdout===process.stdout?{stdio:"inherit"}:{stdin:"inherit",...t})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}export{p as a,y as b};
@@ -0,0 +1,3 @@
1
+ import{b as W}from"./chunk-J3JPJCWP.js";import{a as z,m as N,o as Q}from"./chunk-FVRI7ZKE.js";import{a as X}from"./chunk-P5W5RVE6.js";import{a as q,c as g}from"./chunk-AQ34X5B3.js";import{a as B}from"./chunk-2M4BKFYF.js";import{a as $,b as V}from"./chunk-YY6TFARF.js";import{a as K}from"./chunk-63UKZLPC.js";import{d as G,e as H,g as U,h as M}from"./chunk-QFWWCZOI.js";import{k as J,n as Y}from"./chunk-2NZ7GDDR.js";import{p as O,q as A,r as C,u as I,v as L}from"./chunk-KT5QQOES.js";import{i as Z,l as ee}from"./chunk-EH22T4FI.js";import{N as D,ua as u}from"./chunk-NCPZVARH.js";import{b as R,c as j}from"./chunk-5AWELO3D.js";import{A as x,I as E}from"./chunk-V654BMS7.js";import{Va as _,wb as f}from"./chunk-RIG66DIQ.js";import{b as n}from"./chunk-FZCGRIOM.js";import{b as ae}from"./chunk-YTUUU33R.js";import{g as F,p as y}from"./chunk-IWTNUJGY.js";import{e as me,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();import{resolve as ce}from"node:path";var ue=n.object({id:n.number(),name:n.string(),role:n.string(),processing:n.boolean(),src:n.string().optional(),shop:n.string(),editor_url:n.string(),preview_url:n.string()}),w=n.object({environment:n.string().optional(),path:n.string(),changed:n.boolean().optional(),theme:ue}),re=G.extend({processing:n.boolean(),sourceUrl:n.string().url().nullable()}).strict(),de=n.object({status:n.literal("success"),changed:n.boolean(),directory:n.string().refine(F,"Expected an absolute filesystem path."),theme:re}).strict(),te=n.object({status:n.literal("skipped"),reason:n.literal("unsafe-directory")}).strict(),d=H({name:"ThemePullResult",schema:n.union([de,te]),definitions:{ThemePullTheme:re},project:t=>{if(te.safeParse(t).success)return t;let{theme:e,path:r,changed:o}=w.parse(t);return{status:"success",changed:o??!0,directory:ce(r),theme:{...M(e),storeDomain:U(e.shop),processing:e.processing,sourceUrl:e.src===""?null:e.src??null,editorUrl:e.editor_url||null,previewUrl:e.preview_url||null}}}});a();function v(t,e){if(e==="json"){f(d.encode(t));return}let{environment:r,theme:o}=t;x({headline:r?`Environment: ${r}`:"",body:["The theme",...q(o),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:o.preview_url}}],[{link:{label:"Customize your theme at the theme editor",url:o.editor_url}}]]})}function oe(t){let e=t.map(r=>"error"in r?r:{...r,result:r.result??{status:"skipped",reason:"unsafe-directory"}});f(d.encode({environments:e}))}a();async function ne(t,e,r,o,s,m){let i=he(r,o,s),c=pe(r,t,o,e),l=[...i,...c,{title:"Theme download complete",task:async()=>{}}];return l.length>0&&await E(l,{renderOptions:{stdout:m?.stdout??process.stdout},noProgressBar:s.multiEnvironment}),i.length>0||c.length>0}function he(t,e,r){if(r.nodelete)return[];let o=new Set(t.map(i=>i.key));return e.applyIgnoreFilters([...e.files.values()]).map(({key:i})=>i).filter(i=>!o.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>e.delete(i)}))}function pe(t,e,r,o){let s=r.applyIgnoreFilters(t);s=s.filter(l=>{let p=l.checksum;return r.files.get(l.key)?.checksum!==p});let m=s.map(l=>l.key),i=l=>l.total===0?"[100%]":`[${Math.round(l.current/l.total*100)}%]`;return W(m,I,(l,p)=>({title:`Downloading files from remote theme ${i({current:p,total:m.length})}`,task:async()=>fe(e,r,l,o)}))}async function fe(t,e,r,o){let s=await J(t.id,r,o);s&&await Promise.all(s.map(m=>e.write(m)))}async function P(t,e,r,o){u("theme-service:pull:setup"),X({verbose:t.verbose,noColor:t.noColor});let s=e??await D(C({store:t.store}),t.password),m=new B(s),i=await(t.development?m.find():m.fetch()),{path:c,nodelete:l,live:p,development:T,only:se,ignore:ie,force:S,environment:k}=t;if(!await ye(c??y(),S??!1,k?.[0],r))return;let le=await K(s,{header:"Select a theme to open",filter:{live:p,theme:T?`${i?.id}`:t.theme}});return u("theme-service:pull:setup"),ve(le,s,{environment:k?.[0],force:S??!1,ignore:ie??[],multiEnvironment:r,nodelete:l??!1,only:se??[],path:c??y()},o)}async function ve(t,e,r,o){u("theme-service:pull:file-system");let s=N(r.path,{filters:r}),[m]=await Promise.all([Y(t.id,e),s.ready()]),i=z(m);u("theme-service:pull:file-system");let c=await ne(t,e,i,s,r,o);return w.parse({environment:r.environment,path:r.path,changed:c,theme:{id:t.id,name:t.name,role:t.role,processing:t.processing,src:t.src,shop:e.storeFqdn,editor_url:V(t,e),preview_url:$(t,e)}})}async function Te(t){return(await _("*",{cwd:t,deep:1,onlyFiles:!1})).length===0}async function ye(t,e,r,o){return e?!0:!(!await Te(t)&&!await Q(t)&&!await g(e,void 0,r,o)||await Z(t)&&!await ee(t)&&!await g(e,"The current Git directory has uncommitted changes.",r,o))}async function et(t,e,r,o){let s=await P(t,e,r,o);s&&v(s,"text")}var h=me(ae(),1);var b=class extends L{static get jsonOutputSchema(){return d}static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
2
+
3
+ If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;static description=this.descriptionForHelp();static flags={...R,...j,...O,...A("download"),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),development:h.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:h.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:h.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(e,r,o,s,m){u("theme-command:pull");let i=await P({...e,noColor:e["no-color"]},r,o,m);return e.json&&o||(i?v(i,e.json?"json":"text"):e.json&&f(d.encode({status:"cancelled"}))),u("theme-command:pull"),i??(e.json&&o?{status:"skipped",reason:"unsafe-directory"}:void 0)}renderEnvironmentResults(e){oe(e)}storeAuthScopes(){return["read_themes"]}};export{et as a,b};
@@ -1,2 +1,2 @@
1
- import{b as x,c as D,f as M}from"./chunk-XTOOTN4P.js";import{a as o}from"./chunk-GYVQIRBD.js";import{D as s,G as h,J as e,z as y}from"./chunk-7YXHILW4.js";import{d as w}from"./chunk-HILYTMVA.js";import{Kb as _,ya as u}from"./chunk-62GA7XR3.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
1
+ import{b as x,c as D,f as M}from"./chunk-MZCIRMZJ.js";import{a as o}from"./chunk-MHWETFNT.js";import{A as y,E as s,H as h,K as e}from"./chunk-V654BMS7.js";import{d as w}from"./chunk-335BUVBP.js";import{ta as u,yb as _}from"./chunk-RIG66DIQ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
2
2
  `)}export{$ as a,j as b};
@@ -0,0 +1,16 @@
1
+ import{K as y,M as c,N as S,h as C,t as w}from"./chunk-MNWT2SQO.js";import{A as u}from"./chunk-V654BMS7.js";import{h as f}from"./chunk-J7BTC45S.js";import{ta as m,wb as g}from"./chunk-RIG66DIQ.js";import{p}from"./chunk-IWTNUJGY.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import N from"clipboardy";var _="{{SCAN_CONTEXT}}",I="<the findings document from step 4>",P={posix:"bash",powershell:"powershell",cmd:"bat"};function r(e){return`\`${e.replace(/`/g,"'")}\``}function E(e,t){return`\`\`\`${P[t]}
2
+ ${e}
3
+ \`\`\``}function s(e){return{...e,args:[...e.args,"--json","--no-input"]}}function T(e,t){let n=E(c(e,t),t),i=`replacing \`${e.stdinPlaceholder}\` with the file's path`,o=S(e,I,t);if(o===void 0)return`cmd.exe can't pipe multi-line text inline, so write the document to a file and redirect it to \`record\`, ${i}:
4
+
5
+ ${n}`;let a=t==="powershell"?"The closing `'@` must start its line. The single-quoted here-string keeps PowerShell from expanding `$` in the document.":"The quoted `'EOF'` keeps the shell from expanding `$` and backticks in the document.",d=t==="powershell"?"\n\nWindows PowerShell 5.1 pipes text to `record` as ASCII by default. If the document contains non-ASCII characters, run `$OutputEncoding = [System.Text.UTF8Encoding]::new()` before either command.":"";return`${E(o,t)}
6
+
7
+ Replace \`${I}\` with the document itself; you don't need to write a file. ${a}
8
+
9
+ If you'd rather write the document to a file, pipe the file instead, ${i}:
10
+
11
+ ${n}${d}`}function O(e,t,n,i){let{resultsDirectory:o,deterministicFindingsPath:a,agentChecksPath:d,agentFindingsPath:A}=w(e,t);return{commands:i,scanCommand:c(s(i.scan),n),deterministicScanCommand:c(i.scan,n),recordInstructions:T(s(i.record),n),reviewCommand:c(s(i.review),n),cleanCommand:c(s(i.clean),n),deterministicFindingsPath:a,agentChecksPath:d,agentFindingsPath:A,resultsDirectory:o}}function k(e){return`### 1. Run the scan
12
+
13
+ Decide what to scan before running the check. By default, \`check\` scans the app directory. If the app's code also lives elsewhere (a backend, a shared library, another repository), add each of those directories with \`--include-dir\`. Skip paths with \`--exclude\`. Use \`--no-git-ignore\` only if Git-ignored files must be scanned. Include only directories relevant to the app. Check the scope with ${r(`${e.scanCommand} --list-files`)} and adjust the flags until its \`files\` list is right. Then run \`check\` with the same flags, and use the same flags every time you run \`check\` again.`}function $(e){return`### 1. Use the existing scan results
14
+
15
+ \`shopify app security check\` has already run. It wrote ${r(e.deterministicFindingsPath)} and ${r(e.agentChecksPath)}. Continue by reading the agent checks. Running \`check\` again is always safe; do so once source files change (step 7).`}var D=JSON.stringify({include_dirs:[],excludes:[],no_git_ignore:!1});function x(e){return e?{json:JSON.stringify(e),guidance:"`scope` is the scope of the `check` run these results come from. Copy it into the document unchanged."}:{json:D,guidance:"Fill in `scope` with the flags you settled on with `--list-files`: `include_dirs` and `excludes` hold the `--include-dir` and `--exclude` values exactly as you typed them, in order, and `no_git_ignore` is `true` only if you passed `--no-git-ignore`."}}function R(e,t){return Object.entries(t).reduce((n,[i,o])=>n.replaceAll(i,()=>o),e)}var h=class extends f{constructor(t){let n=t instanceof Error?t.message:String(t);super(`Couldn't copy the app security check instructions to the clipboard: ${n}`,null,[["Run the command without",{command:"--copy"},"to print the instructions, or with",{command:"--write <file>"},"to write them to a file."]]),this.code="clipboard-unavailable"}},b={copyToClipboard:e=>N.write(e),writeToFile:m};function q(e){let t=e.shell??y(),n=O(e.appDirectory,e.resultsKey,t,e.commands),i=e.scanScope?$(n):k(n),o=x(e.scanScope);return R(C(),{[_]:i,"{{WORKING_DIRECTORY_LINE}}":`Run these commands from ${r(p())}.`,"{{SCOPE_JSON}}":o.json,"{{SCOPE_GUIDANCE}}":o.guidance,"{{SCAN_COMMAND}}":n.scanCommand,"{{DETERMINISTIC_SCAN_COMMAND}}":n.deterministicScanCommand,"{{RECORD_COMMAND}}":n.recordInstructions,"{{REVIEW_COMMAND}}":n.reviewCommand,"{{CLEAN_COMMAND}}":n.cleanCommand,"{{DETERMINISTIC_FINDINGS_PATH}}":r(n.deterministicFindingsPath),"{{AGENT_CHECKS_PATH}}":r(n.agentChecksPath),"{{AGENT_FINDINGS_PATH}}":r(n.agentFindingsPath)}).trimEnd()}async function B(e,t,n=b){if(t.copy)try{await n.copyToClipboard(e)}catch(i){throw new h(i)}else t.writePath&&await n.writeToFile(t.writePath,`${e}
16
+ `)}function K(e,t){t.copy?u({headline:"Copied app security check instructions to the clipboard"}):t.writePath?u({headline:`Wrote app security check instructions to ${t.writePath}`}):g(e)}export{h as a,q as b,B as c,K as d};
@@ -1,4 +1,4 @@
1
- import{a as Cn}from"./chunk-AAK376RT.js";import{a as Du}from"./chunk-P2OI2P2M.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,c as Xs,d as Ti,g as ju,k as Di,l as Ve,m as Lu,n as Au,o as xu,p as Su,q as qu,r as Fu,s as Ru,t as Nu,u as Tu}from"./chunk-TR4OWSEX.js";import{b as Cu,c as kt}from"./chunk-ZGASBRSQ.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-CX5CC6P5.js";import{a as Iu}from"./chunk-IGE4Y5SE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=ku;V.compact=Mu;V.uniqBy=Hu;V.last=Bu;V.sortBy=Uu;V.castArray=Wu;V.isProd=Vu;V.maxBy=Gu;V.sumBy=zu;V.capitalize=Ju;V.isTruthy=Ku;V.isNotFalsy=Xu;V.uniq=Yu;V.mapValues=Zu;V.mergeNestedObjects=ed;function ku(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Mu(n){return n.filter(e=>!!e)}function Hu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Bu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Uu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Wu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Vu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Gu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function zu(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ju(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Ku(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Xu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Yu(n){return[...new Set(n)].sort()}function Zu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function Qu(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function ed(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(Qu(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=sd;Ce.existsSync=od;var td=$("node:fs"),Bi=$("node:fs/promises"),nd=N(),id=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=id;var rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=rd;var Hi=class extends Map{set(e,t){return((0,nd.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function sd(n,e=!0){try{return await Zs(n,e)}catch{}}function od(n){return(0,td.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var ad=$("node:url"),Qs=we(),cd=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,cd.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new ad.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ld=Ge({});X.string=ld});var to=m((Db,ud)=>{ud.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var dd=$("node:fs"),fd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,dd.readFileSync)((0,fd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var hd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=md;Ne.setLogger=yd;Ne.clearLoggers=_d;var pd=hd(kt()),Gi="oclif";function jn(n=Gi){let e=(0,pd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function gd(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(gd(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function md(n){return(e,...t)=>no(n).debug(e,...t)}function yd(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function _d(){je.clear()}});var Mt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),wd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=wd;var bd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=bd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var vd=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||vd.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=Ed;var oo=Cu();function Ed(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var $d=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=Cd;pt.parseTheme=lo;var Ji=$d(Ve()),Od=so(),Pd=ao();function co(n){return Od.STANDARD_ANSI.includes(n)}function Cd(n,e){if(!n||!(0,Pd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?jd(t):lo(t)]).filter(([e,t])=>t))}function jd(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Id=An(Xs()),Ki=An(Ti()),Ld=An(Di()),Ad=An(fe()),xd=ht(),Sd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?Ad.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Ht=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Id.default)(super.stack,{pretty:!0})}render(){if(Sd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ld.default)(e,xd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Ht;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Ht||(Te.CLIError=Ht={}))});var Sn=m(gt=>{"use strict";u();var po=gt&&gt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Rd;gt.default=Dd;var xn=po(Ti()),qd=po(Di()),Fd=ht(),ho=Ie();function Rd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Nd=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
1
+ import{a as Cn}from"./chunk-AAK376RT.js";import{a as Du}from"./chunk-P2OI2P2M.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,c as Xs,d as Ti,e as ju,f as Di,g as Ve,h as Lu,i as Au,j as xu,k as Su,l as qu,m as Fu,n as Ru,o as Nu,p as Tu}from"./chunk-QFYLJVJW.js";import{b as Cu,c as kt}from"./chunk-ZGASBRSQ.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-CX5CC6P5.js";import{a as Iu}from"./chunk-IGE4Y5SE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=ku;V.compact=Mu;V.uniqBy=Hu;V.last=Bu;V.sortBy=Uu;V.castArray=Wu;V.isProd=Vu;V.maxBy=Gu;V.sumBy=zu;V.capitalize=Ju;V.isTruthy=Ku;V.isNotFalsy=Xu;V.uniq=Yu;V.mapValues=Zu;V.mergeNestedObjects=ed;function ku(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Mu(n){return n.filter(e=>!!e)}function Hu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Bu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Uu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Wu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Vu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Gu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function zu(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ju(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Ku(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Xu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Yu(n){return[...new Set(n)].sort()}function Zu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function Qu(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function ed(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(Qu(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=sd;Ce.existsSync=od;var td=$("node:fs"),Bi=$("node:fs/promises"),nd=N(),id=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=id;var rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=rd;var Hi=class extends Map{set(e,t){return((0,nd.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function sd(n,e=!0){try{return await Zs(n,e)}catch{}}function od(n){return(0,td.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var ad=$("node:url"),Qs=we(),cd=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,cd.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new ad.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ld=Ge({});X.string=ld});var to=m((Db,ud)=>{ud.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var dd=$("node:fs"),fd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,dd.readFileSync)((0,fd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var hd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=md;Ne.setLogger=yd;Ne.clearLoggers=_d;var pd=hd(kt()),Gi="oclif";function jn(n=Gi){let e=(0,pd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function gd(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(gd(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function md(n){return(e,...t)=>no(n).debug(e,...t)}function yd(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function _d(){je.clear()}});var Mt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),wd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=wd;var bd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=bd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var vd=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||vd.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=Ed;var oo=Cu();function Ed(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var $d=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=Cd;pt.parseTheme=lo;var Ji=$d(Ve()),Od=so(),Pd=ao();function co(n){return Od.STANDARD_ANSI.includes(n)}function Cd(n,e){if(!n||!(0,Pd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?jd(t):lo(t)]).filter(([e,t])=>t))}function jd(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Id=An(Xs()),Ki=An(Ti()),Ld=An(Di()),Ad=An(fe()),xd=ht(),Sd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?Ad.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Ht=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Id.default)(super.stack,{pretty:!0})}render(){if(Sd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ld.default)(e,xd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Ht;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Ht||(Te.CLIError=Ht={}))});var Sn=m(gt=>{"use strict";u();var po=gt&&gt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Rd;gt.default=Dd;var xn=po(Ti()),qd=po(Di()),Fd=ht(),ho=Ie();function Rd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Nd=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
2
2
  `);return`${e}
3
3
  ${(0,xn.default)(t,2)}`};function Td(n){return!!n&&"name"in n&&"message"in n}function Dd(n){let e=[],t=n,i=!1;for(;Td(t);){if(ho.settings.debug&&t.stack)e.push(`${i?"Caused by: ":""}${t.stack}`);else{let{bang:r,code:s,message:o,name:a,ref:l,suggestions:d}=t,f=o?`${a||"Error"}: ${o}`:void 0,c=s?`Code: ${s}`:void 0,p=Nd(d),h=l?`Reference: ${l}`:void 0,y=[f,c,p,h].filter(Boolean).join(`
4
4
  `),g=`${i?"Caused by: ":""}${y}`;g=(0,qd.default)(g,Fd.errtermwidth-6,{hard:!0,trim:!1}),ho.settings.debug||(g=(0,xn.default)(g,3),g=(0,xn.default)(g,1,{includeEmptyLines:!0,indent:r||""}),g=(0,xn.default)(g,1)),e.push(g)}i=!0,t=t.cause??null}return e.join(`
@@ -0,0 +1,16 @@
1
+ import{c as Xe}from"./chunk-QX3T6G5X.js";import{G as We,H as Ke,K as ue,O as _,P as Ge,a as Me,aa as Ye,ca as U,da as Je,e as $e,ia as y,j as He,ja as Z,k as le,ma as A,na as Qe,oa as T,q as h,r as je,s as me,u as E}from"./chunk-NCPZVARH.js";import{b as Ze}from"./chunk-ZDF5N422.js";import{w as ce}from"./chunk-2M535QQJ.js";import{b as Be}from"./chunk-J3UXIC23.js";import{a as Ce}from"./chunk-MHWETFNT.js";import{A as en,E as nn,F as an,G as tn,J as on,K as rn,U as sn}from"./chunk-V654BMS7.js";import{e as Le,k as J}from"./chunk-335BUVBP.js";import{a as Ee}from"./chunk-BN7ZXAZJ.js";import{h as c,k as D}from"./chunk-J7BTC45S.js";import{Bb as ke,N as C,Sa as qe,T as G,Va as Oe,fa as Y,la as Pe,qb as ln,sb as P,wb as mn}from"./chunk-RIG66DIQ.js";import{i as pe}from"./chunk-B4OMIONW.js";import{b as t}from"./chunk-FZCGRIOM.js";import{g as dn}from"./chunk-GSGCSBRN.js";import{c as Ue,i as K}from"./chunk-IWTNUJGY.js";import{e as W,g as s}from"./chunk-VKWPEFWQ.js";s();function q(e,{httpsOnly:n=!1,message:i="Invalid URL"}={}){return e.refine(a=>ve(a,n),{message:i}).refine(a=>!a.includes(`
2
+ `),{message:i})}function mt(e,{message:n="URL must be HTTPS URL or start with /"}={}){return e.refine(i=>i.startsWith("/")||ve(i,!0),{message:n})}var un=/[\r\n\t]/;function cn(e){return ve(e,!0)}function ve(e,n){try{let i=new URL(e);return n?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function ut(e){return typeof e=="string"&&!e.startsWith("/")?`/${e}`:e}var Ci=30;function ct(e){return e.length<=Ci}s();s();s();function pn(e){return $e`
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 kn={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 fe=class extends c{},w=class extends c{constructor(n,i){let a="unknown",o=d=>`an ${d}`;Ke(n)?(a=n.orgName,o=d=>`the ${d} organization`):We(n)&&(a=n.email,o=d=>`the ${d} user`);let r=P`${ln.yellow(a)}`.value,m=[[`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&&m.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,m)}};async function _t(){let e=vn(),n=await e.organizations();if(n.length===0){let i=await e.session();throw new w(i.accountInfo)}return n}async function Dt(e,n){let i=await n.orgFromId(e);if(!i)throw new w((await n.session()).accountInfo,e);return i}async function At(e,n,i,a=["APP_DEVELOPMENT"]){let o=await i.storeByDomain(e.id,n,a);if(!o){let m=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 fe(`Could not find store for domain ${n} in organization ${e.businessName}.`,m)}return o}s();var O=class extends c{versionTag;constructor(n){super(`Version ${n} could not be found.`),this.versionTag=n}};s();var fn={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"},Ei={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},Rt={production:".env"},zt={reactTypes:"17.0.30"},gn={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:Ei.web}},Ct={graphiql:3457,localhost:3458},Et=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;s();var Q;(function(e){e.Partners="Partners",e.BusinessPlatform="BusinessPlatform"})(Q||(Q={}));s();s();var Nn=50,Sn=250,Ui=t.object({namespace:t.string(),key:t.string(),owner_type:t.string().optional()}),Pi=t.object({sms_marketing:t.boolean().optional(),customer_privacy:t.boolean().optional()}),qi=t.object({sources:t.array(t.string()).optional()}),Oi=t.object({network_access:t.boolean().optional(),block_progress:t.boolean().optional(),api_access:t.boolean().optional(),collect_buyer_consent:Pi.optional(),iframe:qi.optional(),bundle_size_exception:t.boolean().optional()}),Li=t.object({runs_offline:t.boolean().optional()}),Mt=t.object({type:t.string().optional(),extensions:t.array(t.any()).optional()}),Mi=t.object({event:t.string(),blocking:t.boolean().default(!1),applies_to:t.array(t.string()).optional()}),$i=t.object({allow_direct_linking:t.boolean().optional(),intercepts:t.array(Mi).optional()}),Hi=t.object({module:t.string()}),Bi=t.object({target:t.string(),module:t.string(),should_render:Hi.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(Ui).optional(),default_placement:t.string().optional(),urls:t.object({edit:t.string().optional()}).optional(),capabilities:$i.optional(),preloads:t.object({chat:t.string().optional()}).optional(),assets:t.string().optional()}),$t=t.array(Bi),hn=t.string(),ji=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()}),yn=t.object({fields:t.array(ji).optional()}),bn=t.string().trim().nonempty("Handle can't be empty").max(Nn,`Handle can't exceed ${Nn} 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"),Wi=t.string().trim().nonempty("UID can't be empty").max(Sn,`UID can't exceed ${Sn} 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"),X=t.object({name:t.string().optional(),type:t.string().optional(),handle:bn.optional(),uid:Wi.optional(),description:t.string().optional(),api_version:hn.optional(),extension_points:t.any().optional(),capabilities:Oi.optional(),supported_features:Li.optional(),settings:yn.optional()}),Ht=X.extend({handle:bn}),b=X.omit({handle:!0}),Bt=t.object({api_version:hn.optional(),description:t.string().optional(),extensions:t.array(t.any()),settings:yn.optional()});s();s();s();s();var Ki=/^(https:\/\/)/,Gi=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,Yi=/^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 V(e){return typeof e=="string"&&e.endsWith("/")?e.replace(/\/+$/,""):e}var F=t.string({invalid_type_error:"Value must be string"}).refine(e=>e.startsWith("/")?!0:Ki.test(e)||Gi.test(e)||Yi.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 ee(e,n){return!n||!e.startsWith("/")?e:`${V(n)}${e}`}var Zi=(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(un.test(i))throw new c(`${e} ${n} is invalid: a URL must not contain control characters such as newlines or tabs.`);let o=ee(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(!cn(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 ge(e,n,i,a){let o=i;for(let r of n){let m=o[r];typeof m=="string"&&m.startsWith("/")&&(o[r]=Zi(e,r,m,a))}}s();import{isUtf8 as Qi}from"node:buffer";import Fn from"fs";async function _n(e,n){let i=await Oe(Ue(e,"locales/*.json"));if(!i||i.length===0)return{};let a=Xi(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(Fn.statSync(o).size===0)throw new c(`Error loading ${n}`,`Locale file ${o} can't be empty`);return{default_locale:a[0],translations:ea(i,n)}}function Xi(e){return e.filter(i=>K(i).endsWith(".default.json")).map(i=>K(i).split(".")[0])}function ea(e,n){let i={};for(let a of e){let o=na(K(a).split(".")[0],"Locale code is unset"),r=Fn.readFileSync(a);if(!Qi(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 na(e,n){if(e===void 0)throw new D(n);return e}function ia(e){return e.experience==="configuration"}var Dn;(function(e){e.ShouldRender="should_render",e.Main="main",e.Tools="tools",e.Instructions="instructions",e.Intents="intents"})(Dn||(Dn={}));function An(e){let i={...{externalIdentifier:`${e.identifier}_external`,additionalIdentifiers:[],externalName:G(e.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:e.identifier,schema:X,registrationLimit:gn.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=ia(i),r=i.schema._def.shape!==void 0,m=i.uidStrategy==="single";return o&&r&&m?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 An({identifier:e.identifier,schema:e.schema,appModuleFeatures:n,transformLocalToRemote:aa(e.transformConfig),transformRemoteToLocal:ta(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 An({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)=>{ge(G(e.identifier.replace(/_/g," ")),n,i,a.applicationUrl)}:void 0,deployConfig:async(i,a,o,r,m)=>{let d=oa(i);if(n?.length){let l=m?.appConfiguration?.application_url,p=typeof l=="string"?l:void 0;ge(G(e.identifier.replace(/_/g," ")),n,d,p)}if(e.appModuleFeatures().includes("localization")){let l=await _n(a,e.identifier);d={...d,localization:l}}return d}})}function aa(e){return Object.keys(e).includes("forward")?e.forward:n=>L(n,e)}function ta(e,n){return n?Object.keys(n).includes("reverse")?n.reverse:i=>L(i,n,!0):i=>Tn(e,i)}function L(e,n,i=!1){let a={};for(let[o,r]of Object.entries(n)){let m=i?o:r,d=i?r:o,l=U(e,m);l!==void 0&&Je(a,d,l)}return a}function Tn(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]=Tn(o,n):(n[a]!==void 0&&(i[a]=n[a]),delete n[a]),i},{})}function oa(e){let{type:n,handle:i,uid:a,path:o,extensions:r,...m}=e;return m}var ra=b.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()}),sa={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},Ne="app_home",da=S({identifier:Ne,schema:ra,transformConfig:sa,patchWithAppDevURLs:(e,n)=>{e.application_url=n.applicationUrl},getDevSessionUpdateMessages:async e=>[`Using URL: ${e.application_url}`]}),Ao=da;s();var la=b.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()}),ma={name:"name",app_handle:"handle"},Se="branding",ua=S({identifier:Se,schema:la,transformConfig:ma}),Ro=ua;s();var ca=t.object({scopes:t.string().transform(e=>Y(e)??"").optional(),required_scopes:t.array(t.string()).optional(),optional_scopes:t.array(t.string()).optional(),use_legacy_install_flow:t.boolean().optional()}),pa=t.object({redirect_urls:t.array(q(t.string()))}),ka=b.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:ca.optional(),auth:pa}),he="app_access",wn={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"};function va(e){let{shop_scopes:n,...i}=e,a=typeof n=="string"?Y(n):void 0;if(!a)return i;let o=typeof i.scopes=="string"?i.scopes:"";return{...i,scopes:Y([o,a].join(","))}}var fa={forward:e=>L(e,wn),reverse:e=>L(va(e),wn,!0)},ga=S({identifier:he,schema:ka,transformConfig:fa,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})}}),Lo=ga;s();var Vn={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 In={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 xn={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 Rn={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 zn={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 Cn={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 En={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 Un={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 ye={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 Pn={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 qn={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 On={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 Ln={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 Mn={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 $n={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 Hn={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 Bn={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 jn={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 Wn={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 Kn={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 Gn={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 Yn={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 M;(function(e){e.CustomersRedact="customers/redact",e.CustomersDataRequest="customers/data_request",e.ShopRedact="shop/redact"})(M||(M={}));var Zn=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=>V(e),F,{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([M.CustomersRedact,M.CustomersDataRequest,M.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});s();function Qn(e,n){let i=Na(e);if(i)return n.addIssue(i),t.NEVER}function Na(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:m,topics:d=[],compliance_topics:l=[],filter:p=""}]of n.entries()){let k=["subscriptions",r];if(!d.length&&!l.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}::${m}::${p}`;if(i.has(v)){let N=p?pe.dim(`
10
+
11
+ topic: ${u}
12
+ uri: ${m}
13
+ filter: ${p}`):pe.dim(`
14
+
15
+ topic: ${u}
16
+ uri: ${m}`);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 ei(e){let n=U(e,"webhooks");if(!n)return e;let{api_version:i}=n;return{api_version:i}}function ni(e){let n={},i=U(e,"api_version");return n={...i?{webhooks:{api_version:i}}:{}},n}function ii(e){if(e.length===0)return;let n=e.filter(r=>r.topics!==void 0).flatMap(({compliance_topics:r,topics:m,...d})=>ai(m)?.map(p=>({topics:[p],...d}))??[]),i=e.filter(r=>r.topics===void 0||r.compliance_topics!==void 0).map(({compliance_topics:r,topics:m,...d})=>({compliance_topics:r,...d})),a=ya(i,"compliance_topics"),o=Sa(a);return[...Xn(o),...Xn(n)]}function ai(e){return e?.sort((n,i)=>n.localeCompare(i))}function Xn(e){return e.sort((n,i)=>n.uri.localeCompare(i.uri))}function Sa(e){return e.forEach(n=>n.compliance_topics=ai(n.compliance_topics)),e}function ha(e,n){return e.find(i=>i.uri===n.uri&&Ye(i.include_fields??[],n.include_fields??[])&&i.filter===n.filter)}function ya(e,n){return e.reduce((i,a)=>{let o=ha(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 ba=t.object({api_version:t.string({required_error:"String is required"}),privacy_compliance:t.object({customer_deletion_url:F.optional(),customer_data_request_url:F.optional(),shop_deletion_url:F.optional()}).optional(),subscriptions:t.array(Zn).optional().transform(e=>ii(e??[]))}),ti=b.extend({webhooks:ba.superRefine(Qn)});var be="webhooks",Fa={forward:ei,reverse:e=>ni(e)},_a=S({identifier:be,schema:ti,transformConfig:Fa}),ts=_a;s();var oi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},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:"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:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{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 ri={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",Da=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(V,F,{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 Aa(e){let{api_version:n,topic:i,...a}=e;return{webhooks:{subscriptions:[{topics:[i],...a}]}}}var Ta={forward:(e,n)=>{let i=e,a;return"application_url"in n&&(a=n?.application_url),{...i,uri:ee(i.uri,a)}},reverse:Aa},wa=S({identifier:Fe,schema:Da,transformConfig:Ta,uidStrategy:"dynamic"}),vs=wa;s();s();s();function I(e={}){return{type:"token_refresh",handler:async()=>({token:await _([],{noPrompt:e.noPrompt,allowAutomationToken:!0})})}}function Va(e){if(typeof e!="object"||e===null)return!1;let{statusCode:n,response:i}=e,a=n??i?.status;return a===401||a===403}var ne=class extends c{constructor(n){let i=n.businessName??`organization ${n.id}`,a="in the Shopify admin under Settings > Users > Security";Ge()?super(`This service account can't manage dev stores in ${i}.`,null,[`Give the service account Dev store management access ${a}.`,"Or use a token from a service account that has that access."]):J()?super(`This automation token can't manage dev stores in ${i}.`,null,[`Create a service account with Dev store management access ${a}.`,"Set its token in the SHOPIFY_SERVICE_ACCOUNT_TOKEN environment variable."]):super(`You don't have permission to manage dev stores in ${i}.`,null,["Check that you're logged in to the right account.","Or ask an organization admin for access."])}};async function ie(e,n){try{return await T({...n,organizationId:e.id})}catch(i){throw Va(i)?new ne(e):i}}s();var si={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 di={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 x(e){let n=e.match(/\/(\d+)$/);return n?n[1]:void 0}function ae(e){return x(Buffer.from(e,"base64").toString("utf8"))}function $(e){return Buffer.from(e).toString("base64")}async function H(){return(await li()).organizations}async function Ia(e){return li(e)}async function _e(e,n,i){let a=n??await _([],{allowAutomationToken:!0}),r=(await A({query:si,token:a,variables:{organizationId:xa(e)},unauthorizedHandler:i??I(),cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:Le(a)}})).currentUserAccount?.organization;if(r)return{id:e,businessName:r.name}}function xa(e){let n=e.startsWith("gid://")?x(e):e;if(n===void 0||!/^\d+$/.test(n))throw new c(`Invalid organization ID: ${e}`);return $(`gid://organization/Organization/${n}`)}async function li(e){let n=e??await _([],{allowAutomationToken:!0}),i=await A({query:di,token:n,unauthorizedHandler:I()});return i.currentUserAccount?{organizations:i.currentUserAccount.organizationsWithAccessToDestination.nodes.map(o=>{let r=ae(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 De(e){if(e.length===1)return e[0];let i=new Set(e.map(o=>o.businessName)).size<e.length,a=await tn({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 Ra(e){let n=await H();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 De(n)}s();var za=["ACTIVE","LOCKED"];s();s();var Ae={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},R=Object.keys(Ae);s();s();var B=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()}),te=t.object({id:t.string(),name:t.string()});var mi=B.pick({name:!0}).extend({domain:B.shape.subdomain,adminUrl:t.string().nullish(),plan:t.enum(R),featurePreview:t.string().optional(),country:B.shape.country,demoData:t.boolean()}),Te=Ee({name:"CreateDevStoreResult",schema:t.object({store:mi,organization:te}),definitions:{CreatedDevStore:mi,StoreOrganization:te}});s();var ui={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 ci={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 Ca=2,Ea=300*1e3;function Ua(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 Pa(e){let{organization:n,name:i,plan:a}=e,o=await _([],{allowAutomationToken:!0}),r=I(),d=(await ie(n,{query:ui,token:o,variables:{shopName:i,priceLookupKey:Ae[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 l=d.userErrors;if(l&&l.length>0){let u=l.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 on({title:P`Waiting for store to be ready`,task:async u=>{let v=Date.now(),N=!1;for(;;){if(Date.now()-v>Ea)throw N?new c("Store creation timed out after 5 minutes."):new c("Store creation timed out after 5 minutes without reporting a status.",null,[`Check whether ${p} was created with \`shopify store list\` before trying again.`]);let f=(await ie(n,{query:ci,token:o,variables:{shopDomain:p},unauthorizedHandler:r})).organization?.storeCreation?.status;if(f){if(N=!0,f==="COMPLETE")return;if(f==="FAILED"||f==="TIMED_OUT"||f==="USER_ERROR")throw new c(`Store creation failed with status: ${f}`)}u(P`${f?Ua(f):"Waiting for store creation to start"}`),await sn(Ca)}},renderOptions:{stdout:process.stderr}}),e.json)mn(Te.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=[];j(u,"Domain",p),u.push(["Admin",k?{link:{label:k,url:k}}:"N/A"]),j(u,"Plan",a),j(u,"Feature preview",e.featurePreview),j(u,"Country",e.country),j(u,"Demo data",e.withDemoData?"enabled":"disabled"),en({headline:`Dev store "${i}" created successfully.`,customSections:[{body:{tabularData:u,firstColumnSubdued:!0}}]})}return p}function j(e,n,i){i!=null&&i!==""&&e.push([n,i])}s();var qa={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function Oa(){return rn({message:"Name for the new dev store"})}function La(){return nn({message:"Which Shopify plan do you want to use?",choices:R.map(e=>({label:qa[e],value:e}))})}function Ma(){return an({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}s();s();var pi=(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 ki=W(Z()),$a=new ki.default({minTime:150,maxConcurrent:10});async function Ha(e){let n="App Management",a=`https://${await h()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:a,responseOptions:{onResponse:Ve}}}var we=e=>Me(e),vi=async(e,n,i)=>{let o=`https://${await h()}/app_management/unstable/organizations/${e}/app_logs/poll`;return pi(o,n,i)},fi=async(e,n)=>`https://${await h()}/app_management/unstable/organizations/${encodeURIComponent(e)}/apps/${encodeURIComponent(n)}/channel_spec_export.json`;async function gi(e){let n=e.cacheOptions?.cacheExtraKey??"",i=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return $a.schedule(async()=>y({...await Ha(e.token),query:e.query,variables:e.variables,cacheOptions:i,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function Ve(e){if(!e.extensions)return;let n=[];for(let i of e.extensions.deprecations)i.supportedUntilDate&&n.push(new Date(i.supportedUntilDate));Ze(n)}s();var Ni=W(Z()),Ba=new Ni.default({minTime:150,maxConcurrent:10});async function Si(e){let n="App Dev",i=E(e.shopFqdn),o=`https://${await je(i)}/app_dev/unstable/graphql.json`,r=Be()==="local"?{"x-forwarded-host":i}:void 0;return Ba.schedule(()=>y({query:e.query,api:n,url:o,token:e.token,addedHeaders:r,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler,preferredBehaviour:e.requestOptions?.requestMode}))}s();var hi=W(Z()),ja=new hi.default({minTime:150,maxConcurrent:10});async function Wa(e,n,i){let a="Functions",r=`https://${await h()}/functions/unstable/organizations/${e}/${i}/graphql`;return{token:n,api:a,url:r,responseOptions:{onResponse:Ve}}}async function yi(e){return await ja.schedule(async()=>y({...await Wa(e.organizationId,e.token,e.appId),query:e.query,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}s();var bi=W(Z()),Ka=new bi.default({minTime:150,maxConcurrent:10});async function Fi(e){let n="Webhooks",a=`https://${await h()}/webhooks/unstable/organizations/${e.organizationId}/graphql.json`;return Ka.schedule(()=>y({query:e.query,api:n,url:a,token:e.token,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}import{randomUUID as Ga}from"crypto";var _i="https://cdn.shopify.com/static/cli/extensions/templates.json",Ya=Ga(),Ja=t.object({statusCode:t.literal(200),errors:t.array(t.object({path:t.tuple([t.literal("versionByTag")]),extensions:t.object({app_errors:t.object({errors:t.array(t.object({category:t.literal("not_found")})).nonempty()})})})).nonempty()}),re=class e{static instance;static getInstance(n){return e.instance??=new e(n),e.instance}static resetInstance(){e.instance=void 0}clientName=se.AppManagement;webUiName="Developer Dashboard";organizationSource=Q.BusinessPlatform;bundleFormat="br";_session;constructor(n){this._session=n}async subscribeToAppLogs(n,i){return this.appManagementRequest({query:ri,variables:{shopIds:n.shopIds,apiKey:n.apiKey}})}async appLogs(n,i){let a=await st({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=x(n.id)??n.id,a=await fi(n.organizationId,i),o=await le(a,{method:"GET",headers:we(await this.token())}),r;try{r=await o.json()}catch{r=void 0}let m=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:void 0;return o.ok&&m?{ok:!0,status:o.status,body:m}:{ok:!1,status:o.status,body:m}}async session(){if(!this._session){if(dn())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let n=await ue(),{appManagementToken:i,businessPlatformToken:a,userId:o}=n,r=await A({query:jn,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:o},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(J()&&r.currentUserAccount){let m=r.currentUserAccount.organizations.nodes.map(d=>({name:d.name}));if(m.length>1)throw new D("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:m[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 ue({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"),m=i.activeRoot.clientCredentials.secrets.map(d=>({secret:d.key}));return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:m,organizationId:String(g(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:r?.config?.app_url,embedded:r?.config?.embedded,flags:[],developerPlatformClient:this}}async organizations(){return(await H()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(n){let i=await _e(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=Bn,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 D("Server failed to retrieve apps");return{apps:r.appsConnection.edges.map(d=>{let l=d.node;return{id:l.id,apiKey:l.key,title:l.activeRelease.version.name,organizationId:n}}),hasMorePages:r.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:n}){let i=Hn,a={organizationId:Ie(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:rt(r.uidStrategy.__typename),experience:xe(r.experience,r.identifier),validationSchema:r.validationSchema}))}async templateSpecifications({organizationId:n},i={}){let a,{templatesJsonPath:o}=fn,r=process.env[o];if(r){if(!await qe(r))throw new c("There is no file at the path specified for template specifications");let u=await Pe(r);a=JSON.parse(u)}else try{a=await(await He(_i)).json()}catch{throw new c(["Failed to fetch extension templates from",{link:{url:_i}},{char:"."},"This likely means a problem with your internet connection."])}let m=0,d=i.requestedTemplate?a.filter(u=>u.identifier===i.requestedTemplate):void 0,l=d&&d.length>0?d:a,p=(await ot(l,async u=>this.organizationBetaFlags(n,u),async u=>this.organizationExpFlags(n,u))).map(u=>({...u,sortPriority:m++})),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=Xa(i,n.id,o),m=$n,d=await this.appManagementRequest({query:m,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 l=Ii([]),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:l,developerPlatformClient:this}}async devStoresForOrg(n,i){let a=await this.businessPlatformOrganizationsRequest({query:zn,organizationId:String(g(n)),variables:{searchTerm:i}}),o=a.organization;if(!o)throw new c("No organization found");let r=o.accessibleShops?.edges.map(d=>d.node)??[],m=Vi(o.currentUser?.organizationPermissions??[]);return{stores:Ai(r,m),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(n){return(await this.businessPlatformOrganizationsRequest({query:Cn,organizationId:String(g(n)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(n,i){let a=i??await this.activeAppVersion(n),o=[],r=[],m=[];return a.appModuleVersions.forEach(d=>{let l={id:d.registrationId,uuid:d.registrationUuid,title:d.handle,type:d.type,activeVersion:d.config?{config:JSON.stringify(d.config),...d.target&&{context:d.target}}:void 0};d.specification?.experience==="configuration"?o.push(l):d.specification?.options?.managementExperience==="dashboard"?m.push(l):r.push(l)}),{app:{dashboardManagedExtensionRegistrations:m,configurationRegistrations:o,extensionRegistrations:r}}}async appVersions({id:n,organizationId:i,title:a}){let o=Ln,r={appId:n},m=await this.appManagementRequest({query:o,variables:r});return m.app?{app:{id:m.app.id,organizationId:i,title:a,appVersions:{nodes:m.app.versions?.edges.map(d=>{let l=d.node;return{createdAt:l.createdAt,createdBy:{displayName:l.createdBy},versionTag:l.metadata.versionTag,status:l.id===m.app.activeRelease.version.id?"active":"inactive",versionId:l.id,message:l.metadata.message}})??[],pageInfo:{totalResults:m.app.versionsCount}}}}:{app:null}}async appInstallCount({id:n}){let i=Mn,a={appId:n};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:n,organizationId:i},a){let o=oi,r={appId:n,versionTag:a},d=(await this.appManagementRequest({query:o,variables:r}).catch(l=>{throw Ja.safeParse(l).success?new O(a):l})).versionByTag;if(!d)throw new O(a);return{id:parseInt(d.id,10),uuid:d.id,versionTag:d.metadata.versionTag,location:[await oe({organizationId:i,id:n}),"versions",g(d.id)].join("/"),message:d.metadata.message??"",appModuleVersions:d.appModules.map(Ti)}}async appVersionsDiff(n,{versionId:i}){let a={versionId:i},[o,r]=await Promise.all([this.activeAppVersionRawResult(n.apiKey),this.appManagementRequest({query:On,variables:a})]),m=o.app.activeRelease.version.appModules,d=r.version.appModules,{added:l,removed:p,updated:k}=tt({currentModules:m,selectedVersionModules:d});function u(v){return{uuid:v.uuid,handle:v.handle,specification:{identifier:v.specification.identifier,experience:xe(v.specification.experience,v.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:l.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(Ti),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:n,organizationId:i}){let a={sourceExtension:"BR",organizationId:Ie(i)},o=await this.appManagementRequest({query:qn,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${n}-${Ya}`}});return{assetUrl:o.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:o.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:n,appId:i,organizationId:a,versionTag:o,message:r,commitReference:m,bundleUrl:d,skipPublish:l}){let u={appId:i,version:d?{sourceUrl:d}:{source:n},metadata:{versionTag:o,message:r,sourceControlUrl:m}},v=await this.appManagementRequest({query:Pn,variables:u,requestOptions:{requestMode:"slow-request"}}),{version:N}=v.appVersionCreate,z=v.appVersionCreate.userErrors.map(wi)??[];if(!N)return{appDeploy:{userErrors:z}};let f={appDeploy:{appVersion:{uuid:N.id,id:parseInt(N.id,10),versionTag:N.metadata.versionTag,location:await at(a,i,N.id),appModuleVersions:N.appModules.map(ze=>({uuid:ze.uuid,registrationUuid:ze.uuid,validationErrors:[]})),message:N.metadata.message},userErrors:z}};if(l)return f;let zi={appId:i,versionId:N.id},de=await this.appManagementRequest({query:ye,variables:zi});return de.appReleaseCreate.userErrors&&(f.appDeploy.userErrors=(f.appDeploy.userErrors??[]).concat(de.appReleaseCreate.userErrors.map(wi))),!de.appReleaseCreate.release&&f.appDeploy.userErrors.length===0&&f.appDeploy.userErrors.push({message:"The API did not return a release for the created app version.",category:"",details:[]}),f}async release({app:{id:n,organizationId:i},version:{versionId:a}}){let o={appId:n,versionId:a},r=await this.appManagementRequest({query:ye,variables:o});if(r.appReleaseCreate.release&&!r.appReleaseCreate.userErrors?.length)return{appRelease:{appVersion:{versionTag:r.appReleaseCreate.release.version.metadata.versionTag,message:r.appReleaseCreate.release.version.metadata.message,location:[await oe({organizationId:i,id:n}),"versions",g(r.appReleaseCreate.release.version.id).toString()].join("/")}}};if(!r.appReleaseCreate.userErrors?.length)throw new c("The Developer Dashboard did not confirm the app version release.");return{appRelease:{userErrors:r.appReleaseCreate.userErrors?.map(m=>({field:m.field,message:m.message,category:m.category,details:[],on:m.on}))??[]}}}async storeByDomain(n,i,a){let r=(await Promise.all(a.map(l=>this.businessPlatformOrganizationsRequest({query:Rn,organizationId:String(g(n)),variables:{domain:i,filters:dt(l)}})))).map(l=>l.organization).filter(l=>l!=null);if(r.length===0)throw new c("No organization found");let m=r.flatMap(l=>{let p=l.accessibleShops?.edges.map(u=>u.node)??[],k=Vi(l.currentUser?.organizationPermissions??[]);return Ai(p,k)}),d=E(i);return m.find(l=>l.shopDomain===d)}async ensureUserAccessToStore(n,i){if(!i.provisionable)return;let o={input:{shopifyShopId:nt(i.shopId)}},m=(await T({query:En,token:await this.businessPlatformToken(),organizationId:String(g(n)),variables:o,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!m.success){let d=m.userErrors?.map(l=>l.message).join(", ")??"";throw new D(`Failed to provision user access to store: ${d}`)}}async sendSampleWebhook(n,i){let a=Kn,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}),m={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},d=r.cliTesting;return d&&(m={samplePayload:d.samplePayload??"{}",headers:d.headers??"{}",success:d.success,userErrors:d.errors.map(l=>({message:l,fields:[]}))}),{sendSampleWebhook:m}}async apiVersions(n){return{publicApiVersions:(await this.webhooksRequest({organizationId:n,query:Gn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:n},i){let a=Wn,o={apiVersion:n};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:o})).availableTopics??[]}}async updateURLs(n){return ke("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),r=String(g(o.id));return(await this.functionsRequest({organizationId:a,query:Yn,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(g(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 oe({id:n,organizationId:i})}async devSessionCreate({appId:n,assetsUrl:i,shopFqdn:a,websocketUrl:o,unsafeValidation:r}){let m=String(g(n));return this.appDevRequest({query:Vn,shopFqdn:a,variables:{appId:m,assetsUrl:i??"",websocketUrl:o,unsafeValidation:r??!1},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:n,assetsUrl:i,shopFqdn:a,manifest:o,inheritedModuleUids:r,unsafeValidation:m}){let l={appId:String(g(n)),assetsUrl:i,manifest:JSON.stringify(o),inheritedModuleUids:r,unsafeValidation:m??!1};return this.appDevRequest({query:In,shopFqdn:a,variables:l})}async devSessionDelete({appId:n,shopFqdn:i}){let a=String(g(n));return this.appDevRequest({query:xn,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(n){let i=`https://${await me()}/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:Un,variables:{apiKey:n}})}async organizationBetaFlags(n,i){let a={organizationId:Di(n)},o=await Qe({query:pn(i),token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={};return i.forEach(m=>{r[m]=!!o.organization[`flag_${m}`]}),r}async organizationExpFlags(n,i){let a={organizationId:Di(n),flagHandles:i},o=await T({query:kn,token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={},m=o.organization?.enabledFlags??[];return i.forEach((d,l)=>{r[d]=!!m[l]}),r}async appManagementRequest(n){return gi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(n){return Si({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(n){return A({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(n){return T({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(n){return yi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(n){return Fi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(n="default"){return xi(this,n)}},Za="https://shopify.dev/apps/default-app-home",Qa="https://shopify.dev/apps/default-app-home/api/auth";function Xa(e,n,i){let{isLaunchable:a,scopesArray:o,name:r}=e;return{initialVersion:{source:{source:{name:r,modules:[{type:Ne,config:{app_url:a?"https://example.com":Za,embedded:!0}},{type:Se,config:{name:r}},{type:be,config:{api_version:i}},{type:he,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":Qa],...o&&{scopes:o.map(p=>p.trim()).join(",")}}}]}}.source},organizationId:Ie(n)}}function et(e){let n=e.startsWith("gid://")?g(e):Number(e);if(Number.isNaN(n))throw new Error(`Invalid organization ID: ${e}`);return`gid://organization/Organization/${n}`}function Di(e){return $(et(e))}function Ie(e){return`gid://shopify/Organization/${e.startsWith("gid://")?g(e):Number(e)}`}function nt(e){return $(`gid://organization/ShopifyShop/${e}`)}function it(e){let n=ae(e);if(n===void 0)throw new Error(`Invalid encoded GID: ${e}`);return n}function g(e){if(e.startsWith("gid://")){let n=x(e);if(n===void 0)throw new Error(`Invalid GID: ${e}`);return Number(n)}return Number(e)}async function oe({id:e,organizationId:n}){let i=g(n).toString();return`https://${await me()}/dashboard/${i}/apps/${g(e)}`}async function at(e,n,i){return`${await oe({organizationId:e,id:n})}/versions/${g(i)}`}function tt({currentModules:e,selectedVersionModules:n}){let i=e.map(l=>l.userIdentifier),a=n.map(l=>l.userIdentifier),o=n.filter(l=>!i.includes(l.userIdentifier)),r=e.filter(l=>!a.includes(l.userIdentifier)),m=r.map(l=>l.userIdentifier),d=e.filter(l=>!m.includes(l.userIdentifier));return{added:o,removed:r,updated:d}}async function ot(e,n,i,a=Ce){let o=C(e.flatMap(l=>l.organizationBetaFlags??[])),r=C(e.flatMap(l=>l.organizationExpFlags??[])),[m,d]=await Promise.all([o.length>0?n(o):Promise.resolve({}),r.length>0?i(r):Promise.resolve({})]);return e.filter(l=>{let p=!l.organizationBetaFlags||l.organizationBetaFlags.every(f=>m[f]),k=!l.organizationExpFlags||l.organizationExpFlags.every(f=>d[f]),u=!l.minimumCliVersion||ce(a,`>=${l.minimumCliVersion}`),v=!l.deprecatedFromCliVersion||ce(a,`<${l.deprecatedFromCliVersion}`),N=u&&v,z=Xe(a)&&l.deprecatedFromCliVersion===void 0;return p&&k&&(N||z)})}function xe(e,n){if(n===Fe)return"configuration";switch(e){case"extension":case"configuration":case"deprecated":return e;default:return ke(`Unknown specification experience value "${e}", defaulting to "extension"`),"extension"}}function rt(e){switch(e){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function Ai(e,n){return e.map(i=>{let{externalId:a,primaryDomain:o,name:r,url:m,storeType:d}=i,l=m??o;if(!l)throw new D("The selected store does not have a valid URL");return{shopId:a?it(a):void 0,link:o,shopDomain:E(l),shopName:r,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:n,storeType:d}})}function Ti(e){return{registrationId:e.userIdentifier===e.uuid?"":e.userIdentifier,registrationUuid:e.uuid,handle: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:xe(e.specification.experience,e.specification.externalIdentifier)}}}var st=async({organizationId:e,jwtToken:n,cursor:i,filters:a})=>{let o=await vi(e,i,a),r=we(n);return le(o,{method:"GET",headers:r})};function wi(e){let n=[],i=e.on[0]?.user_identifier;return i&&n.push({extension_id:i}),{...e,details:n}}function dt(e){return[{field:"STORE_TYPE",operator:"EQUALS",value:e.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function Vi(e){return e.includes("ondemand_access_to_stores")}var se;(function(e){e.AppManagement="app-management",e.Partners="partners"})(se||(se={}));function vn(){return re.getInstance()}var Ri;Ri||(Ri={});var lt={};function Ii(e=[]){let n=[],i=e.map(a=>lt[a]);return n.filter(a=>!i.includes(a))}var Re=new WeakMap;function xi(e,n="default"){return{type:"token_refresh",handler:async()=>{let i=Re.get(e);if(i)await i;else try{i=e.unsafeRefreshToken(),Re.set(e,i),await i}finally{Re.delete(e)}let a=await e.session();return{token:n==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{I as a,ie as b,x as c,ae as d,H as e,Ia as f,_e as g,De as h,Ra as i,za as j,R as k,B as l,te as m,Te as n,Pa as o,Oa as p,La as q,Ma as r,fn as s,Ei as t,Rt as u,zt as v,gn as w,Ct as x,Et as y,mt as z,un as A,ut as B,Ci as C,ct as D,Nn as E,Sn as F,Ui as G,Mt as H,$t as I,ji as J,X as K,Ht as L,b as M,Bt as N,V as O,ee as P,Zi as Q,_n as R,ia as S,Dn as T,An as U,S as V,So as W,Fe as X,vs as Y,M as Z,Zn as _,ii as $,ya as aa,ti as ba,O as ca,Q as da,Ne as ea,Ao as fa,Se as ga,Ro as ha,ca as ia,pa as ja,he as ka,Lo as la,be as ma,ts as na,et as oa,se as pa,vn as qa,xi as ra,fe as sa,w as ta,_t as ua,Dt as va,At as wa};
@@ -0,0 +1,4 @@
1
+ import{a as B,b as H}from"./chunk-VXD26GIG.js";import{b as N,c as k}from"./chunk-QX3T6G5X.js";import{c as Y,e as q}from"./chunk-MZCIRMZJ.js";import{B as I,m as J,t as M,u as _,v,z as F}from"./chunk-2M535QQJ.js";import{q as P,s as b}from"./chunk-J3UXIC23.js";import{a as c}from"./chunk-MHWETFNT.js";import{A as T,X as V}from"./chunk-V654BMS7.js";import{a as A}from"./chunk-BN7ZXAZJ.js";import{h as S}from"./chunk-J7BTC45S.js";import{Bb as l,Cb as W,ib as E,lb as C,mb as O,qb as p,sb as u,wb as G,yb as h}from"./chunk-RIG66DIQ.js";import{b as n}from"./chunk-FZCGRIOM.js";import{d as j}from"./chunk-GSGCSBRN.js";import{g as L,o as R,p as D,q as x}from"./chunk-IWTNUJGY.js";import{a as oe}from"./chunk-CX5CC6P5.js";import{e as ne,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();import{resolve as te}from"node:path";var z=A({name:"UpgradeResult",schema:n.union([n.object({status:n.literal("success"),changed:n.boolean().describe("Whether the verified installed version differs from previousVersion."),scope:n.literal("global"),previousVersion:n.string().min(1),version:n.string().min(1),packageManager:n.enum(["npm","pnpm","yarn","bun","homebrew"])}).strict(),n.object({status:n.literal("success"),changed:n.null().describe("Null because local dependency changes and installed versions are not verified."),scope:n.literal("local"),directory:n.string().refine(L,"Must be an absolute filesystem path.").transform(e=>te(e)),previousVersion:n.string().min(1),availableVersion:n.string().min(1).nullable().describe("The available registry version, or null when unknown."),packages:n.array(n.string().min(1))}).strict(),n.object({status:n.literal("skipped"),reason:n.enum(["development","local-autoupgrade","dependency-not-found"]),scope:n.enum(["global","local"])}).strict()])});function K(e,o){o==="json"?G(z.encode(e)):e.status==="success"&&e.scope==="global"&&T({headline:"Shopify CLI upgraded.",body:`You're now on version ${e.version}.`})}var X=ne(oe(),1);function Z(){let e=C();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function Ee(e={}){K(await re(e),"text")}async function re(e={}){let o=x()??D(),r=O(o),i=E();if(j())return h("Skipping upgrade in development mode."),{status:"skipped",reason:"development",scope:i?"global":"local"};if(e.autoupgrade&&!i)return{status:"skipped",reason:"local-autoupgrade",scope:"local"};if(i){let s=C(),a=Z();if(!a||s==="unknown")throw new Error("Could not determine the package manager");let[t,...g]=a.split(" ");if(!t)throw new Error("Could not determine the command to run");let f=v("@shopify/cli",c),y=f?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${f})`:"\u2728 New version of Shopify CLI available!";h(u`${y}
2
+ Now upgrading by running: ${p.genericShellCommand(a)}...`),await H(t,g);let m=await N();if(!m)throw new S("Couldn't verify the Shopify CLI version after upgrading.",u`Check the installed version by running ${p.genericShellCommand("shopify version")}.`);let $=f??c;if((0,X.lt)(m,$))throw new S(`Failed to upgrade Shopify CLI. Expected to be on version ${$}, but version ${m} is now installed.`,"Your package manager may be resolving @shopify/cli from a registry with outdated versions. Check your npm registry configuration and try again.");return{status:"success",changed:m!==c,scope:"global",previousVersion:c,version:m,packageManager:s}}else{if(r)return ie(r,c);throw new Error("Could not determine the local project directory")}}function Oe(){let e=c,o=v("@shopify/cli",e);if(!o){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),o;if(!b()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(V()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(k(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return o}async function Je(){try{let{notifications:e}=await Y();return q(e,"",["autoupgrade"]).some(r=>r.type==="error")}catch{return!1}}async function Me(){if(V()||k(c)||b())return;let e=v("@shopify/cli",c);e&&await P("warn-on-available-upgrade",{days:1},async()=>{W(ae(e))})}function ae(e,o=!1){let r=Z(),i=r?u`💡 Version ${e} available! Run ${p.genericShellCommand(r)}`.value:u`💡 Version ${e} available!`.value;if(o){let s=`https://github.com/Shopify/cli/releases/tag/${e}`,a=u`⚠️ This is a major version — review breaking changes before upgrading:\n ${p.link(s,s)}`.value;return`${i}
3
+
4
+ ${a}`}return i}async function ie(e,o){let r=(await I(e)).content,i=r.dependencies??{},s=r.devDependencies??{},t={...i,...s}[await U()];if(!t)return l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade."),{status:"skipped",reason:"dependency-not-found",scope:"local"};t.slice(0,1).match(/[\^~]/)&&(t=o);let g=await _(await U(),t);g?pe(t,g):ce(t);let f=await Q("prod",i,e),y=await Q("dev",s,e);return{status:"success",changed:null,scope:"local",directory:e,previousVersion:t,availableVersion:g??null,packages:[...new Set([...f,...y])]}}async function Q(e,o,r){let i=[await U(),...await se()].filter(a=>!!o[a]).map(a=>({name:a,version:"latest"})),s=await M(r);if(i.length>0){let a=await J(r),t=B();try{await F(i,{packageManager:a,type:e,directory:r,...t,addToRootDirectory:s})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}return i.map(({name:a})=>a)}async function U(){return(await ee()).name}async function se(){return(await ee())?.oclif?.plugins??[]}var w;async function ee(){if(!w){let e=await I(R(import.meta.url));w=w??e.content}return w}function ce(e){h(u`You're on the latest version, ${p.yellow(e)}, no need to upgrade!`)}function pe(e,o){h(u`Upgrading CLI from ${p.yellow(e)} to ${p.yellow(o)}...`)}export{z as a,K as b,Z as c,Ee as d,re as e,Oe as f,Je as g,Me as h,ae as i};
@@ -0,0 +1 @@
1
+ import{a as K,b as _,c as z,d as N,e as f,f as d,g as W,h as G,j as H}from"./chunk-DM7BTMFP.js";import{a as x}from"./chunk-EA5XVQJT.js";import{b as S,c as j}from"./chunk-ACA2BGAD.js";import{a as R}from"./chunk-NPB753M3.js";import{a as P}from"./chunk-D4LFWIFE.js";import{Ma as J,da as L}from"./chunk-XV6XCOTG.js";import{Ea as A,ta as U}from"./chunk-NCPZVARH.js";import{b as D,c as v}from"./chunk-5AWELO3D.js";import{A as F}from"./chunk-V654BMS7.js";import{a as C}from"./chunk-BN7ZXAZJ.js";import{j as O,m as k,n as M}from"./chunk-J7BTC45S.js";import{wb as s,xb as g}from"./chunk-RIG66DIQ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as $}from"./chunk-YTUUU33R.js";import{g as T}from"./chunk-IWTNUJGY.js";import{e as Z,g as m}from"./chunk-VKWPEFWQ.js";m();m();var B=t.string().refine(T,"Expected an absolute native filesystem path"),Y=t.object({id:t.string().uuid().describe("The dashboard extension registration UUID, not a Shopify GID."),name:t.string(),type:t.string().min(1).describe("The upstream dashboard extension type."),directory:B.describe("The absolute local extension directory."),configurationPath:B.nullable().describe("The absolute local TOML path, or null when no TOML file exists in a kept directory."),changed:t.boolean().describe("Whether this import wrote the local extension TOML.")}).strict(),q=t.object({extensionId:t.string().uuid().nullable().describe("The registration UUID, or null for identifier persistence."),error:S}).strict(),n=C({name:"ImportDashboardExtensionsResult",schema:t.object({status:t.enum(["success","partial","skipped","cancelled"]),reason:t.enum(["no-extensions","directory-selection-cancelled"]).nullable(),extensions:t.array(Y).describe("Completed extension imports and kept local directories, in selection order."),errors:t.array(q).describe("Failed selected imports or identifier persistence."),identifiersUpdated:t.boolean().describe("Whether the extension identifier persistence step completed.")}).strict(),definitions:{ImportedDashboardExtension:Y,ExtensionImportFailure:q,...j.definitions}});var Q=Z($(),1);var E=class u extends R{static descriptionWithMarkdown="Import dashboard-managed extensions into your app.";static get jsonOutputSchema(){return n}static description=this.descriptionForHelp();static flags={...D,...P,...v,"client-id":Q.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};async run(){let{flags:o}=await this.parse(u),r=await J({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),a=await H({developerPlatformClient:r.developerPlatformClient,apiKey:r.remoteApp.apiKey,organizationId:r.remoteApp.organizationId,extensionTypes:N}),l=_(o.json?G(r.app,a):a);if(l.length===0)o.json?s(n.encode({status:"skipped",reason:"no-extensions",extensions:[],errors:[],identifiersUpdated:!1})):F({headline:["No extensions to migrate."]});else{let y=await z(l),i;try{if(i=await W({...r,extensions:a,extensionTypes:y.extensionTypes,buildExtensionConfig:y.buildExtensionConfig}),o.json&&i.status==="skipped")return s(n.encode({status:i.status,reason:i.reason,extensions:[],errors:[],identifiersUpdated:!1})),{app:r.app};o.json||K(i),await L({app:r.app,appApiKey:r.remoteApp.apiKey,extensionUuids:i.extensionUuids,command:"import-extensions"})}catch(e){if(!o.json)throw e instanceof d?e.originalError:e;let I=e instanceof d?e.originalError:e;if(e instanceof f||e instanceof d){let p=await e.completedImports();if(e instanceof d&&p.extensions.length===0)throw e.originalError;let h=e instanceof f&&p.failures.length===0;if(s(n.encode({status:h?"cancelled":"partial",reason:h?"directory-selection-cancelled":null,extensions:b(p.extensions),errors:p.failures.map(({extension:V,error:X})=>({extensionId:V.uuid,error:x(X)})),identifiersUpdated:!1})),h)throw await g(),e;e instanceof f&&(I=p.failures[0].error)}else if(i)s(n.encode({status:"partial",reason:null,extensions:b(i.extensions),errors:[{extensionId:null,error:x(e)}],identifiersUpdated:!1}));else throw e;let c=await k(I),w=M(c)?"unexpected_error":"expected_error";throw await U({config:this.config,errorMessage:c instanceof Error?c.message:void 0,exitMode:w}),await A(c,w),await g(),new O}o.json&&s(n.encode({status:"success",reason:null,extensions:b(i.extensions),errors:[],identifiersUpdated:!0}))}return{app:r.app}}};function b(u){return u.map(({extension:o,directory:r,configurationPath:a,changed:l})=>({id:o.uuid,name:o.title,type:o.type,directory:r,configurationPath:a,changed:l}))}export{E as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-5NCWBBRW.js";import{a}from"./chunk-SJ2ROSXG.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var r=class extends a{static hidden=!0;static flags={...a.flags};static baseFlags={...a.baseFlags};async run(){return e({from:"app import-extensions",to:"app import dashboard-extensions"}),super.run()}};export{r as a};
1
+ import{a as e}from"./chunk-ETXBF6Q7.js";import{a}from"./chunk-WQ6W725N.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var r=class extends a{static hidden=!0;static flags={...a.flags};static baseFlags={...a.baseFlags};async run(){return e({from:"app import-extensions",to:"app import dashboard-extensions"}),super.run()}};export{r as a};
@@ -0,0 +1,8 @@
1
+ import{a as E}from"./chunk-AQ34X5B3.js";import{a as j}from"./chunk-2M4BKFYF.js";import{a as U,b as F}from"./chunk-YY6TFARF.js";import{a as R}from"./chunk-63UKZLPC.js";import{b,c as p,e as _,g as y,h as S}from"./chunk-QFWWCZOI.js";import{p as O,v as T}from"./chunk-KT5QQOES.js";import{b as w,c as g}from"./chunk-5AWELO3D.js";import{O as d,z as c}from"./chunk-V654BMS7.js";import{h as u}from"./chunk-J7BTC45S.js";import{wb as f}from"./chunk-RIG66DIQ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{o as v}from"./chunk-GSGCSBRN.js";import{b as A}from"./chunk-YTUUU33R.js";import{e as P,g as n}from"./chunk-VKWPEFWQ.js";n();n();async function I(r,e){let m=new j(r),l=(await(e.development?m.find():m.fetch()))?.id,o=await R(r,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${l}`:e.theme}}),s=U(o,r),L=F(o,r);return{theme:o,preview_url:s,editor_url:L}}n();n();var k=t.object({id:t.number(),name:t.string(),createdAtRuntime:t.boolean(),processing:t.boolean(),role:t.string(),src:t.string().optional()}),x=t.object({theme:k,preview_url:t.string(),editor_url:t.string()}),h=_({name:"ThemeOpenResult",schema:t.object({theme:p.extend({storeDomain:b,previewUrl:t.string().url(),editorUrl:t.string().url(),processing:t.boolean(),sourceUrl:t.string().url().nullable()}).strict()}).strict(),definitions:{Theme:p},project(r){let e=x.parse(r);return{theme:{...S(e.theme),storeDomain:y(new URL(e.preview_url).hostname),previewUrl:e.preview_url,editorUrl:e.editor_url,processing:e.theme.processing,sourceUrl:e.theme.src??null}}}});function D(r,e){if(e==="json"){f(h.encode(r));return}c({body:["Preview information for theme",...E(r.theme),`
2
+
3
+ `,{list:{items:[{link:{label:"Preview your theme",url:r.preview_url}},{link:{label:"Customize your theme at the theme editor",url:r.editor_url}}]}}]})}var i=P(A(),1);var a=class extends T{static get jsonOutputSchema(){return h}static summary="Opens the preview of your remote theme.";static descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:
4
+
5
+ - A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
6
+ - A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.
7
+
8
+ If you don't specify a theme, then you're prompted to select the theme to open from the list of the themes in your store.`;static description=this.descriptionForHelp();static flags={...w,...g,...O,development:i.Flags.boolean({char:"d",description:"Open your development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),editor:i.Flags.boolean({char:"E",description:"Open the theme editor for the specified theme in the browser.",env:"SHOPIFY_FLAG_EDITOR"}),live:i.Flags.boolean({char:"l",description:"Open your live (published) theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),theme:i.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password",["theme","live","development"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(e,m,l=!1){let o=await I(m,e),s=e.editor?o.editor_url:o.preview_url;if(!v()&&!await d(s))throw new u("Could not open the browser.",`Open this URL manually: ${s}`);return(!l||!e.json)&&D(o,e.json?"json":"text"),o}};export{a};
@@ -0,0 +1 @@
1
+ import{c as b}from"./chunk-LENSEW2F.js";import{e as f,g as h,h as g,s as y}from"./chunk-FNWXMCSD.js";import{a as m}from"./chunk-NPB753M3.js";import{Ma as u}from"./chunk-XV6XCOTG.js";import{c as l}from"./chunk-5AWELO3D.js";import{h as d}from"./chunk-J7BTC45S.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();var s=class extends Error{operationId;constructor(t){super(`Migration cancellation for ${t} returned neither an operation nor user errors`),this.name="MigrationCancellationProtocolError",this.operationId=t}};async function w({clientId:o,operationIds:t,cancelOperation:a=y}){let r=t.filter(e=>!h.safeParse(e).success);if(r.length>0)throw new d(`Invalid subscription migration operation IDs: ${r.join(", ")}.`,"Use Shopify AppSubscriptionMigrationOperation GIDs returned by a migration submission.");return{outcomes:await Promise.all(t.map(async e=>{try{let i=await a({clientId:o,operationId:e});if(i.userErrors.length>0)return{status:"failed",operationId:e,operation:i.operation,userErrors:i.userErrors};if(!i.operation)throw new s(e);return{status:"success",operationId:e,operation:i.operation}}catch(i){if(t.length===1)throw i;return{status:"failed",operationId:e,operation:null,error:i}}}))}}var p=class o extends m{static summary="Cancels app subscription migration operations.";static descriptionWithMarkdown="Cancels app subscription migration operations.\n\nCanceling stops additional unprocessed shops, but does not undo shops that have already been scheduled or migrated. Use `unschedule` for reversible schedules.\n\nRepeat `--id` to cancel every operation GID returned by a multi-batch submission. Use `--json` to output the resulting operation states and per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2>","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...f,...l};static get jsonOutputSchema(){return g}async run(){let{flags:t}=await this.parse(o),{app:a,remoteApp:r}=await u({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),c=await w({clientId:r.apiKey,operationIds:t.id}),e=b(c,{json:t.json});return e!==0&&(process.exitCode=e),{app:a}}};export{p as a};
@@ -1 +1 @@
1
- import{e as c}from"./chunk-3XAD2E55.js";import{N as s}from"./chunk-HB4YI2PF.js";import{i as p,l as a}from"./chunk-4HBKQUKY.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
1
+ import{e as c}from"./chunk-5XOEMYEQ.js";import{S as s}from"./chunk-NCPZVARH.js";import{h as p,k as a}from"./chunk-J7BTC45S.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
@@ -0,0 +1,6 @@
1
+ import{b as R,c as p}from"./chunk-BAHIL37I.js";import{b as v}from"./chunk-OLKLHVHA.js";import{k as y}from"./chunk-NCPZVARH.js";import{b as g,c as w}from"./chunk-5AWELO3D.js";import{h as i}from"./chunk-J7BTC45S.js";import{wb as m}from"./chunk-RIG66DIQ.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as P,g as s}from"./chunk-VKWPEFWQ.js";s();s();var O="https://shopify.dev/assistant/search",_="X-Shopify-Surface",j="cli",D=d.array(R.strip().extend({domain:d.string().nullish()}));async function x(t,e,c){let h=new URLSearchParams({query:t});e&&h.append("api_name",e),c&&h.append("api_version",c);let a;try{a=await y(`${O}?${h.toString()}`,{headers:{Accept:"application/json",[_]:j}})}catch{throw new i("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let n=await a.text();if(!a.ok){let r=`${a.status} ${a.statusText}`;try{let o=JSON.parse(n);o?.error&&(r=o.error)}catch(o){if(!(o instanceof SyntaxError))throw o}throw new i(`Search failed: ${r}`)}let l;try{l=JSON.parse(n)}catch(r){if(!(r instanceof SyntaxError))throw r;return{status:"invalid-response",body:n}}let S=D.safeParse(l);return S.success?{status:"success",results:S.data.map(({score:r,content:o,url:b,title:E,domain:F})=>({score:r,content:o,url:b,title:E,domain:F??null})),pageInfo:{hasNextPage:null},body:n}:{status:"invalid-response",body:n}}s();function A(t,e){if(e==="text"){m(t.body);return}if(t.status==="invalid-response")throw new i("Search returned an invalid documentation response.");m(p.encode({results:t.results,pageInfo:t.pageInfo}))}var u=P(I(),1),f=class t extends v{static descriptionWithMarkdown="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static examples=[`# search shopify.dev for a topic
2
+ shopify doc search --query "subscribe to webhooks"
3
+
4
+ # narrow the search to a specific API and version
5
+ shopify doc search --query "create a product" --api-name admin --api-version latest`,`# return typed documentation results as a JSON object
6
+ shopify doc search --query "subscribe to webhooks" --json`];static flags={...g,...w,query:u.Flags.string({description:"The search query.",env:"SHOPIFY_FLAG_QUERY",required:!0}),"api-name":u.Flags.string({description:"Limit results to a specific API (for example: admin, storefront, hydrogen, functions). Unrecognized values are ignored.",env:"SHOPIFY_FLAG_API_NAME"}),"api-version":u.Flags.string({description:"Limit results to a specific API version (for example: 2025-10, latest, current).",env:"SHOPIFY_FLAG_API_VERSION"})};static get jsonOutputSchema(){return p}async run(){let{flags:e}=await this.parse(t),c=await x(e.query,e["api-name"],e["api-version"]);A(c,e.json?"json":"text")}};export{f as a};