shopify 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/dist/{acorn-QBS5IYTX.js → acorn-7M27BPGP.js} +1 -1
  2. package/dist/analytics-DWUYMFHO.js +1 -0
  3. package/dist/analytics-SOXP4UBD.js +1 -0
  4. package/dist/{angular-UTTM4Y4S.js → angular-DW5TQVCM.js} +1 -1
  5. package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
  6. package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
  7. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  8. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
  9. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  10. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  11. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  12. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
  14. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  15. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  16. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  17. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  18. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  19. package/dist/assets/hydrogen/starter/package.json +9 -10
  20. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  21. package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
  22. package/dist/assets/hydrogen/vite/package.json +1 -2
  23. package/dist/assets/hydrogen/vite/vite.config.js +4 -3
  24. package/dist/{babel-JS32NLHY.js → babel-I2RLWM7N.js} +1 -1
  25. package/dist/bootstrap.js +1 -1
  26. package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
  27. package/dist/chunk-2EROVVCL.js +1 -0
  28. package/dist/{chunk-DCBYHVKW.js → chunk-2MMGFZDP.js} +1 -1
  29. package/dist/{chunk-X2TC7S57.js → chunk-2NWWMNU5.js} +8 -8
  30. package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
  31. package/dist/{chunk-MFLBTJO7.js → chunk-3CYHS4W2.js} +1 -1
  32. package/dist/{chunk-2EJCY4CE.js → chunk-3FBSBMSQ.js} +1 -1
  33. package/dist/chunk-3OZ6ZZ4T.js +5 -0
  34. package/dist/{chunk-VICNWPLQ.js → chunk-442S5SDM.js} +12 -12
  35. package/dist/{chunk-MKE434RB.js → chunk-45MEVWH5.js} +1 -1
  36. package/dist/{chunk-A5SQCM63.js → chunk-47MGPVED.js} +1 -1
  37. package/dist/chunk-4N6YTHFD.js +1 -0
  38. package/dist/chunk-4TST2MNC.js +1 -0
  39. package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
  40. package/dist/{chunk-GVITHCQJ.js → chunk-5GVXMNC4.js} +1 -1
  41. package/dist/{chunk-YGMVL6NZ.js → chunk-5JNEWYD5.js} +2 -2
  42. package/dist/{chunk-KU5OPV7U.js → chunk-5QQN3SKH.js} +1 -1
  43. package/dist/{chunk-OKNBZSGN.js → chunk-5QWYIBE6.js} +1 -1
  44. package/dist/chunk-5W443CKL.js +836 -0
  45. package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
  46. package/dist/{chunk-L2VSSINY.js → chunk-67KMRBSZ.js} +1 -1
  47. package/dist/{chunk-HJSYHK4S.js → chunk-6DIHOMCB.js} +1 -1
  48. package/dist/{chunk-MGL4YM3S.js → chunk-6EZ7JWBK.js} +5 -5
  49. package/dist/{chunk-NBYS6YQ2.js → chunk-6RL7FUPD.js} +1 -1
  50. package/dist/chunk-6YPEONHB.js +46 -0
  51. package/dist/{chunk-C6ABJCRG.js → chunk-733R5OKQ.js} +1 -1
  52. package/dist/chunk-73W5BGAZ.js +1 -0
  53. package/dist/{chunk-XDAOLCPN.js → chunk-75LJTY7F.js} +1 -1
  54. package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
  55. package/dist/{chunk-TQGTEVSR.js → chunk-7EJ4UVYI.js} +1 -1
  56. package/dist/{chunk-FQDRVPCY.js → chunk-7LATYPLU.js} +1 -1
  57. package/dist/{chunk-XXE7667M.js → chunk-7SVMAJTR.js} +1 -1
  58. package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
  59. package/dist/{chunk-CE6FKJFS.js → chunk-7UOPCYMV.js} +1 -1
  60. package/dist/{chunk-7JESXDF2.js → chunk-A4SBXDZB.js} +1 -1
  61. package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
  62. package/dist/chunk-APN3VWN4.js +3 -0
  63. package/dist/{chunk-7DVOSOEP.js → chunk-AT2GDXN7.js} +1 -1
  64. package/dist/chunk-ATXODH6C.js +283 -0
  65. package/dist/chunk-AY4GIVME.js +4 -0
  66. package/dist/{chunk-PS25FEBF.js → chunk-B7BUEEBR.js} +1 -1
  67. package/dist/{chunk-6YHJ554P.js → chunk-B7S23DLF.js} +1 -1
  68. package/dist/chunk-BCD4KTLJ.js +1 -0
  69. package/dist/{chunk-C3LZPAAH.js → chunk-BIMOHK2P.js} +1 -1
  70. package/dist/chunk-C3CVLSLS.js +6 -0
  71. package/dist/{chunk-57N2DFIF.js → chunk-CD5O2BIT.js} +1 -1
  72. package/dist/chunk-CPE7XCC6.js +593 -0
  73. package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
  74. package/dist/{chunk-H4W4DFKK.js → chunk-CX5CC6P5.js} +1 -1
  75. package/dist/{chunk-2KH2S7PI.js → chunk-CZXGQ53M.js} +1 -1
  76. package/dist/chunk-D6YDSGR4.js +3 -0
  77. package/dist/{chunk-J6VTZEE2.js → chunk-DHBYYHBT.js} +1 -1
  78. package/dist/chunk-DLNBTHKL.js +5 -0
  79. package/dist/chunk-DO2SHYFU.js +1 -0
  80. package/dist/{chunk-VPL2NDH6.js → chunk-DONEJHDG.js} +35 -35
  81. package/dist/{chunk-5TIJLYZU.js → chunk-DQ4HA72R.js} +1 -1
  82. package/dist/{chunk-NO5KVFTV.js → chunk-DZLA2RJP.js} +3 -3
  83. package/dist/{chunk-YS6VOQ7I.js → chunk-EJDWYASP.js} +1 -1
  84. package/dist/{chunk-N3YWHJMB.js → chunk-EKHWL542.js} +46 -46
  85. package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
  86. package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
  87. package/dist/{chunk-M4LOKANA.js → chunk-F5QG42MA.js} +1 -1
  88. package/dist/{chunk-FTN7Y6HD.js → chunk-FA4K3JRN.js} +1 -1
  89. package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
  90. package/dist/{chunk-4EXYYBQ6.js → chunk-FPLUMESQ.js} +1 -1
  91. package/dist/chunk-FU232KQ7.js +1 -0
  92. package/dist/{chunk-HLMFVORT.js → chunk-FZKKKGUJ.js} +1 -1
  93. package/dist/chunk-G24L7MB3.js +1 -0
  94. package/dist/{chunk-LQMSF3F7.js → chunk-G2I2ZUBV.js} +1 -1
  95. package/dist/{chunk-FFYYJKF7.js → chunk-G2S346IS.js} +1 -1
  96. package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
  97. package/dist/{chunk-VA5IUGZV.js → chunk-GBZL4TTY.js} +1 -1
  98. package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
  99. package/dist/{chunk-2N4O33VM.js → chunk-GDHD3TGC.js} +1 -1
  100. package/dist/{chunk-TLSAQ6FG.js → chunk-GFCLUGAG.js} +1 -1
  101. package/dist/{chunk-C2FFA4O4.js → chunk-GKRCTMWY.js} +1 -1
  102. package/dist/{chunk-TGACBJIY.js → chunk-GTUKM3ZW.js} +1 -1
  103. package/dist/{chunk-RGNAWKD7.js → chunk-GUO7S4NW.js} +1 -1
  104. package/dist/{chunk-WUK5NQSX.js → chunk-GW3VY3FZ.js} +2 -2
  105. package/dist/{chunk-4KRT35A2.js → chunk-H5C3QTOO.js} +1 -1
  106. package/dist/{chunk-LKS47US7.js → chunk-H6WN7GP4.js} +1 -1
  107. package/dist/{chunk-2WNODIWJ.js → chunk-HA6NISOZ.js} +1 -1
  108. package/dist/{chunk-FBVBO5YQ.js → chunk-HCN6HXA5.js} +1 -1
  109. package/dist/chunk-HM5H7WBE.js +1 -0
  110. package/dist/chunk-HZMP62GK.js +21 -0
  111. package/dist/{chunk-QLQGHMVU.js → chunk-HZSAUZBX.js} +1 -1
  112. package/dist/chunk-HZYRCG4R.js +9 -0
  113. package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
  114. package/dist/chunk-I73E3BD5.js +1 -0
  115. package/dist/{chunk-UURFVUAH.js → chunk-IG6LPVS4.js} +1 -1
  116. package/dist/{chunk-BECEP46I.js → chunk-IIOIDMG3.js} +1 -1
  117. package/dist/{chunk-D656BV5Z.js → chunk-IPQH2RHD.js} +1 -1
  118. package/dist/{chunk-TNQXTZAX.js → chunk-IWOTLFOY.js} +1 -1
  119. package/dist/chunk-IX4KP6E3.js +2 -0
  120. package/dist/{chunk-AP3RFOPL.js → chunk-J2WCMQZZ.js} +1 -1
  121. package/dist/chunk-J3HXFQ2L.js +1 -0
  122. package/dist/{chunk-OYP7DKPU.js → chunk-J3JPJCWP.js} +1 -1
  123. package/dist/chunk-J5TNYNR5.js +1 -0
  124. package/dist/{chunk-UBKVCI7A.js → chunk-J7UQBC45.js} +1 -1
  125. package/dist/{chunk-M2TJICTB.js → chunk-JAW32T6G.js} +1 -1
  126. package/dist/{chunk-LCCMXY6N.js → chunk-JOZXRV5K.js} +1 -1
  127. package/dist/{chunk-UARVYVLN.js → chunk-KKUDXLK2.js} +2 -2
  128. package/dist/{chunk-LITB5QQX.js → chunk-KN3FTJDU.js} +1 -1
  129. package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
  130. package/dist/{chunk-DNLOSMHL.js → chunk-KSZ5K6LJ.js} +1 -1
  131. package/dist/chunk-LCPD2BYX.js +1 -0
  132. package/dist/chunk-LKZ7ARYS.js +18 -0
  133. package/dist/{chunk-3V63X7WZ.js → chunk-LOHUNOQ7.js} +1 -1
  134. package/dist/{chunk-IXUVSFW2.js → chunk-LOQIRLTD.js} +1 -1
  135. package/dist/{chunk-CW7WJZKR.js → chunk-MFLQRQQT.js} +1 -1
  136. package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
  137. package/dist/chunk-MQICT2LR.js +1 -0
  138. package/dist/{chunk-VYXVYOIJ.js → chunk-MZMYBFZQ.js} +1 -1
  139. package/dist/{chunk-ZZYFG22L.js → chunk-NADNFSKS.js} +1 -1
  140. package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
  141. package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
  142. package/dist/{chunk-WNGV4JQS.js → chunk-NWDP5IZ2.js} +1 -1
  143. package/dist/{chunk-R6JNXEB3.js → chunk-NY5OGHM5.js} +1 -1
  144. package/dist/chunk-O6KTFMCD.js +1 -0
  145. package/dist/{chunk-3BRUCKZ2.js → chunk-OAI7VSLW.js} +1 -1
  146. package/dist/{chunk-RAH5NW3R.js → chunk-OORCODNK.js} +1 -1
  147. package/dist/chunk-OQORDQLH.js +1 -0
  148. package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
  149. package/dist/{chunk-6AJZKIZ3.js → chunk-PETINPMX.js} +1 -1
  150. package/dist/{chunk-MZJRNFAU.js → chunk-PJYNAUQB.js} +1 -1
  151. package/dist/{chunk-HD5TYIDZ.js → chunk-PMXCJIBP.js} +1 -1
  152. package/dist/{chunk-K77WAKOB.js → chunk-POAICASX.js} +1 -1
  153. package/dist/chunk-PUAMSBXS.js +1 -0
  154. package/dist/{chunk-DERA4K6A.js → chunk-PZYP3MCL.js} +1 -1
  155. package/dist/chunk-Q7BOSHWX.js +7 -0
  156. package/dist/{chunk-K7K6GNF6.js → chunk-QJ7TI6CK.js} +1 -1
  157. package/dist/{chunk-M4V2OQAX.js → chunk-QMXKGSFH.js} +1 -1
  158. package/dist/chunk-QPN2M26G.js +1 -0
  159. package/dist/{chunk-UCLSPAVX.js → chunk-QS3FMN67.js} +1 -1
  160. package/dist/chunk-RF6NUGCU.js +1 -0
  161. package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
  162. package/dist/{chunk-XX343DDG.js → chunk-RYGZCBO4.js} +1 -1
  163. package/dist/{chunk-U3ZG675O.js → chunk-SKLUHLS2.js} +1 -1
  164. package/dist/{chunk-F6T3UBBL.js → chunk-SP2WUATO.js} +1 -1
  165. package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
  166. package/dist/chunk-SWI3LCPE.js +7 -0
  167. package/dist/{chunk-6HZTMQD6.js → chunk-SXTDVUT3.js} +1 -1
  168. package/dist/{chunk-IWCPQD7X.js → chunk-T5GSCWN5.js} +1 -1
  169. package/dist/{chunk-3YWUSKWF.js → chunk-T6CC5WUU.js} +1 -1
  170. package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
  171. package/dist/{chunk-E2YBU6D3.js → chunk-TC3JOEMA.js} +2 -2
  172. package/dist/{chunk-A6X2IVGT.js → chunk-TJGUNVRI.js} +1 -1
  173. package/dist/{chunk-6ZIOYXEF.js → chunk-TKG42KLM.js} +1 -1
  174. package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
  175. package/dist/{chunk-6TORWTD7.js → chunk-TQUSREKP.js} +1 -1
  176. package/dist/chunk-TU47HMTL.js +1 -0
  177. package/dist/chunk-TYMYIUIQ.js +1 -0
  178. package/dist/{chunk-XP6IRAZN.js → chunk-U73TPLFE.js} +1 -1
  179. package/dist/{chunk-VEDZUOVI.js → chunk-UKK5P74A.js} +3 -3
  180. package/dist/chunk-UMT7DWR4.js +1 -0
  181. package/dist/{chunk-FD5S2O6M.js → chunk-UOHNRH6E.js} +1 -1
  182. package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
  183. package/dist/chunk-UUC5YKAS.js +2 -0
  184. package/dist/chunk-UYK6CXAU.js +1 -0
  185. package/dist/{chunk-7KJ5TBWG.js → chunk-V3RZ3DTW.js} +1 -1
  186. package/dist/{chunk-6TEXPRI2.js → chunk-V6ZSIUO3.js} +1 -1
  187. package/dist/{chunk-A3VYI4LO.js → chunk-VDN6MEYI.js} +3 -3
  188. package/dist/chunk-VE35YELD.js +1 -0
  189. package/dist/{chunk-6LK6ZP3Q.js → chunk-VFWWZMOQ.js} +1 -1
  190. package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
  191. package/dist/chunk-VKWPEFWQ.js +1 -0
  192. package/dist/{chunk-7BFDUVOG.js → chunk-VOJWKGCW.js} +1 -1
  193. package/dist/{chunk-LTWXTDDR.js → chunk-VQW35HIQ.js} +1 -1
  194. package/dist/chunk-VUMUCNI7.js +1 -0
  195. package/dist/{chunk-2VLMN5QZ.js → chunk-WAGAC3YI.js} +1 -1
  196. package/dist/chunk-WKBVT5WG.js +1 -0
  197. package/dist/chunk-WLO5H255.js +3 -0
  198. package/dist/chunk-WNWQSHEC.js +10 -0
  199. package/dist/{chunk-6YAXFS6V.js → chunk-WRRUFK4Y.js} +1 -1
  200. package/dist/{chunk-SSM346XI.js → chunk-WVHB2HCQ.js} +1 -1
  201. package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
  202. package/dist/chunk-WZVQHMGI.js +1 -0
  203. package/dist/{chunk-NPM3MFB3.js → chunk-X4DIJTIK.js} +1 -1
  204. package/dist/{chunk-42RMKTCJ.js → chunk-XH6ZP7M5.js} +1 -1
  205. package/dist/{chunk-23AMFHXC.js → chunk-XV3I45NA.js} +1 -1
  206. package/dist/{chunk-PSQFZAF3.js → chunk-XWPPBOGF.js} +1 -1
  207. package/dist/{chunk-MIO2CV3Q.js → chunk-Y3WIZSRU.js} +1 -1
  208. package/dist/{chunk-INFBVFMU.js → chunk-Y66GQ6V2.js} +1 -1
  209. package/dist/{chunk-IVGWFPMA.js → chunk-YGKQCEVG.js} +1 -1
  210. package/dist/{chunk-4Z2WYNTE.js → chunk-YLGSM42I.js} +1 -1
  211. package/dist/{chunk-TXUTT6UA.js → chunk-YQH2JHFA.js} +1 -1
  212. package/dist/{chunk-QTGMS62F.js → chunk-YYL356OX.js} +1 -1
  213. package/dist/chunk-Z4LC3WE5.js +7 -0
  214. package/dist/{chunk-OA4P6AKS.js → chunk-Z74QYLNC.js} +1 -1
  215. package/dist/{chunk-DCK2FX6J.js → chunk-ZAMDXIVC.js} +1 -1
  216. package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
  217. package/dist/{chunk-RL5BWZ7D.js → chunk-ZEENHLSC.js} +2 -2
  218. package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
  219. package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
  220. package/dist/{chunk-UOQQNAHX.js → chunk-ZIREP3EZ.js} +1 -1
  221. package/dist/chunk-ZIXWWU2N.js +275 -0
  222. package/dist/{chunk-NXL6LDJU.js → chunk-ZQ5JVD5X.js} +1 -1
  223. package/dist/{chunk-FGVC22EY.js → chunk-ZULTG2D2.js} +1 -1
  224. package/dist/{chunk-F47MFBKM.js → chunk-ZZFZBFVM.js} +1 -1
  225. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  226. package/dist/cli/commands/app/build.js +1 -1
  227. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  228. package/dist/cli/commands/app/bulk/execute.js +1 -1
  229. package/dist/cli/commands/app/bulk/status.js +1 -1
  230. package/dist/cli/commands/app/config/link.js +1 -1
  231. package/dist/cli/commands/app/config/pull.js +1 -1
  232. package/dist/cli/commands/app/config/use.js +1 -1
  233. package/dist/cli/commands/app/config/validate.js +1 -1
  234. package/dist/cli/commands/app/demo/watcher.js +1 -1
  235. package/dist/cli/commands/app/deploy.js +1 -1
  236. package/dist/cli/commands/app/dev/clean.js +1 -1
  237. package/dist/cli/commands/app/dev.js +1 -1
  238. package/dist/cli/commands/app/env/pull.js +1 -1
  239. package/dist/cli/commands/app/env/show.js +1 -1
  240. package/dist/cli/commands/app/execute.js +1 -1
  241. package/dist/cli/commands/app/function/build.js +1 -1
  242. package/dist/cli/commands/app/function/info.js +1 -1
  243. package/dist/cli/commands/app/function/replay.js +1 -1
  244. package/dist/cli/commands/app/function/run.js +1 -1
  245. package/dist/cli/commands/app/function/schema.js +1 -1
  246. package/dist/cli/commands/app/function/typegen.js +1 -1
  247. package/dist/cli/commands/app/generate/extension.js +1 -1
  248. package/dist/cli/commands/app/graphiql.js +1 -0
  249. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  250. package/dist/cli/commands/app/import-extensions.js +1 -1
  251. package/dist/cli/commands/app/info.js +1 -1
  252. package/dist/cli/commands/app/init.js +1 -1
  253. package/dist/cli/commands/app/logs.js +1 -1
  254. package/dist/cli/commands/app/release.js +1 -1
  255. package/dist/cli/commands/app/versions/list.js +1 -1
  256. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  257. package/dist/cli/commands/auth/login.js +1 -1
  258. package/dist/cli/commands/auth/logout.js +1 -1
  259. package/dist/cli/commands/cache/clear.js +1 -1
  260. package/dist/cli/commands/config/autoupgrade/constants.js +1 -1
  261. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  262. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  263. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  264. package/dist/cli/commands/debug/command-flags.js +1 -1
  265. package/dist/cli/commands/doc/fetch.d.ts +12 -0
  266. package/dist/cli/commands/doc/fetch.js +1 -0
  267. package/dist/cli/commands/doc/search.d.ts +13 -0
  268. package/dist/cli/commands/doc/search.js +1 -0
  269. package/dist/cli/commands/docs/generate.js +1 -1
  270. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  271. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  272. package/dist/cli/commands/help.js +1 -1
  273. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  274. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  275. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  276. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  277. package/dist/cli/commands/notifications/generate.js +1 -1
  278. package/dist/cli/commands/notifications/list.js +1 -1
  279. package/dist/cli/commands/organization/list.js +1 -1
  280. package/dist/cli/commands/search.d.ts +4 -0
  281. package/dist/cli/commands/search.js +1 -1
  282. package/dist/cli/commands/theme/check.js +1 -1
  283. package/dist/cli/commands/theme/console.js +1 -1
  284. package/dist/cli/commands/theme/delete.js +1 -1
  285. package/dist/cli/commands/theme/dev.js +1 -1
  286. package/dist/cli/commands/theme/duplicate.js +1 -1
  287. package/dist/cli/commands/theme/info.js +1 -1
  288. package/dist/cli/commands/theme/init.js +1 -1
  289. package/dist/cli/commands/theme/language-server.js +1 -1
  290. package/dist/cli/commands/theme/list.js +1 -1
  291. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  292. package/dist/cli/commands/theme/open.js +1 -1
  293. package/dist/cli/commands/theme/package.js +1 -1
  294. package/dist/cli/commands/theme/preview.js +1 -1
  295. package/dist/cli/commands/theme/profile.js +1 -1
  296. package/dist/cli/commands/theme/publish.js +1 -1
  297. package/dist/cli/commands/theme/pull.js +1 -1
  298. package/dist/cli/commands/theme/push.js +1 -1
  299. package/dist/cli/commands/theme/rename.js +1 -1
  300. package/dist/cli/commands/theme/share.js +1 -1
  301. package/dist/cli/commands/upgrade.js +1 -1
  302. package/dist/cli/commands/version.js +1 -1
  303. package/dist/cli/help.d.ts +38 -0
  304. package/dist/cli/help.js +2 -0
  305. package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
  306. package/dist/cli/services/commands/doc/fetch.js +45 -0
  307. package/dist/cli/services/commands/doc/search.d.ts +1 -0
  308. package/dist/cli/services/commands/doc/search.js +47 -0
  309. package/dist/command-registry.js +1 -1
  310. package/dist/{conf-store-6QNH5BID.js → conf-store-C2LOYIOU.js} +1 -1
  311. package/dist/{custom-oclif-loader-TSPWW5YF.js → custom-oclif-loader-3AICQCNU.js} +1 -1
  312. package/dist/deprecations-QOHE6JG6.js +1 -0
  313. package/dist/{devtools-HCKYP7DQ.js → devtools-37DE4MUR.js} +1 -1
  314. package/dist/{devtools-VEZNCV6W.js → devtools-WAWU5KQL.js} +1 -1
  315. package/dist/dist-FF6C4ZHS.js +1 -0
  316. package/dist/dist-Q676YGVI.js +1 -0
  317. package/dist/environments-EGD263DV.js +1 -0
  318. package/dist/error-66U2HJ37.js +1 -0
  319. package/dist/error-handler-SW2ALZ5Z.js +1 -0
  320. package/dist/{estree-BYYJYS3A.js → estree-JV5M77BA.js} +1 -1
  321. package/dist/{flow-M3Q2HPQT.js → flow-N4JYPYMQ.js} +1 -1
  322. package/dist/{fs-YMUQ6JLE.js → fs-JPQRUGZI.js} +1 -1
  323. package/dist/{glimmer-3DEJJGOJ.js → glimmer-JEV3BXHR.js} +1 -1
  324. package/dist/{graphql-A4HHE3MB.js → graphql-DTF6MHYF.js} +1 -1
  325. package/dist/hooks/app-init.js +1 -1
  326. package/dist/hooks/did-you-mean.js +1 -1
  327. package/dist/hooks/hydrogen-init.js +1 -1
  328. package/dist/hooks/plugin-plugins.js +1 -1
  329. package/dist/hooks/postrun.js +1 -1
  330. package/dist/hooks/prerun.js +1 -1
  331. package/dist/hooks/public-metadata.js +1 -1
  332. package/dist/hooks/sensitive-metadata.js +1 -1
  333. package/dist/hooks/tunnel-provider.js +1 -1
  334. package/dist/hooks/tunnel-start.js +1 -1
  335. package/dist/{html-HETICZ2F.js → html-LVOJ3RQS.js} +1 -1
  336. package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
  337. package/dist/index.js +41 -7
  338. package/dist/is-global-QWTDUPNR.js +1 -0
  339. package/dist/{is-wsl-TN2CXYI7.js → is-wsl-UEMXYJPN.js} +1 -1
  340. package/dist/{latest-version-6OAYLOBL.js → latest-version-32HXMWJ7.js} +1 -1
  341. package/dist/lib-NOROGV6N.js +1 -0
  342. package/dist/lib-O5EZ4NVT.js +1 -0
  343. package/dist/lib-QJDPPAWN.js +1 -0
  344. package/dist/lib-UCG2DNMS.js +1 -0
  345. package/dist/{local-GPDAXHE6.js → local-FRYN3NWL.js} +1 -1
  346. package/dist/local-storage-DFH3LT5G.js +1 -0
  347. package/dist/{markdown-5TVCXM53.js → markdown-J6CE6POI.js} +1 -1
  348. package/dist/{meriyah-23OZNYWC.js → meriyah-PNQQZQYI.js} +1 -1
  349. package/dist/metadata-KZVLHQII.js +1 -0
  350. package/dist/{morph-I35VYPBH.js → morph-CG6HEMCQ.js} +4 -4
  351. package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
  352. package/dist/{node-package-manager-GO4ZRTKQ.js → node-package-manager-LVFBY4LY.js} +1 -1
  353. package/dist/notifications-system-DP443VTE.js +1 -0
  354. package/dist/{npa-VNALV7XY.js → npa-A4YSCQ5Q.js} +1 -1
  355. package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
  356. package/dist/out-CDCY25QC.js +1 -0
  357. package/dist/{output-7IYOMPSA.js → output-NH4I5Y3C.js} +1 -1
  358. package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
  359. package/dist/{postcss-IIK6CGAW.js → postcss-Q36SHOML.js} +1 -1
  360. package/dist/{prettier-ZSBNNQTK.js → prettier-6ZMB2MMO.js} +1 -1
  361. package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
  362. package/dist/system-GNOF6HMI.js +1 -0
  363. package/dist/tsconfig.tsbuildinfo +1 -1
  364. package/dist/typescript-5R4Y7PXE.js +1 -0
  365. package/dist/{typescript-YKZ232QT.js → typescript-WYPDGPSV.js} +1 -1
  366. package/dist/ui-QOGKADWB.js +1 -0
  367. package/dist/upgrade-K4S6JW64.js +1 -0
  368. package/dist/version-FJFTTOZU.js +1 -0
  369. package/dist/version-ZI4GZX72.js +1 -0
  370. package/dist/{workerd-ST6XJKUN.js → workerd-U6WWWY73.js} +1 -1
  371. package/dist/{yaml-SJKIH3VD.js → yaml-6KWCJ64X.js} +1 -1
  372. package/oclif.manifest.json +964 -74
  373. package/package.json +19 -9
  374. package/dist/analytics-CX22YIUZ.js +0 -1
  375. package/dist/analytics-UBWQIQYF.js +0 -1
  376. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  377. package/dist/chunk-2YXKZWYW.js +0 -1
  378. package/dist/chunk-4V4DQ6W7.js +0 -836
  379. package/dist/chunk-4ZGSSQC6.js +0 -1
  380. package/dist/chunk-6SXOUZ7V.js +0 -1
  381. package/dist/chunk-ATPFTRCC.js +0 -1
  382. package/dist/chunk-AWQ5AR2K.js +0 -5
  383. package/dist/chunk-BHWEA4V2.js +0 -1
  384. package/dist/chunk-BPVZ7E63.js +0 -1
  385. package/dist/chunk-CCEA5CUX.js +0 -1
  386. package/dist/chunk-D3DDLLNF.js +0 -2
  387. package/dist/chunk-FP2NOZSD.js +0 -1
  388. package/dist/chunk-FSTCEWXX.js +0 -1
  389. package/dist/chunk-HHXHOQQP.js +0 -3
  390. package/dist/chunk-HSYRYSX4.js +0 -3
  391. package/dist/chunk-HZA6IAA4.js +0 -1
  392. package/dist/chunk-I3LX25MB.js +0 -1
  393. package/dist/chunk-IOQQUHST.js +0 -18
  394. package/dist/chunk-IWE4RUI7.js +0 -1
  395. package/dist/chunk-K3PGC6DC.js +0 -1
  396. package/dist/chunk-KFCGMT67.js +0 -1
  397. package/dist/chunk-KLA7AWG6.js +0 -7
  398. package/dist/chunk-KQU6HOJ3.js +0 -1
  399. package/dist/chunk-MA52QGHP.js +0 -1
  400. package/dist/chunk-N5ROZKPZ.js +0 -1
  401. package/dist/chunk-NEZEHBT2.js +0 -1
  402. package/dist/chunk-NP4UFPAX.js +0 -9
  403. package/dist/chunk-OKOYLEA7.js +0 -278
  404. package/dist/chunk-OLOBQ42K.js +0 -1
  405. package/dist/chunk-PBTXPBI6.js +0 -18
  406. package/dist/chunk-PLQFX5ZP.js +0 -9
  407. package/dist/chunk-PUTZFF2Z.js +0 -613
  408. package/dist/chunk-RVMB5LC2.js +0 -1
  409. package/dist/chunk-T5MK7ZSF.js +0 -1
  410. package/dist/chunk-UOQ75BL3.js +0 -1
  411. package/dist/chunk-UWJ73J4B.js +0 -1
  412. package/dist/chunk-VPRTJUIN.js +0 -1
  413. package/dist/chunk-VT77EFRL.js +0 -10
  414. package/dist/chunk-WCWNI3ZV.js +0 -283
  415. package/dist/chunk-X4CV6TRE.js +0 -1
  416. package/dist/chunk-XEFQQPL4.js +0 -1
  417. package/dist/chunk-XFKCDWXB.js +0 -5
  418. package/dist/chunk-YJB7P2HC.js +0 -1
  419. package/dist/chunk-YOZNRLFC.js +0 -1
  420. package/dist/deprecations-F6JWVV2W.js +0 -1
  421. package/dist/dist-4BD6KOLR.js +0 -1
  422. package/dist/dist-AUABCVPI.js +0 -1
  423. package/dist/environments-RGLI75HN.js +0 -1
  424. package/dist/error-OZALZZ3U.js +0 -1
  425. package/dist/error-handler-V7LSEXHM.js +0 -1
  426. package/dist/is-global-BLIZ57HQ.js +0 -1
  427. package/dist/lib-AK5EOIKR.js +0 -1
  428. package/dist/lib-LVUMLZ4H.js +0 -1
  429. package/dist/lib-ME6554NA.js +0 -1
  430. package/dist/lib-WU3FEA6I.js +0 -1
  431. package/dist/local-storage-P66KJG6I.js +0 -1
  432. package/dist/metadata-TRH25EHU.js +0 -1
  433. package/dist/notifications-system-HM6JZ6WJ.js +0 -1
  434. package/dist/out-WLY6KV4B.js +0 -1
  435. package/dist/system-X5C4EQQH.js +0 -1
  436. package/dist/typescript-K5CWIA4V.js +0 -1
  437. package/dist/ui-H62CMRLG.js +0 -1
  438. package/dist/upgrade-EEOPH464.js +0 -1
  439. package/dist/version-76NBQR4K.js +0 -1
  440. package/dist/version-IGSEISUA.js +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- import{a as ae}from"./chunk-E2YBU6D3.js";import{a as ie,b as At}from"./chunk-OKOYLEA7.js";import"./chunk-PSQFZAF3.js";import"./chunk-N3YWHJMB.js";import{a as Ct}from"./chunk-M4LOKANA.js";import{a as ro}from"./chunk-6SXOUZ7V.js";import{a as Bt}from"./chunk-HLMFVORT.js";import{a as Qt}from"./chunk-7DVOSOEP.js";import{a as W,b as xt,c as Yt}from"./chunk-VT77EFRL.js";import{a as Dt}from"./chunk-OKNBZSGN.js";import{a as qt}from"./chunk-VA5IUGZV.js";import{a as Jt}from"./chunk-XDAOLCPN.js";import{a as Kt}from"./chunk-F6T3UBBL.js";import{a as Zt}from"./chunk-D656BV5Z.js";import{a as zt}from"./chunk-CCEA5CUX.js";import{a as oo}from"./chunk-BECEP46I.js";import{a as Mt}from"./chunk-7KJ5TBWG.js";import{a as Ht}from"./chunk-6LK6ZP3Q.js";import"./chunk-2WNODIWJ.js";import{a as Vt}from"./chunk-57N2DFIF.js";import{a as jt}from"./chunk-4Z2WYNTE.js";import"./chunk-CE6FKJFS.js";import{a as Gt}from"./chunk-AWQ5AR2K.js";import{a as no}from"./chunk-INFBVFMU.js";import{a as It}from"./chunk-FFYYJKF7.js";import{a as Wt}from"./chunk-C3LZPAAH.js";import{a as Ft}from"./chunk-NO5KVFTV.js";import"./chunk-6TEXPRI2.js";import{a as re,b as Pt}from"./chunk-PUTZFF2Z.js";import"./chunk-FD5S2O6M.js";import"./chunk-NPM3MFB3.js";import{a as nn}from"./chunk-6ZIOYXEF.js";import"./chunk-CW7WJZKR.js";import"./chunk-6YHJ554P.js";import"./chunk-DNLOSMHL.js";import{a as rn}from"./chunk-LTWXTDDR.js";import"./chunk-HJSYHK4S.js";import"./chunk-3V63X7WZ.js";import"./chunk-RAH5NW3R.js";import"./chunk-5TIJLYZU.js";import"./chunk-LKS47US7.js";import"./chunk-KLA7AWG6.js";import"./chunk-I3LX25MB.js";import"./chunk-UBKVCI7A.js";import"./chunk-IVGWFPMA.js";import"./chunk-QLQGHMVU.js";import"./chunk-FTN7Y6HD.js";import"./chunk-ZZYFG22L.js";import"./chunk-MFLBTJO7.js";import"./chunk-D3DDLLNF.js";import"./chunk-OYP7DKPU.js";import"./chunk-TXUTT6UA.js";import"./chunk-X2TC7S57.js";import"./chunk-3VZEETAV.js";import"./chunk-MA52QGHP.js";import"./chunk-IOQQUHST.js";import"./chunk-DERA4K6A.js";import"./chunk-KFCGMT67.js";import"./chunk-M4V2OQAX.js";import"./chunk-BPVZ7E63.js";import"./chunk-2YXKZWYW.js";import"./chunk-2KH2S7PI.js";import"./chunk-QFWIDATO.js";import"./chunk-7BFDUVOG.js";import{b as on}from"./chunk-L2VSSINY.js";import"./chunk-MZJRNFAU.js";import"./chunk-HHXHOQQP.js";import"./chunk-TLSAQ6FG.js";import"./chunk-LQMSF3F7.js";import"./chunk-C6ABJCRG.js";import"./chunk-UWJ73J4B.js";import"./chunk-YGMVL6NZ.js";import"./chunk-YOZNRLFC.js";import"./chunk-NBYS6YQ2.js";import"./chunk-XEFQQPL4.js";import"./chunk-WNGV4JQS.js";import"./chunk-RL5BWZ7D.js";import"./chunk-VYXVYOIJ.js";import"./chunk-NEZEHBT2.js";import"./chunk-UOQQNAHX.js";import"./chunk-FGVC22EY.js";import"./chunk-NKQBEFPS.js";import{a as to}from"./chunk-SSM346XI.js";import{a as $t}from"./chunk-UURFVUAH.js";import"./chunk-WDC3KIZT.js";import{a as Lt}from"./chunk-IXUVSFW2.js";import"./chunk-U3ZG675O.js";import{a as Ut}from"./chunk-OLOBQ42K.js";import{a as yt}from"./chunk-K7K6GNF6.js";import{a as mt}from"./chunk-R6JNXEB3.js";import{a as Tt}from"./chunk-C2FFA4O4.js";import"./chunk-UOQ75BL3.js";import"./chunk-DCBYHVKW.js";import{a as Nt}from"./chunk-X4CV6TRE.js";import{a as Rt}from"./chunk-PLQFX5ZP.js";import{a as _t}from"./chunk-XFKCDWXB.js";import"./chunk-HSYRYSX4.js";import"./chunk-IWE4RUI7.js";import"./chunk-LCCMXY6N.js";import{a as Et}from"./chunk-A6X2IVGT.js";import{a as Ot}from"./chunk-OA4P6AKS.js";import"./chunk-T5MK7ZSF.js";import"./chunk-DCK2FX6J.js";import{t as bt}from"./chunk-WCWNI3ZV.js";import"./chunk-42RMKTCJ.js";import"./chunk-A3VYI4LO.js";import"./chunk-VBUZWRUL.js";import{a as wt,c as vt}from"./chunk-VICNWPLQ.js";import"./chunk-RGNAWKD7.js";import"./chunk-IWCPQD7X.js";import"./chunk-TNQXTZAX.js";import"./chunk-QSTEVZFQ.js";import{e as Y}from"./chunk-N5ROZKPZ.js";import"./chunk-AP3RFOPL.js";import{a as ct}from"./chunk-K3PGC6DC.js";import{a as at}from"./chunk-UCLSPAVX.js";import"./chunk-KU5OPV7U.js";import"./chunk-4ZGSSQC6.js";import{a as st}from"./chunk-6AJZKIZ3.js";import"./chunk-K77WAKOB.js";import{a as ht}from"./chunk-3BRUCKZ2.js";import{a as ft}from"./chunk-TGACBJIY.js";import"./chunk-MKE434RB.js";import{a as kt}from"./chunk-F47MFBKM.js";import{a as St}from"./chunk-2VLMN5QZ.js";import"./chunk-OCOY5MV2.js";import{a as Xe}from"./chunk-RVMB5LC2.js";import{a as nt}from"./chunk-MIO2CV3Q.js";import{a as ot}from"./chunk-KQU6HOJ3.js";import{a as gt}from"./chunk-XXE7667M.js";import{a as rt}from"./chunk-PS25FEBF.js";import{a as pt}from"./chunk-J6VTZEE2.js";import{a as dt}from"./chunk-XX343DDG.js";import{a as it}from"./chunk-23AMFHXC.js";import"./chunk-NXL6LDJU.js";import{a as Xt}from"./chunk-FSTCEWXX.js";import{a as eo}from"./chunk-ATPFTRCC.js";import"./chunk-FP2NOZSD.js";import{a as dn}from"./chunk-FQDRVPCY.js";import{d as cn}from"./chunk-HD5TYIDZ.js";import{a as lt}from"./chunk-M2TJICTB.js";import{a as et}from"./chunk-NP4UFPAX.js";import{a as tt}from"./chunk-2EJCY4CE.js";import"./chunk-TQGTEVSR.js";import"./chunk-GVITHCQJ.js";import"./chunk-QTGMS62F.js";import{G as oe,P as T,ea as Ae,fa as G,g as en,n as xe,na as be,pa as B,z as b}from"./chunk-4V4DQ6W7.js";import"./chunk-4LNCYIS3.js";import"./chunk-WUK5NQSX.js";import"./chunk-PRKBO42R.js";import"./chunk-LITB5QQX.js";import"./chunk-YJB7P2HC.js";import"./chunk-6HZTMQD6.js";import{a as tn}from"./chunk-2N4O33VM.js";import{a as ut,b as F,c as P}from"./chunk-4KRT35A2.js";import"./chunk-3TNEIDOD.js";import{c as se,d as sn}from"./chunk-FBVBO5YQ.js";import{b as je}from"./chunk-A5SQCM63.js";import{b as ne}from"./chunk-VEDZUOVI.js";import"./chunk-MOA33ZFO.js";import{a as Ve,c as te}from"./chunk-JUVAGMIH.js";import{E as M,J as Je,P as Ke,u as Qe,v as Q,y as Ye}from"./chunk-MGL4YM3S.js";import"./chunk-YS6VOQ7I.js";import"./chunk-KLMDWDT2.js";import"./chunk-5CH3B62S.js";import"./chunk-QUTQDXSL.js";import{d as Ge,e as Be}from"./chunk-6YAXFS6V.js";import{c as We,d as s,g as H}from"./chunk-BHWEA4V2.js";import{a as V,b as an}from"./chunk-PBTXPBI6.js";import"./chunk-Z35BTAM6.js";import"./chunk-75VPUOC5.js";import"./chunk-HZA6IAA4.js";import"./chunk-PD5ZHJWI.js";import{r as ee}from"./chunk-3YWUSKWF.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-H4W4DFKK.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-XP6IRAZN.js";import"./chunk-4EXYYBQ6.js";import{Fb as a,Hb as c,Lb as v,Mb as L,N as Me,Ob as Ze,Pb as m,Ta as ve,_ as ye,ma as we,ua as He}from"./chunk-VPL2NDH6.js";import"./chunk-7JESXDF2.js";import"./chunk-5Y7GIF2W.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-UARVYVLN.js";import"./chunk-ULQG3XQS.js";import{f as X}from"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import{e as z,g as i}from"./chunk-VPRTJUIN.js";i();var Zo=z(tn(),1);i();i();i();i();var D="7e9cb568cfd431c538f36d1ad3f2b4f6";var ce="/auth/callback";function io(e){return`http://127.0.0.1:${e}${ce}`}function J(e){return`${D}::${e}`}function y(e){return e.length<=10?"***":`${e.slice(0,10)}***`}i();var Te;function Ne(){return Te??(Te=new je({projectName:"shopify-cli-store"})),Te}function w(e){return typeof e=="string"}function ao(e){if(!e||typeof e!="object")return;let t=e;if(typeof t.id=="number")return{id:t.id,...w(t.email)?{email:t.email}:{},...w(t.firstName)?{firstName:t.firstName}:{},...w(t.lastName)?{lastName:t.lastName}:{},...typeof t.accountOwner=="boolean"?{accountOwner:t.accountOwner}:{}}}function un(e){if(!e||typeof e!="object")return;let t=e;if(!(!w(t.store)||!w(t.clientId)||!w(t.userId)||!w(t.accessToken)||!Array.isArray(t.scopes)||!t.scopes.every(w)||!w(t.acquiredAt)))return{store:t.store,clientId:t.clientId,userId:t.userId,accessToken:t.accessToken,scopes:t.scopes,acquiredAt:t.acquiredAt,...w(t.refreshToken)?{refreshToken:t.refreshToken}:{},...w(t.expiresAt)?{expiresAt:t.expiresAt}:{},...w(t.refreshTokenExpiresAt)?{refreshTokenExpiresAt:t.refreshTokenExpiresAt}:{},...ao(t.associatedUser)?{associatedUser:ao(t.associatedUser)}:{}}}function _e(e,t){let o=J(e),n=t.get(o);if(!n||typeof n!="object")return;let{sessionsByUserId:r,currentUserId:u}=n;if(!r||typeof r!="object"||Array.isArray(r)||typeof u!="string"){t.delete(o);return}let d=Object.fromEntries(Object.entries(r).flatMap(([p,g])=>{let l=un(g);return l?[[p,l]]:[]}));if(Object.keys(d).length!==Object.keys(r).length)if(d[u])t.set(o,{currentUserId:u,sessionsByUserId:d});else{t.delete(o);return}return{currentUserId:u,sessionsByUserId:d}}function de(e,t=Ne()){let o=_e(e,t);if(!o)return;let n=o.sessionsByUserId[o.currentUserId];if(!n){t.delete(J(e));return}return n}function ue(e,t=Ne()){let o=J(e.store),n=_e(e.store,t),r={currentUserId:e.userId,sessionsByUserId:{...n?.sessionsByUserId??{},[e.userId]:e}};t.set(o,r)}function K(e,t,o){let n=typeof t=="string"?t:void 0,r=(typeof t=="string"?o:t)??Ne(),u=J(e);if(!n){r.delete(u);return}let d=_e(e,r);if(!d)return;let{[n]:p,...g}=d.sessionsByUserId,l=Object.keys(g);if(l.length===0){r.delete(u);return}r.set(u,{currentUserId:d.currentUserId===n?l[0]:d.currentUserId,sessionsByUserId:g})}i();function so(e,t=300){return e.slice(0,t)}async function co(e){let t=`https://${e.store}/admin/oauth/access_token`;m(c`Exchanging authorization code for token at ${a.raw(t)}`);let o=await xe(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:D,code:e.code,code_verifier:e.codeVerifier,redirect_uri:e.redirectUri})}),n=await o.text();if(!o.ok)throw m(c`Token exchange failed with HTTP ${a.raw(String(o.status))}: ${a.raw(so(n||o.statusText))}`),new s(`Failed to exchange OAuth code for an access token (HTTP ${o.status}).`,n||o.statusText);let r;try{r=JSON.parse(n)}catch{throw new s("Received an invalid token response from Shopify.")}return m(c`Token exchange succeeded: access_token=${a.raw(y(r.access_token))}, refresh_token=${a.raw(r.refresh_token?y(r.refresh_token):"none")}, expires_in=${a.raw(String(r.expires_in??"unknown"))}s, user=${a.raw(String(r.associated_user?.id??"unknown"))} (${a.raw(r.associated_user?.email??"no email")})`),r}async function uo(e){let t=`https://${e.store}/admin/oauth/access_token`;m(c`Refreshing access token for ${a.raw(e.store)} using refresh_token=${a.raw(y(e.refreshToken))}`);let o=await xe(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:D,grant_type:"refresh_token",refresh_token:e.refreshToken})}),n=await o.text();if(!o.ok)throw m(c`Token refresh failed with HTTP ${a.raw(String(o.status))}: ${a.raw(so(n||o.statusText))}`),new s(`Token refresh failed for ${e.store} (HTTP ${o.status}).`);let r;try{r=JSON.parse(n)}catch{throw new s("Received an invalid refresh response from Shopify.")}if(!r.access_token)throw new s(`Token refresh returned an invalid response for ${e.store}.`);return{accessToken:r.access_token,refreshToken:r.refresh_token,expiresIn:r.expires_in,refreshTokenExpiresIn:r.refresh_token_expires_in}}var mn=`#graphql
