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
@@ -1 +0,0 @@
1
- import{g as r}from"./chunk-VPRTJUIN.js";r();
@@ -1 +0,0 @@
1
- import{$ as l,X as u,aa as p}from"./chunk-VICNWPLQ.js";import{b as d,c as f}from"./chunk-4KRT35A2.js";import{b as c}from"./chunk-VEDZUOVI.js";import{C as m}from"./chunk-MGL4YM3S.js";import{Lb as s}from"./chunk-VPL2NDH6.js";import{g as n}from"./chunk-VPRTJUIN.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-FP2NOZSD.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
@@ -1,5 +0,0 @@
1
- import{a as te,b as ne}from"./chunk-WNGV4JQS.js";import{b as T}from"./chunk-RL5BWZ7D.js";import{c as Y}from"./chunk-VYXVYOIJ.js";import{a as ee}from"./chunk-T5MK7ZSF.js";import{a as W}from"./chunk-DCK2FX6J.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-WCWNI3ZV.js";import{e as H,g as J}from"./chunk-VICNWPLQ.js";import{a as E}from"./chunk-FP2NOZSD.js";import{C as R,p as F,x as L,y as P}from"./chunk-WUK5NQSX.js";import{b as V}from"./chunk-4KRT35A2.js";import{d as v}from"./chunk-JUVAGMIH.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-MGL4YM3S.js";import{d as y}from"./chunk-BHWEA4V2.js";import{r as me}from"./chunk-3YWUSKWF.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-VPL2NDH6.js";import{e as $}from"./chunk-UARVYVLN.js";import{d as u,n as S}from"./chunk-IU2ZQ6TE.js";import{e as fe,g as p}from"./chunk-VPRTJUIN.js";p();p();p();async function ae(e,t,r){let{templates:a,groupOrder:n}=await e.templateSpecifications(t);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:n}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(s=>s.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,o={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(s,c)=>{await Y({repoUrl:s,destination:c,shallow:!0})})};return await ye(o),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async o=>{let s=await b(t,n,o,i);await T(s,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:o}){let s=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,o);await T(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),s==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),s==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(s);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),s==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:o}){let s=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,o);await T(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),s==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),o=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:o}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,o=n.map(ue=>ue.identifier),{templates:s,groupOrder:c}=await ae(r,a,o),l=await _e(s,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:o,templatesOverlimit:s}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:o??[],unavailableExtensions:s??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(o=>o.identifier===a||o.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return E.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),o=r.map(c=>c.identifier),s=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
2
- The following extension types are supported: ${o.join(", ")}`,s)}if(le(t,a,n))throw new y(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${n.type} per app`);return n}var pe=ke;var x=fe(me(),1);var O,m=class extends ee{async run(){let{flags:t}=await this.parse(O);await E.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await B(t.path);let{app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:o}=await Z({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:o}),{app:r}}};O=m;m.summary="Generate a new app Extension.";m.descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
3
-
4
- Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
5
- `;m.description=O.descriptionWithoutMarkdown();m.flags={...V,...W,template:x.Flags.string({char:"t",hidden:!1,description:"Extension template",env:"SHOPIFY_FLAG_EXTENSION_TEMPLATE"}),name:x.Flags.string({char:"n",hidden:!1,description:"name of your Extension",env:"SHOPIFY_FLAG_NAME"}),"clone-url":x.Flags.string({hidden:!0,char:"u",description:"The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",env:"SHOPIFY_FLAG_CLONE_URL"}),flavor:x.Flags.string({hidden:!1,description:"Choose a starting template for your extension, where applicable",options:["vanilla-js","react","typescript","typescript-react","wasm","rust"],env:"SHOPIFY_FLAG_FLAVOR"})};var Tt=m;export{Tt as a};
@@ -1 +0,0 @@
1
- import{r as T}from"./chunk-3YWUSKWF.js";import{Eb as x,Sb as P,vb as w}from"./chunk-VPL2NDH6.js";import{e as g}from"./chunk-IU2ZQ6TE.js";import{c as h,e as O,g as u}from"./chunk-VPRTJUIN.js";var M=h(a=>{"use strict";u();a.__esModule=void 0;a.__esModule=!0;var B=typeof Object.setPrototypeOf=="function",R=typeof Object.getPrototypeOf=="function",U=typeof Object.defineProperty=="function",q=typeof Object.create=="function",z=typeof Object.prototype.hasOwnProperty=="function",H=function(e,r){B?Object.setPrototypeOf(e,r):e.__proto__=r};a.setPrototypeOf=H;var L=function(e){return R?Object.getPrototypeOf(e):e.__proto__||e.prototype};a.getPrototypeOf=L;var j=!1,Y=function t(e,r,n){if(U&&!j)try{Object.defineProperty(e,r,n)}catch{j=!0,t(e,r,n)}else e[r]=n.value};a.defineProperty=Y;var k=function(e,r){return z?e.hasOwnProperty(e,r):e[r]===void 0};a.hasOwnProperty=k;var D=function(e,r){if(q)return Object.create(e,r);var n=function(){};n.prototype=e;var s=new n;if(typeof r>"u")return s;if(typeof r=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof r=="object")for(var o in r)k(r,o)&&(s[o]=r[o].value);return s};a.objectCreate=D});var S=h(f=>{"use strict";u();f.__esModule=void 0;f.__esModule=!0;var b=M(),G=b.setPrototypeOf,Z=b.getPrototypeOf,v=b.defineProperty,J=b.objectCreate,K=new Error().toString()==="[object Error]",m="";function p(t){var e=this.constructor,r=e.name||(function(){var y=e.toString().match(/^function\s*([^\s(]+)/);return y===null?m||"Error":y[1]})(),n=r==="Error",s=n?m:r,o=Error.apply(this,arguments);if(G(o,Z(this)),!(o instanceof e)||!(o instanceof p)){var o=this;Error.apply(this,arguments),v(o,"message",{configurable:!0,enumerable:!1,value:t,writable:!0})}if(v(o,"name",{configurable:!0,enumerable:!1,value:s,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(o,n?p:e),o.stack===void 0){var c=new Error(t);c.name=o.name,o.stack=c.stack}return K&&v(o,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),o}m=p.name||"ExtendableError";p.prototype=J(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}});f.ExtendableError=p;f.default=f.ExtendableError});u();var A=O(T()),V=O(S()),i;(function(t){t[t.Abort=0]="Abort",t[t.AbortSilent=1]="AbortSilent",t[t.Bug=2]="Bug"})(i||(i={}));var _=class extends Error{},l=class extends Error{constructor(e,r,n=null,s,o){let c=typeof e=="string"||"value"in e;super(c?P(e):w(e)),n?n instanceof x?this.tryMessage=P(n):this.tryMessage=n:this.tryMessage=null,this.type=r,this.nextSteps=s,this.customSections=o,this.skipOclifErrorHandling=!0,c||(this.formattedMessage=e)}},E=class extends l{constructor(e,r=null,n,s){super(e,i.Abort,r,n,s)}},I=class extends l{constructor(e,r,n,s=null){super(e,i.Abort,s),this.command=r,this.args=n}},C=class extends l{constructor(){super("",i.AbortSilent)}},d=class extends l{constructor(e,r=null){super(e,i.Bug,r)}};async function ne(t){let e;if(N(t))e=t;else if(typeof t=="string")e=new d(t);else if(t instanceof Error)e=new d(t.message),e.stack=t.stack;else{let n=t;e=new d(n?.message??"Unknown error"),n?.stack&&(e.stack=n?.stack)}let{renderFatalError:r}=await import("./ui-H62CMRLG.js");return r(e),Promise.resolve(t)}function oe(t){if(t instanceof A.Errors.CLIError){let e=new E(t.message);return e.stack=t.stack,Promise.resolve(e)}else return Promise.resolve(t)}function N(t){try{return Object.prototype.hasOwnProperty.call(t,"type")}catch{return!1}}function se(t){if(!N(t)){if(t instanceof Error){let e=t.message;return!Q(e)}return!0}return t.type===i.Bug}function ae(t){return g(t).replace("file:/","/").replace(/^\/?[A-Z]:/,"")}function Q(t){return["EPERM: operation not permitted, scandir","EPERM: operation not permitted, rename","EACCES: permission denied","EPERM: operation not permitted, symlink","This version of npm supports the following node versions","EBUSY: resource busy or locked","ENOTEMPTY: directory not empty","getaddrinfo ENOTFOUND","Client network socket disconnected before secure TLS connection was established","spawn EPERM","socket hang up","The user aborted a request.","write EPIPE","Unsupported platform"].some(n=>t.includes(n))}export{i as a,_ as b,l as c,E as d,I as e,C as f,d as g,ne as h,oe as i,se as j,ae as k,V as l};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-2YXKZWYW.js";import{a as I,b as w}from"./chunk-QFWIDATO.js";import{a as _}from"./chunk-7BFDUVOG.js";import{a,b as u,k as S,q as b}from"./chunk-HHXHOQQP.js";import{ua as f,xa as p}from"./chunk-4V4DQ6W7.js";import{b as T,c as g}from"./chunk-4KRT35A2.js";import{g as s,u as c}from"./chunk-MGL4YM3S.js";import{d as v}from"./chunk-BHWEA4V2.js";import{r as x}from"./chunk-3YWUSKWF.js";import{Lb as l}from"./chunk-VPL2NDH6.js";import{e as L,g as m}from"./chunk-VPRTJUIN.js";m();m();function A(o,e){return{theme:{id:o.id,name:o.name,role:o.role,shop:e.storeFqdn,preview_url:I(o,e),editor_url:w(o,e)}}}function D(o){let{platform:e,arch:n}=s(),t=a(),r=null;return t&&(r=Number(u())||null),{store:t??"Not configured",development_theme_id:r,cli_version:o.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(o,e){let n;if(e.development)n=await new E(o).findOrCreate();else{let t={filter:{theme:e.theme}};n=await _(o,t)}return n?A(n,o):void 0}async function y(o){return[M(),await j(o)]}function M(){let o=a()??"Not configured",e=u();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",o],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(o){let{platform:e,arch:n}=s();return N("Tooling and System",[["Shopify CLI",o.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(o,e){return{title:o,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(o,e){let n=Object.entries(o.theme).map(([t,r])=>{if(t==="editor_url"||t==="preview_url"){let C=String(r),$=t==="editor_url"?"Open in Theme Editor":"Preview Theme";return[d(t),{link:{url:C,label:$}}]}else return t==="id"?[d(t),`#${r}`]:[d(t),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function d(o){return o.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var h=L(x(),1);var i=class extends b{async command(e,n){if(f("theme-command:info"),e.theme||e.development){let t=await O(n,e);if(!t)throw new v("Theme not found!");if(e.json)return l(JSON.stringify(t,null,2));let r=await F(t,e);c(r)}else{if(e.json)return l(JSON.stringify(D({cliVersion:this.config.version}),null,2));let t=await y({cliVersion:this.config.version});c({customSections:t})}f("theme-command:info")}};i.description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";i.flags={...T,...g,...S,development:h.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};i.multiEnvironmentsFlags=["store","password"];var k=i;export{k as a};
@@ -1 +0,0 @@
1
- import{b as u,c as d}from"./chunk-CE6FKJFS.js";import{a as m}from"./chunk-UOQ75BL3.js";import{a}from"./chunk-DCK2FX6J.js";import{Ga as c,p}from"./chunk-WCWNI3ZV.js";import{b as e}from"./chunk-4KRT35A2.js";import{v as n}from"./chunk-MGL4YM3S.js";import{g as i}from"./chunk-VPRTJUIN.js";i();var s,o=class extends m{async run(){let{flags:t}=await this.parse(s),{app:r}=await c({directory:t.path,userProvidedConfigName:t.config}),l=await d(r,t.path);return await p(l,{app:r,stdout:process.stdout,stderr:process.stderr,useTasks:!0,environment:"production"}),n({headline:"Function built successfully."}),{app:r}}};s=o;o.summary="Compile a function to wasm.";o.descriptionWithMarkdown="Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";o.description=s.descriptionWithoutMarkdown();o.flags={...e,...a,...u};var k=o;export{k as a};
@@ -1,2 +0,0 @@
1
- import{a as T}from"./chunk-OYP7DKPU.js";import{a as de}from"./chunk-TXUTT6UA.js";import{b as te,c as re,d as oe,e as se,f as ne,h as ie,i as ae,k as le,l as ce,n as me}from"./chunk-X2TC7S57.js";import{a as j}from"./chunk-MA52QGHP.js";import{A as Q,B as b,J as X,c as Y,s as B,w as N,x as V,y as x}from"./chunk-IOQQUHST.js";import{c as Z,e as ee}from"./chunk-M4V2OQAX.js";import{k as v,l as z,n as k}from"./chunk-MZJRNFAU.js";import{n as C,p as P}from"./chunk-HHXHOQQP.js";import{ta as L,xa as _}from"./chunk-4V4DQ6W7.js";import{a as O}from"./chunk-JUVAGMIH.js";import{J as K,P as J,s as W,u as M,v as q,w as R,y as U,z as G}from"./chunk-MGL4YM3S.js";import{d as H,e as I}from"./chunk-6YAXFS6V.js";import{d as g}from"./chunk-BHWEA4V2.js";import{Fb as y,Hb as p,Mb as E,Pb as f}from"./chunk-VPL2NDH6.js";import{u as w}from"./chunk-7JESXDF2.js";import{g as m}from"./chunk-VPRTJUIN.js";m();m();m();m();var fe={workPromise:Promise.resolve()};async function ue(e,t,o,r,s){if(o.length===0)return fe;f("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:n,filesWithConflictingChecksums:l}=$e(o,r),a=i.length===0&&n.length===0&&l.length===0;if(_(`theme-service:theme-reconciliation:manual:${a}`),a)return f("Local and remote checksums match - no need to reconcile theme assets"),fe;let c=await Oe({filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:n,filesWithConflictingChecksums:l},s);return{workPromise:Fe(e,t,r,c)}}function $e(e,t){let o=new Set,r=[],s=[];for(let n of e){o.add(n.key);let l=t.files.get(n.key);l?n.checksum!==l.checksum&&s.push(n):r.push(n)}let i=Array.from(t.files.values()).filter(n=>!o.has(n.key));return{filesOnlyPresentOnRemote:A(r,t),filesOnlyPresentLocally:A(i,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function S(e,t,o){if(e.length===0)return;M({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:he}]})===D?o.remote.callback(e):o.local.callback(e)}async function Fe(e,t,o,r){let{localFilesToDelete:s,filesToDownload:i,remoteFilesToDelete:n}=r,l=s.map(d=>o.delete(d.key)),a=T(i,P,async d=>{let u=await v(e.id,d.map(h=>h.key),t);return Promise.all(u.map(h=>{if(h)return o.write(h)}))}),c=z(e.id,n.map(d=>d.key),t);await Promise.all([...l,...a,c])}async function Oe(e,t){let{filesOnlyPresentLocally:o,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:s}=e,i=[],n=[],l=[];return t.noDelete||await S(o,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:a=>{i.push(...a)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await S(r,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:a=>{n.push(...a)}},local:{label:"Delete files from the remote theme",callback:a=>{l.push(...a)}}}),await S(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:a=>{n.push(...a)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:i,filesToDownload:n,remoteFilesToDelete:l}}m();var Le=3e3,$=class extends Error{};function ye(e,t,o,r,s,i){f("Listening for changes in the theme editor");let n=5,l=0,a="",c=o,d=async()=>{await new Promise(u=>setTimeout(u,Le)),c=await _e(e,t,c,r,s).then(u=>(l=0,a="",u)).catch(u=>{if(l++,u.message!==a&&(a=u.message,b("Error while polling for changes.",u)),l>=n){let h=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");U(h),i(h)}return c})};setTimeout(async()=>{for(;;)await d()})}async function _e(e,t,o,r,s){let i=new Set(r.unsyncedFileKeys),n=pe(o,r,i),l=await k(e.id,t).then(d=>pe(d,r,i)),a=Ie(n,l),c=He(l,n);return await qe(r,a),await We(e,t,r,a),await Me(r,c,s),l}function He(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>o.get(s.key)===void 0)}function Ie(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let i=o.get(s.key);if(!i||i.checksum!==s.checksum)return!0})}async function We(e,t,o,r){let s=r.filter(n=>o.files.get(n.key)?.checksum!==n.checksum),i=T(s,P,async n=>v(e.id,n.map(l=>l.key),t).then(l=>Promise.all(l.map(async a=>{a&&(await o.write(a),E(p`• ${C.format(new Date)} Synced ${y.raw("\xBB")} ${y.gray(`download ${a.key} from remote theme`)}`))}))));await Promise.all(i)}async function Me(e,t,o){if(!o.noDelete)return Promise.all(t.map(r=>{if(e.files.get(r.key))return e.delete(r.key).then(()=>{E(p`• ${C.format(new Date)} Synced ${y.raw("\xBB")} ${y.gray(`remove ${r.key} from local theme`)}`)})}))}async function qe(e,t){let o=new Map(e.files);await Promise.all(t.map(r=>e.read(r.key)));for(let r of t){let s=o.get(r.key)?.checksum,i=e.files.get(r.key)?.checksum;if(s!==i)throw new $(`Detected changes to the file '${r.key}' on both local and remote sources. Aborting...`)}}function pe(e,t,o){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!o.has(s.key))}var he="local",D="remote";async function we(e,t,o,r,s,i){f("Initiating theme asset reconciliation process"),await r.ready();let{workPromise:n}=await ue(e,t,o,r,s);return{updatedRemoteChecksumsPromise:n.then(async()=>{let a=await k(e.id,t);return ye(e,t,a,r,s,i),a}),workPromise:n}}m();function ge(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}import{createServer as Ue}from"node:http";function ke(e,t){let{promise:o,resolve:r,reject:s}=ge(),i=ie(e,t),n=Ge(e,t,s),l=Promise.all([i,n.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),a=Je(e,t,l);return{workPromise:l,serverStart:a.start,dispatchEvent:a.dispatch,renderDevSetupProgress:n.renderProgress,backgroundJobPromise:o,resolveBackgroundJob:r}}function Ge(e,t,o){let r=a=>(b("Failed to perform the initial theme synchronization.",a),o(a),new Promise(()=>{})),i=k(e.id,t.session).then(a=>Ke(e,t,a,o)),n=i.then(async({updatedRemoteChecksumsPromise:a})=>{let c=await a;return de(e,t.session,c,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:r})});return{workPromise:n.then(a=>a.workPromise).catch(r),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:c}=await i;await ee([{title:"Performing file synchronization. This may take a while...",task:async()=>{await c}}])}let{renderThemeSyncProgress:a}=await n;await a()}}}function Ke(e,t,o,r){return t.options.themeEditorSync?we(e,t.session,o,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},r):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(o),workPromise:Promise.resolve()})}function Je(e,t,o){let r=x(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];r.use(se(t.options.host,t.options.port)),r.use(V(async()=>(await o,N(n=>{n.node.req.headers.origin&&B(n,{origin:a=>s.includes(a),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&r.use(ae(e,t)),r.use(oe(e,t)),r.use(te(e,t)),r.use(re(e,t));let i=Ue(Q(r));return{dispatch:r.handler.bind(r),start:async()=>new Promise(n=>i.listen({port:t.options.port,host:t.options.host},()=>n({close:async()=>{await Promise.all([new Promise(l=>{i.closeAllConnections(),i.close(l)})])}})))}}m();import{createServer as Te}from"net";var Pe=new Set;async function Re(e,t){if(e&&await F(e))return f(p`Port ${e.toString()} is free`),e;f(p`Getting a random port...`);let o=await be(()=>ve(),t?.maxTries,t?.waitTimeInSeconds);for(let r=0;r<(t?.maxTries??5)&&Pe.has(o);r++)o=await be(()=>ve(),t?.maxTries,t?.waitTimeInSeconds);return f(p`Random port obtained: ${y.raw(`${o}`)}`),Pe.add(o),o}async function F(e){return new Promise(t=>{let o=Te();o.unref(),o.once("error",()=>t(!1));try{o.listen(e,"localhost",()=>{o.close(()=>t(!0))})}catch(r){if(!(r instanceof RangeError))throw r;t(!1)}})}function ve(){return new Promise((e,t)=>{let o=Te();o.unref(),o.once("error",t),o.listen(0,"localhost",()=>{let r=o.address();if(r&&typeof r=="object"){let s=r.port;o.close(()=>e(s))}else o.close(()=>t(new Error("Unable to determine assigned port")))})})}async function be(e,t=5,o=1){let r=1;for(;;)try{return await e()}catch(s){if(r++<t)f(p`Unknown problem getting a random port: ${s.message}`),await J(o);else throw new g(s.message)}}import ze from"readline";var Ye="127.0.0.1",je=9292,Ee=!1;async function lr(e){if(!await me(e.directory)&&!await Z(e.force))return;e.password?.startsWith("shpat_")&&R({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
2
- `,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await le(e.directory,e.listing);let t=await Y(e.adminSession).then(De=>De?j(e.storePassword,e.adminSession.storeFqdn):void 0),o=ne(),r=ce(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),s=e.host??Ye,i;if(e.port){if(!await F(e.port))throw new g(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);i=e.port}else i=await Re(je);let n={local:`http://${s}:${i}`,giftCard:`http://${s}:${i}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${i}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},l=await t,c={session:await X(e.theme.id.toString(),e.adminSession,e.password,l),localThemeFileSystem:r,localThemeExtensionFileSystem:o,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],host:s,port:i,open:e.open,liveReload:e["live-reload"],standardEventsDevBundle:!0,standardEventsInspector:e["standard-events-inspector"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:d,renderDevSetupProgress:u,backgroundJobPromise:h,resolveBackgroundJob:Ae}=ke(e.theme,c);ze.emitKeypressEvents(process.stdin);let Se=Ne(n,c,Ae);process.stdin.on("keypress",Se),await Promise.all([h,u().then(d).then(()=>{process.stdin.isTTY&&process.stdin.setRawMode(!0),xe(n),e.open&&Ce(n.local,"development server")})]),await Be(e.commandConfig,e.adminSession),process.exit(0)}async function Be(e,t){if(!Ee){Ee=!0;try{await H(()=>({store_fqdn_hash:O(t.storeFqdn)})),await I(()=>({store_fqdn:t.storeFqdn})),await L({config:e,exitMode:"ok"})}catch{}}}function Ne(e,t,o){let r=W(Ce,100,{leading:!0,trailing:!1});return(s,i)=>{if(i.ctrl&&i.name==="c"){o();return}switch(i.name){case void 0:break;case"t":r(e.local,"localhost");break;case"p":r(e.preview,"theme preview");break;case"e":r(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":r(e.giftCard,"gift card preview");break;default:break}}}function Ce(e,t){K(e).catch(Ve(t))}function Ve(e){return t=>{R({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function xe(e){q({body:[{list:{title:w.bold("Preview your theme ")+w.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${w.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${w.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${w.cyan("(g)")}`,url:e.giftCard}}]]})}export{Re as a,F as b,lr as c,Ce as d};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-6YAXFS6V.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-FP2NOZSD.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllPublicMetadata(),l=e;export{l as a};
@@ -1,3 +0,0 @@
1
- import{a as te}from"./chunk-TLSAQ6FG.js";import{O as W,va as B,xa as b,ya as Q,z as P}from"./chunk-4V4DQ6W7.js";import{b as T}from"./chunk-A5SQCM63.js";import{a as oe,b as re}from"./chunk-VEDZUOVI.js";import{a as U}from"./chunk-JUVAGMIH.js";import{A as Z,a as J,t as X,w as L,x}from"./chunk-MGL4YM3S.js";import{d as V,e as K}from"./chunk-6YAXFS6V.js";import{d as E,g as ee}from"./chunk-BHWEA4V2.js";import{r as le}from"./chunk-3YWUSKWF.js";import{Fa as z,Fb as C,Hb as c,Pb as d,Ua as _}from"./chunk-VPL2NDH6.js";import{d as H,f as F,i as Y,q as A}from"./chunk-IU2ZQ6TE.js";import{e as pe,g as u}from"./chunk-VPRTJUIN.js";u();var w=pe(le(),1);var I={path:w.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=F(t);return _(e)?z(e)?e:(x({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${Y(e)}`]}),process.exit(1)):(x({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>A(),noCacheDefault:!0}),password:w.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:w.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>P(t)}),environment:w.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ne="Wrap the value in double quotes if you're using wildcards.",ye=t=>({only:w.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ne}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:w.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ne}`,env:"SHOPIFY_FLAG_IGNORE"})});u();u();import{AsyncLocalStorage as he}from"node:async_hooks";var se=new he,N,R,D,O;function p(){return N??(N=new T({projectName:"shopify-cli-theme-conf"})),N}function q(){return R??(R=new T({projectName:"shopify-cli-development-theme-config"})),R}function G(){return D??(D=new T({projectName:"shopify-cli-repl-theme-config"})),D}function M(){return O??(O=new T({projectName:"shopify-cli-theme-store-password"})),O}function j(t=p()){return se.getStore()?.store??t.get("themeStore")}function ie(t,e=p()){e.set("themeStore",t)}function Ee(t=p()){return d(c`Getting development theme...`),q().get(f(t))}function Fe(t,e=p()){d(c`Setting development theme...`),q().set(f(e),t)}function Ae(t=p()){d(c`Removing development theme...`),q().delete(f(t))}function Pe(t=p()){return d(c`Getting REPL theme...`),G().get(f(t))}function $e(t,e=p()){d(c`Setting REPL theme to ${t}...`),G().set(f(e),t)}function be(t=p()){d(c`Removing REPL theme...`),G().delete(f(t))}function Le(t=p()){let e=f(t);return d(c`Getting storefront password for shop ${e}...`),M().get(e)}function Ce(t,e=p()){let o=f(e);d(c`Setting storefront password for shop ${o}...`),M().set(o,t)}function Ie(t=p()){let e=f(t);d(c`Removing storefront password for ${e}...`),M().delete(e)}function f(t=p()){let e=j(t);if(!e)throw new ee("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function ae(t,e){return se.run({store:t},e)}function me(t){let e=t.store??j();if(!e)throw B(new E("A store is required",`Specify the store passing ${c`${C.genericShellCommand(`--${I.store.name}=example.myshopify.com`)}`.value} or set the ${c`${C.genericShellCommand(I.store.env)}`.value} environment variable.`));return ie(e),e}u();u();var ce="shopify.theme.toml",He=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Ye=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json"],ze=50;var k=class extends re{environmentsFilename(){return ce}async command(e,o,s=!1,a,r){}async run(e){let o=this.constructor,s=o.multiEnvironmentsFlags,{args:a,flags:r}=await this.parse(o),n="password"in o.flags,h=(Array.isArray(r.environment)?r.environment:[r.environment]).filter(Boolean),l=s!==null&&s.some(i=>Array.isArray(i)?i.includes("store"):i==="store");if(h.length<=1){if(h[0]&&!r.store&&l)throw new E("Please provide a valid environment.");let i=n?await this.createSession(r):void 0,S=this.constructor.name.toLowerCase();if(b(`theme-command:${S}:single-env:authenticated`),r.path&&!_(r.path))throw new E(`Path does not exist: ${r.path}`);try{await this.command(r,i,!1,a)}finally{await this.logAnalyticsData(i)}return}if(s===null){L({body:"This command does not support multiple environments."});return}let{flags:m}=await this.parse(oe(o),this.argv);if("path"in m){this.errorOnGlobalPath();return}let y=await this.loadEnvironments(h,r,m),g=await this.validateEnvironments(y,s,n);"force"in o.flags&&!r.force&&!await this.showConfirmation(this.constructor.name,s,g)||await this.runConcurrent(g.valid)}async loadEnvironments(e,o,s){let a=new Map;for(let r of e){let n=await te(r,"shopify.theme.toml",{from:o.path,silent:!0});n?.store&&typeof n.store=="string"&&(n.store=P(n.store)),n?.path&&typeof n.path=="string"&&(n.path=F(n.path)),a.set(r,{flags:{...o,...n,...s,environment:[r]},validationFlags:{...n,...s}})}return a}async validateEnvironments(e,o,s){let a=[],r=[];for(let[n,{flags:h,validationFlags:l}]of e){let m=this.validConfig(l,o,n);if(m!==!0){let y=m.join(", ");r.push({environment:n,reason:`Missing flags: ${y}`});continue}a.push({environment:n,flags:h,requiresAuth:s})}return{valid:a,invalid:r}}async showConfirmation(e,o,s){let n={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},h=[...s.valid.map(({environment:l,flags:m})=>{let y=o.map(g=>{let v=Array.isArray(g)?g.find(i=>m[i]):g;if(v==="password")return"password";if(v==="path"&&typeof m.path=="string"){let i=m.path.split(/[/\\]/);if(i.length===1)return`path: ${m.path}`;let S=i[0]===""?`/${i[1]}`:i[0],$=i.at(-1);return`path: ${S}/.../${$}`}return v&&`${v}: ${m[v]}`}).join(", ");return[l,{subdued:y||"No flags required"}]}),...s.invalid.map(({environment:l,reason:m})=>[l,{error:`Skipping | ${m}`}])];return n.infoTable={Environment:h},s.invalid.length>0&&(n.confirmationMessage="Proceed anyway (will skip invalid environments)"),Z(n)}async runConcurrent(e){let o=new J,s=e.map(n=>n.flags.store),a=new Set(s),r=s.length===a.size?[e]:this.createSequentialGroups(e);for(let n of r)await X({processes:n.map(({environment:h,flags:l,requiresAuth:m})=>({prefix:h,action:async(y,g,v)=>{try{let i=l.store;await ae(i,async()=>{let S=m?await this.createSession(l):void 0,$=this.constructor.name.toLowerCase();b(`theme-command:${$}:multi-env:authenticated`);try{await this.command(l,S,!0,{},{stdout:y,stderr:g})}finally{await this.logAnalyticsData(S)}})}catch(i){i instanceof Error&&(i.message=`Environment ${h} failed:
2
-
3
- ${i.message}`,x({body:[i.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(s=>{let a=o.find(r=>!r.some(n=>n.flags.store===s.flags.store));a?a.push(s):o.push([s])}),o}async createSession(e){let o=e.store,s=e.password;return await W(me({store:o}),s)}validConfig(e,o,s){let a=o.filter(r=>Array.isArray(r)?!r.some(n=>e[n]):!e[r]).map(r=>Array.isArray(r)?r.join(" or "):r);return a.length>0?(L({body:[`Missing required flags in environment configuration${s?` for ${s}`:""}:`,{list:{items:a}}]}),a):!0}errorOnGlobalPath(){let e=H(A(),"shopify.theme.toml"),o=_(e);x({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=Q();await V(()=>({store_fqdn_hash:U(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await K(()=>({store_fqdn:e.storeFqdn}))}};export{j as a,Ee as b,Fe as c,Ae as d,Pe as e,$e as f,be as g,Le as h,Ce as i,Ie as j,I as k,ye as l,me as m,He as n,Ye as o,ze as p,k as q};
@@ -1,3 +0,0 @@
1
- import{c as E,d as g}from"./chunk-IWE4RUI7.js";import{b as A}from"./chunk-N5ROZKPZ.js";import{R as D}from"./chunk-4V4DQ6W7.js";import{C,u as k,v as w,x as c}from"./chunk-MGL4YM3S.js";import{g as S}from"./chunk-BHWEA4V2.js";import{Fb as a,Hb as n,Rb as b,ca as N,ha as v}from"./chunk-VPL2NDH6.js";import{u as f}from"./chunk-7JESXDF2.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();function I(e){switch(e.status){case"RUNNING":return n`Bulk operation in progress${e.objectCount>0?a.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return n`Starting`;case"COMPLETED":return n`Bulk operation succeeded: ${a.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return n`Bulk operation failed. ${a.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return n`Bulk operation canceling...`;case"CANCELED":return n`Bulk operation canceled.`;case"EXPIRED":return n`Bulk operation expired.`;default:return n`Bulk operation status: ${e.status}`}}function P(e,i){let t=e.map(o=>n`${o.field?.join(".")??"unknown"}: ${o.message}`.value).join(`
2
- `);c({headline:i,body:t})}function U(e){let i=I(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",body:[`This may take a few moments. Check the status with:
3
- `,{command:`shopify app bulk status --id=${h(e.id)}`}],renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let t=[n`ID: ${a.cyan(e.id)}`.value,n`Status: ${a.yellow(e.status)}`.value,n`Created at: ${a.gray(String(e.createdAt))}`.value,...e.completedAt?[n`Completed at: ${a.gray(String(e.completedAt))}`.value]:[]];return{headline:n`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:n`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:t}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:i,renderType:"info"}}}d();var O="2026-01";d();var T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};function le(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function h(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}async function se(e){let{organization:i,storeFqdn:t,operationId:o,remoteApp:l}=e;k({headline:"Checking bulk operation status.",body:[{list:{items:g({organization:i,remoteApp:l,storeFqdn:t})}}]});let s=l.apiSecretKeys[0]?.secret;if(!s)throw new S("No API secret keys found for app");let u=await D(t,l.apiKey,s),m=await A({query:T,session:u,variables:{id:o},version:await E({adminSession:u,minimumDefaultVersion:O})});m.bulkOperation?F(m.bulkOperation):c({headline:"Bulk operation not found.",body:n`ID: ${a.yellow(o)}`.value})}async function ue(e){let{organization:i,storeFqdn:t,remoteApp:o}=e;k({headline:"Listing bulk operations.",body:[{list:{items:g({organization:i,remoteApp:o,storeFqdn:t})}}]});let l=o.apiSecretKeys[0]?.secret;if(!l)throw new S("No API secret keys found for app");let s=await D(t,o.apiKey,l),u=new Date(Date.now()-10080*60*1e3).toISOString().split("T")[0],p=(await A({query:B,session:s,variables:{query:`created_at:>=${u}`,first:100,sortKey:"CREATED_AT"},version:await E({adminSession:s,minimumDefaultVersion:O})})).bulkOperations.nodes.map(r=>({id:h(r.id),status:L(r.status),count:V(r.objectCount),dateCreated:N(new Date(String(r.createdAt))),dateFinished:r.completedAt?N(new Date(String(r.completedAt))):"",results:x(r.url??r.partialDataUrl)}));b(),p.length===0?k({body:"No bulk operations found in the last 7 days."}):C({rows:p,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"}}}),b()}function F(e){let{id:i,status:t,createdAt:o,completedAt:l,url:s,partialDataUrl:u}=e,m=I(e).value,p=$(o,l),r=n`ID: ${a.yellow(i)}\n${p}`.value;if(t==="COMPLETED"){let y=s?a.link("Download results",s):"";w({headline:m,body:n`${r}\n${y}`.value})}else if(t==="FAILED"){let y=u?a.link("Download partial results",u):"";c({headline:m,body:n`${r}\n${y}`.value})}else k({headline:m,body:r})}function $(e,i){let t=new Date;return i?`Finished ${v(new Date(String(i)),t)}`:`Started ${v(new Date(String(e)),t)}`}function L(e){return e==="COMPLETED"?f.green(e):e==="FAILED"?f.red(e):f.dim(e)}function V(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function x(e){return e?n`${a.link("download",e)}`.value:""}export{O as a,T as b,le as c,h as d,se as e,ue as f,I as g,P as h,U as i};
@@ -1 +0,0 @@
1
- import{c as p,g as o}from"./chunk-VPRTJUIN.js";var P=p((Ji,he)=>{"use strict";o();var tt="2.0.0",st=Number.MAX_SAFE_INTEGER||9007199254740991,it=16,nt=250,ot=["major","premajor","minor","preminor","patch","prepatch","prerelease"];he.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:it,MAX_SAFE_BUILD_LENGTH:nt,MAX_SAFE_INTEGER:st,RELEASE_TYPES:ot,SEMVER_SPEC_VERSION:tt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((en,pe)=>{"use strict";o();var ct=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pe.exports=ct});var g=p((q,Re)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:W,MAX_SAFE_BUILD_LENGTH:lt,MAX_LENGTH:at}=P(),ut=v();q=Re.exports={};var Et=q.re=[],ft=q.safeRe=[],l=q.src=[],ht=q.safeSrc=[],a=q.t={},pt=0,z="[a-zA-Z0-9-]",Rt=[["\\s",1],["\\d",at],[z,lt]],$t=t=>{for(let[e,r]of Rt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=$t(e),i=pt++;ut(t,i,e),a[t]=i,l[i]=e,ht[i]=s,Et[i]=new RegExp(e,r?"g":void 0),ft[i]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${z}*`);R("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${z}+`);R("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);R("FULL",`^${l[a.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);R("LOOSE",`^${l[a.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);R("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${W}})(?:\\.(\\d{1,${W}}))?(?:\\.(\\d{1,${W}}))?`);R("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",l[a.COERCE],!0);R("COERCERTLFULL",l[a.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var F=p((sn,$e)=>{"use strict";o();var mt=Object.freeze({loose:!0}),It=Object.freeze({}),Lt=t=>t?typeof t!="object"?mt:t:It;$e.exports=Lt});var K=p((on,Le)=>{"use strict";o();var me=/^[0-9]+$/,Ie=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=me.test(t),s=me.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Nt=(t,e)=>Ie(e,t);Le.exports={compareIdentifiers:Ie,rcompareIdentifiers:Nt}});var N=p((ln,Oe)=>{"use strict";o();var j=v(),{MAX_LENGTH:Ne,MAX_SAFE_INTEGER:X}=P(),{safeRe:U,t:V}=g(),Ot=F(),{compareIdentifiers:Z}=K(),J=class t{constructor(e,r){if(r=Ot(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ne)throw new TypeError(`version is longer than ${Ne} characters`);j("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[V.LOOSE]:U[V.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<X)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(j("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(j("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Z(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(j("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Z(s,i)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?U[V.PRERELEASELOOSE]:U[V.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),Z(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=J});var w=p((un,de)=>{"use strict";o();var Se=N(),St=(t,e,r=!1)=>{if(t instanceof Se)return t;try{return new Se(t,e)}catch(s){if(!r)return null;throw s}};de.exports=St});var Te=p((fn,Ae)=>{"use strict";o();var dt=w(),At=(t,e)=>{let r=dt(t,e);return r?r.version:null};Ae.exports=At});var we=p((pn,qe)=>{"use strict";o();var Tt=w(),qt=(t,e)=>{let r=Tt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=qt});var ve=p(($n,Pe)=>{"use strict";o();var ge=N(),wt=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,i).version}catch{return null}};Pe.exports=wt});var De=p((In,Ce)=>{"use strict";o();var xe=w(),gt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,c=n?r:s,u=n?s:r,E=!!c.prerelease.length;if(!!u.prerelease.length&&!E){if(!u.patch&&!u.minor)return"major";if(u.compareMain(c)===0)return u.minor&&!u.patch?"minor":"patch"}let m=E?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=gt});var ye=p((Nn,Ge)=>{"use strict";o();var Pt=N(),vt=(t,e)=>new Pt(t,e).major;Ge.exports=vt});var je=p((Sn,Fe)=>{"use strict";o();var xt=N(),Ct=(t,e)=>new xt(t,e).minor;Fe.exports=Ct});var Ue=p((An,Xe)=>{"use strict";o();var Dt=N(),Gt=(t,e)=>new Dt(t,e).patch;Xe.exports=Gt});var _e=p((qn,Ve)=>{"use strict";o();var yt=w(),Ft=(t,e)=>{let r=yt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Ft});var A=p((gn,be)=>{"use strict";o();var He=N(),jt=(t,e,r)=>new He(t,r).compare(new He(e,r));be.exports=jt});var Me=p((vn,ke)=>{"use strict";o();var Xt=A(),Ut=(t,e,r)=>Xt(e,t,r);ke.exports=Ut});var Be=p((Cn,Ye)=>{"use strict";o();var Vt=A(),_t=(t,e)=>Vt(t,e,!0);Ye.exports=_t});var _=p((Gn,ze)=>{"use strict";o();var We=N(),Ht=(t,e,r)=>{let s=new We(t,r),i=new We(e,r);return s.compare(i)||s.compareBuild(i)};ze.exports=Ht});var Ze=p((Fn,Ke)=>{"use strict";o();var bt=_(),kt=(t,e)=>t.sort((r,s)=>bt(r,s,e));Ke.exports=kt});var Qe=p((Xn,Je)=>{"use strict";o();var Mt=_(),Yt=(t,e)=>t.sort((r,s)=>Mt(s,r,e));Je.exports=Yt});var x=p((Vn,er)=>{"use strict";o();var Bt=A(),Wt=(t,e,r)=>Bt(t,e,r)>0;er.exports=Wt});var H=p((Hn,rr)=>{"use strict";o();var zt=A(),Kt=(t,e,r)=>zt(t,e,r)<0;rr.exports=Kt});var Q=p((kn,tr)=>{"use strict";o();var Zt=A(),Jt=(t,e,r)=>Zt(t,e,r)===0;tr.exports=Jt});var ee=p((Yn,sr)=>{"use strict";o();var Qt=A(),es=(t,e,r)=>Qt(t,e,r)!==0;sr.exports=es});var b=p((Wn,ir)=>{"use strict";o();var rs=A(),ts=(t,e,r)=>rs(t,e,r)>=0;ir.exports=ts});var k=p((Kn,nr)=>{"use strict";o();var ss=A(),is=(t,e,r)=>ss(t,e,r)<=0;nr.exports=is});var re=p((Jn,or)=>{"use strict";o();var ns=Q(),os=ee(),cs=x(),ls=b(),as=H(),us=k(),Es=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ns(t,r,s);case"!=":return os(t,r,s);case">":return cs(t,r,s);case">=":return ls(t,r,s);case"<":return as(t,r,s);case"<=":return us(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Es});var lr=p((eo,cr)=>{"use strict";o();var fs=N(),hs=w(),{safeRe:M,t:Y}=g(),ps=(t,e)=>{if(t instanceof fs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?M[Y.COERCEFULL]:M[Y.COERCE]);else{let E=e.includePrerelease?M[Y.COERCERTLFULL]:M[Y.COERCERTL],$;for(;($=E.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),E.lastIndex=$.index+$[1].length+$[2].length;E.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hs(`${s}.${i}.${n}${c}${u}`,e)};cr.exports=ps});var ur=p((to,ar)=>{"use strict";o();var te=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};ar.exports=te});var T=p((io,pr)=>{"use strict";o();var Rs=/\s+/g,se=class t{constructor(e,r){if(r=ms(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ie)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Rs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!fr(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&As(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Ss)|(this.options.loose&&ds))+":"+e,i=Er.get(s);if(i)return i;let n=this.options.loose,c=n?S[O.HYPHENRANGELOOSE]:S[O.HYPHENRANGE];e=e.replace(c,Gs(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(S[O.COMPARATORTRIM],Ls),I("comparator trim",e),e=e.replace(S[O.TILDETRIM],Ns),I("tilde trim",e),e=e.replace(S[O.CARETTRIM],Os),I("caret trim",e);let u=e.split(" ").map(f=>Ts(f,this.options)).join(" ").split(/\s+/).map(f=>Ds(f,this.options));n&&(u=u.filter(f=>(I("loose invalid filter",f,this.options),!!f.match(S[O.COMPARATORLOOSE])))),I("range list",u);let E=new Map,$=u.map(f=>new ie(f,this.options));for(let f of $){if(fr(f))return[f];E.set(f.value,f)}E.size>1&&E.has("")&&E.delete("");let m=[...E.values()];return Er.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>hr(s,r)&&e.set.some(i=>hr(i,r)&&s.every(n=>i.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Is(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(ys(this.set[r],e,this.options))return!0;return!1}};pr.exports=se;var $s=ur(),Er=new $s,ms=F(),ie=C(),I=v(),Is=N(),{safeRe:S,t:O,comparatorTrimReplace:Ls,tildeTrimReplace:Ns,caretTrimReplace:Os}=g(),{FLAG_INCLUDE_PRERELEASE:Ss,FLAG_LOOSE:ds}=P(),fr=t=>t.value==="<0.0.0-0",As=t=>t.value==="",hr=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},Ts=(t,e)=>(t=t.replace(S[O.BUILD],""),I("comp",t,e),t=gs(t,e),I("caret",t),t=qs(t,e),I("tildes",t),t=vs(t,e),I("xrange",t),t=Cs(t,e),I("stars",t),t),d=t=>!t||t.toLowerCase()==="x"||t==="*",qs=(t,e)=>t.trim().split(/\s+/).map(r=>ws(r,e)).join(" "),ws=(t,e)=>{let r=e.loose?S[O.TILDELOOSE]:S[O.TILDE];return t.replace(r,(s,i,n,c,u)=>{I("tilde",t,s,i,n,c,u);let E;return d(i)?E="":d(n)?E=`>=${i}.0.0 <${+i+1}.0.0-0`:d(c)?E=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:u?(I("replaceTilde pr",u),E=`>=${i}.${n}.${c}-${u} <${i}.${+n+1}.0-0`):E=`>=${i}.${n}.${c} <${i}.${+n+1}.0-0`,I("tilde return",E),E})},gs=(t,e)=>t.trim().split(/\s+/).map(r=>Ps(r,e)).join(" "),Ps=(t,e)=>{I("caret",t,e);let r=e.loose?S[O.CARETLOOSE]:S[O.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,c,u,E)=>{I("caret",t,i,n,c,u,E);let $;return d(n)?$="":d(c)?$=`>=${n}.0.0${s} <${+n+1}.0.0-0`:d(u)?n==="0"?$=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:E?(I("replaceCaret pr",E),n==="0"?c==="0"?$=`>=${n}.${c}.${u}-${E} <${n}.${c}.${+u+1}-0`:$=`>=${n}.${c}.${u}-${E} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.${u}-${E} <${+n+1}.0.0-0`):(I("no pr"),n==="0"?c==="0"?$=`>=${n}.${c}.${u}${s} <${n}.${c}.${+u+1}-0`:$=`>=${n}.${c}.${u}${s} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.${u} <${+n+1}.0.0-0`),I("caret return",$),$})},vs=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>xs(r,e)).join(" ")),xs=(t,e)=>{t=t.trim();let r=e.loose?S[O.XRANGELOOSE]:S[O.XRANGE];return t.replace(r,(s,i,n,c,u,E)=>{I("xRange",t,s,i,n,c,u,E);let $=d(n),m=$||d(c),f=m||d(u),L=f;return i==="="&&L&&(i=""),E=e.includePrerelease?"-0":"",$?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&L?(m&&(c=0),u=0,i===">"?(i=">=",m?(n=+n+1,c=0,u=0):(c=+c+1,u=0)):i==="<="&&(i="<",m?n=+n+1:c=+c+1),i==="<"&&(E="-0"),s=`${i+n}.${c}.${u}${E}`):m?s=`>=${n}.0.0${E} <${+n+1}.0.0-0`:f&&(s=`>=${n}.${c}.0${E} <${n}.${+c+1}.0-0`),I("xRange return",s),s})},Cs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(S[O.STAR],"")),Ds=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?O.GTE0PRE:O.GTE0],"")),Gs=t=>(e,r,s,i,n,c,u,E,$,m,f,L)=>(d(s)?r="":d(i)?r=`>=${s}.0.0${t?"-0":""}`:d(n)?r=`>=${s}.${i}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,d($)?E="":d(m)?E=`<${+$+1}.0.0-0`:d(f)?E=`<${$}.${+m+1}.0-0`:L?E=`<=${$}.${m}.${f}-${L}`:t?E=`<${$}.${m}.${+f+1}-0`:E=`<=${E}`,`${r} ${E}`.trim()),ys=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==ie.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var C=p((oo,Nr)=>{"use strict";o();var D=Symbol("SemVer ANY"),ce=class t{static get ANY(){return D}constructor(e,r){if(r=Rr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),oe("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,oe("comp",this)}parse(e){let r=this.options.loose?$r[mr.COMPARATORLOOSE]:$r[mr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ir(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(oe("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Ir(e,this.options)}catch{return!1}return ne(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Lr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Lr(this.value,r).test(e.semver):(r=Rr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ne(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ne(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nr.exports=ce;var Rr=F(),{safeRe:$r,t:mr}=g(),ne=re(),oe=v(),Ir=N(),Lr=T()});var G=p((lo,Or)=>{"use strict";o();var Fs=T(),js=(t,e,r)=>{try{e=new Fs(e,r)}catch{return!1}return e.test(t)};Or.exports=js});var dr=p((uo,Sr)=>{"use strict";o();var Xs=T(),Us=(t,e)=>new Xs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Sr.exports=Us});var Tr=p((fo,Ar)=>{"use strict";o();var Vs=N(),_s=T(),Hs=(t,e,r)=>{let s=null,i=null,n=null;try{n=new _s(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||i.compare(c)===-1)&&(s=c,i=new Vs(s,r))}),s};Ar.exports=Hs});var wr=p((po,qr)=>{"use strict";o();var bs=N(),ks=T(),Ms=(t,e,r)=>{let s=null,i=null,n=null;try{n=new ks(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||i.compare(c)===1)&&(s=c,i=new bs(s,r))}),s};qr.exports=Ms});var vr=p(($o,Pr)=>{"use strict";o();var le=N(),Ys=T(),gr=x(),Bs=(t,e)=>{t=new Ys(t,e);let r=new le("0.0.0");if(t.test(r)||(r=new le("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(c=>{let u=new le(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!n||gr(u,n))&&(n=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||gr(r,n))&&(r=n)}return r&&t.test(r)?r:null};Pr.exports=Bs});var Cr=p((Io,xr)=>{"use strict";o();var Ws=T(),zs=(t,e)=>{try{return new Ws(t,e).range||"*"}catch{return null}};xr.exports=zs});var B=p((No,Fr)=>{"use strict";o();var Ks=N(),yr=C(),{ANY:Zs}=yr,Js=T(),Qs=G(),Dr=x(),Gr=H(),ei=k(),ri=b(),ti=(t,e,r,s)=>{t=new Ks(t,s),e=new Js(e,s);let i,n,c,u,E;switch(r){case">":i=Dr,n=ei,c=Gr,u=">",E=">=";break;case"<":i=Gr,n=ri,c=Dr,u="<",E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qs(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],f=null,L=null;if(m.forEach(h=>{h.semver===Zs&&(h=new yr(">=0.0.0")),f=f||h,L=L||h,i(h.semver,f.semver,s)?f=h:c(h.semver,L.semver,s)&&(L=h)}),f.operator===u||f.operator===E||(!L.operator||L.operator===u)&&n(t,L.semver))return!1;if(L.operator===E&&c(t,L.semver))return!1}return!0};Fr.exports=ti});var Xr=p((So,jr)=>{"use strict";o();var si=B(),ii=(t,e,r)=>si(t,e,">",r);jr.exports=ii});var Vr=p((To,Ur)=>{"use strict";o();var ni=B(),oi=(t,e,r)=>ni(t,e,"<",r);Ur.exports=oi});var br=p((wo,Hr)=>{"use strict";o();var _r=T(),ci=(t,e,r)=>(t=new _r(t,r),e=new _r(e,r),t.intersects(e,r));Hr.exports=ci});var Mr=p((Po,kr)=>{"use strict";o();var li=G(),ai=A();kr.exports=(t,e,r)=>{let s=[],i=null,n=null,c=t.sort((m,f)=>ai(m,f,r));for(let m of c)li(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let u=[];for(let[m,f]of s)m===f?u.push(m):!f&&m===c[0]?u.push("*"):f?m===c[0]?u.push(`<=${f}`):u.push(`${m} - ${f}`):u.push(`>=${m}`);let E=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return E.length<$.length?E:e}});var Zr=p((xo,Kr)=>{"use strict";o();var Yr=T(),ue=C(),{ANY:ae}=ue,y=G(),Ee=A(),ui=(t,e,r={})=>{if(t===e)return!0;t=new Yr(t,r),e=new Yr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let c=fi(i,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},Ei=[new ue(">=0.0.0-0")],Br=[new ue(">=0.0.0")],fi=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ae){if(e.length===1&&e[0].semver===ae)return!0;r.includePrerelease?t=Ei:t=Br}if(e.length===1&&e[0].semver===ae){if(r.includePrerelease)return!0;e=Br}let s=new Set,i,n;for(let h of t)h.operator===">"||h.operator===">="?i=Wr(i,h,r):h.operator==="<"||h.operator==="<="?n=zr(n,h,r):s.add(h.semver);if(s.size>1)return null;let c;if(i&&n){if(c=Ee(i.semver,n.semver,r),c>0)return null;if(c===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let h of s){if(i&&!y(h,String(i),r)||n&&!y(h,String(n),r))return null;for(let rt of e)if(!y(h,String(rt),r))return!1;return!0}let u,E,$,m,f=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,L=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",i){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Wr(i,h,r),u===h&&u!==i)return!1}else if(i.operator===">="&&!y(i.semver,String(h),r))return!1}if(n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(E=zr(n,h,r),E===h&&E!==n)return!1}else if(n.operator==="<="&&!y(n.semver,String(h),r))return!1}if(!h.operator&&(n||i)&&c!==0)return!1}return!(i&&$&&!n&&c!==0||n&&m&&!i&&c!==0||L||f)},Wr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Kr.exports=ui});var Zi=p((Do,et)=>{"use strict";o();var fe=g(),Jr=P(),hi=N(),Qr=K(),pi=w(),Ri=Te(),$i=we(),mi=ve(),Ii=De(),Li=ye(),Ni=je(),Oi=Ue(),Si=_e(),di=A(),Ai=Me(),Ti=Be(),qi=_(),wi=Ze(),gi=Qe(),Pi=x(),vi=H(),xi=Q(),Ci=ee(),Di=b(),Gi=k(),yi=re(),Fi=lr(),ji=C(),Xi=T(),Ui=G(),Vi=dr(),_i=Tr(),Hi=wr(),bi=vr(),ki=Cr(),Mi=B(),Yi=Xr(),Bi=Vr(),Wi=br(),zi=Mr(),Ki=Zr();et.exports={parse:pi,valid:Ri,clean:$i,inc:mi,diff:Ii,major:Li,minor:Ni,patch:Oi,prerelease:Si,compare:di,rcompare:Ai,compareLoose:Ti,compareBuild:qi,sort:wi,rsort:gi,gt:Pi,lt:vi,eq:xi,neq:Ci,gte:Di,lte:Gi,cmp:yi,coerce:Fi,Comparator:ji,Range:Xi,satisfies:Ui,toComparators:Vi,maxSatisfying:_i,minSatisfying:Hi,minVersion:bi,validRange:ki,outside:Mi,gtr:Yi,ltr:Bi,intersects:Wi,simplifyRange:zi,subset:Ki,SemVer:hi,re:fe.re,src:fe.src,tokens:fe.t,SEMVER_SPEC_VERSION:Jr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Jr.RELEASE_TYPES,compareIdentifiers:Qr.compareIdentifiers,rcompareIdentifiers:Qr.rcompareIdentifiers}});export{Zi as a};
@@ -1 +0,0 @@
1
- import{d as b}from"./chunk-D3DDLLNF.js";import{G as h,I as u,K as T}from"./chunk-IOQQUHST.js";import{a as F}from"./chunk-7BFDUVOG.js";import{k as y,q as O}from"./chunk-HHXHOQQP.js";import{o as f,ua as v}from"./chunk-4V4DQ6W7.js";import{b as I}from"./chunk-4KRT35A2.js";import{v as _}from"./chunk-MGL4YM3S.js";import{d as s}from"./chunk-BHWEA4V2.js";import{r as U}from"./chunk-3YWUSKWF.js";import{Mb as S,Ua as l,ma as c}from"./chunk-VPL2NDH6.js";import{e as A,g as p}from"./chunk-VPRTJUIN.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
@@ -1,18 +0,0 @@
1
- import{k as we,t as ge}from"./chunk-MZJRNFAU.js";import{M as fe,O as de,o as L,va as y,xa as C}from"./chunk-4V4DQ6W7.js";import{a as ue}from"./chunk-YJB7P2HC.js";import{P as pe,x as le,y as he}from"./chunk-MGL4YM3S.js";import{d as R}from"./chunk-BHWEA4V2.js";import{Fb as F,Hb as ye,Pb as h}from"./chunk-VPL2NDH6.js";import{u as me}from"./chunk-UARVYVLN.js";import{g as l}from"./chunk-VPRTJUIN.js";l();l();function _e(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,n);for(let[r,n]of Object.entries(e.replaceExtensionTemplates??[])){let o=r.split("/")[0];t.append(`replace_extension_templates[${o}][${r}]`,n)}return t.append("_method",e.method),t}function S(){return{"User-Agent":`Shopify CLI; v=${ue}`}}function W(e){return delete e.cookie,delete e.authorization,e}l();function T(e){let t={};return e.split(";").forEach(r=>{let n=r.match(/(.*?)=(.*)$/)??[],o=n[1]?.trim(),s=n[2]?.trim()??"";o&&(t[o]=s)}),t}function I(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var k=class extends R{};async function $r(e){return ge(e)}async function jr(e,t){let r=Ce(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),C("theme-service:storefront-session:check-storefront-password");let o=await L(`${r}/password`,{headers:{"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded"},body:n.toString(),method:"POST",redirect:"manual"});if(o.status===429)throw y(new R(`Too many incorrect password attempts. Please try again after ${o.headers.get("retry-after")} seconds.`));return Ee(o,r)}async function Re(e,t,r,n,o={}){let s={},a=await be(e,r,o),c=Ce(t);if(s._shopify_essential=a,C(`theme-service:storefront-session:is-password-protected:${!!n}`),!n)return s;let i=await rt(a,e,c,n,o);return{...s,...i}}async function be(e,t,r,n=1){let o=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${o}`;C("theme-service:storefront-session:get-session-essential-cookie");let a=await L(s,{method:"HEAD",redirect:"manual",headers:{...r,...S()}}),c=a.headers.raw()["set-cookie"]??[],i=z(c,"_shopify_essential");if(!i){if(h(`Failed to obtain _shopify_essential cookie.
2
-
3
- -Request ID: ${a.headers.get("x-request-id")??"unknown"}
4
-
5
- -Body: ${await a.text()}
6
-
7
- -Status: ${a.status}
8
- `),n>3)throw y(new k('Your development session could not be created because the "_shopify_essential" could not be defined. Please, check your internet connection.'));return h("Retrying to obtain the _shopify_essential cookie..."),await pe(n),be(e,t,r,n+1)}return i}async function rt(e,t,r,n,o){let s=new URLSearchParams({password:n}),a=await L(`${t}/password`,{method:"POST",redirect:"manual",body:s,headers:{...o,...S(),Cookie:I({_shopify_essential:e})}});if(!Ee(a,r))throw y(new R("Your development session could not be created because the store password is invalid. Please, retry with a different password."));let c=a.headers.raw()["set-cookie"]??[],i=z(c,"storefront_digest"),u=z(c,"_shopify_essential"),f={};return i&&(f.storefront_digest=i),u&&(f._shopify_essential=u),f}function Ee(e,t){let r=e.headers.get("location")??"",n;try{n=new URL(r,t)}catch(s){if(s instanceof TypeError)return!1;throw s}let o=new URL(t).origin;return e.status===302&&n.origin===o}function z(e,t){let r=e.find(o=>T(o)[t]);return r?T(r)[t]:void 0}function Ce(e){return`https://${e}`}l();l();l();l();var Br=String.fromCharCode;var Ae=/\+/g;var nt=/%2f/gi;function H(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function G(e){return H(e.replace(nt,"%252F"))}function ot(e){return H(e.replace(Ae," "))}function st(e){return H(e.replace(Ae," "))}function at(e=""){let t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(let r of e.split("&")){let n=r.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;let o=ot(n[1]);if(o==="__proto__"||o==="constructor")continue;let s=st(n[2]||"");t[o]===void 0?t[o]=s:Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]}return t}var it=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,ct=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,ut=/^([/\\]\s*){2,}[^/\\]/;var ft=/\/$|\/\?|\/#/,dt=/^\.?\//;function lt(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?it.test(e):ct.test(e)||(t.acceptRelative?ut.test(e):!1)}function V(e="",t){return t?ft.test(e):e.endsWith("/")}function J(e="",t){if(!t)return(V(e)?e.slice(0,-1):e)||"/";if(!V(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");o!==-1&&(r=e.slice(0,o),n=e.slice(o));let[s,...a]=r.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(a.length>0?`?${a.join("?")}`:"")+n}function ht(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(V(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");if(o!==-1&&(r=e.slice(0,o),n=e.slice(o),!r))return n;let[s,...a]=r.split("?");return s+"/"+(a.length>0?`?${a.join("?")}`:"")+n}function pt(e=""){return e.startsWith("/")}function Q(e=""){return pt(e)?e:"/"+e}function xe(e){return at(P(e).search)}function mt(e){return e&&e!=="/"}function Te(e,...t){let r=e||"";for(let n of t.filter(o=>mt(o)))if(r){let o=n.replace(dt,"");r=ht(r)+o}else r=n;return r}var yt=Symbol.for("ufo:protocolRelative");function P(e="",t){let r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){let[,d,p=""]=r;return{protocol:d.toLowerCase(),pathname:p,href:d+p,auth:"",host:"",search:"",hash:""}}if(!lt(e,{acceptRelative:!0}))return t?P(t+e):Se(e);let[,n="",o,s=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",c=""]=s.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(c=c.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:i,search:u,hash:f}=Se(c);return{protocol:n.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:a,pathname:i,search:u,hash:f,[yt]:!n}}function Se(e=""){let[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}l();var wt=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function ke(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let r=new wt,n=t||{},o=n.decode||gt,s=0;for(;s<e.length;){let a=e.indexOf("=",s);if(a===-1)break;let c=e.indexOf(";",s);if(c===-1)c=e.length;else if(c<a){s=e.lastIndexOf(";",a-1)+1;continue}let i=e.slice(s,a).trim();if(n?.filter&&!n?.filter(i)){s=c+1;continue}if(r[i]===void 0){let u=e.slice(a+1,c).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),r[i]=_t(u,o)}s=c+1}return r}function gt(e){return e.includes("%")?decodeURIComponent(e):e}function _t(e,t){try{return t(e)}catch{return e}}l();var g={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Oe(e={}){let t={options:e,rootNode:Ne(),staticRoutesMap:{}},r=n=>e.strictTrailingSlash?n:n.replace(/\/$/,"")||"/";if(e.routes)for(let n in e.routes)He(t,r(n),e.routes[n]);return{ctx:t,lookup:n=>Rt(t,r(n)),insert:(n,o)=>He(t,r(n),o),remove:n=>bt(t,r(n))}}function Rt(e,t){let r=e.staticRoutesMap[t];if(r)return r.data;let n=t.split("/"),o={},s=!1,a=null,c=e.rootNode,i=null;for(let u=0;u<n.length;u++){let f=n[u];c.wildcardChildNode!==null&&(a=c.wildcardChildNode,i=n.slice(u).join("/"));let d=c.children.get(f);if(d===void 0){if(c&&c.placeholderChildren.length>1){let p=n.length-u;c=c.placeholderChildren.find(B=>B.maxDepth===p)||null}else c=c.placeholderChildren[0]||null;if(!c)break;c.paramName&&(o[c.paramName]=f),s=!0}else c=d}return(c===null||c.data===null)&&a!==null&&(c=a,o[c.paramName||"_"]=i,s=!0),c?s?{...c.data,params:s?o:void 0}:c.data:null}function He(e,t,r){let n=!0,o=t.split("/"),s=e.rootNode,a=0,c=[s];for(let i of o){let u;if(u=s.children.get(i))s=u;else{let f=Et(i);u=Ne({type:f,parent:s}),s.children.set(i,u),f===g.PLACEHOLDER?(u.paramName=i==="*"?`_${a++}`:i.slice(1),s.placeholderChildren.push(u),n=!1):f===g.WILDCARD&&(s.wildcardChildNode=u,u.paramName=i.slice(3)||"_",n=!1),c.push(u),s=u}}for(let[i,u]of c.entries())u.maxDepth=Math.max(c.length-i,u.maxDepth||0);return s.data=r,n===!0&&(e.staticRoutesMap[t]=s),s}function bt(e,t){let r=!1,n=t.split("/"),o=e.rootNode;for(let s of n)if(o=o.children.get(s),!o)return r;if(o.data){let s=n.at(-1)||"";o.data=null,Object.keys(o.children).length===0&&o.parent&&(o.parent.children.delete(s),o.parent.wildcardChildNode=null,o.parent.placeholderChildren=[]),r=!0}return r}function Ne(e={}){return{type:e.type||g.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function Et(e){return e.startsWith("**")?g.WILDCARD:e[0]===":"||e==="*"?g.PLACEHOLDER:g.NORMAL}function qe(e){let t=Le("",e.ctx.rootNode);return Ct(t,e.ctx.options.strictTrailingSlash)}function Ct(e,t){return{ctx:{table:e},matchAll:r=>Me(r,e,t)}}function St(){return{static:new Map,wildcard:new Map,dynamic:new Map}}function Me(e,t,r){r!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");let n=[];for(let[s,a]of Pe(t.wildcard))(e===s||e.startsWith(s+"/"))&&n.push(a);for(let[s,a]of Pe(t.dynamic))if(e.startsWith(s+"/")){let c="/"+e.slice(s.length).split("/").splice(2).join("/");n.push(...Me(c,a))}let o=t.static.get(e);return o&&n.push(o),n.filter(Boolean)}function Pe(e){return[...e.entries()].sort((t,r)=>t[0].length-r[0].length)}function Le(e,t){let r=St();function n(o,s){if(o){if(s.type===g.NORMAL&&!(o.includes("*")||o.includes(":")))s.data&&r.static.set(o,s.data);else if(s.type===g.WILDCARD)r.wildcard.set(o.replace("/**",""),s.data);else if(s.type===g.PLACEHOLDER){let a=Le("",s);s.data&&a.static.set("/",s.data),r.dynamic.set(o.replace(/\/\*|\/:\w+/,""),a);return}}for(let[a,c]of s.children.entries())n(`${o}/${a}`.replace("//","/"),c)}return n(e,t),r}l();function K(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function X(e,t,r=".",n){if(!K(t))return X(e,{},r,n);let o={...t};for(let s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;let a=e[s];a!=null&&(n&&n(o,s,a,r)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:K(a)&&K(o[s])?o[s]=X(a,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=a))}return o}function Y(e){return(...t)=>t.reduce((r,n)=>X(r,n,"",e),{})}var Ie=Y(),Qr=Y((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),Kr=Y((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});l();var At=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,xt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Tt=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function kt(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ht(e);return}return t}function Ht(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function $e(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);let r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Tt.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(At.test(e)||xt.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,kt)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function x(e,t){try{return t in e}catch{return!1}}var j=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(t,r={}){super(t,r),r.cause&&!this.cause&&(this.cause=r.cause)}toJSON(){let t={message:this.message,statusCode:E(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=D(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}};function m(e){if(typeof e=="string")return new j(e);if(oe(e))return e;let t=new j(e.message??e.statusMessage??"",{cause:e.cause||e});if(x(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=E(e.statusCode,t.statusCode):e.status&&(t.statusCode=E(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let r=t.statusMessage;D(t.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function Pt(e,t,r){if(e.handled)return;let n=oe(t)?t:m(t),o={statusCode:n.statusCode,statusMessage:n.statusMessage,stack:[],data:n.data};if(r&&(o.stack=(n.stack||"").split(`
9
- `).map(a=>a.trim())),e.handled)return;let s=Number.parseInt(n.statusCode);q(e,s,n.statusMessage),e.node.res.setHeader("content-type",N.json),e.node.res.end(JSON.stringify(o,void 0,2))}function oe(e){return e?.constructor?.__h3_error__===!0}function un(e){return xe(e.path||"")}function fn(e,t={}){let r=e.context.params||{};if(t.decode){r={...r};for(let n in r)r[n]=H(r[n])}return r}function Ot(e,t,r){if(r&&e.method==="HEAD")return!0;if(typeof t=="string"){if(e.method===t)return!0}else if(t.includes(e.method))return!0;return!1}function Nt(e,t,r){if(!Ot(e,t,r))throw m({statusCode:405,statusMessage:"HTTP method is not allowed."})}function Fe(e){let t={};for(let r in e.node.req.headers){let n=e.node.req.headers[r];t[r]=Array.isArray(n)?n.filter(Boolean).join(", "):n}return t}function _(e,t){return Fe(e)[t.toLowerCase()]}var je=_;function dn(e,t={}){if(e.context.clientAddress)return e.context.clientAddress;if(t.xForwardedFor){let r=_(e,"x-forwarded-for")?.split(",").shift()?.trim();if(r)return r}if(e.node.req.socket.remoteAddress)return e.node.req.socket.remoteAddress}var ee=Symbol.for("h3RawBody"),Z=Symbol.for("h3ParsedBody"),We=["PATCH","POST","PUT","DELETE"];function ze(e,t="utf8"){Nt(e,We);let r=e._requestBody||e.web?.request?.body||e.node.req[ee]||e.node.req.rawBody||e.node.req.body;if(r){let s=Promise.resolve(r).then(a=>Buffer.isBuffer(a)?a:typeof a.pipeTo=="function"?new Promise((c,i)=>{let u=[];a.pipeTo(new WritableStream({write(f){u.push(f)},close(){c(Buffer.concat(u))},abort(f){i(f)}})).catch(i)}):typeof a.pipe=="function"?new Promise((c,i)=>{let u=[];a.on("data",f=>{u.push(f)}).on("end",()=>{c(Buffer.concat(u))}).on("error",i)}):a.constructor===Object?Buffer.from(JSON.stringify(a)):a instanceof URLSearchParams?Buffer.from(a.toString()):a instanceof FormData?new Response(a).bytes().then(c=>Buffer.from(c)):Buffer.from(a));return t?s.then(a=>a.toString(t)):s}if(!Number.parseInt(e.node.req.headers["content-length"]||"")&&!/\bchunked\b/i.test(String(e.node.req.headers["transfer-encoding"]??"")))return Promise.resolve(void 0);let n=e.node.req[ee]=new Promise((s,a)=>{let c=[];e.node.req.on("error",i=>{a(i)}).on("data",i=>{c.push(i)}).on("end",()=>{s(Buffer.concat(c))})});return t?n.then(s=>s.toString(t)):n}async function ln(e,t={}){let r=e.node.req;if(x(r,Z))return r[Z];let n=r.headers["content-type"]||"",o=await ze(e),s;return n==="application/json"?s=De(o,t.strict??!0):n.startsWith("application/x-www-form-urlencoded")?s=qt(o):n.startsWith("text/")?s=o:s=De(o,t.strict??!1),r[Z]=s,s}function hn(e){if(!We.includes(e.method))return;let t=e.web?.request?.body||e._requestBody;return t||(ee in e.node.req||"rawBody"in e.node.req||"body"in e.node.req||"__unenv__"in e.node.req?new ReadableStream({async start(n){let o=await ze(e,!1);o&&n.enqueue(o),n.close()}}):new ReadableStream({start:n=>{e.node.req.on("data",o=>{n.enqueue(o)}),e.node.req.on("end",()=>{n.close()}),e.node.req.on("error",o=>{n.error(o)})}}))}function De(e="",t){if(e)try{return $e(e,{strict:t})}catch{throw m({statusCode:400,statusMessage:"Bad Request",message:"Invalid JSON body"})}}function qt(e){let t=new URLSearchParams(e),r=Object.create(null);for(let[n,o]of t.entries())x(r,n)?(Array.isArray(r[n])||(r[n]=[r[n]]),r[n].push(o)):r[n]=o;return r}var N={html:"text/html",json:"application/json"},Mt=/[^\u0009\u0020-\u007E]/g;function D(e=""){return e.replace(Mt,"")}function E(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}function Lt(e){return ke(e.node.req.headers.cookie||"")}function pn(e,t){return Lt(e)[t]}function Ve(e){if(Array.isArray(e))return e.flatMap(f=>Ve(f));if(typeof e!="string")return[];let t=[],r=0,n,o,s,a,c,i=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},u=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(n=r,c=!1;i();)if(o=e.charAt(r),o===","){for(s=r,r+=1,i(),a=r;r<e.length&&u();)r+=1;r<e.length&&e.charAt(r)==="="?(c=!0,r=a,t.push(e.slice(n,s)),n=r):r=s+1}else r+=1;(!c||r>=e.length)&&t.push(e.slice(n))}return t}var It=typeof setImmediate>"u"?e=>e():setImmediate;function w(e,t,r){return r&&$t(e,r),new Promise(n=>{It(()=>{e.handled||e.node.res.end(t),n()})})}function Ge(e,t){if(e.handled)return;!t&&e.node.res.statusCode!==200&&(t=e.node.res.statusCode);let r=E(t,204);r===204&&e.node.res.removeHeader("content-length"),e.node.res.writeHead(r),e.node.res.end()}function q(e,t,r){t&&(e.node.res.statusCode=E(t,e.node.res.statusCode)),r&&(e.node.res.statusMessage=D(r))}function $t(e,t){t&&e.node.res.statusCode!==304&&!e.node.res.getHeader("content-type")&&e.node.res.setHeader("content-type",t)}function mn(e,t,r=302){e.node.res.statusCode=E(r,e.node.res.statusCode),e.node.res.setHeader("location",t);let o=`<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${t.replace(/"/g,"%22")}"></head></html>`;return w(e,o,N.html)}function O(e,t){return e.node.res.getHeader(t)}function jt(e,t){for(let[r,n]of Object.entries(t))e.node.res.setHeader(r,n)}function A(e,t,r){e.node.res.setHeader(t,r)}function Dt(e,t){for(let[r,n]of Object.entries(t))Ut(e,r,n)}var b=Dt;function Ut(e,t,r){let n=e.node.res.getHeader(t);if(!n){e.node.res.setHeader(t,r);return}Array.isArray(n)||(n=[n.toString()]),e.node.res.setHeader(t,[...n,r])}function Je(e){return!e||typeof e!="object"?!1:typeof e.pipe=="function"&&(typeof e._read=="function"||typeof e.abort=="function")||typeof e.pipeTo=="function"}function Bt(e){return typeof Response<"u"&&e instanceof Response}function U(e,t){if(!t||typeof t!="object")throw new Error("[h3] Invalid stream provided.");if(e.node.res._data=t,!e.node.res.socket)return e._handled=!0,Promise.resolve();if(x(t,"pipeTo")&&typeof t.pipeTo=="function")return t.pipeTo(new WritableStream({write(r){e.node.res.write(r)}})).then(()=>{e.node.res.end()});if(x(t,"pipe")&&typeof t.pipe=="function")return new Promise((r,n)=>{t.pipe(e.node.res),t.on&&(t.on("end",()=>{e.node.res.end(),r()}),t.on("error",o=>{n(o)})),e.node.res.on("close",()=>{t.abort&&t.abort()})});throw new Error("[h3] Invalid or incompatible stream provided.")}function Qe(e,t){for(let[r,n]of t.headers)r==="set-cookie"?e.node.res.appendHeader(r,Ve(n)):e.node.res.setHeader(r,n);if(t.status&&(e.node.res.statusCode=E(t.status,e.node.res.statusCode)),t.statusText&&(e.node.res.statusMessage=D(t.statusText)),t.redirected&&e.node.res.setHeader("location",t.url),!t.body){e.node.res.end();return}return U(e,t.body)}function Ft(e={}){return Ie(e,{origin:"*",methods:"*",allowHeaders:"*",exposeHeaders:"*",credentials:!1,maxAge:!1,preflight:{statusCode:204}})}function Wt(e){let t=_(e,"origin"),r=_(e,"access-control-request-method");return e.method==="OPTIONS"&&!!t&&!!r}function zt(e,t){let{origin:r}=t;return!e||!r||r==="*"||r==="null"?!0:Array.isArray(r)?r.some(n=>n instanceof RegExp?n.test(e):e===n):r(e)}function Ke(e,t){let{origin:r}=t,n=_(e,"origin");return!n||!r||r==="*"?{"access-control-allow-origin":"*"}:typeof r=="string"?{"access-control-allow-origin":r,vary:"origin"}:zt(n,t)?{"access-control-allow-origin":n,vary:"origin"}:{}}function Vt(e){let{methods:t}=e;return t?t==="*"?{"access-control-allow-methods":"*"}:t.length>0?{"access-control-allow-methods":t.join(",")}:{}:{}}function Xe(e){let{credentials:t}=e;return t?{"access-control-allow-credentials":"true"}:{}}function Gt(e,t){let{allowHeaders:r}=t;if(!r||r==="*"||r.length===0){let n=_(e,"access-control-request-headers");return n?{"access-control-allow-headers":n,vary:"access-control-request-headers"}:{}}return{"access-control-allow-headers":r.join(","),vary:"access-control-request-headers"}}function Ye(e){let{exposeHeaders:t}=e;return t?t==="*"?{"access-control-expose-headers":t}:{"access-control-expose-headers":t.join(",")}:{}}function Jt(e,t){b(e,Ke(e,t)),b(e,Xe(t)),b(e,Ye(t)),b(e,Vt(t)),b(e,Gt(e,t))}function Qt(e,t){b(e,Ke(e,t)),b(e,Xe(t)),b(e,Ye(t))}function yn(e,t){let r=Ft(t);return Wt(e)?(Jt(e,t),Ge(e,r.preflight.statusCode),!0):(Qt(e,t),!1)}var Kt=new Set(["transfer-encoding","accept-encoding","connection","keep-alive","upgrade","expect","host","accept"]);function wn(e,t){let r=Object.create(null),n=Fe(e);for(let o in n)(!Kt.has(o)||o==="host"&&t?.host)&&(r[o]=n[o]);return r}function $(e){let t="";e.id&&(t+=`id: ${Ue(e.id)}
10
- `),e.event&&(t+=`event: ${Ue(e.event)}
11
- `),typeof e.retry=="number"&&Number.isInteger(e.retry)&&(t+=`retry: ${e.retry}
12
- `);let r=typeof e.data=="string"?e.data:"";for(let n of r.split(/\r\n|\r|\n/))t+=`data: ${n}
13
- `;return t+=`
14
- `,t}function Ue(e){return e.replace(/[\n\r]/g,"")}function Xt(e){let t="";for(let r of e)t+=$(r);return t}function Yt(e){let t={"Content-Type":"text/event-stream","Cache-Control":"private, no-cache, no-store, no-transform, must-revalidate, max-age=0","X-Accel-Buffering":"no"};Zt(e)||(t.Connection="keep-alive"),jt(e,t)}function Zt(e){return je(e,":path")!==void 0&&je(e,":method")!==void 0}var te=class{_h3Event;_transformStream=new TransformStream;_writer;_encoder=new TextEncoder;_writerIsClosed=!1;_paused=!1;_unsentData;_disposed=!1;_handled=!1;constructor(t,r={}){this._h3Event=t,this._writer=this._transformStream.writable.getWriter(),this._writer.closed.then(()=>{this._writerIsClosed=!0}),r.autoclose!==!1&&this._h3Event.node.req.on("close",()=>this.close())}async push(t){if(typeof t=="string"){await this._sendEvent({data:t});return}if(Array.isArray(t)){if(t.length===0)return;if(typeof t[0]=="string"){let r=[];for(let n of t)r.push({data:n});await this._sendEvents(r);return}await this._sendEvents(t);return}await this._sendEvent(t)}async _sendEvent(t){if(!this._writerIsClosed){if(this._paused&&!this._unsentData){this._unsentData=$(t);return}if(this._paused){this._unsentData+=$(t);return}await this._writer.write(this._encoder.encode($(t))).catch()}}async _sendEvents(t){if(this._writerIsClosed)return;let r=Xt(t);if(this._paused&&!this._unsentData){this._unsentData=r;return}if(this._paused){this._unsentData+=r;return}await this._writer.write(this._encoder.encode(r)).catch()}pause(){this._paused=!0}get isPaused(){return this._paused}async resume(){this._paused=!1,await this.flush()}async flush(){this._writerIsClosed||this._unsentData?.length&&(await this._writer.write(this._encoder.encode(this._unsentData)),this._unsentData=void 0)}async close(){if(!this._disposed){if(!this._writerIsClosed)try{await this._writer.close()}catch{}this._h3Event._handled&&this._handled&&!this._h3Event.node.res.closed&&this._h3Event.node.res.end(),this._disposed=!0}}onClosed(t){this._writer.closed.then(t)}async send(){Yt(this._h3Event),q(this._h3Event,200),this._h3Event._handled=!0,this._handled=!0,await U(this._h3Event,this._transformStream.readable)}};function gn(e,t){return new te(e,t)}async function _n(e,t){if(e.method!=="GET"&&e.method!=="HEAD"){if(!t.fallthrough)throw m({statusMessage:"Method Not Allowed",statusCode:405});return!1}let r=Q(J(P(e.path).pathname));if(/(^|[\\/])(\.\.|%2e%2e|%2e\.|\.%2e)($|[\\/])/i.test(r)){if(!t.fallthrough)throw m({statusCode:404});return!1}let n=vt(_(e,"accept-encoding"),t.encodings);n.length>1&&A(e,"vary","accept-encoding");let o=r,s,a=er(r,n,t.indexNames||["/index.html"]);for(let u of a){let f=await t.getMeta(u);if(f){s=f,o=u;break}}if(!s){if(!t.fallthrough)throw m({statusCode:404});return!1}if(s.etag&&!O(e,"etag")&&A(e,"etag",s.etag),s.etag&&_(e,"if-none-match")===s.etag)return q(e,304,"Not Modified"),w(e,"");if(s.mtime){let u=new Date(s.mtime),f=_(e,"if-modified-since");if(f&&new Date(f)>=u)return q(e,304,"Not Modified"),w(e,null);O(e,"last-modified")||A(e,"last-modified",u.toUTCString())}if(s.type&&!O(e,"content-type")&&A(e,"content-type",s.type),s.encoding&&!O(e,"content-encoding")&&A(e,"content-encoding",s.encoding),s.size!==void 0&&s.size>0&&!O(e,"content-length")&&A(e,"content-length",s.size),e.method==="HEAD")return w(e,null);let i=await t.getContents(o);return Je(i)?U(e,i):w(e,i)}function vt(e,t){return!t||!e?[]:String(e||"").split(",").map(r=>t[r.trim()]).filter(Boolean)}function er(e,t,r){let n=[];for(let o of["",...r])for(let s of[...t,""])n.push(`${e}${o}${s}`);return n}var re=class{__is_event__=!0;node;web;context={};_method;_path;_headers;_requestBody;_handled=!1;_onBeforeResponseCalled;_onAfterResponseCalled;constructor(t,r){this.node={req:t,res:r}}get method(){return this._method||(this._method=(this.node.req.method||"GET").toUpperCase()),this._method}get path(){return this._path||this.node.req.url||"/"}get headers(){return this._headers||(this._headers=rr(this.node.req.headers)),this._headers}get handled(){return this._handled||this.node.res.writableEnded||this.node.res.headersSent}respondWith(t){return Promise.resolve(t).then(r=>Qe(this,r))}toString(){return`[${this.method}] ${this.path}`}toJSON(){return this.toString()}get req(){return this.node.req}get res(){return this.node.res}};function tr(e,t){return new re(e,t)}function rr(e){let t=new Headers;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let o of n)t.append(r,o);else n&&t.set(r,n);return t}function nr(e){if(typeof e=="function")return e.__is_handler__=!0,e;let t={onRequest:Be(e.onRequest),onBeforeResponse:Be(e.onBeforeResponse)},r=n=>or(n,e.handler,t);return r.__is_handler__=!0,r.__resolve__=e.handler.__resolve__,r.__websocket__=e.websocket,r}function Be(e){return e?Array.isArray(e)?e:[e]:void 0}async function or(e,t,r){if(r.onRequest){for(let s of r.onRequest)if(await s(e),e.handled)return}let o={body:await t(e)};if(r.onBeforeResponse)for(let s of r.onBeforeResponse)await s(e,o);return o.body}var se=nr;function sr(e){return x(e,"__is_handler__")}function ae(e,t,r){return e}function ar(e){let t,r,n=()=>r?Promise.resolve(r):(t||(t=Promise.resolve(e()).then(s=>{let a=s.default||s;if(typeof a!="function")throw new TypeError("Invalid lazy handler result. It should be a function:",a);return r={handler:ae(s.default||s)},r})),t),o=se(s=>r?r.handler(s):n().then(a=>a.handler(s)));return o.__resolve__=n,o}var ir=ar,Rn=globalThis.Headers,bn=globalThis.Response;function En(e={}){let t=[],r=cr(t,e),n=ur(t);r.__resolve__=n;let o=dr(()=>hr(n,e)),s={use:(a,c,i)=>ne(s,a,c,i),resolve:n,handler:r,stack:t,options:e,get websocket(){return o()}};return s}function ne(e,t,r,n){if(Array.isArray(t))for(let o of t)ne(e,o,r,n);else if(Array.isArray(r))for(let o of r)ne(e,t,o,n);else typeof t=="string"?e.stack.push(v({...n,route:t,handler:r})):typeof t=="function"?e.stack.push(v({...r,handler:t})):e.stack.push(v({...t}));return e}function cr(e,t){let r=t.debug?2:void 0;return se(async n=>{n.node.req.originalUrl=n.node.req.originalUrl||n.node.req.url||"/";let o=n.node.req.url||"/",s=lr(n._path||o);n._path=s;let a=s!==o,c;t.onRequest&&await t.onRequest(n);for(let i of e){if(i.route.length>1){if(!s.startsWith(i.route))continue;c=s.slice(i.route.length)||"/"}else c=s;if(i.match&&!i.match(c,n))continue;n._path=c,n.node.req.url=a?i.route.length>1?o.slice(i.route.length)||"/":o:c;let u=await i.handler(n),f=u===void 0?void 0:await u;if(f!==void 0){let d={body:f};t.onBeforeResponse&&(n._onBeforeResponseCalled=!0,await t.onBeforeResponse(n,d)),await fr(n,d.body,r),t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,d));return}if(n.handled){t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0));return}}if(!n.handled)throw m({statusCode:404,statusMessage:`Cannot find any path matching ${n.path||"/"}.`});t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0))})}function ur(e){return async t=>{let r;for(let n of e){if(n.route==="/"&&!n.handler.__resolve__||!t.startsWith(n.route)||(r=t.slice(n.route.length)||"/",n.match&&!n.match(r,void 0)))continue;let o={route:n.route,handler:n.handler};if(o.handler.__resolve__){let s=await o.handler.__resolve__(r);if(!s)continue;o={...o,...s,route:Te(o.route||"/",s.route||"/")}}return o}}}function v(e){let t=e.handler;return t.handler&&(t=t.handler),e.lazy?t=ir(t):sr(t)||(t=ae(t,void 0,e.route)),{route:J(e.route),match:e.match,handler:t}}function fr(e,t,r){if(t===null)return Ge(e);if(t){if(Bt(t))return Qe(e,t);if(Je(t))return U(e,t);if(t.buffer)return w(e,t);if(t.arrayBuffer&&typeof t.arrayBuffer=="function")return t.arrayBuffer().then(o=>w(e,Buffer.from(o),t.type));if(t instanceof Error)throw m(t);if(typeof t.end=="function")return!0}let n=typeof t;if(n==="string")return w(e,t,N.html);if(n==="object"||n==="boolean"||n==="number")return w(e,JSON.stringify(t,void 0,r),N.json);if(n==="bigint")return w(e,t.toString(),N.json);throw m({statusCode:500,statusMessage:`[h3] Cannot send ${n} as response.`})}function dr(e){let t;return()=>(t||(t=e()),t)}function lr(e){let t=e.indexOf("?"),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t);return(r.includes("%25")?G(r.replace(/%25/g,"%2525")):G(r))+n}function hr(e,t){return{...t.websocket,async resolve(r){let n=r.request?.url||r.url||"/",{pathname:o}=typeof n=="string"?P(n):n;return(await e(o))?.handler?.__websocket__||{}}}}var pr=["connect","delete","get","head","options","post","put","trace","patch"];function Cn(e={}){let t=Oe({}),r={},n,o={},s=(i,u,f)=>{let d=r[i];if(d||(r[i]=d={path:i,handlers:{}},t.insert(i,d)),Array.isArray(f))for(let p of f)s(i,u,p);else d.handlers[f]=ae(u);return o};o.use=o.add=(i,u,f)=>s(i,u,f||"all");for(let i of pr)o[i]=(u,f)=>o.add(u,f,i);let a=(i="/",u="get")=>{let f=i.indexOf("?");f!==-1&&(i=i.slice(0,Math.max(0,f)));let d=t.lookup(i);if(!d||!d.handlers)return{error:m({statusCode:404,name:"Not Found",statusMessage:`Cannot find any route matching ${i||"/"}.`})};let p=d.handlers[u]||d.handlers.all;if(!p){n||(n=qe(t));let B=n.matchAll(i).reverse();for(let M of B){if(M.handlers[u]){p=M.handlers[u],d.handlers[u]=d.handlers[u]||p;break}if(M.handlers.all){p=M.handlers.all,d.handlers.all=d.handlers.all||p;break}}}return p?{matched:d,handler:p}:{error:m({statusCode:405,name:"Method Not Allowed",statusMessage:`Method ${u} is not allowed on this route.`})}},c=e.preemptive||e.preemtive;return o.handler=se(i=>{let u=a(i.path,i.method.toLowerCase());if("error"in u){if(c)throw u.error;return}i.context.matchedRoute=u.matched;let f=u.matched.params||{};return i.context.params=f,Promise.resolve(u.handler(i)).then(d=>d===void 0&&c?null:d)}),o.handler.__resolve__=async i=>{i=Q(i);let u=a(i);if("error"in u)return;let f={route:u.matched.path,handler:u.handler};if(u.handler.__resolve__){let d=await u.handler.__resolve__(i);if(!d)return;f={...f,...d}}return f},o}function Sn(e){return async function(r,n){let o=tr(r,n);try{await e.handler(o)}catch(s){let a=m(s);if(oe(s)||(a.unhandled=!0),q(o,a.statusCode,a.statusMessage),e.options.onError&&await e.options.onError(a,o),o.handled)return;(a.unhandled||a.fatal)&&console.error("[h3]",a.fatal?"[fatal]":"[unhandled]",a),e.options.onBeforeResponse&&!o._onBeforeResponseCalled&&await e.options.onBeforeResponse(o,{body:a}),await Pt(o,a,!!e.options.debug),e.options.onAfterResponse&&!o._onAfterResponseCalled&&await e.options.onAfterResponse(o,{body:a})}}}function mr(e,t){y(t),t instanceof R?(t.message=`${e}
15
- ${t.message}`,he(t)):(le({headline:e,body:t.message}),h(`${e}
16
- ${t.stack??t.message}`))}function Nn(e,t){let r={delete:`Failed to delete file "${e}" from remote theme.`,upload:`Failed to upload file "${e}" to remote theme.`,default:e}[t??"default"]??e;return n=>{mr(r,n)}}function ie(e,t){return m({status:e.status??502,statusText:e.statusText??"Bad Gateway",cause:e,data:{url:(t??e.url)?.toString(),requestId:e.headers?.get("x-request-id")??void 0}})}function qn(e,t="Unexpected error during fetch"){let r=e,n=r.statusCode??502,o=r.statusMessage??"Bad Gateway",s=`${t.replace(/\.$/,"")} with status ${n} (${o}).`;r.data?.requestId&&(s+=`
17
- Request ID: ${r.data.requestId}`),r.data?.url&&(s+=`
18
- URL: ${r.data.url}`);let a=r.cause??e;return{headline:s,body:a.stack??r.stack??r.message??o,status:n,statusText:o,cause:a,requestId:r.data?.requestId,url:r.data?.url}}async function Fn(e,t){let r=_r(e,t),n=await yr(e,t),o,s=Object.keys({...t.replaceTemplates,...t.replaceExtensionTemplates});if(s.length>0){h(`\u2192 Rendering ${r} (with ${s})...`);let u=_e(t);o=await fetch(r,{method:"POST",body:u,redirect:"manual",headers:{...n,...S()}}).catch(f=>{throw ie(y(f),r)})}else h(`\u2192 Rendering ${r}...`),o=await fetch(r,{method:t.method,redirect:"manual",headers:{...n,...S()}}).catch(u=>{throw ie(y(u),r)});let a=o.headers.get("x-request-id");h(`\u2190 ${o.status} (request_id: ${a})`);let i=o.headers.get("Content-Type")?.includes("application/json");return o=new Response(o.body,o),i||o.headers.delete("Content-Type"),o}async function yr(e,t){return ve(e)?gr(e,t):wr(e,t)}async function wr(e,t){let r=await Ze(e,t),n=e.storefrontToken;return W({...t.headers,Authorization:`Bearer ${n}`,Cookie:r})}async function gr(e,t){let r=await Ze(e,t),n=e.storefrontToken,o={},s=["ACCEPT","CONTENT-TYPE","CONTENT-LENGTH"];for(let[a,c]of Object.entries(t.headers))s.includes(a.toUpperCase())&&(o[a]=c);return W({...o,...Rr(e),Authorization:`Bearer ${n}`,Cookie:r})}function Ze(e,t){let r=T(t.headers.cookie??t.headers.Cookie??""),n=e.sessionCookies??{};return I({...r,...n})}function _r(e,{path:t,sectionId:r,appBlockId:n,query:o}){let a=`${ce(e)}${t}`,c=new URLSearchParams({_fd:"0",pb:"0"});for(let[i,u]of o)c.append(i,u);return r?c.append("section_id",r):n&&c.append("app_block_id",n),`${a}?${c}`}function ce(e){return ve(e)?`https://${me()}/cli/sfr`:`https://${e.storeFqdn}`}function ve(e){return e.token.startsWith("shptka_")}function Rr(e){return{"X-Shopify-Shop":e.storeFqdn,"X-Shopify-Access-Token":e.token}}l();var br=1800*1e3,et=["layout/theme.liquid","config/settings_schema.json"];async function Zn(e,t,r,n){let o=await tt(e,t,r,n);return o.refresh=async()=>{h("Refreshing theme session...");let s=await tt(e,t,r,n);return C("theme-service:session:refreshed"),Object.assign(o,s),s},setInterval(()=>{o.refresh&&o.refresh().then(()=>h("Refreshed theme session via auto-refresher...")).catch(()=>h("Session could not be refreshed."))},br),o}async function tt(e,t,r,n){let o=ce(t),s=await de(t.storeFqdn,r,[],{forceRefresh:!1,noPrompt:!0}),a=await fe([],r,{forceRefresh:!1,noPrompt:!0}),c=await Er(o,e,t,a,n);return{...s,sessionCookies:c,storefrontToken:a}}async function Er(e,t,r,n,o){try{return await Re(e,r.storeFqdn,t,o,{"X-Shopify-Shop":r.storeFqdn,"X-Shopify-Access-Token":r.token,Authorization:`Bearer ${n}`})}catch(s){throw s instanceof k&&await Cr(t,r),s}}async function Cr(e,t){if(h(`Verifying if theme with id ${e} has required files...`),(await we(Number(e),et,t)).length!==et.length)throw y(new R(ye`Theme ${F.cyan(e)} is missing required files. Run ${F.cyan(`shopify theme delete -t ${e}`)} to delete it, then try your command again.`.value));h(`Theme with id ${e} has required files.`)}export{S as a,W as b,$r as c,jr as d,m as e,Pt as f,un as g,fn as h,Fe as i,_ as j,dn as k,ln as l,hn as m,pn as n,w as o,q as p,mn as q,A as r,yn as s,wn as t,gn as u,_n as v,nr as w,ar as x,En as y,Cn as z,Sn as A,mr as B,Nn as C,ie as D,qn as E,Fn as F,yr as G,Ze as H,ce as I,Zn as J,tt as K};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-LCCMXY6N.js";import{Fa as w}from"./chunk-WCWNI3ZV.js";import{d as v}from"./chunk-N5ROZKPZ.js";import{R as y,g as O}from"./chunk-4V4DQ6W7.js";import{d as r,g as c}from"./chunk-BHWEA4V2.js";import{Fb as d,Hb as a,Ta as h,ma as m}from"./chunk-VPL2NDH6.js";import{e as q,g as u}from"./chunk-VPRTJUIN.js";u();u();var l=q(O(),1);async function $(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new c("No API secret keys found for app");return y(t,e.apiKey,o)}function x(e){let t;try{t=(0,l.parse)(e)}catch(i){throw i instanceof Error?new r(`Invalid GraphQL syntax: ${i.message}`):i}if(t.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new r("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}async function I(e){let{adminSession:t,userSpecifiedVersion:o,minimumDefaultVersion:i}=e;if(o==="unstable")return o;let n=await v(t);if(!o){let p=n.filter(f=>f.supported).map(f=>f.handle);return i&&p.push(i),p.sort().reverse()[0]}let s=n.map(p=>p.handle);if(s.includes(o))return o;let A=a`Invalid API version: ${o}`.value,P=a`Allowed versions: ${s.join(", ")}`.value;throw new r(A,P)}function M(e){let{organization:t,remoteApp:o,storeFqdn:i,version:n}=e,s=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${i}`];return n&&s.push(`API version: ${n}`),s}function S(e){return(0,l.parse)(e).definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}function N(e,t){if(S(e)&&t.storeType!=="APP_DEVELOPMENT")throw new r("Mutations can only be executed on dev stores.")}async function D(e){let t=await w({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),o=await E({appContextResult:t,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:t,store:o}}async function z(e){let t;if(e.query!==void 0){if(!e.query.trim())throw new r("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");t=e.query}else if(e["query-file"]){let n=e["query-file"];if(!await h(n))throw new r(a`Query file not found at ${d.path(n)}. Please check the path and try again.`);if(t=await m(n,{encoding:"utf8"}),!t.trim())throw new r(a`Query file at ${d.path(n)} is empty. Please provide a valid GraphQL query or mutation.`)}if(!t)throw new c("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");x(t);let{appContextResult:o,store:i}=await D(e);return{query:t,appContextResult:o,store:i}}export{$ as a,x as b,I as c,M as d,S as e,N as f,D as g,z as h};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-KU5OPV7U.js";import{a as o}from"./chunk-K77WAKOB.js";import{a as s}from"./chunk-NXL6LDJU.js";import{b as i}from"./chunk-VEDZUOVI.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};
@@ -1 +0,0 @@
1
- import{b as n}from"./chunk-4KRT35A2.js";import{u as r}from"./chunk-7JESXDF2.js";import{g as e}from"./chunk-VPRTJUIN.js";e();function v(o){o.verbose&&(process.env[n.verbose.env]="true"),o.noColor&&(r.level=0,process.env.FORCE_COLOR="0")}export{v as a};
@@ -1,7 +0,0 @@
1
- import{k as p,q as d}from"./chunk-HHXHOQQP.js";import{a as u}from"./chunk-UOQQNAHX.js";import{aa as P}from"./chunk-IWCPQD7X.js";import{b as l}from"./chunk-4KRT35A2.js";import{v as f}from"./chunk-MGL4YM3S.js";import{d as i}from"./chunk-BHWEA4V2.js";import{Ta as c,ma as h}from"./chunk-VPL2NDH6.js";import{f as r,n as m}from"./chunk-IU2ZQ6TE.js";import{e as w,g as n}from"./chunk-VPRTJUIN.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
2
-
3
- Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
4
-
5
- The package includes the \`listings\` directory if present (required for multi-preset themes per [Theme Store requirements](https://shopify.dev/docs/storefronts/themes/store/requirements#adding-presets-to-your-theme-zip-submission)).
6
-
7
- The ZIP file uses the name \`theme_name-theme_version.zip\`, based on parameters in your [settings_schema.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-schema-json) file.`;s.description=_.descriptionWithoutMarkdown();s.flags={...l,path:p.path};s.multiEnvironmentsFlags=null;var E=s;export{E as a};
@@ -1 +0,0 @@
1
- import{Q as r}from"./chunk-4V4DQ6W7.js";import{b as c}from"./chunk-VEDZUOVI.js";import{Nb as a}from"./chunk-VPL2NDH6.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var o=class extends c{static{this.description="Logs you out of the Shopify account or Partner account and store."}async run(){await r(),a("Logged out from all the accounts")}};export{o as a};
@@ -1 +0,0 @@
1
- import{d as l}from"./chunk-IOQQUHST.js";import{c as t}from"./chunk-QFWIDATO.js";import{a as i,h as m,i as w,j as d,m as f}from"./chunk-HHXHOQQP.js";import{F as n}from"./chunk-MGL4YM3S.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function h(o,r){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{h as a};
@@ -1 +0,0 @@
1
- import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-4V4DQ6W7.js";import{b as l}from"./chunk-LITB5QQX.js";import{d as p,g as F}from"./chunk-BHWEA4V2.js";import{Fb as g,Hb as h}from"./chunk-VPL2NDH6.js";import{j as q}from"./chunk-ULQG3XQS.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e){let o="Admin",a=await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,a,r);return v({query:t,api:o,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:n,preferredBehaviour:s}=t,i=a??S.get(e.storeFqdn);i??(i=await b(e,s));let u=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=u,u=new m().host("app"));let D={url:x(u,i,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:n,unauthorizedHandler:y,preferredBehaviour:s})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:V,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${g.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
@@ -1 +0,0 @@
1
- import{a as p,b as u}from"./chunk-UOQQNAHX.js";import{m as l,n as f}from"./chunk-4V4DQ6W7.js";import{d as i}from"./chunk-BHWEA4V2.js";import{Ga as m,na as c}from"./chunk-VPL2NDH6.js";import{d as a}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{writeFile as w}from"fs/promises";var d=1024*1024,h=100,g=h*d;async function b(o,t){let e=a(t,"manifest.json");await w(e,JSON.stringify(o,null,2))}var S=["!**/*.js.map","!**/*.metafile.json"];async function N(o,t,e){let r=e??["**/*",...S];t.endsWith(".br")?await u({inputDirectory:o,outputPath:t,matchFilePattern:r}):await p({inputDirectory:o,outputZipPath:t,matchFilePattern:r})}async function T(o,t){let e=await m(t);if(e>g){let E=`${(Math.ceil(e/d*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${h} MB upload limit (it is ${E}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let r=l(),n=c(t);r.append("my_upload",n),await f(o,{method:"put",body:n,headers:r.getHeaders()},"slow-request")}async function j(o,t){let e=await o.generateSignedUploadUrl(t);if(!e.assetUrl||e.userErrors?.length>0){let r=e.userErrors.map(n=>n.message).join(", ");throw new i(r)}return e.assetUrl}export{b as a,S as b,N as c,T as d,j as e};
@@ -1,9 +0,0 @@
1
- import{b as t}from"./chunk-VEDZUOVI.js";import{J as o}from"./chunk-MGL4YM3S.js";import{r as p}from"./chunk-3YWUSKWF.js";import{e as h,g as e}from"./chunk-VPRTJUIN.js";e();e();async function i(r){let a=new URLSearchParams;a.append("search",r??""),await o(`https://shopify.dev?${a.toString()}`)}var c=h(p(),1),s=class r extends t{static{this.description="Starts a search on shopify.dev."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
2
- shopify search
3
-
4
- # search for a term on Shopify.dev
5
- shopify search <query>
6
-
7
- # search for a phrase on Shopify.dev
8
- shopify search "<a search query separated by spaces>"
9
- `]}static{this.args={query:c.Args.string()}}async run(){let{args:a}=await this.parse(r);await i(a.query)}};export{s as a};