1
+ import{a as He,b as Jo}from"./chunk-ZIXWWU2N.js";import"./chunk-EKHWL542.js";import{a as Be}from"./chunk-TC3JOEMA.js";import"./chunk-XWPPBOGF.js";import{a as dr}from"./chunk-GBZL4TTY.js";import{a as xr}from"./chunk-75LJTY7F.js";import{a as _r}from"./chunk-SP2WUATO.js";import{a as Tr}from"./chunk-IPQH2RHD.js";import{a as nr}from"./chunk-F5QG42MA.js";import{a as Fr}from"./chunk-4N6YTHFD.js";import{a as yr}from"./chunk-YLGSM42I.js";import{a as kr}from"./chunk-DLNBTHKL.js";import{a as Qo,b as Yo,c as lr}from"./chunk-APN3VWN4.js";import{a as Pr}from"./chunk-Y66GQ6V2.js";import{a as wr}from"./chunk-FZKKKGUJ.js";import{a as vr}from"./chunk-AT2GDXN7.js";import{a as G,b as St,c as br}from"./chunk-WNWQSHEC.js";import{a as sr}from"./chunk-5QWYIBE6.js";import{a as cr}from"./chunk-IG6LPVS4.js";import"./chunk-FKIVKNOV.js";import{a as ur}from"./chunk-LOQIRLTD.js";import"./chunk-SKLUHLS2.js";import{a as pr}from"./chunk-2EROVVCL.js";import{a as fr}from"./chunk-RF6NUGCU.js";import{a as Or}from"./chunk-IIOIDMG3.js";import{a as hr}from"./chunk-V3RZ3DTW.js";import{a as gr}from"./chunk-VFWWZMOQ.js";import"./chunk-HA6NISOZ.js";import{a as Sr}from"./chunk-CD5O2BIT.js";import"./chunk-7UOPCYMV.js";import{a as er}from"./chunk-3OZ6ZZ4T.js";import{a as tr}from"./chunk-TJGUNVRI.js";import{a as rr}from"./chunk-Z74QYLNC.js";import{a as or}from"./chunk-G2S346IS.js";import{a as Ar}from"./chunk-BIMOHK2P.js";import{a as ir}from"./chunk-DZLA2RJP.js";import"./chunk-V6ZSIUO3.js";import{a as ze,b as ar}from"./chunk-HZMP62GK.js";import"./chunk-KSZ5K6LJ.js";import"./chunk-UOHNRH6E.js";import"./chunk-H6WN7GP4.js";import"./chunk-Z4LC3WE5.js";import"./chunk-4TST2MNC.js";import"./chunk-J7UQBC45.js";import"./chunk-X4DIJTIK.js";import{a as bi}from"./chunk-TKG42KLM.js";import"./chunk-MFLQRQQT.js";import{a as Ai}from"./chunk-VQW35HIQ.js";import"./chunk-B7S23DLF.js";import"./chunk-FA4K3JRN.js";import"./chunk-NADNFSKS.js";import"./chunk-IX4KP6E3.js";import"./chunk-J3JPJCWP.js";import"./chunk-YQH2JHFA.js";import"./chunk-PZYP3MCL.js";import"./chunk-DO2SHYFU.js";import"./chunk-BCD4KTLJ.js";import"./chunk-VOJWKGCW.js";import"./chunk-6DIHOMCB.js";import"./chunk-LOHUNOQ7.js";import"./chunk-OORCODNK.js";import{b as vi}from"./chunk-67KMRBSZ.js";import"./chunk-DQ4HA72R.js";import"./chunk-3CYHS4W2.js";import"./chunk-2NWWMNU5.js";import"./chunk-KRZABRYT.js";import"./chunk-OQORDQLH.js";import"./chunk-QMXKGSFH.js";import"./chunk-733R5OKQ.js";import"./chunk-YGKQCEVG.js";import"./chunk-HZSAUZBX.js";import"./chunk-J3HXFQ2L.js";import"./chunk-CZXGQ53M.js";import"./chunk-STJ3LWFL.js";import"./chunk-6YPEONHB.js";import"./chunk-PJYNAUQB.js";import{a as q,b as Po,c as te,d as ge,e as Ue}from"./chunk-D6YDSGR4.js";import"./chunk-GFCLUGAG.js";import"./chunk-NWDP5IZ2.js";import"./chunk-CPE7XCC6.js";import"./chunk-O6KTFMCD.js";import"./chunk-Q7BOSHWX.js";import"./chunk-G2I2ZUBV.js";import"./chunk-MZMYBFZQ.js";import"./chunk-ZEENHLSC.js";import"./chunk-VE35YELD.js";import"./chunk-5JNEWYD5.js";import"./chunk-TU47HMTL.js";import"./chunk-6RL7FUPD.js";import"./chunk-TYMYIUIQ.js";import"./chunk-73W5BGAZ.js";import"./chunk-ZIREP3EZ.js";import"./chunk-ZULTG2D2.js";import"./chunk-ZI7LK3LW.js";import{a as Nr}from"./chunk-WVHB2HCQ.js";import{a as Eo}from"./chunk-ZZFZBFVM.js";import{a as No}from"./chunk-WAGAC3YI.js";import{a as Oo}from"./chunk-QJ7TI6CK.js";import"./chunk-GCN4O7HM.js";import{a as wo}from"./chunk-NY5OGHM5.js";import{a as Xo}from"./chunk-GKRCTMWY.js";import"./chunk-MQICT2LR.js";import"./chunk-2MMGFZDP.js";import{a as Zo}from"./chunk-UUC5YKAS.js";import{a as mr}from"./chunk-SWI3LCPE.js";import"./chunk-UYK6CXAU.js";import{a as Ie,b as Fo,c as Se,e as ye,f as Ee,g as Co,h as Do,i as Lo,j as Ro,k as qo,l as $o,m as Me,n as Uo,o as Mo,p as zo,q as Ho,r as Bo,s as Go}from"./chunk-AY4GIVME.js";import"./chunk-JOZXRV5K.js";import"./chunk-HM5H7WBE.js";import"./chunk-ZAMDXIVC.js";import"./chunk-UMT7DWR4.js";import{a as Ao}from"./chunk-DHBYYHBT.js";import{a as ko}from"./chunk-RYGZCBO4.js";import{a as ho}from"./chunk-XV3I45NA.js";import{a as yo}from"./chunk-PUAMSBXS.js";import"./chunk-ZQ5JVD5X.js";import{a as go}from"./chunk-QS3FMN67.js";import"./chunk-5QQN3SKH.js";import"./chunk-VUMUCNI7.js";import{a as So}from"./chunk-PETINPMX.js";import"./chunk-POAICASX.js";import{a as To}from"./chunk-OAI7VSLW.js";import{a as _o}from"./chunk-GTUKM3ZW.js";import"./chunk-45MEVWH5.js";import{a as mo}from"./chunk-3FBSBMSQ.js";import"./chunk-7EJ4UVYI.js";import{a as ao}from"./chunk-WZVQHMGI.js";import{a as lo}from"./chunk-Y3WIZSRU.js";import{a as po}from"./chunk-LCPD2BYX.js";import{a as Io}from"./chunk-7SVMAJTR.js";import{a as fo}from"./chunk-B7BUEEBR.js";import{a as vo}from"./chunk-WLO5H255.js";import{a as bo}from"./chunk-C3CVLSLS.js";import"./chunk-U73TPLFE.js";import{a as Ir}from"./chunk-QPN2M26G.js";import{t as Ko}from"./chunk-ATXODH6C.js";import"./chunk-XH6ZP7M5.js";import"./chunk-VDN6MEYI.js";import"./chunk-VJEKDBGZ.js";import"./chunk-GUO7S4NW.js";import{a as Vo,b as jo,d as Wo}from"./chunk-442S5SDM.js";import"./chunk-T5GSCWN5.js";import"./chunk-F3TMLDLC.js";import"./chunk-IWOTLFOY.js";import{e as ce}from"./chunk-G24L7MB3.js";import"./chunk-J2WCMQZZ.js";import"./chunk-5GVXMNC4.js";import"./chunk-YYL356OX.js";import{a as Er}from"./chunk-I73E3BD5.js";import"./chunk-J5TNYNR5.js";import{a as Ii}from"./chunk-7LATYPLU.js";import{G as D,P as L,ea as le,fa as se,g as ki,n as mt,na as ft,o as pt,pa as de,v as lt,z as E}from"./chunk-5W443CKL.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-GW3VY3FZ.js";import"./chunk-KN3FTJDU.js";import{a as dt}from"./chunk-FU232KQ7.js";import{d as Ti}from"./chunk-PMXCJIBP.js";import"./chunk-SXTDVUT3.js";import{a as xo}from"./chunk-JAW32T6G.js";import{a as uo}from"./chunk-HZYRCG4R.js";import{a as wi}from"./chunk-GDHD3TGC.js";import"./chunk-T7KHS6RF.js";import{a as so,b as y,c as T,d as co}from"./chunk-H5C3QTOO.js";import{c as Ge,d as _i}from"./chunk-HCN6HXA5.js";import{b as Yt}from"./chunk-47MGPVED.js";import{b as he}from"./chunk-UKK5P74A.js";import"./chunk-WW7TENNA.js";import{a as Qt,c as pe}from"./chunk-5C7HDTHJ.js";import{B as eo,C as fe,E as R,F as to,I as oo,J as $e,P as no,a as Wt,u as _,v as b,w as Te,x as Z,y as Xt,z as Zt}from"./chunk-6EZ7JWBK.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-FPLUMESQ.js";import{d as Jt,e as Kt}from"./chunk-WRRUFK4Y.js";import{c as ro,d,g as ee}from"./chunk-WKBVT5WG.js";import{Fb as s,Hb as c,Lb as v,Mb as P,N as Vt,Ob as io,Pb as f,Qb as ht,Rb as gt,Ta as _e,W as jt,_ as Ae,ca as ct,ha as ut,ma as xe,ua as Re}from"./chunk-DONEJHDG.js";import{u as qe}from"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-KKUDXLK2.js";import"./chunk-NNOSZ447.js";import{f as ie}from"./chunk-773TIA5M.js";import{a as ke,b as xi}from"./chunk-LKZ7ARYS.js";import"./chunk-AAK376RT.js";import"./chunk-P2OI2P2M.js";import"./chunk-636CTEW7.js";import{r as ae}from"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import{e as B,g as n}from"./chunk-VKWPEFWQ.js";n();var Si=B(wi(),1);n();n();n();n();function yt(e){return Po(e).map(t=>({store:t.store,userId:t.userId,scopes:t.scopes,acquiredAt:t.acquiredAt,...t.expiresAt?{expiresAt:t.expiresAt}:{},...t.refreshTokenExpiresAt?{refreshTokenExpiresAt:t.refreshTokenExpiresAt}:{},...t.associatedUser?{associatedUser:t.associatedUser}:{}})).sort((t,o)=>o.acquiredAt.localeCompare(t.acquiredAt)||t.store.localeCompare(o.store))}function Cr(){return{sessions:yt().map(e=>({kind:"store",store:e.store,userId:e.userId,scopes:e.scopes,connectedAt:e.acquiredAt,...e.expiresAt?{expiresAt:e.expiresAt}:{},...e.refreshTokenExpiresAt?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...e.associatedUser?{associatedUser:e.associatedUser}:{}}))}}n();n();var Ei=new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"short",day:"2-digit",year:"numeric"});function Ve(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?"":Ei.format(t)}function je(e){let t=G(e);if(t)return t.split(".")[0]}function Dr(e,t){if(t==="json"){v(JSON.stringify(Ni(e),null,2));return}Oi(e)}function Ni(e){return{sessions:e.sessions.map(Lr),...e.sessions.length===0?{message:Rr()}:{}}}function Oi(e){if(e.sessions.length===0){P(Rr());return}fe({rows:e.sessions.map(Lr),columns:{subdomain:{header:"Subdomain"},connected:{header:"Connected"}}})}function Lr(e){return{subdomain:je(e.store)??e.store,connected:Ve(e.connectedAt)}}function Rr(){return["No stores are authenticated directly with `shopify store auth`.","","Run `shopify store auth --store <domain> --scopes <scopes>` to authenticate a store.","Run `shopify store list` to list stores in a Shopify organization."].join(`
2
+ `)}var kt,$=class extends he{async run(){let{flags:t}=await this.parse(kt),o=Cr();Dr(o,t.json?"json":"text")}};kt=$;$.hidden=!0;$.summary="List stores authenticated directly with store auth.";$.descriptionWithMarkdown="Lists stores authenticated directly on this machine with `shopify store auth`.\n\nUse this command to find stores that can be used with store-authenticated commands such as `shopify store execute`.\nTo list stores in a Shopify organization, run `shopify store list`.";$.description=kt.descriptionWithoutMarkdown();$.examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --json"];$.flags={...y,...T};var qr=$;n();n();n();var $r=13387,We="/auth/callback";function Ur(e){return`http://127.0.0.1:${e}${We}`}function F(e){return e.length<=10?"***":`${e.slice(0,10)}***`}n();function Mr(e,t=300){return e.slice(0,t)}async function zr(e){let t=`https://${e.store}/admin/oauth/access_token`;f(c`Exchanging authorization code for token at ${s.raw(t)}`);let o=await mt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:q,code:e.code,code_verifier:e.codeVerifier,redirect_uri:e.redirectUri})}),r=await o.text();if(!o.ok)throw f(c`Token exchange failed with HTTP ${s.raw(String(o.status))}: ${s.raw(Mr(r||o.statusText))}`),new d(`Failed to exchange OAuth code for an access token (HTTP ${o.status}).`,r||o.statusText);let i;try{i=JSON.parse(r)}catch{throw new d("Received an invalid token response from Shopify.")}return f(c`Token exchange succeeded: access_token=${s.raw(F(i.access_token))}, refresh_token=${s.raw(i.refresh_token?F(i.refresh_token):"none")}, expires_in=${s.raw(String(i.expires_in??"unknown"))}s, user=${s.raw(String(i.associated_user?.id??"unknown"))} (${s.raw(i.associated_user?.email??"no email")})`),i}async function Hr(e){let t=`https://${e.store}/admin/oauth/access_token`;f(c`Refreshing access token for ${s.raw(e.store)} using refresh_token=${s.raw(F(e.refreshToken))}`);let o=await mt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:q,grant_type:"refresh_token",refresh_token:e.refreshToken})}),r=await o.text();if(!o.ok)throw f(c`Token refresh failed with HTTP ${s.raw(String(o.status))}: ${s.raw(Mr(r||o.statusText))}`),new d(`Token refresh failed for ${e.store} (HTTP ${o.status}).`);let i;try{i=JSON.parse(r)}catch{throw new d("Received an invalid refresh response from Shopify.")}if(!i.access_token)throw new d(`Token refresh returned an invalid response for ${e.store}.`);return{accessToken:i.access_token,refreshToken:i.refresh_token,expiresIn:i.expires_in,refreshTokenExpiresIn:i.refresh_token_expires_in}}var Pi=`#graphql
2
3
  query CurrentAppInstallationAccessScopes {
3
4
  currentAppInstallation {
4
5
  accessScopes {
@@ -6,7 +7,7 @@ import{a as ae}from"./chunk-E2YBU6D3.js";import{a as ie,b as At}from"./chunk-OKO
6
7
  }
7
8
  }
8
9
  }
9
- `;async function mo(e){m(c`Fetching current app installation scopes for ${a.raw(e.store)} using token ${a.raw(y(e.accessToken))}`);let t=await G({query:mn,api:"Admin",url:Y(e.store,"unstable"),token:e.accessToken,responseOptions:{handleErrors:!1}});if(!Array.isArray(t.currentAppInstallation?.accessScopes))throw new Error("Shopify did not return currentAppInstallation.accessScopes.");return t.currentAppInstallation.accessScopes.flatMap(o=>typeof o.handle=="string"?[o.handle]:[])}i();i();function pn(e,t){return{command:`shopify store auth --store ${e} --scopes ${t}`}}function Ee(e,t){return[[pn(e,t)]]}function po(e){throw new s(`No stored app authentication found for ${e}.`,"To create stored auth for this store, run:",Ee(e,"<comma-separated-scopes>"))}function R(e,t,o){throw new s(e,"To re-authenticate, run:",Ee(t,o))}function lo(e){return new s("OAuth callback store does not match the requested store.",`Shopify returned ${e} during authentication. Re-run using the permanent store domain:`,Ee(e,"<comma-separated-scopes>"))}import{timingSafeEqual as ln}from"crypto";import{createServer as fn}from"http";function fo(e,t){let o=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),n=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return`<!doctype html>
10
+ `;async function Br(e){f(c`Fetching current app installation scopes for ${s.raw(e.store)} using token ${s.raw(F(e.accessToken))}`);let t=await se({query:Pi,api:"Admin",url:ce(e.store,"unstable"),token:e.accessToken,responseOptions:{handleErrors:!1}});if(!Array.isArray(t.currentAppInstallation?.accessScopes))throw new Error("Shopify did not return currentAppInstallation.accessScopes.");return t.currentAppInstallation.accessScopes.flatMap(o=>typeof o.handle=="string"?[o.handle]:[])}n();n();var wt="<comma-separated-scopes>";function Gr(e,t){return{command:`shopify store auth --store ${e} --scopes ${t}`}}function Fi(e){return[[Gr(e,wt)]]}function Vr(e,t,o){return[["Run",Gr(e,t),o]]}function Ci(e){return e.kind==="preview"?wt:e.scopes.join(",")}function jr(e){throw new d(`No stored app authentication found for ${e}.`,void 0,Vr(e,wt,"to authenticate"))}function Ne(e,t){throw new d(e,void 0,Vr(t.store,Ci(t),"to re-authenticate"))}function Qe(e){let t=e.kind==="preview"?`The preview store ${e.store} has likely been claimed, so its stored authentication is no longer valid.`:`Stored app authentication for ${e.store} is no longer valid.`;Ne(t,e)}function Wr(e){return new d("OAuth callback store does not match the requested store.",`Shopify returned ${e} during authentication. Re-run using the permanent store domain:`,Fi(e))}import{timingSafeEqual as Di}from"crypto";import{createServer as Li}from"http";function Qr(e,t){let o=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),r=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return`<!doctype html>
10
11
  <html lang="en">
11
12
  <head>
12
13
  <meta charset="utf-8" />
@@ -71,18 +72,51 @@ import{a as ae}from"./chunk-E2YBU6D3.js";import{a as ie,b as At}from"./chunk-OKO
71
72
  <header class="header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 28" width="80" height="90"><path fill="#95BF47" fill-rule="evenodd" d="M17.836 27.059l-.062-23.736c-.16-.16-.472-.112-.594-.076l-.813.252a5.675 5.675 0 00-.39-.957c-.576-1.1-1.42-1.682-2.44-1.683h-.003c-.068 0-.136.006-.204.012h-.008a2.234 2.234 0 00-.092-.105C12.786.29 12.216.059 11.533.079c-1.318.038-2.63.99-3.693 2.679-.75 1.19-1.318 2.683-1.48 3.84L3.767 7.4c-.764.24-.788.263-.888.982C2.803 8.928.806 24.377.806 24.377l16.743 2.895.287-.213zM12.35 1.163a1.347 1.347 0 00-.792-.208c-2.033.06-3.807 3.235-4.26 5.352l1.949-.604.347-.107c.255-1.344.896-2.738 1.733-3.636a3.821 3.821 0 011.023-.797zm-1.793 4.135l2.796-.866c.009-.728-.07-1.805-.435-2.565-.388.16-.715.44-.95.691-.628.675-1.14 1.705-1.41 2.74zM14.23 4.16l1.299-.403c-.208-.674-.7-1.805-1.7-1.994.311.802.391 1.73.4 2.397z" clip-rule="evenodd"/><path fill="#5E8E3E" d="M21.587 5.088c-.099-.008-2.035-.037-2.035-.037s-1.619-1.573-1.778-1.733a.399.399 0 00-.225-.103v24.053l7.256-1.804S21.844 5.447 21.825 5.31a.263.263 0 00-.238-.222z"/><path fill="#fff" d="M13.528 8.824l-.843 3.153s-.94-.429-2.054-.358c-1.635.103-1.652 1.134-1.636 1.392.09 1.41 3.799 1.718 4.008 5.021.163 2.599-1.379 4.376-3.601 4.516-2.667.169-4.135-1.405-4.135-1.405l.565-2.404s1.478 1.115 2.66 1.04c.773-.048 1.05-.677 1.021-1.121-.116-1.84-3.137-1.731-3.328-4.754-.16-2.544 1.51-5.12 5.196-5.353 1.42-.09 2.147.273 2.147.273"/></svg></header>
72
73
  <main class="card">
73
74
  <h1>${o}</h1>
74
- <p>${n}</p>
75
+ <p>${r}</p>
75
76
  </main>
76
77
  </div>
77
78
  </body>
78
- </html>`}async function ho({store:e,state:t,port:o,timeoutMs:n=300*1e3,onListening:r}){let u=b(e);return new Promise((d,p)=>{let g=!1,l=!1,x=setTimeout(()=>{A(new s("Timed out waiting for OAuth callback."))},n),h=fn((S,f)=>{let he=new URL(S.url??"/",`http://127.0.0.1:${o}`);if(he.pathname!==ce){f.statusCode=404,f.end("Not found");return}let{searchParams:Z}=he,j=(Se,Xo)=>{let ze=typeof Se=="string"?new s(Se,Xo):Se;f.statusCode=400,f.setHeader("Content-Type","text/html"),f.setHeader("Connection","close"),f.once("finish",()=>A(ze)),f.end(fo("Authentication failed",ze.message))},ge=Z.get("shop");if(m(c`Received OAuth callback for shop ${a.raw(ge??"unknown")}`),!ge){j("OAuth callback store does not match the requested store.");return}let Le=b(ge);if(Le!==u){j(lo(Le));return}let Re=Z.get("state");if(!Re||!hn(Re,t)){j("OAuth callback state does not match the original request.");return}let Ue=Z.get("error");if(Ue){j(`Shopify returned an OAuth error: ${Ue}`);return}let ke=Z.get("code");if(!ke){j("OAuth callback did not include an authorization code.");return}m(c`Received authorization code ${a.raw(y(ke))}`),f.statusCode=200,f.setHeader("Content-Type","text/html"),f.setHeader("Connection","close"),f.once("finish",()=>k(()=>d(ke))),f.end(fo("Authentication succeeded","Close this window and return to the terminal"))}),k=S=>{if(g)return;g=!0,clearTimeout(x);let f=()=>{S()};if(!l){f();return}h.close(()=>{l=!1,f()}),h.closeIdleConnections?.()},A=S=>{k(()=>p(S))};h.on("error",S=>{if(S.code==="EADDRINUSE"){A(new s(`Port ${o} is already in use.`,`Free port ${o} and re-run ${a.genericShellCommand(`shopify store auth --store ${e} --scopes <comma-separated-scopes>`).value}. Ensure that redirect URI is allowed in the app configuration.`));return}A(S)}),h.listen(o,"127.0.0.1",()=>{l=!0,m(c`PKCE callback server listening on http://127.0.0.1:${a.raw(String(o))}${a.raw(ce)}`),r&&Promise.resolve(r()).catch(S=>{A(S instanceof Error?S:new Error(String(S)))})})})}function hn(e,t){return e.length!==t.length?!1:ln(Buffer.from(e,"utf8"),Buffer.from(t,"utf8"))}i();import{createHash as kn,randomBytes as Sn}from"crypto";function yn(){return Sn(32).toString("base64url")}function wn(e){return kn("sha256").update(e).digest("base64url")}function vn(e){let t=new URLSearchParams;return t.set("client_id",D),t.set("scope",e.scopes.join(",")),t.set("redirect_uri",e.redirectUri),t.set("state",e.state),t.set("response_type","code"),t.set("code_challenge",e.codeChallenge),t.set("code_challenge_method","S256"),`https://${e.store}/admin/oauth/authorize?${t.toString()}`}function go(e){let{store:t,scopes:o,exchangeCodeForToken:n}=e,r=13387,u=te(),d=io(r),p=yn(),g=wn(p),l=vn({store:t,scopes:o,state:u,redirectUri:d,codeChallenge:g});return m(c`Starting PKCE auth for ${a.raw(t)} with scopes ${a.raw(o.join(","))} (redirect_uri=${a.raw(d)})`),{authorization:{store:t,scopes:o,state:u,port:r,redirectUri:d,authorizationUrl:l,codeVerifier:p},waitForAuthCodeOptions:{store:t,state:u,port:r},exchangeCodeForToken:x=>n({store:t,code:x,codeVerifier:p,redirectUri:d})}}i();function Oe(e){let t=e.split(/[ ,]+/).filter(Boolean);if(t.length===0)throw new s("At least one scope is required.","Pass --scopes as a comma-separated list.");return Me(t)}function Ie(e){let t=new Set(e);for(let o of e){let n=o.match(/^(unauthenticated_)?write_(.*)$/);n&&t.add(`${n[1]??""}read_${n[2]}`)}return t}function ko(e,t){let o=[...t],n=Ie(t);for(let r of e)if(!n.has(r)){o.push(r);for(let u of Ie([r]))n.add(u)}return o}function So(e,t){if(!e.scope)return m(c`Token response did not include scope; falling back to requested scopes`),t;let o=Oe(e.scope),n=Ie(o),r=t.filter(u=>!n.has(u));if(r.length>0)throw new s("Shopify granted fewer scopes than were requested.",`Missing scopes: ${r.join(", ")}.`,["Update the app or store installation scopes.","See https://shopify.dev/app/scopes","Re-run shopify store auth."]);return o}i();i();var xn=240*1e3;function An(e){if(!e.expiresAt)return!1;let t=new Date(e.expiresAt).getTime();return Number.isNaN(t)?!0:t-xn<Date.now()}function bn(e,t){let o=Date.now(),n=t.expiresIn?new Date(o+t.expiresIn*1e3).toISOString():e.expiresAt;return{...e,accessToken:t.accessToken,refreshToken:t.refreshToken??e.refreshToken,expiresAt:n,refreshTokenExpiresAt:t.refreshTokenExpiresIn?new Date(o+t.refreshTokenExpiresIn*1e3).toISOString():e.refreshTokenExpiresAt,acquiredAt:new Date(o).toISOString()}}async function me(e){let t=de(e);if(t||po(e),m(c`Loaded stored session for ${a.raw(e)}: token=${a.raw(y(t.accessToken))}, expires=${a.raw(t.expiresAt??"unknown")}`),!An(t))return t;t.refreshToken||R(`No refresh token stored for ${t.store}.`,t.store,t.scopes.join(",")),m(c`Refreshing expired token for ${a.raw(t.store)} (expired at ${a.raw(t.expiresAt??"unknown")}, refresh_token=${a.raw(y(t.refreshToken))})`);let o=t.accessToken,n;try{n=await uo({store:t.store,refreshToken:t.refreshToken})}catch(r){throw K(t.store,t.userId),r instanceof s&&r.message.startsWith(`Token refresh failed for ${t.store} (HTTP `)&&R(r.message,t.store,t.scopes.join(",")),r instanceof s&&r.message===`Token refresh returned an invalid response for ${t.store}.`&&R(r.message,t.store,t.scopes.join(",")),r instanceof s&&r.message==="Received an invalid refresh response from Shopify.",r}return t=bn(t,n),m(c`Token refresh succeeded for ${a.raw(t.store)}: ${a.raw(y(o))} → ${a.raw(y(t.accessToken))}, new expiry ${a.raw(t.expiresAt??"unknown")}`),ue(t),t}function yo(e,t=300){return e.slice(0,t)}function Tn(e){if(e&&typeof e=="object"&&"response"in e){let t=e.response,o=t?.status,n=t?.errors;if(typeof o=="number"){let r=typeof n=="string"?n:JSON.stringify(n);return yo(r?`HTTP ${o}: ${r}`:`HTTP ${o}`)}}return yo(e instanceof Error?e.message:String(e))}async function wo(e){let t=b(e),o=de(t);if(!o)return{scopes:[],authoritative:!0};try{let n=await me(t),r=await mo({store:n.store,accessToken:n.accessToken});return m(c`Resolved current remote scopes for ${a.raw(t)}: ${a.raw(r.join(",")||"none")}`),{scopes:r,authoritative:!0}}catch(n){if(n instanceof Error)return m(c`Falling back to locally stored scopes for ${a.raw(t)} after remote scope lookup failed: ${a.raw(Tn(n))}`),{scopes:o.scopes,authoritative:!1};throw n}}i();function Nn(e){return JSON.stringify(e,null,2)}function _n(e){return{completed:["Logged in.",`Authenticated${e.associatedUser?.email?` as ${e.associatedUser.email}`:""} against ${e.store}.`],info:["","To verify that authentication worked, run:",`shopify store execute --store ${e.store} --query 'query { shop { name id } }'`]}}function En(){L("Shopify CLI will open the app authorization page in your browser."),L("")}function In(e){L("Browser did not open automatically. Open this URL manually:"),L(c`${a.link(e)}`),L("")}function On(e,t="text"){if(t==="json"){v(Nn(e));return}let o=_n(e);o.completed.forEach(n=>Ze(n)),o.info.forEach(n=>L(n))}function pe(e="text"){return{openingBrowser:En,manualAuthUrl:In,success(t){On(t,e)}}}i();async function U(e,t){await Be(()=>({store_fqdn:e})),await Ge(()=>({store_fqdn_hash:Ve(e),store_fqdn_validated:t,store_domain:e}))}var Cn={openURL:Je,waitForStoreAuthCode:ho,exchangeStoreAuthCodeForToken:co,resolveExistingScopes:wo,presenter:pe("text")};async function vo(e,t={}){let o={...Cn,...t},n=b(e.store);await U(n,!1);let r=Oe(e.scopes),u=await o.resolveExistingScopes(n),d=ko(r,u.scopes),p=u.authoritative?d:r;u.scopes.length>0&&m(c`Merged requested scopes ${a.raw(r.join(","))} with existing scopes ${a.raw(u.scopes.join(","))} for ${a.raw(n)}`);let g=go({store:n,scopes:d,exchangeCodeForToken:o.exchangeStoreAuthCodeForToken}),{authorization:{authorizationUrl:l}}=g;o.presenter.openingBrowser();let x=await o.waitForStoreAuthCode({...g.waitForAuthCodeOptions,onListening:async()=>{await o.openURL(l)||o.presenter.manualAuthUrl(l)}}),h=await g.exchangeCodeForToken(x);await U(n,!0);let k=h.associated_user?.id?.toString();if(!k)throw new s("Shopify did not return associated user information for the online access token.");oe(k);let A=Date.now(),S=h.expires_in?new Date(A+h.expires_in*1e3).toISOString():void 0,f={store:n,userId:k,scopes:So(h,p),acquiredAt:new Date(A).toISOString(),expiresAt:S,refreshTokenExpiresAt:h.refresh_token_expires_in?new Date(A+h.refresh_token_expires_in*1e3).toISOString():void 0,hasRefreshToken:!!h.refresh_token,associatedUser:h.associated_user?{id:h.associated_user.id,email:h.associated_user.email,firstName:h.associated_user.first_name,lastName:h.associated_user.last_name,accountOwner:h.associated_user.account_owner}:void 0};return ue({store:n,clientId:D,userId:k,accessToken:h.access_token,refreshToken:h.refresh_token,scopes:f.scopes,acquiredAt:f.acquiredAt,expiresAt:S,refreshTokenExpiresAt:f.refreshTokenExpiresAt,associatedUser:f.associatedUser}),m(c`Session persisted for ${a.raw(n)} (user ${a.raw(k)}, expires ${a.raw(S??"unknown")})`),o.presenter.success(f),f}i();var N=class extends ne{};i();var Ce=z(ee(),1),q={store:Ce.Flags.string({char:"s",description:"The myshopify.com domain of the store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>b(e),required:!0}),"organization-id":Ce.Flags.integer({description:"The organization to create the store in (numeric ID). Auto-selects if you belong to a single org.",env:"SHOPIFY_FLAG_ORGANIZATION_ID"})};var xo=z(ee(),1),Fe,_=class extends N{async run(){let{flags:t}=await this.parse(Fe);await vo({store:t.store,scopes:t.scopes},{presenter:pe(t.json?"json":"text")})}};Fe=_;_.summary="Authenticate an app against a store for store commands.";_.descriptionWithMarkdown=`Authenticates the app against the specified store for store commands and stores an online access token for later reuse.
79
+ </html>`}async function Yr({store:e,state:t,port:o,timeoutMs:r=300*1e3,onListening:i}){let a=E(e);return new Promise((u,m)=>{let l=!1,h=!1,A=setTimeout(()=>{I(new d("Timed out waiting for OAuth callback."))},r),g=Li((p,S)=>{let nt=new URL(p.url??"/",`http://127.0.0.1:${o}`);if(nt.pathname!==We){S.statusCode=404,S.end("Not found");return}let{searchParams:Le}=nt,be=(st,yi)=>{let Gt=typeof st=="string"?new d(st,yi):st;S.statusCode=400,S.setHeader("Content-Type","text/html"),S.setHeader("Connection","close"),S.once("finish",()=>I(Gt)),S.end(Qr("Authentication failed",Gt.message))},it=Le.get("shop");if(f(c`Received OAuth callback for shop ${s.raw(it??"unknown")}`),!it){be("OAuth callback store does not match the requested store.");return}let zt=E(it);if(zt!==a){be(Wr(zt));return}let Ht=Le.get("state");if(!Ht||!Ri(Ht,t)){be("OAuth callback state does not match the original request.");return}let Bt=Le.get("error");if(Bt){be(`Shopify returned an OAuth error: ${Bt}`);return}let at=Le.get("code");if(!at){be("OAuth callback did not include an authorization code.");return}f(c`Received authorization code ${s.raw(F(at))}`),S.statusCode=200,S.setHeader("Content-Type","text/html"),S.setHeader("Connection","close"),S.once("finish",()=>x(()=>u(at))),S.end(Qr("Authentication succeeded","Close this window and return to the terminal"))}),x=p=>{if(l)return;l=!0,clearTimeout(A);let S=()=>{p()};if(!h){S();return}g.close(()=>{h=!1,S()}),g.closeIdleConnections?.()},I=p=>{x(()=>m(p))};g.on("error",p=>{if(p.code==="EADDRINUSE"){I(new d(`Port ${o} is already in use.`,`Free port ${o} and re-run ${s.genericShellCommand(`shopify store auth --store ${e} --scopes <comma-separated-scopes>`).value}. Ensure that redirect URI is allowed in the app configuration.`));return}I(p)}),g.listen(o,"127.0.0.1",()=>{h=!0,f(c`PKCE callback server listening on http://127.0.0.1:${s.raw(String(o))}${s.raw(We)}`),i&&Promise.resolve(i()).catch(p=>{I(p instanceof Error?p:new Error(String(p)))})})})}function Ri(e,t){return e.length!==t.length?!1:Di(Buffer.from(e,"utf8"),Buffer.from(t,"utf8"))}n();import{createHash as qi,randomBytes as $i}from"crypto";function Ui(){return $i(32).toString("base64url")}function Mi(e){return qi("sha256").update(e).digest("base64url")}function zi(e){let t=new URLSearchParams;return t.set("client_id",q),t.set("scope",e.scopes.join(",")),t.set("redirect_uri",e.redirectUri),t.set("state",e.state),t.set("response_type","code"),t.set("code_challenge",e.codeChallenge),t.set("code_challenge_method","S256"),e.signup&&t.set("signup",e.signup),`https://${e.store}/admin/oauth/authorize?${t.toString()}`}function Jr(e){let{store:t,scopes:o,signup:r,exchangeCodeForToken:i}=e,a=$r,u=pe(),m=Ur(a),l=Ui(),h=Mi(l),A=zi({store:t,scopes:o,state:u,redirectUri:m,codeChallenge:h,signup:r});return f(c`Starting PKCE auth for ${s.raw(t)} with scopes ${s.raw(o.join(","))} (redirect_uri=${s.raw(m)})`),{authorization:{store:t,scopes:o,state:u,port:a,redirectUri:m,authorizationUrl:A,codeVerifier:l,signup:r},waitForAuthCodeOptions:{store:t,state:u,port:a},exchangeCodeForToken:g=>i({store:t,code:g,codeVerifier:l,redirectUri:m})}}n();function bt(e){let t=e.split(/[ ,]+/).filter(Boolean);if(t.length===0)throw new d("At least one scope is required.","Pass --scopes as a comma-separated list.");return Vt(t)}function vt(e){let t=new Set(e);for(let o of e){let r=o.match(/^(unauthenticated_)?write_(.*)$/);r&&t.add(`${r[1]??""}read_${r[2]}`)}return t}function Kr(e,t){let o=[...t],r=vt(t);for(let i of e)if(!r.has(i)){o.push(i);for(let a of vt([i]))r.add(a)}return o}function Xr(e,t){if(!e.scope)return f(c`Token response did not include scope; falling back to requested scopes`),t;let o=bt(e.scope),r=vt(o),i=t.filter(a=>!r.has(a));if(i.length>0)throw new d("Shopify granted fewer scopes than were requested.",`Missing scopes: ${i.join(", ")}.`,["Update the app or store installation scopes.","See https://shopify.dev/app/scopes","Re-run shopify store auth."]);return o}n();n();var Hi=240*1e3;function Bi(e){if(!e.expiresAt)return!1;let t=new Date(e.expiresAt).getTime();return Number.isNaN(t)?!0:t-Hi<Date.now()}function Gi(e,t){let o=Date.now(),r=t.expiresIn?new Date(o+t.expiresIn*1e3).toISOString():e.expiresAt;return{...e,accessToken:t.accessToken,refreshToken:t.refreshToken??e.refreshToken,expiresAt:r,refreshTokenExpiresAt:t.refreshTokenExpiresIn?new Date(o+t.refreshTokenExpiresIn*1e3).toISOString():e.refreshTokenExpiresAt,acquiredAt:new Date(o).toISOString()}}async function C(e){let t=te(e);if(t||jr(e),f(c`Loaded stored session for ${s.raw(e)}: token=${s.raw(F(t.accessToken))}, expires=${s.raw(t.expiresAt??"unknown")}`),!Bi(t))return t;t.refreshToken||Ne(`No refresh token stored for ${t.store}.`,t),f(c`Refreshing expired token for ${s.raw(t.store)} (expired at ${s.raw(t.expiresAt??"unknown")}, refresh_token=${s.raw(F(t.refreshToken))})`);let o=t.accessToken,r;try{r=await Hr({store:t.store,refreshToken:t.refreshToken})}catch(i){throw Ue(t.store,t.userId),i instanceof d&&i.message.startsWith(`Token refresh failed for ${t.store} (HTTP `)&&Ne(i.message,t),i instanceof d&&i.message===`Token refresh returned an invalid response for ${t.store}.`&&Ne(i.message,t),i instanceof d&&i.message==="Received an invalid refresh response from Shopify.",i}return t=Gi(t,r),f(c`Token refresh succeeded for ${s.raw(t.store)}: ${s.raw(F(o))} → ${s.raw(F(t.accessToken))}, new expiry ${s.raw(t.expiresAt??"unknown")}`),ge(t),t}function Zr(e,t=300){return e.slice(0,t)}function Vi(e){if(e&&typeof e=="object"&&"response"in e){let t=e.response,o=t?.status,r=t?.errors;if(typeof o=="number"){let i=typeof r=="string"?r:JSON.stringify(r);return Zr(i?`HTTP ${o}: ${i}`:`HTTP ${o}`)}}return Zr(e instanceof Error?e.message:String(e))}async function en(e){let t=E(e),o=te(t);if(!o)return{scopes:[],authoritative:!0};try{let r=await C(t),i=await Br({store:r.store,accessToken:r.accessToken});return f(c`Resolved current remote scopes for ${s.raw(t)}: ${s.raw(i.join(",")||"none")}`),{scopes:i,authoritative:!0}}catch(r){if(r instanceof Error)return f(c`Falling back to locally stored scopes for ${s.raw(t)} after remote scope lookup failed: ${s.raw(Vi(r))}`),{scopes:o.scopes,authoritative:!1};throw r}}n();function ji(e){return JSON.stringify(e,null,2)}function Wi(e){return{completed:["Logged in.",`Authenticated${e.associatedUser?.email?` as ${e.associatedUser.email}`:""} against ${e.store}.`],info:["","To verify that authentication worked, run:",`shopify store execute --store ${e.store} --query 'query { shop { name id } }'`]}}function Qi(){P("Shopify CLI will open the app authorization page in your browser."),P("")}function Yi(e){P("Browser did not open automatically. Open this URL manually:"),P(c`${s.link(e)}`),P("")}function Ji(e,t="text"){if(t==="json"){v(ji(e));return}let o=Wi(e);o.completed.forEach(r=>io(r)),o.info.forEach(r=>P(r))}function we(e="text"){return{openingBrowser:Qi,manualAuthUrl:Yi,success(t){Ji(t,e)}}}n();async function N(e,t,o){await Kt(()=>({store_fqdn:e})),await Jt(()=>({store_fqdn_hash:Qt(e),store_fqdn_validated:t,store_domain:e,store_id:jt(o)}))}var Ki={openURL:$e,waitForStoreAuthCode:Yr,exchangeStoreAuthCodeForToken:zr,resolveExistingScopes:en,getCurrentStoredStoreAppSession:te,presenter:we("text")};async function Ye(e,t={}){let o={...Ki,...t},r=E(e.store);Xi(r,o),await N(r,!1);let i=bt(e.scopes),a=await o.resolveExistingScopes(r),u=Kr(i,a.scopes),m=a.authoritative?u:i;a.scopes.length>0&&f(c`Merged requested scopes ${s.raw(i.join(","))} with existing scopes ${s.raw(a.scopes.join(","))} for ${s.raw(r)}`);let l=Jr({store:r,scopes:u,signup:e.signup,exchangeCodeForToken:o.exchangeStoreAuthCodeForToken}),{authorization:{authorizationUrl:h}}=l;o.presenter.openingBrowser();let A=await o.waitForStoreAuthCode({...l.waitForAuthCodeOptions,onListening:async()=>{await o.openURL(h)||o.presenter.manualAuthUrl(h)}}),g=await l.exchangeCodeForToken(A);await N(r,!0);let x=g.associated_user?.id?.toString();if(!x)throw new d("Shopify did not return associated user information for the online access token.");D(x);let I=Date.now(),p=g.expires_in?new Date(I+g.expires_in*1e3).toISOString():void 0,S={store:r,userId:x,scopes:Xr(g,m),acquiredAt:new Date(I).toISOString(),expiresAt:p,refreshTokenExpiresAt:g.refresh_token_expires_in?new Date(I+g.refresh_token_expires_in*1e3).toISOString():void 0,hasRefreshToken:!!g.refresh_token,associatedUser:g.associated_user?{id:g.associated_user.id,email:g.associated_user.email,firstName:g.associated_user.first_name,lastName:g.associated_user.last_name,accountOwner:g.associated_user.account_owner}:void 0};return ge({store:r,clientId:q,userId:x,accessToken:g.access_token,refreshToken:g.refresh_token,scopes:S.scopes,acquiredAt:S.acquiredAt,expiresAt:p,refreshTokenExpiresAt:S.refreshTokenExpiresAt,associatedUser:S.associatedUser}),f(c`Session persisted for ${s.raw(r)} (user ${s.raw(x)}, expires ${s.raw(p??"unknown")})`),o.presenter.success(S),S}function Xi(e,t){let o=t.getCurrentStoredStoreAppSession(e);if(o?.kind!=="preview")return;let r=o.scopes,i=r.length>0?r.join(", "):"none";throw new d("`store auth` is unavailable for preview stores. Additional Admin API scopes can't be granted.",`The following scopes are available: ${i}.
79
80
 
80
- Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`;_.description=Fe.descriptionWithoutMarkdown();_.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products --json"];_.flags={...F,...P,store:q.store,scopes:xo.Flags.string({description:"Comma-separated Admin API scopes to request for the app.",env:"SHOPIFY_FLAG_SCOPES",required:!0})};var Ao=_;i();i();i();var bo={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"}}}],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"}}}],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"}}]}}]}}]};i();var To={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 Fn=2,Pn=300*1e3;function Dn(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 No(e){let t=await vt(e.organizationId?.toString()),o=await T(),n={type:"token_refresh",handler:async()=>({token:await T()})},u=(await B({query:bo,token:o,organizationId:t.id,variables:{shopName:e.name,priceLookupKey:"SHOPIFY_PLUS_APP_DEVELOPMENT",prepopulateTestData:!1},unauthorizedHandler:n})).createAppDevelopmentStore;if(!u)throw new s("Store creation failed: unexpected empty response.");let d=u.userErrors;if(d&&d.length>0){let l=d.map(x=>x.message).join(", ");throw new s(`Failed to create development store: ${l}`)}let{shopDomain:p,shopAdminUrl:g}=u;if(!p)throw new s("Store creation succeeded but no shop domain was returned.");await M({title:c`Waiting for store to be ready...`,task:async l=>{let x=Date.now();for(;;){if(Date.now()-x>Pn)throw new s("Store creation timed out after 5 minutes.");let k=(await B({query:To,token:o,organizationId:t.id,variables:{shopDomain:p},unauthorizedHandler:n})).organization?.storeCreation?.status;if(!k)throw new s("Unable to determine store creation status.");if(k==="COMPLETE")return;if(k==="FAILED"||k==="TIMED_OUT"||k==="USER_ERROR")throw new s(`Store creation failed with status: ${k}`);l(c`${Dn(k)}`),await Ke(Fn)}},renderOptions:{stdout:process.stderr}}),e.json?v(JSON.stringify({store:{name:e.name,domain:p,adminUrl:g},organization:{id:t.id,name:t.businessName}},null,2)):Q({headline:`Development store "${e.name}" created successfully.`,body:[`Domain: ${p}`,`Admin: ${g??"N/A"}`]})}var _o=z(ee(),1),Pe,E=class extends ne{async run(){let{flags:t}=await this.parse(Pe);try{await No({name:t.name,organizationId:t["organization-id"],json:t.json})}catch(o){throw t.json&&o instanceof s&&(v(JSON.stringify({error:!0,message:o.message,nextSteps:o.nextSteps??[],exitCode:1},null,2)),process.exit(1)),o}}};Pe=E;E.hidden=!0;E.summary="Create a new development store.";E.descriptionWithMarkdown="Creates a new app development store in your organization.";E.description=Pe.descriptionWithoutMarkdown();E.flags={...F,...P,name:_o.Flags.string({description:"Name for the new development store.",required:!0,env:"SHOPIFY_FLAG_STORE_NAME"}),"organization-id":q["organization-id"]};var Eo=E;i();i();i();var Io=z(en(),1);async function qn(e){if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");return e.query}if(e.queryFile){if(!await ve(e.queryFile))throw new s(c`Query file not found at ${a.path(e.queryFile)}. Please check the path and try again.`);let t=await we(e.queryFile,{encoding:"utf8"});if(!t.trim())throw new s(c`Query file at ${a.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);return t}throw new H("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.")}async function $n(e,t){if(e)try{return JSON.parse(e)}catch(o){let n=o instanceof Error?o.message:"Unknown error";throw new s(c`Invalid JSON in ${a.yellow("--variables")} flag: ${n}`,"Please provide valid JSON format.")}else if(t){if(!await ve(t))throw new s(c`Variable file not found at ${a.path(t)}. Please check the path and try again.`);let o=await we(t,{encoding:"utf8"});try{return JSON.parse(o)}catch(n){let r=n instanceof Error?n.message:"Unknown error";throw new s(c`Invalid JSON in variable file ${a.path(t)}: ${r}`,"Please provide valid JSON format.")}}}function Ln(e){let t;try{t=(0,Io.parse)(e)}catch(n){throw n instanceof Error?new s(`Invalid GraphQL syntax: ${n.message}`):n}let o=t.definitions.filter(n=>n.kind==="OperationDefinition");if(o.length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.");return{operationDefinition:o[0]}}function Rn(e){return e.operationDefinition.operation==="mutation"}function Un(e,t=!1){if(Rn(e)&&!t)throw new s("Mutations are disabled by default for shopify store execute.","Re-run with --allow-mutations if you intend to modify store data.")}async function Oo(e){let t=await qn({query:e.query,queryFile:e.queryFile}),o=Ln(t);Un(o,e.allowMutations);let n=await $n(e.variables,e.variableFile);return{query:t,parsedOperation:o,parsedVariables:n,requestedVersion:e.version}}i();i();i();var zn=`
81
+ Run \`shopify store info --store ${e} --json\` to view this list again at any time.`,["Run `shopify store execute` directly against the preview store; no `store auth` step is needed."])}n();var k=class extends he{};n();var O=B(ae(),1);function Zi(e){return O.Flags.string({description:"Two-letter country code for the store, such as US, CA, or GB.",env:e,required:!1,parse:async t=>t.trim().toUpperCase()})}function tn(e){return/^[A-Z]{2}$/.test(e)}var on={country:Zi("SHOPIFY_FLAG_PREVIEW_STORE_COUNTRY")},w={store:O.Flags.string({char:"s",description:"The myshopify.com domain of the store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>E(e),required:!0}),"organization-id":O.Flags.integer({description:"The numeric organization ID. Auto-selects if you belong to a single organization.",env:"SHOPIFY_FLAG_ORGANIZATION_ID"})},rn={env:"SHOPIFY_FLAG_ID",parse:async e=>Fo(e)},nn=O.Flags.string({...rn,description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations on this store in the last 7 days."}),an=O.Flags.string({...rn,description:"The bulk operation ID to cancel (numeric ID or full GID).",required:!0}),sn={query:O.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":O.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async e=>ie(e),exactlyOne:["query","query-file"]}),variables:O.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":O.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async e=>ie(e),exclusive:["variables"]}),watch:O.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":O.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:O.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"allow-mutations":O.Flags.boolean({description:"Allow GraphQL mutations to run against the target store.",env:"SHOPIFY_FLAG_ALLOW_MUTATIONS",default:!1})};var dn=B(ae(),1),At,V=class extends k{async run(){let{flags:t}=await this.parse(At);await Ye({store:t.store,scopes:t.scopes},{presenter:we(t.json?"json":"text")})}};At=V;V.summary="Authenticate an app against a store for store commands.";V.descriptionWithMarkdown=`Authenticates the app against the specified store for store commands and stores an online access token for later reuse.
82
+
83
+ Re-run this command if the stored token is missing, expires, or no longer has the scopes you need.`;V.description=At.descriptionWithoutMarkdown();V.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products --json"];V.flags={...y,...T,store:w.store,scopes:dn.Flags.string({description:"Comma-separated Admin API scopes to request for the app.",env:"SHOPIFY_FLAG_SCOPES",required:!0})};var cn=V;n();n();n();function ue(e){let{storeFqdn:t,version:o}=e,r=[`Store: ${t}`];return o&&r.push(`API version: ${o}`),r}function un(e,t=!1){if(ye(e)&&!t)throw new d("Mutations are disabled by default for shopify store bulk execute.","Re-run with --allow-mutations if you intend to modify store data.")}n();async function me(e){let t=await C(e);return await N(t.store,!0),D(t.userId),{token:t.accessToken,storeFqdn:t.store}}async function mn(e){let{store:t,operationId:o}=e,r=await me(t);_({headline:"Canceling bulk operation.",body:[{list:{items:[`ID: ${o}`,...ue({storeFqdn:r.storeFqdn})]}}]});let i=await $o({adminSession:r,operationId:o});if(i?.userErrors?.length){Uo(i.userErrors,"Failed to cancel bulk operation.");return}let a=i?.bulkOperation;if(a){let u=Mo(a),m=a.status==="CANCELING"?[`This may take a few moments. Check the status with:
84
+ `,{command:`shopify store bulk status --id=${Se(a.id)}`}]:u.body,l={headline:u.headline,...m&&{body:m},...u.customSections&&{customSections:u.customSections}};switch(u.renderType){case"success":b(l);break;case"warning":Te(l);break;case"info":_(l);break}}else Z({headline:"Bulk operation not found or could not be canceled.",body:c`ID: ${s.yellow(o)}`.value})}var xt,j=class extends k{async run(){let{flags:t}=await this.parse(xt);await mn({store:t.store,operationId:t.id})}};xt=j;j.summary="Cancel a bulk operation on a store.";j.descriptionWithMarkdown="Cancels a running bulk operation by ID, using previously stored app authentication.\n\n Run `shopify store auth` first to create stored auth for the store.";j.description=xt.descriptionWithoutMarkdown();j.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com --id 123456789"];j.flags={...y,store:w.store,id:an};var pn=j;n();n();async function ea(e,t){if(e)return e.join(`
85
+ `);if(t){if(!await _e(t))throw new d(c`Variable file not found at ${s.path(t)}. Please check the path and try again.`);return xe(t,{encoding:"utf8"})}else return}async function fn(e){let{store:t,query:o,variables:r,variableFile:i,outputFile:a,watch:u=!1,version:m,allowMutations:l=!1}=e;un(o,l);let{adminSession:h,version:A}=await R({title:c`Authenticating`,task:async()=>{let p=await me(t),S=await Ee({adminSession:p,userSpecifiedVersion:m,minimumDefaultVersion:Ie});return{adminSession:p,version:S}},renderOptions:{stdout:process.stderr}}),g=await ea(r,i);ta(o,g),_({headline:"Starting bulk operation.",body:[{list:{items:ue({storeFqdn:h.storeFqdn,version:A})}}]});let x=ye(o)?await Lo({adminSession:h,query:o,variablesJsonl:g,version:A}):await Do({adminSession:h,query:o,version:A});if(x?.userErrors?.length){Z({headline:"Error creating bulk operation.",body:{list:{items:x.userErrors.map(p=>p.field?`${p.field.join(".")}: ${p.message}`:p.message)}}});return}let I=x?.bulkOperation;if(I)if(u){let p=new Wt,S=await Ho(h,I.id,p.signal,()=>p.abort());p.signal.aborted?_({headline:`Bulk operation ${S.id} is still running in the background.`,body:Je(S.id)}):await ln(S,a)}else{let p=await zo(h,I.id);["FAILED","CANCELED","EXPIRED"].includes(p.status)?await ln(p,a):b({headline:"Bulk operation is running.",body:Je(p.id),customSections:[{body:[{list:{items:[c`ID: ${s.cyan(p.id)}`.value]}}]}]})}else throw Te({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new ee("Bulk operation response returned null with no error message.")}async function ln(e,t){let o=Me(e).value,i=[{body:[{list:{items:[c`ID: ${s.cyan(e.id)}`.value,c`Status: ${s.yellow(e.status)}`.value,c`Created at: ${s.gray(String(e.createdAt))}`.value,...e.completedAt?[c`Completed at: ${s.gray(String(e.completedAt))}`.value]:[]]}}]}];switch(e.status){case"CREATED":b({headline:"Bulk operation started.",body:Je(e.id),customSections:i});break;case"RUNNING":b({headline:"Bulk operation is running.",body:Je(e.id),customSections:i});break;case"COMPLETED":if(e.url){let a=await Bo(e.url),u=Go(a);t?await Re(t,a):v(a),u?Te({headline:"Bulk operation completed with errors.",body:t?`Results written to ${t}. Check file for error details.`:"Check results for error details.",customSections:i}):b({headline:o,body:t?[`Results written to ${t}`]:void 0,customSections:i})}else b({headline:o,customSections:i});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":Z({headline:o,customSections:i});break}}function ta(e,t){if(ye(e)&&!t)throw new d(c`Bulk mutations require variables. Provide a JSONL file with ${s.yellow("--variable-file")} or individual JSON objects with ${s.yellow("--variables")}.`);if(!ye(e)&&t)throw new d(c`The ${s.yellow("--variables")} and ${s.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function Je(e){return[`Monitor its progress with:
86
+ `,{command:`shopify store bulk status --id=${Se(e)}`}]}var _t,W=class extends k{async run(){let{flags:t}=await this.parse(_t),o=await Co({query:t.query,queryFile:t["query-file"]});await fn({store:t.store,query:o,variables:t.variables,variableFile:t["variable-file"],watch:t.watch??!1,outputFile:t["output-file"],allowMutations:t["allow-mutations"],...t.version&&{version:t.version}})}};_t=W;W.summary="Execute bulk operations on a store.";W.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store as a bulk operation, using previously stored app authentication.
87
+
88
+ Run \`shopify store auth\` first to create stored auth for the store.
89
+
90
+ Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
91
+
92
+ Mutations are disabled by default. Re-run with \`--allow-mutations\` if you intend to modify store data.
93
+
94
+ Use [\`store bulk status\`](https://shopify.dev/docs/api/shopify-cli/store/store-bulk-status) to check the status of your bulk operations.`;W.description=_t.descriptionWithoutMarkdown();W.examples=['<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "query { products { edges { node { id } } } }"',"<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query-file ./operation.graphql --watch","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query-file ./mutation.graphql --variable-file ./variables.jsonl --allow-mutations"];W.flags={...y,store:w.store,...sn};var hn=W;n();n();async function gn(e){let{store:t,operationId:o}=e,r=await me(t);_({headline:"Checking bulk operation status.",body:[{list:{items:ue({storeFqdn:r.storeFqdn})}}]});let i=await Ro({adminSession:r,operationId:o,version:await Ee({adminSession:r,minimumDefaultVersion:Ie})});i?oa(i):Z({headline:"Bulk operation not found.",body:c`ID: ${s.yellow(o)}`.value})}async function Sn(e){let{store:t}=e,o=await me(t);_({headline:"Listing bulk operations.",body:[{list:{items:ue({storeFqdn:o.storeFqdn})}}]});let i=(await qo({adminSession:o,version:await Ee({adminSession:o,minimumDefaultVersion:Ie})})).map(a=>({id:Se(a.id),status:na(a.status),count:ia(a.objectCount),dateCreated:ct(new Date(String(a.createdAt))),dateFinished:a.completedAt?ct(new Date(String(a.completedAt))):"",results:aa(a.url??a.partialDataUrl)}));gt(),i.length===0?_({body:"No bulk operations found in the last 7 days."}):fe({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),gt()}function oa(e){let{id:t,status:o,createdAt:r,completedAt:i,url:a,partialDataUrl:u}=e,m=Me(e).value,l=ra(r,i),h=c`ID: ${s.yellow(t)}\n${l}`.value;if(o==="COMPLETED"){let A=a?s.link("Download results",a):"";b({headline:m,body:c`${h}\n${A}`.value})}else if(o==="FAILED"){let A=u?s.link("Download partial results",u):"";Z({headline:m,body:c`${h}\n${A}`.value})}else _({headline:m,body:h})}function ra(e,t){let o=new Date;return t?`Finished ${ut(new Date(String(t)),o)}`:`Started ${ut(new Date(String(e)),o)}`}function na(e){return e==="COMPLETED"?qe.green(e):e==="FAILED"?qe.red(e):qe.dim(e)}function ia(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function aa(e){return e?c`${s.link("download",e)}`.value:""}var Tt,Q=class extends k{async run(){let{flags:t}=await this.parse(Tt);t.id?await gn({store:t.store,operationId:t.id}):await Sn({store:t.store})}};Tt=Q;Q.summary="Check the status of bulk operations on a store.";Q.descriptionWithMarkdown="Check the status of a specific bulk operation by ID, or list all bulk operations on this store in the last 7 days, using previously stored app authentication.\n\n Run `shopify store auth` first to create stored auth for the store.\n\n Use [`store bulk execute`](https://shopify.dev/docs/api/shopify-cli/store/store-bulk-execute) to start a new bulk operation.";Q.description=Tt.descriptionWithoutMarkdown();Q.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --id 123456789"];Q.flags={...y,store:w.store,id:nn};var yn=Q;n();var It=B(ae(),1),Et,U=class extends k{async run(){let{flags:t}=await this.parse(Et);await Ye({store:t.store,scopes:t.scopes,signup:t.signup},{presenter:we(t.json?"json":"text")})}};Et=U;U.hidden=!0;U.summary="Authenticate for store commands.";U.descriptionWithMarkdown="Authenticates to a store then stores an online access token for later reuse. Pass the provided JWT to --signup.";U.description=Et.descriptionWithoutMarkdown();U.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products --signup <signup-jwt>","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --scopes read_products,write_products --signup <signup-jwt> --json"];U.flags={...y,...T,store:w.store,scopes:It.Flags.string({description:"Comma-separated Admin API scopes to request for the app.",env:"SHOPIFY_FLAG_SCOPES",required:!0}),signup:It.Flags.string({description:"Provide JWT for the store.",env:"SHOPIFY_FLAG_SIGNUP",required:!0})};var kn=U;n();n();n();function oe(e={}){return{type:"token_refresh",handler:async()=>({token:await sa(e)})}}async function sa(e){return L([],{noPrompt:e.noPrompt})}n();var Nt={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},Ke=Object.keys(Nt),wn={basic:"basic",professional:"grow",grow:"grow",unlimited:"advanced",advanced:"advanced",shopify_plus:"plus",plus:"plus"};n();var vn={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"}}}],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"}}}],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"}}]}}]}}]};n();var bn={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 da=2,ca=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 An(e){let{organization:t,name:o,plan:r}=e,i=await L(),a=oe(),m=(await de({query:vn,token:i,organizationId:t.id,variables:{shopName:o,priceLookupKey:Nt[r],prepopulateTestData:e.withDemoData??!1,developerPreviewHandle:e.featurePreview},unauthorizedHandler:a})).createAppDevelopmentStore;if(!m)throw new d("Store creation failed: unexpected empty response.");let l=m.userErrors;if(l&&l.length>0){let g=l.map(x=>x.message).join(", ");throw new d(`Failed to create development store: ${g}`)}let{shopDomain:h,shopAdminUrl:A}=m;if(!h)throw new d("Store creation succeeded but no shop domain was returned.");await R({title:c`Waiting for store to be ready...`,task:async g=>{let x=Date.now();for(;;){if(Date.now()-x>ca)throw new d("Store creation timed out after 5 minutes.");let p=(await de({query:bn,token:i,organizationId:t.id,variables:{shopDomain:h},unauthorizedHandler:a})).organization?.storeCreation?.status;if(!p)throw new d("Unable to determine store creation status.");if(p==="COMPLETE")return;if(p==="FAILED"||p==="TIMED_OUT"||p==="USER_ERROR")throw new d(`Store creation failed with status: ${p}`);g(c`${ua(p)}`),await no(da)}},renderOptions:{stdout:process.stderr}}),e.json?v(JSON.stringify({store:{name:o,domain:h,adminUrl:A,plan:r,...e.featurePreview?{featurePreview:e.featurePreview}:{},demoData:e.withDemoData??!1},organization:{id:t.id,name:t.businessName}},null,2)):b({headline:`Development store "${o}" created successfully.`,body:[`Domain: ${h}`,`Admin: ${A??"N/A"}`,`Plan: ${r}`,...e.featurePreview?[`Feature preview: ${e.featurePreview}`]:[],`Demo data: ${e.withDemoData?"enabled":"disabled"}`]})}n();var ma={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};async function xn(){return to({message:"Name for the new development store"})}async function _n(){return Zt({message:"Which Shopify plan do you want to use?",choices:Ke.map(e=>({label:ma[e],value:e}))})}var Oe=B(ae(),1),Ot,Y=class extends he{async run(){let{flags:t}=await this.parse(Ot);this.failMissingNonTTYFlags(t,["name","organization-id","plan"]);let o=await Wo(t["organization-id"]?.toString()),r=t.name??await xn(),i=t.plan??await _n();try{await An({name:r,organization:o,plan:i,featurePreview:t["feature-preview"],withDemoData:t["with-demo-data"],json:t.json})}catch(a){throw t.json&&a instanceof d&&(v(JSON.stringify({error:!0,message:a.message,nextSteps:a.nextSteps??[],exitCode:1},null,2)),process.exit(1)),a}}};Ot=Y;Y.hidden=!0;Y.summary="Create a new development store.";Y.descriptionWithMarkdown="Creates a new app development store in your organization.";Y.description=Ot.descriptionWithoutMarkdown();Y.flags={...y,...T,name:Oe.Flags.string({description:"Name for the new development store.",env:"SHOPIFY_FLAG_STORE_NAME"}),"organization-id":w["organization-id"],plan:Oe.Flags.string({description:"The Shopify plan to use for the new development store.",options:Ke,env:"SHOPIFY_FLAG_STORE_PLAN"}),"feature-preview":Oe.Flags.string({description:"The handle of a feature preview to enable on the new development store.",env:"SHOPIFY_FLAG_STORE_FEATURE_PREVIEW"}),"with-demo-data":Oe.Flags.boolean({description:"Populate the new development store with demo data.",default:!1,env:"SHOPIFY_FLAG_STORE_WITH_DEMO_DATA"})};var Tn=Y;n();n();n();var pa="X-Shopify-CLI-Instance",la="X-Shopify-CLI-Version",Pt;function fa(){return Pt??(Pt=new Yt({projectName:"shopify-cli-store"})),Pt}var Pe=class extends d{constructor(t,o,r){super(o,r??null),this.status=t}};function In(e=fa()){let t=e.get("cliInstanceId");if(typeof t=="string"&&t.length>0)return t;let o=pe();return e.set("cliInstanceId",o),o}function En(e){return{Accept:"application/json","Content-Type":"application/json","User-Agent":`Shopify CLI; v=${dt}`,[pa]:e,[la]:dt}}function ha(e){return En(e)}function ga(e,t){return{...En(e),authorization:t,"X-Shopify-Access-Token":t}}async function Nn(e,t={}){let r=`https://${await lt()}/services/preview-stores`,i=JSON.stringify({...e.name?{name:e.name}:{},...e.country?{variables:{storeCreatePayload:{country:e.country}}}:{}}),a=await pt(r,{method:"POST",headers:ha(In(t.storage)),body:i}),u=await a.text();if(!a.ok){let l=Sa(a.status,u);throw new d(l.message,l.tryMessage)}let m;try{m=JSON.parse(u)}catch(l){let h=l instanceof Error?l.message:"Unknown error";throw new d("Preview store creation returned a non-JSON response.",`Parse error: ${h}. Body (truncated): ${Xe(u).slice(0,500)}`)}return ka(m)}async function On(e,t={}){let r=`https://${await lt()}/services/preview-stores/${e.shopId}`,i=await pt(r,{method:"GET",headers:ga(In(t.storage),e.adminApiToken)}),a=await i.text();if(!i.ok){let m=ya(i.status,a);throw new Pe(i.status,m.message,m.tryMessage)}let u;try{u=JSON.parse(a)}catch(m){let l=m instanceof Error?m.message:"Unknown error";throw new d("Preview store lookup returned a non-JSON response.",`Parse error: ${l}. Body (truncated): ${Xe(a).slice(0,500)}`)}return wa(u)}function Sa(e,t){let o=Pn(t),r=o.error_code,i=o.message;if(r==="not_in_rollout")return{message:"Preview store creation is not enabled yet.",tryMessage:"Try again later."};if(r==="service_unavailable")return{message:"Preview store creation is temporarily unavailable.",tryMessage:"Try again later."};if(r==="rate_limited")return{message:"Too many preview store creation requests.",tryMessage:"Try again later."};if(r==="preview_store_create_failed")return{message:"Preview store creation failed.",tryMessage:"Try again later."};if(r==="shop_name_banned_keyword"||r==="shop_name_invalid")return{message:"The preview store name was rejected.",tryMessage:"Use a different store name and try again."};if(r==="country_invalid")return{message:"The preview store country was rejected.",tryMessage:"Use a different country and try again."};let a=Xe(t);return{message:`Preview store creation failed with HTTP ${e}.`,tryMessage:i??(a.length>0?a.slice(0,1e3):"No response body returned.")}}function Pn(e){if(e.length===0)return{};try{let t=JSON.parse(e);if(!t||typeof t!="object")return{};let o=t;return{...typeof o.error_code=="string"?{error_code:o.error_code}:{},...typeof o.message=="string"?{message:o.message}:{}}}catch(t){if(t instanceof SyntaxError)return{};throw t}}function ya(e,t){let o=Pn(t),r=Xe(t);return{message:`Preview store lookup failed with HTTP ${e}.`,tryMessage:o.message??(r.length>0?r.slice(0,1e3):"No response body returned.")}}function ka(e){let t=e.shop,o=typeof t?.id=="string"||typeof t?.id=="number"?String(t.id):void 0,r=typeof t?.name=="string"?t.name:void 0,i=typeof t?.domain=="string"?E(t.domain):void 0,a=typeof e.admin_api_token=="string"?e.admin_api_token:void 0,u=typeof e.access_url=="string"?e.access_url:void 0,m=typeof e.placeholder_account_uuid=="string"?e.placeholder_account_uuid:void 0,l=Array.isArray(e.admin_api_scopes)?e.admin_api_scopes.filter(h=>typeof h=="string"):void 0;if(!o||!r||!i||!a||!u||!l)throw new d("Preview store creation response is missing required fields.",`Got: ${JSON.stringify(va(e)).slice(0,500)}`);return{shop:{id:o,name:r,domain:i},adminApiToken:a,adminApiScopes:l,accessUrl:u,...m?{placeholderAccountUuid:m}:{}}}function wa(e){let t=e.shop,o=typeof t?.id=="string"||typeof t?.id=="number"?String(t.id):void 0,r=typeof t?.name=="string"?t.name:void 0,i=typeof t?.domain=="string"?E(t.domain):void 0,a=typeof e.access_url=="string"?e.access_url:void 0,u=typeof e.claim_url=="string"?e.claim_url:void 0;if(!o||!r||!i||!a)throw new d("Preview store lookup response is missing required fields.",`Got: ${JSON.stringify(ba(e)).slice(0,500)}`);return{shop:{id:o,name:r,domain:i},accessUrl:a,...u?{claimUrl:u}:{}}}function va(e){return{...e,...e.admin_api_token?{admin_api_token:"[REDACTED]"}:{},...e.access_url?{access_url:"[REDACTED]"}:{}}}function Xe(e){return e.replace(/(["']?(?:admin_api_token|adminApiToken)["']?\s*:\s*["'])[^"']+/gi,"$1[REDACTED]").replace(/(["']?(?:access_url|accessUrl|claim_url|claimUrl)["']?\s*:\s*["'])[^"']+/gi,"$1[REDACTED]").replace(/([?&](?:token|access_token)=)[^&\s"'<>]+/gi,"$1[REDACTED]")}function ba(e){return{...e,...e.access_url?{access_url:"[REDACTED]"}:{},...e.claim_url?{claim_url:"[REDACTED]"}:{}}}var Aa="preview:",xa={createPreviewStore:Nn,setStoredStoreAppSession:ge,recordStoreFqdnMetadata:N,setLastSeenUserId:D,now:()=>new Date};async function Fn(e,t={}){let o={...xa,...t},r=await o.createPreviewStore({name:e.name,country:e.country},e.client);return Ta(r,e.country,o)}function _a(e){return`${Aa}${e.placeholderAccountUuid??e.shop.id}`}async function Ta(e,t,o){let r=o.now().toISOString(),i=_a(e);o.setStoredStoreAppSession({store:e.shop.domain,clientId:q,userId:i,accessToken:e.adminApiToken,scopes:e.adminApiScopes,acquiredAt:r,kind:"preview",preview:{shopId:e.shop.id,name:e.shop.name,createdAt:r,...e.placeholderAccountUuid?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...t?{country:t}:{},accessUrl:e.accessUrl}}),o.setLastSeenUserId(i);try{await o.recordStoreFqdnMetadata(e.shop.domain,!0,e.shop.id)}catch{}return{status:"success",message:`Your Shopify store "${e.shop.name}" is ready. This store is temporary. Create a free Shopify account to save it and start selling.`,store:{id:e.shop.id,name:e.shop.name,subdomain:e.shop.domain,...t?{country:t}:{},storefrontUrl:e.accessUrl}}}n();function Cn(e,t){if(t==="json"){v(JSON.stringify(Ia(e),null,2));return}Ea(e)}function Ia(e){return{status:e.status,message:e.message,store:e.store,next_steps:Dn(e).map(t=>t.json)}}function Dn(e){return[{json:`Use \`shopify store open --store ${e.store.subdomain}\` to preview the storefront.`,text:["Use ",{command:`shopify store open --store ${e.store.subdomain}`}," to preview the storefront."]},{json:`Use \`shopify store execute --store ${e.store.subdomain}\` to add products, collections, pages, and more.`,text:["Use ",{command:`shopify store execute --store ${e.store.subdomain}`}," to add products, collections, pages, and more."]},{json:`Use \`shopify theme pull --store ${e.store.subdomain}\` and \`shopify theme push --store ${e.store.subdomain}\` to edit your store design.`,text:["Use ",{command:`shopify theme pull --store ${e.store.subdomain}`}," and ",{command:`shopify theme push --store ${e.store.subdomain}`}," to edit your store design."]}]}function Ea(e){b({headline:"Store created",customSections:[{body:e.message},{title:"Next steps",body:{list:{items:Dn(e).map(t=>t.text)}}}]})}var Ln=B(ae(),1),Ft,M=class extends k{async run(){let{flags:t}=await this.parse(Ft);t.country!==void 0&&!tn(t.country)&&this.error("Country must be a two-letter country code, for example: US.");let o=await R({title:c`Creating store`,task:async()=>Fn({name:t.name,country:t.country})});Cn(o,t.json?"json":"text")}};Ft=M;M.hidden=!0;M.summary="Create a preview Shopify store.";M.descriptionWithMarkdown="Creates a new Shopify store, with no need for an existing account.";M.description=Ft.descriptionWithoutMarkdown();M.examples=['<%= config.bin %> <%= command.id %> --name "Lavender Candles"','<%= config.bin %> <%= command.id %> --name "Lavender Candles" --country US','<%= config.bin %> <%= command.id %> --name "Lavender Candles" --json'];M.flags={...y,...T,name:Ln.Flags.string({description:"The name of the store.",env:"SHOPIFY_FLAG_PREVIEW_STORE_NAME",required:!1}),country:on.country};var Rn=M;n();n();n();var qn=B(ki(),1);async function Na(e){if(e.query!==void 0){if(!e.query.trim())throw new d("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");return e.query}if(e.queryFile){if(!await _e(e.queryFile))throw new d(c`Query file not found at ${s.path(e.queryFile)}. Please check the path and try again.`);let t=await xe(e.queryFile,{encoding:"utf8"});if(!t.trim())throw new d(c`Query file at ${s.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);return t}throw new ee("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.")}async function Oa(e,t){if(e)try{return JSON.parse(e)}catch(o){let r=o instanceof Error?o.message:"Unknown error";throw new d(c`Invalid JSON in ${s.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(t){if(!await _e(t))throw new d(c`Variable file not found at ${s.path(t)}. Please check the path and try again.`);let o=await xe(t,{encoding:"utf8"});try{return JSON.parse(o)}catch(r){let i=r instanceof Error?r.message:"Unknown error";throw new d(c`Invalid JSON in variable file ${s.path(t)}: ${i}`,"Please provide valid JSON format.")}}}function Pa(e){let t;try{t=(0,qn.parse)(e)}catch(r){throw r instanceof Error?new d(`Invalid GraphQL syntax: ${r.message}`):r}let o=t.definitions.filter(r=>r.kind==="OperationDefinition");if(o.length!==1)throw new d("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.");return{operationDefinition:o[0]}}function Fa(e){return e.operationDefinition.operation==="mutation"}function Ca(e,t=!1){if(Fa(e)&&!t)throw new d("Mutations are disabled by default for shopify store execute.","Re-run with --allow-mutations if you intend to modify store data.")}async function $n(e){let t=await Na({query:e.query,queryFile:e.queryFile}),o=Pa(t);Ca(o,e.allowMutations);let r=await Oa(e.variables,e.variableFile);return{query:t,parsedOperation:o,parsedVariables:r,requestedVersion:e.version}}n();n();n();n();function Ct(e){if(!e||typeof e!="object"||!("response"in e))return!1;let t=e.response;return!!t&&typeof t=="object"}function Un(e){if(!Ct(e))return;let t=e.response.status;return typeof t=="number"?t:void 0}var Mn=["the user aborted a request","the operation was aborted"];function Da(e){if(!(e instanceof Error))return!1;if(e.name==="AbortError")return!0;let t=e.message.toLowerCase();return Mn.some(o=>t.includes(o))}function Fe(e,t){if(Un(e)===402)return new d(`The store ${t} is currently unavailable.`,"Check the store in the Shopify admin and try again once it is reactivated.");if(Da(e))return new d(`Request to ${t} was aborted before it completed.`)}function Ce(e,t){let o=Un(e);o!==401&&o!==404||(t.kind!=="preview"&&Ue(t.store,t.userId),Qe(t))}var La=`
81
95
  query StoreExecutePublicApiVersions {
82
96
  publicApiVersions {
83
97
  handle
84
98
  supported
85
99
  }
86
100
  }
87
- `;async function Co(e){try{return(await G({query:zn,api:"Admin",url:Y(e.adminSession.storeFqdn,"unstable",e.adminSession),token:e.adminSession.token,responseOptions:{handleErrors:!1}})).publicApiVersions}catch(t){let o=Po(t);(o===401||o===404)&&(K(e.session.store,e.session.userId),R(`Stored app authentication for ${e.session.store} is no longer valid.`,e.session.store,e.session.scopes.join(",")));let n=Do(t,e.adminSession.storeFqdn);throw n||t}}async function Fo(e){try{return await M({title:c`Executing GraphQL operation`,task:async()=>G({query:e.request.query,api:"Admin",url:Y(e.context.adminSession.storeFqdn,e.context.version,e.context.adminSession),token:e.context.adminSession.token,variables:e.request.parsedVariables,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}})}catch(t){De(t)&&t.response.status===401&&(K(e.context.session.store,e.context.session.userId),R(`Stored app authentication for ${e.context.session.store} is no longer valid.`,e.context.session.store,e.context.session.scopes.join(",")));let o=Do(t,e.context.adminSession.storeFqdn);throw o||(De(t)&&t.response.errors?new s("GraphQL operation failed.",JSON.stringify({errors:t.response.errors},null,2)):t)}}function De(e){if(!e||typeof e!="object"||!("response"in e))return!1;let t=e.response;return!!t&&typeof t=="object"}function Po(e){if(!De(e))return;let t=e.response.status;return typeof t=="number"?t:void 0}var Mn=["the user aborted a request","the operation was aborted"];function Hn(e){if(!(e instanceof Error))return!1;if(e.name==="AbortError")return!0;let t=e.message.toLowerCase();return Mn.some(o=>t.includes(o))}function Do(e,t){if(Po(e)===402)return new s(`The store ${t} is currently unavailable.`,"Check the store in the Shopify admin and try again once it is reactivated.");if(Hn(e))return new s(`Request to ${t} was aborted before it completed.`)}async function Vn(e){let{session:t,adminSession:o,userSpecifiedVersion:n}=e;if(n==="unstable")return n;let r=await Co({adminSession:o,session:t});if(!n)return r.filter(p=>p.supported).map(p=>p.handle).sort().reverse()[0];let u=r.map(d=>d.handle);if(u.includes(n))return n;throw new s(`Invalid API version: ${n}`,`Allowed versions: ${u.join(", ")}`)}async function qo(e){let t=await me(e.store);await U(t.store,!0),oe(t.userId);let o={token:t.accessToken,storeFqdn:t.store},n=await Vn({session:t,adminSession:o,userSpecifiedVersion:e.userSpecifiedVersion});return{adminSession:o,version:n,session:t}}var jn={id:"admin",prepareContext:async({store:e,requestedVersion:t})=>qo({store:e,userSpecifiedVersion:t}),execute:async({context:e,request:t})=>Fo({context:e,request:t})};function $o(e){if(e==="admin")return jn;throw new H(`Unsupported store GraphQL API target: ${e}`)}async function Lo(e){await U(e.store,!1);let t=$o(e.api??"admin"),o=await Oo({query:e.query,queryFile:e.queryFile,variables:e.variables,variableFile:e.variableFile,version:e.version,allowMutations:e.allowMutations}),n=await M({title:c`Loading stored store auth`,task:async()=>t.prepareContext({store:e.store,requestedVersion:o.requestedVersion}),renderOptions:{stdout:process.stderr}});return t.execute({context:n,request:o})}i();function Gn(e){return JSON.stringify(e,null,2)}function Ro(e){if(e){Q({headline:"Operation succeeded.",body:`Results written to ${e}`});return}Q({headline:"Operation succeeded."})}async function Uo(e,t,o="text"){let n=Gn(e);if(t){await He(t,n),o==="text"&&Ro(t);return}o==="text"&&Ro(),v(n)}var $=z(ee(),1),qe,I=class extends N{async run(){let{flags:t}=await this.parse(qe),o=await Lo({store:t.store,query:t.query,queryFile:t["query-file"],variables:t.variables,variableFile:t["variable-file"],version:t.version,allowMutations:t["allow-mutations"]});await Uo(o,t["output-file"],t.json?"json":"text")}};qe=I;I.summary="Execute GraphQL queries and mutations on a store.";I.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store using previously stored app authentication.\n\nRun `shopify store auth` first to create stored auth for the store.\n\nMutations are disabled by default. Re-run with `--allow-mutations` if you intend to modify store data.";I.description=qe.descriptionWithoutMarkdown();I.examples=['<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "query { shop { name } }"',`<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query-file ./operation.graphql --variables '{"id":"gid://shopify/Product/1"}'`,'<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "mutation { shop { id } }" --allow-mutations','<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "query { shop { name } }" --json'];I.flags={...F,...P,query:$.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":$.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async e=>X(e),exactlyOne:["query","query-file"]}),variables:$.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":$.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async e=>X(e),exclusive:["variables"]}),store:q.store,version:$.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":$.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",parse:async e=>X(e)}),"allow-mutations":$.Flags.boolean({description:"Allow GraphQL mutations to run against the target store.",env:"SHOPIFY_FLAG_ALLOW_MUTATIONS",default:!1})};var zo=I;i();i();i();i();var Mo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoDestinations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"destinations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}},{kind:"Argument",name:{kind:"Name",value:"shopsOnly"},value:{kind:"BooleanValue",value:!0}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"25"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicId"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};i();var Ho={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoOwningOrg"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"destinationPublicId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DestinationPublicID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationForDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destinationPublicId"},value:{kind:"Variable",name:{kind:"Name",value:"destinationPublicId"}}}],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"}}]}}]}}]};async function Vo(e){let t=e.token??await T(),o={type:"token_refresh",handler:async()=>({token:await T()})},n=W(e.store)??e.store.toLowerCase(),r=n.split(".")[0]??n,p=((await be({query:Mo,token:t,variables:{search:r},unauthorizedHandler:o})).currentUserAccount?.destinations.nodes??[]).find(l=>Qn(l,n));if(!p)throw new s(`Couldn't find a store with domain ${e.store} for the current account.`,"Verify the domain (must be the canonical `myshopify.com` FQDN) and that you are signed in to an account with access to the store. Inactive shops are not searchable.");let g=await Bn(String(p.publicId),t,o);return{...g?{owningOrg:g}:{}}}async function Bn(e,t,o){try{let r=(await be({query:Ho,token:t,variables:{destinationPublicId:e},unauthorizedHandler:o})).currentUserAccount?.organizationForDestination;if(!r){m(`No owning organization returned for destination ${e}.`);return}let u=r.id?wt(r.id):void 0;return{name:r.name,...u?{id:u}:{}}}catch(n){m(`Failed to resolve owning organization: ${Yn(n)}`);return}}function Qn(e,t){return[e.primaryDomain,e.webUrl].some(o=>W(o)===t)}function Yn(e){return e instanceof Error?e.message:String(e)}i();i();var jo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoShop"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},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:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"5"}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}}],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:"shopifyShopId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"developerPreviewHandle"}},{kind:"Field",name:{kind:"Name",value:"planName"}},{kind:"Field",name:{kind:"Name",value:"ownerDetails"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fullName"}},{kind:"Field",name:{kind:"Name",value:"email"}},{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:"__typename"}}]}}]}}]};async function Go(e){let t=e.token??await T(),o={type:"token_refresh",handler:async()=>({token:await T()})},r=(await B({query:jo,token:t,organizationId:e.organizationId,variables:{search:e.store},unauthorizedHandler:o})).organization?.accessibleShops?.edges??[],u=e.store.toLowerCase(),d=r.map(p=>p.node).find(p=>W(p.primaryDomain)===u);if(!d)throw new H(`Couldn't find shop ${e.store} inside organization ${e.organizationId}.`,"The shop matched a global lookup but is not listed under its parent organization. This usually means the search index is stale; try again in a moment.");return{shopifyShopId:d.shopifyShopId??void 0,name:d.name,primaryDomain:d.primaryDomain??void 0,storeType:d.storeType??void 0,developerPreviewHandle:d.developerPreviewHandle??void 0,planName:d.planName??void 0,ownerName:d.ownerDetails?.fullName??void 0,ownerEmail:d.ownerDetails?.email??void 0}}i();var Wn={basic:"basic",professional:"grow",grow:"grow",unlimited:"advanced",advanced:"advanced",shopify_plus:"plus",plus:"plus"};function Bo(e){if(e)return Wn[e.toLowerCase()]}async function Qo(e){let t=e.store;if(!t)throw new s("No store specified.","Pass the `myshopify.com` domain via the `--store` flag, e.g. `shopify store info --store shop.myshopify.com`.");let o=await Vo({store:t}),n=await Jn(o,t);return Kn({store:t,destinationsCtx:o,orgShop:n})}async function Jn(e,t){if(!e.owningOrg?.id){m("Owning organization id is unknown; skipping BP Organizations shop lookup.");return}try{return await Go({store:t,organizationId:e.owningOrg.id})}catch(o){m(`BP Organizations shop lookup failed: ${o instanceof Error?o.message:String(o)}`);return}}function Kn(e){let{store:t,destinationsCtx:o,orgShop:n}=e,r={id:Zn(n?.shopifyShopId),displayName:n?.name,organizationId:o.owningOrg?.id,organizationName:o.owningOrg?.name,storeOwner:Xn(n),type:or(n?.storeType),plan:Bo(n?.planName),featurePreview:n?.developerPreviewHandle,adminUrl:er(xt(t))};return{...Ae(r),subdomain:t}}function Zn(e){if(e)return`gid://shopify/Shop/${e}`}function Xn(e){if(!e)return;let t=Ae({name:e.ownerName,email:e.ownerEmail});return Object.keys(t).length>0?t:void 0}function er(e){if(e)return`https://admin.shopify.com/store/${encodeURIComponent(e)}`}var tr={APP_DEVELOPMENT:"dev",CLIENT_TRANSFER:"client_transfer",COLLABORATOR:"collaborator",DEVELOPMENT:"dev",DEVELOPMENT_SUPERSET:"dev",PRODUCTION:"production"};function or(e){if(e)return tr[e]}i();function Yo(e,t){if(t==="json"){v(JSON.stringify(e,null,2));return}Qe({customSections:[{title:"Store details",body:{list:{items:nr(e)}}}]})}function nr(e){let t=[];return O(t,"ID",e.id),O(t,"Display Name",e.displayName),O(t,"Subdomain",e.subdomain),O(t,"Organization",e.organizationName),O(t,"Store owner",rr(e.storeOwner)),O(t,"Type",e.type?ye(e.type):void 0),O(t,"Plan",e.plan?ye(e.plan):void 0),O(t,"Feature Preview",e.featurePreview),O(t,"Admin URL",e.adminUrl),t}function rr(e){if(e)return e.name&&e.email?`${e.name} (${e.email})`:e.name??e.email}function O(e,t,o){o&&e.push(`${t}: ${o}`)}var $e,C=class extends N{async run(){let{flags:t}=await this.parse($e),o=await Qo({store:t.store});Yo(o,t.json?"json":"text")}};$e=C;C.summary="Surface metadata about a Shopify store.";C.descriptionWithMarkdown="Returns metadata about a store you have access to: id, display name, subdomain, organization, store owner, type, plan, feature preview, and admin URL.\n\nUse `--json` for machine-readable output.";C.description=$e.descriptionWithoutMarkdown();C.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json"];C.flags={...F,...P,store:q.store};var Wo=C;var ir={"store:auth":Ao,"store:create:dev":Eo,"store:execute":zo,"store:info":Wo},le=ir;i();i();var ar=async e=>{bt(),process.env.COMMAND_RUN_ID=te()},Jo=ar;var fe={"app:build":Tt,"app:bulk:cancel":Nt,"app:bulk:status":_t,"app:deploy":Ft,"app:dev":Pt,"app:dev:clean":to,"app:logs":Dt,"app:logs:sources":qt,"app:import-custom-data-definitions":no,"app:import-extensions":Bt,"app:info":Qt,"app:init":Yt,"app:config:validate":Wt,"app:release":Jt,"app:config:link":Et,"app:config:use":It,"app:config:pull":Ot,"app:env:pull":$t,"app:env:show":Lt,"app:execute":Ut,"app:bulk:execute":Rt,"app:function:build":zt,"app:function:replay":Mt,"app:function:run":Ht,"app:function:info":oo,"app:function:schema":Vt,"app:function:typegen":jt,"app:generate:extension":Gt,"app:versions:list":Kt,"app:webhook:trigger":Zt,"demo:watcher":Ct,"organization:list":ro},sr=eo,cr=Jo,dr=Xt;import ur from"fs";var Cd=At.init;(0,Zo.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",e=>{e instanceof We?Ye(e):ur.writeSync(process.stderr.fd,`${e.stack??e.message??e}
88
- `),process.exit(1)});var mr=["SIGINT","SIGTERM","SIGQUIT"];mr.forEach(e=>{process.on(e,()=>{process.exit(1)})});var Ko=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(Ko)||(process.stdout.columns=Ko);async function pr({development:e}){await ut({moduleURL:import.meta.url,development:e})}V.plugins.hidden=!0;V["plugins:install"].description="";var lr=Object.keys(fe);lr.forEach(e=>{fe[e].customPluginName="@shopify/app"});var fr=Object.keys(re);fr.forEach(e=>{re[e].customPluginName="@shopify/theme"});var hr=Object.keys(ie);hr.forEach(e=>{ie[e].customPluginName="@shopify/cli-hydrogen"});var gr=Object.keys(le);gr.forEach(e=>{le[e].customPluginName="@shopify/store"});var kr=Object.keys(ae);kr.forEach(e=>{ae[e].customPluginName="@oclif/plugin-commands"});var Sr=Object.keys(se);Sr.forEach(e=>{se[e].customPluginName="@shopify/plugin-did-you-mean"});var yr=Object.keys(V);yr.forEach(e=>{V[e].customPluginName="@oclif/plugin-plugins"});var Fd={...fe,...re,...V,...se,...ae,...ie,...le,search:et,upgrade:tt,version:Xe,help:lt,"auth:logout":ot,"auth:login":nt,"debug:command-flags":rt,"kitchen-sink":ct,"kitchen-sink:async":it,"kitchen-sink:prompts":at,"kitchen-sink:static":st,"doctor-release":dt,"doctor-release:theme":mt,"docs:generate":pt,"notifications:list":ft,"notifications:generate":ht,"cache:clear":gt,"config:autoupgrade:off":kt,"config:autoupgrade:on":St,"config:autoupgrade:status":yt},Pd=pr;export{cr as AppInitHook,dr as AppPublicMetadataHook,sr as AppSensitiveMetadataHook,Fd as COMMANDS,sn as DidYouMeanHook,Cd as HydrogenInitHook,an as PluginHook,cn as TunnelProviderHook,dn as TunnelStartHook,Pd as default,on as fetchStoreThemes,nn as pull,rn as push};
101
+ `;async function zn(e){try{return(await se({query:La,api:"Admin",url:ce(e.adminSession.storeFqdn,"unstable",e.adminSession),token:e.adminSession.token,responseOptions:{handleErrors:!1}})).publicApiVersions}catch(t){Ce(t,e.session);let o=Fe(t,e.adminSession.storeFqdn);throw o||t}}async function Hn(e){try{return await R({title:c`Executing GraphQL operation`,task:async()=>se({query:e.request.query,api:"Admin",url:ce(e.context.adminSession.storeFqdn,e.context.version,e.context.adminSession),token:e.context.adminSession.token,variables:e.request.parsedVariables,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}})}catch(t){Ce(t,e.context.session);let o=Fe(t,e.context.adminSession.storeFqdn);throw o||(Ct(t)&&t.response.errors?new d("GraphQL operation failed.",JSON.stringify({errors:t.response.errors},null,2)):t)}}n();async function Dt(e){let t=await C(E(e));return await N(t.store,!0),D(t.userId),{adminSession:{token:t.accessToken,storeFqdn:t.store},session:t}}async function Ra(e){let{session:t,adminSession:o,userSpecifiedVersion:r}=e;if(r==="unstable")return r;let i=await zn({adminSession:o,session:t});if(!r)return i.filter(m=>m.supported).map(m=>m.handle).sort().reverse()[0];let a=i.map(u=>u.handle);if(a.includes(r))return r;throw new d(`Invalid API version: ${r}`,`Allowed versions: ${a.join(", ")}`)}async function Bn(e){let{adminSession:t,session:o}=await Dt(e.store),r=await Ra({session:o,adminSession:t,userSpecifiedVersion:e.userSpecifiedVersion});return{adminSession:t,version:r,session:o}}var qa={id:"admin",prepareContext:async({store:e,requestedVersion:t})=>Bn({store:e,userSpecifiedVersion:t}),execute:async({context:e,request:t})=>Hn({context:e,request:t})};function Gn(e){if(e==="admin")return qa;throw new ee(`Unsupported store GraphQL API target: ${e}`)}async function Vn(e){await N(e.store,!1);let t=Gn(e.api??"admin"),o=await $n({query:e.query,queryFile:e.queryFile,variables:e.variables,variableFile:e.variableFile,version:e.version,allowMutations:e.allowMutations}),r=await R({title:c`Loading stored store auth`,task:async()=>t.prepareContext({store:e.store,requestedVersion:o.requestedVersion}),renderOptions:{stdout:process.stderr}});return t.execute({context:r,request:o})}n();function $a(e){return JSON.stringify(e,null,2)}function jn(e){if(e){b({headline:"Operation succeeded.",body:`Results written to ${e}`});return}b({headline:"Operation succeeded."})}async function Wn(e,t,o="text"){let r=$a(e);if(t){await Re(t,r),o==="text"&&jn(t);return}o==="text"&&jn(),v(r)}var re=B(ae(),1),Lt,J=class extends k{async run(){let{flags:t}=await this.parse(Lt),o=await Vn({store:t.store,query:t.query,queryFile:t["query-file"],variables:t.variables,variableFile:t["variable-file"],version:t.version,allowMutations:t["allow-mutations"]});await Wn(o,t["output-file"],t.json?"json":"text")}};Lt=J;J.summary="Execute GraphQL queries and mutations on a store.";J.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store using previously stored app authentication.\n\nRun `shopify store auth` first to create stored auth for the store.\n\nMutations are disabled by default. Re-run with `--allow-mutations` if you intend to modify store data.";J.description=Lt.descriptionWithoutMarkdown();J.examples=['<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "query { shop { name } }"',`<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query-file ./operation.graphql --variables '{"id":"gid://shopify/Product/1"}'`,'<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "mutation { shop { id } }" --allow-mutations','<%= config.bin %> <%= command.id %> --store shop.myshopify.com --query "query { shop { name } }" --json'];J.flags={...y,...T,query:re.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":re.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async e=>ie(e),exactlyOne:["query","query-file"]}),variables:re.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":re.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async e=>ie(e),exclusive:["variables"]}),store:w.store,version:re.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":re.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",parse:async e=>ie(e)}),"allow-mutations":re.Flags.boolean({description:"Allow GraphQL mutations to run against the target store.",env:"SHOPIFY_FLAG_ALLOW_MUTATIONS",default:!1})};var Qn=J;n();n();async function Yn(e){let t=Ua(e.store),o=Qo();await Yo({port:e.port,storeFqdn:e.store,tokenProvider:t,key:o,protectMutations:!e.allowMutations,query:e.query,variables:e.variables,apiVersion:e.apiVersion,additionalReadyMessages:[c`Mutations are ${e.allowMutations?s.green("allowed"):s.yellow("blocked")}.`],abortSignal:e.abortSignal})}function Ua(e){return{getToken:async()=>(await C(e)).accessToken,refreshToken:async()=>(await C(e)).accessToken}}var Ze=B(ae(),1),Rt,K=class extends k{async run(){let{flags:t}=await this.parse(Rt);await Yn({store:t.store,port:t.port,allowMutations:t["allow-mutations"],variables:t.variables,apiVersion:t.version})}};Rt=K;K.summary="Open a local GraphiQL UI for a store.";K.descriptionWithMarkdown="Opens an authenticated Admin API GraphiQL UI for the specified store using previously stored app authentication.\n\nRun `shopify store auth` first to create stored auth for the store.\n\nMutations are disabled by default. Re-run with `--allow-mutations` if you intend to modify store data.";K.description=Rt.descriptionWithoutMarkdown();K.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --allow-mutations","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];K.flags={...y,store:w.store,port:co({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),"allow-mutations":Ze.Flags.boolean({description:"Allow GraphQL mutations to run against the target store.",env:"SHOPIFY_FLAG_ALLOW_MUTATIONS",default:!1}),variables:Ze.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:Ze.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};var Jn=K;n();n();n();n();var Kn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoDestinations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"destinations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}},{kind:"Argument",name:{kind:"Name",value:"shopsOnly"},value:{kind:"BooleanValue",value:!0}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"25"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicId"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};n();var Xn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoOwningOrg"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"destinationPublicId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DestinationPublicID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationForDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destinationPublicId"},value:{kind:"Variable",name:{kind:"Name",value:"destinationPublicId"}}}],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"}}]}}]}}]};var De=class extends d{};async function Zn(e){let t=e.token??await L([],{noPrompt:e.noPrompt}),o=oe({noPrompt:e.noPrompt}),r=G(e.store)??e.store.toLowerCase(),i=r.split(".")[0]??r,m=((await ft({query:Kn,token:t,variables:{search:i},unauthorizedHandler:o})).currentUserAccount?.destinations.nodes??[]).find(h=>za(h,r));if(!m)throw new De(`Couldn't find a store with domain ${e.store} for the current account.`,"Verify the domain (must be the canonical `myshopify.com` FQDN) and that you are signed in to an account with access to the store. Inactive shops are not searchable.");let l=await Ma(String(m.publicId),t,o);return{...l?{owningOrg:l}:{}}}async function Ma(e,t,o){try{let i=(await ft({query:Xn,token:t,variables:{destinationPublicId:e},unauthorizedHandler:o})).currentUserAccount?.organizationForDestination;if(!i){f(`No owning organization returned for destination ${e}.`);return}let a=i.id?Vo(i.id):void 0;return{name:i.name,...a?{id:a}:{}}}catch(r){f(`Failed to resolve owning organization: ${Ha(r)}`);return}}function za(e,t){return[e.primaryDomain,e.webUrl].some(o=>G(o)===t)}function Ha(e){return e instanceof Error?e.message:String(e)}n();n();var ei={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StoreInfoShop"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},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:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"5"}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}}],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:"shopifyShopId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"developerPreviewHandle"}},{kind:"Field",name:{kind:"Name",value:"planName"}},{kind:"Field",name:{kind:"Name",value:"ownerDetails"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fullName"}},{kind:"Field",name:{kind:"Name",value:"email"}},{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:"__typename"}}]}}]}}]};async function ti(e){let t=e.token??await L([],{noPrompt:e.noPrompt}),o=oe({noPrompt:e.noPrompt}),i=(await de({query:ei,token:t,organizationId:e.organizationId,variables:{search:e.store},unauthorizedHandler:o})).organization?.accessibleShops?.edges??[],a=e.store.toLowerCase(),u=i.map(m=>m.node).find(m=>G(m.primaryDomain)===a);if(!u)throw new ee(`Couldn't find shop ${e.store} inside organization ${e.organizationId}.`,"The shop matched a global lookup but is not listed under its parent organization. This usually means the search index is stale; try again in a moment.");return{shopifyShopId:u.shopifyShopId??void 0,name:u.name,primaryDomain:u.primaryDomain??void 0,storeType:u.storeType??void 0,developerPreviewHandle:u.developerPreviewHandle??void 0,planName:u.planName??void 0,ownerName:u.ownerDetails?.fullName??void 0,ownerEmail:u.ownerDetails?.email??void 0}}n();function oi(e){if(e)return wn[e.toLowerCase()]}n();var Ba={APP_DEVELOPMENT:"dev",CLIENT_TRANSFER:"client_transfer",COLLABORATOR:"collaborator",DEVELOPMENT:"dev",DEVELOPMENT_SUPERSET:"dev",PRODUCTION:"production"};function et(e){if(e)return Ba[e]}function ri(e){return e?Ae(e):""}var Ga=`#graphql
102
+ query StoreInfoAdminShop {
103
+ shop {
104
+ id
105
+ name
106
+ myshopifyDomain
107
+ email
108
+ shopOwnerName
109
+ plan {
110
+ publicDisplayName
111
+ partnerDevelopment
112
+ }
113
+ }
114
+ }
115
+ `;async function tt(e){let t=e.store;if(!t)throw new d("No store specified.","Pass the `myshopify.com` domain via the `--store` flag, e.g. `shopify store info --store shop.myshopify.com`.");let o=te(t);if(Qa(o)){await N(o.store,!0,o.preview.shopId);let i=await Ya(o);return os({store:t,previewSession:o,previewStoreUrls:i})}let r=!!o;try{return await ja(t,{noPrompt:r})}catch(i){if(!r||!Ka(i))throw i;return f(`BP store info lookup failed; falling back to stored store auth: ${Za(i)}`),Va(t)}}async function Va(e){let t=await C(e);await N(t.store,!0),D(t.userId);let o=await Wa(t);return es({store:t.store,shop:o})}async function ja(e,t={}){let o=await Zn({store:e,noPrompt:t.noPrompt}),r=await Ja(o,e,{noPrompt:t.noPrompt});return ts({store:e,destinationsCtx:o,orgShop:r})}async function Wa(e){try{let t=await se({query:Ga,api:"Admin",url:ce(e.store,"unstable"),token:e.accessToken,responseOptions:{handleErrors:!1}});if(!t.shop)throw new d(`Shopify did not return store information for ${e.store}.`);return t.shop}catch(t){Ce(t,e);let o=Fe(t,e.store);throw o||t}}function Qa(e){return e?.kind==="preview"&&e.preview!==void 0}async function Ya(e){try{let t=await On({shopId:e.preview.shopId,adminApiToken:e.accessToken});return{accessUrl:t.accessUrl,...t.claimUrl?{saveUrl:t.claimUrl}:{}}}catch(t){throw t instanceof Pe&&(t.status===401||t.status===404)&&Qe(e),t}}async function Ja(e,t,o={}){if(!e.owningOrg?.id){f("Owning organization id is unknown; skipping BP Organizations shop lookup.");return}try{return await ti({store:t,organizationId:e.owningOrg.id,noPrompt:o.noPrompt})}catch(r){f(`BP Organizations shop lookup failed: ${r instanceof Error?r.message:String(r)}`);return}}function Ka(e){return e instanceof De||Xa(e)}function Xa(e){return e instanceof d&&e.message.includes("unable to prompt for reauthentication")}function Za(e){return e instanceof Error?e.message:String(e)}function es(e){let{store:t,shop:o}=e,r=o.myshopifyDomain??t,i={id:o.id,displayName:o.name,storeOwner:rs(o),type:o.plan?.partnerDevelopment?"dev":void 0,plan:o.plan?.publicDisplayName,adminUrl:ii(St(r))};return{...le(i),subdomain:r}}function ts(e){let{store:t,destinationsCtx:o,orgShop:r}=e,i={id:ni(r?.shopifyShopId),displayName:r?.name,organizationId:o.owningOrg?.id,organizationName:o.owningOrg?.name,storeOwner:ns(r),type:et(r?.storeType),plan:oi(r?.planName),featurePreview:r?.developerPreviewHandle,adminUrl:ii(St(t))};return{...le(i),subdomain:t}}function os(e){let{store:t,previewSession:o,previewStoreUrls:r}=e,i={id:ni(o.preview.shopId),displayName:o.preview.name,accessUrl:r.accessUrl,saveUrl:r.saveUrl};return{...le(i),subdomain:t,authScopes:o.scopes}}function ni(e){if(e)return`gid://shopify/Shop/${e}`}function rs(e){let t=le({name:e.shopOwnerName,email:e.email});return Object.keys(t).length>0?t:void 0}function ns(e){if(!e)return;let t=le({name:e.ownerName,email:e.ownerEmail});return Object.keys(t).length>0?t:void 0}function ii(e){if(e)return`https://admin.shopify.com/store/${encodeURIComponent(e)}`}n();function ai(e,t){if(t==="json"){v(JSON.stringify(e,null,2));return}let o=as(e);_({customSections:[{title:"Store details",body:{tabularData:is(e),firstColumnSubdued:!0}},...o.length>0?[{body:{list:{title:{bold:"Next steps"},items:o}}}]:[]]})}function is(e){let t=[];return ne(t,"ID",e.id),ne(t,"Display Name",e.displayName),ne(t,"Subdomain",e.subdomain),ne(t,"Organization",e.organizationName),ne(t,"Store owner",ss(e.storeOwner)),ne(t,"Type",e.type?Ae(e.type):void 0),ne(t,"Plan",e.plan?Ae(e.plan):void 0),ne(t,"Feature Preview",e.featurePreview),t}function as(e){let t=[];return qt(t,e.adminUrl,"Manage this store in the Shopify admin"),qt(t,e.accessUrl,"View your store"),qt(t,e.saveUrl,"Save your store"),t}function ss(e){if(e)return e.name&&e.email?`${e.name} (${e.email})`:e.name??e.email}function ne(e,t,o){o&&e.push([t,o])}function qt(e,t,o){t&&e.push({link:{label:o,url:t}})}var $t,X=class extends k{async run(){let{flags:t}=await this.parse($t),o=await tt({store:t.store});ai(o,t.json?"json":"text")}};$t=X;X.summary="Surface metadata about a Shopify store.";X.descriptionWithMarkdown=`Returns available metadata about a store you have access to, such as its id, display name, subdomain, organization, store owner, type, plan, feature preview, admin URL, and access and save URLs for preview stores.
116
+
117
+ Some details may be omitted when they are not available for the store.
118
+
119
+ Use \`--json\` for machine-readable output.`;X.description=$t.descriptionWithoutMarkdown();X.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json"];X.flags={...y,...T,store:w.store};var si=X;n();n();n();n();n();var di={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListAccessibleShops"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}],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:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"EnumValue",value:"SHOP_CREATED_AT_DESC"}},{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_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}}]}]}}],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:"shopifyShopId"}},{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:"url"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{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:"__typename"}}]}}]}}]};async function ci(e){let{entries:t,hasMore:o}=await ds(e.token,e.organization);return{entries:t.sort(us),hasMore:o}}async function ds(e,t){let o=oe(),i=(await de({query:di,token:e,organizationId:t.id,variables:{first:250},unauthorizedHandler:o})).organization?.accessibleShops;if(!i)return{entries:[],hasMore:!1};let a=[];for(let u of i.edges){let m=cs(u.node,t);m&&a.push(m)}return{entries:a,hasMore:i.pageInfo.hasNextPage}}function cs(e,t){let o=e.url??e.primaryDomain;if(o)return{...e.shopifyShopId?{id:`gid://shopify/Shop/${e.shopifyShopId}`}:{},store:G(o)??o,createdAt:typeof e.createdAt=="string"?e.createdAt:String(e.createdAt),organizationId:t.id,organizationName:t.businessName,name:e.name,type:et(e.storeType)}}function us(e,t){return e.createdAt===t.createdAt?e.store.localeCompare(t.store):t.createdAt.localeCompare(e.createdAt)}async function ui(e={}){let t=await L(),o=await jo(t);if(!o.currentUserResolved)return{stores:[],source:"organization",notice:"Couldn't resolve a Shopify account for the current CLI session."};if(o.organizations.length===0)return{stores:[],source:"organization"};if(!e.organizationId&&o.organizations.length>1&&!oo())throw new d("An organization ID is required to list stores non-interactively.","Provide `--organization-id`, for example `--organization-id 1234567`. Run `shopify organization list` to find IDs.");let r=await ms(o.organizations,e.organizationId),i=await ci({token:t,organization:r}),{stores:a,truncated:u}=ls(i.entries,i.hasMore);return{stores:a,source:"organization",organization:ps(r),...u?{truncated:!0}:{}}}async function ms(e,t){if(t){let a=e.find(u=>u.id===t.toString());if(!a)throw new d(`Organization with ID ${t} not found.`,`Available organizations: ${e.map(u=>`${u.businessName} (${u.id})`).join(", ")}`);return a}if(e.length===1)return e[0];let r=new Set(e.map(a=>a.businessName)).size<e.length,i=await eo({message:"Which organization do you want to use?",choices:e.map(a=>({label:r?`${a.businessName} (${a.id})`:a.businessName,value:a.id}))});return e.find(a=>a.id===i)}function ps(e){return{id:e.id,name:e.businessName}}function ls(e,t){return{stores:e.slice(0,250),truncated:t||e.length>250}}n();function mi(e,t){if(e.notice&&ht(e.notice),e.truncated&&ht(fs(e)),t==="json"){v(JSON.stringify({stores:e.stores,...e.organization?{organization:e.organization}:{},...e.notice?{notice:e.notice}:{},...e.truncated?{truncated:!0}:{}},null,2));return}hs(e)}function fs(e){let t=e.organization?` in ${e.organization.name}`:" in this organization";return`Showing the ${250} most recent stores${t}. More stores exist.`}function hs(e){if(e.stores.length===0){P(Ss(e));return}e.organization&&P(`Organization: ${e.organization.name} (${e.organization.id})`),gs(e.stores),P("To list stores authenticated directly with `shopify store auth`, run `shopify store auth list`.")}function gs(e){fe({rows:e.map(t=>({subdomain:ys(t.store),name:t.name??"",type:ri(t.type),created:Ve(t.createdAt)})),columns:{subdomain:{header:"Subdomain"},name:{header:"Name"},type:{header:"Type"},created:{header:"Created"}}})}function Ss(e){return e.notice?["No stores were returned for the current CLI session.","","Run `shopify store auth list` to list stores authenticated directly with `shopify store auth`."].join(`
120
+ `):e.organization?`No stores found in ${e.organization.name}.`:["No stores found in your Shopify organization.","","Run `shopify store auth list` to list stores authenticated directly with `shopify store auth`."].join(`
121
+ `)}function ys(e){return je(e)??e}var Ut,z=class extends k{async run(){let{flags:t}=await this.parse(Ut),o=await ui({organizationId:t["organization-id"]});mi(o,t.json?"json":"text")}};Ut=z;z.hidden=!0;z.summary="List stores in a Shopify organization.";z.descriptionWithMarkdown="Lists stores in a Shopify organization available to the current CLI account.\n\nWhen more than one organization is available, the command prompts you to pick one unless you provide `--organization-id`.\nIn non-interactive environments, `--organization-id` is required.\n\nRun `<%= config.bin %> organization list` to find organization IDs.";z.description=Ut.descriptionWithoutMarkdown();z.examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --organization-id 1234567","<%= config.bin %> <%= command.id %> --json"];z.flags={...y,...T,"organization-id":w["organization-id"]};var pi=z;n();n();var ks={getStoreInfo:tt,openURL:$e};async function li(e,t={}){let{getStoreInfo:o,openURL:r}={...ks,...t},i=await o({store:e.store}),a=ws(i);if(await r(a)){_({headline:`Opening the storefront for ${e.store} in your browser.`});return}_({headline:"Browser didn't open automatically. Open the storefront manually:",body:[c`${s.link(a,a)}`.value]})}function ws(e){return e.accessUrl??`https://${e.subdomain}`}var Mt,H=class extends k{async run(){let{flags:t}=await this.parse(Mt);await li({store:t.store})}};Mt=H;H.hidden=!0;H.summary="Open your Shopify store in the default web browser.";H.descriptionWithMarkdown="Opens the storefront for a store you have access to in your default web browser.";H.description=Mt.descriptionWithoutMarkdown();H.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com"];H.flags={...y,store:w.store};var fi=H;var vs={"store:auth:list":qr,"store:auth":cn,"store:bulk:cancel":pn,"store:bulk:execute":hn,"store:bulk:status":yn,"store:stripe-auth":kn,"store:create:dev":Tn,"store:create:preview":Rn,"store:execute":Qn,"store:graphiql":Jn,"store:info":si,"store:list":pi,"store:open":fi},ot=vs;n();n();var bs=async e=>{Ko(),process.env.COMMAND_RUN_ID=pe()},hi=bs;var rt={"app:build":Xo,"app:bulk:cancel":Zo,"app:bulk:status":er,"app:deploy":ir,"app:dev":ar,"app:dev:clean":Nr,"app:logs":sr,"app:logs:sources":dr,"app:import-custom-data-definitions":Pr,"app:import-extensions":wr,"app:info":vr,"app:init":br,"app:config:validate":Ar,"app:release":xr,"app:config:link":tr,"app:config:use":or,"app:config:pull":rr,"app:env:pull":cr,"app:env:show":ur,"app:execute":pr,"app:graphiql":lr,"app:bulk:execute":mr,"app:function:build":fr,"app:function:replay":hr,"app:function:run":gr,"app:function:info":Or,"app:function:schema":Sr,"app:function:typegen":yr,"app:generate:extension":kr,"app:versions:list":_r,"app:webhook:trigger":Tr,"demo:watcher":nr,"organization:list":Fr},As=Er,xs=hi,_s=Ir;import Ts from"fs";var Kg=Jo.init;(0,Si.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",e=>{e instanceof ro?Xt(e):Ts.writeSync(process.stderr.fd,`${e.stack??e.message??e}
122
+ `),process.exit(1)});var Is=["SIGINT","SIGTERM","SIGQUIT"];Is.forEach(e=>{process.on(e,()=>{process.exit(1)})});var gi=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(gi)||(process.stdout.columns=gi);async function Es({development:e}){await so({moduleURL:import.meta.url,development:e})}ke.plugins.hidden=!0;ke["plugins:install"].description="";var Ns=Object.keys(rt);Ns.forEach(e=>{rt[e].customPluginName="@shopify/app"});var Os=Object.keys(ze);Os.forEach(e=>{ze[e].customPluginName="@shopify/theme"});var Ps=Object.keys(He);Ps.forEach(e=>{He[e].customPluginName="@shopify/cli-hydrogen"});var Fs=Object.keys(ot);Fs.forEach(e=>{ot[e].customPluginName="@shopify/store"});var Cs=Object.keys(Be);Cs.forEach(e=>{Be[e].customPluginName="@oclif/plugin-commands"});var Ds=Object.keys(Ge);Ds.forEach(e=>{Ge[e].customPluginName="@shopify/plugin-did-you-mean"});var Ls=Object.keys(ke);Ls.forEach(e=>{ke[e].customPluginName="@oclif/plugin-plugins"});var Xg={...rt,...ze,...ke,...Ge,...Be,...He,...ot,search:uo,upgrade:mo,version:ao,help:xo,"auth:logout":po,"auth:login":lo,"debug:command-flags":fo,"kitchen-sink":yo,"kitchen-sink:async":ho,"kitchen-sink:prompts":go,"kitchen-sink:static":So,"doctor-release":ko,"doctor-release:theme":wo,"doc:fetch":vo,"doc:search":bo,"docs:generate":Ao,"notifications:list":_o,"notifications:generate":To,"cache:clear":Io,"config:autoupgrade:off":Eo,"config:autoupgrade:on":No,"config:autoupgrade:status":Oo},Zg=Es;export{xs as AppInitHook,_s as AppPublicMetadataHook,As as AppSensitiveMetadataHook,Xg as COMMANDS,_i as DidYouMeanHook,Kg as HydrogenInitHook,xi as PluginHook,Ti as TunnelProviderHook,Ii as TunnelStartHook,Zg as default,vi as fetchStoreThemes,bi as pull,Ai as push};
@@ -0,0 +1 @@
1
+ import{Ab as c,Bb as d,Cb as e,yb as a,zb as b}from"./chunk-DONEJHDG.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-KKUDXLK2.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{a as currentProcessIsGlobal,e as getProjectDir,d as inferPackageManagerForGlobalCLI,c as installGlobalCLIPrompt,b as installGlobalShopifyCLI};
@@ -1 +1 @@
1
- import{g as r}from"./chunk-VPRTJUIN.js";r();import f from"node:process";import d from"node:os";import s from"node:fs";r();import l from"node:fs";r();import i from"node:fs";var t;function u(){try{return i.statSync("/.dockerenv"),!0}catch{return!1}}function a(){try{return i.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function n(){return t===void 0&&(t=u()||a()),t}var o,m=()=>{try{return l.statSync("/run/.containerenv"),!0}catch{return!1}};function e(){return o===void 0&&(o=m()||n()),o}var c=()=>{if(f.platform!=="linux")return!1;if(d.release().toLowerCase().includes("microsoft"))return!e();try{if(s.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!e()}catch{}return s.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||s.existsSync("/run/WSL")?!e():!1},I=f.env.__IS_WSL_TEST__?c:c();export{I as default};
1
+ import{g as r}from"./chunk-VKWPEFWQ.js";r();import f from"node:process";import d from"node:os";import s from"node:fs";r();import l from"node:fs";r();import i from"node:fs";var t;function u(){try{return i.statSync("/.dockerenv"),!0}catch{return!1}}function a(){try{return i.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function n(){return t===void 0&&(t=u()||a()),t}var o,m=()=>{try{return l.statSync("/run/.containerenv"),!0}catch{return!1}};function e(){return o===void 0&&(o=m()||n()),o}var c=()=>{if(f.platform!=="linux")return!1;if(d.release().toLowerCase().includes("microsoft"))return!e();try{if(s.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!e()}catch{}return s.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||s.existsSync("/run/WSL")?!e():!1},I=f.env.__IS_WSL_TEST__?c:c();export{I as default};